query
stringlengths 9
43.3k
| document
stringlengths 17
1.17M
| metadata
dict | negatives
listlengths 0
30
| negative_scores
listlengths 0
30
| document_score
stringlengths 5
10
| document_rank
stringclasses 2
values |
---|---|---|---|---|---|---|
function loadByKeyInfo loads a label by Page, Key and Language ID.
|
function loadByKeyInfo( $pageID='', $key='', $languageID='' )
{
$condition = "";
if ($pageID != '') {
$condition = 'page_id='.$pageID;
}
if ($key != '') {
if ($condition != '' ) {
$condition .= ' AND ';
}
$condition .= 'label_key="'.$key.'"';
}
if ($languageID != '') {
if ($condition != '' ) {
$condition .= ' AND ';
}
$condition .= 'language_id='.$languageID;
}
return $this->loadByCondition( $condition );
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"function loadPageLabels( $seriesKey='', $pageKey='' ) \n {\n // if no series key or page key is given, then all data will be loaded.\n // might not be what you want ...\n $whereClause = '';\n if ($seriesKey != '' ) {\n \n $whereClause = ' series_key=\"'.$seriesKey.'\" ';\n }\n \n if ($pageKey != '' ) {\n \n if ($whereClause != '') {\n $whereClause .= ' AND ';\n }\n $whereClause .= ' page_key=\"'.$pageKey.'\" ';\n }\n \n // compile proper SQL statement for loading this series...\n $sql = 'SELECT label_label, language_id, label_key FROM ';\n $sql .= '( ' . SITE_DB_NAME.'.'.XMLObject_MultilingualManager::DB_TABLE_SERIES . ' AS a INNER JOIN ' . SITE_DB_NAME.'.'.XMLObject_MultilingualManager::DB_TABLE_PAGE . ' AS b ON a.series_id=b.series_id )';\n $sql .= ' INNER JOIN '. SITE_DB_NAME.'.'.XMLObject_MultilingualManager::DB_TABLE_LABEL . ' as c ON b.page_id=c.page_id ';\n \n if ( $whereClause != '') {\n $sql .= ' WHERE '.$whereClause;\n }\n\n $this->loadLabelsFromDB( $sql );\n \n }",
"function getLabel($key, $languageID='') \n {\n $labelData = '';\n \n // if language ID is not provided, then use class default.\n if ($languageID == '' ) {\n $languageID = $this->languageID;\n }\n\n\n // if desired [KEY] exists then\n if ( array_key_exists($key, $this->labels) ) {\n\n // if desired [LANGUAGEID] exists \n if (array_key_exists($languageID, $this->labels[ $key ] ) ) {\n \n // return label\n $labelData = $this->labels[ $key ][ $languageID ];\n \n } else {\n // else \n \n // return label in 1st avaialble language\n $labelData = current( $this->labels[ $key ] );\n \n } // end if\n \n } else {\n // else\n \n //return key\n $labelData = $key;\n \n } // end if\n\n return $labelData;\n \n }",
"public function load($key);",
"abstract public function load($Type, $Key, $DetailLevel);",
"public function selectAPIKeyByKey($key, $label)\n {\n $result = $this->sdb->query(\"select * from api_keys where label = $1;\", [$label]);\n\n while($row = $this->sdb->fetchrow($result))\n {\n if (password_verify($key, $row[\"key\"]))\n return $row;\n }\n return null;\n }",
"function loadSeriesLabels( $seriesKey='' ) \n {\n // if no series key is given, then all data will be loaded.\n // might not be what you want ...\n $whereClause = '';\n if ($seriesKey != '' ) {\n \n $whereClause = ' series_key=\"'.$seriesKey.'\" ';\n }\n \n // compile proper SQL statement for loading this series...\n $sql = 'SELECT label_label, language_id, label_key FROM ';\n $sql .= '( ' . SITE_DB_NAME.'.'.XMLObject_MultilingualManager::DB_TABLE_SERIES . ' AS a INNER JOIN ' . SITE_DB_NAME.'.'.XMLObject_MultilingualManager::DB_TABLE_PAGE . ' AS b ON a.series_id=b.series_id )';\n $sql .= ' INNER JOIN '. SITE_DB_NAME.'.'.XMLObject_MultilingualManager::DB_TABLE_LABEL . ' as c ON b.page_id=c.page_id ';\n \n if ( $whereClause != '') {\n $sql .= ' WHERE '.$whereClause;\n }\n\n $this->loadLabelsFromDB( $sql );\n \n }",
"public function load($key)\n {\n }",
"function loadLabelsFromDB( $sql ) \n {\n // execute given SQL statment\n $this->db->runSQL( $sql );\n \n // for each returned label\n while ($row = $this->db->retrieveRow() ) {\n \n // store in labels array\n $this->labels[ $row['label_key'] ][ $row['language_id'] ] = $row['label_label'];\n \n } // next label\n \n }",
"function Load($id_value, $key_row_name = ''){\r\n\t\tif(!empty($key_row_name)){\r\n\t\t\t$key_row = \", t.\" . $key_row_name . \" \";\r\n\t\t}else{\r\n\t\t\t$key_row = \", '' AS `key`\";\r\n\t\t}\r\n\r\n\t\t$sql = \"SELECT t.\" . $this->data_row . \" \" . $key_row . \"\r\n\t\t\t\tFROM \" . $this->table_name . \" AS t\r\n\t\t\t\tWHERE t.\" . $this->id_row . \" = '\" . $id_value . \"'\";\r\n\r\n\t\t$result = OBE_App::$db->query($sql);\r\n\t\tif($result){\r\n\t\t\tlist($blob, $key) = OBE_App::$db->fetch_row($result);\r\n\t\t\tif(!empty($blob)){\r\n\t\t\t\tif(!empty($key_row_name) && !empty($key)){\r\n\t\t\t\t\t$this->data[$key] = unserialize($blob);\r\n\t\t\t\t}else{\r\n\t\t\t\t\t$this->data = unserialize($blob);\r\n\t\t\t\t}\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"abstract public function load($cacheLabel);",
"public function loadFromIPEX($key) {\n return $this->takeData($this->requestData(is_array($key) ? \\Ease\\Functions::addUrlParams('', $key) : $key));\n }",
"private function loadIPTCKeywords()\n\t{\n\t\tlist($this->metadata['width'], $this->metadata['height']) = getimagesize ( $this->data['path'], $iptcInfoRaw);\n\n\t\t//var_dump(iptcparse($iptcInfoRaw[\"APP13\"]));\n\n\t\t// Test for loaded IPTC data\n\t\tif(is_array($iptcInfoRaw) && isset($iptcInfoRaw[\"APP13\"])) \n\t\t{ \n\t\t\t// Parse data\n\t\t\t$iptc = iptcparse($iptcInfoRaw[\"APP13\"]);\n\n\t\t\tif(isset($iptc[\"2#025\"]))\n\t\t\t{\n\t\t\t\t$this->tags = $iptc[\"2#025\"];\n\t\t\t}\n\t\t\t\n\t\t\tif(isset($iptc[\"2#005\"]))\n\t\t\t{\n\t\t\t\t$this->title = $iptc[\"2#005\"][0];\n\t\t\t}\n\n\t\t\tif(isset($iptc[\"2#120\"]))\n\t\t\t{\n\t\t\t\t$this->description = $iptc[\"2#120\"][0];\n\t\t\t}\n\n\t\t\t//var_dump($iptc);\n\t\t\tforeach (array_keys($iptc) as $data) \n\t\t\t{\n\t\t\t\t$c = count ($iptc[$data]);\n\t\t\t\tfor ($i=0; $i <$c; $i++)\n\t\t\t\t{\n\t\t\t\t\t# Check for keyword id\n\t\t\t\t\tif ($data == \"2#025\")\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->data['keywords'][] = $iptc[$data][$i];\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t}\n\t\t} \n\t}",
"public function getPageKey();",
"function get_lang_key($key) {\n $CI = &get_instance();\n return $CI->lang->line($key);\n}",
"public function getLoader($key)\n {\n }",
"function setLabelTag($key, $tag, $value) \n {\n\n // if desired [KEY] exists then\n if ( array_key_exists($key, $this->labels) ) {\n\n // if desired [LANGUAGEID] exists \n if (array_key_exists($this->languageID, $this->labels[ $key ] ) ) {\n \n // update label\n $labelData = $this->labels[ $key ][ $this->languageID ];\n $this->labels[ $key ][ $this->languageID ] = str_replace($tag, $value, $labelData);\n \n } else {\n // else \n \n // update label in 1st avaialble language\n $labelData = current( $this->labels[ $key ] );\n $langID = key( $this->labels[$key] ); // Oh, Johnny, you forgot this line, 90 minutes of debugging == free lunch for me!\n/*echo 'Debugging Multilingual Manaer (line 396).<br><br>Case is key matches but requested language not available ... on a tag update<br><br>';\necho 'labelData = [';\nvar_export($labelData);\necho ']<br><br>';\necho 'this->labels[] = [';\nvar_export($this->labels[ $key ]);\necho ']<br><br>';\nexit;*/\n $this->labels[$key][$langID] = str_replace($tag, $value, $labelData);\n \n } // end if\n \n } \n\n }",
"static function rLabel($key) {\n\n\t\t$_u = self::uInstance();\n\t\treturn $_u->data_key[$key]['label'];\n\t}",
"public function loadBreadcrumb($uuid, $languageCode, $webspaceKey);",
"function getKeyField() \n {\n return 'label_key';\n }",
"public function loadStartPage($webspaceKey, $languageCode);",
"private function loadAPIKeys() {\n $results = $this->interface->getAPIKeys();\n $this->APIKeys = [ ];\n\n foreach ($results as $row)\n $this->APIKeys[ $row[ 'service' ] ] = $row[ 'key' ];\n }",
"public function get_loader($key)\n {\n }",
"function findkey()\n\t{\n\t\t// Initialize variables\n\t\t$db = & JFactory::getDBO();\n\t\t$keyref = JRequest::getVar( 'keyref', null, 'default', 'cmd' );\n\t\tJRequest::setVar( 'keyref', $keyref );\n\n\t\t// If no keyref left, throw 404\n\t\tif ( empty( $keyref ) === true )\n\t\t{\n\t\t\tJError::raiseError( 404, JText::_( \"Key Not Found\" ) );\n\t\t}\n\n\t\t$keyref = $db->Quote( '%keyref=' . $db->getEscaped( $keyref, true ) . '%', false );\n\t\t$query = 'SELECT id' .\n\t\t\t\t\t\t' FROM #__content' .\n\t\t\t\t\t\t' WHERE attribs LIKE ' . $keyref;\n\t\t$db->setQuery( $query );\n\t\t$id = (int) $db->loadResult();\n\n\t\tif ( $id > 0 )\n\t\t{\n\t\t\t// Create the view\n\t\t\t$view = & $this->getView( 'article', 'html' );\n\n\t\t\t// Get/Create the model\n\t\t\t$model = & $this->getModel( 'Article' );\n\n\t\t\t// Set the id of the article to display\n\t\t\t$model->setId( $id );\n\n\t\t\t// Push the model into the view (as default)\n\t\t\t$view->setModel( $model, true );\n\n\t\t\t// Display the view\n\t\t\t$view->display();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tJError::raiseError( 404, JText::_( 'Key Not Found' ) );\n\t\t}\n\n\t}",
"public function getByKey($key);",
"function getLookup($lkpName)\n{\n\tglobal $pclib;\n if ($pclib->app) $appflt = \"AND (APP='\".$pclib->app->name.\"' or APP is null)\";\n $sql = sprintf(\n\t \"select ifnull(id,guid), label from %s\n\t where cname='%s' %s order by position,label\",\n\t $this->LOOKUP_TAB, $lkpName, $appflt);\n\t\n\t$items = $this->selectPair($sql);\n\n/*\n\tif ($this->mls) {\n\t\t$langid = $lkpname;\n\t\t$mls_items = $this->mls->getpage('L_'.$langid);\n\t\tforeach((array)$mls_items as $iid => $label) $items[$iid] = $label;\n\n\t\tif ($this->mls->autoupdate)\n\t\t\t$this->mls->set_page_db($this->mls->defaultlang, 'L_'.$langid, $items);\n\t}\n*/\n\n\treturn $items;\n}",
"function get_lang_label($key){\n\t\t$list = array(\n\t\t\t//bg 'Bulgarian'\n\t\t\t'cat' => 'Català',\n\t\t\t//cs 'Čeština'\n\t\t\t//da 'Dansk'\n\t\t\t'deu' => 'Deutsch',\n\t\t\t'eng' => 'English',\n\t\t\t'esp' => 'Español',\n\t\t\t//fi 'Finnish (Suomi)'\n\t\t\t'fra' => 'Français',\n\t\t\t//he 'Hebrew (עברית)'\n\t\t\t//hu 'Magyar'\n\t\t\t//it 'Italiano'\n\t\t\t'jpn' => 'Japanese (日本語)',\n\t\t\t'kor' => 'Korean (한국어)',\n\t\t\t//lt 'Lithuanian (lietuvių)'\n\t\t\t//nl 'Nederlands'\n\t\t\t//no 'Norwegian (Norsk bokmål)'\n\t\t\t//pl 'Polski'\n\t\t\t'bra' => 'Português(Brasil)',\n\t\t\t//pt 'Português'\n\t\t\t'ron' => 'Română',\n\t\t\t'rus' => 'Russian (Русский)',\n\t\t\t//sk 'Slovensky'\n\t\t\t//sr 'Srpski'\n\t\t\t//sv 'Svenska'\n\t\t\t'tha' => 'Thai (ไทย)',\n\t\t\t//tr 'Türkçe'\n\t\t\t//uk 'Ukrainian (Українська)'\n\t\t\t//vn 'Tiếng Việt'\n\t\t\t//zh-tw 'Traditional Chinese (繁體中文)'\n\t\t\t'chi' => 'Simplified Chinese (简体中文)'\n\t );\n\t return isset($list[$key]) ? $list[$key] : $key;\n\t}",
"public static function getKey();",
"public static function getKey();",
"public function setPageKey($key);",
"function getKey() \n {\n return $this->getValueByFieldName( 'label_key' );\n }"
] |
[
"0.6250124",
"0.59847033",
"0.5841714",
"0.5746442",
"0.57197297",
"0.5711929",
"0.5678265",
"0.5232075",
"0.5181983",
"0.5176271",
"0.5170793",
"0.5161489",
"0.51331997",
"0.5129278",
"0.50166017",
"0.5009064",
"0.5008076",
"0.49952367",
"0.4985553",
"0.49743322",
"0.49595657",
"0.4948933",
"0.4915728",
"0.48972416",
"0.48878035",
"0.48645523",
"0.48623642",
"0.48623642",
"0.4826183",
"0.48122245"
] |
0.79250985
|
0
|
function setKey Set the key of this label.
|
function setKey( $key )
{
$this->setValueByFieldName( 'label_key', $key );
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function setKey($key);",
"public function setKey(string $key);",
"function setKey($value) {\r\n $this->key = $value;\r\n }",
"public function setKey( $key )\r\n {\r\n $this->key = $key;\r\n }",
"public function setKey($key)\n\t{\n\t\t$this->key = $key;\n\t}",
"public function setKey($key)\n\t{\n\t\t$this->key = $key;\n\t}",
"public function setKey($key)\n\t{\n\t\t$this->key = $key;\n\t}",
"public function setKey($key)\n {\n $this->key = $key;\n }",
"public function setKey($key)\n {\n $this->key = $key;\n }",
"public function setKey($key)\n {\n $this->key = $key;\n }",
"public function setKey($key)\n {\n $this->_key = $key;\n }",
"public function setKey($var)\n {\n GPBUtil::checkString($var, True);\n $this->key = $var;\n\n return $this;\n }",
"public function setKey($var)\n {\n GPBUtil::checkString($var, True);\n $this->key = $var;\n\n return $this;\n }",
"public function setKey($var)\n {\n GPBUtil::checkString($var, True);\n $this->key = $var;\n\n return $this;\n }",
"public function setKey($var)\n {\n GPBUtil::checkString($var, True);\n $this->key = $var;\n\n return $this;\n }",
"public function setKey($var)\n {\n GPBUtil::checkString($var, False);\n $this->key = $var;\n\n return $this;\n }",
"public function setKey($var)\n {\n GPBUtil::checkString($var, False);\n $this->key = $var;\n\n return $this;\n }",
"public function setKey($var)\n {\n GPBUtil::checkString($var, False);\n $this->key = $var;\n\n return $this;\n }",
"function setKey($key)\r\n {\r\n $this->key = $key;\r\n $this->changed = true;\r\n }",
"public static function setKey($key){\n\t\tself::$_key = $key;\n\t}",
"public function setKey(?string $key): void\n {\n }",
"public function setKey(string $key) : void {\n\t\t$this->key = $key;\n\t}",
"public function setKeyName($key);",
"public function setKey($var)\n {\n GPBUtil::checkInt64($var);\n $this->key = $var;\n\n return $this;\n }",
"public function setKey(?string $key): void\n {\n $this->key = $key;\n }",
"public function setKey($key)\n {\n $this->_key = $key;\n return $this;\n }",
"function setKey($clave){\n $this->key = $clave;\n }",
"public function setKey($key)\n {\n return $this->key = $key;\n }",
"public function setKey(\\SetaPDF_Core_Type_Name $key) {}",
"public function setKey($key)\n {\n return $this->set('key', $key);\n }"
] |
[
"0.81226397",
"0.79722345",
"0.7915697",
"0.7829997",
"0.76666975",
"0.76666975",
"0.76666975",
"0.7648317",
"0.7648317",
"0.7648317",
"0.756283",
"0.7535961",
"0.7535961",
"0.7535961",
"0.7535961",
"0.75253505",
"0.75253505",
"0.75253505",
"0.75145406",
"0.74867636",
"0.74073845",
"0.7406927",
"0.7298279",
"0.71809965",
"0.71280116",
"0.7105087",
"0.70594966",
"0.70577836",
"0.7048944",
"0.70400536"
] |
0.8232378
|
0
|
function setLanguageID Set the ID of the language of this label.
|
function setLanguageID( $languageID )
{
$this->setValueByFieldName( 'language_id', $languageID );
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function setLanguage($languageId)\n\t{\n\t\t$this->languageId = \\Bitrix\\Main\\Localization\\Loc::getCurrentLang();\n\t\t$dbLanguage = \\Bitrix\\Main\\Localization\\LanguageTable::getList([\n\t\t\t'select' => ['LID'],\n\t\t\t'filter' => [\n\t\t\t\t'=LID' => $languageId,\n\t\t\t\t'=ACTIVE' => 'Y'\n\t\t\t],\n\t\t])->fetch();\n\t\tif ($dbLanguage)\n\t\t{\n\t\t\t$this->languageId = $dbLanguage['LID'];\n\t\t}\n\t}",
"public function setLanguageId( $id )\n\t{\n\t\tif( $id !== $this->getLanguageId() )\n\t\t{\n\t\t\t$this->values[$this->prefix . 'languageid'] = $this->checkLanguageId( $id );\n\t\t\t$this->setModified();\n\t\t}\n\n\t\treturn $this;\n\t}",
"public function setLanguageID(int $languageID)\n {\n $this->languageID = $languageID;\n\n return $this;\n }",
"public function setLanguageId($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->language_id !== $v) {\n $this->language_id = $v;\n $this->modifiedColumns[BiblioTableMap::COL_LANGUAGE_ID] = true;\n }\n\n if ($this->aLanguage !== null && $this->aLanguage->getLanguageId() !== $v) {\n $this->aLanguage = null;\n }\n\n return $this;\n }",
"private function setLanguage()\n\t{\n\t\tif (isset($_GET['language']))\n\t\t\t$id_lang = (int)($_GET['language'])>0 ? $_GET['language'] : 0;\n\t\tif (!isset($id_lang))\n\t\t\t$id_lang = ($this->getIdByHAL());\n\t\t$this->lang = $this->xml_file->lang[(int)($id_lang)];\n\t}",
"public function setLanguageId(int $nb_language_id) : CNabuDataObject\n {\n if ($nb_language_id === null) {\n throw new ENabuCoreException(\n ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,\n array(\"\\$nb_language_id\")\n );\n }\n $this->setValue('nb_language_id', $nb_language_id);\n \n return $this;\n }",
"protected function setLanguage($languageId)\n {\n $_SESSION['lang'] = (int)$languageId;\n\n if ($this->user->id && (empty($this->user->languageId) || $this->user->languageId != $languageId)) {\n $this->user->set(['languageId' => $languageId], $this->user->id);\n }\n\n Registry::set('lang', $_SESSION['lang']);\n }",
"public function setLanguageValue($languageID, $value) {\n\t\tif(is_object($languageID) && $languageID instanceof Language) $languageID = $languageID->id;\n\t\tif(is_string($languageID) && !ctype_digit(\"$languageID\")) $languageID = $this->wire('languages')->get($languageID)->id;\n\t\t$existingValue = isset($this->data[$languageID]) ? $this->data[$languageID] : '';\n\t\tif($value instanceof LanguagesPageFieldValue) {\n\t\t\t// to avoid potential recursion \n\t\t\t$value = $value->getLanguageValue($languageID); \n\t\t}\n\t\tif($value !== $existingValue) {\n\t\t\t$this->trackChange('data', $existingValue, $value); \n\t\t\t$this->trackChange('data' . $languageID, $existingValue, $value); \n\t\t}\n\t\t$this->data[(int)$languageID] = $value;\n\t\treturn $this;\n\t}",
"public function setLangid($langid)\n {\n $this->langid = $langid;\n }",
"public function setLanguage($i) {\n\t\t$this->current_language = $i;\n\t}",
"public function setLanguage($language);",
"public function getLanguageID()\n {\n return $this->languageID;\n }",
"public function getLanguageID()\n {\n return $this->languageID;\n }",
"public static function setLanguage($lid)\r\n {\r\n return session()->put(self::$sessLanguageKey, $lid);\r\n }",
"public function setLanguage($language) {\n if (isset($language)) {\n $this->_language = $language;\n } else {\n $this->_language = '';\n }\n }",
"public function SetLanguage($language)\n {\n $this->language = $language;\n }",
"public function setLanguage(string $lang);",
"public function setLanguageId(int $nb_language_id = null) : CNabuDataObject\n {\n $this->setValue('nb_language_id', $nb_language_id);\n \n return $this;\n }",
"public function settingLanguage() {}",
"public function setLanguage($code)\n {\n $this->lang = $code;\n }",
"public function setID($id)\n {\n $this->ID = $id;\n }",
"public function setLanguage(LanguageFieldInterface $language): void\n {\n $this->language = $language;\n }",
"protected function setLanguage() {\r\n\t\t$this->language = $GLOBALS['TSFE']->config['config']['language'];\r\n\t}",
"public function setLanguage($language)\n {\n $this->language = $language;\n }",
"public function setID($id){\n $this->ID = $id;\n }",
"public function setLanguage($language)\n {\n $this->language = $language;\n $this->load();\n }",
"public function setID($id) {\n\t\t$this->id = $id;\n\t}",
"public function setLanguage($language) {\n if ($language) {\n $this->language = $language;\n }\n }",
"public function setID($id) {\n $this->id = $id; \n }",
"public function getLanguageId()\n {\n return $this->language_id;\n }"
] |
[
"0.7254578",
"0.6957877",
"0.68781674",
"0.68494934",
"0.67664784",
"0.65868604",
"0.6500874",
"0.646718",
"0.6430152",
"0.6407913",
"0.62942135",
"0.62366104",
"0.62366104",
"0.62177974",
"0.6193533",
"0.618315",
"0.6173307",
"0.61352557",
"0.6126568",
"0.6118488",
"0.6094749",
"0.6085742",
"0.6079338",
"0.6065758",
"0.6057629",
"0.60533565",
"0.60236454",
"0.6003814",
"0.59986794",
"0.597409"
] |
0.8218909
|
0
|
function setPageID Set the ID of the parent page of this label.
|
function setPageID( $pageID )
{
$this->setValueByFieldName( 'page_id', $pageID );
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"protected function setPage_id($value)\n\t{\n\t\t$this->page_id = $value;\n\t}",
"public function setPageID(){\n\t\t\n\t\t$id = 'page';\n\t\t$s = '-';\n\t\t$pound = (!self::USE_SPLASH)?'#':'';\n\t\t$prefix = $pound.$id.$s;\n\t\t$this->headerContainerId = $prefix.'header'.$s.'container';\n\t\t$this->headerId = $prefix.'header';\n\t\t$this->subtitleId = $prefix.'subtitle';\n\t\t$this->brandId = $prefix.'brand';\n\t\t\n\t}",
"public function setPageID(){/*ACTUALLY NOT DEFINED*/}",
"function getParentPageID () {return $this->getFieldValue ('parent_page_id');}",
"public function setParent ($value) {\n\t\n\t\t// validation\n\t\tif ($this->pageID) {\n\t\t\n\t\t\t// check IDs aren't identical\n\t\t\tif ($this->pageID == $value) {\n\t\t\t\t$this->setMessage(strFirst(LANG_INVALID.\" \".LANG_PARENT));\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\t// check this parent isn't a child of this page\n\t\t\t$pagesModel = new PagesModel();\n\t\t\t$ids = $pagesModel->getChildrenAsArray($this->pageID);\n\t\t\t\n\t\t\tif (in_array($value, $ids)) {\n\t\t\t\t$this->setMessage(strFirst(LANG_INVALID.\" \".LANG_PARENT));\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\t$this->setData(\"pageParent\", intval($value));\n\t\treturn true;\n\t\n\t}",
"public function setParent_id( $parent_id ) {\n\t\t$this->parent_id = $parent_id;\n\t}",
"public function setParentObject(Page $value) : Page\n {\n return $this->setParentId($value->getId());\n }",
"public function set_parent_id( $value ) {\n\t\t// Update the parent in the database\n\t\twp_update_post( array(\n\t\t\t'ID' => $this->id,\n\t\t\t'post_parent' => $value,\n\t\t) );\n\n\t\t// And update the parent in memory\n\t\t$this->post->post_parent = $value;\n\t\t$this->order = null;\n\t}",
"public function setParent($value)\n {\n $this->setItemValue('parent', ['id' => (int)$value]);\n }",
"public function setParentID($value)\n {\n return $this->set('ParentID', $value);\n }",
"public function setParentID($value)\n {\n return $this->set('ParentID', $value);\n }",
"public function setParentID($value)\n {\n return $this->set('ParentID', $value);\n }",
"public function setParentProcessId(?int $value): void {\n $this->getBackingStore()->set('parentProcessId', $value);\n }",
"public function setParentSiteId(?string $value): void {\n $this->getBackingStore()->set('parentSiteId', $value);\n }",
"public function setParentId(?string $value) : Page\n {\n\n // As this column is a foreign key, empty values should be considered null.\n if (empty($value)) {\n $value = null;\n }\n\n\n if ($this->data['parent_id'] !== $value) {\n $this->data['parent_id'] = $value;\n $this->setModified('parent_id');\n }\n\n return $this;\n }",
"public function getPageID(){\n\t\t\n\t\tif(self::USE_SPLASH)\n\t\t{\n\t\t\t$this->setSplashID();\n\t\t}\n\t\telse $this->setPageID();\n\t\t\n\t}",
"public function set_parent_id($parent)\n {\n $this->set_default_property(self::PROPERTY_PARENT_ID, $parent);\n }",
"public function setId(string $value) : Page\n {\n\n if ($this->data['id'] !== $value) {\n $this->data['id'] = $value;\n $this->setModified('id');\n }\n\n return $this;\n }",
"public function set_parent_id($parent_id)\n {\n $this->set_default_property(self::PROPERTY_PARENT_ID, $parent_id);\n }",
"function setParent( $value )\r\n {\r\n if ( is_a( $value, \"eZImageCategory\" ) )\r\n {\r\n $this->ParentID = $value->id();\r\n }\r\n }",
"function set_parent($parent)\r\n {\r\n $this->parent = $parent;\r\n }",
"public function setParent($parent) {\n\t\t$this->parent = $parent;\n\t}",
"protected function setParent(Page $parent)\n {\n $this->parent = $parent;\n\n return $this;\n }",
"function setSectionID( $value )\r\n {\r\n $this->SectionID = $value;\r\n }",
"public function setParent($parent)\n {\n $this->parent = $parent;\n }",
"public function setParent($parent)\n {\n $this->parent = $parent;\n }",
"public function setParent($parent)\n\t{\n\t\t$this->parent = $parent;\n\t}",
"public function setParent($value) : Page\n {\n // Is this a scalar value representing the ID of this foreign key?\n if (is_scalar($value)) {\n return $this->setParentId($value);\n }\n\n // Is this an instance of Parent?\n if (is_object($value) && $value instanceof Page) {\n return $this->setParentObject($value);\n }\n\n // Is this an array representing a Page item?\n if (is_array($value) && !empty($value['id'])) {\n return $this->setParentId($value['id']);\n }\n\n // None of the above? That's a problem!\n throw new \\Exception('Invalid value for Parent.');\n }",
"function set_parent($value) {\n $this->set_mapped_property('parent', $value);\n }",
"protected function getParentPageID(){\n if( $this->displayBeneath == self::DISPLAY_PAGES_BENEATH_CURRENT ){\n return Page::getCurrentPage()->getCollectionID();\n }\n return $this->parentPageID;\n }"
] |
[
"0.7610768",
"0.7359292",
"0.72527826",
"0.68882054",
"0.6851632",
"0.6719235",
"0.6707801",
"0.6637949",
"0.66291755",
"0.65481204",
"0.6547438",
"0.6547438",
"0.6524153",
"0.6484764",
"0.64223593",
"0.6373675",
"0.6330353",
"0.6244669",
"0.6243201",
"0.6139514",
"0.61179906",
"0.61053085",
"0.60894233",
"0.6070751",
"0.60377455",
"0.60377455",
"0.60368997",
"0.5985849",
"0.59473807",
"0.5933968"
] |
0.7464303
|
1
|
Set the streaming expression that caused the exception.
|
public function setExpression(string $expression): void
{
$this->expression = $expression;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function setExpression($expression)\n {\n $this->expression = (string)$expression;\n return $this;\n }",
"public function setExpression(string $expression): self\n {\n $this->expression = $expression;\n\n return $this;\n }",
"public function setStream($stream) {\n if (!is_resource($stream)) {\n throw new SFException( 'setStream(): not a stream resource', ERR_REPORT_APP );\n }\n\n $this->stream = $stream;\n }",
"public function setException($exception)\n {\n $this->exception = $exception;\n }",
"private function setError() {\n\t\t$this->is_valid = false;\n\n\t\t// Remove the last invalid interval.\n\t\tarray_pop($this->intervals);\n\n\t\tif (!isset($this->source[$this->pos])) {\n\t\t\t$this->error = _('unexpected end of interval');\n\n\t\t\treturn;\n\t\t}\n\n\t\tfor ($i = $this->pos, $chunk = '', $maxChunkSize = 50; isset($this->source[$i]); $i++) {\n\t\t\tif (0x80 != (0xc0 & ord($this->source[$i])) && $maxChunkSize-- == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$chunk .= $this->source[$i];\n\t\t}\n\n\t\tif (isset($this->source[$i])) {\n\t\t\t$chunk .= ' ...';\n\t\t}\n\n\t\t$this->error = _s('incorrect syntax near \"%1$s\"', $chunk);\n\t}",
"protected function error() {\n trigger_error(\"All properties of previous datastream versions are read only. Please modify parent datastream object.\", E_USER_WARNING);\n }",
"public function testIterationException(): void\n {\n $this->variant->setException(new \\Exception('foo'));\n $this->logger->variantEnd($this->variant);\n $this->assertStringContainsString('ERROR', $this->output->fetch());\n }",
"public function setException(){\n $this->dbConnection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n }",
"public function setException($exception, $reassign = false);",
"public function setException(\\Exception $exception)\r\n\t{\r\n\t\t$this->_exception = $exception;\r\n\t\t$this->_status = false;\r\n\t\treturn $this;\r\n\t}",
"public function setExpression($expression)\n {\n $this->expression = $expression;\n\n return $this;\n }",
"public function setExpression($val)\n {\n $this->_propDict[\"expression\"] = $val;\n return $this;\n }",
"public function set_expr($property, $value = null) {\r\n $this->orm->set_expr($property, $value);\r\n }",
"public function setBytePositionInStream(int $bytePosition) {\n if ($this->operatorMetadata === null)\n throw new \\Exception(\"No Metadata available for this Operator\");\n $this->operatorMetadata->bytePositionInStream = $bytePosition;\n }",
"function set_body_with_expression(BaseExpression $expression)\n\t{\n\t\t$this->body = $expression;\n\t}",
"public function setException($exception)\n {\n $this->exception = $exception;\n return $this;\n }",
"protected function setErrorException(\\Exception $e) {\n\t\t$this->lastException = $e;\n\t\treturn $this;\n\t}",
"public function setExceptions($val)\n {\n $this->_propDict[\"exceptions\"] = $val;\n return $this;\n }",
"public function setExceptions($val)\n {\n $this->_propDict[\"exceptions\"] = $val;\n return $this;\n }",
"public function setStream(&$value)\n {\n $this->_stream = $value;\n }",
"public static function setStream($stream) {}",
"public function testStreamDisableInvalid() {\n\t\tCakeLog::disable('bogus_stream');\n\t}",
"public function setException(Throwable $exception) {\n $this->exception= $exception;\n }",
"public function setSexe($sexe)\n {\n $this->sexe = $sexe;\n\n return $this;\n }",
"public function setStream($stream)\n {\n if (!is_resource($stream) && !$stream instanceof \\Closure) {\n throw new \\InvalidArgumentException(sprintf('setStream() expects a stream or Closure, %s given.', gettype($stream)), 1416311979);\n }\n $this->stream = $stream;\n }",
"public function setStream($stream) {}",
"public function setErrorFromException(\\Exception $exception)\n {\n $this->error = $exception->__toString();\n }",
"public function setEnclosing($enclosure) {\n\n if (!($this->file instanceof SplFileObject)) {\n throw new Exception('Enclosure character must be set after initializing an instance');\n }\n\n if (strlen($enclosure) > 1) {\n throw new InvalidArgumentException(\"Encloser must be a single character\");\n }\n\n $this->file->setCsvControl($this->delimiter, $enclosure);\n $this->enclosure = $enclosure;\n }",
"public function testOffsetSet_Exception()\n {\n \t$this->setExpectedException('Exception', \"Unable to set attribute 'type'; Attribute is read-only.\");\n \t$this->Fs_Node['type'] = 'unknown';\n }",
"public function setThrowException($value)\n {\n $this->provider->throwExceptionInError = $value;\n }"
] |
[
"0.5187284",
"0.5146616",
"0.51368564",
"0.49721918",
"0.49575436",
"0.49495745",
"0.49000177",
"0.48894644",
"0.48866665",
"0.4876971",
"0.483904",
"0.48287717",
"0.48259288",
"0.47789252",
"0.47487715",
"0.4736355",
"0.47357237",
"0.4731738",
"0.4731738",
"0.47179723",
"0.4697647",
"0.46723902",
"0.46700135",
"0.46631286",
"0.4658327",
"0.4584322",
"0.45686704",
"0.45640066",
"0.45585656",
"0.4556938"
] |
0.5495644
|
0
|
Generic exception handler Handles uncaught exceptions, such as database errors
|
public static function handle_exception($e) {
switch ( get_class($e) ) {
case 'NumbatDBError':
case 'PDOException':
$type = 'db';
break;
default:
$type = 'uncaught';
break;
}
$config = array();
if($type == 'db' && get_class($e) == 'NumbatDBError')
$config = $e->getConfig();
numbat_primative_die($e->getMessage(), $type, $config);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"abstract protected function handleError(\\Exception $e);",
"function handler($ex) {\n echo \"In exception handler\\n\";\n}",
"function as_exception_handler($e){\n\t\t$msg = 'Error('.$e->getCode().') '. $e->getMessage().' in '. $e->getFile().':'. $e->getLine();\n\t\t$this->catch_error($msg, 'clickgs plugin crashed');\n\t}",
"function exceptionHandler($exception) {\n\t$errno = E_USER_ERROR;\n\t$type = get_class($exception);\n\t$message = \"Uncaught \" . $type . \": \" . $exception->getMessage();\n\t$file = $exception->getFile();\n\t$line = $exception->getLine();\n\t$context = $exception->getTrace();\n\tDebug::fatalHandler($errno, $message, $file, $line, $context);\n}",
"function exception_error_handler( $errno, $errstr, $errfile, $errline ) {\n throw new ErrorException( $errstr, $errno, 0, $errfile, $errline );\n}",
"function exception_error_handler($errno, $errstr, $errfile, $errline ) {\n throw new ErrorException($errstr, 0, $errno, $errfile, $errline);\n}",
"public function handle_error() {\n $last_operation = $this->add_last_operation;\n $data = array(\n 'function_name' => is_array($last_operation[0]) ? $last_operation[0][1] : $last_operation[0],\n 'function_name_complete' => is_array($last_operation[0]) ? (is_string($last_operation[0][0]) ? $last_operation[0][0].':' : get_class($last_operation[0][0]).'->').$last_operation[0][1] : $last_operation[0],\n 'args' => $last_operation[1]\n );\n\n switch (strtolower($data['function_name'])) {\n case 'autoexecute':\n $data['table'] = $data['args'][0];\n $data['fields'] = $data['args'][1];\n $data['operation'] = $data['args'][2];\n break;\n }\n\n $data['debug'] = $last_operation;\n if (class_exists('e_database'))\n throw new e_database($this->adodb->ErrorMsg(),$data,$this->adodb->ErrorNo());\n else\n throw new Exception($this->adodb->ErrorMsg(),$this->adodb->ErrorNo());\n }",
"function default_exception_handler($ex) {\n $backtrace = $ex->getTrace();\n $place = array('file'=>$ex->getFile(), 'line'=>$ex->getLine(), 'exception'=>get_class($ex));\n array_unshift($backtrace, $place);\n\n if ($ex instanceof moodle_exception) {\n _print_normal_error($ex->errorcode, $ex->module, $ex->a, $ex->link, $backtrace, $ex->debuginfo);\n } else {\n _print_normal_error('generalexceptionmessage', 'error', $ex->getMessage(), '', $backtrace);\n }\n}",
"public static function exception_handler($exception) {\n die('Uncaught exception: '. $exception->getMessage());\n }",
"public function handleException($exception);",
"function exception_handler($ex) {\n // now let the plugin send the exception to client\n $this->send_error($ex);\n // not much else we can do now, add some logging later\n exit(1);\n }",
"abstract public function handleFatalError($e);",
"public static function exception_handler($exception) {\n\t\tdie('Uncaught exception: '. $exception->getMessage());\n\t}",
"public function handleException($exception)\n {\n //if application is on production keep silent\n if (\\App::environment('production'))\n \\Log::error($exception->getMessage());\n\n //Eloquent Model Exception\n else if ($exception instanceof ModelNotFoundException)\n throw new ModelNotFoundException($exception->getMessage());\n\n //DB Error\n else if ($exception instanceof PDOException)\n throw new PDOException($exception->getMessage());\n\n else if ($exception instanceof BadMethodCallException)\n throw new BadMethodCallException($exception->getMessage());\n\n //Through general Exception\n else\n throw new Exception($exception->getMessage());\n\n }",
"public static function exception_handler($exception) {\n error_log(\"Uncaught exception: \". $exception->getMessage());\n die(1);\n }",
"function exception_error_handler($errno, $errstr, $errfile, $errline ) {\n throw new \\ErrorException($errstr, 0, $errno, $errfile, $errline);\n}",
"public static function exceptionHandler($e)\n {\n self::newMessage($e);\n self::customErrorMsg();\n }",
"public function handleException(\\Throwable $exception)\n {\n $handlerException = null;\n\n if (!$this->loggedErrors) {\n if (false !== strpos($message = $exception->getMessage(), \"@anonymous\\0\")) {\n $message = \"Anonymous Class Exception\"; //call class not found exception here\n }\n\n if ($exception::ERROR == self::PERMISSION_DENIED) \n $message = self::PERMISSION_DENIED . '<br>';\n elseif($exception::ERROR == self::NOT_FOUND)\n $message = self::NOT_FOUND . '<br>';\n if (strpos($exception->getMessage(), \"FatalError\")) {\n $message .= '<br>Fatal Error: ';\n } elseif ($exception instanceof \\Error) {\n $message .= '<br>Uncaught Error: ';\n } elseif ($exception instanceof ErrorException) {\n $message .= '<br>Uncaught ';\n } elseif ($exception instanceof BaseForbiddenException) {\n $message .= 'Permission Error: ';\n }elseif($exception instanceof PageNotFoundException){\n $message .= 'Not Found Error: ';\n } else{\n $message .= '<br>Uncaught Exception: ';\n }\n\n try {\n $this->log($message, ['exception' => $exception]);\n } catch (\\Throwable $handlerException) {\n echo $handlerException->getMessage();\n }\n }\n\n if ($exception instanceof OutOfMemoryError) {\n $this->log($exception->getMessage(), ['exception' => $exception, 'type' => 'OutOfMemoryError']);\n }\n $loggedErrors = $this->loggedErrors;\n $this->loggedErrors = $exception === $handlerException ? 0 : $this->loggedErrors;\n }",
"public function handleExceptions($e)\n {\n if (!$e instanceof Exception) {\n $e = new FatalThrowableError($e);\n }\n }",
"function handle_db_error($exception) {\n echo '<p><strong>' . htmlspecialchars('Exception : ' . $exception->getMessage()) . '</strong></p>';\n}",
"function handle_db_error($exception) {\n echo '<p><strong>' . htmlspecialchars('Exception : ' . $exception->getMessage()) . '</strong></p>';\n}",
"public function handle() {\n throw new Exception(\"This is a test exception.\");\n }",
"public function _handleException($e)\n\t{\n\t\tif(!$this->_inError && $handler = $this->_application->errorHandler())\n\t\t{\n\t\t\t$this->_inError = true;\n\t\t\t$handler->handle($e);\n\t\t\t$this->_inError = false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(php_sapi_name() == 'cli')\n\t\t\t{\n\t\t\t\techo $e->__toString();\n\t\t\t\texit(1);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\theader('HTTP/1.1 500 Internal Server Error');\n\n\t\t\t\techo \"<h1>Error: \".$e->getMessage().'</h1>';\n\t\t\t\techo '<pre>'.$e->__toString().'</pre>';\n\t\t\t\texit(1);\n\t\t\t}\n\t\t}\n\t}",
"function uncaughtExceptionHandler($exception)\n{\n\techo \"<b>Catch uncaught error.</b><br />\";\n\techo $uncaughtError = new ErrorHandler($exception->getMessage(), $exception->getCode());\n}",
"function myExceptionHandler($exception) {\n\techo \"Triton: Uncaught exeption; <p>\" . $exception->getMessage() . \"<p><pre>\" . $exception->getTraceAsString(), \"</pre>\"; // punkt här emellan???\n}",
"function handleException(Exception $ex)\n{\n\techo \"There was an error: {$ex}\";\n}",
"function exception_error_handler($errno, $errstr, $errfile, $errline ) {\n // Don't catch suppressed errors with '@' sign\n // @link http://stackoverflow.com/questions/7380782/error-supression-operator-and-set-error-handler\n $error_reporting = ini_get('error_reporting');\n if (!($error_reporting & $errno)) {\n return;\n }\n throw new ErrorException($errstr, $errno, 0, $errfile, $errline);\n}",
"public function exception_handler( $error_message, $error_type, $exception ) {\n\n\t\t// Let's do different things, based on the type of the error\n\n\t\tif ( $exception instanceof ActiveRecordValidationException ) {\n\t\t\t// Grab our validation errors from our exception\n\t\t\t$error_data = $exception->get_errors( true );\n\n\t\t\t$verbose_exception = new InvalidApiParameters( $exception->getMessage(), null, $exception );\n\t\t\t$verbose_exception->set_more_info( $error_data );\n\n\t\t\t// Handle the rest with our parent. :)\n\t\t\tparent::exception_handler(\n\t\t\t\t$verbose_exception->getMessage(),\n\t\t\t\tget_class( $verbose_exception ),\n\t\t\t\t$verbose_exception\n\t\t\t);\n\t\t}\n\t\telseif ( $exception instanceof RedisConnectionException ) {\n\t\t\t// Let's handle the exception gracefully\n\t\t\t$this->app->abort( 502, 'REDIS_EXCEPTION', $exception->getMessage() );\n\t\t}\n\t\telseif ( $exception instanceof HTTPBasicUnauthorized ) {\n\t\t\t// Grab our \"realm\"\n\t\t\t$realm = $this->config[ 'app-meta' ][ 'app_url' ];\n\n\t\t\t// Tell the device/consumer that they must pass auth data\n\t\t\t$this->response->header( 'WWW-Authenticate', 'Basic realm=\"' . $realm . '\"' );\n\n\t\t\t// Handle the rest with our parent. :)\n\t\t\tparent::exception_handler( $error_message, $error_type, $exception );\n\t\t}\n\t\t// Any other exceptions\n\t\telse {\n\t\t\tparent::exception_handler( $error_message, $error_type, $exception );\n\t\t}\n\t}",
"public static function handler(Exception $e)\n {\n try {\n\n if (Request::$current !== NULL\n && Request::current()->is_ajax() === TRUE\n && Kohana::$environment !== Kohana::PRODUCTION) {\n header('Content-Type: text/plain; charset='.Kohana::$charset, TRUE, 500);\n self::_print($e);\n }\n\n if (Kohana::$environment === Kohana::PRODUCTION && ! self::$custom_view_file)\n Kohana_Kohana_Exception::$error_view = self::get_view_file($e);\n elseif (self::$custom_view_file)\n Kohana_Kohana_Exception::$error_view = self::$custom_view_file;\n\n parent::handler($e);\n\n } catch(Exception $e) {\n /**\n * Things are going *really* badly for us, We now have no choice\n * but to bail. Hard.\n */\n // Clean the output buffer if one exists\n ob_get_level() AND ob_clean();\n\n // Set the Status code to 500, and Content-Type to text/plain.\n header('Content-Type: text/plain; charset='.Kohana::$charset, TRUE, 500);\n\n echo Kohana_Exception::text($e);\n\n exit(1);\n }\n }",
"public function caught( $ex ) {\n//\t\tob_end_clean();\n\n\t\t$class = get_class($ex);\n\t\tswitch ( $class ) {\n\t\t\tcase 'row\\database\\ModelException':\n\t\t\tcase 'row\\database\\NotEnoughFoundException':\n\t\t\tcase 'row\\database\\TooManyFoundException':\n\t\t\t\texit('[Database Model error] '.$ex->getMessage().'');\n\t\t\tcase 'row\\http\\NotFoundException':\n\t\t\tcase 'row\\OutputException':\n\t\t\tcase 'row\\core\\VendorException':\n//\t\t\t\tob_end_clean();\n//\t\t\t\treturn $this->_internal('errors/notfound', array('exception' => $ex));\n\t\t\t\texit('[404] ['.$class.'] Not Found: '.$ex->getMessage());\n\t\t\tcase 'row\\core\\MethodException':\n\t\t\tcase 'ErrorException':\n\t\t\t\texit('Parse/runtime error: '.$ex->getMessage().'');\n\t\t\tcase 'row\\database\\DatabaseException':\n\t\t\t\texit('[Database/Query error] '.$ex->getMessage().'');\n\t\t}\n\n\t\texit('Unknown ['.get_class($ex).'] encountered: '.$ex->getMessage().'');\n\t}"
] |
[
"0.71104234",
"0.7043534",
"0.6936438",
"0.67799383",
"0.67501074",
"0.6673991",
"0.6663076",
"0.6656456",
"0.6640893",
"0.6627453",
"0.6620752",
"0.6616705",
"0.66163725",
"0.64932686",
"0.6492276",
"0.645573",
"0.6437243",
"0.64237666",
"0.64124805",
"0.6381492",
"0.6381492",
"0.6379373",
"0.6375098",
"0.63617975",
"0.63495123",
"0.6345047",
"0.6316149",
"0.63030636",
"0.627861",
"0.6263658"
] |
0.7256071
|
0
|
if ( isset($attachment['eaExpand']) )
|
function my_image_attachment_fields_save($post, $attachment) {
update_post_meta($post['ID'], '_eaNoExpand', $attachment['eaExpand']);
return $post;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"function IMGattachment_fields($form_fields, $post) {\n\t$exp = get_post_meta($post->ID, '_eaNoExpand', true);\n\t$checked = ($exp) ? 'checked' : '';\n\t$form_fields['eaExpand'] = array(\n\t\t'label' => 'Dont Expand',\n\t\t'input' => 'html',\n\t\t'html' => \"<input type='checkbox' {$checked} name='attachments[{$post->ID}][eaExpand]' id='attachments[{$post->ID}][eaExpand]' />\",\n\t\t'value' => $exp,\n\t\t'helps' => 'Prevent this image from expanding in content.'\n\t\t);\n return $form_fields;\n}",
"function wpaiia_import_attachments( $post_id, $data, $import_options, $article ) {\n return;\n}",
"public function hasAttachments() {\n return $this->_has(14);\n }",
"function wp_maybe_generate_attachment_metadata($attachment)\n {\n }",
"function wp_edit_attachments_query($q = \\false)\n {\n }",
"public function attachmentExists()\n {\n foreach ($this->attachment as $attachment) {\n if ($attachment[6] == 'attachment') {\n return true;\n }\n }\n return false;\n }",
"function wp_attachment_is($type, $post = \\null)\n {\n }",
"function wpaiia_import_attachments_func( $post_id, $data, $import_options ) {\n return;\n}",
"public function is_attachment($attachment = '')\n {\n }",
"function wp_edit_attachments_query_vars($q = \\false)\n {\n }",
"public function attachmentExists()\n {\n }",
"public function hasAttachments() {\n return $this->_has(20);\n }",
"public function InlineImageExists() {\n\t foreach($this->attachment as $attachment) {\n\t if ($attachment[6] == 'inline') {\n\t return true;\n\t }\n\t }\n\t return false;\n\t}",
"function acf_get_attachment($attachment)\n{\n}",
"public function hasAttachments() {\n return $this->_has(10);\n }",
"public function isAttachment(): bool\n\t{\n\t\treturn $this->isOfType( static::TYPE_ATTACHMENT );\n\t}",
"function allow_fetch_attachments() {\n\t\treturn apply_filters( 'import_allow_fetch_attachments', true );\n\t}",
"public function isExpanded() {}",
"public function isAttachment() : bool\n {\n return $this->getDisposition() == 'attachment';\n }",
"public function inlineImageExists()\n {\n foreach ($this->attachment as $attachment) {\n if ($attachment[6] == 'inline') {\n return true;\n }\n }\n return false;\n }",
"public function hasAttachments()\n {\n return !empty($this->_attachments);\n }",
"public function testInboundDocumentAttachmentContent()\n {\n }",
"public function getExpand(): ?array\n {\n return $this->expand;\n }",
"public function getExpand(): ?array\n {\n return $this->expand;\n }",
"public function getExpand(): ?array\n {\n return $this->expand;\n }",
"public function getExpand(): ?array\n {\n return $this->expand;\n }",
"function the_attachment_link($post = 0, $fullsize = \\false, $deprecated = \\false, $permalink = \\false)\n {\n }",
"function forceExpanded($a_obj_id)\n\t{\n\t\tif (in_array($a_obj_id, $this->force_open_path))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"function wp_embed_excerpt_attachment($content)\n {\n }",
"public function testCreateAttachment()\n {\n }"
] |
[
"0.63708544",
"0.5905122",
"0.5837185",
"0.5824299",
"0.5785738",
"0.5726515",
"0.56526893",
"0.5637592",
"0.5628151",
"0.5520793",
"0.54925495",
"0.5480522",
"0.54696095",
"0.5467705",
"0.5467329",
"0.545504",
"0.5412977",
"0.54087126",
"0.5358605",
"0.534991",
"0.5340022",
"0.5339205",
"0.53289366",
"0.53289366",
"0.53289366",
"0.53289366",
"0.53215736",
"0.5297127",
"0.5295144",
"0.5282499"
] |
0.6614893
|
0
|
Agrega un tag a la DB usando insert ignore
|
public static function add_tag_ignore($name) {
global $wpdb;
$wpdb->query("INSERT IGNORE XTB_TAGS (name) VALUES('{$name}')");
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function insert(Tag $tag);",
"public function inserirTag(Tag $tag){\n $this->tag[] = $tag;\n }",
"public function add_or_ignore()\n {\n $this->insert_ignore('table', array('foo' => 'bar'));\n\n // you can also do\n $this->ignore();\n $this->insert('table', array('foo' => 'bar'));\n }",
"function addATag() {\n $query = \"INSERT INTO PushpinTags SET tags = '$this->tag', pushpin_ID = LAST_INSERT_ID();\";\n\n // prepare query\n $stmt = $this->conn->prepare($query);\n\n // execute query\n if($stmt->execute()){\n return true;\n }\n return false;\n }",
"public function testInsertInvalidTag() {\n\t\t// create a Tag with a non null tag id and watch it fail\n\t\t$tag = new Tag(DevConnectTest::INVALID_KEY, $this->VALID_TAGCONTENT);\n\t\t$tag->insert($this->getPDO());\n\t}",
"public function insert($connectionTag){\r\n\t\t$sql = 'INSERT INTO connection_tags (tie_id, tag) VALUES (?, ?)';\r\n\t\t$sqlQuery = new SqlQuery2($sql);\r\n\t\t\r\n\t\t$sqlQuery->setNumber($connectionTag->tieId);\r\n\t\t$sqlQuery->set($connectionTag->tag);\r\n\r\n\t\t$id = $this->executeInsert($sqlQuery);\t\r\n\t\t$connectionTag->id = $id;\r\n\t\treturn $id;\r\n\t}",
"public function testInsertInvalidTag() {\n\t\t// Create a tag with a non null tag id and watch it fail\n\t\t$tag = new Tag(BrewCrewTest::INVALID_KEY, $this->VALID_TAG_LABEL);\n\t\t$tag->insert($this->getPDO());\n\t}",
"public function salvaTags(){\r\n require_once \"classes/conexao.class.php\";\r\n $conexao = new Conexao();\r\n $tags = $this->tags;\r\n\r\n for($i = 0; $i < count($tags); $i++){\r\n $query = \"INSERT INTO tags VALUES(\".$this->codigo.\", '\".$tags[$i].\"');\";\r\n $conexao->executaComando($query) or die(\"É, parece que deu erro na inserção da tag \".$tags[$i].\" na pergunta \".$this->numPergunta.\"...<br><br>\".$query);\r\n }\r\n \r\n }",
"public function testInsertValidTag() {\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_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$pdoTag = Tag::getTagByTagId($this->getPDO(), $tag->getTagId());\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"tag\"));\n\t\t$this->assertEquals($pdoTag->getTagName($this->VALID_TAGCONTENT), $this->VALID_TAGCONTENT);\n\t}",
"private function _addTags()\n {\n $metadata = $this->getRecordMetadata();\n $this->_record->addTags($metadata[self::TAGS]);\n }",
"public function testInsertValidTag() {\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 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->assertEquals($pdoTag->getTagLabel(), $this->VALID_TAG_LABEL);\n\t}",
"public function insertTagsFromModx()\n {\n\n $tags = DB::table('modx_tours_tags')->where('title', '<>', 'data_viezda')->where('title', '<>', 'travel_type')->get();\n foreach ($tags as $tag) {\n\n $existFixValue = ToursTagsValues::where('value', $tag->value)->first();\n $tagAttribute = ToursTags::where('title', $tag->title)->first();\n\n // Check or insert new tag value\n\n if ($existFixValue) {\n $valueId = $existFixValue->id;\n } else {\n $newTaggFixValue = new ToursTagsValues;\n\n $newTaggFixValue->tag_id = $tagAttribute->id;\n $newTaggFixValue->value = $tag->value;\n $newTaggFixValue->alias = $tag->alias;\n $newTaggFixValue->date = $tag->date;\n\n $newTaggFixValue->save();\n\n $valueId = $newTaggFixValue->id;\n }\n\n // Insert relation tag to tour\n\n /* check exist */\n $exist = ToursTagsRelation::join('tours_tags', 'tours_tags.id', '=', 'tour_tags_relations.tag_id')\n ->join('tours_tags_values', 'tours_tags_values.id', 'tour_tags_relations.value')\n ->where('tour_tags_relations.tour_id', $tag->tour_id)\n ->where('tours_tags.title', $tag->title)\n ->where('tours_tags_values.value', $tag->value)\n ->exists();\n\n /* create relation */\n if (!$exist) {\n $tagRelation = new ToursTagsRelation();\n\n $tagRelation->tour_id = $tag->tour_id;\n $tagRelation->tag_id = $tagAttribute->id;\n\n /* value id if fix value */\n $tagRelation->value = $valueId;\n\n $tagRelation->save();\n }\n\n }\n }",
"function addIndusTag($indus_tag_details){\n\t if ($this->db->insert('vc_indus_tag',$indus_tag_details))\n\t\t\t{ \n\t\t\treturn TRUE;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\treturn FALSE;\n\t\t\t}\n }",
"static function addTag($tags){\n\t\t//fetch corresponding tagids\n\t\t$length = count($tags);\n\t\t$db = (new Database)->connectToDatabase();\n\t\tfor($i=0;$i<$length;$i++){\n\t\t\t$db->query(\"SELECT * FROM tag_table WHERE tag_name='$tags[i]'\");\n\t\t\tif($db->returned_rows==0){\n\t\t\t\t//no tag found in tag table... so add it\n\t\t\t\t$db->query(\"INSERT INTO tag_table (tag_name) VALUES ('$tag[i]')\");\n\t\t\t}\n\t\t\telse{\n\t\t\t\t//check if tag already there with post?\n\t\t\t\t\n\t\t\t}\n\t\t}\n\n\t\t\n\t}",
"private function _insertTags($objectId,$tags){\n\t\t$tagObj = Doctrine_Core::getTable('Tag');\n\t\t\n\t\tforeach($tags as $tag){\n\t\t\t$result = $tagObj->findOneByNume($tag);\n\t\t\tif ($result->id) {\n\t\t\t\t$this->_insertTagObiect($objectId,$result->id);\n\t\t\t}else {\n\t\t\t\t$newTagObj = new Tag;\n\t\t\t\t$newTagObj->nume = $tag;\n\t\t\t\t$newTagObj->save();\n\t\t\t\t\n\t\t\t\t$this->_insertTagObiect($objectId,$newTagObj->id);\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"public static function add_tag($name) {\n global $wpdb;\n $data = array(\n 'name' => $name\n );\n\n // Si no se inserta nada, retornamos false\n if (!$wpdb->insert('XTB_TAGS', $data, array('%s'))) {\n return null;\n }\n\n return $wpdb->insert_id;\n //return true;\n }",
"public function insertIgnore($data)\n {\n if (isset($this->columns[\"created\"])) {\n $data[\"created\"] = date(\"Y-m-d H:i:s\");\n }\n return $this->schema->insert($this->name, $data, true);\n }",
"private function preloadTags(){\n if(Tag::all()->count()==0){\n //if no tag in db, load into db from infusionsoft\n\n $infusionsoftHelper = new InfusionsoftHelper();\n $allTags = $infusionsoftHelper->getAllTags()->all();\n $tagsArray = [];\n\n foreach ($allTags as $tag)\n $tagsArray[] = [\n 'tag_id'=>$tag->id,\n 'name'=>$tag->name,\n 'slug'=>str_slug($tag->name) //give each tag a slug for easily finding it later\n ];\n\n Tag::insert($tagsArray);\n }\n }",
"public static function ADMIN_ARCHIVE_CREATE_USER_TAG(){\n\t $SQL_String = \"INSERT INTO user_tags VALUES (NULL,:owner,:tag_term,NULL);\";\n\t return $SQL_String;\n\t}",
"public function afterSave($insert, $changedAttributes)\n{\n //Deleteing all relations with article before saving\n TagArticles::deleteAll(['article_id' => $this->id]);\n\n //if tags is array and not empty\n if (is_array($this->tags) && !empty($this->tags)) {\n //create array wits new relations\n $values = [];\n foreach ($this->tags as $id) {\n $values[] = [$this->id, $id];\n }\n\n //save relations in DB\n self::getDb()->createCommand()\n ->batchInsert(TagArticles::tableName(), ['article_id', 'tag_id'], $values)->execute();\n }else {\n echo \"Not good!!!\";\n die();\n }\n\n parent::afterSave($insert, $changedAttributes);\n}",
"public function processTag()\n {\n $tags = '';\n\n $articles = $this->dao->select('id, keywords')->from(TABLE_ARTICLE)->fetchPairs('id', 'keywords'); \n foreach($articles as $id => $keywords)\n {\n $keywords = seo::unify($keywords, ',');\n $this->dao->update(TABLE_ARTICLE)->set('keywords')->eq($keywords)->where('id')->eq($id)->exec();\n $tags = $keywords;\n }\n\n $products = $this->dao->select('id, keywords')->from(TABLE_PRODUCT)->fetchPairs('id', 'keywords'); \n foreach($products as $id => $keywords)\n {\n $keywords = seo::unify($keywords, ',');\n $this->dao->update(TABLE_PRODUCT)->set('keywords')->eq($keywords)->where('id')->eq($id)->exec();\n $tags .= ',' . $keywords;\n }\n\n $categories = $this->dao->select('id, keywords')->from(TABLE_CATEGORY)->fetchPairs('id', 'keywords'); \n foreach($categories as $id => $keywords)\n {\n $keywords = seo::unify($keywords, ',');\n $this->dao->update(TABLE_CATEGORY)->set('keywords')->eq($keywords)->where('id')->eq($id)->exec();\n $tags .= ',' . $keywords;\n }\n\n $this->loadModel('tag')->save($tags);\n }",
"public function addNewTag($tagName) {\n $sql = \"INSERT INTO t_tags VALUES(?)\";\n $select = $this->con->prepare($sql);\n $select->bind_param(\"s\", $tagName);\n $select->execute();\n $select->close();\n }",
"function forceInsert() {\n\t\t\n\t\t\t$this->_isUpdate = false;\n\t\t\t\n\t\t}",
"protected function _insert()\n {\n \n }",
"protected function _insert()\n {\n \n }",
"private function insertTags($taglist) {\n $query = \"INSERT INTO tag (tag) VALUES #values#\";\n $this->db->listInsert($query, $taglist);\n\n //ugly, but thing based on last insert id wouldn't work\n //see: http://stackoverflow.com/questions/3677557/is-bulk-insert-atomic\n $new_tags = $this->tagIdsByTaglist($taglist); \n\n return $new_tags;\n }",
"function insertTagToTalent($tagid) {\n\t\t$mysqli = $this->getConnection();\n\t\t$tagid = $mysqli->real_escape_string ( $tagid );\n\t\t$query = \"insert into talent_has_tag(talent_talentid,tag_tagid) values((SELECT talentid FROM talent ORDER BY talentid DESC limit 1),$tagid)\";\n\t\treturn $mysqli->query ( $query );\n\t}",
"function associate_tag($tag_id, $tip_id) {\n $sql = '\n INSERT INTO\n tips_tags (tip_id, tag_id)\n VALUES\n (?, ?)';\n \n return $this->prep_and_exec($sql, [$tip_id, $tag_id]);\n }",
"function insertTagtoList($dbh,$idList,$tagName){\n $stmt = $dbh->prepare('SELECT Tag.idTag FROM Tag WHERE Tag.name = ?');\n $stmt->execute(array($tagName));\n $result = $stmt->fetch();\n $exists = $result !== false ? 1 : 0;\n\n if($exists){\n $idTag = $result['idTag'];\n }\n else {\n //Insert Tag\n $stmt = $dbh->prepare('INSERT INTO Tag VALUES(?,?)');\n $stmt->execute(array(NULL,$tagName));\n\n //Get idTag of new Tag\n $stmt = $dbh->prepare('SELECT Tag.idTag FROM Tag ORDER BY Tag.idTag DESC LIMIT 1');\n $stmt->execute(array());\n $idTag = $stmt->fetch()['idTag'];\n }\n\n //Insert Category\n $stmt = $dbh->prepare('INSERT INTO Category VALUES(?,?)');\n $stmt->execute(array($idList,$idTag));\n\n echo $idTag;\n }",
"protected function afterInsertAccepting()\n {\n }"
] |
[
"0.6886771",
"0.6564124",
"0.63169855",
"0.6247025",
"0.62027156",
"0.61394936",
"0.60897076",
"0.6042707",
"0.58457583",
"0.5832108",
"0.5810974",
"0.5803786",
"0.5790336",
"0.5788018",
"0.5781263",
"0.5735058",
"0.5726597",
"0.5724952",
"0.5721051",
"0.57203776",
"0.5720076",
"0.5689907",
"0.5679919",
"0.56699604",
"0.56699604",
"0.5648971",
"0.5640371",
"0.5605607",
"0.5596034",
"0.55919456"
] |
0.6732244
|
1
|
Get user middle name.
|
public function getMiddleName()
{
return $this->getProfile() ? $this->getProfile()->getMiddleName() : null;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function getMiddleName() {}",
"public function getMiddleName()\n {\n return $this->middle_name;\n }",
"public function getMiddleName()\n {\n return $this->middleName;\n }",
"public function getMiddleName()\n {\n return $this->middleName;\n }",
"public function getMiddleName()\n {\n return $this->middleName;\n }",
"function getStudentMiddleName() {\n\t\treturn $this->getData('studentMiddleName');\n\t}",
"public function getMiddleName()\n {\n //Parse the name and set it\n $namePieces = preg_split(\"/\\s/\", $this->name);\n if (count($namePieces) == 3) {\n return $namePieces[1];\n }\n return null;\n }",
"function getSupervisorMiddleName() {\n\t\treturn $this->getData('supervisorMiddleName');\n\t}",
"public function getUserOrProperName()\n {\n $person = $this->getPerson();\n if (strtolower($person->getEmail()) != strtolower($this->username)) {\n return $this->username;\n } else {\n $init = substr($person->getFirstname(), 0, 1);\n return \"{$init}. {$person->getLastname()}\";\n }\n }",
"public function getFullName()\n {\n if (! $this->_getVar('user_name')) {\n $name = ltrim($this->_getVar('user_first_name') . ' ') .\n ltrim($this->_getVar('user_surname_prefix') . ' ') .\n $this->_getVar('user_last_name');\n\n if (! $name) {\n // Use obfuscated login name\n $name = $this->getLoginName();\n $name = substr($name, 0, 3) . str_repeat('*', max(5, strlen($name) - 2));\n }\n\n $this->_setVar('user_name', $name);\n\n // \\MUtil_Echo::track($name);\n }\n\n return $this->_getVar('user_name');\n }",
"public function usualname()\n\t{\n\t\treturn coalesce(User::info('UsualName'), User::info('Username'));\n\t}",
"public function getUserLastName () {\n\t\treturn ($this->userLastName);\n\t}",
"public function getName()\n {\n $result = null;\n if (isset($this->userInfo['first_name']) && isset($this->userInfo['last_name'])) {\n $result = $this->userInfo['first_name'] . ' ' . $this->userInfo['last_name'];\n } elseif (isset($this->userInfo['first_name']) && !isset($this->userInfo['last_name'])) {\n $result = $this->userInfo['first_name'];\n } elseif (!isset($this->userInfo['first_name']) && isset($this->userInfo['last_name'])) {\n $result = $this->userInfo['last_name'];\n }\n return $result;\n }",
"public function getUserProfileLastName(): string {\n\t\treturn ($this->userProfileLastName);\n\t}",
"public function getUserLastName() :string {\n\t\treturn($this->userFirstName);\n\t}",
"public function getuserLastName()\n {\n return $this->userLastName;\n }",
"function get_user_full_name() {\n echo $_SESSION['SESS_USER_FIRST'] . ' ' . $_SESSION['SESS_USER_LAST'];\n }",
"public function getUsername() : string\n {\n return explode(':', $this->uri->getUserInfo() ?: '')[0];\n }",
"public function lastName()\n {\n $name = explode(' ', $this->name);\n\n if ( count($name) > 1 ) {\n return $name[1];\n }\n\n return '';\n }",
"public function getMiddleNames ();",
"public function getHonoreeLastName();",
"public function getLastname(): string;",
"public function getDisplayName() {\r\n $displayName = $this->fname.' '.$this->lname;\r\n if(strlen($displayName) <= 1) {\r\n $displayName = explode('@',$this->email);\r\n return($displayName[0]);\r\n }\r\n return($displayName);\r\n }",
"public function singular_name()\n {\n $name = explode('\\\\', parent::singular_name());\n return trim(str_replace('User', '', end($name)));\n }",
"public function getUserDisplayName();",
"public function getLastName()\n {\n $name = explode(' ', $this->getName());\n return $name[1];\n }",
"public function getCurrentUserName()\n {\n $currentUserName = '';\n try {\n $loggedInUser = $this->getLoggedInUser();\n if ($loggedInUser) {\n $currentUserName = $loggedInUser['name'];\n }\n } catch (FamilyGraphException $ex) {\n // ignore error\n }\n \n return $currentUserName;\n }",
"Public Function getUserName()\n\t{\n\t\treturn $this->firstName . ' ' . $this->lastName;\n\t}",
"public static function getNickname() {\n if ( !isset($_SESSION['user']['nickname']) \n || empty($_SESSION['user']['nickname']) ) {\n return \"Anonym\";\n }\n return $_SESSION['user']['nickname'];\n }",
"function user_name () {\r\n\t$info = user_info();\r\n\treturn (isset($info[1]) ? $info[1] : 'default');\r\n}"
] |
[
"0.8304451",
"0.80946153",
"0.8001596",
"0.8001596",
"0.8001596",
"0.7987801",
"0.7664211",
"0.7582425",
"0.7381173",
"0.73359793",
"0.72226727",
"0.7154288",
"0.713873",
"0.71176076",
"0.7013443",
"0.69714534",
"0.6950593",
"0.69460934",
"0.69090223",
"0.68893254",
"0.68841004",
"0.684584",
"0.6802324",
"0.6800951",
"0.6772562",
"0.67680824",
"0.67603153",
"0.6757912",
"0.6750973",
"0.67504466"
] |
0.8279712
|
1
|
Get spouse first name.
|
public function getSpouseFirstName()
{
$spouse = $this->getSpouse();
return $spouse ? $spouse->getFirstName() : null;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function getSpotifyFirstName()\n {\n return $this->spotifyFirstName;\n }",
"public function getFirstName()\n {\n //Parse the name and set it\n $namePieces = preg_split(\"/\\s/\", $this->name);\n return $namePieces[0];\n }",
"public function getFirstName()\n {\n $name = explode(' ', $this->getName());\n return $name[0];\n }",
"public function firstName()\n {\n $name = explode(' ', $this->name);\n\n return $name[0];\n }",
"public function getFirstName()\n {\n return $this->getValue('nb_icontact_prospect_first_name');\n }",
"public function getFirstName()\n {\n if(isset($this->facebookData['first_name'])) {\n return $this->facebookData['first_name'];\n } else {\n return $this->getName();\n }\n }",
"public function getFirstName()\n {\n return $this->getProfile() ? $this->getProfile()->getFirstName() : null;\n }",
"public function getFirstname(): string\n {\n return $this->_firstname;\n }",
"function getFirstName() {\n\t$COMMON = new Common($debug);\n\t$uID = $_SESSION[\"userID\"];\n\n\t$sql = \"select * from Proj2Advisors where `id` = '$uID'\";\n\t$rs = $COMMON->executeQuery($sql, $_SERVER[\"SCRIPT_NAME\"]);\n\t$row = mysql_fetch_row($rs);\n\n\t$name = $row[1];\n\treturn $name;\n}",
"public function getFirstName()\n {\n return $this->first_name ?? $this->nickname ?? $this->name;\n }",
"public function getFirstName()\n {\n return parent::getFirstName();\n }",
"public function getFirstname()\n\t\t{\n\t\t\treturn $this->firstname;\n\t\t}",
"public function getFirst_name()\r\n {\r\n return $this->first_name;\r\n }",
"public function getFirstname()\n {\n return $this->firstname;\n }",
"public function getFirstName() {\n\t\treturn $this->first_name;\n\t}",
"public function getFirstname() {\n\t\treturn $this->firstname;\n\t}",
"public function getFirstname()\n\t{\n\t\treturn $this->firstname;\n\t}",
"public function getFirstName()\n\t{\n\t\treturn $this->first_name;\n\t}",
"public function getFirstname()\n {\n return $this->firstName;\n }",
"public function getFirstname()\n {\n return $this->firstname;\n }",
"public function getFirstname()\n {\n return $this->firstname;\n }",
"public function getFirstname()\n {\n return $this->firstname;\n }",
"public function getFirstname()\n {\n return $this->firstname;\n }",
"public function getFirstname()\n {\n return $this->firstname;\n }",
"public function getFirstname()\n {\n return $this->firstname;\n }",
"public function getFirstname()\n {\n return $this->firstname;\n }",
"public function getFirstname()\n {\n return $this->firstname;\n }",
"public function getFirstname()\n {\n return $this->firstname;\n }",
"public function getFirstname()\n {\n return $this->firstname;\n }",
"public function getFirstname() {\n return $this->getValue('firstname');\n }"
] |
[
"0.81878847",
"0.78775465",
"0.7851428",
"0.78252125",
"0.7808139",
"0.7795866",
"0.77696776",
"0.77399945",
"0.7734488",
"0.7684469",
"0.76747996",
"0.7651957",
"0.76512736",
"0.7647756",
"0.763583",
"0.7627936",
"0.76226646",
"0.7621577",
"0.76111007",
"0.7608184",
"0.7600625",
"0.7600625",
"0.7600625",
"0.7600625",
"0.7600625",
"0.7600625",
"0.7600625",
"0.7600625",
"0.7600625",
"0.7599913"
] |
0.83172154
|
0
|
Get spouse last name.
|
public function getSpouseLastName()
{
$spouse = $this->getSpouse();
return $spouse ? $spouse->getLastName() : null;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function getSpotifyLastName()\n {\n return $this->spotifyLastName;\n }",
"public function getLastName()\n {\n return $this->getProfile() ? $this->getProfile()->getLastName() : null;\n }",
"public function getLastName() {\n\t\treturn $this->last_name;\n\t}",
"public function getLastName()\n {\n return $this->getValue('nb_icontact_prospect_last_name');\n }",
"public function getLastName()\n {\n return $this->last_name;\n }",
"public function getLastName()\n {\n return $this->last_name;\n }",
"public function getLastName()\n {\n return $this->last_name;\n }",
"public function getLastName()\n {\n return $this->last_name;\n }",
"public function getLastName()\n {\n return $this->last_name;\n }",
"public function getLastName() {\n\n return $this->last_name;\n\n }",
"public function getLastName() {\n\t\treturn $this->getCustomField( 'last_name' );\n\t}",
"public function getLastName()\n\t{\n\t\treturn $this->last_name;\n\t}",
"public function lastName()\n {\n $name = explode(' ', $this->name);\n\n if ( count($name) > 1 ) {\n return $name[1];\n }\n\n return '';\n }",
"public function getLastName(){\n \n return $this->last_name;\n \n }",
"public function getLastName()\n {\n $name = explode(' ', $this->getName());\n return $name[1];\n }",
"public function getUserProfileLastName(): string {\n\t\treturn ($this->userProfileLastName);\n\t}",
"public function getLastname(): string\n {\n return $this->_lastname;\n }",
"public function getTitleLastName() {\r\n $titleLastName = $this->getTitleString() .' '. $this->lastName;\r\n return $titleLastName;\r\n }",
"public function getLastname() {\n return $this->getValue('lastname');\n }",
"public function getLastName(): string\n {\n return $this->lastName;\n }",
"public function getLastName(): string\n {\n return $this->lastName;\n }",
"protected function getLastname()\n {\n $formatter = new \\Dotpay\\Tool\\StringFormatter\\Name();\n return $formatter->format($this->checkoutSession->getLastRealOrder()->getBillingAddress()->getLastname());\n }",
"public function getLastName() :string {\n\t\treturn (string)$this->last_name;\n\t}",
"public function GetLastName()\n {\n return $this->lastname;\n }",
"public function getLastName()\n {\n return $this->get('LastName');\n }",
"public function getLastName()\n {\n //Parse the name and set it\n $namePieces = preg_split(\"/\\s/\", $this->name);\n if (count($namePieces) == 2) {\n return $namePieces[1];\n } elseif (count($namePieces) == 3) {\n return $namePieces[2];\n }\n return null;\n }",
"public function getLastName()\n {\n $name = $this->getAttribute('name');\n if (isset($name)) {\n return $name['lastName'];\n }\n return null;\n }",
"public function getPayerLastName() {\n\t\treturn $this->_getField(self::$PAYER_LAST_NAME);\n\t}",
"public function getLastName()\n {\n return parent::getLastName();\n }",
"public function getLastName()\n {\n return $this->response['last_name'] ?: null;\n }"
] |
[
"0.81845284",
"0.77651757",
"0.76981604",
"0.7672064",
"0.7626657",
"0.7626657",
"0.7626657",
"0.7626657",
"0.7626657",
"0.76255685",
"0.76246643",
"0.76083213",
"0.76002735",
"0.75989264",
"0.7594937",
"0.7548129",
"0.75194967",
"0.7471085",
"0.7468144",
"0.7464032",
"0.7464032",
"0.7461845",
"0.7436953",
"0.74356705",
"0.7434882",
"0.74329764",
"0.7432611",
"0.7430509",
"0.74225235",
"0.7418763"
] |
0.8068664
|
1
|
Get spouse full name.
|
public function getSpouseFullName()
{
return $this->getSpouseFirstName().' '.$this->getSpouseLastName();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function getSpotifyRealName()\n {\n return $this->spotifyRealName;\n }",
"public function fullName(): String\n {\n return $this->fullNames[$this->suit];\n }",
"public function getFullname() {\n return $this->getName();\n }",
"public function getFullname(): string\n {\n return $this->product->lang->title . ' ' . $this->lang->title;\n }",
"public function getSponsorname() {}",
"function name() {\n if (empty($this->fullname)) {\n if ($this->page[\"Name\"] == \"\") $this->openpage (\"Name\",\"person\");\n if (preg_match(\"/<title>(.*?)<\\/title>/i\",$this->page[\"Name\"],$match)) {\n $this->fullname = trim($match[1]);\n }\n }\n return $this->fullname;\n }",
"public function getSpotifyLastName()\n {\n return $this->spotifyLastName;\n }",
"public function getFullname()\n {\n return $this->fullname;\n }",
"public function getFullname()\n\t{\n\t\treturn $this->fullname();\n\t}",
"public function GetFullName()\n\t\t{\n\t\t\treturn $this->GetAttribute('first_name').' '.$this->GetAttribute('last_name');\n\t\t}",
"public function fullname()\n\t{\n\t\treturn $this->product->name .' - '. $this->name();\n\t}",
"public function getFullname()\n {\n return $this->fullname;\n }",
"public function getFullname() {\n return $this->fullname;\n }",
"public function showfullname()\n {\n return $this->getFirstname() . ' ' . $this->getLastname();\n }",
"function get_user_full_name() {\n echo $_SESSION['SESS_USER_FIRST'] . ' ' . $_SESSION['SESS_USER_LAST'];\n }",
"public function getFriendlyName();",
"public function getSpouseFirstName()\n {\n $spouse = $this->getSpouse();\n\n return $spouse ? $spouse->getFirstName() : null;\n }",
"public function getFullName()\n\t{\n\t\treturn \"{$this->nombre} {$this->ape_p} {$this->ape_m}\";\n\t}",
"public function getSpotifyFirstName()\n {\n return $this->spotifyFirstName;\n }",
"function name()\n\t{\n\t\t$name = $this->CI->session->userdata(AUTH_USER_FRIENDLY_NAME);\n\t\tif ($name)\n\t\t{\n\t\t\treturn $name;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn AUTH_DEFAULT_FRIENDLY_NAME;\t\n\t\t}\n\t}",
"public function getFullName()\n {\n return \"{$this->first_name} {$this->last_name}\";\n }",
"public function getFullName(): string\n {\n return sprintf('%s %s', $this->getGivenName(), $this->getLastname());\n }",
"public function get_fullname(){\n\t\treturn $this->_fullname;\n\t}",
"public function getSpouseLastName()\n {\n $spouse = $this->getSpouse();\n\n return $spouse ? $spouse->getLastName() : null;\n }",
"public function getName()\n {\n $person = $this->getPerson()->one();\n return $person->getFullName();\n }",
"public static function getName(): string\n {\n return SPLASH_NAME;\n }",
"public function getFullname(): string;",
"public function getSconame()\n {\n return $this->sconame;\n }",
"public function getName()\n {\n return trim(\"$this->FirstName $this->Surname\");\n }",
"public function getName(): string\n {\n return Str::studly($this->name);\n }"
] |
[
"0.72316074",
"0.72118914",
"0.71280694",
"0.7088758",
"0.7085023",
"0.7082482",
"0.7074064",
"0.7065179",
"0.7057119",
"0.70306647",
"0.7017789",
"0.7004873",
"0.6973304",
"0.6947955",
"0.69445974",
"0.6914476",
"0.6904952",
"0.68828565",
"0.68754256",
"0.68733346",
"0.6866977",
"0.68564683",
"0.68314373",
"0.6823192",
"0.68214303",
"0.68071914",
"0.680543",
"0.6797946",
"0.6785923",
"0.67763615"
] |
0.75004816
|
0
|
Returns true if client is married and false otherwise.
|
public function isMarried()
{
return $this->getProfile() ? $this->getProfile()->isMarried() : false;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private function isClient() {\n if ($this->getUserRole() == 2) {\n return TRUE;\n }\n return FALSE;\n }",
"function isClient() {\n if (isset($_SESSION['role'])) {\n if ($_SESSION['role'] == \"client\") {\n return true;\n }\n }\n return false;\n}",
"public function getIsClientAttribute()\n {\n return $this->attributes['user_type'] == '2';\n }",
"public function isClient()\n {\n if ($this->type == 1) {\n return true;\n } else {\n return false;\n }\n }",
"public function isBusinessClient()\n\t\t\t{\n\t\t\t\treturn $this->getClientId() && $this->getSigningKey();\n\t\t\t}",
"public function hasStatusClient()\n {\n if ($this->hasRole('ROLE_CLIENT')) {\n return $this->profile->hasStatusClient();\n }\n\n return false;\n }",
"public function getIsClient()\n {\n return $this->is_client;\n }",
"public function isCreditWanted()\n {\n return $this->creditWanted;\n }",
"public function isResponsible()\n {\n return false;\n }",
"public function isIsRented()\n {\n return $this->isRented;\n }",
"public function hasStatusProspect()\n {\n if ($this->hasRole('ROLE_CLIENT')) {\n return $this->profile->hasStatusProspect();\n }\n\n return false;\n }",
"public function canAccept()\n {\n $user = $this->getUser();\n\n if (\n $this->getData('status') == Service\\BalanceWithdrawals::STATUS_PENDING &&\n $user->getData('role') == 'Admin'\n ) {\n return true;\n }\n\n return false;\n }",
"public function CanBids()\n {\n if ($this->isValidSession())\n {\n $m_card = new CreditCard_Model();\n $result = $m_card->getMemberCreditCard($this->getMemberId());\n return $result ? TRUE : FALSE;\n }\n\n return FALSE;\n }",
"public function CheckClient() : bool;",
"public function isCustomer()\n {\n return $this->role ? $this->role->name === Role::NAME_CUSTOMER : false;\n }",
"public function isDonor()\n {\n return $this->getTotalDonated() > 0;\n }",
"public function isCustomer() {\n if (isset($this->rRole)) {\n Loggers::info('Role', $this->rRole->role_name, __CLASS__ . '::' . __FUNCTION__ . '(' . __LINE__ . ')');\n return $this->rRole->isCustomerRole();\n }\n return false;\n }",
"public function isAccepted_as_talk() {\n\t\t$this->getAccepted_as_talk();\n\t}",
"public function is_client()\n\t{\n\t\treturn $this->_client;\n\t}",
"function is_paying_or_trial() {\n\t\t\treturn ( $this->is_paying() || $this->is_trial() );\n\t\t}",
"public function isWoman()\n {\n return !$this->isMan();\n }",
"public static function checkIfMentor($user){\n\t\tif ($user->is_mentor == 1){\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public function isPartner()\n {\n if($this->hasRole('Partner'))\n return true;\n else\n return false;\n }",
"public function isPaid(){\n return $this->status == \"SUCCESS\";\n }",
"public function isRedeemed()\n\t{\n\t\tif (!$this->exists())\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tif ($this->get('redeemed_by'))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public function doesMeetRequirements(): bool\n {\n return true;\n }",
"private function isCoop() : bool\n {\n return $this->user->hasRole('coop');\n }",
"public function isUserWinner() {\n if($this->winnerType == \"player\" && $this->winnerID == CD()->id) {\n return true;\n }\n return false;\n }",
"public function isMember()\n {\n return $this->role == 3;\n }",
"public function isChair(){\n return $this->is_admin;\n }"
] |
[
"0.66500705",
"0.6027777",
"0.6017163",
"0.59612983",
"0.5892965",
"0.58603036",
"0.5746595",
"0.57416075",
"0.57188004",
"0.5633102",
"0.5625145",
"0.5596749",
"0.557899",
"0.55143136",
"0.5508238",
"0.550192",
"0.5493833",
"0.54827446",
"0.545486",
"0.5451062",
"0.54054666",
"0.54024595",
"0.5379506",
"0.5356822",
"0.535406",
"0.53457695",
"0.53416824",
"0.53376466",
"0.53361475",
"0.5334343"
] |
0.76517403
|
0
|
Returns true if the client has approved final portfolio and false otherwise.
|
public function hasApprovedPortfolio()
{
if (!$this->hasRole('ROLE_CLIENT')) {
throw new \Exception('User has not role: ROLE_CLIENT');
}
foreach ($this->getClientPortfolios() as $clientPortfolio) {
if ($clientPortfolio->getIsActive()) {
return $clientPortfolio->isClientAccepted();
}
}
return false;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function isApproved()\n {\n\n return false;\n }",
"public function approved()\n\t{\n\t\treturn $this->response[0] === self::APPROVED;\n\t}",
"function isApproved() {\n return $this->getStatus() == UserpointsTransaction::STATUS_APPROVED;\n }",
"public function isApproved(): bool;",
"public function isApproved()\n {\n if ($this->approved == 'YES') {\n return true;\n }\n \n return false;\n }",
"public function isApproved()\n {\n return $this->approved;\n }",
"function is_portfolio_activated() {\n\t\treturn get_theme_mod( 'fl_portfolio', 1 );\n\t}",
"public function isPublished()\n {\n if(!strcmp($this->getStatus(), 'approved')) {\n return true;\n }\n\n return false;\n }",
"public function isApproved()\n {\n $responseText = $this->transaction->getTransactionResponse()->getMessages()[0]->getDescription();\n return $responseText === 'This transaction has been approved.';\n }",
"private function COIRequiresApproval()\r\n {\r\n global $db;\r\n\r\n // if there is more than one COI form in the db then approvals are required\r\n $sql = \"SELECT * FROM `forms_coi`\r\n WHERE `form_tracking_id` = \" . $this->trackingFormId . \"\r\n and `coi_none` = '0'\";\r\n $result = $db->getAll($sql);\r\n\r\n if (count($result) <= 0) {\r\n return false;\r\n }\r\n\r\n return true;\r\n }",
"public function getApproved() {\n\t\treturn $this->approved == 1;\n\t}",
"function is_approved() {\n\t\treturn $this->get_data( 'comment_approved' );\n\t}",
"public function isAccepted()\n {\n // a Contribution is visible as long it is not explicitly rejected\n // meaning when $this->accepted is not set to false\n return $this->accepted !== false;\n }",
"public function planAccepted()\n {\n if ($this->isPlanned()) {\n if ($this->plan->requestee_accept && $this->plan->acceptee_accept) {\n return true;\n }\n }\n\n return false;\n }",
"public function transaction_approved() {\n\n\t\treturn 1 === $this->transaction_approved && 0 === $this->transaction_error;\n\t}",
"private function hasTechnicianAddedFinalPrice($projectId) \n {\n $requestData = $this->technicianChargeCheck($projectId);\n\n if (empty($requestData)) {\n return false;\n }\n\n return true;\n }",
"function is_allowed_to_install() {\n\t\t\treturn ( $this->is_premium() || ! $this->is_org_repo_compliant() );\n\t\t}",
"public function isTraderApproved()\n {\n return $this->is_approved === Trader::REQUEST_STATUS_YES;\n }",
"public function isPaid()\n {\n return $this->status === self::STATUS_APPROVED;\n }",
"public function inStock()\n {\n return $this->stockCount() > 0;\n }",
"public function isOrsApproved() {\r\n global $db;\r\n\r\n $sql = sprintf('SELECT approvalType.type, approvalType.friendlyName, approvals.*\r\n FROM forms_tracking_approvals as approvals\r\n LEFT JOIN forms_approval_type as approvalType ON approvals.approval_type_id = approvalType.id\r\n WHERE `approvals`.`tracking_id` = %s AND `approval_type_id` IN (%s, %s)'\r\n , $this->trackingFormId, COI, ORS_REVIEW);\r\n $approvals = $db->getAll($sql);\r\n\r\n if(empty($approvals)) {\r\n return true; // no required approvals we assume approved.\r\n } else {\r\n $numApprovals = count($approvals);\r\n $i = 0;\r\n $approved = 1;\r\n // iterate through each approval and bitwise 'and' with the previous result\r\n while($i < $numApprovals) {\r\n $approved = $approvals[$i]['approved'] & $approved;\r\n $i++;\r\n }\r\n }\r\n\r\n return $approved;\r\n }",
"public function canBeAccepted()\n {\n return $this->isReadyForIssuing();\n }",
"public function canCancel() {\n $today = Carbon::parse();\n $canCancelFrom = $this->start_date->addMonthsNoOverflow($this->package->commitment_period)->firstOfMonth();\n\n if($canCancelFrom->greaterThan($today) || !$this->hasExpired()) {\n return false;\n }\n\n return true;\n }",
"public function canAccept()\n {\n $user = $this->getUser();\n\n if (\n $this->getData('status') == Service\\BalanceWithdrawals::STATUS_PENDING &&\n $user->getData('role') == 'Admin'\n ) {\n return true;\n }\n\n return false;\n }",
"public function projectContractAccepted()\n\t{\n\n\t}",
"public function authorize()\n {\n return $this->user()->hasPermission('subscription-service-create-plan');\n }",
"public function isReadyForIssuing()\n {\n return $this->isFeePaid();\n }",
"private function checkIsApproved()\n {\n if (!$this->model->isApproved()) {\n return true;\n }\n\n throw QuizzException::errorQuestionApproved();\n }",
"public function is_own_portfolio();",
"public function isDeanApproved() {\r\n global $db;\r\n\r\n $sql = sprintf('SELECT approvalType.type, approvalType.friendlyName, approvals.*\r\n FROM forms_tracking_approvals as approvals\r\n LEFT JOIN forms_approval_type as approvalType ON approvals.approval_type_id = approvalType.id\r\n WHERE `approvals`.`tracking_id` = %s AND `approval_type_id` IN (%s, %s)'\r\n , $this->trackingFormId, COMMITMENTS, DEAN_REVIEW);\r\n $approvals = $db->getAll($sql);\r\n\r\n if(empty($approvals)) {\r\n return true; // no required approvals we assume approved.\r\n } else {\r\n $numApprovals = count($approvals);\r\n $i = 0;\r\n $approved = 1;\r\n // iterate through each approval and bitwise 'and' with the previous result\r\n while($i < $numApprovals) {\r\n $approved = $approvals[$i]['approved'] & $approved;\r\n $i++;\r\n }\r\n }\r\n\r\n return $approved;\r\n }"
] |
[
"0.69484705",
"0.6947688",
"0.68149126",
"0.6764662",
"0.6647816",
"0.6524307",
"0.65184385",
"0.64994323",
"0.64849347",
"0.6411706",
"0.6400967",
"0.6392893",
"0.6292734",
"0.6274123",
"0.619423",
"0.6177514",
"0.6156848",
"0.6142666",
"0.6078742",
"0.60513526",
"0.604782",
"0.6027141",
"0.60229003",
"0.5989134",
"0.59694415",
"0.5949529",
"0.594633",
"0.5941479",
"0.5940443",
"0.593025"
] |
0.779093
|
0
|
Add Path Adds the given path to the front of the asset paths array
|
public static function add_path($path)
{
array_unshift(self::$_asset_paths, str_replace('../', '', $path));
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function addPath($path);",
"public function addPath($path);",
"public function addPath($path)\n {\n if (!in_array($path, $this->_paths)) {\n $this->_paths[] = rtrim($path, '/\\\\');\n }\n }",
"public function addPath($path)\n {\n if (!in_array($path, $this->paths)) {\n $this->paths[] = $path;\n }\n }",
"function assets_path($path = '')\n {\n return phanda()->assetsPath() . ($path ? DIRECTORY_SEPARATOR . $path : $path);\n }",
"public static function add(&$path) {\n $path = preg_replace('/((?:^|\\\\/)[^\\\\/\\\\.]+?)$/isD', '$1/', $path);\n }",
"public function getPathAssets($append = ''){\n\t\treturn $this->paths['assets'].$append;\n\t}",
"public static function addPath($path) {\n if (!isset(self::$lookup_path)) {\n self::register();\n }\n self::$lookup_path[] = $path;\n }",
"public function assetPath($path = '')\n\t{\n\t\treturn $this['path.asset'].ltrim($path, '/');\n\t}",
"public function addByPath($asset_path){\n #i: Get asset container\n $asset = $this->parseAsset($asset_path);\n\n #i: Add object to collection\n $this->add($asset);\n }",
"public static final function prependPath($path)\n {\n\tif (!is_dir($path)) {\n \t throw new Exception(sprintf('Include path \"%s\" does not exists', $path));\n\t}\n\tarray_unshift(self::$_paths, $path);\n }",
"public static function addMergedPath($path) {\n\t\treturn Loader::addMergedPath($path);\n\t}",
"public function addFile($path)\n {\n $this->files[] = $path;\n }",
"static public final function appendPath($path)\n {\n\tif (!is_dir($path)) {\n \t throw new Exception(sprintf('Include path \"%s\" does not exists', $path));\n\t}\n\tself::$_paths[] = $path;\n }",
"public function addPath(string $path)\n {\n $this->path[] = $path;\n\n return $this;\n }",
"static public function registerPath($path)\r\n {\r\n self::$paths[] = $path;\r\n }",
"public function addPath($path, array $descriptions = null);",
"public function addJsonPath(string $path): void\n {\n $this->jsonPaths[] = $path;\n }",
"public static function addPath( $path )\n\t{\n\t\t$path = rtrim($path, '/');\n\t\t$path = rtrim($path, '\\\\');\n\t\t$path .= DIRECTORY_SEPARATOR;\n\n\t\tif ( @!is_dir($path) ) {\n\t\t\trequire_once 'Mapper/Exception.php';\n\t\t\tthrow new Orm_Mapper_Exception(\"The path '$path' does not exist'\");\n\t\t}\n\n\t\tself::$_paths[$path] = $path;\n\t}",
"public function prependPath(string $path) : EngineInterface;",
"public function addPath($module, $path)\n {\n $this->paths[$module] = $path;\n }",
"private function addAssets()\n {\n foreach (config('asgard.media.assets.media-partial-assets', []) as $assetName => $path) {\n $path = $this->assetFactory->make($path)->url();\n $this->assetManager->addAsset($assetName, $path);\n }\n }",
"public function push($path)\n\t{\n\t\t$parts = AgaviArrayPathDefinition::getPartsFromPath($path);\n\t\t$this->parts = array_merge($this->parts, $parts['parts']);\n\t}",
"public static function addIncludePath($path = '')\n\t{\n\t\tstatic $paths;\n\n\t\tif (!isset($paths))\n\t\t{\n\t\t\t$paths = array();\n\t\t}\n\t\tif (!empty($path) && !in_array($path, $paths))\n\t\t{\n\t\t\ttinclude('core.filesystem.path');\n\t\t\tarray_unshift($paths, TPath::clean($path));\n\t\t}\n\t\treturn $paths;\n\t}",
"public function addAssets() {}",
"public function addAssets() {}",
"function addPath($path, $pre = true) {\n if($path) {\n if($pre)\n set_include_path($path . PATH_SEPARATOR . get_include_path());\n else\n set_include_path(get_include_path() . PATH_SEPARATOR . $path);\n }\n}",
"private function _prependDirectory($path)\n {\n return strtr(\n $this->_element->getName() . '/' . $path, array('//' => '/')\n );\n }",
"protected function addScript($path) {\n PageLayout::addHeadElement('script', array(\n 'src' => $this->assets . $path,\n 'charset' => 'utf-8'), '');\n }",
"static function addPath(string $controllersFolder) {\n\t\t$_paths[] = $controllersFolder;\n\t}"
] |
[
"0.7050414",
"0.7050414",
"0.69921905",
"0.6966708",
"0.66638637",
"0.6597855",
"0.6596417",
"0.6550178",
"0.64161897",
"0.622769",
"0.6126109",
"0.61248946",
"0.6111622",
"0.6078404",
"0.60733825",
"0.60330933",
"0.6017572",
"0.5963909",
"0.595758",
"0.5872142",
"0.58660597",
"0.5845544",
"0.5844991",
"0.5844536",
"0.58253443",
"0.58253443",
"0.5813662",
"0.5811814",
"0.5793728",
"0.5792419"
] |
0.79964334
|
0
|
Remove Path Removes the given path from the asset paths array
|
public static function remove_path($path)
{
if (($key = array_search(str_replace('../', '', $path), self::$_asset_paths)) !== FALSE)
{
unset(self::$_asset_paths[$key]);
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function remove($path);",
"public function removeGlobalPath($path);",
"public function removeEntryPath($path);",
"public function removeByPathRemovesCorrectPathDataProvider() {}",
"public function assetPath($path = '')\n\t{\n\t\treturn $this['path.asset'].ltrim($path, '/');\n\t}",
"public function removeTaxonomyPath($path);",
"public function removeTestFilePath($path) {\n /*\n * Do not add the path if\n * . This is not a test.\n * . The path is not a valid path.\n */\n if (!WPCCrawler::isDoingTest() || !$path) return;\n\n // Find the key of the test file path\n $key = array_search($path, $this->testFilePaths);\n\n // If it exists, remove the path.\n if ($key !== false) {\n unset($this->testFilePaths[$key]);\n }\n }",
"public function removeOld(string $path): void\n {\n }",
"protected function removeVendorPath($pathList, $vendorPath) {\n $list = [];\n\n foreach ($pathList as $path) {\n if (strpos($path, $vendorPath) !== 0) {\n $list[] = rtrim($path, '/');\n }\n }\n return $list;\n }",
"protected function cleanup($path)\n {\n $pattern = \"#_[\\\\d]+\\\\.css|js$#\";\n $globReq = preg_replace($pattern, '*', $path);\n $files = glob($globReq);\n foreach ($files as $file) {\n if ($file != $path && $file != $path . '.gz') {\n unlink($file);\n }\n }\n }",
"protected static function cleanup($path) {\n $pattern = \"#_[\\\\d]+\\\\.css|js$#\";\n $globReq = preg_replace($pattern,'*',$path);\n //Debug::log($globReq,'glob req');\n $files = glob($globReq);\n //Debug::log($files,'old files');\n foreach ($files as $file){\n if ($file != $path && $file != $path.'.gz'){\n unlink($file);\n }\n }\n }",
"function remove($relativePath): bool;",
"public static function removeDotSegments($Path);",
"private function removeFromArray(array &$array, array $path): void\n {\n $previous = null;\n $tmp = &$array;\n\n foreach ($path as $node) {\n $previous = &$tmp;\n $tmp = &$tmp[$node];\n }\n\n if (null !== $previous && true === isset($node)) {\n unset($previous[$node]);\n }\n }",
"function remove_block_asset_path_prefix($asset_handle_or_path)\n {\n }",
"function atkCleanPath($path)\n{\n\treturn atkClassLoader::cleanPath($path);\n}",
"public function removePrefixFromPath()\n {\n $this->fileStructure->path = $this->getPathWithoutPrefix( $this->fileStructure->path, $this->prefix );\n $this->prefix = \"\";\n }",
"private function _clean_paths()\n {\n $path_vars = array('dash_path', 'asset_path', 'css_path', 'js_path', 'dash_fldr', 'dash', 'img_path', 'file_path', 'oop_path');\n\n foreach ($path_vars as $var) {\n $this->$var = trim($this->$var);\n }\n }",
"function cleanPath($path) {\n // files////janko/mika\n\n while (strpos($path, \"//\") !== FALSE) {\n $path = str_replace(\"//\", \"/\", $path);\n }\n\n return $path;\n}",
"public static function unpathize(string $path): string\n {\n return \\str_replace(['[', ']'], '', $path);\n }",
"public static function removePathItem($item);",
"public function deleteImage($path)\n {\n // $file_name = end($file);\n File::delete(public_path($path));\n // File::delete($file_name);\n }",
"protected function filterNew($pathArray) {\n\t\tforeach ($pathArray as $key => $path) {\n\t\t\tif ($path === 'config' || $path === 'themes') {\n\t\t\t\tunset($pathArray[$key]);\n\t\t\t}\n\t\t}\n\t\treturn $pathArray;\n\t}",
"public function remove(string $path) : void\n {\n if (!$this->exists($path)) {\n throw new \\RuntimeException(sprintf('The provided child path %s does not exist on path %s (component %s).', $path, $this->get_path(), $this->get_component() ));\n }\n unset($this->children[$path]);\n }",
"public function removeAssets()\n {\n // Base implementation does only know about log file.\n if ($this->logFile) {\n if (file_exists($this->logFile)) {\n unlink($this->logFile);\n }\n $this->logFile = null;\n $this->file->remove('log');\n }\n }",
"function assets_path($path = '')\n {\n return phanda()->assetsPath() . ($path ? DIRECTORY_SEPARATOR . $path : $path);\n }",
"public function remove($path){\n\t\t$keys = explode('/', $path);\n\t\t$settings = &$this->_settings;\n\t\t$last_key = end($keys);\n\t\tforeach($keys as $key){\n\t\t\tif($last_key == $key){\n\t\t\t\tif(isset($settings[$key])){\n\t\t\t\t\tunset($settings[$key]);\n\t\t\t\t\t//write to begining of setting file\n\t\t\t\t\t//fseek($this->_handle, 0); //seek to begining\n\t\t\t\t\t//fwrite($this->_handle, json_encode($this->_settings, JSON_PRETTY_PRINT));\n\t\t\t\t\tfile_put_contents($this->_file, json_encode($this->_settings, JSON_PRETTY_PRINT));\n\t\t\t\t}\n\t\t\t\treturn $this;\n\t\t\t}\n\t\t\tif(!isset($settings[$key])){\n\t\t\t\treturn $this;\n\t\t\t}\n\t\t\t$settings = &$settings[$key];\n\t\t}\n\t\treturn $this;\n\t}",
"public function getPathAssets($append = ''){\n\t\treturn $this->paths['assets'].$append;\n\t}",
"protected static function removeComponent()\n {\n (new Filesystem)->deleteDirectory(\n resource_path('assets/js/components')\n );\n }",
"function tsapress_clean_assets($content) {\n\t$tsapress_base_dir = tsapress_base_dir();\n $theme_name = next(explode('/themes/', $content));\n \n $current_path = '/'.$tsapress_base_dir.'wp-content/themes/' . $theme_name;\n $new_path = '';\n $content = str_replace($current_path, $new_path, $content);\n \n return $content;\n}"
] |
[
"0.6844549",
"0.6831447",
"0.67780286",
"0.651073",
"0.63145465",
"0.6304634",
"0.624484",
"0.62191397",
"0.6136411",
"0.61298543",
"0.6124286",
"0.6008236",
"0.5955612",
"0.5946737",
"0.5943609",
"0.5940862",
"0.5898419",
"0.58796424",
"0.5877341",
"0.5833016",
"0.58135015",
"0.5813078",
"0.5801468",
"0.57815146",
"0.57594675",
"0.57016426",
"0.5693827",
"0.56865144",
"0.56460273",
"0.5610831"
] |
0.8032288
|
0
|
Img Either adds the image to the group, or returns the image tag.
|
public static function img($images = array(), $attr = array(), $group = NULL)
{
static $temp_group = 3000000;
$render = FALSE;
if( ! isset($group))
{
$group = (string) $temp_group++;
$render = TRUE;
}
self::_parse_assets('img', $images, $attr, $group);
if($render)
{
return self::render($group);
}
return '';
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function createImgTag() {\n\t\t$this->imgNeko = '<img src=\"';\n\t\t$this->imgNeko .= $this->imgUri;\n\t\t$this->imgNeko .= '\" width=\"';\n\t\t$this->imgNeko .= $this->imgSize[0];\n\t\t$this->imgNeko .= '\" height=\"';\n\t\t$this->imgNeko .= $this->imgSize[1];\n\t\t$this->imgNeko .= '\" alt=\"';\n\t\t$this->imgNeko .= $this->creditInfo;\n\t\t$this->imgNeko .= '\">';\n\t}",
"public function getImageTag();",
"public function getImg()\n {\n return $this->img;\n }",
"public function getImg()\n {\n return $this->img;\n }",
"public function getImg()\n {\n return $this->img;\n }",
"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 }",
"public function getImg(){\n return $this->img;\n }",
"public function image($src,$alt = null)\r\n {\r\n $element = $this->element('img')->attribute('src',$src);\r\n\r\n if(!is_null($alt))\r\n {\r\n $element->attribute('alt',$alt);\r\n }\r\n\r\n return $element;\r\n }",
"function IMG($img, $extra = '')\n{\n /**\n * An Image tag.\n *\n * Args:\n * $img (str): the image source\n * $extra (str): extra data in the tag - used for adding class / ID etc.\n */\n echo \"<img src='\" . $img . \"'\" ;\n if ($extra != '') {\n echo ' ' . $extra ;\n }\n echo '>' ;\n}",
"public static function img($src = NULL, $alt = NULL) {\n\t\t// Create attribute list\n\t\t$attributes = is_array($src) ? $src : array('src' => $src);\n\n\t\tif (is_array($alt)) {\n\t\t\t$attributes += $alt;\n\t\t} elseif ( ! empty($alt)) {\n\t\t\t// Add alt to attributes\n\t\t\t$attributes['alt'] = $alt;\n\t\t}\n\t\tif(!isset($attributes['alt'])) $attributes['alt'] = '';\n\t\tif (strpos($attributes['src'], '://') === FALSE) {\n\t\t\t// Make the src attribute into an absolute URL\n\t\t\t$attributes['src'] = url::asset('img/'.$attributes['src']);\n\t\t}\n\n\t\treturn '<img'.html::attributes($attributes).'>';\n\t}",
"function img_tag($src, array $attributes = array())\r\n{\r\n $attributes['src'] = $src;\r\n\r\n return tag('img', $attributes);\r\n}",
"private function _build_img_tag($data)\n\t{\n\t\treturn '<img ' . $this->_assets_attributes($data['attributes']) . ' />';\n\t}",
"public function getImg()\n {\n return $this->imgLink;\n }",
"public static function img(string $src, array $attr = []): string\n {\n $attr = array_merge([\n 'src' => $src,\n 'alt' => ' '\n ], $attr);\n\n return static::tag('img', '', $attr);\n }",
"public function getIcon_ImageTag($imgTitle = null, $imgClass = null, $v = null, $tooltip = null) {\n return \\LolApi\\LolApi::globalApi()->ImagesApi->item($this->id, $imgTitle ? $imgTitle : $this->name, $imgClass, $v, $tooltip);\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 image($attr = NULL, $index = FALSE)\n\t{\n\t\tif ( ! is_array($attr))\n\t\t{\n\t\t\t$attr = array('src' => $attr);\n\t\t}\n\n\t\tif (strpos($attr['src'], '://') === FALSE)\n\t\t{\n\t\t\t// Make the src attribute into an absolute URL\n\t\t\t$attr['src'] = url::base($index).$attr['src'];\n\t\t}\n\n\t\treturn '<img'.html::attributes($attr).' />';\n\t}",
"public function addImage($src, $style = null) {\n\t\t$image = new PHPWord_Section_Image($src, $style);\n\t\t\n\t\tif(!is_null($image->getSource())) {\n\t\t\t$rID = PHPWord_Media::addSectionMediaElement($src, 'image');\n\t\t\t$image->setRelationId($rID);\n\t\t\t\n\t\t\t$this->_elementCollection[] = $image;\n\t\t\treturn $image;\n\t\t} else {\n\t\t\ttrigger_error('Source does not exist or unsupported image type.');\n\t\t}\n\t}",
"public static function img($src, $alt = '', $attrs = '')\n {\n return '<img src=\"'.PUBLIC_PATH.\"img/$src\\\" alt=\\\"$alt\\\" \".Tag::getAttrs($attrs).'/>';\n }",
"public function getColImgAttribute() {\n if ( $already_fetched = $this->getAttributeFromArray( 'col_img' ) ) {\n return $already_fetched;\n }\n if ( $image = $this->entry->augmentedValue( 'col_img' )->value() ) {\n $this->setAttribute( 'col_img', $image );\n\n return $image;\n }\n\n return null;\n\n }",
"function get_header_image_tag($attr = array())\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 }",
"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 tag($attr = array()) {\n\n // don't return the tag if the url is not available\n if(!$this->result->url()) return false;\n\n return html::img($this->result->url(), array_merge(array(\n 'alt' => isset($this->options['alt']) ? $this->options['alt'] : ' ',\n 'class' => isset($this->options['class']) ? $this->options['class'] : null,\n ), $attr));\n\n }",
"public function addImage($name, $src = NULL, $alt = NULL)\n\t{\n\t\treturn $this[$name] = new ImageButton($src, $alt);\n\t}",
"public function imageTag($arrMatch) {\n \n $em = $this->getDoctrine()->getEntityManager();\n\n $image = $em->getRepository('BloggerGalleryBundle:Image')->find($arrMatch[1]);\n \n if (!$image) {\n throw $this->createNotFoundException('Unable to find image.');\n }\n \n return $this->renderView('BloggerGalleryBundle:Gallery:image.html.twig', array(\n 'image' => $image,\n ));\n \n }",
"public function setImg($img)\n {\n $this->img = $img;\n\n return $this;\n }",
"public function setImg($img)\n {\n $this->img = $img;\n\n return $this;\n }",
"public function imgTag($src = NULL, $options = NULL, $html_potions = NULL)\n {\n $mode = isset($options['mode']) ? $options['mode'] : '';\n\n /* Generate html options */\n $html_options = $this->options2str($html_potions);\n\n if ($mode == \"imagemanager\" || $mode == \"filemanager\") {\n //$filemanager_path = App::Helper('Config')->get('filemanager_base_dir');\n\n return '<img src=\"' . App::Helper('Config')->filemanagerurl(\"/{$src}\") . '\"' . $html_options . ' />';\n }\n else {\n return '<img src=\"' . $src . '\"' . $html_options . ' />';\n }\n }",
"public function addImage($src, $style = null)\n {\n $image = new Image($src, $style);\n if (!is_null($image->getSource())) {\n if ($this->_insideOf == 'section') {\n $rID = Media::addSectionMediaElement($src, 'image', $image);\n } elseif ($this->_insideOf == 'header') {\n $rID = Media::addHeaderMediaElement($this->_pCount, $src, $image);\n } elseif ($this->_insideOf == 'footer') {\n $rID = Media::addFooterMediaElement($this->_pCount, $src, $image);\n }\n $image->setRelationId($rID);\n $this->_elementCollection[] = $image;\n return $image;\n } else {\n throw new InvalidImageException;\n }\n }"
] |
[
"0.68003035",
"0.63168454",
"0.62949854",
"0.62949854",
"0.62949854",
"0.61568606",
"0.6089888",
"0.59334546",
"0.5926846",
"0.5913459",
"0.59095395",
"0.5878628",
"0.5855695",
"0.5846453",
"0.58446527",
"0.5784592",
"0.5746448",
"0.57228976",
"0.56982905",
"0.5688456",
"0.5664363",
"0.56640655",
"0.5654443",
"0.5630796",
"0.56274927",
"0.5600538",
"0.5597219",
"0.5597219",
"0.5586777",
"0.55819833"
] |
0.65917695
|
1
|
Download a user's CV if the user has uploaded one.
|
public function download($userId)
{
$user = User::find($userId);
$pathToCVFolder = 'user-cvs/';
$disk = Storage::disk('s3');
$fileName = $user->cv_path;
$path = $pathToCVFolder . $fileName;
// if the file exists
if($disk->exists($path)){
$file = $disk->readStream($path);
// returns array of metadata for the file
$metadata = $disk->getDriver()->getMetadata($path);
// returns mimetype
$mimetype = $metadata['mimetype'];
// returns filesize
$size = $metadata['size'];
return Response::stream(function() use($file) {
fpassthru($file);
}, 200, [
"Content-Type" => $mimetype,
"Content-Length" => $size,
"Content-disposition" => "attachment; filename=\"" .basename($path) . "\"",
]);
} else{
return false;
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function downloadCV(CV $cv)\n\t{\n\t\t\n\t\treturn Response::download(public_path() . CV::$path_cv . $cv->cv);\n\t\t\n\t}",
"public function downloadCV($filename) {\n $filepath = \"/app/jobAppl/\" . $filename;\n return response()->download(storage_path($filepath));\n }",
"public function Get_CV($instructor_id)\n {\n $sql = \"SELECT `cv` FROM `special_instructor` WHERE `instructor_id` = '\".$instructor_id.\"'\";\n $this->DB->Change_DB($this->DEFAULT_DB);\n $result = $this->DB->Query($sql);\n if($result)\n {\n $file_name = $result[0]['cv'];\n $path = \"/cv/\".$file_name;\n return $path;\n }\n else\n {\n return null;\n }\n }",
"public function hasCV()\n {\n if($this->cv_path)\n {\n return true;\n }\n return false;\n }",
"public function download(){\n\t\t$lang = \"En\";\n\t\tif (isset ( $_SESSION [\"user_settings\"] [\"language\"] )) {\n\t\t\t$lang = $_SESSION [\"user_settings\"] [\"language\"];\n\t\t}\n\t\t\n\t\t// get form posts\n\t\t$localurl = $this->request->getParameter(\"localurl\");\n\t\t$filename = $this->request->getParameter(\"filename\");\n\t\t\n\t\t// get the user login\n\t\t$idUser = $_SESSION[\"id_user\"];\n\t\t$modelUser = new User();\n\t\t$userlogin = $modelUser->userLogin($idUser);\n\t\t\n\t\t// parse the files names\n\t\t$filename = str_replace(\"__--__\", \".\", $filename);\n\t\t$filename = str_replace(\"__---__\", \" \", $filename);\n\t\t$filename = str_replace(\"__----__\", \"/\", $filename);\n\t\t$localurl = str_replace(\"\\\\\", \"/\" , $localurl) . \"/\" . basename($filename);\n\t\t$fileName = \"./\" . $userlogin .\"/\".basename($filename);\n\t\t\n\t\t// refuse to download if the quotas is over\n\t\t$modelQuotas = new StUserQuota();\n\t\t$userQuotas = $modelQuotas->getQuota($idUser); // in GB\n\t\t$modelUploader = new StUploader();\n\t\t$usage = $modelUploader->getUsage($userlogin);\n\t\t$usage = $usage/1000000000; \n\t\t\n\t\tif ($usage >= $userQuotas){\n\t\t\t$this->index( StTranslator::QuotasHoverMessage($lang) . $localurl);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// download\n\t\t$modelFiles = new StUploader();\n\t\t$modelFiles->downloadFile($localurl, $fileName);\n\t\t\n\t\t\n\t\t// view\n\t\t$this->index( StTranslator::DownloadMessage($lang) . $localurl);\n\t\treturn;\n\t}",
"public function downloadFile();",
"function cbc_download() {\n\n $this->layout = NULL;\n\t\t\n $vc_cust_no = trim($this->Session->read('Auth.Customer.vc_cust_no'));\n\n $vc_comp_code = trim($this->Session->read('Auth.Customer.vc_comp_code'));\n\t\t\n $DownloadFile = $this->DocumentUploadCbc->find('first', array(\n\t\t 'fields'=>array('DocumentUploadCbc.vc_upload_doc_path',\n\t\t 'DocumentUploadCbc.vc_upload_doc_type',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'DocumentUploadCbc.vc_upload_doc_name'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'conditions' => array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'DocumentUploadCbc.vc_comp_code' => $vc_comp_code,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'DocumentUploadCbc.vc_cust_no' => $vc_cust_no,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'DocumentUploadCbc.vc_upload_doc_for' => $this->globalParameterarray['DOCUPLOAD01']),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'order'=>array('DocumentUploadCbc.dt_date_uploaded'=>'desc')));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\n\t if ( isset($DownloadFile['DocumentUploadCbc']['vc_upload_doc_name']) && file_exists($DownloadFile['DocumentUploadCbc']['vc_upload_doc_path'] . DS . $DownloadFile['DocumentUploadCbc']['vc_upload_doc_name']) ) {\n\t\t\t \n\t\t\t$path = $DownloadFile['DocumentUploadCbc']['vc_upload_doc_path'] . DS . $DownloadFile['DocumentUploadCbc']['vc_upload_doc_name'];\n \n\t\t\theader('Expires: 0');\n \n\t\t\theader('Pragma: public');\n\t\t\t\n\t\t\theader('Content-type:'.$DownloadFile['DocumentUploadCbc']['vc_upload_doc_type']);\n\t\t\t\n\t\t\theader('Cache-Control: must-revalidate, post-check=0, pre-check=0');\n \n\t\t\theader('Content-Disposition: attachment; filename=\"' . basename($DownloadFile['DocumentUploadCbc']['vc_upload_doc_name']) . '\"');\n \n\t\t\theader('Content-Transfer-Encoding: binary');\n\t\t\t\n\t\t\t@readfile($path);\n\t\t\t\n\t\t\texit(0);\n \n\t\t} else {\n\n $this->Session->setFlash('Sorry No file', 'info');\n\n // $this->redirect($this->referer());\n\t\t $this->redirect('view');\n }\n }",
"public function download() {\t\t}",
"public function download(User $user, Request $request)\n {\n return ($request->owner_id == $user->id || $user->isAdmin());\n }",
"function send_user_download($type, $content, $userfilename = \"\", $contenttype = \"application/octet-stream\") {\n\t/* If the type is 'file', then use the file size, otherwise use the size of the data to send */\n\t$size = ($type == 'file') ? filesize($content) : strlen($content);\n\n\t/* If the filename to pass to the user is empty, assume it to be the filename being read. */\n\t$name = basename((($type == 'file') && empty($userfilename)) ? $content : $userfilename);\n\n\t/* Cannot determine the filename, so bail. */\n\tif (empty($name)) {\n\t\texit;\n\t}\n\n\t/* Send basic download headers */\n\theader(\"Content-Type: {$contenttype}\");\n\theader(\"Content-Length: {$size}\");\n\theader(\"Content-Disposition: attachment; filename=\" . urlencode($name));\n\n\t/* Send cache headers */\n\tif (isset($_SERVER['HTTPS'])) {\n\t\theader('Pragma: ');\n\t\theader('Cache-Control: ');\n\t} else {\n\t\theader(\"Pragma: private\");\n\t\theader(\"Cache-Control: private, must-revalidate\");\n\t}\n\n\t/* Ensure output buffering is off so PHP does not consume\n\t * memory in readfile(). https://redmine.pfsense.org/issues/9239 */\n\twhile (ob_get_level()) {\n\t\t@ob_end_clean();\n\t}\n\n\t/* Send the data to the user */\n\tif ($type == 'file') {\n\t\treadfile($content);\n\t} else {\n\t\techo $content;\n\t}\n\n\t/* Flush any remaining output buffer */\n\t@ob_end_flush();\n\texit;\n}",
"function userCanDownloadFile($sessionID, $fileID ){\r\n\t\t$query = \"SELECT `ContactID` FROM `attachments` WHERE ID='$fileID'\";\r\n\t\t$result = mysql_query($query);\r\n\t\t$result = mysql_fetch_array($result);\r\n\t\t$contactID = $result['ContactID'];\r\n\t\treturn $this->userCanViewContact( $sessionID, $contactID );\r\n\t}",
"private function DownloadPageWithAuth()\n {\n $ret = false;\n \n $url = $this->Url.'&auth=1';\n \n //Permet de recuperer la vrai url directement pour les comptes premium\n if($this->ACCOUNT_TYPE == USER_IS_PREMIUM)\n {\n $url = $url.'&e=1';\n }\n \n $option = array(CURL_OPTION_FOLLOWLOCATION =>false);\n $curl = GenerateCurl($url,$option);\n curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);\n curl_setopt($curl, CURLOPT_USERPWD, $this->Username.':'.$this->Password);\n $ret = curl_exec($curl);\n curl_close($curl);\n \n return $ret;\n }",
"public function exportUserPDF()\n {\n $rol = Auth::user()->role_id;\n $company_id = Auth::user()->company_id;\n if ($rol == 1 && $company_id == null) {\n $User = User::all();\n $companies = User::with('companies')->get();\n $pdf = PDF::loadView('PDF.Userpdf', compact('User'));\n return $pdf->download('User.pdf', [\"companies\" => $companies]);\n } else {\n if ($rol == 2 || $rol == 3 || ($rol == 1 && $company_id != null)) {\n $User = User::where('company_id', $company_id)->with('company')->get(); //Obtener los valores de tu request:\n $pdf = PDF::loadView('PDF.Userpdf', [\"User\" => $User]); //genera el PDF la vista\n return $pdf->download('User.pdf'); // descarga el pdf\n } else {\n return back();\n }\n }\n }",
"public function download()\n {\n $this->user->downloaded();\n\n return response()->download($this->user->me()->data->file);\n }",
"public static function downloadWithoutAuthentication($fileId, $downloadAs, $userId) {\n $authorized = false;\n\n // get the file from 'file_news' table\n $file = DB::table('files_new')->where('id', $fileId)->where('user_id', $userId)->first();\n if(empty($file)) {\n throw new Exception(\"Invalid file\");\n }\n\n // if File exist in files_new table and user is authrorized,then download or return url for the user.\n if($file) {\n $s3 = Storage::disk('s3');\n\n // get contents of the file from s3 bucket..\n $fileContents = $s3->get($file->directory);\n\n // if we are downloading file as content, return now\n // otherwise, we save it to a public location and download\n if($downloadAs == 'content') {\n return $fileContents;\n }\n\n\n // NOT SUPPORTING DOWNLOAD\n\n // else {\n\n // // make sure to create the public folder to store the temporary file on server side(will be delete after sending file to client)\n // if(!File::exists(public_path() . \"/uploads\")) {\n // File::makeDirectory(public_path() . \"/uploads\");\n // }\n\n // // set temporary file nae before sending file to the client.\n // $tmpFileName = $userId . '-' . time() . \".\" . $file->extension;\n // $filePath = public_path() . '/uploads';\n // $fullPath = $filePath . '/' . $tmpFileName;\n\n // // create file from S3 as tmp file in 'public' folder\n // File::put($fullPath, $fileContents);\n\n // // return file downaload and then delete the file from the server.\n // return response()->download($fullPath)->deleteFileAfterSend(true);\n // }\n }\n }",
"public function getImage($filename)\n {\n\n // $path = $req->input('me');\n // $p = public_path().\"/profile/\".$filename;\n $file_path = public_path('profile/' . $filename);\n return Storage::download($file_path);\n }",
"public function download($type)\n {\n $model = Student::whereUser_id(auth()->user()->id)->first();\n if (!is_null($model)) {\n if ($model->user_id == auth()->user()->id) {\n $document = $model->getFirstMedia($type);\n if (!is_null($document))\n return response()->download($document->getPath(), $document->file_name);\n }\n }\n toast('Document not found', 'warning')->autoClose(5000)->timerProgressBar();\n return redirect()->back();\n }",
"public function store(ResumeRequest $request)\n {\n $response;\n\n $record = new CandidateFile();\n\n $fileName = rand(100000, 999999).'_cv.'.$request->file('resume')->getClientOriginalExtension();\n $filePublicName = $request->file('resume')->getClientOriginalName();\n $folderName = 'candidates/'.Auth::user()->candidate->id.'/resumes';\n\n $request->file('resume')->storeAs($folderName, $fileName, 'public');\n\n $record->candidate_id = Auth::user()->candidate->id;\n $record->file = $fileName;\n $record->file_public_name = $filePublicName;\n\n if ($record->save()) {\n $howMuchFile = Auth::user()->candidate->files->count();\n\n $response = [\n 'errors' => false,\n 'message' => 'Se ha guardado con éxito tu CV.',\n 'file_name' => $filePublicName,\n 'file_id' => $record->id,\n 'file_url' => url('storage/candidates/'.Auth::user()->candidate->id.'/resumes/'.$record->file),\n 'delete_upload_button' => ($howMuchFile == 3) ? true : false,\n 'file_count' => $howMuchFile\n ];\n } else {\n $response = [\n 'errors' => true,\n 'message' => 'No se ha podido guardar tu CV.',\n 'error_code' => 'cvu0001'\n ];\n }\n\n return response()->json($response);\n }",
"public function getCv()\n {\n return $this->cv;\n }",
"public function getFile()\r\n {\r\n // check permission\r\n $this->_check_group_permission();\r\n\r\n $access_full_path = $this->_get_access_full_path();\r\n $filename = $this->input->get_post('filename');\r\n $alt = $this->input->get_post('alt');\r\n\r\n // insert userlog\r\n if (empty($alt))\r\n {\r\n $this->_insert_userlog(Userlog_model::FILE_PREVIEW);\r\n }\r\n\r\n if ($this->files_model->is_document($filename))\r\n {\r\n header('Location: /files/preview?'. $_SERVER['QUERY_STRING']);\r\n return;\r\n }\r\n if ($this->files_model->is_extension($filename, 'nes'))\r\n {\r\n header('Location: /files/jsnes?'. $_SERVER['QUERY_STRING']);\r\n return;\r\n }\r\n if ( ! $this->files_model->is_browser_viewable($filename))\r\n {\r\n header('Location: /files/show_download?'. $_SERVER['QUERY_STRING']);\r\n return;\r\n }\r\n\r\n $this->files_model->get_file($access_full_path, $filename, $alt);\r\n }",
"public function getDownload($userid){\n\t\t\t$user = User::find($userid);\n $file= storage_path().'/reports/'.$user->id.'_'.str_replace(\" \", \"_\", $user->fname).'_'.str_replace(\" \", \"_\", $user->lname).'_Agility_Assessment_Report.pdf';\n $headers = array(\n 'Content-Type: application/pdf',\n );\n return Response::download($file, $user->id.'_'.str_replace(\" \", \"_\", $user->fname).'_'.str_replace(\" \", \"_\", $user->lname).'_Agility_Assessment_Report.pdf', $headers);\n }",
"public static function download($fileId, $downloadAs) {\n $authorized = false;\n\n // get the file from 'file_news' table\n $file = DB::table('files_new')->select('*')->where('id', $fileId)->first();\n if(empty($file)) {\n throw new Exception(\"Invalid file\");\n }\n\n $user = Helper::getUser();\n\n // if user is the one who uploaded the file , he can download the files.\n if($user->id == $file->user_id) {\n $authorized = true;\n }\n\n else if(Helper::isBroker($user->role)) { // IF user is broker\n // GET broker ID\n $brokerId = Broker::where('user_id', $user['id'])->first()->id;\n\n // Check if admin uploaded the file on behalf of broker i.e broker_id => broker ID of the requester , if yes grant access\n if(!empty($file->broker_id) && $file->broker_id == $brokerId) {\n $authorized = true;\n }\n\n else if(!empty($file->client_id)) {\n\n // Check if 'client_id' exist, if so check if that client belongs to the broker who is requesting to download the file, if yes grant access\n $client = DB::table('clients')->select('id', 'broker_id')->where('id', $file->client_id)->first();\n\n if($brokerId == $client->broker_id) {\n $authorized = true;\n }\n }\n }\n\n // if User is client\n else {\n\n // GET client ID\n $clientId = Client::where('user_id', $user['id'])->first()->id;\n\n // Check if broker uploaded the file on behalf of his. client i.e client_id => client ID of the requester , if yes grant access\n if(!empty($file->client_id) && $file->client_id == $clientId) {\n $authorized = true;\n }\n }\n\n // if File exist in files_new table and user is authrorized,then download or return url for the user.\n if($file && $authorized) {\n $s3 = Storage::disk('s3');\n\n // get contents of the file from s3 bucket..\n $fileContents = $s3->get($file->directory);\n\n // if we are downloading file as content, return now\n // otherwise, we save it to a public location and download\n if($downloadAs == 'content') {\n return $fileContents;\n }\n\n else {\n\n // make sure to create the public folder to store the temporary file on server side(will be delete after sending file to client)\n if(!File::exists(public_path() . \"/uploads\")) {\n File::makeDirectory(public_path() . \"/uploads\");\n }\n\n // set temporary file nae before sending file to the client.\n $tmpFileName = $user->id . '-' . time() . \".\" . $file->extension;\n $filePath = public_path() . '/uploads';\n $fullPath = $filePath . '/' . $tmpFileName;\n\n // create file from S3 as tmp file in 'public' folder\n File::put($fullPath, $fileContents);\n\n // return file downaload and then delete the file from the server.\n return response()->download($fullPath)->deleteFileAfterSend(true);\n }\n }\n\n else {\n // If get here, user is unauthorised to access the file\n throw new Exception(\"Not authorized to access the file.\");\n }\n }",
"public function download()\n\t{\n\t\t$sfUsers = sfCore::getClass('sfUsers');\n\t\tif($this->auth_requirement != 0)\n\t\t{\n\t\t\tif($sfUsers::translateAuthLevelString($sfUsers::getUserAuthLevel()) < $this->auth_requirement)\n\t\t\t{\n\t\t\t\tthrow new sfAuthorizationException();\n\t\t\t}\n\t\t}\n\n\t\t$update = sfCore::db->query(\"UPDATE `swoosh_file_storage` SET `downloads` = `downloads`+1 WHERE `id` = '%i' LIMIT 1;\",\n\t\t\t$this->id);\n\t\tfSession::close();\n\t\t$this->fFile->output(true, true);\n\t}",
"public function downloads(){\r\n $this->load->helper('download');\r\n //Get the file from whatever the user uploaded (NOTE: Users needs to upload first), @See http://localhost/CI/index.php/upload\r\n $data = file_get_contents(\"./uploads/Past and on-going SC projects.xlsx\");\r\n //Read the file's contents\r\n $name = 'Past and on-going SC projects.xlsx';\r\n\r\n //use this function to force the session/browser to download the file uploaded by the user \r\n force_download($name, $data);\r\n }",
"public static function getRemoteCasusFile() {\n // check if a new file is available\n $headers = get_headers( self::RIVM_REMOTE_SOURCE_CASUS_CSV_FILE , 1 );\n $headers = array_change_key_case( $headers ); //Convert keys to lowercase to prevent possible mistakes\n $remoteFileSize = false;\n if( isset( $headers['content-length'] ) ) {\n $remoteFileSize = $headers['content-length'];\n }\n $localFileSize = ( file_exists( self::RIVM_SOURCE_CASUS_CSV_FILE ) ) ? filesize( self::RIVM_SOURCE_CASUS_CSV_FILE ) : false;\n if ( $remoteFileSize !== false && ( $remoteFileSize != $localFileSize ) ) {\n // we got a new file. Let's download it\n $contents = file_get_contents( self::RIVM_REMOTE_SOURCE_CASUS_CSV_FILE );\n if( ! $contents ) return false;\n $date = date( 'Ymd', filemtime( self::RIVM_SOURCE_CASUS_CSV_FILE ) );\n $newFileName = substr( self::RIVM_SOURCE_CASUS_CSV_FILE, 0, -4 ) . \".\" . $date . \".csv\";\n if( rename( self::RIVM_SOURCE_CASUS_CSV_FILE, $newFileName ) ) {\n if ( file_put_contents( self::RIVM_SOURCE_CASUS_CSV_FILE, $contents, LOCK_EX ) ) {\n FileUtils::writeCookie( self::COOKIE_LAST_FETCH_RIVM_CASUS, time() );\n return true;\n }\n }\n }\n return false;\n }",
"public function cloud_snapshot_download_part($uid, $position)\r\n {\r\n switch ($this->cloud_service) {\r\n case 'dropbox':\r\n break;\r\n case 'gdrive':\r\n break;\r\n case 'pcloud':\r\n case 'pcloudeu':\r\n break;\r\n case 'wpreset':\r\n $result = $this->wpreset_snapshot_download_part($uid, $position);\r\n break;\r\n default:\r\n $result = new WP_Error('1', 'No cloud service is enabled');\r\n }\r\n\r\n return $result;\r\n }",
"private function processCVForm(Profile $profile): void\n {\n if ($this->isFormSubmit('profile_cvSubmit') && $this->uploadProfileFile($profile, self::FORM_CV_INPUT, FileUploader::MIME_TYPE_PDF, 10248576) && $profile->isValid()) {\n (new ProfileManager())->update($profile);\n $this->redirect(self::ADMIN_PROFILE);\n }\n\n\n }",
"public function downloadAction() {\r\n $file_id = $this->getRequest()->getParam('file_id');\r\n $chanelphoto = Engine_Api::_()->getItem('sesvideo_chanelphoto', $this->getRequest()->getParam('photo_id'));\r\n if (!$chanelphoto)\r\n return;\r\n $chanelphoto->download_count = $chanelphoto->download_count + 1;\r\n $chanelphoto->save();\r\n $file_id = $chanelphoto->file_id;\r\n if ($file_id == '' || intval($file_id) == 0)\r\n return;\r\n $storageTable = Engine_Api::_()->getDbTable('files', 'storage');\r\n $select = $storageTable->select()->from($storageTable->info('name'), array('storage_path', 'name'))->where('file_id = ?', $file_id);\r\n $storageData = $storageTable->fetchRow($select);\r\n $storageData = (object) $storageData->toArray();\r\n if (empty($storageData->name) || $storageData->name == '' || empty($storageData->storage_path) || $storageData->storage_path == '')\r\n return;\r\n //Get base path\r\n $basePath = APPLICATION_PATH . '/' . $storageData->storage_path;\r\n @chmod($basePath, 0777);\r\n header(\"Content-Disposition: attachment; filename=\" . urlencode(basename($storageData->name)), true);\r\n header(\"Content-Transfer-Encoding: Binary\", true);\r\n header(\"Content-Type: application/force-download\", true);\r\n header(\"Content-Type: application/octet-stream\", true);\r\n header(\"Content-Type: application/download\", true);\r\n header(\"Content-Description: File Transfer\", true);\r\n header(\"Content-Length: \" . filesize($basePath), true);\r\n readfile(\"$basePath\");\r\n exit();\r\n // for safety resason double check\r\n return;\r\n }",
"public function store(CvRequest $request)\n {\n $cv = new Cv();\n $cv->titre = $request->input('titre');\n $cv->presentation = $request->input('presentation');\n $cv->user_id = Auth::user()->id;\n\n if($request->hasFile('photo'))\n {\n $cv->photo = $request->photo->store('public');\n /* $path = $request->file('avatar')->store('avatars');*/\n }\n\n $cv->save();\n session()->flash('success','le cv est bien enregistrer !!');\n\n return redirect('cvs');\n }",
"public function downloadVCard($email)\n {\n $employee = Employees::getEmployeeByEmail($email);\n\n $name = explode(', ', $employee->cn[0]);\n\n $firstName = $name[0];\n $lastName = $name[1];\n\n header('Content-Type: text/vcf; charset=utf-8'); \n header('Content-Disposition: attachment; filename=' . $name[1] . '_' . $name[0] . '.vcf'); \n $output = fopen(\"php://output\", \"w\"); \n fwrite($output, 'BEGIN:VCARD');\n fwrite($output, \"\\n\");\n fwrite($output, 'N:'.$firstName.';'.$lastName.'');\n fwrite($output, \"\\n\");\n fwrite($output, 'FN:'.$employee->cn[0].'');\n fwrite($output, \"\\n\");\n fwrite($output, 'ORG:'.$employee->company[0].'');\n fwrite($output, \"\\n\");\n fwrite($output, 'TITLE;CHARSET=utf-8:'.$employee->title[0].'');\n fwrite($output, \"\\n\");\n fwrite($output, 'TEL;WORK;VOICE:'.$employee->telephonenumber[0].'');\n fwrite($output, \"\\n\");\n fwrite($output, 'TEL;CELL;VOICE:'.$employee->mobile[0].'');\n fwrite($output, \"\\n\");\n fwrite($output, 'EMAIL;PREF;INTERNET:'.$email.'');\n fwrite($output, \"\\n\");\n fwrite($output, 'ADR;WORK;PREF;CHARSET=utf-8:;;;'.$employee->streetaddress[0]. ', ' . $employee->l[0] .';;;');\n fwrite($output, \"\\n\");\n fwrite($output, 'END:VCARD');\n fclose($output); \n }"
] |
[
"0.656453",
"0.6214422",
"0.5986512",
"0.5777015",
"0.57135534",
"0.5418276",
"0.53065836",
"0.5247072",
"0.51957685",
"0.5194112",
"0.5165898",
"0.5165304",
"0.514302",
"0.5135109",
"0.5117196",
"0.5112308",
"0.50915265",
"0.50816673",
"0.507542",
"0.5072434",
"0.5049477",
"0.5041742",
"0.5034928",
"0.50195146",
"0.5008694",
"0.49772483",
"0.49759045",
"0.49705887",
"0.49593964",
"0.49583444"
] |
0.6715186
|
0
|
Checks if two hashes are equal in an unoptimized way so as to prevent timechecking attacks.
|
function hash_equals ($a, $b) {
$a_length = strlen($a);
if ($a_length !== strlen($b)) { return false; }
$result = 0;
for ($i = 0; $i < $a_length; $i++) {
$result |= ord($a[$i]) ^ ord($b[$i]);
}
return $result === 0;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"function hashEquals($a,$b){\n\tif(!val('s',$a,$b))return false;\n\t$m=microtime();\n\t$str1 = sha1($a.$m.$b);\n\t$str2 = sha1($b.$m.$a);\n\treturn hash_equals($str1, $str2);\n}",
"protected static function hashEquals($a, $b) {\n if (function_exists('hash_equals'))\n return hash_equals($a, $b);\n\n $nonce = openssl_random_pseudo_bytes(32);\n return hash_hmac(self::HASH_ALGORITHM, $a, $nonce) === hash_hmac(self::HASH_ALGORITHM, $b, $nonce);\n }",
"public function checkHashes(string $hash1, string $hash2): bool\n {\n return $hash1 === $hash2;\n }",
"function slow_equals($a, $b)\n{\n $diff = strlen($a) ^ strlen($b);\n for($i = 0; $i < strlen($a) && $i < strlen($b); $i++)\n {\n $diff |= ord($a[$i]) ^ ord($b[$i]);\n }\n return $diff === 0; \n}",
"public static function hash_equals($a, $b) {\n\t\t$a_length = wfWAFUtils::strlen($a);\n\t\tif ($a_length !== wfWAFUtils::strlen($b)) {\n\t\t\treturn false;\n\t\t}\n\t\t$result = 0;\n\n\t\t// Do not attempt to \"optimize\" this.\n\t\tfor ($i = 0; $i < $a_length; $i++) {\n\t\t\t$result |= ord($a[$i]) ^ ord($b[$i]);\n\t\t}\n\n\t\treturn $result === 0;\n\t}",
"private static function slowEquals($a, $b)\n {\n $diff = strlen($a) ^ strlen($b);\n for ($i = 0; $i < strlen($a) && $i < strlen($b); $i++) {\n $diff |= ord($a[$i]) ^ ord($b[$i]);\n }\n\n return $diff === 0;\n }",
"function cmp_slow_equals($a, $b)\n{\n $diff = strlen($a) ^ strlen($b);\n for($i = 0; $i < strlen($a) && $i < strlen($b); $i++)\n {\n $diff |= ord($a[$i]) ^ ord($b[$i]);\n }\n return $diff === 0;\n}",
"public function compareHash($hash)\n {\n // No Need to Compare Hash, Hashing is Not Required\n if (config('prionapi.auth_method') == 'single') {\n return true;\n }\n\n $serverHash = $this->hash;\n if ($hash != $serverHash) {\n app()->make('error')->code('2010');\n }\n\n return true;\n }",
"function testHash()\n {\n $this->assertEqual($this->referenceHash, auth::hashString($this->referenceClear), \"Testing hash consistency.\");\n }",
"public function comparePasswordHash($pwd, $hash);",
"function insecure_compare($a, $b) {\n\tfor($i = 0; $i < strlen($a) && $i < strlen($b); $i++) {\n\t\tif($a[$i] != $b[$i]) {\n\t\t\treturn false;\n\t\t}\n\t\tusleep(1000); // 1 ms\n\t}\n\t if(strlen($a) != strlen($b)) {\n\t\t return false;\n\t }\n\treturn true;\n}",
"private function checkHash( $hash )\n {\n // The first 64 characters of the hash is the salt\n $salt = substr($hash, 0, 64);\n \n // create a new hash by append the password to the salt string\n $hashToCheck = $salt . $this->password;\n \n // Hash the password a bunch of times\n for ( $i = 0; $i < 100000; $i ++ ) {\n $hashToCheck = hash('sha256', $hashToCheck);\n }\n \n $hashToCheck = $salt . $hashToCheck;\n \n // check the local hash with the database hash\n if( $hash == $hashToCheck )\n return true;\n \n // return false if no match\n return false;\n }",
"public function testTokenHashHandling()\n {\n $token = $this->changeMailHelper->getToken();\n $tokenHash1 = $this->changeMailHelper->getTokenHash($token);\n $tokenHash2 = $this->changeMailHelper->getTokenHash($token);\n\n $this->assertEquals($tokenHash1, $tokenHash2, 'Token should be equal.');\n }",
"function verify_hash($hash) // Colorize: green\n { // Colorize: green\n return isset($hash) // Colorize: green\n && // Colorize: green\n is_string($hash) // Colorize: green\n && // Colorize: green\n preg_match(MD5_HASH_REGEXP, $hash); // Colorize: green\n }",
"public function hash();",
"function verifyHash(string $hash, string $string): bool\n{\n return ($hash == crypt($string, $hash));\n}",
"function hashExists($hash);",
"function time_constant_equal($a, $b)\n\t{\n\t\t// Must be at least same length.\n\t\t$result = strlen($a) ^ strlen($b);\n\t\t\n\t\t// Go trough each char of $a and XOR it with the corresponding\n\t\t// char in $b, the result is zero only if they are equal.\n\t\t// We OR the comparison result with the final result since OR\n\t\t//\tfinal result is zero only if both operands are zero.\n\t\t// In other words if only one of the XORs returns 1 the overall\n\t\t//\tresult is 1.\n\t\tfor($i = 0; $i < strlen($a) && $i < strlen($b); $i++)\n\t\t{\n\t\t\t$result |= ord($a[$i]) ^ ord($b[$i]);\n\t\t}\n\t\t\n\t\t// Result is true (string equal) only if we got zeros at every step before.\n\t\treturn $result === 0;\n\t}",
"public function checkHashesForParams(array $params1, array $params2): bool\n {\n return $this->checkHashes(\n $this->hashCalculator->calculate($params1),\n $this->hashCalculator->calculate($params2)\n );\n }",
"public function checkHash(&$aResponse)\n {\n // checks hash2 and newly generated hash - returns false if both are differed\n if ($aResponse['hash2'] != $this->_generateHash($aResponse))\n return false;\n\n $this->_getDecodeData($aResponse, array( 'auth_code', 'product', 'tariff', 'amount', 'test_mode', 'uniqid' ));\n }",
"private function compareHMAC($a, $b){\r\n\tif (!is_string($a) || !is_string($b)) {\r\n return false;\r\n }\r\n \r\n $len = strlen($a);\r\n if ($len !== strlen($b)) {\r\n return false;\r\n }\r\n\r\n $status = 0;\r\n for ($i = 0; $i < $len; $i++) {\r\n $status |= ord($a[$i]) ^ ord($b[$i]);\r\n }\r\n return $status === 0; \r\n }",
"public function testHitHashAndTime() {\n\n\t\t$_SERVER['REMOTE_ADDR'] = '127.0.0.1';\n\n\t\t$r1 = new Nether\\Avenue\\Router(static::$RequestData['Root']);\n\t\t$r2 = new Nether\\Avenue\\Router(static::$RequestData['Test']);\n\n\t\t(new Verify(\n\t\t\t'verify that GetHitHash() returned a hashy looking thing.',\n\t\t\tstrlen($r1->GetHitHash())\n\t\t))->equals(32);\n\n\t\t(new Verify(\n\t\t\t'verify that r1 and r2 GetHitHash() do not match.',\n\t\t\t($r1->GetHitHash() === $r2->GetHitHash())\n\t\t))->false();\n\n\t\t(new Verify(\n\t\t\t'verify GetHitTime() returned a float',\n\t\t\tis_float($r1->GetHitTime())\n\t\t))->true();\n\n\t\t// it is actually plausable that a machine could be so fast that r1 and\n\t\t// r2 register at the exact same microsecond. if you are seeing a failed\n\t\t// test for r1 and r2 hit times matching, put a sleep(0.01) or something\n\t\t// between them. i am not doing that now intentionally to see how long\n\t\t// it takes for it to happen.\n\n\t\t// if they do end up matching, that is not a failure of the libarary.\n\t\t// in fact, that is a success. it means that two hits happend so fast\n\t\t// that you should ignore one of them because seriously, stop spamming\n\t\t// my server.\n\n\t\t// i don't expect this to happen until we have warp capabilities anyway.\n\t\t// at which point microtime is probably going to naturally be further\n\t\t// down the decimal point hole anyway.\n\n\t\t// it sure as fuck isn't going to happen on travis-ci.\n\n\t\t(new Verify(\n\t\t\t'verify that r1 and r2 GetHitTime()s do not match.',\n\t\t\t($r1->GetHitTime() === $r2->GetHitTime())\n\t\t))->false();\n\n\t\t$h1 = $r1->GetHit();\n\n\t\t(new Verify(\n\t\t\t'verify that GetHit() returned data matching GetHitHash().',\n\t\t\t$h1->Hash\n\t\t))->equals($r1->GetHitHash());\n\n\t\t(new Verify(\n\t\t\t'verify that GetHit() returned data matching GetHitTime().',\n\t\t\t$h1->Time\n\t\t))->equals($r1->GetHitTime());\n\n\t\treturn;\n\t}",
"public function checkHash($hash)\n\t{\n\t\treturn $this->hash && $this->hash == $hash;\n\t}",
"function verifyHash($password, $hash) {\r\n return $hash == crypt($password, $hash);\r\n}",
"function same($s1, $s2) {\n\t$s1len = strlen($s1);\n\t$s2len = strlen($s2);\n\tif($s1len != $s2len) return false;\n\n\tfor($i = 0; $i < $s1len; $i++) {\n\t\t$count = 0;\n\t\tfor($j = 0; $j < $s1len; $j++) {\n\t\t\tif($s1[$i] == $s2[$j]) $count++;\n\t\t}\n\t\tif($count != 1) return false;\n\t}\n\treturn true;\n}",
"static public function secure_compare($str1, $str2) {\n return hash_equals($str1, $str2);\n }",
"protected function comparePasswords($password1, $password2)\r\n {\r\n return hash_equals($password1, $password2);\r\n }",
"private function hash_validation() { //check hash\n\n\t\t$testMode = getRequest('ik_pw_via');\n\n\t\tif(isset($testMode) && $testMode == 'test_interkassa_test_xts'){\n\t\t\t$secretKey = $this->object->test_key;\n\t\t} else {\n\t\t\t$secretKey = $this->object->secret_key;\n\t\t}\n\n\t\t$data = array();\n\n\t\tforeach ($_REQUEST as $key => $value) {\n if (!preg_match('/ik_/', $key)) continue;\n $data[$key] = $value;\n }\n\n\t\t$ik_sign = $data['ik_sign'];\n\t\t$sign = $this->createSign($data,$secretKey);\n\n\t\t$this->wrlog(\"hash: \".$sign);\n\t\t$this->wrlog(\"ik_sign: \".$ik_sign);\n\t\treturn $sign == $ik_sign ? true : false;\n\t}",
"public function isCorrect($hash) {\n\t\treturn $this->hash == $hash;\n\t}",
"function leonardo_check_hash($password, $hash)\n{\n $itoa64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';\n if (strlen($hash) == 34)\n {\n return (_leonardo_hash_crypt_private($password, $hash, $itoa64) === $hash) ? true : false;\n }\n\n return (md5($password) === $hash) ? true : false;\n}"
] |
[
"0.7535745",
"0.7017002",
"0.68900406",
"0.68331593",
"0.6825834",
"0.673581",
"0.65165097",
"0.64919275",
"0.6244863",
"0.6060688",
"0.6045959",
"0.60087",
"0.60036534",
"0.5959273",
"0.59589756",
"0.5949891",
"0.592586",
"0.58971363",
"0.58931464",
"0.5867354",
"0.575751",
"0.5752119",
"0.5718701",
"0.5707663",
"0.5702217",
"0.5688077",
"0.5674009",
"0.5664016",
"0.5642916",
"0.5620874"
] |
0.7019986
|
1
|
Sends an email broadcasting an event to the user who pushed the branch, the repository's owner, and email addresses specified in the config "cc" property.
|
function send_email ($input, $error = null) {
global $config;
if ($error === null) {
$subject = 'Automatic deploy complete';
$message = 'The repository ' . $input->repository->name . ' was successfully redeployed automatically from the ' .
$config->branch . ' branch by ' . $input->pusher->name . '. Visit the website for ' . $input->repository->name . ' to ' .
'confirm that everything is working!';
} else {
$subject = 'Automatic deploy FAILED';
$message = 'The automatic deploy script failed for the ' . $input->repository->name . ' repository ' .
'because the git pull command did not exit with a 0 status code. The output was:' . "\n" . print_r($error, true);
}
mail(
implode(', ', array($input->pusher->email, $input->repository->owner->email)),
$subject,
$message,
'From: ' . $input->repository->owner->email . ($config->cc ? "\n" . 'Cc: ' . $config->cc : '')
);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private function sendEmail()\n\t{\n\t\t// Get data\n\t\t$config = JFactory::getConfig();\n\t\t$mailer = JFactory::getMailer();\n\t\t$params = JComponentHelper::getParams('com_code');\n\t\t$addresses = $params->get('email_error', '');\n\n\t\t// Build the message\n\t\t$message = sprintf(\n\t\t\t'The sync cron job on developer.joomla.org started at %s failed to complete properly. Please check the logs for further details.',\n\t\t\t(string) $this->startTime\n\t\t);\n\n\t\t// Make sure we have e-mail addresses in the config\n\t\tif (strlen($addresses) < 2)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t$addresses = explode(',', $addresses);\n\n\t\t// Send a message to each user\n\t\tforeach ($addresses as $address)\n\t\t{\n\t\t\tif (!$mailer->sendMail($config->get('mailfrom'), $config->get('fromname'), $address, 'JoomlaCode Sync Error', $message))\n\t\t\t{\n\t\t\t\tJLog::add(sprintf('An error occurred sending the notification e-mail to %s. Error: %s', $address, $e->getMessage()), JLog::INFO);\n\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t}",
"public static function emailMe(Box_Event $event)\n {\n // returns event name 'client.postCreateClient'\n $event_name = $event->getName();\n\n // return event subject, for this event it is Model_Client\n $client = $event->getSubject();\n\n // return array of additional event parameters.\n $params = $event->getParameters();\n\n if(!$client instanceof Model_Client) {\n return;\n }\n\n $message = sprintf('\"%s\" just signed up', $client->getFullName());\n mail('[email protected]', $message, $message);\n }",
"public function sendEmail($e) {\n $config = $e->getParam('email-notification-config');\n\n // Set up ViewModel and template for rendering\n $viewModel = new ViewModel();\n $template = array_keys($config['template_map'])[0];\n $viewModel->setTemplate($template);\n\n // get template map (must contain the template specified above!\n $templateMap = $config['template_map'];\n\n // render email template\n $phpRenderer = new PhpRenderer();\n $aggregateResolver = new AggregateResolver();\n $aggregateResolver->attach(new TemplateMapResolver($templateMap));\n $phpRenderer->setResolver($aggregateResolver);\n // assign values from params passed by the trigger\n foreach ($config['email-options'] as $key => $value) {\n $viewModel->setVariable($key, $value);\n }\n\n // Create the HTML body\n $html = new Part($phpRenderer->render($viewModel));\n $html->type = Mime::TYPE_HTML;\n $html->charset = 'utf-8';\n $html->encoding = Mime::ENCODING_QUOTEDPRINTABLE;\n $body = (new MimeMessage())->setParts([$html]);\n $message = (new Message())\n ->addTo($config['email-options']['to'])\n ->addFrom($config['email-options']['from'])\n ->setSubject($config['email-options']['subject'])\n ->setBody($body)\n ->setEncoding('UTF-8');\n $transport = $this->container->get('email-notification-transport-file');\n NotificationEvent::$success = true;\n $transport->send($message);\n }",
"private function sendEmails()\r\n {\r\n $user_body = \"Hi,<br>A new comment was added to the following article:\\n\";\r\n $user_body .= '<a href=\"http://'.$this->config->getModuleVar('common', 'site_url').'/id_article/'.$this->viewVar['article']['id_article'].'\">'.$this->viewVar['article']['title'].\"</a>\\n\";\r\n\r\n $_tmp_error = array();\r\n $user_text_body = strip_tags($user_body);\r\n\r\n $this->model->action( 'common', 'mailSendTo',\r\n array('charset' => $this->viewVar['charset'],\r\n 'bodyHtml' => & $user_body,\r\n 'bodyText' => & $user_text_body,\r\n 'to' => array(array('email' => '[email protected]',\r\n 'name' => 'Armand Turpel')),\r\n 'subject' => \"Open Publisher Blog Entry\",\r\n 'fromEmail' => '[email protected]',\r\n 'fromName' => '[email protected]',\r\n 'error' => & $_tmp_error\r\n ));\r\n\r\n }",
"public function send_subscriptions(){\r\n //send email to all those who have subscribed to posts from this author\r\n\r\n }",
"public function sendEmail(): void\n {\n echo 'email sent';\n }",
"public function testComDayCqWcmNotificationEmailImplEmailChannel()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/com.day.cq.wcm.notification.email.impl.EmailChannel';\n\n $crawler = $client->request('POST', $path);\n }",
"public function sendEmail()\n {\n SendEmailMessage::dispatch($this->address, $this->messageString);\n }",
"public function sendTheEmailNow()\r\n {\r\n echo \"Email sent.\";\r\n }",
"public function notifyOwner()\n {\n global $config, $reefless, $account_info;\n\n $reefless->loadClass('Mail');\n\n $mail_tpl = $GLOBALS['rlMail']->getEmailTemplate(\n $config['listing_auto_approval']\n ? 'free_active_listing_created'\n : 'free_approval_listing_created'\n );\n\n if ($config['listing_auto_approval']) {\n $link = $reefless->getListingUrl(intval($this->listingID));\n } else {\n $myPageKey = $config['one_my_listings_page'] ? 'my_all_ads' : 'my_' . $this->listingType['Key'];\n $link = $reefless->getPageUrl($myPageKey);\n }\n\n $mail_tpl['body'] = str_replace(\n array('{username}', '{link}'),\n array(\n $account_info['Username'],\n '<a href=\"' . $link . '\">' . $link . '</a>',\n ),\n $mail_tpl['body']\n );\n $GLOBALS['rlMail']->send($mail_tpl, $account_info['Mail']);\n }",
"protected function send($event, $body)\n {\n $mailer = $this->configureMailer($event);\n $mailer->message($body, 'text/html');\n $this->addReceivers($event, $mailer);\n $this->doSend($mailer);\n }",
"public function sendEmailWithApplyLink(){\n\t}",
"private function _sendNewStatusUpdateEmailToUser()\n {\n // Get a reference to the Joomla! mailer object\n $mailer = \\JFactory::getMailer();\n\t\t\t\n\t\t\t$config = \\JFactory::getConfig();\n\t\t\t$sender = array( \n\t\t\t $config->get( 'mailfrom' ),\n\t\t\t $config->get( 'fromname' ) \n\t\t\t);\n \n\t\t\t$mailer->setSender($sender);\n\n\t\t\t$user = \\JFactory::getUser();\n\t\t\t$mailer->addRecipient($user->email);\n \n // Set the subject\n $subject = \\JFactory::getConfig()->get('sitename') . \": New Status Update...\";\n\t\t\t$mailer->setSubject($subject);\n\t\t\t$projectId = $this->recordData['hshrndreview_fk_project_id'];\n\t\t\t\n\t\t\t$db = \\JFactory::getDbo();\n\t\t\t//this is just to know whether we are in the user is in the reviewer group or not\n\t\t\t$query = $db->getQuery(true);\n\t\t\t$query->select($db->quoteName(array('name', 'owner')));\n\t\t\t$query->from($db->quoteName('#__hshrndreview_projects'));\n\t\t\t$query->where($db->quoteName('hshrndreview_project_id').\" = \". $projectId);\n\t\t\t$db->setQuery($query);\n\t\t\t$project = $db->loadRow();\n\t\t\t\n\t\t\t$body = \"Thank you for submitting a new status update for project named: \\\"\" . $project['0'] . \"\\\". It has been added to the HSH project database!\\n\\n Have a nice day - your friendly HSH RnD Review automailer...\";\n\t\t\t$mailer->setBody($body);\n // Send the email\n\t\t\t$send = $mailer->Send();\n\t\t\tif ( $send !== true ) {\n\t\t\t echo 'Error sending email: ' . $send->__toString();\n\t\t\t} else {\n\t\t\t echo 'Mail sent';\n\t\t\t}\n }",
"public function sendWelcomeEmail()\n {\n SendEmailJob::dispatch($this, 'confirm-email', 'Confirm Your Email', [])->onQueue('account-notifications');\n }",
"public function actionSendConfirmationEmail() {\n\n\t\t$userId = User::checkLogged();\n\t\t$confirmation = User::generateConfirmationCode($userId);\n\t\t$subject = \"Confirm your account on JustRegMe\";\n\t\t$bodyPath = ROOT . '/template/email/confirmation.php';\n\t\t$body = include($bodyPath); //loads HTML-body from template\n\t\t\n\t\techo User::sendEmail($userId, $subject, $body);\n\n\t}",
"public function toEmail($channel){\n switch($this->key){\n case self::KEY_NEW_ACCOUNT:\n $subject = 'Welcome to MySite';\n $template = 'test_email';\n break;\n case self::KEY_RESET_PASSWORD:\n $subject = 'Password reset for MySite';\n $template = 'resetPassword';\n break;\n }\n\n $message = $channel->mailer->compose($template, [\n 'user' => $this->datas['user'],\n 'notification' => $this,\n ]);\n Yii::configure($message, $channel->message);\n\n $message->setTo($this->datas['user']->email);\n $message->setSubject($subject);\n $message->send($channel->mailer);\n }",
"public function onSendMail(Enlight_Event_EventArgs $args)\n {\n $this->mails[] = $args->getMail();\n }",
"public function sendEmailVerificationNotification()\n {\n $this->notify(new VerifyEmail); // my notification\n }",
"public function sendEmailVerificationNotification()\n { \n \n $this->notify(new ConfirmEmail); \n \n }",
"public function commit()\n {\n // my code\n $builder = new EventsBuilder();\n $builder->createEventType(self::EVENT_TYPE, 'ru', function (EventType $event) {\n $event\n ->name(self::EVENT_NAME)\n ->sort(10)\n ->description('#NAME# - Имя\n#EMAIL# - Email\n#PHONE# - Телефон\n#MESSAGE# - Сообщение\n#FILE# - Ссылка на файл');\n $event\n ->addEventMessage('#DEFAULT_EMAIL_FROM#', '#EMAIL_TO#', 's1')\n ->subject('#SITE_NAME#: Новое сообщение')\n ->body('Информационное сообщение сайта #SITE_NAME#\n------------------------------------------\nВам было отправлено новое сообщение:\n\nИмя: #NAME#\nEmail: #EMAIL#\nТелефон: #PHONE#\nСсылка на файл: #FILE#\n\nСообщение: \n#MESSAGE#\n\n------------------------------------------\nСообщение сгенерировано автоматически.')\n ->bodyType(EventMessage::BODY_TYPE_TEXT)\n ->active();\n });\n }",
"public function pushConfig()\n {\n $cmds[] = 'push gitoliteorigin master';\n $this->runGitCommand($cmds);\n }",
"public function sendConfEmail() {\r\n\t\t$to = array($this->email => $this->fname . \" \" . $this->lname);\r\n\t\t$emailObj = new mandrillApi($to, \"Welcome to Tackster.com\");\r\n\t\t$htmlString = <<<EOF\r\n<h3>Welcome to Tackster.com</h3>\r\n<p>You have now registered with <a href=\"http://www.tackster.com\">Tackster.com</a>.\r\nWe figure we should keep the greeting short and get you started right away!</p>\r\nLet's go to the site by <a href=\"http://www.tackster.com\"><b>Visting Tackster.com</b></a>!\r\nEOF;\r\n\t\t$emailObj->createEmail($htmlString);\r\n\t\t$emailObj->sendEmail();\r\n\t}",
"public function sendEmailToAttendees(\\Tx_Seminars_Model_Event $event, $subject, $body)\n {\n /** @var \\Tx_Oelib_MailerFactory $mailerFactory */\n $mailerFactory = GeneralUtility::makeInstance(\\Tx_Oelib_MailerFactory::class);\n $mailer = $mailerFactory->getMailer();\n\n /** @var \\Tx_Seminars_Model_Registration $registration */\n foreach ($event->getRegistrations() as $registration) {\n $user = $registration->getFrontEndUser();\n if ($user === null || !$user->hasEmailAddress()) {\n continue;\n }\n\n /** @var \\Tx_Oelib_Mail $eMail */\n $eMail = GeneralUtility::makeInstance(\\Tx_Oelib_Mail::class);\n $eMail->setSender($event->getFirstOrganizer());\n $eMail->addRecipient($user);\n $eMail->setSubject($this->replaceMarkers($subject, $event, $user));\n\n $eMail->setMessage($this->buildMessageBody($body, $event, $user));\n\n $mailer->send($eMail);\n }\n }",
"function send_mail_cron_job(){\n\n $from_name = 'Web Tester';\n $from_email = '[email protected]';\n $html = 'Hello, Im testing croj job. Ok Google.';\n $config['mailtype'] = 'html';\n $this->email->initialize($config);\n $this->email->to('[email protected]');\n $this->email->from($from_email, $from_name);\n $this->email->subject('Cron Job Test');\n $this->email->message($html);\n $result = $this->email->send();\n if($result === TRUE){\n echo \"message sent\";\n }else{\n echo \"unable to send message\";\n }\n }",
"private function emailChanges(){\n $emails = $this->getAdminEmails(get_option('notification_users'));\n $custom_email = get_option('notification_email');\n\n if(isset($custom_email['email_add']) && !empty($custom_email['email_add']))\n $emails[] = $custom_email['email_add'];\n\n if(!$emails){\n $emails = get_bloginfo('admin_email');\n }\n\n $message = \" Changed Files(\".count($this->md5_changed_output).\"):\\n\";\n $changes = $this->order_changed_log();\n $files = 0;\n foreach($changes as $ext => $log_type){\n $message .= \"\\nFile Type (\".$ext.\"): \\n\";\n foreach($log_type as $k => $v){\n $files++;\n $message .= $v['real_path'].' => '.$v['modified']. \"\\n\";\n }\n }\n\n wp_mail( $emails, 'WP-Checksum File Modifications: '.$files, $message, '', array(MD5_HASHER_DIR.$this->file_change));\n }",
"private function sendDailyAdminEmail()\n {\n // Message\n $message = (new AdministratorDaily())->onQueue('platform-processing');\n // User Setting\n $settingProvider = (new PlatformSettingProvider());\n Mail::to($settingProvider->setting('admin_notification_email'),$settingProvider->setting('admin_notification_name'))\n ->send($message);\n Log::info(\"Sent Admin Email\");\n }",
"protected function sendMail()\n {\n $user = User::find()\n ->where(['id' => $this->user->id])\n ->one();\n\n $notificationManager = new MailService($user);\n $notificationManager->register();\n }",
"function main() {\n\t\t\n\t\t$Email = new CakeEmail('default');\n\t\t$result = $Email\n\t\t\t->config(array('log' => true))\n\t\t ->emailFormat('text')\n\t\t ->subject('PROMPT Test Email')\n\t\t ->to('[email protected]')\n\t\t ->send();\n\n\n\t}",
"function send_notification($email_subject, $email_to, $email_message) {\n\t$email_from = 'CrowdShot Administrator <[email protected]>';\n\t$email_reply_to = 'CrowdShot Technical Help <[email protected]>';\n\t$email_bcc = '';\n\t$email_to = filter_var($email_to, FILTER_SANITIZE_EMAIL);\n\n\tif (filter_var($email_to, FILTER_VALIDATE_EMAIL)) {\n\t\treturn mail($email_to, $email_subject, build_email_message_html($email_subject, $email_message), build_email_header($email_from, $email_reply_to, $email_bcc));\n\t} else {\n\t\treturn FALSE;\n\t} // if (filter_var($email_to, FILTER_VALIDATE_EMAIL) && filter_var($email_from, FILTER_VALIDATE_EMAIL))\n}",
"public function sendEmailVerificationNotification(){\n $this->notify(new VerifyEmail);\n }"
] |
[
"0.56148183",
"0.55470043",
"0.5435191",
"0.5374173",
"0.53582984",
"0.53424144",
"0.53326356",
"0.5326121",
"0.5314357",
"0.53005725",
"0.5223893",
"0.5206538",
"0.51977396",
"0.5196281",
"0.5188561",
"0.5171896",
"0.51546514",
"0.51390505",
"0.51217633",
"0.50883627",
"0.5075518",
"0.5074659",
"0.5037243",
"0.5012577",
"0.4998044",
"0.49918103",
"0.49797684",
"0.49778655",
"0.49736166",
"0.4968099"
] |
0.58281875
|
0
|
attributeName [( expressions )]
|
public function visitAttribute(
/*IAttribute*/ $node) /*: mixed*/ {
$expressions = Vector {};
foreach ($node->getExpressions() as $expressions_elem) {
$expressions[] = /*(string)*/$expressions_elem->accept($this);
}
$result = $node->getAttributeName();
$result .= $this->visitVector($expressions, '(', ', ', ')', '');
return $result;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function getAttributeByName($attributeName);",
"abstract public function attributeNames();",
"function attribute($text) {\n\t\treturn $this->text($text);\n\t}",
"public function get($attributeName);",
"public function getAttribute($name);",
"public function attr() {\n\t\treturn utils::attr($this->attr, func_get_args());\n\t}",
"private function attributeNameState()\n {\n $this->char++;\n $char = $this->character($this->char);\n\n if (preg_match('/^[\\t\\n\\x0b\\x0c ]$/', $char)) {\n /* U+0009 CHARACTER TABULATION\n U+000A LINE FEED (LF)\n U+000B LINE TABULATION\n U+000C FORM FEED (FF)\n U+0020 SPACE\n Stay in the before attribute name state. */\n $this->state = 'afterAttributeName';\n\n } elseif ($char === '=') {\n /* U+003D EQUALS SIGN (=)\n Switch to the before attribute value state. */\n $this->state = 'beforeAttributeValue';\n\n } elseif ($char === '>') {\n /* U+003E GREATER-THAN SIGN (>)\n Emit the current tag token. Switch to the data state. */\n $this->emitToken($this->token);\n $this->state = 'data';\n\n } elseif ($char === '/' && $this->character($this->char + 1) !== '>') {\n /* U+002F SOLIDUS (/)\n Parse error unless this is a permitted slash. Switch to the before\n attribute name state. */\n $this->state = 'beforeAttributeName';\n\n } elseif ($this->char === $this->EOF) {\n /* EOF\n Parse error. Emit the current tag token. Reconsume the EOF\n character in the data state. */\n $this->emitToken($this->token);\n\n $this->char--;\n $this->state = 'data';\n\n } else {\n /* Anything else\n Append the current input character to the current attribute's name.\n Stay in the attribute name state. */\n $last = count($this->token['attr']) - 1;\n $this->token['attr'][$last]['name'] .= strtolower($char);\n\n $this->state = 'attributeName';\n }\n }",
"private function attributeNameState() {\n $this->char++;\n $char = $this->character($this->char);\n\n if(preg_match('/^[\\t\\n\\x0b\\x0c ]$/', $char)) {\n /* U+0009 CHARACTER TABULATION\n U+000A LINE FEED (LF)\n U+000B LINE TABULATION\n U+000C FORM FEED (FF)\n U+0020 SPACE\n Stay in the before attribute name state. */\n $this->state = 'afterAttributeName';\n\n } elseif($char === '=') {\n /* U+003D EQUALS SIGN (=)\n Switch to the before attribute value state. */\n $this->state = 'beforeAttributeValue';\n\n } elseif($char === '>') {\n /* U+003E GREATER-THAN SIGN (>)\n Emit the current tag token. Switch to the data state. */\n $this->emitToken($this->token);\n $this->state = 'data';\n\n } elseif($char === '/' && $this->character($this->char + 1) !== '>') {\n /* U+002F SOLIDUS (/)\n Parse error unless this is a permitted slash. Switch to the before\n attribute name state. */\n $this->state = 'beforeAttributeName';\n\n } elseif($this->char === $this->EOF) {\n /* EOF\n Parse error. Emit the current tag token. Reconsume the EOF\n character in the data state. */\n $this->emitToken($this->token);\n\n $this->char--;\n $this->state = 'data';\n\n } else {\n /* Anything else\n Append the current input character to the current attribute's name.\n Stay in the attribute name state. */\n $last = count($this->token['attr']) - 1;\n $this->token['attr'][$last]['name'] .= strtolower($char);\n\n $this->state = 'attributeName';\n }\n }",
"public function getAttribute(string $name);",
"public function nextAttribute();",
"protected function xpathAttrib()\n { if ($this->namespace == '*') {\n return '@'.$this->attrib;\n }\n\n return sprintf('@%s:%s', $this->namespace, $this->attrib);\n }",
"abstract protected function getAttributeName($attribute);",
"function useattrib($attribute) { atkuse(\"attribute\", $attribute); }",
"static function attributeMatch ($matches) {\n\t\tfor ($i = 0; $i <= 12; $i++) :\n\t\t\tif (!isset($matches[$i])) :\n\t\t\t\t$matches[$i] = '';\n\t\t\tendif;\n\t\tendfor;\n\n\t\t$suffix = $matches[12].$matches[9];\n\t\t$value = $matches[10].$matches[7];\n\n\t\treturn array(\n\t\t\"tag\" => $matches[3],\n\t\t\"attribute\" => $matches[4],\n\t\t\"value\" => $value,\n\t\t\"quote\" => $matches[6],\n\t\t\"prefix\" => $matches[1].$matches[6],\n\t\t\"suffix\" => $matches[6].$suffix,\n\t\t\"before_attribute\" => $matches[2],\n\t\t\"after_attribute\" => $suffix,\n\t\t);\n\t}",
"public function get_attribute($name)\n {\n }",
"public function getAttributeName($index = null);",
"public function setAttributeName($attributeName) {\n\t\t$this->attributes['attributeName'] = $attributeName;\n\t\t$this->attributeName = $attributeName;\n\t\treturn $this;\n\t}",
"public function getAttribute($attribute)\n {\n }",
"public function getExpression();",
"public static function attr($string, $strict = true) {\n if(static::noNeedToEscape($string)) return $string;\n if($strict === true) {\n return preg_replace_callback('/[^a-z0-9,\\.\\-_]/iSu', 'static::escapeAttrChar', $string);\n }\n return static::html($string);\n }",
"public function getAttribute(string $attribute): string;",
"public function getAttribute($key);",
"public function getAttribute($attribute)\r\n\t{\r\n\t\t\r\n\t}",
"abstract public function getAttribute($key);",
"public function attr($name) {\n\tif( count($this->selectList) > 0 && isset($this->selectList[0]->attrList[$name])) return $this->selectList[0]->attrList[$name];\n\tif( isset($this->attrList[$name]) ) return $this->attrList[$name];\n\treturn '';\n }",
"protected function formatAttribute($attributeName) {\n\t\t\treturn preg_replace_callback(\n\t\t\t\t'/(^|_|\\.)+(.)/',\n\t\t\t\tfunction ($match) {\n\t\t\t\t\treturn ('.' === $match[1] ? '_' : '') . strtoupper($match[2]);\n\t\t\t\t},\n\t\t\t\t$attributeName\n\t\t\t);\n\t\t}",
"public function addAttribute($name, $value);",
"public static function attributeMap();",
"public function getAttributeName()\n {\n return 'AgriculturalInsuranceDiscountFactor';\n }",
"function get_attr()\n\t{\n\t\t$a = array();\n\t\twhile (($s = array_shift($this->pieces))) {\n\t\t\tif (($i = strpos($s,\":\")) >= 1) {\n\t\t\t\t$attr = substr($s,0,$i);\n\t\t\t\t$val = substr($s,$i+1);\n\t\t\t\tif (($j = strpos($val,\"(\"))\n\t\t\t\t && ($k = strpos($val,\")\"))\n\t\t\t\t && ($k > $j)) {\n\t\t\t\t\t$a[\"arg:\".$attr] = substr($val,$j+1,$k-($j+1));\n\t\t\t\t\t$val = substr($val,0,$j);\n\t\t\t\t}\n\t\t\t\t$a[$attr] = $val;\n\t\t\t} elseif (intval($s) > 0) {\n\t\t\t if ($a['$scale'] != \"\")\n\t\t\t\t$a['scale'] = intval($s);\n\t\t\t}\n\t\t}\n\t\treturn $a;\n\t}"
] |
[
"0.6571017",
"0.6077763",
"0.59080213",
"0.5885649",
"0.58535075",
"0.5755627",
"0.5726995",
"0.5723951",
"0.57238585",
"0.57096297",
"0.56877536",
"0.5658867",
"0.5576743",
"0.55409956",
"0.55400586",
"0.55183274",
"0.547308",
"0.54676336",
"0.5452311",
"0.5449889",
"0.54189664",
"0.54181427",
"0.5410091",
"0.5386837",
"0.53758323",
"0.5369031",
"0.53141046",
"0.53078735",
"0.5296923",
"0.52831405"
] |
0.68381846
|
0
|
A name that identifies some kind of modification to the semantics of another code node. For example "public".
|
public function visitModifier(
/*IModifier*/ $node) /*: mixed*/ {
return $node->getName();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function modify();",
"public function alterMe()\n {\n return \"splendiferous\";\n }",
"public static function right_public(){return false;}",
"public function mutate();",
"public function mutate();",
"public function isPublic($name);",
"public function modify($modify);",
"static function alter() {\n }",
"function mMODIFY(){\n try {\n $_type = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$MODIFY;\n $_channel = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$DEFAULT_TOKEN_CHANNEL;\n // Tokenizer11.g:9:3: ( 'modify' ) \n // Tokenizer11.g:10:3: 'modify' \n {\n $this->matchString(\"modify\"); \n\n\n }\n\n $this->state->type = $_type;\n $this->state->channel = $_channel;\n }\n catch(Exception $e){\n throw $e;\n }\n }",
"function modified() { $this->_modified=1; }",
"function modified() { $this->_modified=1; }",
"public function setAsModified($name = NULL);",
"public function setName($newName){\n\t}",
"function printModifier($modifer){\n if($modifer === \"public\"){\n echo \"+ \";\n }\n else if($modifer === \"private\"){\n echo \"- \";\n }\n else{\n echo \"# \";\n }\n }",
"public function isPublic() {}",
"public function alterMeToo()\n {\n return \"fantabulous\";\n }",
"function isPublic();",
"public function setChangeInternalName($value)\n {\n \t$this->_change_internal_name = $value;\n }",
"#[@test]\n public function publicModifier() {\n $this->assertTrue(Modifiers::isPublic(MODIFIER_PUBLIC));\n $this->assertEquals('public', Modifiers::stringOf(MODIFIER_PUBLIC));\n }",
"public function getName()\n {\n return 'readonly';\n }",
"abstract public function change();",
"public function getName() {\n\t\treturn '+edit';\n\t}",
"function apply_public(&$sid, &$character, $public)\n {\n $character->public = $public ? 'y' : 'n';\n return $character->Save($sid);\n }",
"public function setCodeName( $name );",
"function yy_r68()\n {\n $this->_retvalue = $this->compiler->compileTag('Internal_Modifier', array(), array('value' => $this->yystack[$this->yyidx + - 1]->minor, 'modifier_list' => $this->yystack[$this->yyidx + 0]->minor));\n }",
"function setName();",
"function classkit_method_rename($classname, $methodname, $newname)\n{\n}",
"abstract protected function alter_set($name,$value);",
"abstract protected function getName() : string;",
"abstract public function permission(): string;"
] |
[
"0.58524567",
"0.55477744",
"0.5393731",
"0.53905046",
"0.53905046",
"0.53868115",
"0.5351836",
"0.53010565",
"0.52632535",
"0.5144149",
"0.5144149",
"0.5136253",
"0.51346403",
"0.5119247",
"0.5102824",
"0.50811386",
"0.5071315",
"0.50383604",
"0.5016184",
"0.50138885",
"0.4965243",
"0.4962928",
"0.49414086",
"0.4931234",
"0.48988762",
"0.488554",
"0.48699996",
"0.48583445",
"0.4841599",
"0.48412117"
] |
0.5658676
|
1
|
Wraps $expr in parenthesis if $expression is of kind that has lower operator priority than the > operator.
|
private function parenthesizeIfLowerThanArrow(
/*IExpression*/ $expression, /*string*/ $expr) /*: string*/ {
if ($expression instanceof BinaryOpExpression ||
$expression instanceof ClosureExpression ||
$expression instanceof ConditionalExpression ||
$expression instanceof ListAssignmentExpression ||
$expression instanceof NewObjectExpression ||
$expression instanceof UnaryOpExpression) {
$expr = '('.$expr.')';
}
return $expr;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function testOperators()\n {\n $parser = new HTML_Template_Nest_Parser();\n $output = $parser->parse('${some_var + some_other_var}');\n $this->assertEquals(\n \"<?php /* {some_var + some_other_var} */ echo htmlentities(\\$_o(\\$p, 'some_var') + \\$_o(\\$p, 'some_other_var'))?>\", \n $output\n );\n $output = $parser->parse('${some_var < some_other_var}');\n $this->assertEquals(\n \"<?php /* {some_var < some_other_var} */ echo htmlentities(\\$_o(\\$p, 'some_var') < \\$_o(\\$p, 'some_other_var'))?>\", $output\n );\n $output = $parser->parse('${some_var <= some_other_var}');\n $this->assertEquals(\n \"<?php /* {some_var <= some_other_var} */ echo htmlentities(\\$_o(\\$p, 'some_var') <= \\$_o(\\$p, 'some_other_var'))?>\", $output\n );\n $output = $parser->parse('${some_var > some_other_var}');\n $this->assertEquals(\n \"<?php /* {some_var > some_other_var} */ echo htmlentities(\\$_o(\\$p, 'some_var') > \\$_o(\\$p, 'some_other_var'))?>\", $output\n );\n $output = $parser->parse('${some_var >= some_other_var}');\n $this->assertEquals(\n \"<?php /* {some_var >= some_other_var} */ echo htmlentities(\\$_o(\\$p, 'some_var') >= \\$_o(\\$p, 'some_other_var'))?>\", $output\n );\n $output = $parser->parse('${some_var == some_other_var}');\n $this->assertEquals(\n \"<?php /* {some_var == some_other_var} */ echo htmlentities(\\$_o(\\$p, 'some_var') == \\$_o(\\$p, 'some_other_var'))?>\", $output\n );\n $output = $parser->parse('${some_var != some_other_var}');\n $this->assertEquals(\n \"<?php /* {some_var != some_other_var} */ echo htmlentities(\\$_o(\\$p, 'some_var') != \\$_o(\\$p, 'some_other_var'))?>\", $output\n );\n $output = $parser->parse('${(some_var % some_other_var) == 0}');\n $this->assertEquals(\n \"<?php /* {(some_var % some_other_var) == 0} */ echo htmlentities((\\$_o(\\$p, 'some_var') % \\$_o(\\$p, 'some_other_var')) == 0)?>\", $output\n );\n $output = $parser->parse('${some_var / some_other_var}');\n $this->assertEquals(\n \"<?php /* {some_var / some_other_var} */ echo htmlentities(\\$_o(\\$p, 'some_var') / \\$_o(\\$p, 'some_other_var'))?>\", $output\n );\n $output = $parser->parse('${some_var * some_other_var}');\n $this->assertEquals(\n \"<?php /* {some_var * some_other_var} */ echo htmlentities(\\$_o(\\$p, 'some_var') * \\$_o(\\$p, 'some_other_var'))?>\", $output\n );\n $output = $parser->parse('${some_var - some_other_var}');\n $this->assertEquals(\n \"<?php /* {some_var - some_other_var} */ echo htmlentities(\\$_o(\\$p, 'some_var') - \\$_o(\\$p, 'some_other_var'))?>\", $output, \"my name\"\n );\n $output = $parser->parse('${(a + b + c) * (d - 3)}');\n $this->assertEquals(\n \"<?php /* {(a + b + c) * (d - 3)} */ echo htmlentities((\\$_o(\\$p, 'a') + \\$_o(\\$p, 'b') + \\$_o(\\$p, 'c')) * (\\$_o(\\$p, 'd') - 3))?>\", \n $output\n );\n $output = $parser->parse('${(a + b + c) && (d - 3)}');\n $this->assertEquals(\n \"<?php /* {(a + b + c) && (d - 3)} */ echo htmlentities((\\$_o(\\$p, 'a') + \\$_o(\\$p, 'b') + \\$_o(\\$p, 'c')) && (\\$_o(\\$p, 'd') - 3))?>\", \n $output\n );\n $output = $parser->parse('${(a + b + c) || (d - 3)}');\n $this->assertEquals(\n \"<?php /* {(a + b + c) || (d - 3)} */ echo htmlentities((\\$_o(\\$p, 'a') + \\$_o(\\$p, 'b') + \\$_o(\\$p, 'c')) || (\\$_o(\\$p, 'd') - 3))?>\",\n $output\n );\n $output = $parser->parse('${foo == \\'a\\'}');\n $this->assertEquals(\"<?php /* {foo == 'a'} */ echo htmlentities(\\$_o(\\$p, 'foo') == 'a')?>\", $output);\n $output = $parser->parse('${foo == \"b\"}');\n $this->assertEquals(\"<?php /* {foo == \\\"b\\\"} */ echo htmlentities(\\$_o(\\$p, 'foo') == \\\"b\\\")?>\", $output); \n \n $output = $parser->parse('${(foo == \"b\" ? \"black\" : \"red\")}');\n $this->assertEquals(\n \"<?php /* {(foo == \\\"b\\\" ? \\\"black\\\" : \\\"red\\\")} */ echo htmlentities((\\$_o(\\$p, 'foo') == \\\"b\\\" ? \\\"black\\\" : \\\"red\\\"))?>\", \n $output\n ); \n $output = $parser->parseExpression('director->isLoggedIn() && director->isSiteAdmin()');\n $this->assertEquals(\n \"\\$_o(\\$p, 'director')->isLoggedIn() && \\$_o(\\$p, 'director')->isSiteAdmin()\", \n $output\n );\n \n\n $parser->registerVariable(null, \"_field\");\n $output = $parser->parse('${_field->class != \\'\\' ? _field->class : \\'\\'}${(_field->error != \\'\\' ? \\' errored\\' : \\'\\')}');\n $this->assertEquals(\n '<?php /* {_field->class != \\'\\' ? _field->class : \\'\\'} */ echo htmlentities($_field->class != \\'\\' ? $_field->class : \\'\\')?><?php /* {(_field->error != \\'\\' ? \\' errored\\' : \\'\\')} */ echo htmlentities(($_field->error != \\'\\' ? \\' errored\\' : \\'\\'))?>',\n $output);\n $parser->unregisterVariable(null, \"_field\");\n \n }",
"public function expression() {\n\t\t$ret = '';\n\t\t$first = true;\n\t\tforeach($this->children as $child) {\n\t\t\tif(!$first) {\n\t\t\t\t$ret .= '+';\n\t\t\t} else {\n\t\t\t\t$first = false;\n\t\t\t}\n\n\t\t\tif($this->precedence() > $child->precedence()) {\n\t\t\t\t$ret .= \"(\" . $child->expression() . \")\";\n\t\t\t} else {\n\t\t\t\t$ret .= $child->expression();\n\t\t\t}\n\t\t}\n\t\treturn $ret;\n\t}",
"function gt ($value) {\n return '> '.$value;\n }",
"public function globalVarConditionMatchesOnGreaterThanExpression() {}",
"public function globalVarConditionMatchesOnGreaterThanExpression() {}",
"private function postfixExprNeedsParentheses(\n /*UnaryOperator*/ $op, /*IExpression*/ $expr) /* : bool */ {\n if ($expr instanceof ConditionalExpression) {\n // let (expr) == (a ? b : c)\n // (a ? b : c) op != a ? b : c op in all cases\n return true;\n }\n if ($expr instanceof BinaryOpExpression) {\n // let (x) == (a bop b)\n // (a bop b) op != a bop b op if\n if (UnaryOperators::hasPriority($op, $expr->getOperation())) {\n return true;\n }\n // check if a bop (b) op == a bop b op\n return $this->postfixExprNeedsParentheses($op, $expr->getExpression2());\n }\n if ($expr instanceof UnaryOpExpression) {\n switch ($expr->getOperation()) {\n case UnaryOperators::PHP_ARRAY_APPEND_POINT_OP:\n case UnaryOperators::PHP_POST_DECREMENT_OP:\n case UnaryOperators::PHP_POST_INCREMENT_OP:\n // let (expr) == (a uop)\n // (a uop) op == a uop op in all cases\n return false;\n }\n // let (expr) == (uop a)\n // check if uop (a) op == uop a op\n return $this->postfixExprNeedsParentheses($op, $expr->getExpression());\n }\n return false;\n }",
"function wp_pre_kses_less_than_callback( $matches ) {\n\tif ( false === strpos($matches[0], '>') )\n\t\treturn esc_html($matches[0]);\n\treturn $matches[0];\n}",
"private function exprNeedsParentheses(\n /*UnaryOperator*/ $op, /*IExpression*/ $expr) /* : bool */ {\n switch ($op) {\n case UnaryOperators::PHP_ARRAY_APPEND_POINT_OP:\n case UnaryOperators::PHP_POST_DECREMENT_OP:\n case UnaryOperators::PHP_POST_INCREMENT_OP:\n return $this->postfixExprNeedsParentheses($op, $expr);\n }\n return $this->prefixExprNeedsParentheses($op, $expr);\n }",
"function ge ($value) {\n return '>= '.$value;\n }",
"public function getOperators()\n\t{\n\t\treturn array(\n\t\t\tarray(\n\t\t\t\t'!' => array('precedence' => 50, 'class' => 'Twig_Node_Expression_Unary_Not'),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t// precedence settings are copied from similar operators in Twig core extension\n\t\t\t\t'||' => array('precedence' => 10, 'class' => 'Twig_Node_Expression_Binary_Or', 'associativity' => \\Twig_ExpressionParser::OPERATOR_LEFT),\n\t\t\t\t'&&' => array('precedence' => 15, 'class' => 'Twig_Node_Expression_Binary_And', 'associativity' => \\Twig_ExpressionParser::OPERATOR_LEFT),\n\n\t\t\t\t'eq' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_Equal', 'associativity' => \\Twig_ExpressionParser::OPERATOR_LEFT),\n\n\t\t\t\t'ne' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_NotEqual', 'associativity' => \\Twig_ExpressionParser::OPERATOR_LEFT),\n\t\t\t\t'neq' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_NotEqual', 'associativity' => \\Twig_ExpressionParser::OPERATOR_LEFT),\n\t\t\t\t'<>' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_NotEqual', 'associativity' => \\Twig_ExpressionParser::OPERATOR_LEFT),\n\n\t\t\t\t'===' => array('precedence' => 20, 'class' => '\\phpbb\\template\\twig\\node\\expression\\binary\\equalequal', 'associativity' => \\Twig_ExpressionParser::OPERATOR_LEFT),\n\t\t\t\t'!==' => array('precedence' => 20, 'class' => '\\phpbb\\template\\twig\\node\\expression\\binary\\notequalequal', 'associativity' => \\Twig_ExpressionParser::OPERATOR_LEFT),\n\n\t\t\t\t'gt' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_Greater', 'associativity' => \\Twig_ExpressionParser::OPERATOR_LEFT),\n\t\t\t\t'gte' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_GreaterEqual', 'associativity' => \\Twig_ExpressionParser::OPERATOR_LEFT),\n\t\t\t\t'ge' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_GreaterEqual', 'associativity' => \\Twig_ExpressionParser::OPERATOR_LEFT),\n\t\t\t\t'lt' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_Less', 'associativity' => \\Twig_ExpressionParser::OPERATOR_LEFT),\n\t\t\t\t'lte' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_LessEqual', 'associativity' => \\Twig_ExpressionParser::OPERATOR_LEFT),\n\t\t\t\t'le' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_LessEqual', 'associativity' => \\Twig_ExpressionParser::OPERATOR_LEFT),\n\n\t\t\t\t'mod' => array('precedence' => 60, 'class' => 'Twig_Node_Expression_Binary_Mod', 'associativity' => \\Twig_ExpressionParser::OPERATOR_LEFT),\n\t\t\t),\n\t\t);\n\t}",
"private function rightExprNeedsParentheses(\n /*BinaryOperator*/ $op, /*IExpression*/ $expr) /* : bool */ {\n if ($op == BinaryOperators::PHP_ARRAY_ELEMENT) {\n // x[y] == x[(y)]\n return false;\n }\n if ($expr instanceof ConditionalExpression) {\n // let (y) == (a ? b : c)\n // x op (a ? b : c) != x op a ? b : c if\n return $this->rightExprNeedsParentheses(\n $op, $expr->getCondition());\n }\n if ($expr instanceof BinaryOpExpression) {\n // let (y) == (a op1 b)\n // x op (a op1 b) != x op a op1 b if\n if (!BinaryOperators::hasPriority($expr->getOperation(), $op)) {\n return true;\n }\n // check if x op (a) op1 b == x op a op1 b\n return $this->rightExprNeedsParentheses($op, $expr->getExpression1());\n }\n\n // don't worry about unary operations:\n // prefix unaries do not have left operands hence\n // x op (uop a) == x op uop a in all cases.\n // postfix unaries trump binaries that get here hence\n // x op (a uop) == x op a uop in all cases.\n return false;\n }",
"public function greaterThan($value);",
"public function getOperators()\n {\n return array(\n array(\n 'not' => array('precedence' => 50, 'class' => 'Twig_Node_Expression_Unary_Not'),\n '-' => array('precedence' => 500, 'class' => 'Twig_Node_Expression_Unary_Neg'),\n '+' => array('precedence' => 500, 'class' => 'Twig_Node_Expression_Unary_Pos'),\n ),\n array(\n 'or' => array('precedence' => 10, 'class' => 'Twig_Node_Expression_Binary_Or', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n 'and' => array('precedence' => 15, 'class' => 'Twig_Node_Expression_Binary_And', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n 'b-or' => array('precedence' => 16, 'class' => 'Twig_Node_Expression_Binary_BitwiseOr', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n 'b-xor' => array('precedence' => 17, 'class' => 'Twig_Node_Expression_Binary_BitwiseXor', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n 'b-and' => array('precedence' => 18, 'class' => 'Twig_Node_Expression_Binary_BitwiseAnd', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n '==' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_Equal', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n '!=' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_NotEqual', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n '<' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_Less', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n '>' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_Greater', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n '>=' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_GreaterEqual', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n '<=' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_LessEqual', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n 'not in' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_NotIn', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n 'in' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_In', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n '..' => array('precedence' => 25, 'class' => 'Twig_Node_Expression_Binary_Range', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n '+' => array('precedence' => 30, 'class' => 'Twig_Node_Expression_Binary_Add', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n '-' => array('precedence' => 30, 'class' => 'Twig_Node_Expression_Binary_Sub', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n '~' => array('precedence' => 40, 'class' => 'Twig_Node_Expression_Binary_Concat', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n '*' => array('precedence' => 60, 'class' => 'Twig_Node_Expression_Binary_Mul', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n '/' => array('precedence' => 60, 'class' => 'Twig_Node_Expression_Binary_Div', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n '//' => array('precedence' => 60, 'class' => 'Twig_Node_Expression_Binary_FloorDiv', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n '%' => array('precedence' => 60, 'class' => 'Twig_Node_Expression_Binary_Mod', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n 'is' => array('precedence' => 100, 'callable' => array($this, 'parseTestExpression'), 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n 'is not' => array('precedence' => 100, 'callable' => array($this, 'parseNotTestExpression'), 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n '**' => array('precedence' => 200, 'class' => 'Twig_Node_Expression_Binary_Power', 'associativity' => Twig_ExpressionParser::OPERATOR_RIGHT),\n ),\n );\n }",
"public function globalVarConditionMatchesOnGreaterThanOrEqualExpression() {}",
"public function globalVarConditionMatchesOnGreaterThanOrEqualExpression() {}",
"private function leftExprNeedsParentheses(\n /*BinaryOperator*/ $op, /*IExpression*/ $expr) /* : bool */ {\n if ($expr instanceof ConditionalExpression) {\n // let (x) == (a ? b : c)\n // (a ? b : c) op y != a ? b : c op y in all cases\n return true;\n }\n if ($expr instanceof BinaryOpExpression) {\n // let (x) == (a op1 b)\n // (a op1 b) op y != a op1 b op y if\n if (BinaryOperators::hasPriority($op, $expr->getOperation())) {\n return true;\n }\n // check if a op1 (b) op y == a op1 b op y\n return $this->leftExprNeedsParentheses($op, $expr->getExpression2());\n }\n if ($expr instanceof UnaryOpExpression) {\n // let (x) == (!a)\n // (!a) op y != !a op y if\n if ($expr->getOperation() == UnaryOperators::PHP_NOT_OP &&\n BinaryOperators::hasPriority(\n $op, BinaryOperators::PHP_MULTIPLY)) {\n return true;\n }\n // check if !(a) op y == !a op y\n return $this->leftExprNeedsParentheses($op, $expr->getExpression());\n }\n return false;\n }",
"public function inequalityWithCustomOperatorsPrecedenceProvider(): array\n {\n // https://www.postgresql.org/message-id/12603.1424360914%40sss.pgh.pa.us\n return [\n [\n \"j->>'space' <= j->>'node'\",\n new OperatorExpression(\n '<=',\n new OperatorExpression(\n '->>',\n new ColumnReference(new Identifier('j')),\n new StringConstant('space')\n ),\n new OperatorExpression(\n '->>',\n new ColumnReference(new Identifier('j')),\n new StringConstant('node')\n )\n )\n ]\n ];\n }",
"private function prefixExprNeedsParentheses(\n /*UnaryOperator*/ $op, /*IExpression*/ $expr) /* : bool */ {\n if ($expr instanceof ConditionalExpression) {\n // let (expr) == (a ? b : c)\n // op (a ? b : c) != op a ? b : c in all cases\n return true;\n }\n if ($expr instanceof BinaryOpExpression) {\n // let (expr) == (a bop b)\n // op (a bop b) != op a bop b if\n if (UnaryOperators::hasPriority($op, $expr->getOperation())) {\n return true;\n }\n // check if op (a) bop b == op a bop b\n return $this->prefixExprNeedsParentheses($op, $expr->getExpression1());\n }\n if ($expr instanceof UnaryOpExpression) {\n switch ($expr->getOperation()) {\n case UnaryOperators::PHP_ARRAY_APPEND_POINT_OP:\n case UnaryOperators::PHP_POST_DECREMENT_OP:\n case UnaryOperators::PHP_POST_INCREMENT_OP:\n // let (expr) == (a uop)\n // op (a uop) op != op a uop if\n return $op == UnaryOperators::PHP_CLONE_OP;\n }\n // let (expr) == (uop a)\n // op (uop a) == op uop a in all cases\n return false;\n }\n return false;\n }",
"public static function tokenise($expr) {\n $comparison_operators = array(SC_Survey_Flow::CO_EQUAL, SC_Survey_Flow::CO_NOT_EQUAL, SC_Survey_Flow::CO_LT, SC_Survey_Flow::CO_GT, SC_Survey_Flow::CO_LTET, SC_Survey_Flow::CO_GTET);\n\n // Get literals\n $arr = explode(SC_Survey_Flow::LITERAL, $expr);\n $is_literal = FALSE;\n $tokens_all = [];\n foreach ($arr as $l) {\n if (strlen($l) > 0) {\n if ($is_literal !== FALSE) {\n $tokens_all[] = SC_Survey_Flow::LITERAL . $l. SC_Survey_Flow::LITERAL;\n } else { //Not a literal\n //divide into tokens (including comparison expressions)\n $l = str_replace(SC_Survey_Flow::LO_NOT, ' ' . SC_Survey_Flow::LO_NOT . ' ', $l);\n $l = str_replace(SC_Survey_Flow::LO_AND, ' ' . SC_Survey_Flow::LO_AND . ' ', $l);\n $l = str_replace(SC_Survey_Flow::LO_OR, ' ' . SC_Survey_Flow::LO_OR . ' ', $l);\n $l = str_replace(SC_Survey_Flow::OPEN_PAREN, ' ' . SC_Survey_Flow::OPEN_PAREN . ' ', $l);\n $l = str_replace(SC_Survey_Flow::CLOSE_PAREN, ' ' . SC_Survey_Flow::CLOSE_PAREN . ' ', $l);\n $l = str_replace(SC_Survey_Flow::CO_EQUAL, ' ' . SC_Survey_Flow::CO_EQUAL . ' ', $l);\n $l = str_replace(SC_Survey_Flow::CO_LT, ' ' . SC_Survey_Flow::CO_LT . ' ', $l);\n $l = str_replace(SC_Survey_Flow::CO_GT, ' ' . SC_Survey_Flow::CO_GT . ' ', $l);\n $l = str_replace(' < > ', ' ' . SC_Survey_Flow::CO_NOT_EQUAL . ' ', $l);\n $l = str_replace(' < = ', ' ' . SC_Survey_Flow::CO_LTET . ' ', $l);\n $l = str_replace(' > = ', ' ' . SC_Survey_Flow::CO_GTET . ' ', $l);\n $l = trim($l);\n $l = preg_replace('/\\s+/', ' ', $l); //remove all whitespace\n $toks = explode(' ', $l);\n foreach($toks as $t) {\n $tokens_all[] = $t;\n }\n }\n $is_literal = !$is_literal;\n }\n }\n\n //Combine comparison expressions\n $tokens = [];\n for ($i = 0; $i < count($tokens_all); $i++) {\n if (\n $i < count($tokens_all) - 2 &&\n in_array($tokens_all[$i + 1], $comparison_operators)\n ) {\n $tokens[] = $tokens_all[$i].$tokens_all[$i+1].$tokens_all[$i+2];\n $i+=2;\n } else {\n $tokens[] = $tokens_all[$i];\n }\n }\n\n return $tokens;\n }",
"public function expression(){\n try {\n // Sparql11query.g:375:3: ( conditionalOrExpression ) \n // Sparql11query.g:376:3: conditionalOrExpression \n {\n $this->pushFollow(self::$FOLLOW_conditionalOrExpression_in_expression1283);\n $this->conditionalOrExpression();\n\n $this->state->_fsp--;\n\n\n }\n\n }\n catch (RecognitionException $re) {\n $this->reportError($re);\n $this->recover($this->input,$re);\n }\n catch(Exception $e) {\n throw $e;\n }\n \n return ;\n }",
"function greater_than($right): Closure\n{\n return function ($left) use ($right) {\n return $left > $right;\n };\n}",
"public function gt($value)\n {\n \n //Extract the raw value.\n raw($value);\n \n //Return the result of is() with a great than check.\n return $this->is($this->value > $value);\n \n }",
"public function getExpression(): string\n {\n if ($this->wrapMode > 0) {\n return ($this->wrapMode === static::WRAP_IN_TAGS ? '<?php ' : '<?= ') . $this->expression . ' ?>';\n }\n\n return $this->expression;\n }",
"protected function parseOperand()\n {\n $negate = false;\n if ($this->peekChar('@', 1) || $this->peekChar('(', 1)) {\n $negate = $this->matchChar('-');\n }\n\n $o = $this->matchFuncs(array(\n 'parseSubExpression',\n 'parseEntitiesDimension',\n 'parseEntitiesColor',\n 'parseEntitiesVariable',\n 'parseEntitiesCall'\n ));\n\n if ($negate) {\n $o->parensInOp = true;\n $o = new ILess_Node_Negative($o);\n }\n\n return $o;\n }",
"private function evalgreaterthanorequal($value, $data){\n\t\t\treturn (bool) $passed = ($data >= $value) ? true : false;\n\t\t}",
"function o_gt($a, $b) {\n\t\t\treturn Obj::singleton()->greaterThan($a, $b);\n\t\t}",
"public function build(ExpressionInterface $expression, array &$params = []): string\n {\n $operand = $expression->getCondition();\n if ($operand === '') {\n return '';\n }\n\n $expession = $this->queryBuilder->buildCondition($operand, $params);\n\n return \"{$this->getNegationOperator()} ($expession)\";\n }",
"protected function operatorExpression(Operator $node): void\n {\n $driver = $this->entitySet->getDriver();\n $left = $node->getLeftNode();\n $right = $node->getRightNode();\n\n switch (true) {\n case $node instanceof Not_:\n $this->pushStatement('(');\n $this->pushStatement('NOT');\n $this->evaluate($left);\n $this->pushStatement(')');\n return;\n\n case $node instanceof In:\n $this->evaluate($left);\n $this->pushStatement('IN');\n $this->pushStatement('(');\n $this->addCommaSeparatedArguments($node);\n $this->pushStatement(')');\n return;\n }\n\n if ($driver === SQLEntitySet::PostgreSQL && ($node instanceof Div || $node instanceof Mod)) {\n switch (true) {\n case $node instanceof Div:\n $this->pushStatement('DIV(');\n break;\n\n case $node instanceof Mod:\n $this->pushStatement('MOD(');\n break;\n }\n\n $this->pushStatement('CAST(');\n $this->evaluate($left);\n $this->pushStatement('AS NUMERIC )');\n $this->pushComma();\n $this->pushStatement('CAST(');\n $this->evaluate($right);\n $this->pushStatement('AS NUMERIC )');\n $this->pushStatement(')');\n return;\n }\n\n $this->pushStatement('(');\n $this->evaluate($left);\n\n if (\n !$node instanceof Comparison\n && (\n $left instanceof StartsWith\n || $left instanceof EndsWith\n || $left instanceof Contains\n || $right instanceof StartsWith\n || $right instanceof EndsWith\n || $right instanceof Contains\n )\n ) {\n if (!($node instanceof Equal && $right instanceof Boolean && $right->getValue()->get() === true)) {\n throw new BadRequestException(\n 'This entity set does not support expression operators with startswith, endswith, contains other than x eq true'\n );\n }\n\n $this->pushStatement(')');\n return;\n }\n\n switch (true) {\n case $node instanceof Div:\n switch ($driver) {\n case SQLEntitySet::MySQL:\n $this->pushStatement('DIV');\n break;\n\n default:\n $node->notImplemented();\n }\n break;\n\n case $node instanceof Add:\n $this->pushStatement('+');\n break;\n\n case $node instanceof DivBy:\n $this->pushStatement('/');\n break;\n\n case $node instanceof Mod:\n switch ($driver) {\n case SQLEntitySet::SQLServer:\n $node->notImplemented();\n\n default:\n $this->pushStatement('%');\n break;\n }\n break;\n\n case $node instanceof Mul:\n $this->pushStatement('*');\n break;\n\n case $node instanceof Sub:\n $this->pushStatement('-');\n break;\n\n case $node instanceof And_:\n $this->pushStatement('AND');\n break;\n\n case $node instanceof Or_:\n $this->pushStatement('OR');\n break;\n\n case $node instanceof Equal:\n if ($right instanceof Literal && $right->getValue() === null) {\n $this->pushStatement('IS NULL )');\n return;\n }\n\n $this->pushStatement('=');\n break;\n\n case $node instanceof GreaterThan:\n $this->pushStatement('>');\n break;\n\n case $node instanceof GreaterThanOrEqual:\n $this->pushStatement('>=');\n break;\n\n case $node instanceof LessThan:\n $this->pushStatement('<');\n break;\n\n case $node instanceof LessThanOrEqual:\n $this->pushStatement('<=');\n break;\n\n case $node instanceof NotEqual:\n if ($right instanceof Literal && $right->getValue() === null) {\n $this->pushStatement('IS NOT NULL )');\n return;\n }\n\n $this->pushStatement('!=');\n break;\n\n case $node instanceof Has:\n $enum = $right->getValue();\n if ($enum instanceof Type\\Enum && $enum->isFlags()) {\n $this->pushStatement('&');\n $this->evaluate($right);\n }\n\n $this->pushStatement('=');\n $this->evaluate($right);\n $this->pushStatement(')');\n return;\n\n default:\n $node->notImplemented();\n }\n\n $this->evaluate($right);\n $this->pushStatement(')');\n }",
"public function testPrecedenceIsInValidRange()\n {\n foreach ( $this->operators as $operator )\n {\n self::assertThat( $operator->precedence, self::greaterThan( 0 ), \"Precendence for operator <\" . get_class( $operator ) . \"> must be 1 or higher.\" );\n }\n }",
"function gt($x, $y, $and=null, ...$args)\n {\n $expression = array();\n array_push($expression, $x, GT, $y, $and, ...$args);\n return $expression;\n }"
] |
[
"0.5813357",
"0.55934614",
"0.5585352",
"0.55403376",
"0.55403376",
"0.55311126",
"0.5431957",
"0.5394979",
"0.53642815",
"0.53255576",
"0.5269228",
"0.5247928",
"0.5142336",
"0.5140219",
"0.51400787",
"0.51354295",
"0.51043004",
"0.5066706",
"0.50508106",
"0.5046349",
"0.5043839",
"0.49455458",
"0.49374875",
"0.49366513",
"0.49107093",
"0.48835033",
"0.48676518",
"0.48505402",
"0.48409966",
"0.48275003"
] |
0.61106426
|
0
|
Returns true the given postfix unary operation has a higher priority than some operation in the given expression. In other words, if (expr) op != expr op, return true.
|
private function postfixExprNeedsParentheses(
/*UnaryOperator*/ $op, /*IExpression*/ $expr) /* : bool */ {
if ($expr instanceof ConditionalExpression) {
// let (expr) == (a ? b : c)
// (a ? b : c) op != a ? b : c op in all cases
return true;
}
if ($expr instanceof BinaryOpExpression) {
// let (x) == (a bop b)
// (a bop b) op != a bop b op if
if (UnaryOperators::hasPriority($op, $expr->getOperation())) {
return true;
}
// check if a bop (b) op == a bop b op
return $this->postfixExprNeedsParentheses($op, $expr->getExpression2());
}
if ($expr instanceof UnaryOpExpression) {
switch ($expr->getOperation()) {
case UnaryOperators::PHP_ARRAY_APPEND_POINT_OP:
case UnaryOperators::PHP_POST_DECREMENT_OP:
case UnaryOperators::PHP_POST_INCREMENT_OP:
// let (expr) == (a uop)
// (a uop) op == a uop op in all cases
return false;
}
// let (expr) == (uop a)
// check if uop (a) op == uop a op
return $this->postfixExprNeedsParentheses($op, $expr->getExpression());
}
return false;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private function prefixExprNeedsParentheses(\n /*UnaryOperator*/ $op, /*IExpression*/ $expr) /* : bool */ {\n if ($expr instanceof ConditionalExpression) {\n // let (expr) == (a ? b : c)\n // op (a ? b : c) != op a ? b : c in all cases\n return true;\n }\n if ($expr instanceof BinaryOpExpression) {\n // let (expr) == (a bop b)\n // op (a bop b) != op a bop b if\n if (UnaryOperators::hasPriority($op, $expr->getOperation())) {\n return true;\n }\n // check if op (a) bop b == op a bop b\n return $this->prefixExprNeedsParentheses($op, $expr->getExpression1());\n }\n if ($expr instanceof UnaryOpExpression) {\n switch ($expr->getOperation()) {\n case UnaryOperators::PHP_ARRAY_APPEND_POINT_OP:\n case UnaryOperators::PHP_POST_DECREMENT_OP:\n case UnaryOperators::PHP_POST_INCREMENT_OP:\n // let (expr) == (a uop)\n // op (a uop) op != op a uop if\n return $op == UnaryOperators::PHP_CLONE_OP;\n }\n // let (expr) == (uop a)\n // op (uop a) == op uop a in all cases\n return false;\n }\n return false;\n }",
"private function rightExprNeedsParentheses(\n /*BinaryOperator*/ $op, /*IExpression*/ $expr) /* : bool */ {\n if ($op == BinaryOperators::PHP_ARRAY_ELEMENT) {\n // x[y] == x[(y)]\n return false;\n }\n if ($expr instanceof ConditionalExpression) {\n // let (y) == (a ? b : c)\n // x op (a ? b : c) != x op a ? b : c if\n return $this->rightExprNeedsParentheses(\n $op, $expr->getCondition());\n }\n if ($expr instanceof BinaryOpExpression) {\n // let (y) == (a op1 b)\n // x op (a op1 b) != x op a op1 b if\n if (!BinaryOperators::hasPriority($expr->getOperation(), $op)) {\n return true;\n }\n // check if x op (a) op1 b == x op a op1 b\n return $this->rightExprNeedsParentheses($op, $expr->getExpression1());\n }\n\n // don't worry about unary operations:\n // prefix unaries do not have left operands hence\n // x op (uop a) == x op uop a in all cases.\n // postfix unaries trump binaries that get here hence\n // x op (a uop) == x op a uop in all cases.\n return false;\n }",
"private function exprNeedsParentheses(\n /*UnaryOperator*/ $op, /*IExpression*/ $expr) /* : bool */ {\n switch ($op) {\n case UnaryOperators::PHP_ARRAY_APPEND_POINT_OP:\n case UnaryOperators::PHP_POST_DECREMENT_OP:\n case UnaryOperators::PHP_POST_INCREMENT_OP:\n return $this->postfixExprNeedsParentheses($op, $expr);\n }\n return $this->prefixExprNeedsParentheses($op, $expr);\n }",
"private function leftExprNeedsParentheses(\n /*BinaryOperator*/ $op, /*IExpression*/ $expr) /* : bool */ {\n if ($expr instanceof ConditionalExpression) {\n // let (x) == (a ? b : c)\n // (a ? b : c) op y != a ? b : c op y in all cases\n return true;\n }\n if ($expr instanceof BinaryOpExpression) {\n // let (x) == (a op1 b)\n // (a op1 b) op y != a op1 b op y if\n if (BinaryOperators::hasPriority($op, $expr->getOperation())) {\n return true;\n }\n // check if a op1 (b) op y == a op1 b op y\n return $this->leftExprNeedsParentheses($op, $expr->getExpression2());\n }\n if ($expr instanceof UnaryOpExpression) {\n // let (x) == (!a)\n // (!a) op y != !a op y if\n if ($expr->getOperation() == UnaryOperators::PHP_NOT_OP &&\n BinaryOperators::hasPriority(\n $op, BinaryOperators::PHP_MULTIPLY)) {\n return true;\n }\n // check if !(a) op y == !a op y\n return $this->leftExprNeedsParentheses($op, $expr->getExpression());\n }\n return false;\n }",
"public function testPrecedenceIsInValidRange()\n {\n foreach ( $this->operators as $operator )\n {\n self::assertThat( $operator->precedence, self::greaterThan( 0 ), \"Precendence for operator <\" . get_class( $operator ) . \"> must be 1 or higher.\" );\n }\n }",
"public function isOperator()\n {\n return\n $this->type === 'plus' ||\n $this->type === 'minus' ||\n $this->type === 'slash' ||\n $this->type === 'star';\n }",
"function sql_is_compare_operator($op){\n\treturn in_array($op, array('=', 'LIKE', 'NOT LIKE', 'NOT', '<>'));\n}",
"public static function isGreaterThan($left_operand, $right_operand, $precision = null)\n {\n $result = self::compare($left_operand, $right_operand, $precision);\n\n return $result === 1;\n }",
"public static function isGreaterThanOrEqual($left_operand, $right_operand, $precision = null)\n {\n $result = self::compare($left_operand, $right_operand, $precision);\n\n return $result === 1 || $result === 0;\n }",
"protected function isOperatorExpression($expression)\n {\n if (\n !is_array($expression) ||\n count($expression) !== 2 ||\n !isset($expression[0], $expression[1])\n ) {\n return false;\n }\n\n [$operator, $count] = $expression;\n\n return $this->isBasicOperator($operator) && is_numeric($count);\n }",
"public function isHighestPriority(): bool;",
"public function testEvaluateTooManyOperators()\n {\n $calc = new ReversePolishCalculator();\n $retval = $calc->evaluate(\"3 2 1 + * /\");\n $this->assertEquals(9, $retval);\n }",
"public function isUnaryPredecessorOperator(int $index): bool\n {\n static $potentialSuccessorOperator = [T_INC, T_DEC];\n\n static $potentialBinaryOperator = ['+', '-', '&', [CT::T_RETURN_REF]];\n\n static $otherOperators;\n\n if (null === $otherOperators) {\n $otherOperators = ['!', '~', '@', [T_ELLIPSIS]];\n }\n\n static $disallowedPrevTokens;\n\n if (null === $disallowedPrevTokens) {\n $disallowedPrevTokens = [\n ']',\n '}',\n ')',\n '\"',\n '`',\n [CT::T_ARRAY_SQUARE_BRACE_CLOSE],\n [CT::T_ARRAY_INDEX_CURLY_BRACE_CLOSE],\n [CT::T_DYNAMIC_PROP_BRACE_CLOSE],\n [CT::T_DYNAMIC_VAR_BRACE_CLOSE],\n [T_CLASS_C],\n [T_CONSTANT_ENCAPSED_STRING],\n [T_DEC],\n [T_DIR],\n [T_DNUMBER],\n [T_FILE],\n [T_FUNC_C],\n [T_INC],\n [T_LINE],\n [T_LNUMBER],\n [T_METHOD_C],\n [T_NS_C],\n [T_STRING],\n [T_TRAIT_C],\n [T_VARIABLE],\n ];\n }\n\n $tokens = $this->tokens;\n $token = $tokens[$index];\n\n if ($token->isGivenKind($potentialSuccessorOperator)) {\n return !$this->isUnarySuccessorOperator($index);\n }\n\n if ($token->equalsAny($otherOperators)) {\n return true;\n }\n\n if (!$token->equalsAny($potentialBinaryOperator)) {\n return false;\n }\n\n $prevToken = $tokens[$tokens->getPrevMeaningfulToken($index)];\n\n if (!$prevToken->equalsAny($disallowedPrevTokens)) {\n return true;\n }\n\n if (!$token->equals('&') || !$prevToken->isGivenKind(T_STRING)) {\n return false;\n }\n\n static $searchTokens = [\n ';',\n '{',\n '}',\n [T_FUNCTION],\n [T_OPEN_TAG],\n [T_OPEN_TAG_WITH_ECHO],\n ];\n $prevToken = $tokens[$tokens->getPrevTokenOfKind($index, $searchTokens)];\n\n return $prevToken->isGivenKind(T_FUNCTION);\n }",
"public function hasOperator(string $token): bool;",
"private function isValidUnaryOperator($value)\n\t{\n\t\treturn array_key_exists($value, $this->unary_operators);\n\t}",
"protected function is_operator($node) {\n return !($node->type == qtype_preg_node::TYPE_LEAF_CHARSET\n || $node->type == qtype_preg_node::TYPE_LEAF_ASSERT\n || $node->type == qtype_preg_node::TYPE_LEAF_META\n || $node->type == qtype_preg_node::TYPE_LEAF_BACKREF\n || $node->type == qtype_preg_node::TYPE_LEAF_SUBEXPR_CALL\n || $node->type == qtype_preg_node::TYPE_LEAF_TEMPLATE\n || $node->type == qtype_preg_node::TYPE_LEAF_CONTROL\n || $node->type == qtype_preg_node::TYPE_LEAF_OPTIONS\n || $node->type == qtype_preg_node::TYPE_LEAF_COMPLEX_ASSERT);\n }",
"public function testEvaluateTooManyOperands()\n {\n $calc = new ReversePolishCalculator();\n $retval = $calc->evaluate(\"4 3 2 1 + *\");\n $this->assertEquals(false, $retval);\n }",
"public function containsOperators() {\n\t\t$pattern = [];\n\t\tforeach ( $this->wildcardingOperators as $op ) {\n\t\t\t$pattern[] = \"\\\\$op\";\n\t\t}\n\t\t$pattern = \"/\" . implode( '|', $pattern ) . \"/\";\n\n\t\tif ( preg_match( $pattern, $this->original ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Special operators should not be removable by config\n\t\tif ( strpos( $this->original, 'AND' ) || strpos( $this->original, 'OR' ) ) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public function precedence() {\n\t\treturn 1;\n\t}",
"public function hasPostfix()\n\t{\n\t\treturn $this->postfix !== null;\n\t}",
"public static function IsPriorityOpcode(int $opcode) : bool {\n\n /*\n * Note:\n * We do not consider the opcode for CLOSE to be a priority since this would cause us to send the close frame before finishing our queue\n * In those cases it can be possible for the remote site to read both a close and another frame at the same time and process them in that order\n * That in return causes it to effectively receive a message from a closed connection\n */\n\n return $opcode !== self::OPCODE_CLOSE_CONNECTION && self::IsControlOpcode($opcode);\n }",
"public function testPrecedenceIsInteger()\n {\n foreach ( $this->operators as $operator )\n {\n self::assertThat( $operator->precedence, self::isType( 'integer' ), \"Precendence for operator <\" . get_class( $operator ) . \"> must be an integer.\" );\n }\n }",
"public function evaluatePostfix($postfix) {\n// echo \"\\n postfix \\n\";\n// print_r($postfix);\n// echo \"\\n\";\n if(empty($postfix)) {\n throw new Exception(\"cannot calculate\");\n }\n\n $stack = array();\n foreach($postfix as $char) {\n// echo \"\\n\";\n// print_r($stack);\n// echo \"\\n\";\n // If the token is a value\n if(is_numeric($char)) {\n // Push it onto the stack\n $stack[] = $char;\n } else { // ok this is an operator\n // all operations are binary, so check if stack has at least 2 numbers\n if(count($stack) > 1) {\n $operator = $char;\n $operation = $this->getOperation($operator);\n // pop top 2 numbers from the stack\n $a = array_pop($stack);\n $b = array_pop($stack);\n // perform operation\n $result = $this->$operation($b, $a);\n// echo \"\\neval $b $operation $a = $result\\n\";\n // push the result on the stack\n $stack[] = $result;\n }\n }\n }\n\n if(count($stack) > 1) {\n echo \"\\nsomething is wrong \";\n print_r($stack);\n echo \"\\n\";\n }\n else {\n return $stack[0];\n }\n }",
"function nfx($expr) {\n \n $expr = $this->checkVector($expr);\n \n $index = 0;\n $stack = new EvalMathStack;\n $output = array(); // postfix form of expression, to be passed to pfx()\n $expr = trim(mb_strtolower($expr));\n \n $ops = array('+', '-', '*', '/', '^', '_');\n $ops_r = array('+'=>0,'-'=>0,'*'=>0,'/'=>0,'^'=>1); // right-associative operator? \n $ops_p = array('+'=>0,'-'=>0,'*'=>1,'/'=>1,'_'=>1,'^'=>2); // operator precedence\n \n $expecting_op = false; // we use this in syntax-checking the expression\n // and determining when a - is a negation\n \n if (preg_match(\"/[^a-zа-я0-9\\s+*^\\/()\\.,-]/u\", $expr, $matches)) { // make sure the characters are all good\n return $this->trigger(\"illegal character '{$matches[0]}' at expression '{$expr}'\");\n }\n while(1) { // 1 Infinite Loop ;)\n $op = substr($expr, $index, 1); // get the first character at the current index\n // find out if we're currently at the beginning of a number/variable/function/parenthesis/operand\n $ex = preg_match('/^([a-zа-я][a-zа-я0-9]*\\(?|\\d+(?:\\.\\d*)?|\\.\\d+|\\()/u', substr($expr, $index), $match);\n //===============\n if ($op == '-' and !$expecting_op) { // is it a negation instead of a minus?\n $stack->push('_'); // put a negation on the stack\n $index++;\n } elseif ($op == '_') { // we have to explicitly deny this, because it's legal on the stack \n return $this->trigger(\"illegal character '_'\"); // but not in the input expression\n //===============\n } elseif ((in_array($op, $ops) or $ex) and $expecting_op) { // are we putting an operator on the stack?\n if ($ex) { // are we expecting an operator but have a number/variable/function/opening parethesis?\n return $this->trigger(\"expecting operand\");\n //$op = '*'; $index--; // it's an implicit multiplication\n }\n // heart of the algorithm:\n while($stack->count > 0 and ($o2 = $stack->last()) and in_array($o2, $ops) and ($ops_r[$op] ? $ops_p[$op] < $ops_p[$o2] : $ops_p[$op] <= $ops_p[$o2])) {\n $output[] = $stack->pop(); // pop stuff off the stack into the output\n }\n // many thanks: http://en.wikipedia.org/wiki/Reverse_Polish_notation#The_algorithm_in_detail\n $stack->push($op); // finally put OUR operator onto the stack\n $index++;\n $expecting_op = false;\n //===============\n } elseif ($op == ')' and $expecting_op) { // ready to close a parenthesis?\n while (($o2 = $stack->pop()) != '(') { // pop off the stack back to the last (\n if (is_null($o2)) return $this->trigger(\"unexpected ')'\");\n else $output[] = $o2;\n }\n if (preg_match(\"/^([a-zа-я][a-zа-я0-9]*)\\($/u\", $stack->last(2), $matches)) { // did we just close a function?\n $fnn = $matches[1]; // get the function name\n $arg_count = $stack->pop(); // see how many arguments there were (cleverly stored on the stack, thank you)\n $fn = $stack->pop();\n $output[] = array('fn'=>$fn, 'fnn'=>$fnn, 'argcount'=>$arg_count); // send function to output\n if (in_array($fnn, self::$fb)) { // check the argument count\n if($arg_count > 1)\n return $this->trigger(\"too many arguments ($arg_count given, 1 expected)\");\n } elseif (array_key_exists($fnn, self::$fc)) {\n $counts = self::$fc[$fnn];\n if (in_array(-1, $counts) and $arg_count > 0) {}\n elseif (in_array(-2, $counts)) { if ($arg_count % 2 !== 0) { $this->trigger(\"wrong number of arguments ($arg_count given, even expected)\"); } }\n elseif (!in_array($arg_count, $counts))\n return $this->trigger(\"wrong number of arguments ($arg_count given, \" . implode('/',self::$fc[$fnn]) . \" expected)\");\n } elseif (array_key_exists($fnn, $this->f)) {\n if ($arg_count != count($this->f[$fnn]['args']))\n return $this->trigger(\"wrong number of arguments ($arg_count given, \" . count($this->f[$fnn]['args']) . \" expected)\");\n } else { // did we somehow push a non-function on the stack? this should never happen\n return $this->trigger(\"internal error\");\n }\n }\n $index++;\n //===============\n } elseif ($op == ',' and $expecting_op) { // did we just finish a function argument?\n while (($o2 = $stack->pop()) != '(') { \n if (is_null($o2)) return $this->trigger(\"unexpected ','\"); // oops, never had a (\n else $output[] = $o2; // pop the argument expression stuff and push onto the output\n }\n // make sure there was a function\n if (!preg_match(\"/^([a-zа-я][a-zа-я0-9]*)\\($/u\", $stack->last(2), $matches))\n return $this->trigger(\"unexpected ','\");\n $stack->push($stack->pop()+1); // increment the argument count\n $stack->push('('); // put the ( back on, we'll need to pop back to it again\n $index++;\n $expecting_op = false;\n //===============\n } elseif ($op == '(' and !$expecting_op) {\n $stack->push('('); // that was easy\n $index++;\n $allow_neg = true;\n //===============\n } elseif ($ex and !$expecting_op) { // do we now have a function/variable/number?\n $expecting_op = true;\n $val = $match[1];\n if (preg_match(\"/^([a-zа-я][a-zа-я0-9]*)\\($/u\", $val, $matches)) { // may be func, or variable w/ implicit multiplication against parentheses...\n if (in_array($matches[1], self::$fb) or array_key_exists($matches[1], $this->f) or array_key_exists($matches[1], self::$fc)) { // it's a func\n $stack->push($val);\n $stack->push(1);\n $stack->push('(');\n $expecting_op = false;\n } else { // it's a var w/ implicit multiplication\n $val = $matches[1];\n $output[] = $val;\n }\n } else { // it's a plain old var or num\n $output[] = $val;\n }\n $index += strlen($val);\n //===============\n } elseif ($op == ')') {\n //it could be only custom function with no params or general error\n if ($stack->last() != '(' or $stack->last(2) != 1) return $this->trigger(\"unexpected ')'\");\n if (preg_match(\"/^([a-zа-я][a-zа-я0-9]*)\\($/u\", $stack->last(3), $matches)) { // did we just close a function?\n $stack->pop();// (\n $stack->pop();// 1\n $fn = $stack->pop();\n $fnn = $matches[1]; // get the function name\n $counts = self::$fc[$fnn];\n if (!in_array(0, $counts))\n return $this->trigger(\"wrong number of arguments (... given, \" . implode('/',self::$fc[$fnn]) . \" expected) at expr: '$expr'\");\n $output[] = array('fn'=>$fn, 'fnn'=>$fnn, 'argcount'=>0); // send function to output\n $index++;\n } else {\n return $this->trigger(\"unexpected ')'\");\n }\n //===============\n } elseif (in_array($op, $ops) and !$expecting_op) { // miscellaneous error checking\n return $this->trigger(\"unexpected operator '$op'\");\n } else { // I don't even want to know what you did to get here\n return $this->trigger(\"an unexpected error occured at expression: \".$expr);\n }\n if ($index == strlen($expr)) {\n if (in_array($op, $ops)) { // did we end with an operator? bad.\n return $this->trigger(\"operator '$op' lacks operand\");\n } else {\n break;\n }\n }\n while (substr($expr, $index, 1) == ' ') { // step the index past whitespace (pretty much turns whitespace \n $index++; // into implicit multiplication if no operator is there)\n }\n \n } \n while (!is_null($op = $stack->pop())) { // pop everything off the stack and push onto output\n if ($op == '(') return $this->trigger(\"expecting ')'\"); // if there are (s on the stack, ()s were unbalanced\n $output[] = $op;\n }\n return $output;\n }",
"private function comparison(Token $op, &$args) {\n\t\tif (count($args) < 2) {\n\t\t\tthrow new \\Exception(\"Illegal number (\".count($args).\") of operands for \" . $op);\n\t\t}\n\t\t$arg2 = array_pop($args);\n\t\t$arg1 = array_pop($args);\n\t\tif ($arg1->isVariable() || $arg2->isVariable()) {\n\t\t\t$result = new Token(Token::T_UNDEFINED, array($arg1, $arg2));\n\t\t} elseif ($op->type != Token::T_CONTAINS && ! $this->compatible($arg1, $arg2)) { \n\t\t\tthrow new \\Exception(\"operand types for '\" . $op. \"' are not identical\");\n\t\t} elseif ($op->type == Token::T_CONTAINS && $arg1->type != Token::T_ARRAY) { \n\t\t\tthrow new \\Exception(\"first operand type for '\" . $op. \"' is not an array\");\n\t\t} else {\n\t\t\t$result = new Token(Token::T_BOOLEAN, false);\n\t\t\tswitch ($op->type) {\n\t\t\t\tcase Token::T_EQUAL:\n\t\t\t\t\t$result->value = ($arg1->value == $arg2->value);\n\t\t\t\t\tbreak;\n\t\t\t\tcase Token::T_NOT_EQUAL:\n\t\t\t\t\t$result->value = ($arg1->value != $arg2->value);\n\t\t\t\t\tbreak;\n\t\t\t\tcase Token::T_LESS_THAN:\n\t\t\t\t\t$result->value = ($arg1->value < $arg2->value);\n\t\t\t\t\tbreak;\n\t\t\t\tcase Token::T_LESS_OR_EQUAL:\n\t\t\t\t\t$result->value = ($arg1->value <= $arg2->value);\n\t\t\t\t\tbreak;\n\t\t\t\tcase Token::T_GREATER_THAN:\n\t\t\t\t\t$result->value = ($arg1->value > $arg2->value);\n\t\t\t\t\tbreak;\n\t\t\t\tcase Token::T_GREATER_OR_EQUAL:\n\t\t\t\t\t$result->value = ($arg1->value >= $arg2->value);\n\t\t\t\t\tbreak;\n\t\t\t\tcase Token::T_CONTAINS:\n\t\t\t\t\t$result->value = is_array($arg1->value) && in_array($arg2->value, $arg1->value);\n\t\t\t\t\tbreak;\n\t\t\t\tcase Token::T_NOT_CONTAINS:\n\t\t\t\t\t$result->value = ! is_array($arg1->value) || ! in_array($arg2->value, $arg1->value);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn $result;\n\t}",
"private function evalgreaterthanorequal($value, $data){\n\t\t\treturn (bool) $passed = ($data >= $value) ? true : false;\n\t\t}",
"public function isBinaryOperator(int $index): bool\n {\n static $nonArrayOperators = [\n '=' => true,\n '*' => true,\n '/' => true,\n '%' => true,\n '<' => true,\n '>' => true,\n '|' => true,\n '^' => true,\n '.' => true,\n ];\n\n static $potentialUnaryNonArrayOperators = [\n '+' => true,\n '-' => true,\n '&' => true,\n ];\n\n static $arrayOperators;\n\n if (null === $arrayOperators) {\n $arrayOperators = [\n T_AND_EQUAL => true, // &=\n T_BOOLEAN_AND => true, // &&\n T_BOOLEAN_OR => true, // ||\n T_CONCAT_EQUAL => true, // .=\n T_DIV_EQUAL => true, // /=\n T_DOUBLE_ARROW => true, // =>\n T_IS_EQUAL => true, // ==\n T_IS_GREATER_OR_EQUAL => true, // >=\n T_IS_IDENTICAL => true, // ===\n T_IS_NOT_EQUAL => true, // !=, <>\n T_IS_NOT_IDENTICAL => true, // !==\n T_IS_SMALLER_OR_EQUAL => true, // <=\n T_LOGICAL_AND => true, // and\n T_LOGICAL_OR => true, // or\n T_LOGICAL_XOR => true, // xor\n T_MINUS_EQUAL => true, // -=\n T_MOD_EQUAL => true, // %=\n T_MUL_EQUAL => true, // *=\n T_OR_EQUAL => true, // |=\n T_PLUS_EQUAL => true, // +=\n T_POW => true, // **\n T_POW_EQUAL => true, // **=\n T_SL => true, // <<\n T_SL_EQUAL => true, // <<=\n T_SR => true, // >>\n T_SR_EQUAL => true, // >>=\n T_XOR_EQUAL => true, // ^=\n T_SPACESHIP => true, // <=>\n T_COALESCE => true, // ??\n T_COALESCE_EQUAL => true, // ??=\n ];\n }\n\n $tokens = $this->tokens;\n $token = $tokens[$index];\n\n if ($token->isGivenKind([T_INLINE_HTML, T_ENCAPSED_AND_WHITESPACE, CT::T_TYPE_INTERSECTION])) {\n return false;\n }\n\n if (isset($potentialUnaryNonArrayOperators[$token->getContent()])) {\n return !$this->isUnaryPredecessorOperator($index);\n }\n\n if ($token->isArray()) {\n return isset($arrayOperators[$token->getId()]);\n }\n\n if (isset($nonArrayOperators[$token->getContent()])) {\n return true;\n }\n\n return false;\n }",
"public function testAllPrecedencesHasNoGaps()\n {\n $levels = array();\n $min = false;\n $max = false;\n foreach ( $this->operators as $operator )\n {\n $levels[$operator->precedence] = true;\n if ( $max === false ||\n $operator->precedence > $max )\n $max = $operator->precedence;\n if ( $min === false ||\n $operator->precedence < $min )\n $min = $operator->precedence;\n }\n ksort( $levels );\n self::assertThat( count( $levels ), self::greaterThan( 1 ), \"Level list did not even fill two items\" );\n for ( $i = $min; $i <= $max; ++$i )\n {\n // We skip level 2 which is the ?: operator which is not supported\n if ( $i == 2 )\n {\n continue;\n }\n $this->assertArrayHasKey( $i, $levels );\n }\n }",
"private static function isOperator($operator)\n {\n if ($operator instanceof Number) {\n return false;\n }\n $has = false;\n foreach (self::getOperators() as $op) {\n if ($operator === $op) {\n $has = true;\n break;\n }\n }\n\n return $has;\n }",
"public function hasAddOrSubtract(){\n return $this->_has(7);\n }"
] |
[
"0.6646732",
"0.6578795",
"0.6396664",
"0.61517715",
"0.59130496",
"0.5788302",
"0.57805884",
"0.56310827",
"0.55813426",
"0.5580236",
"0.5572435",
"0.557081",
"0.5517231",
"0.55018616",
"0.5499538",
"0.5454908",
"0.54371434",
"0.5394349",
"0.5392754",
"0.527809",
"0.52590775",
"0.5238614",
"0.5212704",
"0.51615804",
"0.51513946",
"0.5137158",
"0.5130476",
"0.5123371",
"0.5115945",
"0.5108901"
] |
0.73655844
|
0
|
Returns true the given prefix unary operation has a higher priority than some operation in the given expression. In other words, if op (expr) != op expr, return true.
|
private function prefixExprNeedsParentheses(
/*UnaryOperator*/ $op, /*IExpression*/ $expr) /* : bool */ {
if ($expr instanceof ConditionalExpression) {
// let (expr) == (a ? b : c)
// op (a ? b : c) != op a ? b : c in all cases
return true;
}
if ($expr instanceof BinaryOpExpression) {
// let (expr) == (a bop b)
// op (a bop b) != op a bop b if
if (UnaryOperators::hasPriority($op, $expr->getOperation())) {
return true;
}
// check if op (a) bop b == op a bop b
return $this->prefixExprNeedsParentheses($op, $expr->getExpression1());
}
if ($expr instanceof UnaryOpExpression) {
switch ($expr->getOperation()) {
case UnaryOperators::PHP_ARRAY_APPEND_POINT_OP:
case UnaryOperators::PHP_POST_DECREMENT_OP:
case UnaryOperators::PHP_POST_INCREMENT_OP:
// let (expr) == (a uop)
// op (a uop) op != op a uop if
return $op == UnaryOperators::PHP_CLONE_OP;
}
// let (expr) == (uop a)
// op (uop a) == op uop a in all cases
return false;
}
return false;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private function postfixExprNeedsParentheses(\n /*UnaryOperator*/ $op, /*IExpression*/ $expr) /* : bool */ {\n if ($expr instanceof ConditionalExpression) {\n // let (expr) == (a ? b : c)\n // (a ? b : c) op != a ? b : c op in all cases\n return true;\n }\n if ($expr instanceof BinaryOpExpression) {\n // let (x) == (a bop b)\n // (a bop b) op != a bop b op if\n if (UnaryOperators::hasPriority($op, $expr->getOperation())) {\n return true;\n }\n // check if a bop (b) op == a bop b op\n return $this->postfixExprNeedsParentheses($op, $expr->getExpression2());\n }\n if ($expr instanceof UnaryOpExpression) {\n switch ($expr->getOperation()) {\n case UnaryOperators::PHP_ARRAY_APPEND_POINT_OP:\n case UnaryOperators::PHP_POST_DECREMENT_OP:\n case UnaryOperators::PHP_POST_INCREMENT_OP:\n // let (expr) == (a uop)\n // (a uop) op == a uop op in all cases\n return false;\n }\n // let (expr) == (uop a)\n // check if uop (a) op == uop a op\n return $this->postfixExprNeedsParentheses($op, $expr->getExpression());\n }\n return false;\n }",
"private function exprNeedsParentheses(\n /*UnaryOperator*/ $op, /*IExpression*/ $expr) /* : bool */ {\n switch ($op) {\n case UnaryOperators::PHP_ARRAY_APPEND_POINT_OP:\n case UnaryOperators::PHP_POST_DECREMENT_OP:\n case UnaryOperators::PHP_POST_INCREMENT_OP:\n return $this->postfixExprNeedsParentheses($op, $expr);\n }\n return $this->prefixExprNeedsParentheses($op, $expr);\n }",
"private function rightExprNeedsParentheses(\n /*BinaryOperator*/ $op, /*IExpression*/ $expr) /* : bool */ {\n if ($op == BinaryOperators::PHP_ARRAY_ELEMENT) {\n // x[y] == x[(y)]\n return false;\n }\n if ($expr instanceof ConditionalExpression) {\n // let (y) == (a ? b : c)\n // x op (a ? b : c) != x op a ? b : c if\n return $this->rightExprNeedsParentheses(\n $op, $expr->getCondition());\n }\n if ($expr instanceof BinaryOpExpression) {\n // let (y) == (a op1 b)\n // x op (a op1 b) != x op a op1 b if\n if (!BinaryOperators::hasPriority($expr->getOperation(), $op)) {\n return true;\n }\n // check if x op (a) op1 b == x op a op1 b\n return $this->rightExprNeedsParentheses($op, $expr->getExpression1());\n }\n\n // don't worry about unary operations:\n // prefix unaries do not have left operands hence\n // x op (uop a) == x op uop a in all cases.\n // postfix unaries trump binaries that get here hence\n // x op (a uop) == x op a uop in all cases.\n return false;\n }",
"private function leftExprNeedsParentheses(\n /*BinaryOperator*/ $op, /*IExpression*/ $expr) /* : bool */ {\n if ($expr instanceof ConditionalExpression) {\n // let (x) == (a ? b : c)\n // (a ? b : c) op y != a ? b : c op y in all cases\n return true;\n }\n if ($expr instanceof BinaryOpExpression) {\n // let (x) == (a op1 b)\n // (a op1 b) op y != a op1 b op y if\n if (BinaryOperators::hasPriority($op, $expr->getOperation())) {\n return true;\n }\n // check if a op1 (b) op y == a op1 b op y\n return $this->leftExprNeedsParentheses($op, $expr->getExpression2());\n }\n if ($expr instanceof UnaryOpExpression) {\n // let (x) == (!a)\n // (!a) op y != !a op y if\n if ($expr->getOperation() == UnaryOperators::PHP_NOT_OP &&\n BinaryOperators::hasPriority(\n $op, BinaryOperators::PHP_MULTIPLY)) {\n return true;\n }\n // check if !(a) op y == !a op y\n return $this->leftExprNeedsParentheses($op, $expr->getExpression());\n }\n return false;\n }",
"public function isUnaryPredecessorOperator(int $index): bool\n {\n static $potentialSuccessorOperator = [T_INC, T_DEC];\n\n static $potentialBinaryOperator = ['+', '-', '&', [CT::T_RETURN_REF]];\n\n static $otherOperators;\n\n if (null === $otherOperators) {\n $otherOperators = ['!', '~', '@', [T_ELLIPSIS]];\n }\n\n static $disallowedPrevTokens;\n\n if (null === $disallowedPrevTokens) {\n $disallowedPrevTokens = [\n ']',\n '}',\n ')',\n '\"',\n '`',\n [CT::T_ARRAY_SQUARE_BRACE_CLOSE],\n [CT::T_ARRAY_INDEX_CURLY_BRACE_CLOSE],\n [CT::T_DYNAMIC_PROP_BRACE_CLOSE],\n [CT::T_DYNAMIC_VAR_BRACE_CLOSE],\n [T_CLASS_C],\n [T_CONSTANT_ENCAPSED_STRING],\n [T_DEC],\n [T_DIR],\n [T_DNUMBER],\n [T_FILE],\n [T_FUNC_C],\n [T_INC],\n [T_LINE],\n [T_LNUMBER],\n [T_METHOD_C],\n [T_NS_C],\n [T_STRING],\n [T_TRAIT_C],\n [T_VARIABLE],\n ];\n }\n\n $tokens = $this->tokens;\n $token = $tokens[$index];\n\n if ($token->isGivenKind($potentialSuccessorOperator)) {\n return !$this->isUnarySuccessorOperator($index);\n }\n\n if ($token->equalsAny($otherOperators)) {\n return true;\n }\n\n if (!$token->equalsAny($potentialBinaryOperator)) {\n return false;\n }\n\n $prevToken = $tokens[$tokens->getPrevMeaningfulToken($index)];\n\n if (!$prevToken->equalsAny($disallowedPrevTokens)) {\n return true;\n }\n\n if (!$token->equals('&') || !$prevToken->isGivenKind(T_STRING)) {\n return false;\n }\n\n static $searchTokens = [\n ';',\n '{',\n '}',\n [T_FUNCTION],\n [T_OPEN_TAG],\n [T_OPEN_TAG_WITH_ECHO],\n ];\n $prevToken = $tokens[$tokens->getPrevTokenOfKind($index, $searchTokens)];\n\n return $prevToken->isGivenKind(T_FUNCTION);\n }",
"private function isValidUnaryOperator($value)\n\t{\n\t\treturn array_key_exists($value, $this->unary_operators);\n\t}",
"function sql_is_compare_operator($op){\n\treturn in_array($op, array('=', 'LIKE', 'NOT LIKE', 'NOT', '<>'));\n}",
"private function inPrefixPosition($previous)\n\t{\n\t\treturn (\n\t\t\t$previous == NULL OR\n\t\t\t$previous->type == 'LP' OR\n\t\t\t$this->isOperator($previous)\n\t\t);\n\t}",
"public function hasOperator(string $token): bool;",
"public function isOperator()\n {\n return\n $this->type === 'plus' ||\n $this->type === 'minus' ||\n $this->type === 'slash' ||\n $this->type === 'star';\n }",
"public function containsOperators() {\n\t\t$pattern = [];\n\t\tforeach ( $this->wildcardingOperators as $op ) {\n\t\t\t$pattern[] = \"\\\\$op\";\n\t\t}\n\t\t$pattern = \"/\" . implode( '|', $pattern ) . \"/\";\n\n\t\tif ( preg_match( $pattern, $this->original ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Special operators should not be removable by config\n\t\tif ( strpos( $this->original, 'AND' ) || strpos( $this->original, 'OR' ) ) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"protected function isOperatorExpression($expression)\n {\n if (\n !is_array($expression) ||\n count($expression) !== 2 ||\n !isset($expression[0], $expression[1])\n ) {\n return false;\n }\n\n [$operator, $count] = $expression;\n\n return $this->isBasicOperator($operator) && is_numeric($count);\n }",
"protected function is_operator($node) {\n return !($node->type == qtype_preg_node::TYPE_LEAF_CHARSET\n || $node->type == qtype_preg_node::TYPE_LEAF_ASSERT\n || $node->type == qtype_preg_node::TYPE_LEAF_META\n || $node->type == qtype_preg_node::TYPE_LEAF_BACKREF\n || $node->type == qtype_preg_node::TYPE_LEAF_SUBEXPR_CALL\n || $node->type == qtype_preg_node::TYPE_LEAF_TEMPLATE\n || $node->type == qtype_preg_node::TYPE_LEAF_CONTROL\n || $node->type == qtype_preg_node::TYPE_LEAF_OPTIONS\n || $node->type == qtype_preg_node::TYPE_LEAF_COMPLEX_ASSERT);\n }",
"public function isUnarySuccessorOperator(int $index): bool\n {\n static $allowedPrevToken = [\n ']',\n [T_STRING],\n [T_VARIABLE],\n [CT::T_ARRAY_INDEX_CURLY_BRACE_CLOSE],\n [CT::T_DYNAMIC_PROP_BRACE_CLOSE],\n [CT::T_DYNAMIC_VAR_BRACE_CLOSE],\n ];\n\n $tokens = $this->tokens;\n $token = $tokens[$index];\n\n if (!$token->isGivenKind([T_INC, T_DEC])) {\n return false;\n }\n\n $prevToken = $tokens[$tokens->getPrevMeaningfulToken($index)];\n\n return $prevToken->equalsAny($allowedPrevToken);\n }",
"public function testPrecedenceIsInValidRange()\n {\n foreach ( $this->operators as $operator )\n {\n self::assertThat( $operator->precedence, self::greaterThan( 0 ), \"Precendence for operator <\" . get_class( $operator ) . \"> must be 1 or higher.\" );\n }\n }",
"public static function isLowerThan($left_operand, $right_operand, $precision = null)\n {\n $result = self::compare($left_operand, $right_operand, $precision);\n\n return $result === -1;\n }",
"private static function isOperator($operator)\n {\n if ($operator instanceof Number) {\n return false;\n }\n $has = false;\n foreach (self::getOperators() as $op) {\n if ($operator === $op) {\n $has = true;\n break;\n }\n }\n\n return $has;\n }",
"public static function ValidateOperator($operator) {\n return in_array(strtolower($operator), array_map('strtolower', static::$VALID_OPERATORS));\n }",
"public function hasOp() {\n return $this->_has(1);\n }",
"public static function isOperator($token): bool\n {\n if (!\\is_string($token)) {\n return false;\n }\n\n return \\strpos(self::MISC_OPERATORS, $token) !== false;\n }",
"public static function isUnaryPlusMinus(File $phpcsFile, $stackPtr)\n {\n $tokens = $phpcsFile->getTokens();\n\n if (isset($tokens[$stackPtr]) === false\n || ($tokens[$stackPtr]['code'] !== \\T_PLUS\n && $tokens[$stackPtr]['code'] !== \\T_MINUS)\n ) {\n return false;\n }\n\n $next = $phpcsFile->findNext(Tokens::$emptyTokens, ($stackPtr + 1), null, true);\n if ($next === false) {\n // Live coding or parse error.\n return false;\n }\n\n if (isset(Tokens::$operators[$tokens[$next]['code']]) === true) {\n // Next token is an operator, so this is not a unary.\n return false;\n }\n\n $prev = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($stackPtr - 1), null, true);\n\n if ($tokens[$prev]['code'] === \\T_RETURN) {\n // Just returning a positive/negative value; eg. (return -1).\n return true;\n }\n\n if (isset(Tokens::$operators[$tokens[$prev]['code']]) === true) {\n // Just trying to operate on a positive/negative value; eg. ($var * -1).\n return true;\n }\n\n if (isset(Tokens::$comparisonTokens[$tokens[$prev]['code']]) === true) {\n // Just trying to compare a positive/negative value; eg. ($var === -1).\n return true;\n }\n\n if (isset(Tokens::$booleanOperators[$tokens[$prev]['code']]) === true) {\n // Just trying to compare a positive/negative value; eg. ($var || -1 === $b).\n return true;\n }\n\n if (isset(Tokens::$assignmentTokens[$tokens[$prev]['code']]) === true) {\n // Just trying to assign a positive/negative value; eg. ($var = -1).\n return true;\n }\n\n if (isset(Tokens::$castTokens[$tokens[$prev]['code']]) === true) {\n // Just casting a positive/negative value; eg. (string) -$var.\n return true;\n }\n\n // Other indicators that a plus/minus sign is a unary operator.\n $invalidTokens = array(\n \\T_COMMA => true,\n \\T_OPEN_PARENTHESIS => true,\n \\T_OPEN_SQUARE_BRACKET => true,\n \\T_OPEN_SHORT_ARRAY => true,\n \\T_COLON => true,\n \\T_INLINE_THEN => true,\n \\T_INLINE_ELSE => true,\n \\T_CASE => true,\n \\T_OPEN_CURLY_BRACKET => true,\n \\T_STRING_CONCAT => true,\n );\n\n if (isset($invalidTokens[$tokens[$prev]['code']]) === true) {\n // Just trying to use a positive/negative value; eg. myFunction($var, -2).\n return true;\n }\n\n return false;\n }",
"public function testEvaluateTooManyOperators()\n {\n $calc = new ReversePolishCalculator();\n $retval = $calc->evaluate(\"3 2 1 + * /\");\n $this->assertEquals(9, $retval);\n }",
"public function isValidOperation(string $operation): bool;",
"public function hasCustomOperatorHandler($operator) {\n return isset($this->operatorHandlers[$operator]);\n }",
"public static function isUnary(): bool\n {\n return static::unary;\n }",
"private function hasOperator($passedOperator){\n\t\tforeach($this->operators as $operator){\n\t\t\tif ($operator->customIdentifier == $passedOperator){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public static function isInteger($op1)\n {\n if(!is_numeric($op1)) {\n return false;\n }\n if(is_float($op1)) {\n return false;\n }\n if(strpos($op1, '.') !== false) {\n return false;\n }\n return true;\n }",
"private function isValidOdataOperator(string $operator): bool {\n switch ($operator) {\n case 'eq':\n return true;\n case 'ne':\n return true;\n case 'ge':\n return true;\n case 'gt':\n return true;\n case 'lt':\n return true;\n case 'le':\n return true;\n case 'and':\n return true;\n case 'or':\n return true;\n case 'not':\n return true;\n case 'has':\n return true;\n default:\n return false;\n }\n }",
"protected function _has_operator($str) {\n\t\treturn (bool) preg_match('/(<|>|!|=|\\sIS NULL|\\sIS NOT NULL|\\sEXISTS|\\sBETWEEN|\\sLIKE|\\sIN\\s*\\(|\\s)/i', trim($str));\n\t}",
"protected function invalidOperator(string $operator): bool\n\t{\n\t\treturn !in_array(strtolower($operator), self::OPERATORS, true);\n\t}"
] |
[
"0.68805325",
"0.646816",
"0.6242528",
"0.6170335",
"0.60739726",
"0.5968233",
"0.59227",
"0.5863405",
"0.5708961",
"0.5694942",
"0.5581721",
"0.5564998",
"0.5523534",
"0.54625916",
"0.5389806",
"0.53779715",
"0.5317031",
"0.5264334",
"0.52505064",
"0.5246012",
"0.51944715",
"0.51688904",
"0.51562434",
"0.5149869",
"0.51321816",
"0.5105338",
"0.5105191",
"0.50987697",
"0.5086607",
"0.50674456"
] |
0.7192633
|
0
|
yield [key =>] value
|
public function visitYieldExpression(
/*IYieldExpression*/ $node) /*: mixed*/ {
$key = null;
$key_value = $node->getKey();
if ($key_value !== null) {
$key = /*(string)*/$key_value->accept($this);
}
$value = /*(string)*/$node->getValue()->accept($this);
$result = 'yield ';
if (is_string($key_value)) {
$result .= $key_value.' => ';
}
return $result.$value;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function intoGenerator(): \\Generator {\n\t\tforeach ($this as $value) {\n\t\t\tyield $value;\n\t\t}\n\t}",
"public function getIterator()\r\n {\r\n if (!is_array($this->data))\r\n {\r\n $this->data = array();\r\n }\r\n foreach ($this->data as $item => $key)\r\n {\r\n yield $item => $key;\r\n }\r\n }",
"function gen() {\n yield from $i => $a;\n}",
"function iterable_map_keys(iterable $iterable, callable $callback): \\Generator\n{\n foreach ($iterable as $key => $value) {\n yield call_user_func($callback, $value, $key) => $value;\n }\n}",
"function generateItems(): \\Generator;",
"function mdl_unique_iterable($iterable, string $key = null)\n{\n $keys = [];\n foreach ($iterable as $k => $value) {\n # code...\n // Case the searched key does not exist, we simply add it to the output\n if (!isset($value[$key])) {\n yield $k => $value;\n continue;\n }\n if (array_key_exists($value[$key], $keys)) {\n continue;\n }\n $keys[$value[$key]] = true;\n yield $k => $value;\n }\n}",
"public function valueKeys(): array;",
"private function buildValues(iterable $values): Generator\n {\n foreach ($values as $key => $value) {\n yield $key => new Value($value);\n }\n }",
"abstract public function getKeys();",
"public function getEntryValueGenerator();",
"function values(iterable $items) : iterable\n{\n return _arrayOrIterator($items, function($items) {\n foreach ($items as $_ => $value) {\n yield $value;\n }\n });\n}",
"#[\\ReturnTypeWillChange]\n public function getIterator()\n {\n foreach ($this->iteratePages() as $page) {\n foreach ($page as $key => $element) {\n yield $key => $element;\n }\n }\n }",
"function map(callable $function, iterable $items) : iterable\n{\n return _arrayOrIterator($items, function($items) use($function) {\n foreach ($items as $key => $value) {\n yield $key => $function($value, $key);\n }\n });\n}",
"abstract public function keys(): Seq;",
"public function items(): iterable;",
"function echoKeyValuePair($key, $value)\r\n{\r\n if (is_array($value))\r\n {\r\n foreach ($value as $subItem)\r\n {\r\n echoKeyValuePair($key, $subItem);\r\n }\r\n }\r\n \r\n else\r\n { \r\n echo $key.\" => \".$value.PHP_EOL;\r\n }\r\n}",
"function fromPairs(iterable $items) : iterable\n{\n return _arrayOrIterator($items, function($items) {\n foreach ($items as list($key, $value)) {\n yield $key => $value;\n }\n });\n}",
"private function _iterate($key, $value) \n {\n\n if (!is_array($value)) {\n if (is_string($value)) {\n\n if ($filter = $this->_detect($key, $value)) {\n include_once 'IDS/Event.php';\n $this->report->addEvent(new IDS_Event($key,\n $value,\n $filter));\n }\n }\n } else {\n foreach ($value as $subKey => $subValue) {\n $this->_iterate($key . '.' . $subKey, $subValue);\n }\n }\n }",
"public function renderKeys()\n\t{\n\t}",
"public function getKeyValuePair() : array \n { \n return [\n $this->key => $this->value\n ];\n }",
"public function __get($name_function){//this nameok\n foreach ($this->check_array() as $key => $value):\n if($this->check_val===$key)://check val==key were is the key??\n return preg_match( $value,$this->name);\n endif;\n endforeach;\n \n}",
"function page_metaprocess_block_record($field, $key, $value) {\n}",
"public function serializeGenerator()\r\n {\r\n if($this->__converter instanceof IListConverter)\r\n {\r\n foreach($this->__converter->toGenerator($this) as $index => $row)\r\n {\r\n yield $index => $row;\r\n }\r\n }\r\n else\r\n {\r\n foreach($this->toArray() as $index => $row)\r\n {\r\n yield $index => $row;\r\n }\r\n }\r\n }",
"final public function traverseObject(): Generator\n {\n yield from $this->data;\n }",
"public function iterator()\n {\n return $this->map->valueIterator();\n }",
"public function getItems(array $keys)\n {\n $this->store->getDelayed($keys);\n while ($result = $this->store->fetch()) {\n yield $result['key'] => new \\Mist\\Cache\\_1_0\\Item\\Passive(\n $this,\n $result['key'],\n $result['value'],\n true\n );\n }\n }",
"public function execute(iterable $values): iterable {\n\t\t$current = 0;\n\n\t\tforeach ($values as $key => $value) {\n\t\t\tif ($current >= $this->limit) {\n\t\t\t\tyield $key => $value;\n\t\t\t}\n\t\t\t$current++;\n\t\t}\n\t}",
"private function keyvalSeparate($input){\n unset($this->keys);\n unset($this->values); \n \n foreach($input as $key => $value){\n $this->keys[] = $key;\n $this->values[] = $value;\n } \n }",
"public function key(): mixed;",
"public function collectAsKeyValue(): array {\n\t\t$result = [];\n\t\tforeach ($this as [$key, $value]) {\n\t\t\t$result[$key] = $value;\n\t\t}\n\t\treturn $result;\n\t}"
] |
[
"0.6182445",
"0.60149634",
"0.59737444",
"0.5937081",
"0.5912056",
"0.5511352",
"0.55015963",
"0.5479255",
"0.5434868",
"0.54326546",
"0.5386732",
"0.5383785",
"0.5362257",
"0.5360703",
"0.52640367",
"0.5258396",
"0.5252727",
"0.5228768",
"0.52223253",
"0.5188643",
"0.51870036",
"0.51554865",
"0.5152653",
"0.5147984",
"0.51462924",
"0.51430213",
"0.5117284",
"0.5099136",
"0.50948226",
"0.5091129"
] |
0.66256696
|
0
|
case condition: block default: block
|
public function visitCaseStatement(
/*ICaseStatement*/ $node) /*: mixed*/ {
$condition = null;
$condition_value = $node->getCondition();
if ($condition_value !== null) {
$condition = /*(string)*/$condition_value->accept($this);
}
$this->blockIndent = ' ';
$block = /*(string)*/$node->getBlock()->accept($this);
if (is_string($condition)) {
return $this->indent.'case '.$condition.':'.$block."\n";
} else {
return $this->indent.'default:'.$block."\n";
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public static function _switch()\n {\n //get the argument list, and extract $self\n $args = func_get_args();\n $self = array_shift($args);\n\n //get the item we're comparing to\n $comparison_base = array_shift($args);\n\n //split the arguments into two separate lists\n $count = count($args);\n for($i = 0; $i + 1 < $count; $i += 2)\n {\n //if the condition evalutes to true, run the body code\n if($self->evaluate($args[$i]) == $comparison_base)\n {\n //run the associated code\n $self->evaluate_script($args[$i + 1]);\n }\n }\n }",
"function if_else(callable $cond): Closure\n{\n return function (callable $then) use ($cond) {\n return function (callable $else) use ($cond, $then) {\n return function ($value) use ($cond, $then, $else) {\n return $cond($value) ? $then($value) : $else($value);\n };\n };\n };\n}",
"public function execute($condition) {\r\n \r\n }",
"function yy_r163(){ $this->_retvalue = array(new Stmt\\Expr(\"WHEN\", $this->yystack[$this->yyidx + -2]->minor, $this->yystack[$this->yyidx + 0]->minor)); }",
"function yy_r162(){ $this->_retvalue = $this->yystack[$this->yyidx + -4]->minor; $this->yystack[$this->yyidx + -4]->minor[] = new Stmt\\Expr(\"WHEN\", $this->yystack[$this->yyidx + -2]->minor, $this->yystack[$this->yyidx + 0]->minor); }",
"function when($condition): When;",
"function return_if($condition, $value)\n {\n if ($condition) {\n return $value;\n }\n }",
"public function check($condition)\n\t{\n\t}",
"function if_then(callable $predicate): Closure\n{\n return function (callable $then) use ($predicate) {\n if ($predicate()) {\n $then();\n }\n };\n}",
"public function stopWhen($condition);",
"protected function when($condition, $value, $default = null)\n {\n if ($condition) {\n return value($value);\n }\n\n return func_num_args() === 3 ? value($default) : null;\n }",
"function caseWithoutBreak($string, $thing)\n{\n switch ($string) {\n case 'foo':\n switch ($thing) {\n case 'ding':\n case 'dong':\n $string = 'dang';\n // no break here!!\n }\n break;\n case 'bar':\n case 'baz':\n case 'biz':\n switch ($thing) {\n case 'ding':\n case 'dong':\n $string = 'dang';\n break;\n }\n break;\n }\n}",
"public function when($condition, $value, $default = null)\n {\n if ($condition) {\n return value($value);\n }\n\n return func_num_args() === 3 ? value($default) : new MissingValue;\n }",
"abstract public function getOrElse($else);",
"public function testBlockDefault1()\n {\n $result = $this->smarty->fetch('eval:{block name=test}-- block default --{/block}');\n $this->assertEquals('-- block default --', $result);\n }",
"private function isElse()\n\t{\n\t\treturn $this->expression=='';\n\t}",
"protected function skipBlockOrStatement()\n {\n if (is_null($char = $this->readChar())) {\n // EOF is achieved\n return;\n }\n\n if ($char != '{') {\n // skip 1 statement\n $this->rewindUntil([';']);\n\n } else {\n // skip 1 code block\n $this->rewindUntil(['}'], '{');\n }\n }",
"public function visitConditionalStatement(\n /*IConditionalStatement*/ $node) /*: mixed*/ {\n $condition = /*(string)*/$node->getCondition()->accept($this);\n $this->blockIndent = ' ';\n $true_block = /*(string)*/$node->getTrueBlock()->accept($this);\n $this->blockIndent = ' ';\n $false_block = /*(string)*/$node->getFalseBlock()->accept($this);\n $result = $this->indent.'if ('.$condition.')'.$true_block;\n if ($false_block !== '') {\n $result .= ' else'.$false_block;\n }\n return $result.\"\\n\";\n }",
"public function visitConditionBodyAstNode( ezcTemplateConditionBodyAstNode $cond )\n {\n // Not used, data is extracted directly for if, while and do/while\n }",
"protected function getCondition($condition)\n {\n }",
"final protected function policy__dummy_if_denied($arg, & $conf)\n\t{\n\t\tforeach ((array) $arg as $id) {\n\t\t\t$m = @ $conf['block:'.$id]['.block'];\t// FIXME\n\t\t\tif ($m !== null && !$this->authIsBlockAllowed($m)) {\n\t\t\t\tdebug_msg('Replacing block \"%s\" (%s) with dummy.', $id, $m);\n\t\t\t\t$conf['block:'.$id]['.block'] = 'core/dummy';\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"public function addElse()\n\t{\n\t\t// Don't process if done or we've encountered a condition\n\t\t// that evaluated to TRUE. Even if other ones have not been\n\t\t// evaluated, that one will shortcut our else, so we prune\n\t\t// the else branch.\n\t\tif ($this->isDone() || $this->encountered_true_condition)\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\t\tif ( ! $this->all_previous_could_eval)\n\t\t{\n\t\t\t$this->parser->output('{if:else}');\n\t\t}\n\n\t\t$this->last_result = TRUE;\n\t\t$this->setLastCouldEval(TRUE);\n\n\t\treturn $this->shouldAddBody();\n\t}",
"function lapa_compiler_switch($act, $parser)\n{\n if ( 1 == $act) {\n $plugin_name = 'switch';\n \n $attr = $parser->parseDirectiveAttributes();\n $result = $parser->_parseExpression();\n $parser->openBlock($plugin_name, false);\n if ('' != $result ) {\n return 'switch (' . $result . '):' . \"\\n\";\n }else {\n throw new LapaEngineException('Укажите параметры для SWITCH в строке %s.', $parser->templateLine());\n }\n }else {\n return lapa_compiler_endswitch($act, $parser);\n }\n}",
"protected function _testAgainstConditionBlock(array $data)\n\t{\n\t\tforeach ($this->_conditionsBlock as $key => $modes) {\n\t\t\t\n\t\t\t// We don't test value if value is not setted (but we should)\n\t\t\tif (! isset($data[$key])) continue;\n\t\t\t\n\t\t\tforeach ($modes as $mode => $patterns) {\n\n\t\t\t\t/* condition status, needed for OR mode */\n\t\t\t\t$status = false;\n\t\t\t\t\n\t\t\t\tforeach ($patterns as $pattern) {\n\t\t\t\t\t\n\t\t\t\t\t$result = preg_match(\"/\" . $pattern . \"/i\", $data[$key]);\n\t\t\t\t\t//printf('%d -> %s preg %s -> %s<br/>', $key, $data[$key], $pattern, $result);\n\t\t\t\t\t\n\t\t\t\t\t/* in AND mode, any no-match returns failure */\n\t\t\t\t\tif ($mode == Backend\\Condition::MODE_AND && $result == 0) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t/* in OR mode, one match is enough */\n\t\t\t\t\tif ($mode == Backend\\Condition::MODE_OR && $result != 0) {\n\n\t\t\t\t\t\t$status = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ($status == false && $mode == Backend\\Condition::MODE_OR) {\n\t\t\t\t\t\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}",
"public function when($condition, callable $callback, callable $default = null)\n {\n if (is_callable($condition) ? $condition($this) : $condition) {\n return $callback($this);\n } elseif ($default) {\n return $default($this);\n }\n\n return $this;\n }",
"function block_has_support($block_type, $feature, $default_value = \\false)\n {\n }",
"function g() {\n if (false) {\n yield true;\n }\n}",
"function yy_r20(){if (!in_array($this->yystack[$this->yyidx + -3]->minor,array('if','elseif','while'))) {\r\n $this->compiler->trigger_template_error (\"wrong syntax for tag \\\"\" . $this->yystack[$this->yyidx + -3]->minor . \"\\\"\"); \r\n }\r\n $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -3]->minor,array('if condition'=>$this->yystack[$this->yyidx + -1]->minor)); }",
"function yy_r21(){ if (!in_array($this->yystack[$this->yyidx + -3]->minor,array('if','elseif','while'))) {\r\n $this->compiler->trigger_template_error (\"wrong syntax for tag \\\"\" . $this->yystack[$this->yyidx + -3]->minor . \"\\\"\"); \r\n }\r\n $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -3]->minor,array('if condition'=>$this->yystack[$this->yyidx + -1]->minor)); }",
"public function doWhile(callable $predicate): void\n {\n foreach ($this->items as $key => $item) {\n if (!$predicate($item, $key)) {\n break;\n }\n }\n }"
] |
[
"0.61193967",
"0.5807064",
"0.5685144",
"0.5621157",
"0.5581578",
"0.55635786",
"0.5483601",
"0.5437391",
"0.53568494",
"0.5230593",
"0.5150999",
"0.5046389",
"0.5032294",
"0.49809363",
"0.4975186",
"0.4943985",
"0.49060002",
"0.4864436",
"0.4805686",
"0.4800414",
"0.47741467",
"0.47625616",
"0.47429186",
"0.47347304",
"0.47317407",
"0.46666503",
"0.46384835",
"0.46266973",
"0.4593032",
"0.4591848"
] |
0.6179473
|
0
|
catch (class variableName) block (no newline at end of block)
|
public function visitCatchStatement(
/*ICatchStatement*/ $node) /*: mixed*/ {
$this->blockIndent = ' ';
$block = /*(string)*/$node->getBlock()->accept($this);
$class = /*(string)*/$node->getClass()->accept($this);
$variable_name = $node->getVariableName();
return " catch ($class \$$variable_name)".$block;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"protected function _statementTryCatch($trycatch, $class = null, $method = null) {\n /* TODO \n * 1. Optimization, if an 'try' has no clauses we should just use a ';' rather than a '{ }' pair\n * 2. Optimization, if an 'try' has no clauses, than maybe it is 'dead code' and should be removed\n * NOTE: this requires that the test expression has no side-effects (i.e. assigning within an if, function call, etc.)\n */\n /* TRY HEADER */\n $this->_emitter->emit('try');\n\n // TODO: Move to the Flag to Configuration File\n $config_tryLFStartBlock = false; // method '{' on new line?\n if ($config_tryLFStartBlock) {\n $this->_emitter->emitNL();\n }\n $this->_emitter->emit('{', true);\n\n /* TRY BODY */\n $this->_emitter->indent();\n $this->_processStatementBlock($trycatch['statements'], $class, $method);\n\n // Garauntee that we flush any pending lines\n $this->_emitter->emitNL();\n $this->_emitter->unindent();\n\n /*\n * TRY FOOTER\n */\n $this->_emitter->emit('}');\n\n // BODY : CATCH CLAUSES\n /* TODO \n * 1. Optimization, if an 'catch' has no clauses we should just use a ';' rather than a '{ }' pair\n * 2. Optimization, if an 'catch' has no clauses, than maybe it is 'dead code' and should be removed\n * NOTE: this requires that the test expression has no side-effects (i.e. assigning within an if, function call, etc.)\n */\n foreach ($trycatch['catches'] as $catch) {\n /* CATCH HEADER */\n $this->_emitter->emit(['catch', '(']);\n $this->_property = true;\n $this->_processExpression($catch['class'], $class, $method);\n $this->_processExpression($catch['variable'], $class, $method);\n $this->_emitter->emit(')', true);\n\n // TODO: Move to the Flag to Configuration File\n $config_tryLFStartBlock = false; // method '{' on new line?\n if ($config_tryLFStartBlock) {\n $this->_emitter->emitNL();\n }\n $this->_emitter->emit('{', true);\n\n /* CATCH BODY */\n $this->_emitter->indent();\n $this->_processStatementBlock($catch['statements'], $class, $method);\n\n // Garauntee that we flush any pending lines\n $this->_emitter->emitNL();\n $this->_emitter->unindent();\n\n /* TRY FOOTER */\n $this->_emitter->emit('}', true);\n }\n }",
"public function visitCatchAstNode( ezcTemplateCatchAstNode $catch )\n {\n $this->write( \"catch (\" . $catch->className . \" \" );\n $catch->variableExpression->accept( $this );\n $this->write( \")\\n{\\n\" );\n $this->increaseIndentation( $this->indentation );\n $catch->body->accept( $this );\n $this->restoreIndentation();\n $this->write( \"}\\n\" );\n }",
"function throwError($exceptionItem){\n\techo \"\n\t\n\t<p style='font-family:arial;color:red;font-size:20px;'> Error parsing : . $exceptionItem->error_message \n\t\n\t</p>\"; // catch this in the parse method and do $e->getMessage() to show it.\n\n\t//break; // try and break the current loop\n\n\n}",
"function demo($var) { \n echo \" Before try block\";\n try {\n echo \"\\n Inside try block\";\n \n // If var is zerothen only if will be executed\n if($var == 0) {\n \n // If var is zero then only exception is thrown\n throw new Exception('Number is zero.');\n \n // This line will never be executed\n echo \"\\n After throw it will never be executed\";\n }\n }\n \n // Catch block will be executed only \n // When Exception has been thrown by try block\n catch(Exception $e) {\n echo \"\\n Exception Caught\" . $e->getMessage();\n }\n finally {\n echo \"\\n Here cleanup activity will be done\";\n }\n \n // This line will be executed whether\n // Exception has been thrown or not \n echo \"\\n After catch it will be always executed\";\n}",
"public function visitTryStatement(\n /*ITryStatement*/ $node) /*: mixed*/ {\n $this->blockIndent = ' ';\n $block = /*(string)*/rtrim($node->getBlock()->accept($this));\n $catch_statements = Vector {};\n foreach ($node->getCatchStatements() as $catch_statements_elem) {\n $catch_statements[] = /*(string)*/$catch_statements_elem->accept($this);\n }\n $finally_statement = null;\n $finally_statement_value = $node->getFinallyStatement();\n if ($finally_statement_value !== null) {\n $finally_statement = /*(string)*/$finally_statement_value->accept($this);\n }\n\n $result = $this->indent.'try '.$block;\n $result .= $this->visitVector($catch_statements, '', '', '');\n return $result.\"\\n\";\n }",
"function yy_r208(){ $this->_retvalue = new Stmt\\VariablePlaceholder; }",
"public function try(){\n\n }",
"public function fnParseTryStatement(&$oNode)\n {\n $this->fnNext();\n $oNode->oBlock = $this->parseBlock();\n $oNode->oHandler = null;\n if ($this->oType == TokenTypes::$aTypes['catch']) {\n $oClause = $this->fnStartNode();\n $this->fnNext();\n if ($this->fnEat(TokenTypes::$aTypes['parenL'])) {\n $oClause->oParam = $this->fnParseBindingAtom();\n $bSimple = $oClause->oParam->sType == \"Identifier\";\n $this->fnEnterScope($bSimple ? Scope::SCOPE_SIMPLE_CATCH : 0);\n $this->fnCheckLVal($oClause->oParam, $bSimple ? Scope::BIND_SIMPLE_CATCH : Scope::BIND_LEXICAL);\n $this->fnExpect(TokenTypes::$aTypes['parenR']);\n } else {\n if ($this->aOptions['ecmaVersion'] < 10) \n $this->fnUnexpected();\n $oClause->oParam = null;\n $this->fnEnterScope(0);\n }\n $oClause->aBody = $this->fnParseBlock(false);\n $this->fnExitScope();\n $oNode->oHandler = $this->fnFinishNode($oClause, \"CatchClause\");\n }\n $oNode->oFinalizer = $this->fnEat(TokenTypes::$aTypes['finally']) ? $this->fnParseBlock() : null;\n if (!$oNode->oHandler && !$oNode->oFinalizer)\n $this->fnRaise($oNode->iStart, \"Missing catch or finally clause\");\n return $this->fnFinishNode($oNode, \"TryStatement\");\n }",
"public function visitFinallyStatement(\n /*IFinallyStatement*/ $node) /*: mixed*/ {\n $this->blockIndent = ' ';\n $block = /*(string)*/$node->getBlock()->accept($this);\n\n return ' finally'.$block;\n }",
"public function testIsThereAnySyntaxError(){\n $var = new Serversidebim\\IFCReader\\IFCStepReader(null);\n $this->assertTrue(is_object($var));\n unset($var);\n }",
"public function getTag()\n {\n return 'try';\n }",
"function using(&$expr, $as, $block) {\n if (xp::registry('exceptions')) {\n xp::registry('using', NULL);\n return xp::null();\n }\n\n if (NULL === ($u= xp::registry('using'))) {\n $e= &new NullPointerException('Shadowing of as ('.xp::stringOf($as).')');\n $expr && $expr->__exit($e);\n return throw($e);\n }\n\n extract($u[1]);\n xp::registry('using', NULL);\n\n if (!$expr) {\n return throw(new NullPointerException('using('.$u[0].')'));\n }\n\n try(); {\n eval('$'.$u[0].'= &$expr; '.$block);\n } if (catch('Throwable', $e)) {\n // Intentionally empty\n } finally(); {\n $expr->__exit($e);\n if ($e) return throw($e);\n }\n }",
"function yy_r209(){ $this->_retvalue = new Stmt\\VariablePlaceholder($this->yystack[$this->yyidx + 0]->minor); }",
"function texc($x)\r\n{\r\n\tthrow new \\Exception('Debug: ' . $x);\r\n}",
"private function _class_close ()\n\t{\n\t\treturn \"\\n}\";\n\t}",
"function block_script($script) {\n\tglobal $_G;\n\t$var = \"block_class_$script\";\n\tif(!isset($_G[$var])) {\n\t\tif(@include libfile(\"block/$script\", 'class')) {\n\t\t\t$blockclass = \"block_$script\";\n\t\t\t$_G[$var] = new $blockclass();\n\t\t} else {\n\t\t\t$_G[$var] = null;\n\t\t}\n\t}\n\treturn $_G[$var];\n}",
"public function testIsThereAnySyntaxError() {\n\t\t$var = new Convertor;\n\t\t$this->assertTrue(is_object($var));\n\t\tunset($var);\n\t}",
"public function fourthExampleMethod() {\n\t\ttry {\n\t\t\tthrow new Exception( \"Dummy Exception\" );\n\t\t} catch ( Exception $exception ) {\n\t\t\t$this->_log->exception( $exception , __METHOD__ );\n\t\t}\n\t\t\n\t\t//Artificial exception\n\t\tthrow new Exception( \"Artificial Exception\" );\n\t}",
"public function visitVar(Node $node): void\n {\n if (!\\is_scalar($node->children['name'])) {\n throw new NodeException($node);\n }\n }",
"public function ex4()\n {\n }",
"function test_4() {\n\ttry {\n\t\t$res = gather(function() {\n\t\t\ttake(1);\n\t\t\tthrow new Exception('meh');\n\t\t});\n\t}\n\tcatch (Exception $e) {\n\t\treturn true;\n\t}\n\treturn 'non-last()-generated exceptions are left alone';\n}",
"public function testIsThereAnySyntaxError() {\n $var = new ircsasw\\timeline\\Timeline;\n $this->assertTrue(is_object($var));\n unset($var);\n }",
"public function __construct($tag)\n\t{\n\t\tpreg_match('#^@(\\w+)\\s+([^\\s]+)(?:\\s+(.*))?#', $tag, $matches);\n\t\t\n\t\t$this->name = 'throws';\n\t\t$this->type = $matches[2];\n\n\t\tif(isset($matches[3]))\n\t\t{\n\t\t\t$this->description = preg_replace('#\\s+#', ' ', $matches[3]);\n\t\t}\n\t}",
"public function createEndClassDeclaration() \n\t{\n\t\treturn \" }\\n?>\\n\";\n\t}",
"function get_etherscan_block()\n{\n try {\n\n } catch (\\Exception $exception) {\n\n }\n}",
"public function parseStatement()\n {\n\n }",
"public function testExceptionThrownWithUnopenedUnsanitizedTag()\n {\n $this->expectException(RuntimeException::class);\n $this->parser->parse([new Token(TokenTypes::T_UNSANITIZED_TAG_CLOSE, '!}}', 1)]);\n }",
"function do_exception($line, $code = -1) {\n\tthrow new Exception(\"Error at line: {$line}\", $code);\n}",
"public function testIsThereAnySyntaxError()\n {\n $obj = new Ryantxr\\CouponCode\\Generator;\n $this->assertTrue(is_object($obj));\n unset($obj);\n }",
"public function testExceptionThrownWithUnopenedSanitizedTag()\n {\n $this->expectException(RuntimeException::class);\n $this->parser->parse([new Token(TokenTypes::T_SANITIZED_TAG_CLOSE, '}}', 1)]);\n }"
] |
[
"0.5945312",
"0.57894427",
"0.55584186",
"0.53457683",
"0.52979875",
"0.51052314",
"0.5088608",
"0.50226384",
"0.49346432",
"0.49254707",
"0.49230385",
"0.48840618",
"0.48748425",
"0.4868565",
"0.48608625",
"0.48330277",
"0.47625577",
"0.4720309",
"0.471184",
"0.4683427",
"0.46584648",
"0.46552742",
"0.4646107",
"0.45765406",
"0.4571143",
"0.45617437",
"0.4528147",
"0.45038542",
"0.45037135",
"0.45024103"
] |
0.733082
|
0
|
if (condition) trueBlock else falseBlock
|
public function visitConditionalStatement(
/*IConditionalStatement*/ $node) /*: mixed*/ {
$condition = /*(string)*/$node->getCondition()->accept($this);
$this->blockIndent = ' ';
$true_block = /*(string)*/$node->getTrueBlock()->accept($this);
$this->blockIndent = ' ';
$false_block = /*(string)*/$node->getFalseBlock()->accept($this);
$result = $this->indent.'if ('.$condition.')'.$true_block;
if ($false_block !== '') {
$result .= ' else'.$false_block;
}
return $result."\n";
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"function CheckCondition()\n\t{\n\t\treturn true;\n\t}",
"public function getIsBlock();",
"public function check($condition)\n\t{\n\t}",
"function sif($condition,$true_value,$false_value)\n{\n\treturn $condition?$true_value:$false_value;\n}",
"public function hasCondition();",
"private function isElse()\n\t{\n\t\treturn $this->expression=='';\n\t}",
"public function addElse()\n\t{\n\t\t// Don't process if done or we've encountered a condition\n\t\t// that evaluated to TRUE. Even if other ones have not been\n\t\t// evaluated, that one will shortcut our else, so we prune\n\t\t// the else branch.\n\t\tif ($this->isDone() || $this->encountered_true_condition)\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\t\tif ( ! $this->all_previous_could_eval)\n\t\t{\n\t\t\t$this->parser->output('{if:else}');\n\t\t}\n\n\t\t$this->last_result = TRUE;\n\t\t$this->setLastCouldEval(TRUE);\n\n\t\treturn $this->shouldAddBody();\n\t}",
"public function check()\n {\n return time()%2==1; // condition\n }",
"function return_if($condition, $value)\n {\n if ($condition) {\n return $value;\n }\n }",
"private function callIf($condition, callable $callback, array $arguments): bool {\n if ($condition) {\n $callback(...$arguments);\n return TRUE;\n }\n return FALSE;\n }",
"function always_true() {\n return mt_rand(1, 2) < 10;\n}",
"function block_has_support($block_type, $feature, $default_value = \\false)\n {\n }",
"public function execute($condition) {\r\n \r\n }",
"public function untilTrue(callable $condition): bool\n {\n return $this->whileTrue($condition);\n }",
"function has_block($block_name, $post = \\null)\n {\n }",
"function if_then(callable $predicate): Closure\n{\n return function (callable $then) use ($predicate) {\n if ($predicate()) {\n $then();\n }\n };\n}",
"public function addElseIf(BooleanExpression $expression)\n\t{\n\t\tif ($this->isDone() || $this->encountered_true_condition)\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t$can_eval = $expression->canEvaluate();\n\n\t\tif ($can_eval)\n\t\t{\n\t\t\t$result = $this->evaluate($expression);\n\n\t\t\t// If not all previous ones have evaluated, then we can't\n\t\t\t// make a determination on a true branch since a previous one may\n\t\t\t// also be true. However, we do know that subsequent ones cannot be\n\t\t\t// reached, so we can remove them. This then becomes the else branch,\n\t\t\t// making it easy to parse on subsequent passes.\n\t\t\tif ( ! $this->all_previous_could_eval && $result == TRUE)\n\t\t\t{\n\t\t\t\t$this->parser->output('{if:else}');\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->parser->outputLastAnnotation();\n\t\t\t$this->outputCondition($expression->stringify());\n\t\t}\n\n\t\t$this->setLastCouldEval($can_eval);\n\n\t\treturn $this->shouldAddBody();\n\t}",
"function yy_r20(){if (!in_array($this->yystack[$this->yyidx + -3]->minor,array('if','elseif','while'))) {\r\n $this->compiler->trigger_template_error (\"wrong syntax for tag \\\"\" . $this->yystack[$this->yyidx + -3]->minor . \"\\\"\"); \r\n }\r\n $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -3]->minor,array('if condition'=>$this->yystack[$this->yyidx + -1]->minor)); }",
"function if_else(callable $cond): Closure\n{\n return function (callable $then) use ($cond) {\n return function (callable $else) use ($cond, $then) {\n return function ($value) use ($cond, $then, $else) {\n return $cond($value) ? $then($value) : $else($value);\n };\n };\n };\n}",
"function __return_true()\n {\n }",
"function has_blocks($post = \\null)\n {\n }",
"function get_block ( $template = false, $block = null ) {\r\n $template = $this->get_blocks ( $template );\r\n\r\n if ( empty( $block ) ) {\r\n return false;\r\n }\r\n\r\n return isset( $template[ $block ] ) ? $template[ $block ] : false;\r\n }",
"public function isTrue();",
"function g() {\n if (false) {\n yield true;\n }\n}",
"public static function _if($self, $condition, $truecode, $falsecode = null)\n {\n //if the given condition evaluates to true, run the true script\n if($self->evaluate($condition))\n $self->evaluate_script($truecode);\n\n //otherwise, run the false one\n elseif($falsecode !== null)\n $self->evaluate_script($falsecode);\n }",
"function canBeMadeConditional() {\n\tif ($this->getIsConditional()) {\n\t return false;\n\t}\n\t \n\t// DEBUG\n\treturn false;\n }",
"protected function _testAgainstConditionBlock(array $data)\n\t{\n\t\tforeach ($this->_conditionsBlock as $key => $modes) {\n\t\t\t\n\t\t\t// We don't test value if value is not setted (but we should)\n\t\t\tif (! isset($data[$key])) continue;\n\t\t\t\n\t\t\tforeach ($modes as $mode => $patterns) {\n\n\t\t\t\t/* condition status, needed for OR mode */\n\t\t\t\t$status = false;\n\t\t\t\t\n\t\t\t\tforeach ($patterns as $pattern) {\n\t\t\t\t\t\n\t\t\t\t\t$result = preg_match(\"/\" . $pattern . \"/i\", $data[$key]);\n\t\t\t\t\t//printf('%d -> %s preg %s -> %s<br/>', $key, $data[$key], $pattern, $result);\n\t\t\t\t\t\n\t\t\t\t\t/* in AND mode, any no-match returns failure */\n\t\t\t\t\tif ($mode == Backend\\Condition::MODE_AND && $result == 0) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t/* in OR mode, one match is enough */\n\t\t\t\t\tif ($mode == Backend\\Condition::MODE_OR && $result != 0) {\n\n\t\t\t\t\t\t$status = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ($status == false && $mode == Backend\\Condition::MODE_OR) {\n\t\t\t\t\t\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}",
"public function hasBlock(): bool\n {\n return $this->blockAttr !== NULL;\n }",
"function yy_r21(){ if (!in_array($this->yystack[$this->yyidx + -3]->minor,array('if','elseif','while'))) {\r\n $this->compiler->trigger_template_error (\"wrong syntax for tag \\\"\" . $this->yystack[$this->yyidx + -3]->minor . \"\\\"\"); \r\n }\r\n $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -3]->minor,array('if condition'=>$this->yystack[$this->yyidx + -1]->minor)); }",
"function render_block ( $template = null, $block = null, $data = array() ) {\r\n if ( empty( $template ) || empty( $block ) ) {\r\n return false;\r\n }\r\n\r\n if ( strpos( $template, config_item( 'twig_extension') ) === false ) {\r\n $template .= $this->CI->config->item( 'twig_extension' );\r\n }\r\n\r\n $template = $this->_twig->loadTemplate( $template );\r\n\r\n return ( $template->hasBlock( $block ) ) ? $template->renderBlock( $block, $data ) : false;\r\n }"
] |
[
"0.60377824",
"0.58612007",
"0.5860199",
"0.5834713",
"0.582393",
"0.57195336",
"0.57178605",
"0.5588481",
"0.55804706",
"0.5556502",
"0.5537888",
"0.5476266",
"0.5456371",
"0.54547185",
"0.540141",
"0.5373494",
"0.5372895",
"0.5305609",
"0.5275625",
"0.5257929",
"0.5221506",
"0.52188355",
"0.5215227",
"0.52141005",
"0.5198964",
"0.5195412",
"0.5193611",
"0.51853526",
"0.51712394",
"0.51648587"
] |
0.59943193
|
1
|
finally block (no newline at end of block)
|
public function visitFinallyStatement(
/*IFinallyStatement*/ $node) /*: mixed*/ {
$this->blockIndent = ' ';
$block = /*(string)*/$node->getBlock()->accept($this);
return ' finally'.$block;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function finalize() { }",
"public static function end_block()\n\t{\n\t\tself::$nivel_cabecalho -= 1;\n\t}",
"function finalize($message) {\n echo $message;\n exit;\n }",
"public function finalize();",
"function executionDone() {\n\tif($err = @error_get_last()) {\n\t\tswitch($err['type']) {\n\t\t\tdefault:\n\t\t\t\tstopForError($err['message'], $err['type'], $err['file'], $err['line']);\n\t\t\t\tbreak;\n\t\t}\n\t}\n\tif(class_exists('Locker')) {\n\t\tLocker::releaseAll();\n\t}\n}",
"protected function finish() {}",
"public function endBlock(): void\n {\n $output = ob_get_clean();\n\n [$blockName, $replace] = $this->blockStack->pop();\n\n if (!array_key_exists($blockName, $this->blocks)) {\n $this->blocks[$blockName] = [];\n }\n\n if ($replace) {\n $this->blocks[$blockName] = [$output];\n } else {\n $this->blocks[$blockName][] = $output;\n }\n }",
"abstract protected function _finalize();",
"public function finish()\n\t{\n\t\t\n\t}",
"public static function blockEnd() {\n\t\tif(empty(self::$blockStack)) {\n\t\t\tthrow new RecessFrameworkException('Block end encountered without a preceding Layout::block() to open the block.', 1);\n\t\t}\n\t\t\n\t\t$blockName = array_pop(self::$blockStack);\n\t\tif(!isset(self::$blockMap[$blockName])) {\n\t\t\tself::$blockMap[$blockName] = ob_get_clean();\n\t\t} else {\n\t\t\tob_end_clean();\n\t\t}\n\t}",
"public function _end_block()\n\t{\n\t\t//echo '</table>';\n\t}",
"public function end() {}",
"public function end() {}",
"public function end() {}",
"protected function finalize() {\n // NOOP\n }",
"public function finalize(): void;",
"public function finalize(): void;",
"public function finish() {}",
"public function finish() {}",
"public function finish() {}",
"public function finish() {}",
"public function finish() {}",
"public function finish() {}",
"public function finish() {}",
"public function finish() {}",
"public function end();",
"public function end();",
"public function end();",
"public function end();",
"function __destruct() {\n\t\tif (count($this->locks) > 0) {\n\t\t\tif (DEBUG > 0) {\n\t\t\t\tforeach ($this->locks as $id=>$fp) {\n\t\t\t\t\t$this->unlock($id);\n\t\t\t\t}\n\t\t\t\twriteLog(\"these locks have not been unlocked:\".print_r($this->locks, true),KATA_ERROR);\n\t\t\t}\n\t\t}\n\t}"
] |
[
"0.58671594",
"0.586361",
"0.5827493",
"0.58173096",
"0.5768815",
"0.5717344",
"0.57148415",
"0.566485",
"0.5650724",
"0.5548111",
"0.55258954",
"0.5507031",
"0.5507031",
"0.5507031",
"0.5503502",
"0.5497554",
"0.5497554",
"0.54769635",
"0.54765815",
"0.54764265",
"0.5476336",
"0.5476336",
"0.5476336",
"0.5476336",
"0.5476336",
"0.5441938",
"0.5441938",
"0.5441938",
"0.5441938",
"0.5414313"
] |
0.67649597
|
0
|
try block catchStatements [finallyStatement]
|
public function visitTryStatement(
/*ITryStatement*/ $node) /*: mixed*/ {
$this->blockIndent = ' ';
$block = /*(string)*/rtrim($node->getBlock()->accept($this));
$catch_statements = Vector {};
foreach ($node->getCatchStatements() as $catch_statements_elem) {
$catch_statements[] = /*(string)*/$catch_statements_elem->accept($this);
}
$finally_statement = null;
$finally_statement_value = $node->getFinallyStatement();
if ($finally_statement_value !== null) {
$finally_statement = /*(string)*/$finally_statement_value->accept($this);
}
$result = $this->indent.'try '.$block;
$result .= $this->visitVector($catch_statements, '', '', '');
return $result."\n";
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"protected function _statementTryCatch($trycatch, $class = null, $method = null) {\n /* TODO \n * 1. Optimization, if an 'try' has no clauses we should just use a ';' rather than a '{ }' pair\n * 2. Optimization, if an 'try' has no clauses, than maybe it is 'dead code' and should be removed\n * NOTE: this requires that the test expression has no side-effects (i.e. assigning within an if, function call, etc.)\n */\n /* TRY HEADER */\n $this->_emitter->emit('try');\n\n // TODO: Move to the Flag to Configuration File\n $config_tryLFStartBlock = false; // method '{' on new line?\n if ($config_tryLFStartBlock) {\n $this->_emitter->emitNL();\n }\n $this->_emitter->emit('{', true);\n\n /* TRY BODY */\n $this->_emitter->indent();\n $this->_processStatementBlock($trycatch['statements'], $class, $method);\n\n // Garauntee that we flush any pending lines\n $this->_emitter->emitNL();\n $this->_emitter->unindent();\n\n /*\n * TRY FOOTER\n */\n $this->_emitter->emit('}');\n\n // BODY : CATCH CLAUSES\n /* TODO \n * 1. Optimization, if an 'catch' has no clauses we should just use a ';' rather than a '{ }' pair\n * 2. Optimization, if an 'catch' has no clauses, than maybe it is 'dead code' and should be removed\n * NOTE: this requires that the test expression has no side-effects (i.e. assigning within an if, function call, etc.)\n */\n foreach ($trycatch['catches'] as $catch) {\n /* CATCH HEADER */\n $this->_emitter->emit(['catch', '(']);\n $this->_property = true;\n $this->_processExpression($catch['class'], $class, $method);\n $this->_processExpression($catch['variable'], $class, $method);\n $this->_emitter->emit(')', true);\n\n // TODO: Move to the Flag to Configuration File\n $config_tryLFStartBlock = false; // method '{' on new line?\n if ($config_tryLFStartBlock) {\n $this->_emitter->emitNL();\n }\n $this->_emitter->emit('{', true);\n\n /* CATCH BODY */\n $this->_emitter->indent();\n $this->_processStatementBlock($catch['statements'], $class, $method);\n\n // Garauntee that we flush any pending lines\n $this->_emitter->emitNL();\n $this->_emitter->unindent();\n\n /* TRY FOOTER */\n $this->_emitter->emit('}', true);\n }\n }",
"public function visitFinallyStatement(\n /*IFinallyStatement*/ $node) /*: mixed*/ {\n $this->blockIndent = ' ';\n $block = /*(string)*/$node->getBlock()->accept($this);\n\n return ' finally'.$block;\n }",
"function demo($var) { \n echo \" Before try block\";\n try {\n echo \"\\n Inside try block\";\n \n // If var is zerothen only if will be executed\n if($var == 0) {\n \n // If var is zero then only exception is thrown\n throw new Exception('Number is zero.');\n \n // This line will never be executed\n echo \"\\n After throw it will never be executed\";\n }\n }\n \n // Catch block will be executed only \n // When Exception has been thrown by try block\n catch(Exception $e) {\n echo \"\\n Exception Caught\" . $e->getMessage();\n }\n finally {\n echo \"\\n Here cleanup activity will be done\";\n }\n \n // This line will be executed whether\n // Exception has been thrown or not \n echo \"\\n After catch it will be always executed\";\n}",
"public function __destruct() {\n\t\ttry{\n\t\t parent::__destruct();\n\t\t } catch(Exception $e){\n\t\techo $e->errorMessage();\n\t\t}\n\t}",
"public function dataFinallyKeyword()\n {\n return [\n ['/* testTryCatchFinally */'],\n ['/* testTryFinallyCatch */'],\n ['/* testTryFinally */'],\n ];\n\n }",
"public function try(){\n\n }",
"public function __destruct() {\n exit((int)$this->_failed);\n }",
"public function visitTryAstNode( ezcTemplateTryAstNode $try )\n {\n $this->write( \"try\\n{\\n\" );\n $this->increaseIndentation( $this->indentation );\n $try->body->accept( $this );\n $this->restoreIndentation();\n $this->write( \"}\\n\" );\n\n foreach ( $try->catches as $catch )\n {\n $catch->accept( $this );\n }\n }",
"public function fnParseTryStatement(&$oNode)\n {\n $this->fnNext();\n $oNode->oBlock = $this->parseBlock();\n $oNode->oHandler = null;\n if ($this->oType == TokenTypes::$aTypes['catch']) {\n $oClause = $this->fnStartNode();\n $this->fnNext();\n if ($this->fnEat(TokenTypes::$aTypes['parenL'])) {\n $oClause->oParam = $this->fnParseBindingAtom();\n $bSimple = $oClause->oParam->sType == \"Identifier\";\n $this->fnEnterScope($bSimple ? Scope::SCOPE_SIMPLE_CATCH : 0);\n $this->fnCheckLVal($oClause->oParam, $bSimple ? Scope::BIND_SIMPLE_CATCH : Scope::BIND_LEXICAL);\n $this->fnExpect(TokenTypes::$aTypes['parenR']);\n } else {\n if ($this->aOptions['ecmaVersion'] < 10) \n $this->fnUnexpected();\n $oClause->oParam = null;\n $this->fnEnterScope(0);\n }\n $oClause->aBody = $this->fnParseBlock(false);\n $this->fnExitScope();\n $oNode->oHandler = $this->fnFinishNode($oClause, \"CatchClause\");\n }\n $oNode->oFinalizer = $this->fnEat(TokenTypes::$aTypes['finally']) ? $this->fnParseBlock() : null;\n if (!$oNode->oHandler && !$oNode->oFinalizer)\n $this->fnRaise($oNode->iStart, \"Missing catch or finally clause\");\n return $this->fnFinishNode($oNode, \"TryStatement\");\n }",
"function test_4() {\n\ttry {\n\t\t$res = gather(function() {\n\t\t\ttake(1);\n\t\t\tthrow new Exception('meh');\n\t\t});\n\t}\n\tcatch (Exception $e) {\n\t\treturn true;\n\t}\n\treturn 'non-last()-generated exceptions are left alone';\n}",
"public function destruct()\n {\n restore_error_handler();\n }",
"public function cleanup()\n\t{\n\t\t\n\t}",
"public function __destruct(){\n if (!empty($this->_connPool)){\n foreach ($this->_connPool as $conn){\n $this->close($conn);\n }\n }\n }",
"public function cleanup()\n\t{\n\t}",
"function exec_catch( $cur ){\n try{\n oci_execute( $cur, OCI_DEFAULT );\n }catch(Exception $e){\n ##\n ## Might be something in buffer, so check first\n ##\n $this->get_dbms_output();\n $this->error( $e->getMessage() );\n }\n }",
"public function visitCatchAstNode( ezcTemplateCatchAstNode $catch )\n {\n $this->write( \"catch (\" . $catch->className . \" \" );\n $catch->variableExpression->accept( $this );\n $this->write( \")\\n{\\n\" );\n $this->increaseIndentation( $this->indentation );\n $catch->body->accept( $this );\n $this->restoreIndentation();\n $this->write( \"}\\n\" );\n }",
"public function __destruct()\n {\n set_error_handler($this->prevErrorHandler);\n set_exception_handler($this->prevExceptionHandler);\n }",
"public function visitCatchStatement(\n /*ICatchStatement*/ $node) /*: mixed*/ {\n\n $this->blockIndent = ' ';\n $block = /*(string)*/$node->getBlock()->accept($this);\n $class = /*(string)*/$node->getClass()->accept($this);\n $variable_name = $node->getVariableName();\n\n return \" catch ($class \\$$variable_name)\".$block;\n }",
"function __destruct() {\n if ($this->stid)\n oci_free_statement($this->stid);\n if ($this->conn)\n oci_close($this->conn);\n }",
"function __destruct() {\n\t\tif (count($this->locks) > 0) {\n\t\t\tif (DEBUG > 0) {\n\t\t\t\tforeach ($this->locks as $id=>$fp) {\n\t\t\t\t\t$this->unlock($id);\n\t\t\t\t}\n\t\t\t\twriteLog(\"these locks have not been unlocked:\".print_r($this->locks, true),KATA_ERROR);\n\t\t\t}\n\t\t}\n\t}",
"public function finalize() { }",
"public function tearDown()\n {\n $this->loop->run();\n\n if (!$this->exceptionQueue->isEmpty()) {\n // We can only really throw the first exception\n throw $this->exceptionQueue->dequeue();\n }\n }",
"abstract protected function _finalize();",
"private function assignDocBlockExceptions(): void\n {\n if (!$this->doc->hasTag('throws')) {\n return;\n }\n\n $throws = array_filter($this->doc->getTagsByName('throws'), function ($tag) {\n return $tag instanceof DocBlock\\Tags\\Throws;\n });\n\n foreach ($throws as $throw) {\n $exception = new ExceptionHandler($throw, $this->swagger, $this->config);\n\n $response = (new Response())\n ->setCode($exception->getCode())\n ->setDescription($exception->getMessage());\n\n foreach ($this->config->getResponseContentTypes() as $mimeType) {\n $response->pushContent(\n (new Content())\n ->setMimeType($mimeType)\n ->setSchema($exception->getSchema())\n );\n }\n\n $this->operation->pushResponse($response);\n }\n }",
"public function __destruct(){\r\n $this->cerrar(FALSE);\r\n }",
"public function __destruct()\n {\n if ($this->handle[self::PHP]) {\n $this->_close(self::PHP);\n }\n if (is_resource($this->handle[self::PERL])) {\n $this->_close(self::PERL);\n }\n if (is_resource($this->handle[self::PERL_COMPLETE])) {\n $this->_close(self::PERL_COMPLETE);\n }\n if (is_resource($this->handle[self::ERROR])) {\n $this->_close(self::ERROR);\n }\n }",
"public function testErrorHandling()\n\t{\n\t\tR::nuke();\n\t\tR::store( R::dispense( 'book' ) );\n\t\tR::freeze( FALSE );\n\t\tR::find( 'book2', ' id > 0' );\n\t\tpass();\n\t\tR::find( 'book', ' id2 > ?' );\n\t\tpass();\n\t\t$exception = NULL;\n\t\ttry {\n\t\t\tR::find( 'book', ' id = ?', array( 0, 1 ) );\n\t\t} catch( \\Exception $e ) {\n\t\t\t$exception = $e;\n\t\t}\n\t\tasrt( ( $exception instanceof SQL ), TRUE );\n\t\tR::freeze( TRUE );\n\t\t$exception = NULL;\n\t\ttry {\n\t\t\tR::find( 'book2', ' id > 0' );\n\t\t} catch( \\Exception $e ) {\n\t\t\t$exception = $e;\n\t\t}\n\t\tasrt( ( $exception instanceof SQL ), TRUE );\n\t\t$exception = NULL;\n\t\ttry {\n\t\t\tR::find( 'book', ' id2 > 0' );\n\t\t} catch( \\Exception $e ) {\n\t\t\t$exception = $e;\n\t\t}\n\t\tasrt( ( $exception instanceof SQL ), TRUE );\n\t}",
"public function __destruct()\n {\n $this->conexion = null;\n $this->prepare = null;\n $this->transaction = 0;\n $this->error = '';\n }",
"public function __destruct() {\n $this->commit();\n }",
"public function cleanup() {\n\t\t//TODO\n\t}"
] |
[
"0.649738",
"0.59266925",
"0.5907035",
"0.5659373",
"0.5375251",
"0.52767473",
"0.5271577",
"0.5195611",
"0.51870644",
"0.51147807",
"0.50574726",
"0.49994043",
"0.4967499",
"0.49396238",
"0.49395224",
"0.49262458",
"0.48884523",
"0.48869774",
"0.48866564",
"0.48863006",
"0.4882296",
"0.4879647",
"0.4871998",
"0.48621967",
"0.485119",
"0.48486406",
"0.48429638",
"0.48313117",
"0.48259446",
"0.48257008"
] |
0.61102104
|
1
|
[ > ] [modifiers] class|interface|trait name [typeParameters] [extends baseClass] [implements interfaces] block
|
public function visitTypeStatement(
/*ITypeStatement*/ $node) /*: mixed*/ {
$attributes = Vector {};
foreach ($node->getAttributes() as $attributes_elem) {
$attributes[] = /*(string)*/$attributes_elem->accept($this);
}
$modifiers = Vector {};
foreach ($node->getModifiers() as $modifiers_elem) {
$modifiers[] = /*(string)*/$modifiers_elem->accept($this);
}
$type_parameters = Vector {};
foreach ($node->getTypeParameters() as $type_parameters_elem) {
$type_parameters[] = /*(string)*/$type_parameters_elem->accept($this);
}
$base_class = null;
$base_class_value = $node->getBaseClass();
if ($base_class_value !== null) {
$base_class = /*(string)*/$base_class_value->accept($this);
}
$interfaces = Vector {};
foreach ($node->getInterfaces() as $interfaces_elem) {
$interfaces[] = /*(string)*/$interfaces_elem->accept($this);
}
$this->blockIndent = '';
$block = /*(string)*/$node->getBlock()->accept($this);
$this->blockIndent = '';
$result = $this->indent;
$result .= $this->visitVector($attributes, '<<', ', ',
">>\n".$this->indent, '');
$result .= $this->visitVector($modifiers, '', ' ', ' ', '');
switch ($node->getKind()) {
case TypeKinds::PHP_CLASS: $result .= 'class '; break;
case TypeKinds::PHP_INTERFACE: $result .= 'interface '; break;
case TypeKinds::PHP_TRAIT: $result .= 'trait '; break;
}
$result .= $node->getName();
$result .= $this->visitVector($type_parameters, '<', ', ', '>', '');
$result .= ' ';
if (is_string($base_class)) {
$result .= 'extends '.$base_class.' ';
}
$result .= $this->visitVector($interfaces, 'implements ', ', ', ' ', '');
$result .= $block."\n\n";
return $result;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"#[Pure]\nfunction class_implements($object_or_class, bool $autoload = true): array|false {}",
"abstract protected function interface();",
"function wp_apply_custom_classname_support($block_type, $block_attributes)\n {\n }",
"public function getClassTraits($class_name);",
"function wp_apply_generated_classname_support($block_type)\n {\n }",
"abstract protected function getClass();",
"public function findExtends($class);",
"private function _class_open ($name, $type = NULL, $extends = NULL)\n\t{\n\n\t\t$string = $this->_php_open().\"\\n\";\n\n\t\t$string .= \"class \" . ucfirst($name) . \" \";\n\n\t\tif ($extends === NULL && $type !== NULL) {\n\n\t\t\t$string .= \"extends MY_\" . ucfirst(str_replace('Generate::', '', $type));\n\n\t\t}\n\t\telseif ($extends !== NULL) {\n\n\t\t\t$string .= \"extends $extends \";\n\n\t\t}\n\n\t\t$string .= \"\\n{\".\"\\n\";\n\n\t\treturn $string;\n\n\t}",
"abstract public function getClass();",
"abstract public function getClass();",
"function runkit_class_adopt($classname, $parentname)\n{\n}",
"public function testInterface()\n {\n $this->assertInstanceOf('\\Tbs\\DocBlock\\Tag\\Abstraction' , $this->object);\n $this->assertInstanceOf('\\Tbs\\DocBlock\\Tag\\InterfaceTag', $this->object);\n }",
"public function testInterface()\n {\n $this->assertInstanceOf('\\Tbs\\DocBlock\\Tag\\Abstraction' , $this->object);\n $this->assertInstanceOf('\\Tbs\\DocBlock\\Tag\\InterfaceTag', $this->object);\n }",
"abstract public function getExtends();",
"private function _parseClass()\n {\n // check which interfaces are implemented\n $interfaces = $this->_reflectionClass->getInterfaceNames();\n foreach ($interfaces as $i) {\n if ($i == 'Webiny\\Component\\Rest\\Interfaces\\AccessInterface') {\n $this->_parsedClass->accessInterface = true;\n }\n\n if ($i == 'Webiny\\Component\\Rest\\Interfaces\\CacheKeyInterface') {\n $this->_parsedClass->cacheKeyInterface = true;\n }\n }\n }",
"protected function __construct() \r\n {\r\n parent::__construct();\r\n // to do: instantiate members representing substructures/blocks\r\n }",
"abstract public function getTraits();",
"function wp_register_custom_classname_support($block_type)\n {\n }",
"abstract function code($class, array $fields);",
"public function name(): string\n {\n return 'interface';\n }",
"public function abc(callable $var, int $var2, string $var3)\n// ^^^ entity.name.function\n// ^ storage.type\n// ^ storage.type\n// ^ storage.type\n {\n echo B::class;\n// ^ constant.class\n\n echo $this->pro1::FOO;\n// ^^^^^ variable.language\n// ^^ punctuation.accessor\n// ^^^^ variable.other.member\n// ^^ punctuation.accessor\n// ^^^ constant.other.class\n\n echo $this->pro1::bar();\n// ^^^^^ variable.language\n// ^^ punctuation.accessor\n// ^^^^ variable.other.member\n// ^^ punctuation.accessor\n// ^^^ variable.function\n\n parent::abc($var, $var2, $var3);\n// ^^^^^^ variable.language\n// ^^ punctuation.accessor\n\n $this->undo();\n// ^^^^^ variable.language\n// ^ punctuation.definition.variable\n\n $var2 = 'test';\n// ^^^^^ variable.other\n// ^ punctuation.definition.variable\n\n foreach (A::B() as $c => $d) {}\n // ^^ punctuation.accessor\n // ^ variable.function\n // ^^ keyword.operator.logical.php\n // ^^ keyword.operator.key.php\n\n return new self();\n// ^^^^ variable.language\n }",
"abstract function appliedOnClass(): ?Box;",
"function runkit_class_emancipate($classname)\n{\n}",
"function getClass();",
"public function register() {\n\n if ( ! function_exists( 'register_block_type' ) ) {\n return;\n }\n\n register_block_type( 'minervakb/' . $this->ID, array(\n 'attributes' => $this->get_block_attributes(),\n 'render_callback' => array($this, 'wrapped_render')\n ));\n }",
"#[@test]\n public function classImplementsComparatorInterface() {\n $class= $this->classloader->loadClass($this->classname);\n $interface= XPClass::forName('util.Comparator');\n $interfaces= new HashSet();\n $interfaces->addAll($class->getInterfaces());\n $this->assertTrue($interfaces->contains($interface));\n }",
"abstract public function inherit($parent);",
"protected function register(): void\n {\n if (function_exists('acf_register_block')) {\n acf_register_block_type(array(\n 'name' => $this->id,\n 'title' => $this->title,\n 'description' => $this->description,\n 'render_callback' => [$this, 'render'],\n 'category' => 'layout',\n 'icon' => 'screenoptions',\n 'keywords' => [$this->id, 'zkd'],\n 'supports' => ['anchor' => true]\n ));\n }\n }",
"function jtp(){\n echo \"Trait name = \",__TRAIT__;\n\t\t\techo \"<br><br>\";\n\t\t\techo \"Class Name = \".__CLASS__;\n }",
"public function getClassBody(&$body)\n {\n /**\n * A restriction struct with enumeration values\n */\n if ($this->getIsRestriction() && $this->getValues()->count() > 0) {\n $constantsDefined = array();\n foreach ($this->getValues() as $index => $value) {\n array_push($body, array('comment' => $value->getComment()));\n array_push($body, $value->getDeclaration($this->getName(), $index));\n array_push($constantsDefined, $this->getPackagedName() . '::' . $value->getCleanName());\n }\n /**\n * valueIsValid() method comments\n */\n $comments = array();\n array_push($comments, 'Return true if value is allowed');\n foreach ($constantsDefined as $constantName) {\n array_push($comments, '@uses ' . $constantName);\n }\n array_push($comments, '@param mixed $value value');\n array_push($comments, '@return bool true|false');\n array_push($body, array('comment' => $comments));\n /**\n * valueIsValid() method body\n */\n array_push($body, 'public static function valueIsValid($value)');\n array_push($body, '{');\n array_push($body, 'return in_array($value, array(' . implode(', ', $constantsDefined) . '));');\n array_push($body, '}');\n unset($comments);\n } elseif ($this->getAttributes()->count() > 0) {\n /**\n * A classic struct with attributes\n * Gathers informations about attributes\n */\n $bodyParameters = array();\n $bodyParams = array();\n $bodyUses = array();\n $constructParameters = array();\n $attributes = $this->getAttributes(false, true);\n foreach ($attributes as $attribute) {\n array_push($body, array('comment' => $attribute->getComment()));\n array_push($body, $attribute->getDeclaration());\n array_push($bodyParameters, '$' . lcfirst($attribute->getCleanName()) . (!$attribute->isRequired() ? ' = ' . var_export($attribute->getDefaultValue(), true) : ''));\n if (!Generator::instance()->getOptionGenerateWsdlClassFile()) {\n array_push($bodyUses, $this->getPackagedName() . '::' . $attribute->getSetterName() . '()');\n }\n $model = self::getModelByName($attribute->getType());\n if ($model) {\n if ($model->getIsStruct() && $model->getPackagedName() != $this->getPackagedName()) {\n if ($model->isArray()) {\n array_push($constructParameters, '\\'' . $attribute->getUniqueName() . '\\'=>($' . lcfirst($attribute->getCleanName()) . ' instanceof ' . $model->getPackagedName() . ') ? $' . lcfirst($attribute->getCleanName()) . ' : new ' . $model->getPackagedName() . '($' . lcfirst($attribute->getCleanName()) . ')');\n } else {\n array_push($constructParameters, '\\'' . $attribute->getUniqueName() . '\\'=>$' . lcfirst($attribute->getCleanName()));\n }\n $paramType = $model->getPackagedName();\n } else {\n array_push($constructParameters, '\\'' . $attribute->getUniqueName() . '\\'=>$' . lcfirst($attribute->getCleanName()));\n $paramType = $model->getInheritance() ? $model->getInheritance() : $attribute->getType();\n }\n } else {\n array_push($constructParameters, '\\'' . $attribute->getUniqueName() . '\\'=>$' . lcfirst($attribute->getCleanName()));\n $paramType = $attribute->getType();\n }\n array_push($bodyParams, $paramType . ' $' . lcfirst($attribute->getCleanName()));\n unset($paramType, $model);\n }\n /**\n * __contruct() method comments\n */\n $comments = array();\n array_push($comments, 'Constructor method for ' . $this->getCleanName());\n /**\n * Uses the parent constructor method\n */\n if (Generator::instance()->getOptionGenerateWsdlClassFile()) {\n array_push($comments, '@see parent::__construct()');\n }\n foreach ($bodyUses as $bodyUse) {\n array_push($comments, '@uses ' . $bodyUse);\n }\n foreach ($bodyParams as $bodyParam) {\n array_push($comments, '@param ' . $bodyParam);\n }\n array_push($comments, '@return ' . $this->getPackagedName());\n array_push($body, array('comment' => $comments));\n /**\n * __contruct() method body\n */\n array_push($body, 'public function __construct(' . implode(', ', $bodyParameters) . ')');\n array_push($body, '{');\n $model = self::getModelByName($this->getInheritance());\n /**\n * Uses the parent constructor method\n */\n if (Generator::instance()->getOptionGenerateWsdlClassFile()) {\n array_push($body, (($model && $model->getIsStruct()) ? self::getGenericWsdlClassName() : 'parent') . '::__construct(array(' . implode(', ', $constructParameters) . '), false);');\n }\n /**\n * Uses its own setters\n */\n else {\n foreach ($attributes as $attribute) {\n array_push($body, '$this->' . $attribute->getSetterName() . '($' . lcfirst($attribute->getCleanName()) . ');');\n }\n }\n array_push($body, '}');\n /**\n * Setters and getters\n */\n foreach ($this->getAttributes(false, true) as $attribute) {\n $attribute->getGetterDeclaration($body, $this);\n $attribute->getSetterDeclaration($body, $this);\n }\n unset($comments, $bodyParameters, $bodyParams, $constructParameters);\n /**\n * A array struct\n */\n if ($this->isArray()) {\n foreach ($this->getAttributes() as $attr) {\n $attribute = $attr;\n }\n if ($attribute instanceof StructAttribute) {\n $model = self::getModelByName($attribute->getType());\n $return = ($model && $model->getIsStruct()) ? $model->getPackagedName() : $attribute->getType();\n $comments = array();\n /**\n * current() method comments\n */\n array_push($comments, 'Returns the current element');\n array_push($comments, '@see ' . self::getGenericWsdlClassName() . '::current()');\n array_push($comments, '@return ' . $return);\n array_push($body, array('comment' => $comments));\n /**\n * current() method body\n */\n array_push($body, 'public function current()');\n array_push($body, '{');\n array_push($body, 'return parent::current();');\n array_push($body, '}');\n $comments = array();\n /**\n * item() method comments\n */\n array_push($comments, 'Returns the indexed element');\n array_push($comments, '@see ' . self::getGenericWsdlClassName() . '::item()');\n array_push($comments, '@param int $index');\n array_push($comments, '@return ' . $return);\n array_push($body, array('comment' => $comments));\n /**\n * item() method body\n */\n array_push($body, 'public function item($index)');\n array_push($body, '{');\n array_push($body, 'return parent::item($index);');\n array_push($body, '}');\n $comments = array();\n /**\n * first() method comments\n */\n array_push($comments, 'Returns the first element');\n array_push($comments, '@see ' . self::getGenericWsdlClassName() . '::first()');\n array_push($comments, '@return ' . $return);\n array_push($body, array('comment' => $comments));\n /**\n * first() method body\n */\n array_push($body, 'public function first()');\n array_push($body, '{');\n array_push($body, 'return parent::first();');\n array_push($body, '}');\n $comments = array();\n /**\n * last() method comments\n */\n array_push($comments, 'Returns the last element');\n array_push($comments, '@see ' . self::getGenericWsdlClassName() . '::last()');\n array_push($comments, '@return ' . $return);\n array_push($body, array('comment' => $comments));\n /**\n * last() method body\n */\n array_push($body, 'public function last()');\n array_push($body, '{');\n array_push($body, 'return parent::last();');\n array_push($body, '}');\n $comments = array();\n /**\n * offsetGet() method comments\n */\n array_push($comments, 'Returns the element at the offset');\n array_push($comments, '@see ' . self::getGenericWsdlClassName() . '::last()');\n array_push($comments, '@param int $offset');\n array_push($comments, '@return ' . $return);\n array_push($body, array('comment' => $comments));\n /**\n * offsetGet() method body\n */\n array_push($body, 'public function offsetGet($offset)');\n array_push($body, '{');\n array_push($body, 'return parent::offsetGet($offset);');\n array_push($body, '}');\n if ($model && $model->getIsRestriction()) {\n $comments = array();\n /**\n * add() method comments\n */\n array_push($comments, 'Add element to array');\n array_push($comments, '@see ' . self::getGenericWsdlClassName() . '::add()');\n array_push($comments, '@uses ' . $model->getPackagedName() . '::valueIsValid()');\n array_push($comments, '@param ' . $model->getPackagedName() . ' $item');\n array_push($comments, '@return ' . $return);\n array_push($body, array('comment' => $comments));\n /**\n * add() method body\n */\n array_push($body, 'public function add($item)');\n array_push($body, '{');\n array_push($body, 'return ' . $model->getPackagedName() . '::valueIsValid($item) ? parent::add($item) : false;');\n array_push($body, '}');\n }\n /**\n * getAttributeName() method comments\n */\n $comments = array();\n array_push($comments, 'Returns the attribute name');\n array_push($comments, '@see ' . self::getGenericWsdlClassName() . '::getAttributeName()');\n array_push($comments, '@return string ' . $attribute->getCleanName());\n array_push($body, array('comment' => $comments));\n /**\n * getAttributeName() method body\n */\n array_push($body, 'public function getAttributeName()');\n array_push($body, '{');\n array_push($body, 'return \\'' . $attribute->getCleanName() . '\\';');\n array_push($body, '}');\n unset($comments, $model);\n }\n unset($attribute);\n }\n /**\n * __set_state method override\n */\n if (Generator::instance()->getOptionGenerateWsdlClassFile()) {\n /**\n * __set_state() method comments\n */\n $comments = array();\n array_push($comments, 'Method called when an object has been exported with var_export() functions');\n array_push($comments, 'It allows to return an object instantiated with the values');\n array_push($comments, '@see ' . self::getGenericWsdlClassName() . '::__set_state()');\n array_push($comments, '@uses ' . self::getGenericWsdlClassName() . '::__set_state()');\n array_push($comments, '@param array $array the exported values');\n array_push($comments, '@return ' . $this->getPackagedName());\n array_push($body, array('comment' => $comments));\n unset($comments);\n /**\n * __set_state method body\n */\n array_push($body, 'public static function __set_state(array $array, $className = __CLASS__)');\n array_push($body, '{');\n array_push($body, 'return parent::__set_state($array, $className);');\n array_push($body, '}');\n }\n }\n }"
] |
[
"0.53857875",
"0.52956814",
"0.51679605",
"0.5107504",
"0.5088315",
"0.5049945",
"0.5033937",
"0.50279397",
"0.5016386",
"0.5016386",
"0.49825275",
"0.49670488",
"0.49670488",
"0.49276498",
"0.4888743",
"0.48747885",
"0.4825446",
"0.48181692",
"0.477673",
"0.47071272",
"0.47006795",
"0.4684475",
"0.46705812",
"0.46616298",
"0.46306995",
"0.46164605",
"0.46114713",
"0.45905408",
"0.459023",
"0.45898247"
] |
0.53869087
|
0
|
type name [typeParameters] [as constraint] = typeAnnotation; newtype name [typeParameters] [as constraint] = typeAnnotation;
|
public function visitTypedefStatement(
/*ITypedefStatement*/ $node) /*: mixed*/ {
$type_parameters = Vector {};
foreach ($node->getTypeParameters() as $type_parameters_elem) {
$type_parameters[] = /*(string)*/$type_parameters_elem->accept($this);
}
$constraint = null;
$constraint_value = $node->getConstraint();
if ($constraint_value !== null) {
$constraint = /*(string)*/$constraint_value->accept($this);
}
$type_annotation = /*(string)*/$node->getTypeAnnotation()->accept($this);
$result = $this->indent.($node->getIsOpaque() ? 'newtype' : 'type');
$result .= $this->visitVector($type_parameters, '<', ', ', '>', '');
if (is_string($constraint)) {
$result .= ' as '.$constraint;
}
$result .= ' = '.$type_annotation.";\n";
return $result;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function getTypeParameters($type);",
"abstract public function register_type();",
"public function addType($type);",
"public function attributeTypes(): TypeCollection;",
"protected function getTypeParam()\n {\n }",
"function registerFieldType($name, $type);",
"public abstract function getTypeAttribute();",
"public function type($type);",
"function register_field_type($class)\n {\n }",
"abstract protected function getType();",
"public function add(TypeInterface $type) : TypeInterface;",
"abstract public function type();",
"abstract public function type();",
"abstract public function getType();",
"abstract public function getType();",
"abstract public function getType();",
"abstract public function getType();",
"abstract public function getType();",
"abstract public function getType();",
"abstract public function createAnnotation(array $parameters);",
"function getTypeConverter() ;",
"function graphql_format_type_name($type_name)\n {\n }",
"public function getTypeAttribute();",
"public function getType(string $parameter);",
"function assertType(string $type, $value): void // phpcs:ignore\n{\n}",
"public function getType(): TypeDefinition;",
"public static function register_type()\n {\n }",
"public static function register_type()\n {\n }",
"public static function register_type()\n {\n }",
"public static function register_type()\n {\n }"
] |
[
"0.5619269",
"0.5548373",
"0.53079176",
"0.52859044",
"0.5280409",
"0.526239",
"0.52358234",
"0.5191316",
"0.51821744",
"0.5122914",
"0.50727683",
"0.50722",
"0.50722",
"0.5071252",
"0.5071252",
"0.5071252",
"0.5071252",
"0.5071252",
"0.5071252",
"0.5048932",
"0.504087",
"0.5034404",
"0.50312936",
"0.5025002",
"0.50233114",
"0.50062877",
"0.49889028",
"0.49889028",
"0.49889028",
"0.49889028"
] |
0.57726026
|
0
|
return anchor tag with li tag
|
function anchor_li($uri = '', $title = '', $attributes = '', $li_attributes = '') {
$return = '<li ' . $li_attributes . '>';
$return .= anchor($uri, $title, $attributes);
$return .= '</li>';
return $return;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function renderTagAnchor($result);",
"protected function getTag()\n {\n return 'ul';\n }",
"public function create_links()\n {\n \t$txt = '<ul>';\n \t$last = end($this->breadcrumb);\n \tforeach($this->breadcrumb AS $breadcrumb)\n \t{\n \t\t$url = '';\n \t\t$class = FALSE;\n \t\tif($breadcrumb['active'] == '1')\n \t\t{\n \t\t\t$class = 'active';\n \t\t}\n \t\t$txt .= '<li><a href=\"'.$breadcrumb['url'].'\" class=\"'.$class.'\" title=\"'.$breadcrumb['txt'].'\">'.$breadcrumb['txt'].'</a></li>';\n \t\t$class = '';\n \t}\n \t\n \t$txt .= '</ul>';\n \treturn $txt;\n }",
"function makeLinks($nav1)\n{\n $myReturn = '';\n foreach($nav1 as $url => $text){\n \n if($url == THIS_PAGE){\n $myReturn .= \"<li><a class=\\\"selected\\\" href=\\\"$url\\\">$text</a></li>\";\n }else{\n $myReturn .= \"<li><a href=\\\"$url\\\">$text</a></li>\";\n }\n }\n \n return $myReturn;\n}",
"function makeLinks($nav1)\r\n{\r\n $myReturn = '';\r\n foreach($nav1 as $url => $text){\r\n \r\n if($url == THIS_PAGE){\r\n $myReturn .= \"<li><a class=\\\"selected\\\" href=\\\"$url\\\">$text</a></li>\";\r\n }else{\r\n $myReturn .= \"<li><a href=\\\"$url\\\">$text</a></li>\";\r\n }\r\n }\r\n \r\n return $myReturn;\r\n\r\n \r\n}",
"public function asLink()\n {\n $label = $this->title ?: $this->value;\n return '<a href=\"' . $this->href .'\" title=\"' . $label . '\">' . $label . '</a>';\n }",
"public function renderTagAnchor($result) {\n\t\t$uri = $this->thumbnailService->getAnchorUri();\n\t\tif (! $uri) {\n\t\t\t$uri = $this->getUri();\n\t\t}\n\n\t\treturn sprintf('<a href=\"%s\" target=\"_blank\" data-uid=\"%s\">%s</a>',\n\t\t\t$uri,\n\t\t\t$this->getFile()->getUid(),\n\t\t\t$result\n\t\t);\n\t}",
"protected function _toHtml(): string\n {\n if (false != $this->getTemplate()) {\n return parent::_toHtml();\n }\n\n return sprintf('<li><a %s>%s</a>',\n $this->getLinkAttributes(), $this->escapeHtml($this->getLabel())\n );\n }",
"public function links_list() {\n\t\t$str = \"\";\n\n\t\tforeach ($this->def_json[\"links\"] as $link) {\n\t\t\t$str .= Builder::root(\"li\", NULL,\n\t\t\t\tBuilder::child(\"a\", array(\"href\" => $link[\"url\"]), $link[\"title\"])\n\t\t\t)->saveHTML();\n\t\t}\n\n\t\treturn $str;\n\t}",
"public function GetTagName() {\n\t\treturn 'li';\n\t}",
"function minorite_menu_link__home(array $variables) {\n $element = $variables['element'];\n\n $output = l('<span>' . $element['#title'] . '</span>', $element['#href'], array('html' => TRUE));\n return '<li>' . $output . \"</li>\\n\";\n}",
"function link_a($dir,$cont){\r\n return \"<a href=\\\"$dir\\\">$cont</a>\";\r\n }",
"public function renderTagAnchor($result) {\n\n\t\t$file = $this->file;\n\n\t\treturn sprintf('<a href=\"%s%s\" target=\"%s\">%s</a>',\n\t\t\t$this->getAnchorUri() ? $this->getAnchorUri() : $file->getPublicUrl(TRUE),\n\t\t\t$this->getAppendTimeStamp() ? '?' . $file->getProperty('tstamp') : '',\n\t\t\t$this->getTarget(),\n\t\t\t$result\n\t\t);\n\t}",
"public function render()\n\t{\n\t\treturn '<li>'.$this->html->link($this->link, $this->title, $this->attributes).$this->renderNestedMenu().'</li>';\n\t}",
"function my_walker_nav_menu_start_el($item_output, $item, $depth, $args) {\n $classes = implode(' ', $item->classes);\n $item_output = preg_replace('/<a /', '<a class=\"'.$classes.'\"', $item_output, 1);\n return $item_output;\n }",
"function display_list_emp($employees)\n{\n $li_out = null;\n foreach ($employees as $id => $name) {\n $li_out = \"<a class='list-group-item \";\n if (isset($_GET['id']) && $_GET['id'] == $id) {\n $li_out .= \"active\";\n }\n $li_out .= \"' href='angajati.php?id=$id'>$name</a>\";\n echo $li_out;\n }\n return;\n}",
"function atwork_menu_link(array $variables) {\n $element = $variables['element'];\n $sub_menu = '';\n\n if ($element['#below']) {\n $sub_menu = drupal_render($element['#below']);\n }\n $output = l($element['#title'], $element['#href'], $element['#localized_options']);\n // Adding a class depending on the TITLE of the link (not constant)\n $element['#attributes']['class'][] = atwork_id_safe($element['#title']);\n // Adding a class depending on the ID of the link (constant)\n $element['#attributes']['class'][] = 'mid-' . $element['#original_link']['mlid'];\n return '<li' . drupal_attributes($element['#attributes']) . '>' . $output . $sub_menu . \"</li>\\n\";\n}",
"protected function _getTagTrail()\n {\n if ($this->_browser->tagCount() >= 1) {\n $html = '<div class=\"trean-tags-browsing\">' . Horde::img('filter.png') . '<ul class=\"horde-tags\">';\n foreach ($this->_browser->getTags() as $tag => $id) {\n $html .= '<li>' . htmlspecialchars($tag)\n . $this->_linkRemoveTag($tag)->link()\n . Horde::img('delete-small.png', _(\"Remove from search\"))\n . '</a></li>';\n }\n return $html .= '</ul></div>';\n }\n\n return '';\n }",
"function makeLinks($fooArray)\n{\n $myReturn = '';\n foreach($fooArray as $url => $text)\n {\n \tif(THIS_PAGE==$url) {\n \t\t$myReturn .= '<li class=\"current\"><a href=\"' . $url . '\">' . $text . '</a></li>';\n \t}\n\t\telse {\n\t\t\t$myReturn .= '<li><a href=\"' . $url . '\">' . $text . '</a></li>';\n\t\t}\n \n } \n return $myReturn; \n}",
"public function links() {\n\t\t?>\n\t\t<ul>\n\t\t\t<li>\n\t\t\t\t<a href=\"http://bit.ly/15uoww1\" target=\"_blank\"><?php echo __( 'Installation manual', $this->_google_drive_cdn->get_textdomain() ); ?></a>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<a href=\"http://bit.ly/W9GDQT\" target=\"_blank\"><?php echo __( 'Frequently Asked Questions', $this->_google_drive_cdn->get_textdomain() ); ?></a>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<a href=\"http://bit.ly/WW93Sk\" target=\"_blank\"><?php echo __( 'Report a bug', $this->_google_drive_cdn->get_textdomain() ); ?></a>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<a href=\"http://bit.ly/11UE2lF\" target=\"_blank\"><?php echo __( 'Request a function', $this->_google_drive_cdn->get_textdomain() ); ?></a>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<a href=\"http://bit.ly/XkivOW\" target=\"_blank\"><?php echo __( 'Submit a translation', $this->_google_drive_cdn->get_textdomain() ); ?></a>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<a href=\"http://bit.ly/UlDG4t\" target=\"_blank\"><?php echo __( 'More cool stuff by WPBuddy', $this->_google_drive_cdn->get_textdomain() ); ?></a>\n\t\t\t</li>\n\t\t</ul>\n\t<?php\n\t}",
"function ou_df_menu_link(&$variables) {\n $element = $variables['element'];\n $sub_menu = '';\n\n if ($element['#below']) {\n $sub_menu = drupal_render($element['#below']);\n }\n\n $title = $element['#title'];\n if (empty($element['#localized_options']['html'])) {\n $title = check_plain($title);\n }\n $element['#localized_options']['html'] = TRUE;\n $output = l('<span>' . $title . '</span>', $element['#href'], $element['#localized_options']);\n\n if (in_array('active', $element['#attributes']['class']) || in_array('active-trail', $element['#attributes']['class'])) {\n $element['#attributes']['class'][] = 'int-nav-active';\n }\n return '<li' . drupal_attributes($element['#attributes']) . '>' . $output . $sub_menu . \"</li>\\n\";\n}",
"function makeLinks($nav)\r\n{\r\n$myReturn='';\r\n foreach($nav as $key => $value){\r\n if(THIS_PAGE == $key){//current page add active class\r\n \r\n $myReturn .='\r\n <li class=\"nav-item \">\r\n <a class=\"nav-link active\" href=\"' . $key . ' \">' . $value . ' </a>\r\n </li>'; \r\n \r\n \r\n }else{//add no formatting\r\n \r\n\r\n \r\n $myReturn .='\r\n <li class=\"nav-item\">\r\n <a class=\"nav-link\" href=\"' . $key . ' \">' . $value . ' </a>\r\n </li>'; }\r\n \r\n \r\n \r\n }\r\n \r\n \r\n return $myReturn;\r\n\r\n\r\n\r\n}",
"function makeLinks($nav){\n \n $myReturn = '';\n foreach($nav as $key => $value){\n \n if(THIS_PAGE == $key)\n {//current page add active class \n $myReturn .= '\n <li class=\"nav-item\">\n <a class=\"nav-link active\" href=\"' . $key . '\">' . $value . '</a>\n </li>';\n \n \n }else{//add formatting\n $myReturn .= '\n <li class=\"nav-item\">\n <a class=\"nav-link\" href=\"' . $key . '\">' . $value . '</a>\n </li>';\n \n }\n \n }\n \n return $myReturn;\n \n}",
"function makeListTags(){\n //add prefix for production\n $rootPrefix = \"\";\n $addPrefix = \"\";\n if ($_SERVER['SERVER_NAME'] == \"localhost\"){\n $rootPrefix = \"/portfolio\";\n } else {\n $addPrefix = \"3/public_html/sethjkalkstein.com\";\n }\n\n $listOfLinks = [\"About\" => $rootPrefix.\"/index.php\", \"Projects\" => $rootPrefix.\"/projects/index.php\", \"Resume\" => $rootPrefix.\"/resume.pdf\", \"Contact\" => $rootPrefix.\"/contact.php\"];\n\n foreach($listOfLinks as $lTitle => $lLink){\n $idText = \"\";\n if (getCurrentFile() == $addPrefix.$lLink){\n $idText = 'id=\"currentPage\"';\n }\n echo '<li><a '.$idText.' href=\"'.$lLink.'\">'.$lTitle.'</a></li>';\n }\n}",
"public function getLiActiveClass(): string;",
"protected function createAnchor($item, $level)\n {\n \t// <a href=\"{{ route('admin.home') }}\"><i class=\"fa fa-lg fa-fw fa-home\"></i> <span class=\"menu-item-parent\">Dashboard</span></a>\n $output = '<a class=\"menu__item\" href=\"' . $item['url'] . '\">';\n $output .= $this->createIcon($item);\n\n if ($level === 1) {\n\t\t\t$output .= '<span class=\"menu-item-parent\">';\n }\n\n $output .= $item['name'];\n\n\t\tif ($level === 1) {\n\t\t\t$output .= '</span>';\n }\n\n $output .= '</a>';\n\n return $output;\n }",
"public function getLiClass(): string;",
"function makeLinks($linkArray)\n{\n $myReturn = '';\n\n foreach($linkArray as $url => $text)\n {\n if($url == THIS_PAGE)\n {//selected page - add class reference\n\t \t$myReturn .= '<li><a class=\"selected\" href=\"' . $url . '\">' . $text . '</a></li>' . PHP_EOL;\n \t}else{\n\t \t$myReturn .= '<li><a href=\"' . $url . '\">' . $text . '</a></li>' . PHP_EOL;\n \t} \n }\n \n return $myReturn; \n}",
"function get_tag_link($tag)\n {\n }",
"function internal_navigation_item($title, $href) {\n \n // Strip first forward slash (start of string)\n $script = substr($_SERVER['SCRIPT_NAME'], 1);\n \n if ($script === $href) {\n return \"<li><a class='active' href='$href'>$title</a></li>\";\n } else {\n return \"<li><a href='$href'>$title</a></li>\";\n }\n}"
] |
[
"0.66614765",
"0.62212414",
"0.6171266",
"0.60621727",
"0.60551596",
"0.6051701",
"0.6027756",
"0.600613",
"0.5970885",
"0.594245",
"0.589223",
"0.5856903",
"0.5851895",
"0.5839884",
"0.58353674",
"0.58286613",
"0.5818971",
"0.57898027",
"0.5786403",
"0.57852817",
"0.5779902",
"0.5743067",
"0.5738621",
"0.5738475",
"0.5732853",
"0.56660235",
"0.5651262",
"0.5638292",
"0.5634563",
"0.5626542"
] |
0.746641
|
0
|
get the fixure file
|
private function getFixure()
{
return dirname(__DIR__).DIRECTORY_SEPARATOR.'Fixures'.DIRECTORY_SEPARATOR.'test.xml';
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function getFactuurFile() {\n\t\treturn $this->factuurFile;\n\t}",
"public function getf() {\n return $this->file;\n }",
"function get_file()\n\t{\n\t\treturn $this->file;\n\t}",
"public static function getFile(){\n\t\t$file_name = base_path().\"/resources/views/DURC/durc_html.mustache\";\n\t\treturn($file_name);\n\t}",
"function base_getUF(){\n if (!file_exists('uf')) {\n mkdir(\"uf/\", 0777);\n }\n if ( file_exists('uf/uf.txt') ){\n $fichero = file_get_contents('uf/uf.txt', true);\n $fichero_a = explode(\"|\", $fichero);\n if ($fichero_a[0]==DATE(\"Y-m-d\").\"txt\"){\n\t\treturn $fichero_a[1];\n }else{\n \treturn base_contactUFSource();\n } \n }else{\n return base_contactUFSource();\n }\n}",
"public function get_file() {\n\t\treturn $this->file;\n\t}",
"public function getFile()\n\t{\n\t\treturn $this->file; \n\n\t}",
"public function get_file()\n {\n return $this->file;\n }",
"public function getFile(): string\n {\n return $this->file;\n }",
"public function getFile()\n {\n return $this->file;\n }",
"public function getFile()\n {\n return $this->file;\n }",
"public function getFile()\n {\n return $this->file;\n }",
"public function getFile()\n {\n return $this->file;\n }",
"public function getFile()\n {\n return $this->file;\n }",
"public function getFile()\n {\n return $this->file;\n }",
"public function getFile()\n {\n return $this->file;\n }",
"public function getFile()\n {\n return $this->file;\n }",
"public function getFile()\n {\n return $this->file;\n }",
"public function getFile()\n {\n return $this->file;\n }",
"public function getFile()\n {\n return $this->file;\n }",
"public static function getFile() {}",
"public function getFile()\n\t{\n\t\treturn $this->file;\n\t}",
"public function getFile()\n\t{\n\t\treturn $this->file;\n\t}",
"public function getFile() {\n return $this->file;\n }",
"public function getFile() {\n return $this->file;\n }",
"public function getFile ();",
"public function getFile():string {\n\t\t\treturn $this->file;\n\t\t}",
"public function getFile() {\n\n return $this->file;\n }",
"function getSourceFile() ;",
"public function getFile()\n {\n return $this->_File;\n }"
] |
[
"0.69962627",
"0.6730245",
"0.6683745",
"0.66785115",
"0.6601793",
"0.65597725",
"0.6546444",
"0.64861715",
"0.6485986",
"0.64609",
"0.64609",
"0.64609",
"0.64609",
"0.64609",
"0.64609",
"0.64609",
"0.64609",
"0.64609",
"0.64609",
"0.64609",
"0.6453886",
"0.6446189",
"0.6446189",
"0.6441907",
"0.6441907",
"0.64289916",
"0.6412275",
"0.6381153",
"0.63778234",
"0.6362197"
] |
0.7222649
|
0
|
Download XML to file based on next token, returns true if there are more pages to iterate over
|
public function downloadNext(string $nextToken, string $targetFolder, int $pageSize = self::MAX_PAGE_SIZE): bool
{
$response = $this->getNext($nextToken, $pageSize);
$this->saveOnixToDisk($response, $targetFolder);
return $response->hasHeader('Link');
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function next(): void\n {\n if (!\\next($this->responseData->_embedded->items) && $this->fetchMore) {\n if ($this->getPage() < $this->getPages()) {\n $this->responseData = $this->client->requestLink($this->getLinks()->next->href);\n $this->rewind();\n }\n }\n }",
"public function hasNextPage();",
"function next() {\n\n\t\tif (is_null($this->_httpq->next())) { return false; }\n\n\t\treturn true;\n\n\t}",
"public function getNextPage();",
"public function has_next()\n\t{\n\t\treturn $this->get_cur_page() < $this->get_total_pages();\n\t}",
"protected function makeFeedDocument() {\n\t\t$dataProvider = $this->dataProviderDocument();\n\t\tif (!is_object($dataProvider)) {\n\t\t\treturn true;\n\t\t}\n\t\t$getBackup = $_GET;\n\t\t$this->log('Document feed has begun');\n\t\t\n\t\t$feedCreator = $this->getFeedCreator();\n\t\t$pageNumber = 0;\n\t\twhile (true) {\n\t\t\t$this->beforeMakeFeedDocumentPage();\n\t\t\t$sourceDocuments = $dataProvider->getData(true);\n\t\t\tif (empty($sourceDocuments)) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tforeach ($sourceDocuments as $sourceDocument) {\n\t\t\t\t$documentData = $this->extractDocumentData($sourceDocument);\n\t\t\t\t$feedCreator->writeDocument($documentData);\n\t\t\t}\n\t\t\t$this->enforceGarbageCollection();\n\t\t\t\n\t\t\t$this->afterMakeFeedDocumentPage();\n\t\t\t\n\t\t\t$pageNumber++;\n\t\t\t$pageCount = $dataProvider->getPagination()->getPageCount();\n\t\t\tif ($pageNumber>=$pageCount) {\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\t$dataProvider->getPagination()->setCurrentPage($pageNumber);\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->enforceGarbageCollection();\n\t\t$_GET = $getBackup;\n\t\t$this->log('Document feed complete');\n\t\treturn true;\n\t}",
"public function has_next_page()\n {\n }",
"public function testGetNextPage()\n {\n // most directory\n $this->assertStringEndsWith(\n '2.3/test/',\n $this->manifest->getNextPage(\n DOCSVIEWER_PATH . '/tests/docs/en/subfolder/subsubfolder/subsubpage.md',\n DOCSVIEWER_PATH . '/tests/docs/en/'\n )->Link\n );\n\n // after sorting, 2 is shown.\n $this->assertContains(\n '/intermediate/',\n $this->manifest->getNextPage(\n DOCSVIEWER_PATH . '/tests/docs/en/sort/01-basic.md',\n DOCSVIEWER_PATH . '/tests/docs/en/'\n )->Link\n );\n\n\n // next gets the following URL\n $this->assertContains(\n '/test/',\n $this->manifest->getNextPage(\n DOCSVIEWER_PATH . '/tests/docs-v2.4/en/index.md',\n DOCSVIEWER_PATH . '/tests/docs-v2.4/en/'\n )->Link\n );\n\n\n // last folder in a entity does not leak\n $this->assertNull(\n $this->manifest->getNextPage(\n DOCSVIEWER_PATH . '/tests/docs/en/test.md',\n DOCSVIEWER_PATH . '/tests/docs/en/'\n )\n );\n }",
"public function next():TCMSFile|bool\n {\n return parent::Next();\n }",
"public function next()\n {\n // If the current element is the last element, return null\n if ($this->current === ($this->count() - 1)) {\n $this->current = null;\n\n return;\n }\n\n // If the next element is greater than the result count, and this is the last page, return null\n if (($this->current + 1) > count($this->results) && (($this->page + 1) > $this->pages)) {\n $this->current = null;\n\n return;\n }\n\n // Advance to the next page\n $this->request->getQuery()->set(\"page\", ++$this->page);\n\n // Retrieve the next page\n $response = $this->request->send()->json();\n\n // Append the results to the results array\n $this->results = array_merge($this->results, $response[\"results\"]);\n\n // Advance to the next element\n $this->current++;\n\n return;\n }",
"function scrap_page_next($url)\n {\n $page = curl_get_file($url);\n $regex = '@(?s)<h2.*?Add to Compare@';\n preg_match_all($regex,$page,$match);\n if($match == null)\n echo \"No match found!!\";\n else\n {\n foreach($match[0] as $m)\n scrap($m);\n }\n \n //To find next url\n $regex = '@<link\\s*rel=\"next\"\\s*href=\"(.*)?\"@';\n preg_match($regex,$page,$u);\n if($u == null)\n return null;\n else \n return $u[1]; \n }",
"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}",
"protected function _getNextToken() {}",
"protected function _getNextToken() {}",
"function hasNextPage() {\n\t\treturn $this->hasPage($this->p + 1);\n\t}",
"function next()\n\t{\n\t\t$this->done = true;\n\t}",
"public function nextPage()\n\t{\n\t\treturn $this->getIsNextPageAvailable() ? parent::nextPage() : false;\n\t}",
"public function next()\n {\n next($this->zipModel->getEntries());\n }",
"abstract protected function fetchNextPage(): ?int;",
"public function next()\n {\n $this->fileObject->next();\n }",
"public function getNext() {\n\t\treturn $this->pagefiles->getNext($this); \n\t}",
"public function hasNextPageToken(){\n return $this->_has(2);\n }",
"public function hasNextPageToken(){\n return $this->_has(2);\n }",
"private function isNextPage() {\n return isset($this->pages[$this->currentPageNumber + 1]);\n }",
"protected function checkForMorePages()\n {\n $this->hasMore = $this->items->count() > $this->limit;\n\n $this->items = $this->items->slice(0, $this->limit);\n }",
"public function hasNextPageToken(){\n return $this->_has(3);\n }",
"public function next()\n {\n $this->curIndex++;\n if($this->curIndex >= count($this->res)){\n $this->MakeNextReq();\n }\n }",
"public function next()\n {\n $this->valid = (false !== next($this->sessionData)); \n }",
"public function getNextPage(){\r\n\t\t$page=$this->_vars['current_page'];\r\n\t\t$total=$this->_vars['total_pages'];\r\n\t\tif($this->_vars['current_offset']+$this->_vars['items_per_page']>=$this->_vars['total_items']) return false;\r\n\t\treturn $page>=$total?false:$page+1;\r\n\t}",
"public function next(): bool;"
] |
[
"0.61617285",
"0.5715129",
"0.56352675",
"0.5558342",
"0.555011",
"0.55143976",
"0.54988116",
"0.54587066",
"0.54421127",
"0.5441053",
"0.540589",
"0.5307012",
"0.5306313",
"0.5306313",
"0.5290135",
"0.52834636",
"0.52824056",
"0.5279168",
"0.5273809",
"0.52478284",
"0.5242896",
"0.5203628",
"0.5203628",
"0.5189163",
"0.5183855",
"0.5182646",
"0.517153",
"0.51612914",
"0.51488185",
"0.51297784"
] |
0.58968
|
1
|
Download XML to file based on after DateTime, returns token to use with downloadNext to iterate over further pages.
|
public function downloadAfter(\DateTime $afterDate, string $targetFilename, bool $downloadAllPages = true, int $pageSize = self::MAX_PAGE_SIZE): string
{
$response = $this->getAfter($afterDate, $pageSize);
$this->saveOnixToDisk($response, $targetFilename);
$morePages = $response->hasHeader('Link');
if ($downloadAllPages && $morePages) {
while ($morePages) {
$morePages = $this->downloadNext($this->lastNextToken, $targetFilename, $pageSize);
}
}
return $this->lastNextToken;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private function nextLink()\n {\n $y = $this->year;\n $d = intval($this->day);\n $d = $d < 10 ? '0' . $d : $d;\n $m = intval($this->month);\n $m = $m < 10 ? '0' . $m : $m;\n\n $time = $y . '-' . $m . '-' . $d;\n\n if ($this->view == \"week\") {\n $time = strtotime('next sunday', strtotime($time . ' -1 day'));\n $time = date('Y-m-d', $time);\n $time = date('Y-m-d', strtotime($time . '+1week'));\n } elseif ($this->view == \"day\") {\n $time = date('Y-m-d', strtotime($time . '+1day'));\n } else {\n $time = date('Y-m', strtotime($y . '-' . $m . '-01 +1month'));\n }\n\n $url = $this->basePath . '?cdate=' . $time;\n return $url . $this->getOldGET();\n }",
"public function downloadFile()\n {\n // Check for request forgeries.\n Session::checkToken('get') or jexit(Text::_('JINVALID_TOKEN'));\n\n $model = $this->getModel();\n $model->downloadFile();\n }",
"public function download_xml_file(){\r\n \r\n if (file_exists($this->attachfile)) {\r\n $attachfilename = 'export_xml_'.date(\"Y-m-d\").'.xml';\r\n \r\n header(\"Content-Description: File Transfer\");\r\n header(\"Content-type: text/xml\");\r\n header('Content-Disposition: attachment; filename=\"'.$attachfilename.'\"');\r\n \r\n readfile($this->attachfile);\r\n unlink($this->attachfile);\r\n return true;\r\n }\r\n return false;\r\n }",
"public function getAfter(\\DateTime $afterDate, int $pageSize = self::MAX_PAGE_SIZE): ResponseInterface\n {\n $response = $this->executeGetRequest(null, $afterDate, $pageSize, self::PATH);\n $this->lastNextToken = $response->getHeaderLine('Next');\n return $response;\n }",
"public function downloadFile();",
"public function setDownloadAt(string $date): self\n {\n $this->setParam(self::DOWNLOAD_AT, $date);\n return $this;\n }",
"private function fileDownload()\n {\n /**\n * Defined variables\n */\n $configHelper = $this->dataHelper;\n $request = $this->getRequest();\n $ds = DIRECTORY_SEPARATOR;\n $baseDir = DirectoryList::VAR_DIR;\n $fileFactory = $this->fileFactory;\n $contentType = 'application/octet-stream';\n $paramNameRequest = $request->getParam('m');\n $packagePathDir = $configHelper->getConfigAbsoluteDir();\n\n $lastItem = $this->packageFilter();\n $versionPackageData = $lastItem;\n $file = $versionPackageData->getData('file');\n\n $packageName = str_replace('_', '/', $paramNameRequest);\n $correctPathFile = $packagePathDir . $ds . $packageName . $ds . $file;\n\n $fileName = $file;\n $content = file_get_contents($correctPathFile, true);\n $fileDownload = $fileFactory->create($fileName, $content, $baseDir, $contentType);\n\n return $fileDownload;\n }",
"public function exportXmlAction()\n {\n $fileName = 'curriculumdoc.xml';\n $content = $this->getLayout()->createBlock('bs_curriculumdoc/adminhtml_curriculumdoc_grid')\n ->getXml();\n $this->_prepareDownloadResponse($fileName, $content);\n }",
"protected function getUrl()\r\n\t{\r\n\t\t$xmlData = file_get_contents($this->url);\r\n\t\tif (file_put_contents($this->localFile, $xmlData)) {\r\n\t\t\t$this->log->write(Logger::SUCCESS,'Saved '.$this->localFile);\r\n\t\t}\r\n\t\t\r\n\t\t/* //CURL\r\n\t\t$ch = curl_init();\r\n\t\tcurl_setopt($ch, CURLOPT_URL,$this->url);\r\n\t\t$this->log->write(Logger::SUCCESS,'Downloaded '.$this->url);\r\n\t\t$fp = fopen($this->localFile, 'w');\r\n\t\tcurl_setopt($ch, CURLOPT_FILE, $fp);\r\n\t\tcurl_exec ($ch);\r\n\t\tcurl_close ($ch);\r\n\t\tfclose($fp);\r\n\t\t$this->log->write(Logger::SUCCESS,'Saved '.$this->localFile);\r\n\t\t*/\r\n\t}",
"public function download_docx(){\r\n\t\tforeach ($this->urls as $key => $parse) {\r\n\t\t\t$html_content = $this->get_html_from_url($parse['url']);\r\n\r\n\t\t\t// print_r($parse);\r\n\t\t\t// print_r($html_content);\r\n\t\t\t$converter = new Html2docx\\Html2docx();\r\n\t\t\t$converter->assign_pandoc($this->pandoc_path);\r\n\t\t\t$converter->input_html_content($html_content);\r\n\t\t\t$converter->output_file($parse['output_file']);\r\n\t\t\t$docx_file = $converter->convert_from_html();\r\n\r\n\t\t\t$this->download_docx_init($docx_file);\r\n\t\t\t$this->download_file($docx_file);\r\n\t\t}\r\n\t\tunset($this->urls);\r\n\t}",
"public function handleDownloadToken(RequestInterface $request, ResponseInterface $response) {\n\t\t$queryParams = $request->getQueryParameters();\n\n\t\t/**\n\t\t * this sets a cookie to be able to recognize the start of the download\n\t\t * the content must not be longer than 32 characters and must only contain\n\t\t * alphanumeric characters\n\t\t */\n\t\tif (isset($queryParams['downloadStartSecret'])) {\n\t\t\t$token = $queryParams['downloadStartSecret'];\n\t\t\tif (!isset($token[32])\n\t\t\t\t&& \\preg_match('!^[a-zA-Z0-9]+$!', $token) === 1) {\n\t\t\t\t// FIXME: use $response->setHeader() instead\n\t\t\t\t\\setcookie('ocDownloadStarted', $token, \\time() + 20, '/');\n\t\t\t}\n\t\t}\n\t}",
"public function exportlex()\n {\n $sOrderNr = oxRegistry::getConfig()->getRequestParameter(\"ordernr\");\n $sToOrderNr = oxRegistry::getConfig()->getRequestParameter(\"toordernr\");\n $oImex = oxNew(\"oximex\");\n if (($sLexware = $oImex->exportLexwareOrders($sOrderNr, $sToOrderNr))) {\n $oUtils = oxRegistry::getUtils();\n $oUtils->setHeader(\"Pragma: public\");\n $oUtils->setHeader(\"Cache-Control: must-revalidate, post-check=0, pre-check=0\");\n $oUtils->setHeader(\"Expires: 0\");\n $oUtils->setHeader(\"Content-type: application/x-download\");\n $oUtils->setHeader(\"Content-Length: \" . strlen($sLexware));\n $oUtils->setHeader(\"Content-Disposition: attachment; filename=intern.xml\");\n $oUtils->showMessageAndExit($sLexware);\n }\n }",
"function download_one_zone($url, $output_directory){\n global $access_token;\n\n echo now().\": Downloading zone file from $url\".PHP_EOL;\n\n $ptmp = explode(\"/\", $url);\n $end = end($ptmp);\n $pcur = explode(\".\",$end);\n $tmp_file = current($pcur);\n\n if(file_exists($output_directory .\"/\". $tmp_file.\".txt.gz\")){\n echo \"Zone file already downloaded from $url\".PHP_EOL;\n return true;\n }\n\n $download_zone_response = do_get($url, $access_token);\n $status_code = $download_zone_response['info']['http_code'];\n \n\n if($status_code == 200){\n # Try to get the filename from the header\n $content_disposition = $download_zone_response['head']['Content-Disposition'];\n preg_match_all('/=\"?([^\"]*)/', $content_disposition, $maturl, PREG_SET_ORDER, 0);\n $filename = $maturl[0][1];\n\n # If could get a filename from the header, then makeup one like [tld].txt.gz\n if(!isset($filename)){\n $end = end(explode(\"/\", $url));\n $filename = current(explode(\".\",$end)).\".txt.gz\";\n }\n\n # This is where the zone file will be saved\n $path = $output_directory .\"/\". $filename;\n file_put_contents($path,$download_zone_response['result']);\n\n echo now().\": Completed downloading zone to file $path\".PHP_EOL;\n\n }else if($status_code == 401){\n echo \"The access_token has been expired. Re-authenticate user $username\".PHP_EOL;\n global $username, $password, $authen_base_url;\n $access_token = authenticate($username, $password, $authen_base_url);\n download_one_zone($url, $output_directory);\n }else if($status_code == 404){\n echo \"No zone file found for $url\".PHP_EOL;\n }else{\n echo \"Failed to download zone from $url with code $status_code\".PHP_EOL;\n }\n}",
"abstract public function setNextAuthToken($token);",
"protected function exportDailyEstimateFiles()\n {\n echo 'Starting ' . $this->accountName . ' daily estimate file(s) generation.' . PHP_EOL;\n\n $fileName = date('Y_m_d_Hm') . '_' . $this->accountID . \"_estimate.txt\";\n $fullFilePath = self::EXPORT_TMP_DIR . '/' . $fileName;\n\n $estimateMonthYear = $this->monthYear;\n if (date('d') < 3) {\n $estimateMonthYear = DLTime::getDate(DLTime::getDate('last month'), DLTime::FIRST);\n }\n\n $dataSet = $this->dataAccessContainer['Table.Ccrs2.DealerLedger']->getEstimates(\n $this->accountID,\n $estimateMonthYear,\n true\n );\n if (!$this->writeTabSeparatedFileStmt($fullFilePath, $dataSet)) {\n echo $this->accountName . ' current month estimate tmp file could not be created or was empty.' . PHP_EOL;\n\n return false;\n }\n\n // File move operations\n if (filesize($fullFilePath)) {\n rename($fullFilePath,\n $this->dailyFileOutPath . '/' . $fileName\n );\n chmod($this->dailyFileOutPath . '/' . $fileName, 0666);\n echo $this->accountName . ' current month estimate file created successfully.' . PHP_EOL;\n } else {\n echo $this->accountName . ' current month estimate file could not be created or was empty.' . PHP_EOL;\n }\n\n /*** create the estimated payment files from the 2nd to the 30th/31st for the previous month ***/\n\n if (date('d') >=2) {\n $prevEstimateMonthYear = DLTime::getDate(DLTime::getDate('31 days ago'), DLTime::FIRST);\n $fileName = date('Y_m_d_Hm') . '_' . $this->accountID . \"_payment_not_final.txt\";\n $fullFilePath = self::EXPORT_TMP_DIR . '/' . $fileName;\n\n $dataSet = $this->dataAccessContainer['Table.Ccrs2.DealerLedger']->getEstimates(\n $this->accountID,\n $prevEstimateMonthYear,\n false\n );\n if (!$this->writeTabSeparatedFileStmt($fullFilePath, $dataSet)) {\n echo $this->accountName . ' estimated payment tmp file could not be created.' . PHP_EOL;\n\n return false;\n }\n\n // File move operations\n if (filesize($fullFilePath)) {\n rename($fullFilePath,\n $this->dailyFileOutPath . '/' . $fileName\n );\n chmod($this->dailyFileOutPath . '/' . $fileName, 0666);\n echo $this->accountName . ' estimated payment file created successfully.' . PHP_EOL;\n } else {\n echo $this->accountName . ' estimated payment file could not be created or was empty.' . PHP_EOL;\n }\n }\n\n echo 'Finishing ' . $this->accountName . ' buckets file generation.' . PHP_EOL;\n }",
"public function downloadXML($fileName, $propertyId = null, $dateFrom = null, $dateTo = null)\n {\n try {\n $xml = $this->ru->{$this->ruFunction}($propertyId, $dateFrom, $dateTo);\n \n $obj = simplexml_load_string($xml['messages']);\n \n if ((string) $obj->Status != 'Success') {\n throw new Exception('Error downloading xml file.');\n }\n \n $h = fopen($this->getCacheDir() . $fileName, 'w');\n fwrite($h, $xml['messages']);\n fclose($h);\n } \n\n catch (Exception $e) {\n throw $e;\n }\n }",
"function the_date_xml()\n {\n }",
"private function fetchAccessToken()\n\t{\n\t\tif (file_exists($this->refreshToken))\n\t\t{\n\t\t\t$parameters = array(\n\t\t\t\t'refresh_token' => file_get_contents($this->refreshToken),\n\t\t\t\t'client_id' => $this->googleClientId,\n\t\t\t\t'client_secret' => $this->googleClientSecret,\n\t\t\t\t'grant_type' => 'refresh_token'\n\t\t\t);\n\n\t\t\t$response = $this->makeRequest($parameters);\n\n\t\t\tif (isset($response->access_token))\n\t\t\t{\n\n\t\t\t\tfile_put_contents($this->accessToken, $response->access_token);\n\t\t\t}\n\t\t}\n\t}",
"public function download_new_update($token, $app_ver)\n {\n $file_size = $this->input->post('file_size');\n if ($this->checker->is_admin())\n {\n if ($token == $this->session->userdata('CSRF'))\n {\n $this->activity_log->create_activity_log('download_update', 'Mengunduh Pembaharuan', null, $this->session->userdata('admin_login'));\n // if app version in server greater than current version\n if ($app_ver > $this->aboutapp->get_version())\n {\n //$url = 'http://muramasa.hol.es/app-updates/simakwapp';\n $url = $this->_update_app_host . '/updates';\n $url .= '/asmp-v' . $app_ver . '.zip';\n $path = '../asmp-v' . $app_ver . '.zip';\n $newfname = $path;\n set_time_limit(0);\n $file = fopen($url, 'rb');\n if ($file)\n {\n $newf = fopen($newfname, 'wb');\n if ($newf)\n {\n while (!feof($file))\n {\n fwrite($newf, fread($file, 1024 * 8), 1024 * 8);\n }\n }\n }\n if ($file)\n {\n $status_file1 = true;\n fclose($file);\n }\n if ($newf)\n {\n $status_file2 = true;\n fclose($newf);\n }\n\n if (file_exists('../asmp-v' . $app_ver . '.zip'))\n {\n echo 'complete';\n }\n else\n {\n $this->activity_log->create_activity_log('download_update_failed', 'Gagal Mengunduh Pembaharuan', null, $this->session->userdata('admin_login'));\n echo 'failed';\n }\n }\n else\n {\n echo 'failed-versi aplikasi sama';\n }\n }\n else\n {\n echo 'failed-token tidak sama';\n }\n }\n else\n {\n redirect('login/login_required', 'refresh');\n }\n }",
"protected function _getNextToken() {}",
"protected function _getNextToken() {}",
"public function getNext() {\r\n $nextDate = $this->getStartDate();\r\n $nextDate->modify('+1 ' . $this->getMode());\r\n\r\n return $nextDate->getTimestamp();\r\n }",
"public function download($url){\r\n $ch = curl_init();\r\n curl_setopt($ch, CURLOPT_URL, $url);\r\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\r\n curl_setopt($ch, CURLOPT_HEADER, 0);\r\n $res = curl_exec($ch);\r\n curl_close($ch);\r\n\r\n $file_name = 'ipx_'.date('Ymd', time()).'.datx';\r\n file_put_contents(__DIR__ . \"/Data/\" . $file_name, $res);\r\n IpxCache::put(self::$latest_file_tag, $file_name, 1440);\r\n $data_files_list = $this->getDataFilesList();\r\n $this->deleteExpire($data_files_list);\r\n }",
"function WriteTokenFile()\n {\n if ($this->getTokenUsePickupFile()) {\n $fname = $this->getTokenPickupFile();\n $fh = fopen($fname, \"w+\");\n fwrite($fh, $this->_props['RequestToken']);\n fclose($fh);\n }\n }",
"public function make(){\r\n $token = Config::get(\"ipnet.token\");\r\n $url = self::$download_url . '?token=' . $token . '&type=datx';\r\n $this->download($url);\r\n }",
"public function download()\n {\n $encrypt = $this->services['encrypt'];\n $file_name = $encrypt->decode($this->getPost('id'));\n $type = $this->getPost('type');\n $storage = $this->services['backup']->setStoragePath($this->settings['working_directory']);\n if($type == 'files')\n {\n $file = $storage->getStorage()->getFileBackupNamePath($file_name);\n }\n else\n {\n $file = $storage->getStorage()->getDbBackupNamePath($file_name);\n }\n \n \n $backup_info = $this->services['backups']->setLocations($this->settings['storage_details'])->getBackupData($file);\n $download_file_path = false;\n if( !empty($backup_info['storage_locations']) && is_array($backup_info['storage_locations']) )\n {\n foreach($backup_info['storage_locations'] AS $storage_location)\n {\n if( $storage_location['obj']->canDownload() )\n {\n $download_file_path = $storage_location['obj']->getFilePath($backup_info['file_name'], $backup_info['backup_type']); //next, get file path\n break;\n }\n }\n }\n \n if($download_file_path && file_exists($download_file_path))\n {\n $this->services['files']->fileDownload($download_file_path);\n exit;\n }\n }",
"function dp_wget($url , $postvars = null , $curlOpts = array()){\r\n // Purpose : refresh session token every hour\r\n $piTrCurlHandle = curl_init();\r\n curl_setopt($piTrCurlHandle, CURLOPT_HTTPGET, 1);\r\n curl_setopt($piTrCurlHandle, CURLOPT_RESUME_FROM, 0);\r\n curl_setopt($piTrCurlHandle, CURLOPT_URL, $url);\r\n curl_setopt($piTrCurlHandle, CURLOPT_RETURNTRANSFER, 1);\r\n curl_setopt($piTrCurlHandle, CURLOPT_FOLLOWLOCATION, 1);\r\n\r\n curl_setopt($piTrCurlHandle, CURLOPT_SSL_VERIFYHOST, 0);\r\n curl_setopt($piTrCurlHandle, CURLOPT_SSL_VERIFYPEER, 0);\r\n\r\n curl_setopt($piTrCurlHandle, CURLOPT_TIMEOUT, 500); // 500 secs\r\n\r\n if($postvars){\r\n curl_setopt($piTrCurlHandle, CURLOPT_POST, 1);\r\n curl_setopt($piTrCurlHandle, CURLOPT_POSTFIELDS, $postvars);\r\n curl_setopt($piTrCurlHandle, CURLOPT_CUSTOMREQUEST, \"POST\");\r\n }\r\n\r\n if($curlOpts)\r\n foreach($curlOpts as $opt=>$value)\r\n curl_setopt($piTrCurlHandle, $opt, $value);\r\n\r\n\r\n $data = curl_exec($piTrCurlHandle);\r\n\r\n return $data;\r\n}",
"public function exportXmlAction()\n {\n $fileName = 'traineedoc.xml';\n $content = $this->getLayout()->createBlock('bs_traineedoc/adminhtml_traineedoc_grid')\n ->getXml();\n $this->_prepareDownloadResponse($fileName, $content);\n }",
"public function fetchNextPage(&$last_page) {\n\n\t\tif (!$this->from_date || !$this->to_date) {\n\t\t\tthrow new \\Exception(get_class($this) . ': you have to call setDate or setDateRange before you can fetch any data');\n\t\t}\n\n\t\t$transactions = $this->mapTransactionData($this->soap_client->getFullEarnings(\n\t\t\t$this->from_date->toDateString(),\n\t\t\t$this->to_date->toDateString(),\n\t\t\t$this->conf['campaignId'],\n\t\t\t$this->conf['login'],\n\t\t\t$this->conf['password']\n\t\t));\n\n\t\t$last_page = true;\n\n\t\treturn $transactions;\n\t}",
"public function exportXmlAction()\n {\n $fileName = 'schedule.xml';\n $content = $this->getLayout()->createBlock('bs_schedule/adminhtml_schedule_grid')\n ->getXml();\n $this->_prepareDownloadResponse($fileName, $content);\n }"
] |
[
"0.5049808",
"0.48306352",
"0.46871492",
"0.4485554",
"0.4475255",
"0.44509956",
"0.43921274",
"0.43814623",
"0.43727428",
"0.43432713",
"0.4340073",
"0.4309914",
"0.42951345",
"0.42654458",
"0.42544055",
"0.42533654",
"0.42256632",
"0.42184094",
"0.42129406",
"0.4211846",
"0.4211846",
"0.4165633",
"0.41624126",
"0.41492563",
"0.41289535",
"0.41190958",
"0.41113007",
"0.4108066",
"0.40687406",
"0.4067837"
] |
0.56184095
|
0
|
$prijmy = $this>db>table('project')>where('accounted', 1)>where('translator_id=? OR translator_id=?', 1, 2)>where('invoice_date LIKE ?', $year.''.$month.'%')>sum('payment');
|
public function getMonthPartnersIncome($year, $month) {
//$vydaje = $this->db->table('translator_project')->where('accounted', 1)->where('translator_id=? OR translator_id=?', 1, 2)->where('project_id', $this->db->table('project')->select('id')->where('invoice_date LIKE ?', $year.'-'.$month.'%'))->sum('payment');
//return $prijmy - $vydaje;
return 0;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public static function paymentsForMonth($yearMonth)\n {\n $Paid = Invoice::find_by_sql(\"SELECT \n SUM(`sum`) as summary\n FROM\n ((SELECT \n SUM(`sum`) AS `sum`\n FROM\n invoices\n WHERE\n `status` = 'Paid' \n AND \n `paid` = '0' \n AND \n paid_date BETWEEN '$yearMonth-01' AND '$yearMonth-31'\n Group By \n `sum`\n ) \n UNION ALL (SELECT \n SUM(T3.`amount`) AS `sum`\n FROM\n invoice_has_payments AS T3\n LEFT JOIN\n invoices AS T4\n ON \n T3.invoice_id = T4.id \n WHERE \n (T4.`status` = 'PartiallyPaid' OR (T4.`status` = 'Paid' AND T4.`paid` != '0'))\n AND \n T3.`date` BETWEEN '$yearMonth-01' AND '$yearMonth-31' \n GROUP BY \n `sum`\n ) ) t1\n \");\n\n return $Paid[0]->summary;\n }",
"public function sum_allappli_bymonthyear($year = null) {\n $current_date = new \\DateTime();\n if (!isset($year)) {\n $year = $current_date->format('Y');\n }\n $query = $this->createQueryBuilder('a')\n //->select('MONTH(a.dateDebut) as mois,sum(b.nomprojet) as projet,count(a.id) as nb')\n ->select('MONTH(a.dateDebut) as mois,count(a.id) as nb')\n //->select('count(a.id) as nb,a.dateDebut,b.nomprojet,MONTH(a.dateDebut) as mois')\n ->leftJoin('a.idProjet', 'b')\n ->andWhere('a.dateDebut LIKE :date')\n ->groupby('mois');\n $parameters['date'] = '%' . $year . '-%';\n $query->setParameters($parameters);\n //return $query->getQuery();\n return $query->getQuery();\n }",
"function get_transaction_by_month($conds = array())\n\t{\n\t\t//print_r(\"asdfasd\" .$conds);die;\n\t\t$this->db->select('rt_transactions_counts.*'); \n \t\t$this->db->from('rt_transactions_counts');\n \t\t$this->db->where('month(added_date)',$conds['added_date']);\n \t\t$this->db->where('rt_transactions_counts.shop_id',$conds['shop_id']);\n\n\t\treturn $this->db->get();\n\t\t // print_r($this->db->last_query());die;\n\t}",
"function monthlySales($year){\n global $db;\n $sql = \"SELECT s.qty,\";\n $sql .= \" DATE_FORMAT(s.date, '%Y-%m-%e') AS date,p.name,\";\n $sql .= \"SUM(p.sale_price * s.qty) AS total_saleing_price\";\n $sql .= \" FROM sales s\";\n $sql .= \" LEFT JOIN products p ON s.product_id = p.id\";\n $sql .= \" WHERE DATE_FORMAT(s.date, '%Y' ) = '{$year}'\";\n $sql .= \" GROUP BY DATE_FORMAT( s.date, '%c' ),s.product_id\";\n $sql .= \" ORDER BY date_format(s.date, '%c' ) ASC\";\n return find_by_sql($sql);\n}",
"public function sumConfirmedByMonth($year)\n {\n return $this->repo->select(DB::raw(\"month(bil_date) as mth, sum(bili_gross) as total\"))\n ->join('bills', 'bil_id', '=', 'bili_bill')\n ->join('resources', 'rs_id', '=', 'bili_resource')\n ->join('resource_types', 'rty_id', '=', 'rs_type')\n ->leftJoin('bookings', 'book_id', '=', 'bil_booking')\n ->where('bili_active', '=', 1)\n ->where('bil_status', '=', 'active')\n ->where(function ($query) {\n $query->whereNotIn('book_status', ['cancelled', 'hold'])->orWhereNull('book_status');\n })\n ->whereYear('bil_date', $year)\n ->groupBy(DB::raw(\"month(bil_date)\"))->get();\n }",
"public function totalSearchContribution($c=array()){\n $search_dates=array(\n 's_date'=>$c['start_date'],\n 'e_date'=>$c['end_date'],\n 'added_by'=>$this->session->userdata['member_no']\n );\n $start=$c['start_date'];\n $end=$c['end_date'];\n $this->db->select_sum('amount');\n $this->db->where('paid_date >=',$start);\n $this->db->where('paid_date <=',$end);\n //$this->db->where('added_by <=',$u);\n $this->session->set_userdata($search_dates);\n $qry=$this->db->get('payment_tbl');\n return $qry->result_array();\n }",
"public function select_totalpaid_payments_u_users(){\n\n\n$sql = \"SELECT payments.id,payments.date,SUM(payments.amount) AS 'amount',\npayments.payment_method,payments.member_id,users.name,users.member_id\nFROM payments \nINNER JOIN users\nON\npayments.member_id = users.member_id GROUP BY users.member_id\";\n\n if(!$this->query($sql)->_error){\n\n return $this;\n \n } \n return false;\n }",
"function month_total($type, $filter1 = '', $filter_val1 = '', $filter2 = '', $filter_val2 = '', $notmatch = '', $notmatch_val = '')\n {\n $ago = time() - (86400 * 30);\n $a = 0;\n if ($type == 'sale') {\n $result = $this->db->get_where('sale', array(\n 'sale_datetime >= ' => $ago,\n 'sale_datetime <= ' => time()\n ))->result_array();\n foreach ($result as $row) {\n if($this->session->userdata('title') == 'admin'){\n if($this->sale_payment_status($row['sale_id'],'admin') == 'fully_paid'){\n //make version for vendor\n $res_cat = $this->db->get_where('product', array(\n 'category' => $filter_val1\n ))->result_array();\n foreach ($res_cat as $row1) {\n if ($p = $this->product_in_sale($row['sale_id'], $row1['product_id'], 'subtotal')) {\n $a += $p;\n }\n }\n }\n }\n if($this->session->userdata('title') == 'vendor'){\n if($this->sale_payment_status($row['sale_id'],'vendor',$this->session->userdata('vendor_id')) == 'fully_paid'){\n //make version for vendor\n $res_cat = $this->db->get_where('product', array(\n 'category' => $filter_val1\n ))->result_array();\n foreach ($res_cat as $row1) {\n if ($p = $this->vendor_share_in_sale($row['sale_id'],$this->session->userdata('vendor_id'),'paid')) {\n $p = $p['total'];\n $a += $p;\n }\n }\n }\n }\n }\n } else if ($type == 'stock') {\n $result = $this->db->get_where('stock', array(\n 'datetime >= ' => $ago,\n 'datetime <= ' => time()\n ))->result_array();\n foreach ($result as $row) {\n if ($row[$filter2] == $filter_val2) {\n if ($row[$filter1] == $filter_val1) {\n if ($notmatch == '') {\n $a += $row['total'];\n } else {\n if ($row[$notmatch] !== $notmatch_val) {\n $a += $row['total'];\n }\n }\n }\n }\n }\n }\n return $a;\n }",
"function sales_report_month($month){\n \t\t$this->db->select('products.PRODUCT, SUM(sales.QUANTITY_SOLD) SALES, products.COST_PRICE, products.SALES_PRICE');\n \t\t$this->db->from('sales');\n \t\t$this->db->join('products', 'products.PRODUCT_ID=sales.PRODUCT_ID', 'left');\n \t\t$this->db->where('MONTH(sales.SALES_DATE)', $month['MONTH']);\n \t\t$this->db->where('YEAR(sales.SALES_DATE)', $month['YEAR']);\n \t\t$this->db->where('sales.STATUS', 'Confirmed');\n \t\t$this->db->group_by('sales.PRODUCT_ID');\n \t\t$query=$this->db->get();\n \t\tif($query->num_rows()>0){\n \t\t\treturn $query->result();\n \t\t}\n \t\telse{\n \t\t\treturn false;\n \t\t}\n \t}",
"public function currentMonthPersonBazar()\n {\n $this->db->select('name,sum(bazartk) as y');\n $this->db->where('YEAR(date) = YEAR(CURRENT_DATE()) AND MONTH(date) = MONTH(CURRENT_DATE())');\n $this->db->from('bazar');\n $this->db->group_by('name');\n $query = $this->db->get();\n //echo $this->db->last_query(); exit;\n //$query = $this->db->get('user');\n return $query->result();\n \n }",
"public function getProfitMonth(){\n\t\tglobal $db;\n\t\t$date_now = date('Y-m').'-01';\n\t\t$last_month = date('Y-m', strtotime('-1 month')).'-01';\n\n\t\t$sql = $db->prepare(\"SELECT SUM(price) FROM project01_report WHERE date_init BETWEEN '$last_month' AND '$date_now' \");\n\t\t$sql->execute();\n\t\tif ($sql->rowCount()>0) {\n\t\t\t$profit = $sql->fetch();\n\t\t\treturn $profit;\n\t\t}\n\t}",
"public function get_month_data($month = \"January\", $year = 2015){\n\t\t/* if($year==2015)\n\t\t$year = date('y'); */\n\t\t// echo date( 'F Y');\n\t\t$this->loadModel(\"Invoice.Invoice\");\n\t\t$this->loadModel(\"Transaction.Transaction\");\n\t\t$month_first_day = strtotime( 'first day of ' . $month.' '.$year);\n\t\t$month_last_day = strtotime( 'last day of ' . $month.' '.$year);\n\t\t// echo date('Y-m-d',$month_last_day);\n\t\t// $dt = new DateTime('first Monday of this month');\n\t\t$dt = new DateTime('first Monday of '.$month.' '.$year);\n\t\t// echo $dt->format('Y-m-d');\n\t\t$first_week_start = $dt->getTimestamp(); \n\t\t$week_last = $first_week_start;\n\t\t$this->Invoice->belongsTo = array('Client' => array('className'=>\"Usermgmt.Client\",'foreignKey'=>'client_id'));\n\t\t$this->Transaction->belongsTo = array('Invoice' => array('className'=>\"Invoice.Invoice\",'foreignKey'=>'invoice_id'));\n\t\t$this->Transaction->recursive = 2;\n\t\t$this->Transaction->Behaviors->load('Containable');\n\t\t\n\t\t$all_transactoins = array();\n\t\tfor($current =$month_first_day; ($week_last<$month_last_day && $week_last<time()); $week_last += (7*86400)){\n\t\t\t\n\t\t\t\t$transactions = $this->Transaction->find(\"all\",array(\"conditions\"=>array(\"UNIX_TIMESTAMP(STR_TO_DATE(Transaction.payment_date, '%m-%d-%Y')) >\"=>$current,\"UNIX_TIMESTAMP(STR_TO_DATE(Transaction.payment_date, '%m-%d-%Y')) <\"=>$week_last,'Transaction.status'=>1),'contain'=>array(\"Invoice\"=>array(\"fields\"=>array(\"title\",\"client_id\",\"payment\",\"tax\",\"total\")),\"Invoice.Client\"=>array(\"fields\"=>array(\"first_name\",\"last_name\"))),\"fields\"=>array(\"invoice_id\",\"payment_date\",\"method\")));\n\t\t\t\t\n\t\t\t\t$all_transactoins[date('m/d/Y',$current).'-'.date('m/d/Y',$week_last)] = $transactions;\n\t\t\t\t\n\t\t\t\t// pr($transactions); die;\n\t\t\t\n\t\t\t$current =$week_last;\n\t\t}\n\t\treturn $all_transactoins;\n\t\t\n\t}",
"function dailySales($year,$month){\n global $db;\n $sql = \"SELECT s.qty,\";\n $sql .= \" DATE_FORMAT(s.date, '%Y-%m-%e') AS date,p.name,\";\n $sql .= \"SUM(p.sale_price * s.qty) AS total_saleing_price\";\n $sql .= \" FROM sales s\";\n $sql .= \" LEFT JOIN products p ON s.product_id = p.id\";\n $sql .= \" WHERE DATE_FORMAT(s.date, '%Y-%m' ) = '{$year}-{$month}'\";\n $sql .= \" GROUP BY DATE_FORMAT( s.date, '%e' ),s.product_id\";\n return find_by_sql($sql);\n}",
"public function findSumByYear(\\DateTime $date);",
"public function get_transaction_by_month($date){\n $this->load->database();\n\n $query = $this->db->select('date,type,is_of,amount')\n ->get_where('tbl_transactions',array('left(date,7)' => $date));\n return $query->result_array();\n }",
"function perizinan_by_bulan($bulan,$tahun)\n {\n $this->db->select('COUNT(id) AS total,MONTH(created_date) as bulan, YEAR(created_date) as tahun');\n $this->db->from($this->table);\n $this->db->where('MONTH(created_date)',$bulan);\n $this->db->where('YEAR(created_date)',$tahun);\n $this->db->group_by(array('MONTH(created_date),YEAR(created_date)'));\n $this->db->order_by('YEAR(created_date)');\n return $this->db->get()->row();\n }",
"public function get_sumWithDate()\n\t{\n\t\t$this->tglmin\t\t\t= $this->input->post('tglmin');\n\t\t$this->tglmax \t \t\t= $this->input->post('tglmax');\n\t\t$this->kode_kategori \t= $this->input->post('kode_kategori');\n\t\t$this->kode_client \t\t= $this->input->post('kode_client');\n\n\t\t$this->db->select('project.*, SUM(budget_real) AS total_budget');\n\t\t$this->db->from('project');\n\n\t\t// Conditional Filter\n\t\tif(!empty($this->tglmin) && !empty($this->tglmax)) {\n\t\t\t$this->db->where('project.start >=', $this->tglmin);\n\t\t\t$this->db->where('project.start <=', $this->tglmax);\n\t\t} if(!empty($this->kode_kategori) && !empty($this->kode_client)) {\n\t\t\t$this->db->where('kode_kategori', $this->kode_kategori);\n\t\t\t$this->db->where('kode_client', $this->kode_client);\n\t\t} if(!empty($this->kode_kategori)) {\n\t\t\t$this->db->where('kode_kategori', $this->kode_kategori);\n\t\t} if(!empty($this->kode_client)) {\n\t\t\t$this->db->where('kode_client', $this->kode_client);\n\t\t}\n\n\t\t$query = $this->db->get();\n\t\treturn $query->row();\n\t}",
"public function sum_nilai_adjust() \n {\n return $get_data = $this->db->query(\"SELECT sum(nilai_adjust) as nilai_adjust FROM temp_adjust_barang where id_karyawan='\".$this->session->userdata('id_karyawan').\"'\");\n }",
"protected function checkTotalRose_m(){\n $sql = \"SELECT SUM(total_rose) AS 'total_money', MONTH(tbl_order_referal.created_at) as month FROM tbl_order_referal GROUP BY id HAVING SUM(total_rose) > 16000000\";\n $result = $this->pdo->prepare($sql);\n $result->execute();\n return $result->fetch(PDO::FETCH_ASSOC);\n }",
"function get_sale_grouplastby_ccode($lastmonthdate) {\r\n\tglobal $db;\r\n\t$M_R_query=\"SELECT merchants.currency_code, YEAR(transaction_alipay.trans_datetime) AS year, MONTH(transaction_alipay.trans_datetime) AS month, COUNT(DISTINCT transaction_alipay.id_transaction_id) AS transcount, SUM(transaction_alipay.total_fee) AS transamount FROM merchants JOIN transaction_alipay ON transaction_alipay.merchant_id = merchants.mer_map_id AND transaction_alipay.transaction_type IN ('1','s1') AND transaction_alipay.result_code='SUCCESS' AND transaction_alipay.trade_status='TRADE_SUCCESS' AND MONTH(transaction_alipay.trans_datetime) = MONTH('$lastmonthdate') GROUP BY year, month, merchants.currency_code\";\r\n\t$transactionsDetails = $db->rawQuery($M_R_query);\r\n\treturn $transactionsDetails;\t\r\n}",
"function get_sale_groupby_ccode($currentdate) {\r\n\tglobal $db;\r\n\t$M_R_query=\"SELECT merchants.currency_code, YEAR(transaction_alipay.trans_datetime) AS year, MONTH(transaction_alipay.trans_datetime) AS month, COUNT(DISTINCT transaction_alipay.id_transaction_id) AS transcount, SUM(transaction_alipay.total_fee) AS transamount FROM merchants JOIN transaction_alipay ON transaction_alipay.merchant_id = merchants.mer_map_id AND transaction_alipay.transaction_type IN ('1','s1') AND transaction_alipay.result_code='SUCCESS' AND transaction_alipay.trade_status='TRADE_SUCCESS' AND MONTH(transaction_alipay.trans_datetime) = MONTH('$currentdate') GROUP BY year, month, merchants.currency_code\";\r\n\t$transactionsDetails = $db->rawQuery($M_R_query);\r\n\treturn $transactionsDetails;\t\r\n}",
"function obtain_month_profitable($acc_number)\n\t{\n\t return $this->db->select('AVG(pamm_tp_profitable) AS ptp,monthname(pamm_tp_timestamp) AS month, year(pamm_tp_timestamp) AS year')\n\t\t ->from('pamm_tp_results') \n\t\t ->where(\"pamm_tp_account\",$acc_number)\n\t\t ->group_by('monthname(pamm_tp_timestamp)')\n\t\t ->order_by('pamm_tp_timestamp','ASC')\n\t\t ->get()->result();\n\t}",
"public function get_sum_pagar()\n \t{\n \t $this->db->select([\n \n 'FORMAT(SUM(REPLACE( conta_pagar_valor, \",\",\"\")),2) as conta_pagar_valor',\n\n ]);\n\n $this->db->where('conta_pagar_status',0);\n\n \t return $this->db->get('contas_pagar')->row();\n \n \t}",
"function getTotalPayment($id_purchase) {\n $data = $this->db\n ->select('sum(payment_total) as total_paid')\n ->where('id_purchase',$id_purchase)\n ->order_by('payment_date','desc')\n ->get('purchase_payment')\n ->row_array();\n if ($data) {\n return $data['total_paid'];\n } else {\n return 0;\n }\n }",
"function sales_report_annual($year){\n \t\t$this->db->select('products.PRODUCT, SUM(sales.QUANTITY_SOLD) SALES, products.COST_PRICE, products.SALES_PRICE');\n \t\t$this->db->from('sales');\n \t\t$this->db->join('products', 'products.PRODUCT_ID=sales.PRODUCT_ID', 'left');\n \t\t$this->db->where('YEAR(sales.SALES_DATE)', $year);\n \t\t$this->db->where('STATUS', 'Confirmed');\n \t\t$this->db->group_by('sales.PRODUCT_ID');\n\n \t\t$query=$this->db->get();\n \t\tif($query->num_rows()>0){\n \t\t\treturn $query->result();\n \t\t}\n \t\telse{\n \t\t\treturn false;\n \t\t}\n \t}",
"function returnPayments($date){\n $dbc = connect();\n $stmt = $dbc->prepare(\"SELECT SUM(`amount`) AS payments FROM `data_transactions`\n WHERE `transaction_date` = :transaction_date AND `type` = 'P'\");\n $stmt->bindParam(':transaction_date', $date);\n $stmt->execute();\n $result = $stmt->fetch(PDO::FETCH_ASSOC);\n\n return (!is_null($result['payments']) ? $result['payments'] : 0); //return 0 if no payments were made that day\n}",
"function whereQuery() {\n // $arrDate1 = explode(\"-\", $bulantahunpenggajian);\n // $date1 = $arrDate1[0].'-'.$arrDate1[1].'-01';\n // $date2 = $arrDate1[0].'-'.$arrDate1[1].'-'.cal_days_in_month(CAL_GREGORIAN, $arrDate1[1], $arrDate1[0]);\n \n // $wer = \" A.MONTH = '\".$arrDate1[1].\"' AND A.YEAR = \".$arrDate1[0].\"\";\n \n // return $wer;\n return '';\n }",
"function sumMonth($con, $monthDate) {\n //Sums the total payments for the given month\n $sql = \"UPDATE months\n SET totAmount = (SELECT SUM(amount) FROM notInInternalList WHERE SUBSTRING(transTime,1,7) = '$monthDate' )\n WHERE month = '$monthDate'\";\n if ($con->query($sql) === FALSE) {\n error_log('['.date(\"F j, Y, g:i a e O\").']'.\"\n Cannot sum for $monthDate: \" . $con->error . \"\\n\", 3, \"./errors.log\");\n }\n}",
"public function bulanan()\n {\n $month = array();\n\n $this->db->select('SUM(hargatotal) as bulan');\n $this->db->from('bahanterpakai');\n $this->db->where('MONTH(tglpakai) = MONTH(NOW()) AND YEAR(tglpakai) = YEAR(NOW())');\n\n $query = $this->db->get();\n if ($query->num_rows() > 0) {\n $month = $query->result();\n }\n\n return $month;\n }",
"function get_balance($acc=null,$month=null,$year=null)\n {\n// transactions.debit, transactions.credit, transactions.vamount, gls.approved');\n \n $this->db->select_sum('transactions.vamount');\n $this->db->select_sum('transactions.debit');\n $this->db->select_sum('transactions.credit');\n \n $this->db->from('gls, transactions, accounts');\n $this->db->where('gls.id = transactions.gl_id');\n $this->db->where('transactions.account_id = accounts.id');\n $this->db->where('MONTH(dates)', $month);\n $this->db->where('YEAR(dates)', $year);\n $this->cek_null($acc,\"transactions.account_id\");\n $this->db->where('gls.approved', 1);\n $this->db->where('accounts.deleted', NULL);\n return $this->db->get(); \n }"
] |
[
"0.67097306",
"0.6575004",
"0.6461807",
"0.642115",
"0.6379612",
"0.6350928",
"0.62775207",
"0.62411106",
"0.6108803",
"0.61062545",
"0.61002403",
"0.6072635",
"0.6041771",
"0.60034895",
"0.5978475",
"0.5950564",
"0.59064543",
"0.5899792",
"0.5874207",
"0.58732677",
"0.58674335",
"0.58484834",
"0.5847316",
"0.5820307",
"0.5808454",
"0.5803106",
"0.57897335",
"0.5786478",
"0.5779211",
"0.57742417"
] |
0.6831542
|
0
|
Create an input[type="text"] element Accepted keys in $args: code (bool) Apply preformatted code styling? default (str) The default value name (str) The key within the bii_instagram theme option type (str) Input type (default: 'text')
|
public function create_textfield( $args=array() ) {
$settings = get_option( 'bii_instagram' );
$classes = ( isset( $args['code'] ) && $args['code'] ? 'regular-text code' : '' );
$type = ( isset( $args['type'] ) && $args['type'] ? $args['type'] : 'text' );
$default = ( isset( $args['default'] ) ? $args['default'] : '' );
printf( '<input name="bii_instagram[%s]" type="%s" value="%s" class="%s" />', $args['name'], $type, ( isset( $settings[ $args['name'] ] ) ? $settings[ $args['name'] ] : $default ), $classes );
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function form_field_text ( $args ) {\n\t\t$options = $this->get_settings();\n\t\techo '<input id=\"' . esc_attr( $args['key'] ) . '\" name=\"' . $this->token . '[' . esc_attr( $args['key'] ) . ']\" size=\"40\" type=\"text\" value=\"' . esc_attr( $options[$args['key']] ) . '\" />' . \"\\n\";\n\t\tif ( isset( $args['data']['description'] ) ) {\n\t\t\techo '<span class=\"description\">' . $args['data']['description'] . '</span>' . \"\\n\";\n\t\t}\n\t}",
"function input($args = '') {\r\n $defaults = array('id' => '', 'class_from_name' => '', 'title' => '', 'class' => '', 'pattern' => '', 'name' => '', 'group' => '', 'special' => '', 'value' => '', 'type' => '', 'hidden' => false, 'style' => false, 'readonly' => false, 'label' => false);\r\n extract(wp_parse_args($args, $defaults), EXTR_SKIP);\r\n // if [ character is present, we do not use the name in class and id field\r\n\r\n $return = '';\r\n if (!strpos(\"$name\", '[')) {\r\n $id = $name;\r\n $class_from_name = $name;\r\n }\r\n if ($label)\r\n $return .= \"<label for='$id'>\";\r\n $return .= \"<input \" . ($type ? \"type=\\\"$type\\\" \" : '') . \" \" . ($style ? \"style=\\\"$style\\\" \" : '') . \" id=\\\"$id\\\" class=\\\"\" . ($type ? \"\" : \"input_field\") . \" $class_from_name $class \" . ($hidden ? \" hidden \" : '') . \"\" . ($group ? \"group_$group\" : '') . \" \\\" name=\\\"\" . ($group ? $group . \"[\" . $name . \"]\" : $name) . \"\\\" value=\\\"\" . stripslashes($value) . \"\\\" title=\\\"$title\\\" $special \" . ($type == 'forget' ? \" autocomplete='off'\" : '') . \" \" . ($readonly ? \" readonly=\\\"readonly\\\" \" : \"\") . \" \" . (isset($required) && $required ? \" required=\\\"{$required}\\\" \" : \"\") . ($pattern ? \" pattern=\\\"{$pattern}\\\" \" : \"\") . \"/>\";\r\n if ($label)\r\n $return .= \"$label </label>\";\r\n return $return;\r\n }",
"public function input($text,$name,$type){\r\n\t\treturn $this->surround('<input type=\"text\" name=\"'.$name.'\" > ');\r\n\r\n\t}",
"function barnelli_wp_text_input($field) {\n\tglobal $thepostid, $post, $vision;\n\n\t$thepostid \t\t\t\t= empty( $thepostid ) ? $post->ID : $thepostid;\n\t$field['placeholder'] \t= isset( $field['placeholder'] ) ? $field['placeholder'] : '';\n\t$field['class'] \t\t= isset( $field['class'] ) ? $field['class'] : 'short';\n\t$field['wrapper_class'] = isset( $field['wrapper_class'] ) ? $field['wrapper_class'] : '';\n\t$field['value'] \t\t= isset( $field['value'] ) ? $field['value'] : get_post_meta( $thepostid, $field['id'], true );\n\t$field['name'] \t\t\t= isset( $field['name'] ) ? $field['name'] : $field['id'];\n\t$field['type'] \t\t\t= isset( $field['type'] ) ? $field['type'] : 'text';\n\n\t// Custom attribute handling\n\t$custom_attributes = array();\n\n\tif ( ! empty( $field['custom_attributes'] ) && is_array( $field['custom_attributes'] ) )\n\t\tforeach ( $field['custom_attributes'] as $attribute => $value )\n\t\t\t$custom_attributes[] = esc_attr( $attribute ) . '=\"' . esc_attr( $value ) . '\"';\n\n\techo '<p class=\"form-field ' . esc_attr( $field['id'] ) . '_field ' . esc_attr( $field['wrapper_class'] ) . '\"><label for=\"' . esc_attr( $field['id'] ) . '\">' . wp_kses_post( $field['label'] ) . '</label><input type=\"' . esc_attr( $field['type'] ) . '\" class=\"' . esc_attr( $field['class'] ) . '\" name=\"' . esc_attr( $field['name'] ) . '\" id=\"' . esc_attr( $field['id'] ) . '\" value=\"' . esc_attr( $field['value'] ) . '\" placeholder=\"' . esc_attr( $field['placeholder'] ) . '\" ' . implode( ' ', $custom_attributes ) . ' /> ';\n\n\tif ( ! empty( $field['description'] ) ) {\n\n\t\tif ( isset( $field['desc_tip'] ) ) {\n\t\t\techo '<img class=\"help_tip\" data-tip=\"' . esc_attr( $field['description'] ) . '\" src=\"' . $vision->plugin_url() . '/assets/images/help.png\" height=\"16\" width=\"16\" />';\n\t\t} else {\n\t\t\techo '<span class=\"description\">' . wp_kses_post( $field['description'] ) . '</span>';\n\t\t}\n\n\t}\n\techo '</p>';\n}",
"function text($args) {\r\n\t\t\t$args = $this->apply_name_fix($this->apply_default_args($args)) ;\r\n\t\t\techo \"<input type='text' size='57' style='\" . $this->width($args['width']) . \"' \" . $this->placeholder($args['placeholder']) . \" name='\" . $args['formname'] . \"' value='\" . $args['value'] . \"'/>\";\t\t\t\t\t\r\n\t\t\t$this->description($args['description']);\r\n\t\t}",
"function acf_text_input($attrs = array())\n{\n}",
"public function settings_field_input_text( $args ) {\r\n\t\t\t\t// Get the field name from the $args array.\r\n\t\t\t\t$field = $args['field'];\r\n\t\t\t\t$default = $args['default'];\r\n\t\t\t\t$help_text = $args['help_text'];\r\n\t\t\t\t// Get the value of this setting.\r\n\t\t\t\t$value = get_option( $field, $default );\r\n\t\t\t\techo sprintf(\r\n\t\t\t\t\t'<input type=\"text\" name=\"%s\" id=\"%s\" value=\"%s\" /> <span>%s</span>',\r\n\t\t\t\t\tesc_attr( $field ),\r\n\t\t\t\t\tesc_attr( $field ),\r\n\t\t\t\t\tesc_attr( $value ),\r\n\t\t\t\t\tesc_html( $help_text )\r\n\t\t\t\t);\r\n\t\t}",
"public function callback_text( $args ) {\n\n $name_id = $args['name_id'];\n if ($args['parent']) {\n $value = $this->get_option( $args['parent']['id'], $args['section'], $args['std'], $args['global'] );\n $value = isset($value[$args['id']]) ? $value[$args['id']] : $args['std'];\n $args['disable'] = (isset( $args['parent']['disable'])) ? $args['parent']['disable'] : false;\n }\n else {\n $value = $this->get_option( $args['id'], $args['section'], $args['std'], $args['global'] );\n }\n\n $disable = (isset( $args['disable'] ) && $args['disable'] === true) ? 'disabled' : '';\n $size = isset( $args['size'] ) && !is_null( $args['size'] ) ? $args['size'] : 'regular';\n $type = isset( $args['type'] ) ? $args['type'] : 'text';\n $placeholder = isset( $args['placeholder'] ) ? $args['placeholder'] : '';\n\n $html = sprintf( '<input type=\"%1$s\" class=\"%2$s-text\" id=\"%3$s\" name=\"%3$s\" value=\"%4$s\" placeholder=\"%5$s\" %6$s/>', $type, $size, $name_id, $value, $placeholder, $disable);\n $html .= $this->get_field_description( $args );\n\n echo $html;\n }",
"public static function input_field( $args ) {\n\n\t\t$value = get_option( $args['label_for'] );\n\n\t\t$html = \"<input type='\" . $args['type'] . \"' class='\" . implode( ' ', $args['classes'] ) . \"' name='\" . $args['label_for'] . \"' value='\" . $value . \"'>\";\n\n\t\techo apply_filters( 'slack_before_output_input_field', $html );\n\n\t}",
"public function settings_field_input_text($args)\n {\n $field = $args['field'];\n $default = $args['default'];\n\n // Get the value of this setting\n $value = get_option('master_link_plugin-' . $field, $default);\n\n // echo a proper input type=\"text\"\n echo sprintf('<input type=\"text\" name=\"master_link_plugin-%s\" id=\"master_link_plugin-%s\" value=\"%s\" />', $field, $field, $value);\n }",
"function API_key_field_markup($args)\n {\n $setting = get_option('widget_meteo_settings');\n $value = $setting['API_key'] ?: '';\n?>\n <input class=\"regular-text\" type=\"text\" name=\"widget_meteo_settings[API_key]\" value=\"<?= esc_attr($value); ?>\">\n\n <?php\n }",
"function formInput2($width, $name, $size = 25, $type = 'txt', $attribs = '', $text = ''){\n\t\t$text = $text === '' ? $name : $text;\n\t\treturn $this->formInputField($type, $name, (g_l('weClass', '[' . $text . ']', true) != false ? g_l('weClass', '[' . $text . ']') : $text), $size, $width, '', $attribs);\n\t}",
"function create_input_text($name,$value,$option = array())\n{\n $name = func_get_arg(0);\n $value = func_get_arg(1);\n $option = func_get_arg(2);\n if(!empty($option)){\n $id = $option['id'];\n $class = $option['class'];\n }\n\n $input_html = \"<input type='text' name='{$name}' value = '{$value}' id='{$id}' class='{$class}'>\";\n echo $input_html;\n}",
"function acf_get_text_input($attrs = array())\n{\n}",
"function j2_yt_textbox_callback($args) {\n $option = get_option($args[0]);\n echo '<input type=\"text\" id=\"'. $args[0] .'\" name=\"'. $args[0] .'\" value=\"' . $option . '\" />';\n }",
"function create_input_field( $args ) {\n\tif( count($args) > 4 ) {\n\t\techo '<input id=\"' . $args[0] . '\" name=\"'. $args[1] .'\" type=\"'. $args[2] .'\" value=\"'. $args[3] .'\" \n\t\t\tplaceholder=\"'. $args[4] .'\" class=\"' . $args[5] . '\" />';\n\t\treturn;\n\t}\n\n\techo '<input name=\"'. $args[0] .'\" type=\"'. $args[1] .'\" value=\"'. $args[2] .'\" \n\t\t\tplaceholder=\"'. $args[3] .'\" />';\n}",
"function cmdeals_wp_text_input( $field ) {\n\tglobal $thepostid, $post;\n\t\n\tif (!$thepostid) $thepostid = $post->ID;\n\tif (!isset($field['placeholder'])) $field['placeholder'] = '';\n\tif (!isset($field['class'])) $field['class'] = 'short';\n\tif (!isset($field['value'])) $field['value'] = get_post_meta($thepostid, $field['id'], true);\n\t\n\techo '<p class=\"form-field '.$field['id'].'_field\"><label for=\"'.$field['id'].'\">'.$field['label'].'</label><input type=\"text\" class=\"'.$field['class'].'\" name=\"'.$field['id'].'\" id=\"'.$field['id'].'\" value=\"'.esc_attr( $field['value'] ).'\" placeholder=\"'.$field['placeholder'].'\" /> ';\n\t\n\tif (isset($field['description'])) echo '<span class=\"description\">' .$field['description'] . '</span>';\n\t\t\n\techo '</p>';\n}",
"function get_meta_text_input( $args = array(), $value = false ) { \r\r\n extract($args);\r\r\n ?>\r\r\n\t<tr>\r\r\n\t\t<th style=\"width:10%;\"><label for=\"<?php\t \t echo $args['name']; ?>\"><?php\t \t echo $args['title']; ?></label></th>\r\r\n\t\t<td><input type=\"text\" name=\"<?php\t \t echo $args['name']; ?>\" id=\"<?php\t \t echo $args['name']; ?>\" value=\"<?php\t \t echo wp_specialchars( $value, 1 ); ?>\" size=\"30\" tabindex=\"30\" style=\"width: 97%;\" />\r\r\n <br /><small><?php\t \t echo $args['description']; ?></small>\r\r\n </td>\r\r\n\t</tr>\r\r\n\t<?php\t \t\r\r\n}",
"public static function input($type='text', $name='', $value='', $attributes='') {\n\t\t\t$output = '<input';\n\t\t\t$output .= HtmlHelper::_attributes_to_string(array(\n\t\t\t\t'type' => $type,\n\t\t\t\t'name' => $name,\n\t\t\t\t'value' => $value\n\t\t\t));\n\t\t\t$output .= HtmlHelper::_attributes_to_string($attributes);\n\t\t\t$output .= ' />';\n\t\t\treturn $output;\n\t\t}",
"public function renderInput( $args = array() ){\n $atts = parametersExtra(\n array(\n 'type' => '',\n 'name' => '',\n 'class' => '',\n 'value' => '',\n 'attr' => array(),\n ),\n $args\n );\n\n $attrInput = '';\n foreach ($atts['attr'] as $key => $value) {\n \tif( empty( $value ) ) {\n \t\t$attrInput .= ' ' .$key. ' ';\n \t}else{\n \t\t$attrInput .= ' ' .$key . '=\"' . $value . '\" ';\n \t}\n \n }\n\n return '<input class=\"'.$atts['class'].'\" type=\"'.$atts['type'].'\" name=\"'.$atts['name'].'\" value=\"'.$atts['value'].'\" '.$attrInput.'>';\n }",
"function text_field_tag($name, $value, array $attributes = array())\r\n{\r\n array_add($attributes, array(\r\n 'id' => $name,\r\n 'name' => $name,\r\n 'type' => 'text',\r\n 'value' => $value\r\n ));\r\n return tag('input', $attributes);\r\n}",
"public function text_callback($args)\r\n {\r\n printf(\r\n '<input type=\"text\" id=\"%s\" name=\"%s[%s]\" value=\"%s\">',\r\n $args['field_name'], // ID\r\n $args['option_name'], // Input Name\r\n $args['field_name'], // Input Name\r\n $this->get_field_name($args['field_name']) // Value\r\n );\r\n }",
"function draw_input($s_type, $s_name_prefix, $s_name, $wt_default_value) {\n\tif ($s_type == 'textbox') {\n\t\t\treturn '<input type=\\'textbox\\' size=\\'20\\' name=\\''.$s_name_prefix.$s_name.'\\' value=\\''.$wt_default_value.'\\' />';\n\t} else if ($s_type == 'checkbox') {\n\t\t\treturn '<input type=\\'checkbox\\' name=\\''.$s_name_prefix.$s_name.'\\' '.($wt_default_value ? 'CHECKED' : '').'/>';\n\t}\n}",
"function woocommerce_bootstrap_form_field( $key, $args, $value = null ) {\n\t\t$defaults = array(\n\t\t\t'type' => 'text',\n\t\t\t'label' => '',\n\t\t\t'placeholder' => '',\n\t\t\t'maxlength' => false,\n\t\t\t'required' => false,\n\t\t\t'class' => array(),\n\t\t\t'label_class' => array(),\n\t\t\t'input_class' => array(),\n\t\t\t'return' => false,\n\t\t\t'options' => array(),\n\t\t\t'custom_attributes' => array(),\n\t\t\t'validate' => array(),\n\t\t\t'default'\t\t => '',\n\t\t);\n\n\t\t$args = wp_parse_args( $args, $defaults );\n\n\t\tif ( ( ! empty( $args['clear'] ) ) ) $after = '<div class=\"clear\"></div>'; else $after = '';\n\n\t\tif ( $args['required'] ) {\n\t\t\t$args['class'][] = 'validate-required';\n\t\t\t$required = ' <abbr class=\"required\" title=\"' . esc_attr__( 'required', 'woocommerce' ) . '\">*</abbr>';\n\t\t} else {\n\t\t\t$required = '';\n\t\t}\n\n\t\t$args['maxlength'] = ( $args['maxlength'] ) ? 'maxlength=\"' . absint( $args['maxlength'] ) . '\"' : '';\n\n\t\tif ( is_string( $args['label_class'] ) )\n\t\t\t$args['label_class'] = array( $args['label_class'] );\n\n\t\tif ( is_null( $value ) )\n\t\t\t$value = $args['default'];\n\n\t\t// Custom attribute handling\n\t\t$custom_attributes = array();\n\n\t\tif ( ! empty( $args['custom_attributes'] ) && is_array( $args['custom_attributes'] ) )\n\t\t\tforeach ( $args['custom_attributes'] as $attribute => $attribute_value )\n\t\t\t\t$custom_attributes[] = esc_attr( $attribute ) . '=\"' . esc_attr( $attribute_value ) . '\"';\n\n\t\tif ( ! empty( $args['validate'] ) )\n\t\t\tforeach( $args['validate'] as $validate )\n\t\t\t\t$args['class'][] = 'validate-' . $validate;\n\n\t\tswitch ( $args['type'] ) {\n\t\tcase \"country\" :\n\n\t\t\t$countries = $key == 'shipping_country' ? WC()->countries->get_shipping_countries() : WC()->countries->get_allowed_countries();\n\n\t\t\tif ( sizeof( $countries ) == 1 ) {\n\n\t\t\t\t$field = '<p class=\"form-group form-row ' . esc_attr( implode( ' ', $args['class'] ) ) .'\" id=\"' . esc_attr( $key ) . '_field\">';\n\n\t\t\t\tif ( $args['label'] )\n\t\t\t\t\t$field .= '<label class=\"' . implode( ' ', $args['label_class'] ) .'\">' . $args['label'] . '</label>';\n\n\t\t\t\t$field .= '<strong>' . current( array_values( $countries ) ) . '</strong>';\n\n\t\t\t\t$field .= '<input type=\"hidden\" name=\"' . esc_attr( $key ) . '\" id=\"' . esc_attr( $key ) . '\" value=\"' . current( array_keys($countries ) ) . '\" ' . implode( ' ', $custom_attributes ) . ' class=\"country_to_state form-control\" />';\n\n\t\t\t\t$field .= '</p>' . $after;\n\n\t\t\t} else {\n\n\t\t\t\t$field = '<p class=\"form-group form-row ' . esc_attr( implode( ' ', $args['class'] ) ) .'\" id=\"' . esc_attr( $key ) . '_field\">'\n\t\t\t\t\t\t. '<label for=\"' . esc_attr( $key ) . '\" class=\"' . implode( ' ', $args['label_class'] ) .'\">' . $args['label'] . $required . '</label>'\n\t\t\t\t\t\t. '<select name=\"' . esc_attr( $key ) . '\" id=\"' . esc_attr( $key ) . '\" class=\"country_to_state country_select form-control\" ' . implode( ' ', $custom_attributes ) . '>'\n\t\t\t\t\t\t. '<option value=\"\">'.__( 'Select a country…', 'woocommerce' ) .'</option>';\n\n\t\t\t\tforeach ( $countries as $ckey => $cvalue )\n\t\t\t\t\t$field .= '<option value=\"' . esc_attr( $ckey ) . '\" '.selected( $value, $ckey, false ) .'>'.__( $cvalue, 'woocommerce' ) .'</option>';\n\n\t\t\t\t$field .= '</select>';\n\n\t\t\t\t$field .= '<noscript><input type=\"submit\" name=\"woocommerce_checkout_update_totals\" value=\"' . __( 'Update country', 'woocommerce' ) . '\" /></noscript>';\n\n\t\t\t\t$field .= '</p>' . $after;\n\n\t\t\t}\n\n\t\t\tbreak;\n\t\tcase \"state\" :\n\n\t\t\t/* Get Country */\n\t\t\t$country_key = $key == 'billing_state'? 'billing_country' : 'shipping_country';\n\n\t\t\tif ( isset( $_POST[ $country_key ] ) ) {\n\t\t\t\t$current_cc = wc_clean( $_POST[ $country_key ] );\n\t\t\t} elseif ( is_user_logged_in() ) {\n\t\t\t\t$current_cc = get_user_meta( get_current_user_id() , $country_key, true );\n\t\t\t\tif ( ! $current_cc) {\n\t\t\t\t\t$current_cc = apply_filters('default_checkout_country', (WC()->customer->get_country()) ? WC()->customer->get_country() : WC()->countries->get_base_country());\n\t\t\t\t}\n\t\t\t} elseif ( $country_key == 'billing_country' ) {\n\t\t\t\t$current_cc = apply_filters('default_checkout_country', (WC()->customer->get_country()) ? WC()->customer->get_country() : WC()->countries->get_base_country());\n\t\t\t} else {\n\t\t\t\t$current_cc = apply_filters('default_checkout_country', (WC()->customer->get_shipping_country()) ? WC()->customer->get_shipping_country() : WC()->countries->get_base_country());\n\t\t\t}\n\n\t\t\t$states = WC()->countries->get_states( $current_cc );\n\n\t\t\tif ( is_array( $states ) && empty( $states ) ) {\n\n\t\t\t\t$field = '<p class=\"form-group form-row ' . esc_attr( implode( ' ', $args['class'] ) ) .'\" id=\"' . esc_attr( $key ) . '_field\" style=\"display: none\">';\n\n\t\t\t\tif ( $args['label'] )\n\t\t\t\t\t$field .= '<label for=\"' . esc_attr( $key ) . '\" class=\"' . implode( ' ', $args['label_class'] ) .'\">' . $args['label'] . $required . '</label>';\n\t\t\t\t$field .= '<input type=\"hidden\" class=\"form-control hidden\" name=\"' . esc_attr( $key ) . '\" id=\"' . esc_attr( $key ) . '\" value=\"\" ' . implode( ' ', $custom_attributes ) . ' placeholder=\"' . esc_attr( $args['placeholder'] ) . '\" />';\n\t\t\t\t$field .= '</p>' . $after;\n\n\t\t\t} elseif ( is_array( $states ) ) {\n\n\t\t\t\t$field = '<p class=\"form-group form-row ' . esc_attr( implode( ' ', $args['class'] ) ) .'\" id=\"' . esc_attr( $key ) . '_field\">';\n\n\t\t\t\tif ( $args['label'] )\n\t\t\t\t\t$field .= '<label for=\"' . esc_attr( $key ) . '\" class=\"' . implode( ' ', $args['label_class'] ) .'\">' . $args['label']. $required . '</label>';\n\t\t\t\t$field .= '<select name=\"' . esc_attr( $key ) . '\" id=\"' . esc_attr( $key ) . '\" class=\"state_select form-control\" ' . implode( ' ', $custom_attributes ) . ' placeholder=\"' . esc_attr( $args['placeholder'] ) . '\">\n\t\t\t\t\t<option value=\"\">'.__( 'Select a state…', 'woocommerce' ) .'</option>';\n\n\t\t\t\tforeach ( $states as $ckey => $cvalue )\n\t\t\t\t\t$field .= '<option value=\"' . esc_attr( $ckey ) . '\" '.selected( $value, $ckey, false ) .'>'.__( $cvalue, 'woocommerce' ) .'</option>';\n\n\t\t\t\t$field .= '</select>';\n\t\t\t\t$field .= '</p>' . $after;\n\n\t\t\t} else {\n\n\t\t\t\t$field = '<p class=\"form-group form-row ' . esc_attr( implode( ' ', $args['class'] ) ) .'\" id=\"' . esc_attr( $key ) . '_field\">';\n\n\t\t\t\tif ( $args['label'] )\n\t\t\t\t\t$field .= '<label for=\"' . esc_attr( $key ) . '\" class=\"' . implode( ' ', $args['label_class'] ) .'\">' . $args['label']. $required . '</label>';\n\t\t\t\t$field .= '<input type=\"text\" class=\"input-text form-control' . implode( ' ', $args['input_class'] ) .'\" value=\"' . esc_attr( $value ) . '\" placeholder=\"' . esc_attr( $args['placeholder'] ) . '\" name=\"' . esc_attr( $key ) . '\" id=\"' . esc_attr( $key ) . '\" ' . implode( ' ', $custom_attributes ) . ' />';\n\t\t\t\t$field .= '</p>' . $after;\n\n\t\t\t}\n\n\t\t\tbreak;\n\t\tcase \"textarea\" :\n\n\t\t\t$field = '<p class=\"form-row form-group ' . esc_attr( implode( ' ', $args['class'] ) ) .'\" id=\"' . esc_attr( $key ) . '_field\">';\n\n\t\t\tif ( $args['label'] )\n\t\t\t\t$field .= '<label for=\"' . esc_attr( $key ) . '\" class=\"' . implode( ' ', $args['label_class'] ) .'\">' . $args['label']. $required . '</label>';\n\n\t\t\t$field .= '<textarea name=\"' . esc_attr( $key ) . '\" class=\"input-text form-control' . implode( ' ', $args['input_class'] ) .'\" id=\"' . esc_attr( $key ) . '\" placeholder=\"' . esc_attr( $args['placeholder'] ) . '\"' . ( empty( $args['custom_attributes']['rows'] ) ? ' rows=\"2\"' : '' ) . ( empty( $args['custom_attributes']['cols'] ) ? ' cols=\"5\"' : '' ) . implode( ' ', $custom_attributes ) . '>'. esc_textarea( $value ) .'</textarea>\n\t\t\t\t</p>' . $after;\n\n\t\t\tbreak;\n\t\tcase \"checkbox\" :\n\n\t\t\t$field = '<p class=\"form-row checkbox' . esc_attr( implode( ' ', $args['class'] ) ) .'\" id=\"' . esc_attr( $key ) . '_field\">\n\t\t\t\t\t<label for=\"' . esc_attr( $key ) . '\" class=\"checkbox ' . implode( ' ', $args['label_class'] ) .'\" ' . implode( ' ', $custom_attributes ) . '><input type=\"' . esc_attr( $args['type'] ) . '\" class=\"input-checkbox\" name=\"' . esc_attr( $key ) . '\" id=\"' . esc_attr( $key ) . '\" value=\"1\" '.checked( $value, 1, false ) .' /> ' . $args['label'] . $required . '</label>\n\t\t\t\t</p>' . $after;\n\n\t\t\tbreak;\n\t\tcase \"password\" :\n\n\t\t\t$field = '<p class=\"form-group form-row ' . esc_attr( implode( ' ', $args['class'] ) ) .'\" id=\"' . esc_attr( $key ) . '_field\">';\n\n\t\t\tif ( $args['label'] )\n\t\t\t\t$field .= '<label for=\"' . esc_attr( $key ) . '\" class=\"' . implode( ' ', $args['label_class'] ) .'\">' . $args['label']. $required . '</label>';\n\n\t\t\t$field .= '<input type=\"password\" class=\"input-text form-control' . implode( ' ', $args['input_class'] ) .'\" name=\"' . esc_attr( $key ) . '\" id=\"' . esc_attr( $key ) . '\" placeholder=\"' . esc_attr( $args['placeholder'] ) . '\" value=\"' . esc_attr( $value ) . '\" ' . implode( ' ', $custom_attributes ) . ' />\n\t\t\t\t</p>' . $after;\n\n\t\t\tbreak;\n\t\tcase \"text\" :\n\n\t\t\t$field = '<p class=\"form-group form-row ' . esc_attr( implode( ' ', $args['class'] ) ) .'\" id=\"' . esc_attr( $key ) . '_field\">';\n\n\t\t\tif ( $args['label'] )\n\t\t\t\t$field .= '<label for=\"' . esc_attr( $key ) . '\" class=\"' . implode( ' ', $args['label_class'] ) .'\">' . $args['label'] . $required . '</label>';\n\n\t\t\t$field .= '<input type=\"text\" class=\"input-text form-control' . implode( ' ', $args['input_class'] ) .'\" name=\"' . esc_attr( $key ) . '\" id=\"' . esc_attr( $key ) . '\" placeholder=\"' . esc_attr( $args['placeholder'] ) . '\" '.$args['maxlength'].' value=\"' . esc_attr( $value ) . '\" ' . implode( ' ', $custom_attributes ) . ' />\n\t\t\t\t</p>' . $after;\n\n\t\t\tbreak;\n\t\tcase \"select\" :\n\n\t\t\t$options = '';\n\n\t\t\tif ( ! empty( $args['options'] ) )\n\t\t\t\tforeach ( $args['options'] as $option_key => $option_text )\n\t\t\t\t\t$options .= '<option value=\"' . esc_attr( $option_key ) . '\" '. selected( $value, $option_key, false ) . '>' . esc_attr( $option_text ) .'</option>';\n\n\t\t\t\t$field = '<p class=\"form-group form-row ' . esc_attr( implode( ' ', $args['class'] ) ) .'\" id=\"' . esc_attr( $key ) . '_field\">';\n\n\t\t\t\tif ( $args['label'] )\n\t\t\t\t\t$field .= '<label for=\"' . esc_attr( $key ) . '\" class=\"' . implode( ' ', $args['label_class'] ) .'\">' . $args['label']. $required . '</label>';\n\n\t\t\t\t$field .= '<select name=\"' . esc_attr( $key ) . '\" id=\"' . esc_attr( $key ) . '\" class=\"select form-control\" ' . implode( ' ', $custom_attributes ) . '>\n\t\t\t\t\t\t' . $options . '\n\t\t\t\t\t</select>\n\t\t\t\t</p>' . $after;\n\n\t\t\tbreak;\n\t\tdefault :\n\n\t\t\t$field = apply_filters( 'woocommerce_form_field_' . $args['type'], '', $key, $args, $value );\n\n\t\t\tbreak;\n\t\t}\n\n\t\tif ( $args['return'] ) return $field; else echo $field;\n\t}",
"function aces_games_textfield_callback($args) {\n $option = esc_attr(get_option($args['option_name']));\n $id = $args['id'];\n $option_name = $args['option_name'];\n ?>\n <input type=\"text\" id=\"<?php echo esc_attr($id); ?>\" name=\"<?php echo esc_attr($option_name); ?>\" value=\"<?php echo esc_attr($option); ?>\" placeholder=\"<?php echo esc_attr('Default'); ?> "<?php echo esc_attr($id); ?>"\" class=\"regular-text\" />\n <?php\n}",
"public static function inputText($model,$attribute,$properties=array()) {\n// $attr = self::getNameValueID($model, $attribute);\n// $input_attributes = self::getInputAttributes($attr,$properties);\n// return '<input type=\"text\" ' . $input_attributes . ' />';\n return self::inputTag('text', $model, $attribute,$properties); \n }",
"public static function textField($name,$value='',$option=array()) {\n\t\t$option['name']=$name;\n\t\t$option['type']='text';\n\t\t$option['value']=$value;\n\t\treturn self::htmltag('input',$option);\n\t}",
"function shortcode_search_form_textfield( $atts, $content = null ) {\n\t\t$variables = array( 'class' => 'input-large full-width', 'placeholder' => __('Enter destination or hotel name', 'trav') );\n\t\textract( shortcode_atts( $variables, $atts ) );\n\t\t$class = empty( $class )?'':( ' ' . $class );\n\t\t$class = 'input-text' . $class;\n\t\t$result = '<input name=\"s\" type=\"text\" class=\"' . esc_attr( $class ) . '\" value=\"\" placeholder=\"' . esc_attr( $placeholder ) . '\" />';\n\t\treturn $result;\n\t}",
"public static function input($name, $type = 'text', $value = null, array $Atributos = null) {\n $Atributos['name'] = $name;\n $Atributos['type'] = $type;\n $Atributos['class'] = trim(@$Atributos['class'] . ' form-control');\n if ($value)\n $Atributos['value'] = $value;\n return '<input ' . self::Attributes($Atributos) . ' />';\n }",
"public function input($name, $value = NULL, $attr = array())\n\t{\n\t\t$attr = ( ! is_array($attr)) ? array('type' => $attr) : $attr; // input($name, $value, $type)\n\t\t$attr = array_merge(array('type' => 'text'), $attr);\n\t\t$attr['name'] \t= $name;\n\t\t$attr['value'] \t= $value;\n\t\t\n\t\treturn $this->e('input', $attr);\n\t}"
] |
[
"0.68024546",
"0.67161876",
"0.6609234",
"0.65675783",
"0.65653545",
"0.65595853",
"0.6546735",
"0.65022373",
"0.6490026",
"0.6438391",
"0.6318718",
"0.62543434",
"0.6248938",
"0.6240237",
"0.62366104",
"0.62273335",
"0.62262124",
"0.62078667",
"0.61671585",
"0.6143579",
"0.60793656",
"0.60420334",
"0.6012067",
"0.6008946",
"0.6004699",
"0.59962606",
"0.59926397",
"0.598136",
"0.5979766",
"0.5979213"
] |
0.7962828
|
0
|
Print instructions before the fields for the bii_instagram_oauth settings section
|
public function print_oauth_section_info() {
printf( '<p>%s</p>', __( 'Set your Instagram API credentials here. You can generate them by <a href="http://instagram.com/developer/clients/register/" target="_blank">creating a new client</a>.', 'bii-instagram' ) );
printf( '<p>%s</p>', sprintf( __( 'Your OAuth <code>redirect_uri</code> attribute should be: %s', 'bii-instagram' ), '<br /><kbd>' . admin_url( self::SETTINGS_PAGE ) . '</kbd>' ) );
if ( $this->get_option( 'client_id' ) ) {
printf( '<p><a href="%s" class="button">%s</a></p>', $this->api->getLoginUrl(), __( 'Authenticate with Instagram', 'bii-instagram' ) );
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function admin_section_code_settings() {\n\t\t\techo '<p>' . esc_html( 'Insert Drip API Token & Account ID bellow' ) . '</p>';\n\t\t}",
"public function page_init() {\n register_setting( 'bii_instagram', 'bii_instagram' );\n\n add_settings_section(\n 'bii_instagram_oauth',\n __( 'Authentication', 'bii-instagram' ),\n array( &$this, 'print_oauth_section_info' ),\n 'bii-instagram'\n );\n add_settings_field(\n 'bii_instagram_client_id',\n __( 'Client ID', 'bii-instagram' ),\n array( &$this, 'create_textfield' ),\n 'bii-instagram',\n 'bii_instagram_oauth',\n array( 'code' => true, 'name' => 'client_id' )\n );\n add_settings_field(\n 'bii_instagram_client_secret',\n __( 'Client Secret', 'bii-instagram' ),\n array( &$this, 'create_textfield' ),\n 'bii-instagram',\n 'bii_instagram_oauth',\n array( 'code' => true, 'name' => 'client_secret', 'type' => 'password' )\n );\n }",
"public function create_options_page() {\n print '<div class=\"wrap\">';\n screen_icon();\n printf( '<h2>%s</h2>', __( 'Instagram Settings', 'bii-instagram' ) );\n print '<form method=\"post\" action=\"options.php\">';\n settings_fields( 'bii_instagram' );\n do_settings_sections( 'bii-instagram' );\n submit_button();\n print '</form>';\n print '</div>';\n }",
"public function display_api_key() {\r\n\t\t$key = 'inf_key';\r\n\r\n\t\tif ( isset( $this->existing_options[$key] ) && $this->existing_options[$key] )\r\n\t\t\t$existing_value = $this->existing_options[$key];\r\n\t\telse\r\n\t\t\t$existing_value = '';\r\n\r\n\t\t$id = $key;\r\n\t\tsettings_errors( $id );\r\n\t\techo '<input type=\"password\" name=\"' . self::OPTION_NAME . '[' . $key . ']\" id=\"' . $id . '\"';\r\n\t\tif ( $existing_value )\r\n\t\t\techo ' value=\"' . esc_attr( $existing_value ) . '\"';\r\n\t\techo ' size=\"40\" autocomplete=\"off\" pattern=\"[a-zA-Z0-9-_]+\" />';\r\n\r\n\t\techo '<p class=\"description\">' . __( 'Not sure what the API key is or where to get it? <a target=\"_blank\" href=\"http://kb.infusionsoft.com/index.php?/article/AA-00442/0/How-do-I-enable-the-Infusionsoft-API.html\">Click here</a>', 'fb-eventpresso' ) . '</p>';\r\n\t}",
"public function settings_section_text() {\r\n\t\t\t\t// Think of this as help text for the section.\r\n\t\t\t\techo '<h1>';\r\n\t\t\t\techo esc_html( 'These settings are for configuring Sift Ninja' );\r\n\t\t\t\techo '</h1>';\r\n\r\n\t\t\t\techo 'If you do not have a Sift ninja account, you can visit <a href=\"http://www.siftninja.com?platform=WordPressPlatform\" target=\"_blank\">Sift Ninja</a> to create your free account.';\r\n\t\t}",
"function access_key_gui() {\n $access_key = get_option('amazon_polly_access_key');\n echo '<input type=\"text\" class=\"regular-text\" name=\"amazon_polly_access_key\" id=\"amazon_polly_access_key\" value=\"' . esc_attr($access_key) . '\" autocomplete=\"off\"> ';\n echo '<p class=\"description\" id=\"amazon_polly_access_key\">Required only if you aren\\'t using IAM roles</p>';\n }",
"public function showApiKeyInput()\n\t{\n\t\t$id = 'revendless-api-key';\n\t\t$option = 'api_key';\n\n\t\t$value = (isset($this->options[$option]) && $this->options[$option]) ? ' value=\"'.esc_attr($this->options[$option]).'\"' : '';\n\n\t\tsettings_errors($id);\n\n\t\tprint '<input type=\"text\" name=\"'.self::OPTION_NAME.'['.$option.']\"'.$value.' id=\"'.$id.'\" maxlength=\"40\" size=\"45\" autocomplete=\"off\" pattern=\"[a-zA-Z0-9]+\" />';\n\t\tprint '<p class=\"description\">'.esc_html( __('An API Key associates your product integrations with your personal Revendless account.', 'revendless')).'</p>';\n\t}",
"public function info() {\n $plugin = $this->viewVars['vv_authenticator']['Authenticator']['plugin'];\n $this->Authenticator->$plugin->setConfig($this->viewVars['vv_authenticator']); \n \n $this->set('vv_status', $this->Authenticator->$plugin->status($this->request->params['named']['copersonid']));\n \n $this->set('title_for_layout', $this->viewVars['vv_authenticator']['Authenticator']['description']);\n }",
"public function admin_options() {\n?>\n\t\t<h3><?php _e('Authorize SIM', WC_Authorize_SIM::TEXT_DOMAIN); ?></h3>\n \t<p><?php _e('Authorize SIM works by sending the user to Authorize to enter their payment information.', WC_Authorize_SIM::TEXT_DOMAIN); ?></p>\n \t<div class=\"updated\"><p>\n \t\t<strong><?php _e('Authorize.Net config:', WC_Authorize_SIM::TEXT_DOMAIN) ?></strong>\n \t\t<?php _e( 'Please login to Authorize and go to Account >> Settings >> Response/Receipt URLs' ); ?>\n \t\t<ol>\n\t \t\t<li><?php _e( 'Click \"Add URL\", and set this value for URL textbox: ') ?><strong><?php echo $this->notify_url ?></strong></li>\n\t \t\t<li><?php _e( 'Click \"Submit\" to complete', WC_Authorize_SIM::TEXT_DOMAIN ) ?></li>\n \t\t</ol>\n \t</p></div>\n \t<table class=\"form-table\">\n \t\t<?php $this->generate_settings_html(); ?>\n\t\t</table><!--/.form-table--> \t\n<?php\n }",
"public function _settings_remote_auth_section_general() {\n _e( 'The general remote authentication settings', 'zendesk' );\n }",
"function action_admin_info()\n {\n $this->load_options();\n if (!$this->ready) {\n echo '<div class=\"container\">The reCAPTCHA V2 plugin is almost ready to go. Please go the the '\n .'plugin configuration section to enter your API keys.</div>';\n }\n }",
"public function describe_client_options() {\n echo '<p>The following options configure what URL to access when a post is published in this blog.</p>';\n }",
"function insta_f_settings_page(){\n\t\n\t// -- log out\n\tif(isset($_POST['insta_f_logout']) && $_POST['insta_f_logout'] == 'Y'){\t\t\n\t\tlog_out();\n\t}\n\t\n\t// -- gets the user access code and save the user settings\n\tfunction insta_f_get_access($insta_f_code){\n\t\t$url = 'https://api.instagram.com/oauth/access_token';\n\t\t$data = array(\n\t\t 'client_id' => INSTA_CLIENT_ID,\n\t\t 'client_secret' => INSTA_CLIENT_SECRET,\n\t\t 'grant_type' => 'authorization_code',\n\t\t 'redirect_uri' => MY_REDIRECT_URI . \"?return_uri=\".INSTA_FOLIO_URL,\n\t\t 'code' => $insta_f_code\n\t\t\t\t\t);\n\n\t\t$args = array(\n\t\t\t\t'headers' => array('Accept: application/json'),\n\t\t\t\t'body' => $data,\n\t\t\t\t'timeout' => 20\n\t\t\t);\n\n\t\t$result = wp_remote_post($url, $args);\n\n\t\t$json = wp_remote_retrieve_body($result);\n\t\t$json_object = json_decode($json);\n\n\t\treturn $json_object;\n\t}\n\t\n\t$instagram_connected = 'connected';\n\t$access_token = get_option('access_token');\n\t\n\t// -- if we have the code then get access token\n\tif(isset($_GET['code']) && $access_token == ''){\n\t\t$insta_code_url = 'loggedin';\n\t\t$insta_f_results = insta_f_get_access($_GET['code']);\n\t\t\n\t\t// -- set the options\n\t\tupdate_option('access_token', $insta_f_results->access_token);\n\t\tupdate_option('insta_username', $insta_f_results->user->username);\n\t\tupdate_option('insta_user_id', $insta_f_results->user->id);\n\t\tupdate_option('insta_profile_picture', $insta_f_results->user->profile_picture);\n\t}\n\t\n\tif($instagram_connected != 'not-connected'){\n\t\t$access_token = get_option('access_token');\n\t\t$insta_code_url = 'loggedin';\n\t\t\n\t\tif(!$access_token){\n\t\t\t// -- there is no access_token so create the url to get a code and start access process\n\t\t\t$insta_code_url = \"https://api.instagram.com/oauth/authorize/?client_id=\" . INSTA_CLIENT_ID . \"&redirect_uri=\" . MY_REDIRECT_URI . \"?return_uri=\" . htmlentities(INSTA_FOLIO_URL) . \"&response_type=code\";\t\n\t\t}\n\t}\n\t?>\n\n\n\t<div class=\"wrap\">\n\t\t<h2>Instagram Portfolio</h2>\n\t\t<?php if($insta_code_url != 'loggedin'):\t?>\n\t\t\t<div><a href=\"<?php echo $insta_code_url; ?>\">Log-in to Instagram and register the app.</a></div>\n\t\t<?php else: ?>\n\t\t\t<div>Logged in success! You are logged in as:</div>\t\t\n\t\t\t<div><strong>Name:</strong> <?php echo get_option('insta_username'); ?></div>\n\t\t\t<div><p><img src=\"<?php echo get_option('insta_profile_picture'); ?>\" ><p/></div>\n\t\t\t\n\t\t\t<div>\n\t\t\t\t<p>\n\t\t\t\t<form name=\"insta_f_logout\" method=\"post\" action=\"<?php echo str_replace( '%7E', '~', INSTA_FOLIO_URL); ?>\">\n\t\t\t\t\t<input type=\"hidden\" name=\"insta_f_logout\" value=\"Y\">\n\t\t\t\t\t<input type=\"submit\" class=\"button\" value=\"Log out\" name=\"logout\" onclick=\"\" >\n\t\t\t\t</form>\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t<?php endif; ?>\n\t</div>\n\n<?php }",
"public function _settings_section_dropbox() {\n _e( 'The Zendesk Dropbox places a convenient tab on your pages that allow your visitors to contact you via a pop-up form.', 'zendesk' );\n }",
"public function page_init()\n {\n register_setting(\n 'my_option_group', // Option group\n 'linkedin_api_option', // Option name\n array( $this, 'sanitize' ) // Sanitize\n );\n\n add_settings_section(\n 'setting_section_id', // ID\n 'Request Settings', // Title\n array(), // Callback\n 'my-setting-admin' // Page\n );\n\n add_settings_field(\n 'redirect_url', // ID\n 'Redirect URL', // Title\n array( $this, 'redirect_url_callback' ), // Callback\n 'my-setting-admin', // Page\n 'setting_section_id' // Section\n );\n\n add_settings_field(\n 'client_id',\n 'Client ID',\n array( $this, 'client_id_callback' ),\n 'my-setting-admin',\n 'setting_section_id'\n );\n\n add_settings_field(\n 'client_secret',\n 'Client Secret',\n array( $this, 'client_secret_callback' ),\n 'my-setting-admin',\n 'setting_section_id'\n );\n\n add_settings_field(\n 'authorization_code',\n 'Authorization Code For An Access Token',\n array( $this, 'authorization_code_callback' ),\n 'my-setting-admin',\n 'setting_section_id'\n );\n\n add_settings_field(\n 'access_token',\n 'Access Token',\n array( $this, 'access_token_callback' ),\n 'my-setting-admin',\n 'setting_section_id'\n );\n\n }",
"function acx_widget_si_pluign_not_configured()\r\n{\r\n echo '<div class=\"error\">\r\n\t<p><b>Acurax Social Media Widget Plugin is not configured. You need to configure your social media profile URL\\'s \r\n\t\t to start showing the Acurax Social Media Widgets - <a href=\"admin.php?page=Acurax-Social-Widget-Settings\">Click \r\n\t\t here to configure</a></b></p>\r\n\t\t </div>';\r\n}",
"public function print_section_info()\n {\n print 'Enter your settings below:';\n }",
"public function print_section_info()\n {\n print 'Enter your settings below:';\n }",
"public function print_section_info()\n {\n print 'Enter your settings below:';\n }",
"function secret_key_gui() {\n $secret_key = get_option('amazon_polly_secret_key');\n echo '<input type=\"password\" class=\"regular-text\" name=\"amazon_polly_secret_key\" id=\"amazon_polly_secret_key\" value=\"' . esc_attr($secret_key) . '\" autocomplete=\"off\"> ';\n echo '<p class=\"description\" id=\"amazon_polly_access_key\">Required only if you aren\\'t using IAM roles</p>';\n }",
"public function print_section_info() {\n // print 'Enter your settings below:';\n }",
"public function auth_section() {\n\n ?><p><?php _e( 'Information about SMTP user authentication', JPEN_DOMAIN ); ?></p><?php\n\n add_settings_field( \n 'jpen_smtp_username', \n __( 'SMTP Username', JPEN_DOMAIN ), \n [ $this, 'smtp_username_field' ], \n $this->page_slug, \n 'jpen_auth', \n array(\n 'label_for' => 'jpen_smtp_username',\n 'default' => '[email protected]',\n ) \n );\n\n add_settings_field( \n 'jpen_smtp_password', \n __( 'SMTP Password', JPEN_DOMAIN ), \n [ $this, 'smtp_password_field' ], \n $this->page_slug, \n 'jpen_auth', \n array(\n 'label_for' => 'jpen_smtp_password',\n ) \n );\n }",
"public static function print_section_info()\n {\n print 'Enter your settings below:';\n }",
"function ghactivity_app_settings_callback() {\n\techo '<p>';\n\tprintf(\n\t\t__( 'To use the plugin, you will need to create a new personal access token on GitHub first. <a href=\"%1$s\">click here</a> to create a token. You only need to check the first \"repo\" checkbox.', 'ghactivity' ),\n\t\tesc_url( 'https://github.com/settings/tokens/new' )\n\t);\n\techo '<br/>';\n\t_e( 'Once you created your app, copy the access token value below. You will also want to enter your GitHub username.', 'ghactivity' );\n\techo '</p>';\n}",
"function print_additional_settings_section_info() {\n }",
"function mustsee_social_settings_box() {\n\t?>\n\n\t<p>Twitter URL:<br />\n\t\t<input type=\"text\" name=\"<?php echo GENESIS_SETTINGS_FIELD; ?>[twitter_url]\" value=\"<?php echo esc_attr( genesis_get_option('twitter_url') ); ?>\" size=\"50\" />\n\t</p>\n\n\t<p>Facebook URL:<br />\n\t\t<input type=\"text\" name=\"<?php echo GENESIS_SETTINGS_FIELD; ?>[facebook_url]\" value=\"<?php echo esc_attr( genesis_get_option('facebook_url') ); ?>\" size=\"50\" />\n\t</p>\n\n\t<p>GooglePlus URL:<br />\n\t\t<input type=\"text\" name=\"<?php echo GENESIS_SETTINGS_FIELD; ?>[googleplus_url]\" value=\"<?php echo esc_attr( genesis_get_option('googleplus_url') ); ?>\" size=\"50\" />\n\t</p>\n\n\t<p>Pinterest URL:<br />\n\t\t<input type=\"text\" name=\"<?php echo GENESIS_SETTINGS_FIELD; ?>[pinterest_url]\" value=\"<?php echo esc_attr( genesis_get_option('pinterest_url') ); ?>\" size=\"50\" />\n\t</p>\n\n\t<p>LinkedIn URL:<br />\n\t\t<input type=\"text\" name=\"<?php echo GENESIS_SETTINGS_FIELD; ?>[linkedin_url]\" value=\"<?php echo esc_attr( genesis_get_option('linkedin_url') ); ?>\" size=\"50\" />\n\t</p>\n\n\t<p>YouTube Channel URL:<br />\n\t\t<input type=\"text\" name=\"<?php echo GENESIS_SETTINGS_FIELD; ?>[youtube_url]\" value=\"<?php echo esc_attr( genesis_get_option('youtube_url') ); ?>\" size=\"50\" />\n\t</p>\n\n\t<p>Address:<br />\n\t\t<input type=\"text\" name=\"<?php echo GENESIS_SETTINGS_FIELD; ?>[agent_address]\" value=\"<?php echo esc_attr( genesis_get_option('agent_address') ); ?>\" size=\"50\" />\n\t</p>\n\n\t<p>Phone:<br />\n\t\t<input type=\"text\" name=\"<?php echo GENESIS_SETTINGS_FIELD; ?>[agent_phone]\" value=\"<?php echo esc_attr( genesis_get_option('agent_phone') ); ?>\" size=\"50\" />\n\t</p>\n\n\t<p>Email:<br />\n\t\t<input type=\"text\" name=\"<?php echo GENESIS_SETTINGS_FIELD; ?>[agent_email]\" value=\"<?php echo esc_attr( genesis_get_option('agent_email') ); ?>\" size=\"50\" />\n\t</p>\n\t<?php\n}",
"public function print_settings_section_info()\n {\n }",
"public function section_cb()\n {\n echo '<p class=\"description\">';\n _e('These options were added by Simple Login Lockdown and control ' .\n 'access to your login form.', 'simple-login-lockdown');\n echo '</p>';\n }",
"public function default_settings_section_info() {\n global $WCPc;\n _e('Enter your default settings below', $WCPc->text_domain);\n }",
"public function paml_additional_options() {\n\t\tglobal $paml_options;\n\n\t\t$multisite_reg = get_site_option( 'registration' );\n\n\t\techo '<div id=\"additional-settings\">';\n\n\t\tif ( ( get_option( 'users_can_register' ) && ! is_multisite() ) || ( $multisite_reg == 'all' || $multisite_reg == 'blog' || $multisite_reg == 'user' ) )\n\t\t\techo '<a href=\"#register\" class=\"modal-login-nav\">' . __( 'Register', 'pressapps' ) . '</a> | ';\n\n\t\techo '<a href=\"#forgotten\" class=\"modal-login-nav\">' . __( 'Lost your password?', 'pressapps' ) . '</a>';\n\n\t\techo '<div class=\"hide-login\"> | <a href=\"#login\" class=\"modal-login-nav\">' . __( 'Back to Login', 'pressapps' ) . '</a></div>';\n\n\t\techo '</div>';\n\t}"
] |
[
"0.7322873",
"0.69562066",
"0.6330224",
"0.6225886",
"0.6001283",
"0.59866196",
"0.59599996",
"0.5959297",
"0.59509325",
"0.59050655",
"0.58758104",
"0.58668965",
"0.58575696",
"0.5832433",
"0.5787675",
"0.57862735",
"0.57626843",
"0.57626843",
"0.57626843",
"0.5758138",
"0.5744632",
"0.57037085",
"0.5657023",
"0.5655919",
"0.56504375",
"0.5644298",
"0.5637656",
"0.56139",
"0.56067246",
"0.56025785"
] |
0.7962958
|
0
|
This function loads all data for the page with the specified GUID
|
public function loadByGUID($guid) {
global $db, $tags;
$query = "SELECT p.*,
DATE_FORMAT(p.date_published, '%d <span>%M %Y</span>') as nice_date,
DATE_FORMAT(p.date_created, '%d <span>%M %Y</span>') as blog_date,
t.template_php, t.template_type, s.style_css, msv.language, l.encoding, l.text_dir,
u.full_name
FROM pages p
LEFT JOIN pages_templates t ON t.template_id = p.template
LEFT JOIN pages_style s ON s.style_id = p.style
LEFT JOIN sites_versions msv ON msv.msv=p.msv
LEFT JOIN languages l ON msv.language=l.abbr
LEFT JOIN users u on u.id = p.user_created
WHERE p.guid = '$guid'";
//print "<!-- $query -->\n";
if ($data = $db->get_row($query)) {
//echo '<pre>'. print_r($data,true) .'</pre>';
$this->guid = $data->guid;
$this->name = $data->name;
$this->title = html_entity_decode($data->title);
//$msg.="loaded page title (".$this->title.") data(".$data->title.") \n";
$this->sort_order = $data->sort_order;
$this->meta_description = html_entity_decode($data->meta_description);
//$this->meta_keywords = $data->meta_keywords;
$this->parent = $data->parent;
$this->template = $data->template_php;
$this->template_id = $data->template;
$this->template_type = $data->template_type==2?"panel":"page";
$this->style = $data->style_css;
$this->style_id = $data->style;
$this->date_created = $data->date_created;
$this->user_created = $data->full_name;
$this->user_created_id = $data->user_created;
$this->date_modified = $data->date_modified;
$this->date_published = $data->date_published;
$this->nice_date = $data->nice_date;
$this->blog_date = $data->blog_date;
$this->setShortURL($this->getShortURL($guid));
$this->hidden = $data->hidden;
$this->robots = $data->robots;
$this->offline = $data->offline;
$this->private = $data->private;
$this->comment = $data->comment;
$this->locked = $data->locked;
$this->siteID = $data->msv;
$this->lang = $data->lang;
$this->encoding = $data->encoding;
$this->textdir = $data->text_dir;
$this->type = $data->type;
$this->target = $data->target;
$this->member_id = $data->member_id;
$this->donate_button = $data->donate_button;
//print "<!-- loadByGUID($guid) $msg --> \n";
return true;
}
return false;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function getPageData();",
"public function ee_breakouts_page_load() {}",
"public function load($uuid, $webspaceKey, $languageCode, $loadGhostContent = false);",
"function pageLoad () {\n\tglobal $pageBegin, $pageEnd, $tableRow;\n\t$page = page_load (\"search_results.html\");\n\n\t$tableRow = page_split ($page, \"[[\", \"]]\");\n\t$pageBegin = $tableRow[0];\n\t$pageEnd = $tableRow[2];\n\t$tableRow = $tableRow[1];\n}",
"public function getData(): ContuctUsPage;",
"public function static_page($guid)\n {\n\n $this->_layout($guid);\n }",
"public function loadPage()\n {\n /*if(!isset(self::$user_id)) {\n self::$user_id = $_GET['user_id'];\n self::$id_wp_user = $_GET['id_wp_page'];\n self::$id_post = $_GET['id_post'];\n self::$nonce_img_upload = \"<input type='hidden' id='nonce_img_upload' name='nonce_img_upload' value='{$_GET['nonce_img_upload']}'>\n <input type='hidden' name='_wp_http_referer' value='/stomshop/'>\";\n self::$nonce_img_del = \"<input type='hidden' id='nonce_img_del' name='nonce_img_del' value='{$_GET['nonce_img_del']}'>\n <input type='hidden' name='_wp_http_referer' value='/stomshop/'>\";\n Profile_user::getUserListGods($_GET['id_wp_page']);\n self::$list = Profile_user::$page;\n self::$profile = Profile_user::getUserProfileObject($_GET['id_wp_page'])[0];\n }\n $page = $_GET['page']??0;\n $this->get_page($page = parent::$list[$page]);*/\n }",
"public function loadData()\n\t{\n\t\t$this->load->view('data_page');\n\t}",
"function getPageData($uid) {\n\t\treturn $this->sys_page->getPageOverlay( $this->sys_page->getPage( $uid ), $GLOBALS['TSFE']->sys_language_uid );\n\t}",
"public function getExtraPageData();",
"function set_page_vars($id) {\n global $_PAGE_TITLE, $_IMAGE_URL, $_PAGE_ID;\n\n $json = file_get_contents(\"http://1504.nl/api/?t=page&a=get&i=\" . $id);\n $json = Page_helper::remove_utf8_bom($json);\n $page = json_decode($json);\n // print_r($page);\n\n $_PAGE_ID = $page[0]->id;\n $_PAGE_TITLE = $page[0]->name;\n $_IMAGE_URL = $page[0]->image_url;\n }",
"public function loadDataAction()\n {\n $contentService = Dm_Session::GetServiceFactory()->getContentService();\n\n $filter = new Service_Api_Filter_Content();\n\n $filter->id = $this->_getParam('id');\n $filter->mimeType = $this->_getParam('mimeType');\n $filter->limit = $this->_getParam('limit');\n $filter->offset = $this->_getParam('offset');\n $filter->search = $this->_getParam('search');\n $filter->sources = $this->_getParam('sources');\n $filter->format = $this->_getParam('dim');\n $filter->properties = $this->_getParam('properties');\n $contents = $contentService->contentsRead($filter);\n $this->view->data = $contents;\n }",
"public function load($uuid);",
"public function loadDataFromId(){\r\n\t\t\t$this -> loadFromId();\r\n\t }",
"public function loadData()\n {\n $this->sendApiCall(self::ACTION_RETRIEVE, $this->getCreateUrl());\n }",
"abstract protected function fetchData( $identifier );",
"private function loadPage()\n\t{\n\t $data = $this->getData();\n \t \n\t $this->load->view('index', $data);\n\t}",
"protected function _load()\r\n {\r\n $page = new Model_Page();\r\n $children = $page->getChildren($this->_parentId);\r\n if ($children != null && $children->count() > 0) {\r\n foreach ($children as $child) {\r\n if ($child->show_on_menu == 1) {\r\n $this->items[] = new Digitalus_Menu_Item($child);\r\n }\r\n }\r\n }\r\n }",
"protected function _loadPageForOffset($offset) {\r\n\r\n $this->_calculatePageSize();\r\n\r\n $start = round($offset / $this->pageSize) * $this->pageSize;\r\n\r\n $params = $this->_getPageParams($start, $this->pageSize);\r\n\r\n\r\n\r\n // Loading page\r\n\r\n $data = $this->adapter->request('GET', $this->url, $params);\r\n\r\n $this->adapter->debug = false;\r\n\r\n\r\n\r\n $rekeyed = array();\r\n\r\n foreach ($data['entries'] as $key => $entry) {\r\n\r\n $rekeyed[$key+$data['start']] = $entry;\r\n\r\n }\r\n\r\n $this->data['entries'] = array_merge($this->data['entries'], $rekeyed);\r\n\r\n }",
"protected function LoadData()\n\t{\n\t\t$head = $this->GetProject()->GetHeadCommit();\n\t\t$this->tpl->assign(\"head\",$head);\n\n\t\t$this->tpl->assign('page', $this->params['page']);\n\t\t$skip = $this->params['page'] * 100;\n\n\t\t$headlist = $this->GetProject()->GetHeadList()->GetOrderedHeads('-committerdate', 101, $skip);\n\t\tif (isset($headlist) && (count($headlist) > 0)) {\n\t\t\tif (count($headlist) > 100) {\n\t\t\t\t$headlist = array_slice($headlist, 0, 100);\n\t\t\t\t$this->tpl->assign('hasmoreheads', true);\n\t\t\t}\n\t\t\t$this->tpl->assign(\"headlist\", $headlist);\n\t\t}\n\t}",
"public function load($data);",
"protected function loadPage()\n\t{\n\t\t$this->_dataProvider->getPagination()->setCurrentPage($this->_currentPage);\n\t\treturn $this->_items = $this->dataProvider->getData(true);\n\t}",
"public function getChildByGUID($guid) {\n\t\t\tglobal $db;\n\t\t\t$data = $db->get_var(\"SELECT guid FROM pages WHERE parent = '$guid'\");\n\t\t\treturn $data;\n\t\t}",
"public function getSectionByPageGUID($guid){\n\t\t\tglobal $db;\n\t\t\t\n\t\t\t// so we need to recursively get the parent of the page and find the parent of that page\n\t\t\t// this could be any depth, so we stop before we get to '1' - the homepage...\n\t\t\tif($guid){\n\t\t\t\t$complete=false;\n\t\t\t\twhile(!$complete){\n\t\t\t\t\t//$guid = $this->getParentByGUID($guid);\n\t\t\t\t\t$query = \"SELECT parent,msv FROM pages WHERE guid='\". $guid .\"'\";\n\t\t\t\t\t$data = $db->get_row( $query );\n\t\t\t\t\t//echo '<br /><br />results: '. print_r($data,true) .' <br />query: '. $query .\"<br /><br />\";\n\t\t\t\t\tif($data->parent===$data->msv){\n\t\t\t\t\t\t$complete=true;\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$guid = $data->parent;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t//return $this->getChildByGUID($guid);\n\t\t\t\treturn $guid;\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"public function loadPage($pageId) {\n if (substr($pageId, 0, 1) == \"_\") {\n $employeeId = substr($pageId, 1);\n $pageId = \"\";\n } else {\n $idArray = explode(\"_\", $pageId);\n $pageId = $idArray[0];\n $employeeId = $idArray[1];\n }\n\n $this->employeeId = $employeeId;\n\n $dbConnection = dbconn::getConnectionBuild()->getConnection();\n\n if ($pageId != \"\") {\n // Load a specific property.\n $sqlStmt = \"SELECT id, customer_id, tenant_first_name, tenant_last_name, address, city, state, zip, phone, email, notes \";\n $sqlStmt .= \"FROM property \";\n $sqlStmt .= \"WHERE id = ? \";\n\n $stmtObj = $dbConnection->prepare($sqlStmt);\n $stmtObj->bind_param(\"i\", $pageId);\n $stmtObj->execute();\n $stmtObj->bind_result($property_id, $customer_id, $first_name, $last_name, $address, $city, $state, $zip, $phone, $email, $notes);\n while ($stmtObj->fetch()) {\n $this->propertyId = $property_id;\n $this->customerId = $customer_id;\n $this->firstName = $first_name;\n $this->lastName = $last_name;\n $this->address = $address;\n $this->city = $city;\n $this->state = $state;\n $this->zip = $zip;\n $this->phone = $phone;\n $this->email = $email;\n $this->notes = $notes;\n }\n } else {\n\n foreach ($this->fieldArray as $fieldName) {\n if (isset($_POST[$fieldName])) {\n $this->setField($fieldName, $_POST[$fieldName]);\n }\n }\n\n }\n\n if (isset($_POST['action'])) {\n if ($_POST['action'] == \"save\") {\n $this->validateFormData();\n if ($this->passedValidation) {\n $this->saveData();\n }\n }\n }\n\n $sqlStmt = \"\";\n\n if (isset($_POST['listby'])) {\n $searchCustomerId = \"\";\n $searchFName = \"\";\n $searchLName = \"\";\n $searchAddress = \"\";\n if (isset($_POST['searchCustomerId'])) {\n $searchCustomerId = $_POST['searchCustomerId'];\n }\n\n if (isset($_POST['searchFName'])) {\n $searchFName = $_POST['searchFName'];\n if ($searchFName != '') {\n $searchFName = '%' . $searchFName . '%';\n }\n }\n if (isset($_POST['searchLName'])) {\n $searchLName = $_POST['searchLName'];\n if ($searchLName != '') {\n $searchLName = '%' . $searchLName . '%';\n }\n }\n if (isset($_POST['searchAddress'])) {\n $searchAddress = $_POST['searchAddress'];\n if ($searchAddress != '') {\n $searchAddress = '%' . $searchAddress . '%';\n }\n }\n\n if ($searchCustomerId || $searchFName || $searchLName || $searchAddress) {\n\n $bindParam = \"\";\n $searchCriteria = 0;\n $sqlStmt = \"SELECT p.id, c.first_name, c.last_name, c.phone, c.email, p.tenant_first_name, p.tenant_last_name, p.phone, p.email, p.address \";\n $sqlStmt .= \"FROM property p, customer c \";\n $sqlStmt .= \"WHERE p.customer_id = c.id \";\n if ($searchCustomerId) {\n $sqlStmt .= \"AND p.customer_id = ? \";\n $bindParam .= \"i\";\n $searchCriteria = 1;\n }\n if ($searchFName) {\n $sqlStmt .= \"AND p.tenant_first_name LIKE ? \";\n $bindParam .= \"s\";\n $searchCriteria = 10;\n }\n\n if ($searchLName) {\n $sqlStmt .= \"AND p.tenant_last_name LIKE ? \";\n $bindParam .= \"s\";\n $searchCriteria = 100;\n }\n if ($searchAddress) {\n $sqlStmt .= \"AND p.address LIKE ? \";\n $bindParam .= \"s\";\n $searchCriteria = 1000;\n }\n\n $sqlStmt .= \"ORDER BY c.last_name\";\n\n $stmtObj = $dbConnection->prepare($sqlStmt);\n\n switch ($searchCriteria) {\n case 1111 : $stmtObj->bind_param($bindParam, $searchCustomerId, $searchFName, $searchLName, $searchAddress);\n break;\n case 1110 : $stmtObj->bind_param($bindParam, $searchFName, $searchLName, $searchAddress);\n break;\n case 1101 : $stmtObj->bind_param($bindParam, $searchCustomerId, $searchLName, $searchAddress);\n break;\n case 1100 : $stmtObj->bind_param($bindParam, $searchLName, $searchAddress);\n break;\n case 1011 : $stmtObj->bind_param($bindParam, $searchCustomerId, $searchFName, $searchAddress);\n break;\n case 1010 : $stmtObj->bind_param($bindParam, $searchFName, $searchAddress);\n break;\n case 1001 : $stmtObj->bind_param($bindParam, $searchCustomerId, $searchAddress);\n break;\n case 1000 : $stmtObj->bind_param($bindParam, $searchAddress);\n break;\n case 111 : $stmtObj->bind_param($bindParam, $searchCustomerId, $searchFName, $searchLName);\n break;\n case 110 : $stmtObj->bind_param($bindParam, $searchFName, $searchLName);\n break;\n case 101 : $stmtObj->bind_param($bindParam, $searchCustomerId, $searchLName);\n break;\n case 100 : $stmtObj->bind_param($bindParam, $searchLName);\n break;\n case 11 : $stmtObj->bind_param($bindParam, $searchCustomerId, $searchFName);\n break;\n case 10 : $stmtObj->bind_param($bindParam, $searchFName);\n break;\n case 1 : $stmtObj->bind_param($bindParam, $searchCustomerId);\n break;\n }\n\n }\n\n }\n\n // List customers\n\n if (!$sqlStmt) {\n $sqlStmt = \"SELECT p.id, c.first_name, c.last_name, c.phone, c.email, p.tenant_first_name, p.tenant_last_name, p.phone, p.email, p.address \";\n $sqlStmt .= \"FROM property p, customer c \";\n $sqlStmt .= \"WHERE p.customer_id = c.id \";\n $sqlStmt .= \"ORDER BY c.last_name LIMIT 15 \";\n\n $stmtObj = $dbConnection->prepare($sqlStmt);\n }\n\n\n $stmtObj->execute();\n $stmtObj->bind_result($property_id, $first_name, $last_name, $phone, $email, $t_first_name, $t_last_name, $t_phone, $t_email, $address);\n $rowCount = 0;\n while ($stmtObj->fetch()) {\n if ($rowCount++ % 2 == 0) {\n $thisClass = \"searchresults\";\n } else {\n $thisClass = \"altsearchresults\";\n }\n $listingHtml = '<td class=\"' . $thisClass . '\"><a href=\"index.php?page=properties&pid=' . $property_id . '_' . $employeeId . '\">';\n $listingHtml .= $last_name . ', ' . $first_name . '</a></td>';\n $listingHtml .= '<td class=\"' . $thisClass . '\">' . displayPhone($phone) . ' ' . $email . '</td>';\n $listingHtml .= '<td class=\"' . $thisClass . '\">' . $t_last_name . ', ' . $t_first_name . '</td>';\n $listingHtml .= '<td class=\"' . $thisClass . '\">' . displayPhone($t_phone) . ' ' . $t_email . '</td>';\n $listingHtml .= '<td class=\"' . $thisClass . '\">' . $address . '</td>';\n\n $this->propertyList[$property_id] = $listingHtml;\n }\n }",
"function loadData()\n\t{\n\t\tstatic $data;\n\t\t\n\t\tif(!$data)\n\t\t\t$data=self::getData();\n\n\t\tif(isset($data[$this->id]))\n\t\t\t$this->setValues((array)$data[$this->id]);\t\t\t\n\t}",
"public function load($param = null)\n {\n try\n {\n\n $initial = $param['initial'];\n\n $users = User::all($initial);\n \n $items = '';\n foreach ($users as $user)\n { \n $item = file_get_contents('html/item.html');\n $item = str_replace( '{id}', $user['id'], $item);\n $item = str_replace( '{name}', $user['name'], $item);\n $item = str_replace( '{address}', $user['address'], $item);\n $item = str_replace( '{email}', $user['email'], $item);\n \n \n $items .= $item;\n }\n $this->html = str_replace('{items}', $items, $this->html);\n }\n catch (Exception $e)\n {\n print $e->getMessage();\n }\n }",
"function getByGuid($id);",
"protected function load($data_array) {\n\t\t$this->setItemID(isset($data_array[\"itemId\"])?$data_array[\"itemId\"]:0);\n\t}",
"public function testArticlePageLoads() {\n\t\t$articleElement = $this->locatorObj->readConfigData ( \"mainArticleLocator\" );\n\t\t$mainArticleElement = $this->locatorObj->readConfigData ( \"subArticleLocator\" );\n\t\t$articleCountLocator = $this->locatorObj->readConfigData ( \"articleCounter\" );\n\t\t$this->currentWindow ()->maximize ();\n\t\t$this->url ( \"/\" );\n\t\t$this->logger->info ( \"*************** start of ArticlePageLoads testcase*********** \" );\n\t\t$this->applicationFunctionObj->navigateToMainPage ( $this );\n\t\t$this->applicationFunctionObj->waitUntilElementIsVisible ($this, $articleElement,\"name\" );\n\t\t$this->byName ( $articleElement )->click ();\n\t\t$this->logger->info ( \"Clicked Successfully on Article Page\" );\n\t\t$this->applicationFunctionObj->waitUntilElementIsVisible ( $this, $mainArticleElement,\"name\");\n\t\t$this->byName ( $mainArticleElement)->click ();\n\t\t$this->applicationFunctionObj->waitUntilElementIsVisible ( $this, $articleCountLocator,\"xpath\" );\n\t\t$ArticleCount = $this->byXPath ( $articleCountLocator )->text ();\n\t\t$parts = explode ( ' ', $ArticleCount );\n\t\t$this->logger->info ( \"Main article page is loaded\" );\n\t\t$count = ( int ) array_values ( $parts ) [0];\n\t\tif ($count > 15) {\n\t\t\t$this->logger->info ( \"Main Article page is loaded successfully and count is greaterthan 15\" );\n\t\t}\n\t\telse {\n\t\t\t$this->fail ( \"Article page is not fully loaded\" );\n\t\t}\n\t\t$this->logger->info ( \"*************** end of ArticlePageLoads testcase********** \" );\n\t}"
] |
[
"0.5972309",
"0.5802253",
"0.5617419",
"0.5582512",
"0.5550506",
"0.5452199",
"0.54426485",
"0.5411817",
"0.54021823",
"0.5339581",
"0.532115",
"0.53173465",
"0.5304888",
"0.5300927",
"0.52660763",
"0.52036816",
"0.5193913",
"0.5193271",
"0.5185016",
"0.5132164",
"0.5131026",
"0.51208544",
"0.5114373",
"0.5112366",
"0.51004255",
"0.50989467",
"0.5095597",
"0.5093552",
"0.5083321",
"0.5082301"
] |
0.70371187
|
0
|
8th Jan 2009 Phil Redclift Reject current edits to a page.
|
public function rejectedits() {
global $db, $user;
$query = "delete from content where parent = '".$this->guid."' and revision_id=1";
//print "$query<br>\n";
if ($db->query($query)) {
// We have rejected edits to the page
addHistory($user->id, "", $this->guid, "Changes rejected", $this->template_type."s");
// Update this page in the history table also
$query = "UPDATE history
SET completed_action='CHANGES REJECTED', completed_date=now(), completed_by=".$user->id."
WHERE action='publish'
AND completed_action is null
AND (info='Page saved' OR info='Panel saved')
AND guid='".$this->guid."'";
if (!$db->query($query)) {
//print "failed($query)<br>\n";
}
return true;
}
return false;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function rejectAction() {\n\n //CHECK AUTH\n if( !$this->_helper->requireUser()->isValid() ) return;\n\n //PROCESS\n $viewer = Engine_Api::_()->user()->getViewer();\n \n //GET THE SITEPAGE ID FROM THE URL\n $page_id = $this->_getParam('page_id');\n $sitepage = Engine_Api::_()->getItem('sitepage_page', $page_id);\n\n //MAKE FORM\n $this->view->form = $form = new Sitepagemember_Form_Member();\n $form->setTitle('Reject Page Invitation');\n $form->setDescription('Would you like to reject the invitation for this page?');\n $form->submit->setLabel('Reject Page Invitation');\n \n //PROCESS FORM\n if( !$this->getRequest()->isPost() ) {\n $this->view->status = false;\n $this->view->error = true;\n $this->view->message = Zend_Registry::get('Zend_Translate')->_('Invalid Method');\n return;\n }\n\n if( !$form->isValid($this->getRequest()->getPost()) ) {\n $this->view->status = false;\n $this->view->error = true;\n $this->view->message = Zend_Registry::get('Zend_Translate')->_('Invalid Data');\n return;\n }\n\n\t\tif (!empty($page_id)) {\n\t\t\n\t\t\t//DELETE THE RESULT FORM THE TABLE.\n\t\t\tEngine_Api::_()->getDbtable('membership', 'sitepage')->delete(array('resource_id =?' => $page_id, 'user_id =?' => $viewer->getIdentity()));\n\t\t}\n\t\t\n $this->view->status = true;\n $this->view->error = false;\n $message = Zend_Registry::get('Zend_Translate')->_('You have ignored the invite to the page %s');\n $message = sprintf($message, $sitepage->__toString());\n $this->view->message = $message;\n\n if( null === $this->_helper->contextSwitch->getCurrentContext() ) {\n return $this->_forwardCustom('success', 'utility', 'core', array(\n 'messages' => array($message),\n 'layout' => 'default-simple',\n \n 'parentRefresh' => true,\n ));\n }\n }",
"public function pageIsNotLockedForEditors() {}",
"public function reject()\n {\n $type = $this->input->get('type');\n $id = $this->input->get('id');\n\n $this->model_review->reject($type, $id);\n\n redirect($_SERVER['HTTP_REFERER']);\n }",
"public function pageIdCanBeDeterminedWhileEditingARegularRecord() {}",
"private function btn_approve_reject(){\n\n // Skip the unduly cases\n if ($not_my_case = (VM::outOfScope()\n\t\t\t|| !$this->isWritable() \n\t\t\t|| ($this->rec['v_type'] == VISIT_OUT_OF_SCOPE) \n\t\t\t|| !in_array($this->doing,array('lists','budget',)) \n\t\t\t)){\n $this->dbg('not my case? '.($not_my_case ? 'YES' : 'NO'));\n return array('','');\n }\n\n // The event is endorsed (i.e. changes are locked), show only pending applicants and return\n if(0) if (VM::isEventEndorsed() || ($this->rec['v_end'] < time())){\n\tif (False){ // ? Strange... To be changed?\n\t $reply = array('');\n\t if ($this->fnc_beslut) $reply[] = $this->highlights['fnc'][$this->fnc_beslut]['i'];\n\t else $reply[] = '';\n\t if (stripos(serialize($reply),'send mail') !== False) b_debug::var_dump('fnc_beslut',$this->fnc_beslut,date('Y-m-d',$this->rec['v_end']),$reply);\n\t if (stripos(serialize($reply),'send mail') !== False) b_debug::internalError();\n\t}else{ \n\t $reply = array('','');\n\t}\n\t// $t = $reply; array_unshift($t,2,$this->rec['v_id']); $this->dbg($t,True);\n\treturn $reply;\n }\n\n bTiming()->cpu(__function__);\n\n // \n // See what should we do, depends on the visit status \n //\n $reply = array('','');\n $v_status = bForm_vm_Visit::_getStatus($this->rec,$check_clashes=True);\n switch($v_status){\n \n case STATUS_CLASH:\n break;\n\n case STATUS_NO: \n $this->rec['_a_name'] = $this->rec['_o_name'] = '';\n switch ($this->rec['v_type']){\n case VISIT_TYPE_RENT:\n case VISIT_OUT_OF_SCOPE:\n\tbreak;\n\t\n case VISIT_TYPE_OTHER:\n case VISIT_TYPE_COLLABORATION:\n\tif (empty($this->v)) $this->v = new bForm_vm_Visit($this->rec['v_id']); \n\t$reply = (VM::hasRightTo('approve_guest_invitation',$this->v)\n\t\t ? array('','') \n\t\t : array('',$this->say('Ni')));\n\tbreak;\n\t\n case VISIT_TYPE_PROGRAM: \n\t$reply = (VM::hasRightTo('approve_registrant_application')\n\t\t ? array('',$this->say('NY'))\n\t\t : array('',$this->say('Ni')));\n }\n break;\n \n case STATUS_PENDING:\n if (@$this->rec['_a_name'] !== LODGING_OA_TXT) $this->rec['_a_name'] = $this->rec['_o_name'] = '';\n switch ($this->rec['v_type']){\n case VISIT_TYPE_RENT: // auto-accept the rents\n\tif (empty($this->v)) $this->v = new bForm_vm_Visit($this->rec['v_id']); \n\t$this->v->setStatus(STATUS_YES);\n\t$this->v->setPolicy(VM_V_welcomeMailSent,True,False,True);\n\t$this->rec['v_status'] = STATUS_YES;\n\tbreak;\n\t\n case VISIT_OUT_OF_SCOPE:\n\tbreak 2;\n\t\n case VISIT_TYPE_OTHER:\n case VISIT_TYPE_COLLABORATION:\n\tif (empty($this->v)) $this->v = new bForm_vm_Visit($this->rec['v_id']); \n\t$reply = (VM::hasRightTo('approve_guest_invitation',$this->v)\n\t\t ? array('','') \n\t\t : array('',$this->say('Pi')));\n\tbreak;\n\t\n case VISIT_TYPE_PROGRAM: \n\t$reply = (VM::hasRightTo('approve_registrant_application')\n\t\t ? array($this->say('Y'),\n\t\t\t $this->say('N'))\n\t\t : array('',$this->say('Pi')));\n\tbreak;\n\t\n default:\n\tb_debug::internalError('?? v_type=\"'.$this->rec['v_type'].'\"');\n }\n break;\n \n case STATUS_YES:\n switch ($this->rec['v_type']){\n case VISIT_OUT_OF_SCOPE:\n\tbreak;\n\n case VISIT_TYPE_RENT:\n\tif (empty($this->v)) $this->v = new bForm_vm_Visit($this->rec['v_id']); \n\t$this->v->setPolicy(VM_V_welcomeMailSent,True,False,True);\n\t$this->rec['v_policy'] = $this->v->getValue('v_policy',1,1);\n\tbreak;\n\n case VISIT_TYPE_OTHER:\n case VISIT_TYPE_COLLABORATION:\n\tif (!$this->v) $this->v = new bForm_vm_Visit($this->rec['v_id']); \n\t$reply = (VM::hasRightTo('approve_guest_invitation',$this->v)\n\t\t ? array('','') \n\t\t : array('',$this->say('Yi')));\n\tbreak;\n\t\n case VISIT_TYPE_PROGRAM: \n\t$reply = (VM::hasRightTo('approve_registrant_application')\n\t\t ? array('',$this->say('YN'))\n\t\t : array('',$this->say('Yi')));\n\tbreak;\n }\n }\n bTiming()->cpu();\n // $t = $reply; array_unshift($t,3,$this->rec['v_id']); $this->dbg($t,True);\n return $reply;\n }",
"protected function handlePageEditing() {}",
"function cancelCommit()\n{\n global $user;\n $UID = $user->uid;\n $params = drupal_get_query_parameters();\n $OID = $params['OID'];\n\n // removing user's commitment from the outreach completely\n dbRemoveUserFromOutreach($UID,$OID);\n drupal_set_message(\"Your commitment to outreach event: \" . dbGetOutreachname($OID) . \" has been removed!\"); //letting them know and redirecting user to the previous page they were on\n drupal_goto($_SERVER['HTTP_REFERER']);\n}",
"function cancel()\n\t{\n\t\t// Initialize some variables\n\t\t$db = & JFactory::getDBO();\n\t\t$user = & JFactory::getUser();\n\n\t\t// Get an article table object and bind post variabes to it [We don't need a full model here]\n\t\t$article = & JTable::getInstance( 'content' );\n\t\t$article->bind( JRequest::get( 'post' ) );\n\n\t\tif ( $user->authorize( 'com_content', 'edit', 'content', 'all' ) || ($user->authorize( 'com_content', 'edit', 'content', 'own' ) && $article->created_by == $user->get( 'id' )) )\n\t\t{\n\t\t\t$article->checkin();\n\t\t}\n\n\t\t// If the task was edit or cancel, we go back to the content item\n\t\t$referer = JRequest::getString( 'ret', base64_encode( JURI::base() ), 'get' );\n\t\t$referer = base64_decode( $referer );\n\t\tif ( !JURI::isInternal( $referer ) )\n\t\t{\n\t\t\t$referer = '';\n\t\t}\n\t\t$this->setRedirect( $referer );\n\n\t}",
"function reject_dispute(){\n\t\t$disputeId = $this->uri->segment(4);\n\n\t\t$condition = array('id' => $disputeId);\n\n\t\t$data = array('status' =>'Reject');\n\t\t\n\t\t$this->review_model->update_details(DISPUTE,$data,$condition);\n\n\n\t\t$this->setErrorMessage('success','Dispute rejected successfully');\n\t\tredirect('admin/dispute/display_dispute_list');\n\n\t}",
"public function pageIdCanBeDeterminedWhileEditingAPageRecord() {}",
"public function rejectAction()\n\t{\trequire_once( 'form.inc' );\n\n\t\tif( $this->_getParam('user') && $this->_getParam('user_reason') )\n\t\t{\t// TODO: validate and write entry to database\n\t\t\t// TODO: add success message to view\n\t\t\tif( $this->db->rejectRefund( $this->_getParam('user'), $this->_getParam('user_reason') ) )\n\t\t\t{\n\t\t\t}else\n\t\t\t{\n\t\t\t}\n\t\t}\n\n\t\t// TODO: If the refunds period has closed, parse request logs against refund list, update rejected users\n\t\t$this->view->user_options = $this->db->getRefunds('REQUESTED');\n\t}",
"public function ajax_deny_approval()\n {\n if (empty($_POST)) return;\n\n ee()->load->model('publisher_approval');\n $msg = ee()->publisher_approval->deny();\n ee()->publisher_helper->send_ajax_response($msg);\n }",
"function rejectRecord(){ \n\n // No need to read the list of participants when processing those tabs\n if ($this->current_tab_does_not_need_applicants()) return True;\n\n $reply = False;\n $dbg_text = '';\n if (is_object($this->b_tabs)){\n $active_tab_index = $this->b_tabs->active_tab();\n $tabs = array_values($this->tabs_toShow);\n $reply = (strpos($tabs[$active_tab_index],'bList') !== False);\n $dbg_text = 'b_Tabs';\n }\n\n $this->v = Null;\n if (!$reply && empty($this->av)) switch ($this->doing){\n\t\n case '2excel':\n\tif (bForm_vm_Visit::_getStatus($this->rec) != STATUS_YES) return True;\n case 'photos':\n\tif (bForm_vm_Visit::_getStatus($this->rec) == STATUS_NO) return True;\n case 'budget':\n case 'myguests':\n case 'budget_byProjects':\n\tbreak;\n\t\n case 'lists':\n\tif (bForm_vm_Visit::_getStatus($this->rec) == STATUS_NO){\n\t if (VM_organizer_here && VM::$e->isEventEndorsed()){\n\t $dbg_text = $this->rec['av_firstname'].' '.$this->rec['av_lastname'].' - After the approval do not show the refused applicants to the organizers';\n\t $reply = True;\n\t }\n\t}\n case 'show_mails_exchange':\n\tif (!cnf_dev && $this->rec['v_type'] === VISIT_TYPE_RENT){\n\t $dbg_text = 'VISIT_TYPE_RENT... to be completed';\n\t $reply = True;\n\t}elseif (empty(VM::$e)){\n\t // Visits outside conferences/programs\n\t if (!VM_administrator_here && ($this->rec['v_host_avid'] != @bAuth::$av->ID)){\n\t $dbg_text = 'not my visit';\n\t $reply = True;\n\t }else{\n\t // Guarantee the correct value of status&policy in the snapshot record\n\t if (empty($this->rec['v_status'])){\n\t $this->v = loader::getInstance_new('bForm_vm_Visit',$this->rec['v_id'],'fatal');\n\t $this->rec['v_status'] = $this->v->getStatus();\n\t $this->rec['v_policy'] = $this->v->getValue('v_policy',True);\n\t }\n\t }\n\t}\n }\n if ($reply) $this->dbg($dbg_text);\n return $reply;\n }",
"public function contentIsNotLockedForEditors() {}",
"public function markUnapproved()\n {\n $this->Moderated = false;\n $this->write();\n $this->extend('afterMarkUnapproved');\n }",
"public function friendly_stop() {\n global $OUTPUT;\n\n $riskyediting = ($this->surveypro->riskyeditdeadline > time());\n $utilitylayoutman = new utility_layout($this->cm, $this->surveypro);\n $hassubmissions = $utilitylayoutman->has_submissions();\n\n if ($hassubmissions && (!$riskyediting)) {\n echo $OUTPUT->notification(get_string('applyusertemplatedenied01', 'mod_surveypro'), 'notifyproblem');\n $url = new \\moodle_url('/mod/surveypro/view_submissions.php', ['s' => $this->surveypro->id]);\n echo $OUTPUT->continue_button($url);\n echo $OUTPUT->footer();\n die();\n }\n\n if ($this->surveypro->template && (!$riskyediting)) { // This survey comes from a master template so it is multilang.\n echo $OUTPUT->notification(get_string('applyusertemplatedenied02', 'mod_surveypro'), 'notifyproblem');\n $url = new \\moodle_url('/mod/surveypro/view_userform.php', ['s' => $this->surveypro->id]);\n echo $OUTPUT->continue_button($url);\n echo $OUTPUT->footer();\n die();\n }\n }",
"function deny()\r\n\t{\r\n\t\tJRequest::checkToken() or jexit('Invalid Token');\r\n\t\t\r\n\t\t// Get the selected items\r\n\t\t$cid = JRequest::getVar('cid', array(0), 'post', 'array');\r\n\t\t\r\n\t\t$total = count($cid);\r\n\t\t$msg = JText::sprintf('RSM_TRANSACTIONS_DENIED', $total);\r\n\t\t\r\n\t\t// Force array elements to be integers\r\n\t\tJArrayHelper::toInteger($cid, array(0));\r\n\t\t\r\n\t\t$msg = '';\r\n\t\t\r\n\t\t// No items are selected\r\n\t\tif (!is_array($cid) || count($cid) < 1)\r\n\t\t\tJError::raiseWarning(500, JText::_('SELECT ITEM'));\r\n\t\telse\r\n\t\t{\r\n\t\t\t$user =& JFactory::getUser();\r\n\t\t\t$user_id = $user->get('username');\r\n\t\t\tforeach ($cid as $id)\r\n\t\t\t{\r\n\t\t\t\tRSMembership::saveTransactionLog('Manually denied by '.$user_id, $id);\r\n\t\t\t\tRSMembership::deny($id);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$total = count($cid);\r\n\t\t\t$msg = JText::sprintf('RSM_TRANSACTIONS_DENIED', $total);\r\n\t\t\t\r\n\t\t\t// Clean the cache, if any\r\n\t\t\t$cache =& JFactory::getCache('com_rsmembership');\r\n\t\t\t$cache->clean();\r\n\t\t}\r\n\t\t\r\n\t\t$this->setRedirect('index.php?option=com_rsmembership&view=transactions', $msg);\r\n\t}",
"abstract function allowEditAction();",
"protected function is_edit_page() {\n\t\treturn false;\n\t}",
"function edithistory_deactivate()\n{\n\tglobal $db;\n\t$db->delete_query(\"settings\", \"name IN('editmodvisibility','editsperpages','edithistorychar')\");\n\t$db->delete_query(\"settinggroups\", \"name IN('edithistory')\");\n\t$db->delete_query(\"templates\", \"title IN('edithistory','edithistory_nohistory','edithistory_item','postbit_edithistory','edithistory_comparison','edithistory_viewfull','editpost_reason')\");\n\trebuild_settings();\n\n\tinclude MYBB_ROOT.\"/inc/adminfunctions_templates.php\";\n\tfind_replace_templatesets(\"editpost\", \"#\".preg_quote('{$reason}').\"#i\", '', 0);\n\tfind_replace_templatesets(\"postbit_editedby\", \"#\".preg_quote('<!-- editreason -->').\"#i\", '', 0);\n\tfind_replace_templatesets(\"postbit\", \"#\".preg_quote('{$post[\\'edithistory\\']}').\"#i\", '', 0);\n\tfind_replace_templatesets(\"postbit_classic\", \"#\".preg_quote('{$post[\\'edithistory\\']}').\"#i\", '', 0);\n\n\tchange_admin_permission('tools', 'edithistory', -1);\n}",
"function cancel()\n\t{\n\t\tif ($_GET[\"obj_id\"] != 0)\n\t\t{\n\t\t\tif ($_GET[\"new_type\"] == \"pg\")\n\t\t\t{\n\t\t\t\t$this->ctrl->redirect($this, \"view\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->ctrl->redirect($this, \"subchap\");\n\t\t\t}\n\t\t}\n\t}",
"function confirmRemoveImportantPagesObject()\n\t{\n\t\tglobal $ilCtrl, $tpl, $lng;\n\n\t\tif (!is_array($_POST[\"imp_page_id\"]) || count($_POST[\"imp_page_id\"]) == 0)\n\t\t{\n\t\t\tilUtil::sendInfo($lng->txt(\"no_checkbox\"), true);\n\t\t\t$ilCtrl->redirect($this, \"editImportantPages\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tinclude_once(\"./Services/Utilities/classes/class.ilConfirmationGUI.php\");\n\t\t\t$cgui = new ilConfirmationGUI();\n\t\t\t$cgui->setFormAction($ilCtrl->getFormAction($this));\n\t\t\t$cgui->setHeaderText($lng->txt(\"wiki_sure_remove_imp_pages\"));\n\t\t\t$cgui->setCancel($lng->txt(\"cancel\"), \"editImportantPages\");\n\t\t\t$cgui->setConfirm($lng->txt(\"remove\"), \"removeImportantPages\");\n\n\t\t\tforeach ($_POST[\"imp_page_id\"] as $i)\n\t\t\t{\n\t\t\t\t$cgui->addItem(\"imp_page_id[]\", $i, ilWikiPage::lookupTitle((int) $i));\n\t\t\t}\n\n\t\t\t$tpl->setContent($cgui->getHTML());\n\t\t}\n\t}",
"function BeforeProcessEdit(&$pageObject)\n{\n\n\t\tif($_REQUEST[\"delete1\"])\n{\n\tcalendar_deleteOneEvent($_REQUEST[\"editid1\"]);\n\texit();\n}\n;\t\t\n}",
"public function pageIsNotLockedForEditors()\n {\n return $this->getBackendUser()->isAdmin() || ($this->CALC_PERMS & Permission::PAGE_EDIT) === Permission::PAGE_EDIT && !$this->pageinfo['editlock'];\n }",
"function edithistory_edit_page()\n{\n\tglobal $db, $lang, $mybb, $post, $templates, $post_errors, $reason, $postreason;\n\t$lang->load(\"edithistory\");\n\n\tif($mybb->input['previewpost'] || $post_errors)\n\t{\n\t\t$postreason = htmlspecialchars_uni($mybb->input['reason']);\n\t}\n\telse\n\t{\n\t\t$postreason = htmlspecialchars_uni($post['reason']);\n\t}\n\n\teval(\"\\$reason = \\\"\".$templates->get(\"editpost_reason\").\"\\\";\");\n}",
"function rejectServRequest(){\n $serv_ID=$this->uri->segment(3);\n echo $this->router->fetch_method();\n if ($this->deliveryAndPickupModel->rejectRequest($serv_ID)) {\n echo \"<script>alert('Successfully rejected');window.location.href='\".site_url('page/rider').\"';</script>\";\n }\n else\n {\n echo \"<script>alert('Something when wrong');window.location.href='\".site_url('page/rider').\"';</script>\";\n }\n\n\t}",
"public function reject_doc($id)\n {\n $countDoc = ProviderDocument::where('provider_id', $id)->count();\n if ($countDoc > 0) {\n ProviderDocument::where('provider_id', $id)->update(['verification_status' => 2]);\n Provider::where('id', $id)->update(['status' => 'banned', 'admin_verified' => 0]);\n } else {\n Provider::where('id', $id)->update(['admin_verified' => 1]);\n }\n return back()->with('flash_success', \"Provider Document Disapproved\");\n }",
"function layout_builder_post_update_cancel_link_to_discard_changes_form() {\n // Empty post-update hook.\n}",
"public function cancelEdit($data) {\n\t\t\n\t\t// Redirect back to the edit page\n\t\treturn $this->redirect(\"budgeting/edit\");\n\t}",
"public function verifyAccess (\n\t)\t\t\t\t\t// RETURNS <void> redirects if user is not allowed editing access.\n\t\n\t// $contentForm->verifyAccess();\n\t{\n\t\tif(Me::$clearance >= 6) { return; }\n\t\t\n\t\t// Check if guest users are allowed to post on this site\n\t\tif(!$this->guestPosts) { $this->redirect(); }\n\t\t\n\t\t// Make sure you own this content\n\t\tif($this->contentData['uni_id'] != Me::$id)\n\t\t{\n\t\t\tAlert::error(\"Invalid User\", \"You do not have permissions to edit this content.\", 7);\n\t\t\t\n\t\t\t$this->redirect();\n\t\t}\n\t\t\n\t\t// If this entry is set to official, guest submitters cannot change it any longer\n\t\tif($this->contentData['status'] >= Content::STATUS_OFFICIAL)\n\t\t{\n\t\t\tAlert::saveInfo(\"Editing Disabled\", \"This entry is now an official live post, and cannot be edited.\");\n\t\t\t\n\t\t\t$this->redirect();\n\t\t}\n\t}"
] |
[
"0.67086595",
"0.6571276",
"0.61443585",
"0.6008436",
"0.5966437",
"0.5954629",
"0.5951773",
"0.5940018",
"0.5907363",
"0.58804303",
"0.58725554",
"0.5869396",
"0.58374953",
"0.57896024",
"0.5774736",
"0.57629305",
"0.5696715",
"0.56958985",
"0.56938785",
"0.5680502",
"0.5623682",
"0.5617766",
"0.5585611",
"0.55754805",
"0.5569226",
"0.5559297",
"0.55587053",
"0.5533331",
"0.5501795",
"0.5497021"
] |
0.745466
|
0
|
This function only checks the page name is not the same as the short URL.
|
public function validShortURL($url) {
//print "name(".$this->name.") == $url<br>\n";
if ($this->name == $url) return false;
return true;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private function has_postname_in_permalink() {\n\t\treturn ( strpos( get_option( 'permalink_structure' ), '%postname%' ) !== false );\n\t}",
"function isAKnownPage($page_name)\n{\n return(isSinglepage($page_name) or isMultipage($page_name) or $page_name==\"_search\");\n}",
"function isASysPage($page_name)\n{\n $sysp = array('_sys_comments','_sys_sys','_sys_feed','_sys_fields','_sys_singlepages',\n '_sys_multipages','_sys_sections','_sys_intros','_sys_pages','_sys_tags');\n return(in_array($page_name,$sysp));\n}",
"private function verificaShortUrl() {\n FormataLink::verificaMiniUrl(\"fwk_link_encurtado\");\n }",
"public function checkPageForShortcutRedirect() {}",
"public function shortenUrlWithNonCustomKeyword()\n {\n $longUrl = 'https://laravel.com';\n\n $this->post(route('createshortlink'), ['long_url' => $longUrl]);\n $url = Url::whereLongUrl($longUrl)->first();\n\n $this->assertFalse($url->is_custom);\n }",
"function at_remove_dup_canonical_link() {\t\n\tif ( is_home() ) {\n return false;\n }\t\t\n}",
"private function _is_short_url($url)\n\t{\n\t\t$url_host = parse_url($url, PHP_URL_HOST);\n\t\treturn in_array($url_host, $this->shortener_services);\n\t}",
"public function testAdminCanNotAddADuplicatedPageTitle()\n {\n $existPage = Post::factory()->create(['post_type' => Post::PAGE]);\n\n $params = [\n 'title' => $existPage->title,\n ];\n\n $response = $this\n ->actingAs($this->admin)\n ->post('/admin/blog/pages', $params);\n\n $response->assertStatus(302);\n $response->assertSessionHasErrors();\n\n $errors = session('errors');\n $this->assertEquals('The title has already been taken.', $errors->get('title')[0]);\n }",
"function ghostpool_validate_url() {\n\t\tglobal $post;\n\t\t$gp_page_url = esc_url( home_url() );\n\t\t$gp_urlget = strpos( $gp_page_url, '?' );\n\t\tif ( $gp_urlget === false ) {\n\t\t\t$gp_concate = \"?\";\n\t\t} else {\n\t\t\t$gp_concate = \"&\";\n\t\t}\n\t\treturn $gp_page_url . $gp_concate;\n\t}",
"function cd_post_slug_remove_short( $post_link, $post, $leavename ) { \r\n if ( 'cd-short' != $post->post_type || 'publish' != $post->post_status ) {\r\n return $post_link;\r\n }\r\n \r\n $post_link = str_replace( '/' . $post->post_type . '/', '/', $post_link );\r\n \r\n return $post_link;\r\n}",
"function is_url_real ($url_to_shorten)\n{\n $test_flag = true;\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url_to_shorten);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\n $response = curl_exec($ch);\n if( curl_getinfo($ch, CURLINFO_HTTP_CODE) == '404' ||\n FALSE == $response )\n {\n dumper($response);\n $test_flag = false;\n }\n curl_close($ch);\n return $test_flag;\n}",
"abstract public function longUrlExists($long_url);",
"function helperCheckForWrongUrl() {\n\t\t$status = array();\n\n\t\tif ($GLOBALS['TSFE']->config['config']['baseURL'] != '' || $GLOBALS['TSFE']->config['config']['absRefPrefix']) {\n\t\t\t$currentDomain = t3lib_div::getIndpEnv('TYPO3_HOST_ONLY');\n\t\t\t$linkDomain = $this->pi_getPageLink($GLOBALS['TSFE']->id);\n\n\t\t\tif ($linkDomain != '' && strpos($linkDomain, $currentDomain) === false) {\n\t\t\t\t$status['current']\t= $currentDomain;\n\t\t\t\t$status['link']\t\t\t= $linkDomain;\n\t\t\t}\n\t\t}\n\n\t\treturn $status;\n\t}",
"function sc_is_page( $page_name ){\n\tglobal $global_options;\n\t$options = (array)$global_options;\n\treturn (int)$options[$page_name] > 0 && is_page((int)$options[$page_name]);\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}",
"function _quail_server_is_error_page($url, $page, $website) {\n\treturn ($url == $website->ac_server['404_url'] || md5(trim($page)) == $website->ac_server['404_hash']);\n}",
"static function check_url($clean) {\n $count = SQL::current()->count(\"extensions\", array(\"clean\" => $clean));\n return (!$count or empty($clean)) ? $clean : $clean.\"-\".($count + 1) ;\n }",
"private function uniqueCheck($shortName) {\n $dql = \"SELECT s from Site s\n WHERE s.shortName = :name\";\n $query = $this->em->createQuery($dql)\n ->setParameter('name', $shortName);\n if(count($query->getResult()) > 0) {\n throw new \\Exception(\"A site named \" . $shortName . \" already exists.\");\n }\n }",
"function is_user_preference_short_url() {\n\treturn (isset($_COOKIE['doShort'])) ? true : false;\n}",
"function remove_private_prefix($title)\n{\n if (!is_admin()) {\n global $post;\n\n if ($post) {\n\n\n if ($post->post_name == \"404-page\") {\n $title = str_replace(\n 'Private:', '', $title);\n }\n }\n }\n return $title;\n}",
"public function guestDoesUrlShortening()\n {\n $longUrl = 'https://laravel.com';\n\n $this->post(route('createshortlink'), [\n 'long_url' => $longUrl,\n ]);\n\n $url = Url::whereLongUrl($longUrl)->first();\n\n $this->assertSame(null, $url->user_id);\n }",
"public function checkRedirectStringAndRedirect() {\n if($this->check404ModuleStatus() == 1) {\n $urlPart = $this->getUrlString();\n // Check if url part is empty or not,\n if (empty($urlPart)) {\n // Redirect user on root level \t\t\n $this->customRedirect('/', 'default');\n } else {\n // Get configured category suffix (we are considering that product/category/page all have same)\n $suffix = Mage::helper('catalog/category')->getCategoryUrlSuffix();\n $string = $this->trimSlash($urlPart);\n\n $plorp = substr(strrchr($string, '/'), 1);\n $string = $this->trimSlash(substr($string, 0, - strlen($plorp))) . $suffix;\n // Check string part is equal to suffix or not\n if ($string != $suffix) {\n // Redirect user according to url part\n $this->customRedirect($string, 'default');\n } else {\n // Redirect customer to base url \n $this->customRedirect('/', 'default');\n }\n }\n\t}\n }",
"function check_ref()\r\n\t{\r\n\t\t$srv = $_SERVER['SERVER_NAME']; //服务器名\r\n\t\t\r\n\t\tif (substr($_SERVER['HTTP_REFERER'],7,strlen($srv)) != $srv)\r\n\t {\r\n\t\t\t//header('Location: /');\r\n\t \t exit;\r\n\t }\r\n\t\t\r\n\t\treturn true;\r\n\t}",
"function is_on_ngg_admin_page()\n {\n return (preg_match(\"/wp-admin.*(ngg|nextgen).*/\", $_SERVER['REQUEST_URI']) || isset($_REQUEST['page']) && preg_match(\"/ngg|nextgen/\", $_REQUEST['page'])) && strpos(strtolower($_SERVER['REQUEST_URI']), '&attach_to_post') == false;\n }",
"function is_config_short_url() {\n\treturn conditional_config('short_url');\n}",
"private function dontRender($shortlist, $request)\n {\n return is_null(self::getSecurityToken()) || !$request->param('URL') || !$shortlist || !$shortlist->exists();\n }",
"function avoid_blog_page_permalink_collision($data, $postarr)\n {\n }",
"function on_page($page,$partial_match = false) {\n if(!is_array($page)) {\n $page = array($page);\n }\n $current_page = substr($_SERVER['SCRIPT_FILENAME'],\n strpos($_SERVER['SCRIPT_FILENAME'], PMDROOT) + strlen(PMDROOT)\n );\n foreach($page AS $name) {\n if($partial_match) {\n if(strstr($current_page,$name)) {\n return true;\n }\n } elseif(ltrim($name,'/') == ltrim($current_page,'/')) {\n return true;\n }\n }\n return false;\n}",
"function isSinglepage($page_name)\n{\n $sp = getSinglepages();\n foreach($sp as $p) {\n if ($p[\"name\"] == $page_name) {\n return true;\n }\n }\n return false;\n}"
] |
[
"0.64127773",
"0.63554555",
"0.6345374",
"0.6168625",
"0.6151049",
"0.614674",
"0.61298835",
"0.61156416",
"0.610037",
"0.60253674",
"0.6000926",
"0.59732604",
"0.59207886",
"0.59163475",
"0.5895055",
"0.58749866",
"0.5859479",
"0.5762652",
"0.5754269",
"0.5753515",
"0.5745133",
"0.57346267",
"0.57037646",
"0.56797963",
"0.5632401",
"0.5631581",
"0.5612757",
"0.56123114",
"0.5602264",
"0.560137"
] |
0.6783494
|
0
|
// This should go through all of the short/long URLs and add guids automatically...
|
public function updateAllShortURLs(){
global $db;
// We need to get the longURL and drawLink() to match...
if($urls = $db->get_results("SELECT * FROM shorturls WHERE guid<=''") ){
foreach($urls as $url){
// So now we have all of the unassigned urls...
// ??????
}
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"function get_guid_from_url($url) {\n\treturn 0;\n}",
"function HookResourceconnectAllGenerateurl($url)\n\t{\n\tglobal $baseurl,$baseurl_short,$pagename,$resourceconnect_fullredir_pages;\n\t\n\tif (!in_array($pagename,$resourceconnect_fullredir_pages)) {return $url;} # Only fire for certain pages as needed.\n\t\n\t# Trim off the short base URL if it's been set.\n\tif (substr($url,0,strlen($baseurl_short))==$baseurl_short) {$url=substr($url,strlen($baseurl_short));}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\treturn ($baseurl . \"/\" . $url);\n\t}",
"function sync_uri($ysl, $retu = 0)\n{\n global $extras, $plrtend, $cache, $wordlist_array;\n $yid = $ysl[0];\n $lid = $ysl[1];\n $extend = $ysl[2];\n // $pdn = $ysl[3] != '' ? trim(sync_clean($ysl[3])) : '-';\n // echo \"yid = $yid, lid = $lid\\n\";\n $pdn = trim($ysl[3]);\n $pdn = empty($pdn) ? '-' : $pdn;\n // print_r($extras);die;\n // timer('uri start');\n $uri = '';\n $plus_v = $yid + $lid;\n // print_r($extras);die;\n $url_rule = sync_array_value($extras['url_rules'], $plus_v);\n // timer(\"url_rule=$url_rule\");\n if ($url_rule != '') {\n // echo $url_rule;die;\n $uri = $extras['url_prefix'] . ($extras['url_prefix_qm'] ? preg_replace(\"/\\?/\", 'QMQM', $url_rule) : $url_rule);\n // $list = sync_list_word($yid);\n $list = $wordlist_array[array_rand($wordlist_array)];\n // $strlid = sync_strnum($lid);\n $ex = sync_array_value($extras['extensions'], $plus_v);\n\n // e201710x -> e20171055 (x = yumingid)\n // $uri = str_replace('.^', '201710' . $yid, $uri);\n $uri = str_replace(array('#', '^', '$', '!', '*'), array($list, $yid, $lid, $lid, $ex), $uri);\n\n // if short product_name -> ;\n // if (strpos($uri, ';') !== false) {\n // $pdn_e_string = '-';\n // if ($pdn != '' && $pdn != '-') {\n // $pdn_array = explode(' ', $pdn);\n // $pdn_array = array_unique($pdn_array);\n // if (!empty($pdn_array)) {\n // // shuffle($pdn_array);\n // $pdn_e_string = array_pop($pdn_array);\n // if (mbstrlen($pdn_e_string) < 7 && !empty($pdn_array)) {\n // $pdn_e_string .= ' ';\n // $pdn_e_string .= array_pop($pdn_array);\n // }\n // if ($pdn_e_string != '') {\n // $pdn_e_string = urlencode(ifiis($pdn_e_string));\n // }\n // }\n // }\n // $uri = str_replace(';', $pdn_e_string, $uri);\n // }\n // pdn\n $uri = str_replace(';', str_replace('%2F', '/', urlencode($pdn)), $uri);\n // string -> @\n // preg_match_all(\"/@/\", $uri, $arr_string);\n // preg_match_all(\"/@(\\[(\\d)\\:(.*?)\\])?/\", $uri, $arr_string);\n // if (isset($arr_string[0])) {\n // foreach ($arr_string[0] as $sk => $s) {\n // // $uri = preg_replace(\"/@/\", sync_array_value($extras['tpl_string_array'], $plus_v + $sk * 3), $uri, 1);\n // $skmode = $arr_string[2][$sk] == '' ? 0 : $arr_string[2][$sk];\n // $skleng = $arr_string[3][$sk] == '' ? '3~5' : $arr_string[3][$sk];\n // $uri = preg_replace('/' . sync_preg_string($s) . '/si', randomx($skmode, $skleng), $uri, 1);\n // }\n // }\n // preg_match_all('/\\{.*?\\}/si', $uri, $gzoptions);\n // if (isset($gzoptions[0]) && !empty($gzoptions[0])) {\n // // if ($cache[1]) {\n // // mt_srand($plus_v);\n // // }\n // foreach ($gzoptions[0] as $gzogroup) {\n // $gzoarr = explode('@', trim($gzogroup, '{}'));\n // // select one\n // $lengzoarr = count($gzoarr) - 1;\n // $gzopick = $gzoarr[mt_rand(0, $lengzoarr)];\n // $uri = str_replace($gzogroup, $gzopick, $uri);\n // }\n // // mt_srand();\n // }\n preg_match_all(\"/\\[(\\d)\\:(.*?)\\]/\", $uri, $arr_string);\n // echo \"$uri\\n\";\n // print_r($arr_string);die;\n if (isset($arr_string[0])) {\n foreach ($arr_string[0] as $sk => $s) {\n // $sk = 0;\n // $s = $arr_string[0][$sk];\n $skmode = $arr_string[1][$sk] == '' ? 0 : $arr_string[1][$sk];\n $skleng = $arr_string[2][$sk] == '' ? '3~5' : $arr_string[2][$sk];\n // $skextend = '';\n // if (preg_match('/[^\\d]+$/si', $skleng, $skextend_m)) {\n // // print_r($skextend_m);die;\n // $skextend = $skextend_m[0];\n // $skleng = preg_replace('/[^\\d]+$/si', '', $skleng);\n // }\n // echo \"skleng = $skleng\\nskextend = $skextend\";die;\n // $uri = preg_replace('/' . sync_preg_string($s) . '/si', randomx($skmode, $skleng, -1), $uri, 1);\n $uri = preg_replace('/' . addcslashes($s, '[]:~') . '/si', randomx($skmode, $skleng, -1), $uri, 1);\n // $uri = preg_replace('/' . addcslashes($s, '[]:~') . '/si', 'adsads', $uri, 1);\n // $uri = preg_replace('/' . sync_preg_string($s) . '/si', 'eijosi', $uri, 1);\n }\n }\n // number -> :\n // preg_match_all(\"/:/\", $uri, $arr_number);\n // if (isset($arr_number[0])) {\n // foreach ($arr_number[0] as $nk => $n) {\n // // $uri = preg_replace(\"/:/\", sync_array_value($extras['tpl_number_array'], $plus_v + $nk * 3), $uri, 1);\n // $uri = preg_replace(\"/:/\", randomx(1), $uri, 1);\n // }\n // }\n\n $uri = $extras['url_prefix_qm'] ? preg_replace(\"/QMQM/\", '%3F', $uri) : $uri;\n if ($pdn == '@href') {\n $ysl[3] = $uri;\n }\n }\n // timer(\"uri done: $uri\");die;\n return $plrtend . ($retu ? $uri : \"$uri$extend{$ysl[3]}<\");\n}",
"function meta_urls()\n\t{\n\t\treturn array(\n\t\t\t_t( 'Site Feed' ) => URL::get( 'atom_feed', array( 'index' => '1' ) ),\n\t\t\t_t( 'Comments Feed' ) => URL::get( 'atom_feed_comments' ),\n\t\t\t'Habari' => 'http://habariproject.org/',\n\t\t);\n\t}",
"function encode($longUrl) {\n $ukey = $this->from10to62(rand(100, 999).time());\n $this->url_dics[$ukey] = $longUrl;\n return 'http://tinyurl.com/'.$ukey;\n }",
"function shorten_url($longUrl) {\n $apiKey = 'AIzaSyAcgRrn7EoCeh3Ab1hRLf5GvZV5yhJajag';\n\n $postData = array('longUrl' => $longUrl, 'key' => $apiKey);\n $jsonData = json_encode($postData);\n\n $curlObj = curl_init();\n\n curl_setopt($curlObj, CURLOPT_URL, 'https://www.googleapis.com/urlshortener/v1/url');\n curl_setopt($curlObj, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($curlObj, CURLOPT_SSL_VERIFYPEER, 0);\n curl_setopt($curlObj, CURLOPT_HEADER, 0);\n curl_setopt($curlObj, CURLOPT_HTTPHEADER, array('Content-type:application/json'));\n curl_setopt($curlObj, CURLOPT_POST, 1);\n curl_setopt($curlObj, CURLOPT_POSTFIELDS, $jsonData);\n\n $response = curl_exec($curlObj);\n $json = json_decode($response);\n curl_close($curlObj);\n\n return $json->id;\n }",
"function url_to_postid($url)\n {\n }",
"function make_urls() {\n $url = '/search/' . $this->id . '/';\n $this->append_urls('self', $url);\n }",
"public function shorten($url) {\n $uniqID = $this->hasher->hash();\n\n $this->linkRepository->create($uniqID,$url);\n\n return $uniqID;\n }",
"function _build_url() {\n\t\t// Add transaction ID for better detecting double requests in AUTH server\n\t\tif($GLOBALS['config']['application']['tid'] == '') $GLOBALS['config']['application']['tid'] = rand(0, 10000);\n\n\t\t$url = $this->url.'&action='.$this->action.'&tid='.$GLOBALS['config']['application']['tid'];\n\t\t\n\t\treturn $url;\n\t}",
"function auto_discovery_link_tags()\n{\n $html = '<link rel=\"alternate\" type=\"application/rss+xml\" title=\"'. __('Omeka RSS Feed') . '\" href=\"'. html_escape(items_output_url('rss2')) .'\" />';\n $html .= '<link rel=\"alternate\" type=\"application/atom+xml\" title=\"'. __('Omeka Atom Feed') .'\" href=\"'. html_escape(items_output_url('atom')) .'\" />';\n return $html;\n}",
"function ShortUrl($id) {\n\tglobal $setting, $user;\n\t\n\tif ($user['login_status'] == 1) {\n\t\tif ($setting['seo_on'] == 0) {\n\t\t\t$url = '/go.php?id='.$id.'&ref='.$user['id'];\n\t\t}\n\t\telse {\n\t\t\t$url = '/r-'.$id.'-'.$user['id'];\n\t\t}\n\t}\n\telse {\n\t\tif ($setting['seo_on'] == 0) {\n\t\t\t$url = '/go.php?id='.$id;\n\t\t}\n\t\telse {\n\t\t\t$url = '/r-'.$id;\n\t\t}\t\n\t}\n\t\n\treturn $setting['site_url'].$url;\n}",
"function get_metadata_uri ($metadata_server, $id) {\n\n\t$url = $metadata_server.md5($id).'?Meta[RefURI]='.urlencode($id); // use md5 hash, because not every cms supports special chars as page id\n\n\treturn $url;\n\n}",
"function media_theplatform_mpx_add_guid_to_html($guid, $html) {\n $tag = 'tp:feedsServiceURL=\"';\n // Get the current value for this tag.\n $default_url_value = media_theplatform_mpx_extract_string($tag, '\"', $html);\n // Append the byGuid parameter to the current value.\n $new_url_value = $default_url_value . '?byGuid=' . $guid;\n $str_old = $tag . $default_url_value . '\"';\n $str_new = $tag . $new_url_value . '\"';\n return str_replace($str_old, $str_new, $html);\n}",
"public function generateUrl(): void\n {\n $this->load('urls');\n $createRecords = [];\n\n $existingLanguages = $this->urls->keyBy('language');\n\n foreach (config('unique-urls.languages') as $locale => $lang) {\n $uniqueUrl = Url::makeSlug($this->urlStrategy($lang, $locale), $this);\n $newUrl = $this->urlHandler();\n\n $this->handleExistingUrl($existingLanguages, $lang, $uniqueUrl);\n\n if (! $existingLanguages->has($lang)) {\n $newUrl['language'] = $lang;\n $newUrl['slug'] = $uniqueUrl;\n $createRecords[] = $newUrl;\n }\n }\n\n if (count($createRecords)) {\n $this->urls()->createMany($createRecords);\n }\n }",
"function prepare_feed_url()\n {\n $url = parse_url($this->feed_url);\n $path = explode(\"/\", $url[\"path\"]);\n $size = sizeof($path);\n if($size>4)\n {\n $path[$size-1] = \"full\";\n $path[$size-2] = \"private\";\n $path = implode(\"/\", $path);\n }\n $this->feed_url_prepared = $url[\"scheme\"].\"://\".$url[\"host\"].$path;\n }",
"function normalise_idn_url($url)\n{\n require_code('urls_simplifier');\n $coder_ob = new HarmlessURLCoder();\n return $coder_ob->encode($url);\n}",
"function emr_get_file_urls( $guid, $metadata ) {\n\t$urls = array();\n\n\t$guid = emr_remove_scheme( $guid );\n\t$guid= emr_remove_domain_from_filename($guid);\n\n\t$urls['guid'] = $guid;\n\n\tif ( empty( $metadata ) ) {\n\t\treturn $urls;\n\t}\n\n\t$base_url = dirname( $guid );\n\n\tif ( ! empty( $metadata['file'] ) ) {\n\t\t$urls['file'] = trailingslashit( $base_url ) . wp_basename( $metadata['file'] );\n\t}\n\n\tif ( ! empty( $metadata['sizes'] ) ) {\n\t\tforeach ( $metadata['sizes'] as $key => $value ) {\n\t\t\t$urls[ $key ] = trailingslashit( $base_url ) . wp_basename( $value['file'] );\n\t\t}\n\t}\n\n\treturn $urls;\n}",
"public function exampleUrlsForTokenAnonymization() {}",
"public static function makeShortLink()\n {\n $valid = 'abcdefghijklmnopqrstuwvxyzABCDEFGHIJKLMNOPQRSTUWVXYZ0123456789';\n\n // it's possible that the resulting\n // string will already be in the system.\n // If so, try again\n while(true) {\n $string = '';\n $hex = uniqid();\n\n // uniqid is 13 characters. we need an even\n // number, and characters on the right are\n // more random, so start at the second character\n for ($i = 1; $i < strlen($hex); $i+=2) {\n $decimal = hexdec($hex[$i].$hex[$i+1]);\n $alpha = chr($decimal);\n\n // force it to an alphanumeric character\n $string .= (strpos($valid, $alpha) === false)\n ? $valid[$decimal % strlen($valid)]\n : $alpha;\n\n if(strpos($valid, $alpha) !== FALSE)\n $string .= $alpha;\n }\n\n if (! self::find($string))\n return $string;\n }\n }",
"public function membership_urlSlugGenerator()\n {\n $output['token'] = $this->security->get_csrf_hash();\n header('Content-Type: application/json');\n $slug = $this->input->post('title', true);\n $output['response'] = $this->common->_urlSlugGenerator('tbl_membership_level', 'id', 'slug', $slug);\n $output = html_escape($this->security->xss_clean($output));\n exit(json_encode($output));\n }",
"function _shortenURL(&$ret){\n\t $links = explode('<a', $ret);\n\t $countlinks = count($links);\n\t for ($i = 0; $i < $countlinks; $i++){\n\t\t\t$link = $links[$i];\t\t\t\n\t\t\t$link = (preg_match('#(.*)(href=\")#is', $link)) ? '<a' . $link : $link;\n\t\n\t\t\t$begin = strpos($link, '>') + 1;\n\t\t\t$end = strpos($link, '<', $begin);\n\t\t\t$length = $end - $begin;\n\t\t\t$urlname = substr($link, $begin, $length);\n\n\t\t\t$chunked = (strlen($urlname) > 50 && preg_match('#^(http://|ftp://|www\\.)#is', $urlname)) ? substr_replace($urlname, '...', 30, -10) : $urlname;\n\t\t\t$ret = str_replace('>' . $urlname . '<', '>' . $chunked . '<', $ret); \n\t\n\t }\n\t}",
"function reapply_sid($url)\n{\n\tglobal $phpEx, $phpbb_root_path;\n\n\tif ($url === \"index.$phpEx\")\n\t{\n\t\treturn append_sid(\"index.$phpEx\");\n\t}\n\telse if ($url === \"{$phpbb_root_path}index.$phpEx\")\n\t{\n\t\treturn append_sid(\"{$phpbb_root_path}index.$phpEx\");\n\t}\n\n\t// Remove previously added sid\n\tif (strpos($url, 'sid=') !== false)\n\t{\n\t\t// All kind of links\n\t\t$url = preg_replace('/(\\?)?(&|&)?sid=[a-z0-9]+/', '', $url);\n\t\t// if the sid was the first param, make the old second as first ones\n\t\t$url = preg_replace(\"/$phpEx(&|&)+?/\", \"$phpEx?\", $url);\n\t}\n\n\treturn append_sid($url);\n}",
"function attachment_url_to_postid($url)\n {\n }",
"public function listing_urlSlugGenerator()\n {\n $output['token'] = $this->security->get_csrf_hash();\n header('Content-Type: application/json');\n $slug = $this->input->post('title', true);\n $output['response'] = $this->common->_urlSlugGenerator('tbl_listings', 'id', 'slug', $slug);\n $output = html_escape($this->security->xss_clean($output));\n exit(json_encode($output));\n }",
"function url_meta() {\n add_meta_box('url_meta', 'URL', 'url_callback', 'external_post', 'normal', 'high');\n add_meta_box('url_meta', 'URL', 'url_callback', 'external_tool', 'normal', 'high');\n}",
"function getShortUrl($url = null){\n\n\t$data = json_encode(array('longUrl' => $url));\n\n\t$user_agent = 'SUKI NINA/1.0 (http://deluxeluxury.com/)';\n\n\t$ch = curl_init();\n\tcurl_setopt($ch,CURLOPT_USERAGENT, $user_agent);\n\tcurl_setopt($ch, CURLOPT_URL, \"https://www.googleapis.com/urlshortener/v1/url?key=APIKEY\");\n\tcurl_setopt($ch,CURLOPT_HTTPHEADER, array('Content-type: application/json'));\n\tcurl_setopt($ch,CURLOPT_HTTP_VERSION,CURL_HTTP_VERSION_1_1);\n\tcurl_setopt($ch,CURLOPT_POST, TRUE);\n\tcurl_setopt($ch,CURLOPT_POSTFIELDS, $data);\n curl_setopt($ch,CURLOPT_RETURNTRANSFER, true); //need this to suppress output to browser\n\n\t$result = curl_exec($ch);\n\tcurl_close($ch);\n\t\n\treturn json_decode($result)->id;\n\n}",
"function build_url($vars, $zone_name = '', $skip = null, $keep_all = false, $avoid_remap = false, $skip_keep = false, $hash = '')\n{\n if (empty($vars['page']) && running_script('index')) { // For SEO purposes we need to make sure we get the right URL\n $vars['page'] = get_zone_default_page($zone_name);\n if ($vars['page'] === null) {\n $vars['page'] = 'start';\n }\n }\n\n $id = isset($vars['id']) ? $vars['id'] : null;\n\n global $SITE_INFO;\n if (\n (isset($SITE_INFO['no_keep_params'])) &&\n ($SITE_INFO['no_keep_params'] === '1') &&\n ((get_option('url_monikers_enabled') === '0') || (!is_numeric($id)/*i.e. not going to trigger a URL moniker query*/) && ((is_null($id)) || (strpos($id, '/') !== false)))\n ) {\n if (($id === null) && (isset($vars['type'])) && ($vars['type'] === 'browse') && (!$keep_all)) {\n unset($vars['type']); // Redundant, let it default, this is our convention\n }\n\n if ($vars['page'] === '_SELF') {\n $vars['page'] = get_page_name();\n }\n if ($zone_name === '_SELF') {\n $zone_name = get_zone_name();\n }\n if ($zone_name === '_SEARCH') {\n $zone_name = get_page_zone($vars['page']);\n }\n if (($hash !== '') && ($hash[0] !== '#')) {\n $hash = '#' . $hash;\n }\n return make_string_tempcode(_build_url($vars, $zone_name, $skip, $keep_all, $avoid_remap, true, $hash));\n }\n\n $page_link = build_page_link($vars, $zone_name, $skip, $hash);\n\n $arr = array(\n $page_link,\n $avoid_remap ? '1' : '0',\n $skip_keep ? '1' : '0',\n $keep_all ? '1' : '0'\n );\n if ($skip !== null) {\n $arr[] = implode('|', array_keys($skip));\n }\n\n $ret = symbol_tempcode('PAGE_LINK', $arr);\n\n return $ret;\n}",
"protected function generateLinkID() {\n $s = \"\";\n do {\n switch (getConfig(\"link_style\")) {\n case LINK_UUID_V4:\n // UUID version 4.\n $uuid = openssl_random_pseudo_bytes(16);\n $uuid[6] = chr(ord($uuid[6]) & 0x0f | 0x40);\n $uuid[8] = chr(ord($uuid[8]) & 0x3f | 0x80);\n $s = vsprintf(\"%s%s-%s-%s-%s-%s%s%s\", str_split(bin2hex($uuid), 4));\n break;\n case LINK_16_HEX:\n // 16-char (8-byte) hexadecimal string.\n $s = bin2hex(openssl_random_pseudo_bytes(8));\n break;\n case LINK_16_LOWER_CASE:\n // 16-char lower-case alphanumeric string.\n $alpha = \"0123456789abcdefghijklmnopqrstuvwxyz\";\n for ($i = 0; $i < 16; $i++) $s .= $alpha[random_int(0, strlen($alpha)-1)];\n break;\n case LINK_16_MIXED_CASE:\n // 16-char mixed-case alphanumeric string.\n // '0', 'O', 'l' and 'I' not included because of visual similarity.\n $alpha = \"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\";\n for ($i = 0; $i < 16; $i++) $s .= $alpha[random_int(0, strlen($alpha)-1)];\n break;\n case LINK_16_UPPER_CASE:\n // 16-char upper-case alphanumeric string.\n // '0' and 'O' not included because of visual similarity.\n $alpha = \"123456789ABCDEFGHIJKLMNPQRSTUVWXYZ\";\n for ($i = 0; $i < 16; $i++) $s .= $alpha[random_int(0, strlen($alpha)-1)];\n break;\n case LINK_32_HEX:\n // 32-char (16-byte) hexadecimal string.\n $s = bin2hex(openssl_random_pseudo_bytes(16));\n break;\n case LINK_32_LOWER_CASE:\n // 32-char lower-case alphanumeric string.\n $alpha = \"0123456789abcdefghijklmnopqrstuvwxyz\";\n for ($i = 0; $i < 32; $i++) $s .= $alpha[random_int(0, strlen($alpha)-1)];\n break;\n case LINK_32_MIXED_CASE:\n // 32-char mixed-case alphanumeric string.\n // '0', 'O', 'l' and 'I' not included because of visual similarity.\n $alpha = \"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\";\n for ($i = 0; $i < 32; $i++) $s .= $alpha[random_int(0, strlen($alpha)-1)];\n break;\n case LINK_32_UPPER_CASE:\n // 32-char upper-case alphanumeric string.\n // '0' and 'O' not included because of visual similarity.\n $alpha = \"123456789ABCDEFGHIJKLMNPQRSTUVWXYZ\";\n for ($i = 0; $i < 32; $i++) $s .= $alpha[random_int(0, strlen($alpha)-1)];\n break;\n case LINK_4_PLUS_4_LOWER_CASE:\n // 4+4-char lower-case alphanumeric string.\n $alpha = \"0123456789abcdefghijklmnopqrstuvwxyz\";\n for ($i = 0; $i < 8; $i++) $s .= $alpha[random_int(0, strlen($alpha)-1)];\n $s = substr($s, 0, 4).\"-\".substr($s, -4);\n break;\n case LINK_4_PLUS_4_MIXED_CASE:\n // 4+4-char mixed-case alphanumeric string.\n // '0', 'O', 'l' and 'I' not included because of visual similarity.\n $alpha = \"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\";\n for ($i = 0; $i < 8; $i++) $s .= $alpha[random_int(0, strlen($alpha)-1)];\n $s = substr($s, 0, 4).\"-\".substr($s, -4);\n break;\n case LINK_4_PLUS_4_UPPER_CASE:\n default:\n // 4+4-char upper-case alphanumeric string.\n // '0' and 'O' not included because of visual similarity.\n $alpha = \"123456789ABCDEFGHIJKLMNPQRSTUVWXYZ\";\n for ($i = 0; $i < 8; $i++) $s .= $alpha[random_int(0, strlen($alpha)-1)];\n $s = substr($s, 0, 4).\"-\".substr($s, -4);\n break;\n }\n } while ($this->memcache->get(PREFIX_LOCDATA.$s) !== false);\n return $s;\n }",
"function append_random( &$sUrl, $nLon=1 )\n{\n $sSep = '&';\n if( strpos($sUrl,'?') ===false )\n {\n $sSep = '?';\n }\n $sUrl .= $sSep.'rnd='.STRING::get_random($nLon);\n}"
] |
[
"0.63247937",
"0.6222725",
"0.6135513",
"0.61037457",
"0.60994154",
"0.5951285",
"0.59102654",
"0.58138865",
"0.581295",
"0.58119917",
"0.5802992",
"0.5802388",
"0.5802198",
"0.578804",
"0.57493025",
"0.57377803",
"0.5724736",
"0.572389",
"0.57229775",
"0.5654361",
"0.56220794",
"0.5620953",
"0.56098604",
"0.55958104",
"0.5591615",
"0.55837846",
"0.558378",
"0.5576367",
"0.55607224",
"0.55543715"
] |
0.62325233
|
1
|
Return a list of page styles valid for a given template
|
public function getPageStyleList($template = null){
global $db;
if (!is_null($template)) {
$template = " AND template = $template";
}
$query = "SELECT * FROM pages_style WHERE user_selectable=1".$template;
//print "$query<br>\n";
$results = $db->get_results($query);
return $results;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"function getStyles () {\n return array(\"template.css\");\n }",
"public function get_styles() {\n\t\treturn [];\n\t}",
"protected function get_styles()\n\t{\n\t\t$sql = 'SELECT style_id, style_path, style_parent_id, bbcode_bitfield FROM ' . $this->styles_table;\n\n\t\treturn $this->fetch_decoded_rowset($sql);\n\t}",
"public static function templateStyles()\n {\n return [\n '1_column' => [\n 'full_width_banner',\n 'single_text_row',\n 'footer',\n ],\n '1_2_column' => [\n 'full_width_banner',\n 'single_text_row',\n 'two_image_text_columns',\n 'footer',\n ],\n '1_2_1_column' => [\n 'full_width_banner',\n 'single_text_row',\n 'two_image_text_columns',\n 'single_text_row',\n 'footer',\n ],\n '1_3_column' => [\n 'full_width_banner',\n 'single_text_row',\n 'three_image_text_columns',\n 'single_text_row',\n 'footer',\n ],\n '1_3_1_column' => [\n 'full_width_banner',\n 'single_text_row',\n 'three_image_text_columns',\n 'single_text_row',\n 'footer',\n ],\n '1_3_2_column' => [\n 'full_width_banner',\n 'single_text_row',\n 'three_image_text_columns',\n 'two_image_text_columns',\n 'footer',\n ],\n '2_column' => [\n 'full_width_banner',\n 'two_image_text_columns',\n 'footer',\n ],\n '2_1_column' => [\n 'full_width_banner',\n 'two_image_text_columns',\n 'single_text_row',\n 'footer',\n ],\n '2_1_2_column' => [\n 'full_width_banner',\n 'two_image_text_columns',\n 'single_text_row',\n 'two_image_text_columns',\n 'footer',\n ],\n '3_1_3_column' => [\n 'full_width_banner',\n 'three_image_text_columns',\n 'single_text_row',\n 'three_image_text_columns',\n 'footer',\n ],\n ];\n }",
"private function styles_pointer() {\n\t\treturn array(\n\t\t\t'content' => '<h3>' . __( 'Styles', 'formidable' ) . '</h3>'\n\t\t\t . '<p>' . __( 'Want to make changes to the way your forms look? Make all the changes you would like right here, and watch the sample form change before your eyes.', 'formidable' ) . '</p>',\n\t\t\t'prev_page' => 'entries',\n\t\t\t'next_page' => 'import',\n\t\t\t'selector' => '.general-style',\n\t\t\t'position' => array( 'edge' => 'left', 'align' => 'right' ),\n\t\t);\n\t}",
"public function get_styles () {\r\n\t\treturn empty($this->_data[self::STYLES])\r\n\t\t\t? array()\r\n\t\t\t: $this->_data[self::STYLES]\r\n\t\t;\r\n\t}",
"function bdpp_display_styles_list() {\n\n\t\t// Taking parameter\n\t\t$data = array();\n\t\t$page = ( !empty($_GET['paged']) && $_GET['paged'] > 1 ) ? $_GET['paged'] : 1;\n\n\t\t// start position in the array\n\t\t// +1 is to account for total values.\n\t\t$start = ( ($page - 1) * ($this->per_page) );\n\n\t\t// Get template data\n\t\t$tmpl_data = array_slice( $this->template_data, $start, $this->per_page );\n\n\t\tif( !empty( $tmpl_data ) ) {\n\t\t\tforeach ( $tmpl_data as $key => $value ) {\n\t\t\t\t$data[$key]['id'] \t\t= $value['id'];\n\t\t\t\t$data[$key]['title'] \t= $value['title'];\n\t\t\t}\n\t\t}\n\n\t\t$result_arr['data']\t\t= !empty($data) ? $data : array();\n\t\t$result_arr['total'] \t= count( $this->template_data ); // Total no of data\n\n\t\treturn $result_arr;\n\t}",
"private static function get_styles() {\n\n\t\treturn [\n\t\t\t'basic' => esc_html__( 'Basic', 'wpforms' ),\n\t\t\t'compact' => esc_html__( 'Compact', 'wpforms' ),\n\t\t\t'table' => esc_html__( 'Table', 'wpforms' ),\n\t\t\t'table_compact' => esc_html__( 'Table, Compact', 'wpforms' ),\n\t\t];\n\t}",
"private static function get_styles() {\n\t\t$email_styles_template = self::locate_template_file( 'email-styles' );\n\t\tif ( ! file_exists( $email_styles_template ) ) {\n\t\t\treturn false;\n\t\t}\n\t\tob_start();\n\t\tinclude $email_styles_template;\n\t\treturn ob_get_clean();\n\t}",
"public function get_styles_templates()\n\t{\n\t\t$templates = array();\n\n\t\t$bbcode_ids = array(\n\t\t\t'quote' => 0,\n\t\t\t'b' => 1,\n\t\t\t'i' => 2,\n\t\t\t'url' => 3,\n\t\t\t'img' => 4,\n\t\t\t'size' => 5,\n\t\t\t'color' => 6,\n\t\t\t'u' => 7,\n\t\t\t'code' => 8,\n\t\t\t'list' => 9,\n\t\t\t'*' => 9,\n\t\t\t'email' => 10,\n\t\t\t'flash' => 11,\n\t\t\t'attachment' => 12,\n\t\t);\n\n\t\t$styles = array();\n\t\tforeach ($this->get_styles() as $row)\n\t\t{\n\t\t\t$styles[$row['style_id']] = $row;\n\t\t}\n\n\t\tforeach ($styles as $style_id => $style)\n\t\t{\n\t\t\t$bbcodes = array();\n\n\t\t\t// Collect the name of the BBCodes whose bit is set in the style's bbcode_bitfield\n\t\t\t$template_bitfield = new \\bitfield($style['bbcode_bitfield']);\n\t\t\tforeach ($bbcode_ids as $bbcode_name => $bit)\n\t\t\t{\n\t\t\t\tif ($template_bitfield->get($bit))\n\t\t\t\t{\n\t\t\t\t\t$bbcodes[] = $bbcode_name;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$filename = $this->resolve_style_filename($styles, $style);\n\t\t\tif ($filename === false)\n\t\t\t{\n\t\t\t\t// Ignore this style, it will use the default templates\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$templates[$style_id] = array(\n\t\t\t\t'bbcodes' => $bbcodes,\n\t\t\t\t'template' => file_get_contents($filename),\n\t\t\t);\n\t\t}\n\n\t\treturn $templates;\n\t}",
"public function styles() {\n\t\t$styles = array(\n\t\t\tarray(\n\t\t\t\t'handle' => 'static_content_styles_css',\n\t\t\t\t'src' => $this->get_base_url() . '/css/static_content_styles.css',\n\t\t\t\t'version' => $this->_version,\n\t\t\t\t'enqueue' => array(\n\t\t\t\t\tarray( 'field_types' => array( 'staticcontent' ) )\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\n\t\treturn array_merge( parent::styles(), $styles );\n\t}",
"private function getStylesheets() {\n $themes = [];\n $stylesheet_options = [];\n $theme_handler = Drupal::service('theme_handler');\n\n foreach ($theme_handler->listInfo() as $name => $theme) {\n $themes = $theme_handler->listInfo();\n $names = $themes[$name]->info['name'];\n $path = DRUPAL_ROOT . '/' . $theme\n ->getPath();\n $stylesheete = $path . '/css/' . $name . '.' . 'ckeditor.css';\n $default_stylesheet = drupal_get_path('module', 'ckeditor_stylesheetparser') . '/js/plugins/stylesheetparser/samples/assets/sample.css';\n\n if (file_exists($stylesheete)) {\n $stylesheet_options = [$stylesheete => $names];\n } elseif (!file_exists($stylesheete)) {\n $stylesheet_options = [$default_stylesheet => $names];\n }\n return $stylesheet_options ;\n }\n }",
"public static function getPageStyle()\n {\n return ( isset( $_COOKIE['styleDefCon'] ) && in_array( $_COOKIE['styleDefCon'], self::$pageStyles ) )\n ? $_COOKIE['styleDefCon']\n : self::$pageStyles[0];\n }",
"protected function _getFromCSS()\n {\n // styles to apply\n $styles = array();\n\n // list of the selectors to get in the CSS files\n $getit = array();\n\n // get the list of the selectors of each tags\n $lst = array();\n $lst[] = $this->value['id_lst'];\n for ($i=count($this->table)-1; $i>=0; $i--) {\n $lst[] = $this->table[$i]['id_lst'];\n }\n\n // foreach selectors in the CSS files, verify if it match with the list of selectors\n foreach ($this->cssKeys as $key => $num) {\n if ($this->_getReccursiveStyle($key, $lst)) {\n $getit[$key] = $num;\n }\n }\n\n // if we have selectors\n if (count($getit)) {\n // get them, but in the definition order, because of priority\n asort($getit);\n foreach ($getit as $key => $val) $styles = array_merge($styles, $this->css[$key]);\n }\n\n return $styles;\n }",
"function readStyles() { $this->ParseCSSFile();\n return $this->_stylelist; }",
"public function getStyles() {\n $req = 'SELECT COUNT(rs.robe_id) AS nbContenuStyle, s.styl_id, styl_libelle '\n .'FROM t_style s left JOIN t_robe_de_soiree rs ON s.styl_id = rs.styl_id '\n .'GROUP BY styl_libelle';\n $styles = $this->executerRequete($req);\n return $styles;\n }",
"private function getStylesheet() {\n $themes = [];\n $stylesheet_options = [];\n $theme_handler = Drupal::service('theme_handler');\n foreach ($theme_handler->listInfo() as $name => $theme) {\n $themes = [];\n $stylesheet_options = [];\n $theme_handler = Drupal::service('theme_handler');\n foreach ($theme_handler->listInfo() as $name => $theme) {\n $themes[$name] = DRUPAL_ROOT . '/' . $theme\n ->getPath();\n if (file_exists($themes[$name])) {\n $stylesheet = $themes[$name] . '/css/' . $name . '.' . 'ckeditor.css';\n }\n else {\n $stylesheet = drupal_get_path('module', 'ckeditor_stylesheetparser') . '/js/plugins/stylesheetparser/samples/assets/sample.css';\n }\n }\n $stylesheet_options = $stylesheet;\n return $stylesheet_options;\n }\n }",
"public function styles() {\n $styles = array();\n if (\\File::isDirectory(public_path('assets/fontello/css'))) {\n foreach (glob(public_path('assets/fontello/css/') . '*', GLOB_BRACE) as $path) {\n $file = explode('/', $path);\n $styles[] = \\HTML::style('public/assets/fontello/css/' . end($file));\n }\n\n return join(\"\\n\", $styles);\n }\n }",
"function getPrintStyles(){\r\n require $this->sRessourcesFile;\r\n if (in_array(\"print_styles\", $this->aSelectedFields)){\r\n $aParams['sSchemaVmap'] = array('value' => $this->aProperties['schema_vmap'], 'type' => 'schema_name');\r\n $aParams['user_id'] = array('value' => $this->aValues['my_vitis_id'], 'type' => 'number');\r\n $oPDOresult = $this->oConnection->oBd->executeWithParams($aSql['getUserPrintStyles'], $aParams);\r\n\t\t$sListPrintStyleId = \"\";\r\n $aListPrintStyleId = array();\r\n\t\twhile($aLigne=$this->oConnection->oBd->ligneSuivante ($oPDOresult)) {\r\n\t\t\tif ($sListPrintStyleId == \"\"){\r\n\t\t\t\t$sListPrintStyleId = $aLigne[\"printstyle_id\"];\r\n\t\t\t}else{\r\n\t\t\t\t$sListPrintStyleId .= \"|\".$aLigne[\"printstyle_id\"];\r\n\t\t\t}\r\n $aListPrintStyleId[] = $aLigne[\"name\"];\r\n\t\t}\r\n\t\t$oPDOresult=$this->oConnection->oBd->fermeResultat();\r\n $this->aFields['print_styles'] = $sListPrintStyleId;\r\n $this->aFields['print_styles_label'] = implode(',', $aListPrintStyleId);\r\n }\r\n }",
"function ru_filter_styles(){\n $this->removestyle(\"bbp-default\");\n\n // download monitor is not used in the front-end.\n $this->removestyle(\"wp_dlmp_styles\");\n\n if( !is_singular( 'docs' ) ){\n // the table of contents plugin is being used on documentation pages only\n $this->removestyle(\"toc-screen\");\n }\n\n if ( !( is_page( 'account' ) || is_page( 'edit-profile' )) ){\n // this should not be like this. Need to look into it.\n $this->removestyle(\"wppb_stylesheet\");\n }\n\n if( !is_singular( array('docs', 'post' ) ) ){\n $this->removestyle(\"codebox\");\n }\n }",
"public function getStyles()\n {\n return Styles::newInstance()->getStyles();\n }",
"private function _getCSSIncludes () {\n $ret = array();\n foreach ($this->_styles as $stylesheet => $included) {\n if (!$included) {\n $this->_styles[$stylesheet] = true;\n array_push($ret, self::CSS_PATH . $stylesheet);\n }\n }\n\n return $ret;\n }",
"function dtwp_extract_styles( $contents ) {\n\t\t$contents[ 'contents' ] = str_replace( '}', \"}\\r\\n\", $contents[ 'contents' ] );\n\n\n\t\tpreg_match_all( '#.c(?P<digit>\\d+){(.*?)font-weight:bold(.*?)}#', $contents[ 'contents' ], $boldmatches );\n\t\tpreg_match_all('#.c(?P<digit>\\d+){(.*?)font-style:italic(.*?)}#', $contents[ 'contents' ], $italicmatches);\n\t\t\n\t\tif( !empty( $boldmatches[ 'digit' ] ) ) {\n\t\t\n\t\t\tforeach( $boldmatches[ 'digit' ] as $boldclass ) {\n\t\t\t\t$contents[ 'contents' ] = preg_replace( '#<span class=\"(.*?)c' . $boldclass . '(.*?)\">(.*?)</span>#s', '<span class=\"$1c' . $boldclass . '$2\"><strong>$3</strong></span>', $contents[ 'contents' ] );\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\tif( !empty( $italicmatches[ 'digit' ] ) ) {\n\t\t\n\t\t\tforeach( $italicmatches[ 'digit' ] as $italicclass ) {\n\t\t\t\t$contents[ 'contents' ] = preg_replace( '#<span class=\"(.*?)c' . $italicclass . '(.*?)\">(.*?)</span>#s', '<span class=\"$1c' . $italicclass . '$2\"><em>$3</em>', $contents[ 'contents' ] );\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\treturn $contents;\n\n}",
"function getAllPageTemplates() {\n global $wpdb;\n return $wpdb->get_col(\"SELECT DISTINCT meta_value FROM wp_postmeta WHERE meta_key = '_wp_page_template'\"); \n }",
"public function getStyles()\n\t{\n\t\treturn $this->styles;\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}",
"public static function get_all_styles()\n\t{\n\t\tforeach(array_keys(self::$STYLE_MAP) as $name) {\n\t\t\tyield $name;\n\t\t}\n\t}",
"public function getStyles()\n {\n return $this->_styles;\n }",
"public function styles() {\n\n\t\t$styles = array(\n\t\t\tarray(\n\t\t\t\t'handle' => 'gform_dropbox_jstree',\n\t\t\t\t'src' => $this->get_base_url() . '/css/jstree/style.css',\n\t\t\t\t'version' => $this->_version,\n\t\t\t\t'enqueue' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'admin_page' => array( 'form_settings' ),\n\t\t\t\t\t\t'tab' => $this->_slug,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'handle' => 'gform_dropbox_admin',\n\t\t\t\t'src' => $this->get_base_url() . '/css/admin.css',\n\t\t\t\t'version' => $this->_version,\n\t\t\t\t'enqueue' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'admin_page' => array( 'plugin_settings' ),\n\t\t\t\t\t\t'tab' => $this->_slug,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'handle' => 'gform_dropbox_frontend',\n\t\t\t\t'src' => $this->get_base_url() . '/css/frontend.css',\n\t\t\t\t'version' => $this->_version,\n\t\t\t\t'enqueue' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'field_types' => array( 'dropbox' )\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t);\n\n\t\treturn array_merge( parent::styles(), $styles );\n\n\t}",
"public function get_header_styles () {\r\n\t\treturn empty($this->_data[self::HEADER_STYLES])\r\n\t\t\t? array()\r\n\t\t\t: $this->_data[self::HEADER_STYLES]\r\n\t\t;\r\n\t}"
] |
[
"0.670086",
"0.62477005",
"0.6162479",
"0.6106915",
"0.60990655",
"0.60840136",
"0.6063157",
"0.60596526",
"0.6037711",
"0.60282886",
"0.5895841",
"0.5862483",
"0.58250517",
"0.5740582",
"0.56951874",
"0.5694055",
"0.5662693",
"0.5660958",
"0.5562159",
"0.55086553",
"0.54963493",
"0.54705346",
"0.54555315",
"0.5454978",
"0.54446065",
"0.5429177",
"0.54277676",
"0.5414183",
"0.53895617",
"0.5362854"
] |
0.75753134
|
0
|
print "drawToolBar($pagestyle, $disableStyles, $toolmode)\n";
|
public function drawToolbar($pagestyle='', $disableStyles, $toolmode="page") {
$template=2;
$helptitle="Page edit toolbar";
if ($toolmode=="panel") {
$template=6;
$helptitle='Panel edit toolbar';
}
else if ($toolmode=="landing") {
$template=67;
}
$html = '
<div id="toolbar">
<div class="logo"><a href="/treeline/"><img src="/treeline/img/logo.gif" alt="Treeline" /></a></div>
<a href="javascript:openhelp(\''.Help::helpLinkByTitle($helptitle).'\');" style="float:right;margin:20px;">'.$this->getLabel("tl_help_get_help", true).'</a>
<div id="toolbar_container">
<div class="options" style="'.($disableStyles?"visibility:hidden":"").';width:200px;">
<p>'.ucfirst($this->getLabel("tl_toolb_change_style", true)).'</p>
'.($disableStyles?"":$this->drawStyleSwitcherMenu($pagestyle, $template)).'
</div>
<div class="options" id="toolbar-quick-links" style="">
<p>'.ucfirst($this->getLabel("tl_toolb_quick", true)).'</p>
<a class="tl_link" href="javascript:alert(\'Inline asset create\n\nThis function is not yet supported.\');">'.$this->getLabel("tl_toolb_create_ass", true).'</a>
'.($toolmode=="page"?'<a class="tl_link" href="javascript:panelManager(\''.$this->getGUID().'\');">'.$this->getLabel("tl_toolb_man_panels", true).'</a>':"").'
<a class="tl_link" href="javascript:editorNotes(\''.$this->getGUID().'\');">'.$this->getLabel("tl_toolb_editor_note", true).'</a>
</div>
<div class="options" style="float:right;">
<p>'.$this->getLabel("tl_toolb_manage_title", true).'</p>
<input type="button" class="button cancel" name="treeline" value="'.$this->getLabel("tl_toolb_but_discard", true).'" id="btn_discard" onclick="javascript:setTarget(0);setAction(\'Discard changes\')" />
<input type="button" class="button cancel" name="treeline" value="'.ucfirst($this->getLabel("tl_generic_preview", true)).'" id="btn_preview" onclick="javascript:setTarget(1);setAction(\'Preview\')" />
<input type="button" class="button" name="treeline" value="'.ucfirst($this->getLabel("tl_generic_save_changes", true)).'" id="btn_save" onclick="javascript:setTarget(0);setAction(\'Save changes\')" />
</div>
</div>
<!-- <div class="clear"> </div> -->
</div>
<script type="text/javascript">
function setTarget(blank) {
var f=document.forms[0];
if (blank) f.target="_blank";
else f.target="_self";
}
function setAction(a) {
var f = document.getElementById(\'treeline_edit\');
//alert("set post("+f+") act("+a+")");
if (f) {
f.post_action.value=a;
//alert("submitting");
f.submit();
document.forms[0].target="_self";
f.post_action.value="";
return true;
}
return false;
}
</script>
';
// print "done toolbar<BR>\n";
return $html;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function ext_makeToolBar() {}",
"function my_toolbars( $toolbars )\n{\n/*\n echo '< pre >';\n print_r($toolbars);\n echo '< /pre >';\n die;\n */\n\n // Add a new toolbar called \"Very Simple\"\n // - this toolbar has only 1 row of buttons\n $toolbars['Very Simple' ] = array();\n $toolbars['Very Simple' ][1] = array('bold' , 'italic' , 'underline', 'link' );\n $toolbars['Chapter' ] = array();\n $toolbars['Chapter' ][1] = array('bold' , 'italic' , 'underline', 'bloc');\n $toolbars['Title' ] = array();\n $toolbars['Title' ][1] = array('bold');\n $toolbars['Code'][2] = array('code');\n\n // Edit the \"Full\" toolbar and remove 'code'\n // - delet from array code from http://stackoverflow.com/questions/7225070/php-array-delete-by-value-not-key\n if( ($key = array_search('code' , $toolbars['Full' ][2])) !== false )\n {\n unset( $toolbars['Full' ][2][$key] );\n }\n\n // remove the 'Basic' toolbar completely\n //unset( $toolbars['Basic' ] );\n\n // return $toolbars - IMPORTANT!\n return $toolbars;\n}",
"function get_toolbars()\n {\n }",
"function write_toolbar($date, $type)\r\n\t{\r\n\t\tinclude (\"globals.php\");\r\n\t\t\t\t\r\n\t\tprint(\"\t\t<tr background=\\\"./common_files/sm_toolbar_bg_black.png\\\">\\n\");\r\n\r\n\t\t/*Zoom tool*/\r\n\t\tprint(\"\t\t\t<td align=left valign=middle height=30 >\\n\");\r\n\t\tprint(\"\t\t\t\t\t<a href='#' class=\\\"mail2\\\" onclick=\\\"zoomable=-1*zoomable;if (zoomable==1){writeText('<img src=common_files/zoom_small_grey.png width=25 border=0 title="Click to turn off zoom function. Drag UP and RIGHT to change zoom box.">');}else{writeText('<img src=common_files/zoom_small.png width=25 border=0 title="Click to turn on zoom function. Drag UP and RIGHT to change zoom box.">');}\\\"><b id=\\\"zoomtoggle\\\"><img src=common_files/zoom_small.png width=25 border=0 title='Click to turn ON zoom function. Drag UP and RIGHT to change zoom box.'></b></a>\\n\"); \r\n\t\tprint(\"\t\t\t</td>\t\\n\"); \r\n\t\t\r\n\t\tprint(\"\t\t\t<td align=center height=30>\\n\");\r\n\t\t/*dropdowns*/\r\n\t\tprint(\"\t\t\t\t<ul id=\\\"toolnav\\\">\\n\");\r\n\t\t\r\n\t\t/*Download*/\r\n\t\tprint(\"\t\t\t\t\t<li><a href=\\\"#\\\" class=\\\"Download\\\">Download</a>\\n\");\r\n\t\tprint(\"\t\t\t\t\t <div class=\\\"sub\\\">\\n\");\r\n\t\tprint(\"\t\t\t\t\t <div class=\\\"sub_small\\\">\\n\");\r\n\t\tprint(\"\t\t\t <ul>\\n\");\r\n\t\t\r\n\t\t\t\t\t\t\t\t\t\t$instrument = substr($type,0,4);\r\n\t\t\t\t\t\t\t\t\t\t$filter = substr($type,5,5);\r\n\t\t\t\t\t\t\t\t\t\t$file = find_latest_file($date, $instrument, $filter, 'png', 'fd'); \t\t\t\r\n\r\n\t\tprint(\"\t\t \t<li><a href=\\\"${arm_data_path}data/$dirdate/pngs/$instrument/$file\\\">PNG</a></li>\\n\");\r\n\r\n\t\t\t\t\t\t\t\t\t\t$file = find_latest_file($date, $instrument, $filter, 'fts.gz', 'fd'); \t\t\t\r\n\t\t\r\n\t\tprint(\"\t\t\t\t\t\t\t<li><a href=\\\"${arm_data_path}data/$dirdate/fits/$instrument/$file\\\">FITS</a></li>\\n\");\r\n\t\tprint(\"\t \t\t</ul>\\n\");\r\n\t\tprint(\"\t\t\t\t\t </div>\\n\");\r\n\t\tprint(\"\t\t\t\t\t </div>\\n\");\r\n\t\tprint(\"\t\t\t\t\t</li>\\n\");\r\n\t\t\r\n\t\t\r\n\t\t/*main menu*/\r\n\t\tif (strtotime($date) > strtotime(\"20100804\")){\r\n\t\tprint(\"\t\t\t\t\t<li><a href=\\\"#\\\" class=\\\"Menu\\\">Others</a>\\n\");\r\n\t\tprint(\"\t\t\t\t\t <div class=\\\"sub\\\">\\n\");\r\n\t\tprint(\"\t\t\t <ul>\\n\");\r\n\t\tprint(\"\t\t\t <li><h2><a href=\\\"#\\\">Main</a></h2></li>\\n\");\r\n\t\tprint(\"\t\t\t <div class=\\\"sm-table\\\">\\n\");\r\n\t\twrite_index_images($date,'1','div');\r\n\t\tprint(\"\t\t\t </div>\\n\");\r\n\t\tprint(\"\t\t\t </ul>\\n\");\r\n\t\tprint(\"\t\t\t <ul>\\n\");\r\n\t\tprint(\"\t\t\t <li><h2><a href=\\\"#\\\">Far side</a></h2></li>\\n\");\r\n\t\tprint(\"\t\t\t <div class=\\\"sm-table\\\">\\n\");\r\n\t\twrite_index_images($date,'2','div');\r\n\t\tprint(\"\t\t\t </div>\\n\");\r\n\t\tprint(\"\t\t\t </ul>\\n\");\r\n\t\tprint(\"\t\t\t <ul>\\n\");\r\n\t\tprint(\"\t\t\t <li><h2><a href=\\\"#\\\">SDO short</a></h2></li>\\n\");\r\n\t\tprint(\"\t\t\t <div class=\\\"sm-table\\\">\\n\");\r\n\t\twrite_index_images($date,'3','div');\r\n\t\tprint(\"\t\t\t </div>\\n\");\r\n\t\tprint(\"\t\t\t </ul>\\n\");\r\n\t\tprint(\"\t\t\t <ul>\\n\");\r\n\t\tprint(\"\t\t\t <li><h2><a href=\\\"#\\\">SDO long</a></h2></li>\\n\");\r\n\t\tprint(\"\t\t\t <div class=\\\"sm-table\\\">\\n\");\r\n\t\twrite_index_images($date,'4','div');\r\n\t\tprint(\"\t\t\t </div>\\n\");\r\n\t\tprint(\"\t\t\t </ul>\\n\");\r\n\t\tprint(\"\t\t\t\t\t </div>\\n\");\r\n\t\tprint(\"\t\t\t\t\t</li>\\n\");\r\n\t\t\r\n\t\tprint(\"\t\t\t\t</ul>\\n\");\r\n\t\tprint(\"\t\t\t</td> \\n\");\r\n\r\n\t\t} elseif (strtotime($date) < strtotime(\"20090520\")){\r\n\t\tprint(\"\t\t\t\t\t<li><a href=\\\"#\\\" class=\\\"Menu\\\">Others</a>\\n\");\r\n\t\tprint(\"\t\t\t\t\t <div class=\\\"sub\\\">\\n\");\r\n\t\tprint(\"\t\t\t <ul>\\n\");\r\n\t\tprint(\"\t\t\t <li><h2><a href=\\\"#\\\">Main</a></h2></li>\\n\");\r\n\t\tprint(\"\t\t\t <div class=\\\"sm-table\\\">\\n\");\r\n\t\twrite_index_images($date,'1','div');\r\n\t\tprint(\"\t\t\t </div>\\n\");\r\n\t\tprint(\"\t\t\t </ul>\\n\");\r\n\r\n\t\t} else{\r\n\t\tprint(\"\t\t\t\t\t<li><a href=\\\"#\\\" class=\\\"Menu\\\">Others</a>\\n\");\r\n\t\tprint(\"\t\t\t\t\t <div class=\\\"sub\\\">\\n\");\r\n\t\tprint(\"\t\t\t <ul>\\n\");\r\n\t\tprint(\"\t\t\t <li><h2><a href=\\\"#\\\">Main</a></h2></li>\\n\");\r\n\t\tprint(\"\t\t\t <div class=\\\"sm-table\\\">\\n\");\r\n\t\twrite_index_images($date,'1','div');\r\n\t\tprint(\"\t\t\t </div>\\n\");\r\n\t\tprint(\"\t\t\t </ul>\\n\");\r\n\t\tprint(\"\t\t\t <ul>\\n\");\r\n\t\tprint(\"\t\t\t <li><h2><a href=\\\"#\\\">Far side</a></h2></li>\\n\");\r\n\t\tprint(\"\t\t\t <div class=\\\"sm-table\\\">\\n\");\r\n\t\twrite_index_images($date,'2','div');\r\n\t\tprint(\"\t\t\t </div>\\n\");\r\n\t\tprint(\"\t\t\t </ul>\\n\");\r\n\t\tprint(\"\t\t\t</td> \\n\");\r\n\r\n\t\t}\r\n\t\t\r\n\t\t/*Share this*/\r\n\t\t\tprint(\"\t \t<td align=right valign=middle height=30>\\n\");\r\n\t\tinclude (\"share_include.txt\"); \r\n\t\tprint(\"\t\t\t</td> \\n\");\r\n\t\tprint(\"\t\t\t</tr>\\n\");\r\n\t\t\r\n\t\t}",
"protected function renderToolbar() {}",
"function user_toolbars( $toolbars ){\n\t//echo \"<pre>\"; print_r($toolbars); echo \"</pre>\";\n\t/*\n\tHere's what gets output when you print_r($toolbars):\n\tArray\n\t(\n\t [Basic] => Array\n\t (\n\t [1] => Array\n\t (\n\t [0] => bold\n\t [1] => italic\n\t [2] => underline\n\t [3] => blockquote\n\t [4] => strikethrough\n\t [5] => bullist\n\t [6] => numlist\n\t [7] => alignleft\n\t [8] => aligncenter\n\t [9] => alignright\n\t [10] => undo\n\t [11] => redo\n\t [12] => link\n\t [13] => unlink\n\t [14] => fullscreen\n\t )\n\n\t )\n\n\t)\n\t*/\n\n\t// Removing the fullscreen button from the light WYSIWYG\n\tif( ($key = array_search('fullscreen' , $toolbars['Basic' ][1])) !== false ){\n\t unset( $toolbars['Basic' ][1][$key] );\n\t}\n\tif( ($key = array_search('justifyleft' , $toolbars['Basic' ][1])) !== false ){\n\t unset( $toolbars['Basic' ][1][$key] );\n\t}\n\tif( ($key = array_search('justifycenter' , $toolbars['Basic' ][1])) !== false ){\n\t unset( $toolbars['Basic' ][1][$key] );\n\t}\n\tif( ($key = array_search('justifyright' , $toolbars['Basic' ][1])) !== false ){\n\t unset( $toolbars['Basic' ][1][$key] );\n\t}\n\tif( ($key = array_search('blockquote' , $toolbars['Basic' ][1])) !== false ){\n\t unset( $toolbars['Basic' ][1][$key] );\n\t}\n\tif( ($key = array_search('strikethrough' , $toolbars['Basic' ][1])) !== false ){\n\t unset( $toolbars['Basic' ][1][$key] );\n\t}\n\tif( ($key = array_search('underline' , $toolbars['Basic' ][1])) !== false ){\n\t unset( $toolbars['Basic' ][1][$key] );\n\t}\n\t// if( ($key = array_search('bullist' , $toolbars['Basic' ][1])) !== false ){\n\t// unset( $toolbars['Basic' ][1][$key] );\n\t// }\n\t// if( ($key = array_search('numlist' , $toolbars['Basic' ][1])) !== false ){\n\t// unset( $toolbars['Basic' ][1][$key] );\n\t// }\n\tif( ($key = array_search('alignleft' , $toolbars['Basic' ][1])) !== false ){\n\t unset( $toolbars['Basic' ][1][$key] );\n\t}\n\tif( ($key = array_search('aligncenter' , $toolbars['Basic' ][1])) !== false ){\n\t unset( $toolbars['Basic' ][1][$key] );\n\t}\n\tif( ($key = array_search('alignright' , $toolbars['Basic' ][1])) !== false ){\n\t unset( $toolbars['Basic' ][1][$key] );\n\t}\n\t// if( ($key = array_search('link' , $toolbars['Basic' ][1])) !== false ){\n\t// unset( $toolbars['Basic' ][1][$key] );\n\t// }\n\t// if( ($key = array_search('unlink' , $toolbars['Basic' ][1])) !== false ){\n\t// unset( $toolbars['Basic' ][1][$key] );\n\t// }\n\n\t//Add the Paste as PlainText to the light WYSIWYG\n\tif( isset($toolbars['Basic' ][1]) ){\n\t\t$toolbars['Basic'][1][] = 'pastetext';\n\t}\n\n\t// return $toolbars - IMPORTANT!\n\treturn $toolbars;\n}",
"public function gen_Toolbar(){\r\n\t\t$toolbar ='<?xml version=\"1.0\"?><toolbar>';\r\n\t\t$toolbar = $toolbar.'<item id=\"pullReportSort\" type=\"text\" text=\"Search By\" img=\"/detail.png\" />';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"newuser\" type=\"button\" text=\"Add User\" img=\"/adduser.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item id=\"userapprove\" type=\"button\" text=\"Approve\" img=\"/userapprove.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item id=\"usersuspend\" type=\"button\" text=\"Suspend\" img=\"/usersuspend.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item id=\"pedit\" type=\"button\" text=\"Edit Privileges\" img=\"/edit.png\"/>';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"newgateway\" type=\"button\" text=\"Add Gateway\" img=\"/assigngateway.png\"/>';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"newsenderid\" type=\"button\" text=\"Add SenderID\" img=\"/senderid.png\"/>';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"newpackage\" type=\"button\" text=\"Add Package\" img=\"/package.png\"/>';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"newshortcode\" type=\"button\" text=\"Add shortcode\" img=\"/assignshortcode.png\"/>';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"newcategory\" type=\"button\" text=\"Add Category\" img=\"/category.png\"/>';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"newkey\" type=\"button\" text=\"Add key\" img=\"/keys.png\"/>';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"newscheme\" type=\"button\" text=\"Add Scheme\" img=\"/scheme.png\"/>';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"newgroup\" type=\"button\" text=\"Add Group\" img=\"/usergroup.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item id=\"newprefix\" type=\"button\" text=\"Add Prefix\" img=\"/prefix.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item id=\"newoperator\" type=\"button\" text=\"Add Operator\" img=\"/operator.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item id=\"newcountry\" type=\"button\" text=\"Add Country\" img=\"/country.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item id=\"newfeature\" type=\"button\" text=\"Add Feature\" img=\"/features.png\"/>';\r\n\r\n\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"newscheduler\" type=\"button\" text=\"Add Schedule\" img=\"/scheduler.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item id=\"newmsgtemplate\" type=\"button\" text=\"Add Template\" img=\"/template.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item id=\"newaddressbook\" type=\"button\" text=\"Add Address Book\" img=\"/adressbook.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item id=\"newcontact\" type=\"button\" text=\"Add Contact\" img=\"/contact.png\" />';\r\n\t\t$toolbar = $toolbar.'<item id=\"newtemplate\" type=\"button\" text=\"Add Message\" img=\"/save_msg.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item id=\"aedit\" type=\"buttonSelect\" text=\"Edit\" img=\"/edit.png\">';\r\n\t\t$toolbar = $toolbar.'<item type=\"button\"\tid=\"address_edit\" text=\"Address Book\" img=\"/adressbook.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item type=\"button\"\tid=\"contact_edit\" text=\"Contact\" img=\"/contact.png\" />';\r\n\t\t$toolbar = $toolbar.'</item>';\r\n\t\t$toolbar = $toolbar.'<item id=\"adelete\" type=\"buttonSelect\" text=\"Delete\" img=\"/edit.png\">';\r\n\t\t$toolbar = $toolbar.'<item type=\"button\"\tid=\"address_delete\" text=\"Address Book\" img=\"/adressbook.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item type=\"button\"\tid=\"contact_delete\" text=\"Contact\" img=\"/contact.png\" />';\r\n\t\t$toolbar = $toolbar.'</item>';\r\n\t\t$toolbar = $toolbar.'<item id=\"edit\" type=\"button\" text=\"Edit\" img=\"/edit.png\" />';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"approve\" type=\"button\" text=\"Approve\" img=\"/approve.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item id=\"disapprove\" type=\"button\" text=\"Disapprove\" img=\"/disapprove.png\" />';\r\n\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"enable\" type=\"button\" text=\"Enable\" img=\"/enable.png\" />';\r\n\t\t$toolbar = $toolbar.'<item id=\"disable\" type=\"button\" text=\"Disable\" img=\"/disable.png\" />';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"stopcron\" type=\"button\" text=\"Stop Cron\" img=\"/stopcron.png\" />';\r\n\t\t$toolbar = $toolbar.'<item id=\"resumecron\" type=\"button\" text=\"Resume Cron\" img=\"/resumecron.png\" />';\r\n\r\n\t\t//$toolbar = $toolbar.'<item id=\"edit\" type=\"button\" text=\"Edit\" img=\"/edit.png\" />';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"delete\" type=\"button\" text=\"Delete\" img=\"/delete.png\" />';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"todayReport\" type=\"button\" text=\"Today Report\" img=\"/detail.png\" />';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"upload\" type=\"button\" text=\"Upload\" img=\"/upload.png\" />';\r\n\t\t$toolbar = $toolbar.'<item id=\"detail\" type=\"button\" text=\"Detail\" img=\"/detail.png\" />';\r\n\t\t$toolbar = $toolbar.'<item id=\"empty\" type=\"button\" text=\"Empty\" img=\"/empty.png\" />';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"select\" type=\"button\" text=\"Select All\" img=\"/selectall.png\" />';\r\n\t\t$toolbar = $toolbar.'<item id=\"disselect\" type=\"button\" text=\"Dis-select\" img=\"/disselect.png\" />';\r\n\t\t$toolbar = $toolbar.'<item id=\"excel\" type=\"button\" text=\"Excel\" img=\"/excel.png\" />';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"excel_outbox\" type=\"button\" text=\"Download Outbox\" img=\"/excel.png\" />';\r\n\t\t\r\n\t\t$toolbar = $toolbar.'<item id=\"search\" type=\"button\" text=\"Search\" img=\"/search.png\" />';\r\n\t\t$toolbar = $toolbar.'</toolbar>';\r\n\r\n\t\treturn $toolbar;\r\n\t}",
"public function drawPanelToolbar() {\n\t\t$html = '';\n\t\t$html .= '<div id=\"toolbar\">'.\"\\n\";\n\t\t$html .= '\t<div id=\"toolbar_container\">'.\"\\n\";\n\t\t$html .= '\t<div class=\"logo\"><a href=\"/treeline/\"><img src=\"/treeline/img/logo.gif\" alt=\"Treeline\" /></a></div>'.\"\\n\";\n\t\t$html .= '\t<div class=\"options\">'.\"\\n\";\n\t\t$html .= '\t\t<input type=\"submit\" class=\"button\" name=\"treeline\" id=\"treeline\" value=\"Save changes\" />'.\"\\n\";\n\t\t$html .= '\t\t<input type=\"submit\" class=\"button cancel\" name=\"treeline\" id=\"treeline\" value=\"Discard changes\" />'.\"\\n\";\t\t\t\n\t\t$html .= '\t</div>'.\"\\n\";\n\t\t$html .= '\t</div>'.\"\\n\";\n\t\t$html .= '\t<div class=\"clear\"></div>';\n\t\t$html .= '</div>';\n\t\treturn $html;\n\t}",
"protected function addToolBar()\n {\n $title = JText::_('COM_HELLOWORLD_MANAGER_HELLOWORLDS');\n\n if ($this->pagination->total)\n {\n $title .= \"<span style='font-size: 0.5em; vertical-align: middle;'>(\" . $this->pagination->total . \")</span>\";\n }\n }",
"public function initToolbar()\n {\n }",
"public function renderToolbarControls()\n {\n $this->kernel->event->trigger('phifty.crud.toolbar_init',$this);\n foreach( $this->_toolbarItems as $controller ) {\n echo $controller->controlAction();\n }\n }",
"public function getEditToolbar() {\n\t \n\t\t$toolarray=array(\n\t\t\tarray(\n\t\t\t\t'image'=>'button_bold.png',\n\t\t\t\t'open'\t=>\t\"\\'\\'\\'\",\n\t\t\t\t'close'\t=>\t\"\\'\\'\\'\",\n\t\t\t\t'sample'=>\t$this->pi_getLL(\"tb_bold_sample\", \"Bold text\"),\n\t\t\t\t'tip'\t=>\t$this->pi_getLL(\"tb_bold_tip\", \"Bold text\"),\n\t\t\t\t'key'\t=>\t'B'\n\t\t\t),\n\t\t\tarray(\t\n\t\t\t\t'image'=>'button_italic.png',\n\t\t\t\t'open'\t=>\t\"\\'\\'\",\n\t\t\t\t'close'\t=>\t\"\\'\\'\",\n\t\t\t\t'sample'=> $this->pi_getLL(\"tb_italic_sample\", \"Italic text\"),\n\t\t\t\t'tip'\t=>\t$this->pi_getLL(\"tb_italic_tip\", \"Italic text\"),\n\t\t\t\t'key'\t=>\t'I'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'image'=>'button_link.png',\n\t\t\t\t'open'\t=>\t'[[',\n\t\t\t\t'close'\t=>\t']]',\n\t\t\t\t'sample'=>\t$this->pi_getLL(\"tb_link_sample\", \"Link title\"),\n\t\t\t\t'tip'\t=>\t$this->pi_getLL(\"tb_link_tip\", \"Internal link\"),\n\t\t\t\t'key'\t=>\t'L'\n\t\t\t),\n\t\t\t/*\n\t\t\tarray(\n\t\t\t\t'image'=>'button_extlink.png',\n\t\t\t\t'open'\t=>\t'[',\n\t\t\t\t'close'\t=>\t']',\n\t\t\t\t'sample'=>\t$this->pi_getLL(\"tb_extlink_sample\", \"http://www.example.com link title\"),\n\t\t\t\t'tip'\t=>\t$this->pi_getLL(\"tb_extlink_tip\", \"External link (remember http:// prefix)\"),\n\t\t\t\t'key'\t=>\t'X'\n\t\t\t),*/\n\t\t\tarray(\n\t\t\t\t'image'=>'button_headline.png',\n\t\t\t\t'open'\t=>\t\"\\\\n== \",\n\t\t\t\t'close'\t=>\t\" ==\\\\n\",\n\t\t\t\t'sample'=>\t$this->pi_getLL(\"tb_headline_sample\", \"Headline text\"),\n\t\t\t\t'tip'\t=>\t$this->pi_getLL(\"tb_headline_tip\", \"Level 2 headline\"),\n\t\t\t\t'key'\t=>\t'H'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'image'\t=>'button_hr.png',\n\t\t\t\t'open'\t=>\t\"\\\\n----\\\\n\",\n\t\t\t\t'close'\t=>\t'',\n\t\t\t\t'sample'=>\t'',\n\t\t\t\t'tip'\t=>\t$this->pi_getLL(\"tb_hr_tip\", \"Horizontal line (use sparingly)\"),\n\t\t\t\t'key'\t=>\t'R'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'image'\t=>'button_sig.png',\n\t\t\t\t'open'\t=>\t\"\\\\n--~~~~\\\\n\",\n\t\t\t\t'close'\t=>\t'',\n\t\t\t\t'sample'=>\t'',\n\t\t\t\t'tip'\t=>\t$this->pi_getLL(\"tb_sig_tip\", \"Signature\"),\n\t\t\t\t'key'\t=>\t'S'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'image'\t=>'button_nowiki.png',\n\t\t\t\t'open'\t=>\t\"<nowiki>\",\n\t\t\t\t'close'\t=>\t'</nowiki>',\n\t\t\t\t'sample'=>\t$this->pi_getLL(\"tb_nowiki_sample\", \"This is not parsed\"),\n\t\t\t\t'tip'\t=>\t$this->pi_getLL(\"tb_nowiki_tip\", \"Nowiki\"),\n\t\t\t\t'key'\t=>\t'N'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'image'\t=>'button_sub.png',\n\t\t\t\t'open'\t=>\t\"<sub>\",\n\t\t\t\t'close'\t=>\t'</sub>',\n\t\t\t\t'sample'=>\t'',\n\t\t\t\t'tip'\t=>\t$this->pi_getLL(\"tb_sub_tip\", \"Sub\"),\n\t\t\t\t'key'\t=>\t'D'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'image'\t=>'button_sup.png',\n\t\t\t\t'open'\t=>\t\"<sup>\",\n\t\t\t\t'close'\t=>\t'</sup>',\n\t\t\t\t'sample'=>\t'',\n\t\t\t\t'tip'\t=>\t$this->pi_getLL(\"tb_sup_tip\", \"Sup\"),\n\t\t\t\t'key'\t=>\t'U'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'image'\t=>'button_strike.png',\n\t\t\t\t'open'\t=>\t\"<s>\",\n\t\t\t\t'close'\t=>\t'</s>',\n\t\t\t\t'sample'=>\t$this->pi_getLL(\"tb_strike_sample\", \"This text is strike through\"),\n\t\t\t\t'tip'\t=>\t$this->pi_getLL(\"tb_strike_tip\", \"Strike Through\"),\n\t\t\t\t'key'\t=>\t''\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'image'\t=>'button_ref.png',\n\t\t\t\t'open'\t=>\t\"<ref>\",\n\t\t\t\t'close'\t=>\t'</ref>',\n\t\t\t\t'sample'=>\t$this->pi_getLL(\"tb_ref_sample\", \"This is a reference\"),\n\t\t\t\t'tip'\t=>\t$this->pi_getLL(\"tb_ref_tip\", \"Add reference\"),\n\t\t\t\t'key'\t=>\t'R'\n\t\t\t),\n\t\t);\n\t\t$toolbar =\"<script type='text/javascript'>\\n/*<![CDATA[*/\\n\";\n\t\n\t\t$toolbar.=\"document.writeln(\\\"<div id='toolbar'>\\\");\\n\";\n\t\t\n\t\tforeach($toolarray as $tool) {\n\t\t\t$image = substr(t3lib_div::getFileAbsFileName($this->conf['toolbarIconPath']), strlen(PATH_site)) . $tool['image'];\n\t\t\t$open = $tool['open'];\n\t\t\t$close = $tool['close'];\n\t\t\t$sample = $tool['sample'];\n\t\t\t$tip = $tool['tip'];\n\t\t\t$key = $tool[\"key\"]; // accesskey for the buttons\n\t\t\n\t\t\t$toolbar.=\"addButton('$image','$tip','$open','$close','$sample','$key');\\n\";\n\t\t}\n\t\n\t\t$toolbar.=\"addInfobox('\".$this->pi_getLL(\"tb_infobox\").\"','\".$this->pi_getLL(\"tb_infobox_alert\").\"');\\n\";\n\t\t$toolbar.=\"document.writeln(\\\"</div>\\\");\\n\";\n\t\n\t\t$toolbar.=\"/*]]>*/\\n</script>\";\n\t\t\n\t\t// Add Scripts\n\t\t$JS_Param = \"var drWikiEditor='\".$this->prefixId.\"[body]'; //Handler for Editor\\n\";\n\t\t$this->loadExtJS(\"res/wiki_script.js\", $JS_Param);\n\t\t\n\t\treturn $toolbar;\t\t\n\t}",
"function drawStyle()\r\n\t{\r\n\t}",
"function actionbar_begin(){\n\techo '<div class=\"actionbar\">';\n\techo '<table class=\"actionbar\">';\n\techo '<thead>';\n\techo '<tr><td class=\"actionbar\">';\n}",
"public function Toolbar($buttons, $width = '100%', $use_help = 0, $caption = '')\r\n\t\t{\r\n\t\t //buttons parsing\r\n\t\t foreach ($buttons as &$button)\r\n\t\t {\r\n\t\t $button['image'] = (empty($button['image'])) ? '' : IMAGES.$button['image'];\r\n\t\t }\r\n\t\t \r\n\t\t //jQuery toolbar\r\n jQuery::Toolbar('toolbar_container', $buttons);\r\n\r\n//\t\t\t//displays toolbar caption if necessary\r\n//\t\t\tif ($caption != '')\r\n//\t\t\t{\r\n//\t\t\t\techo \"<table cellspacing = '0' cellpadding = '0' class = 'toolbarCaption'><tr><td class = 'toolbarCaption'>$caption</td></tr></table>\";\r\n//\t\t\t}\r\n//\t\t\t\r\n//\t\t\techo \"<table class='$this->toolbarTableCssClass' cellspacing = '0' cellpadding = '0' border='0' width='\".$width.\"'><tr><td>\";\r\n//\r\n//\t\t\techo \"<table cellspacing = '0' cellpadding = '0' border='0' ><tr><td width = 10>  </td>\";\r\n//\t\t\t$i=0;\r\n//\t\t\tforeach ($buttons as $key=>$value)\r\n//\t\t\t{\r\n//\t\t\t\tif ($i > 0)\r\n//\t\t\t\t{\r\n//\t\t\t\t\t$this->ToolButtonSeparator();\r\n//\t\t\t\t}\r\n//\t\t\t\t$this->ToolButton($value[image], $value[text], $value[url], $value[attributes]);\r\n//\t\t\t\t$i++;\r\n//\t\t\t}\r\n//\t\t\t\r\n//\t\t\t\r\n//\t\t\techo \"</tr></table>\";\r\n//\t\t\t\t\r\n//\t\t\techo \"</td></tr></table>\";\r\n//\t\t\techo \"<div class = '$this->emptyDivCssClass' style = 'height: 3px;'></div>\";\r\n\t\t}",
"function showHelp()\n{\n $myName = basename(__FILE__);\n echo \"Usage:\\n\";\n echo sprintf(\" %s \\033[32m{tool name}\\033[0m\\n\", $myName);\n echo PHP_EOL;\n echo \" Tool names:\\n\";\n echo PHP_EOL;\n echo sprintf(\" * %s\\n\", 'Convert SASS/SCSS to CSS:');\n echo sprintf(\" \\033[33m%s\\033[0m\\n\", 'sass2css');\n echo sprintf(\" \\033[33m%s\\033[0m\\n\", 'scss2css');\n echo sprintf(\" \\033[33m%s\\033[0m\\n\", 'sasstocss');\n echo sprintf(\" \\033[33m%s\\033[0m\\n\", 'scsstocss');\n echo sprintf(\" \\033[33m%s\\033[0m\\n\", 'sass');\n echo sprintf(\" \\033[33m%s\\033[0m\\n\", 'scss');\n echo sprintf(\" \\033[33m%s\\033[0m\\n\", 'css');\n echo PHP_EOL;\n echo sprintf(\" * %s\\n\", 'Dump autoload classes map:');\n echo sprintf(\" \\033[33m%s\\033[0m\\n\", 'dumpautoload');\n echo sprintf(\" \\033[33m%s\\033[0m\\n\", 'dump');\n echo sprintf(\" \\033[33m%s\\033[0m\\n\", 'autoload');\n echo sprintf(\" \\033[33m%s\\033[0m\\n\", 'classmap');\n echo sprintf(\" \\033[33m%s\\033[0m\\n\", 'autoloadmap');\n echo sprintf(\" \\033[33m%s\\033[0m\\n\", 'autoloadclassmap');\n exit(0);\n}",
"public function toolbar($page, $burn_id)\n {\n\n $permissions = checkFunctionPermissions($_SESSION['user']['id'], array('user','user_district','user_agency'), 'write');\n if ($permissions['deny']) {\n exit;\n }\n\n if (isset($burn_id)) {\n $status_id = fetch_one(\"SELECT status_id FROM burns WHERE burn_id = ?;\", $burn_id);\n }\n\n if ($status_id >= $this->approved_id) {\n return \"\";\n }\n\n $toolbar_class = $this->burn_form_id . \"_tb\";\n $btn_class = \"btn-sm btn-default\";\n\n if (isset($burn_id)) {\n $c_burn_id = \", $burn_id\";\n $save_function = \"Burn.update($burn_id)\";\n $saveUtah_function = \"Burn.updateUtah($burn_id)\";\n } else {\n $save_function = \"Burn.save()\";\n $saveUtah_function = \"Burn.saveUtah()\";\n }\n\n if ($page == 1) {\n $html = \"<div class=\\\"$toolbar_class pull-right btn-group\\\">\n <button class=\\\"btn $btn_class\\\" onclick=\\\"cancel_form(true)\\\">Cancel</button>\n <button class=\\\"btn $btn_class\\\" onclick=\\\"Burn.showForm(2$c_burn_id)\\\">Forward</button>\n <button class=\\\"btn $btn_class\\\" onclick=\\\"$save_function\\\">Save Draft</button>\n <!-- <button class=\\\"btn $btn_class\\\" onclick=\\\"Burn.submitUtah($burn_id)\\\">Submit</button> -->\n </div>\";\n } elseif ($page == 2) {\n $html = \"<button class=\\\"btn $btn_class\\\" onclick=\\\"cancel_form(true)\\\">Cancel</button>\n <button class=\\\"btn $btn_class\\\" onclick=\\\"Burn.showForm(1$c_burn_id)\\\">Back</button>\n <!-- <button class=\\\"btn $btn_class\\\" disabled=\\\"disabled\\\" onclick=\\\"\\\">Forward</button> -->\n <button class=\\\"btn $btn_class\\\" onclick=\\\"$save_function\\\">Save Draft</button>\n <button class=\\\"btn $btn_class\\\" onclick=\\\"$saveUtah_function\n \\\">Submit</button>\"\n ;\n }\n\n return $html;\n }",
"function toolBox() { ?>\n\t\t<div class=\"panel panel-default\">\n\t\t\t<div class=\"panel-heading\">\n\t\t\t\t<h3 class=\"panel-title\"><?php $this->msg('toolbox'); ?></h3>\n\t\t\t</div>\n\t\t\t<div class=\"panel-body\">\n\t\t\t\t<ul class=\"nav nav-pills nav-stacked\"><?php\n\t\t\t\t\tforeach ( $this->getToolbox() as $key => $tbitem ) {\n\t\t\t\t\t\techo $this->makeListItem($key, $tbitem);\n\t\t\t\t\t};\n\t\t\t\t\twfRunHooks('MonoBookTemplateToolboxEnd', array(&$this));\n\t\t\t\t\twfRunHooks('SkinTemplateToolboxEnd', array(&$this, true )); ?>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t</div><?php\n\t}",
"protected function addToolbar()\n\t{\t\t\n\t\t// Set toolbar items for the page\n\t\t$edit=JRequest::getVar('edit',true);\n\t\t$text=!$edit ? JText::_('COM_JOOMLEAGUE_GLOBAL_NEW') : JText::_('COM_JOOMLEAGUE_GLOBAL_EDIT');\n\t\tJLToolBarHelper::save('playground.save');\n\t\tif (!$edit)\n\t\t{\n\t\t\tJToolBarHelper::title(JText::_('COM_JOOMLEAGUE_ADMIN_PLAYGROUND_ADD_NEW'),'playground');\n\t\t\tJToolBarHelper::divider();\n\t\t\tJLToolBarHelper::cancel('playground.cancel');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// for existing items the button is renamed `close` and the apply button is showed\n\t\t\tJToolBarHelper::title(JText::_('COM_JOOMLEAGUE_ADMIN_PLAYGROUND_EDIT'),'playground');\n\t\t\tJLToolBarHelper::apply('playground.apply');\n\t\t\tJToolBarHelper::divider();\n\t\t\tJLToolBarHelper::cancel('playground.cancel','COM_JOOMLEAGUE_GLOBAL_CLOSE');\n\t\t}\n\t\tJToolBarHelper::divider();\n\t\tJLToolBarHelper::onlinehelp();\t\n\t}",
"function getHtml()\r\n\t{\r\n\t\tglobal $spaw_dir;\r\n\t\tglobal $spaw_wysiwyg_instCount;\r\n\t\tglobal $spaw_active_toolbar;\r\n\r\n\r\n\t\t$n = $this->control_name;\r\n\t\t$orn = $this->original_name;\r\n\t\t// todo: make more customizable\r\n\r\n\t\t$buf = '';\r\n\t\tif (SPAW_Util::checkBrowser())\r\n\t\t{\r\n\t\t\tif ($spaw_wysiwyg_instCount == 1)\r\n\t\t\t{\r\n\t\t\t\t$buf.= $this->getCssScript();\r\n\t\t\t}\r\n\t\t\t// theme based css file and javascript\r\n\t\t\t$buf.= '<script language=\"JavaScript\" src=\"'.$spaw_dir.'lib/themes/'.$this->theme.'/js/toolbar.js.php\"></script>';\r\n\t\t\t$buf.= '<link rel=\"stylesheet\" type=\"text/css\" href=\"'.$spaw_dir.'lib/themes/'.$this->theme.'/css/toolbar.css\">';\r\n\r\n\t\t\t$buf.= '<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"'.$this->getWidth().'\" height=\"'.$this->getHeight().'\">';\r\n\t\t\t$buf.= '<tr>';\r\n\r\n\t\t\t$buf .= '<td id=\"SPAW_'.$n.'_toolbar_top_design\" class=\"SPAW_'.$this->theme.'_toolbar\" colspan=\"3\">';\r\n\t\t\t$buf.= $this->toolbars->get('top');\r\n\t\t\t$buf .= '</td>';\r\n\r\n\t\t\t$buf .= '<td id=\"SPAW_'.$n.'_toolbar_top_html\" class=\"SPAW_'.$this->theme.'_toolbar\" colspan=\"3\" style=\"display : none;\">';\r\n\t\t\t$buf.= $this->toolbars->get('top','html');\r\n\t\t\t$buf .= '</td>';\r\n\r\n\t\t\t$buf .= '</tr>';\r\n\r\n\t\t\t$buf.= '<tr>';\r\n\r\n\t\t\t$buf.= '<td id=\"SPAW_'.$n.'_toolbar_left_design\" valign=\"top\" class=\"SPAW_'.$this->theme.'_toolbar\" >';\r\n\t\t\t$buf.= $this->toolbars->get('left');\r\n\t\t\t$buf .= '</td>';\r\n\r\n\t\t\t$buf.= '<td id=\"SPAW_'.$n.'_toolbar_left_html\" valign=\"top\" class=\"SPAW_'.$this->theme.'_toolbar\" style=\"display : none;\">';\r\n\t\t\t$buf.= $this->toolbars->get('left','html');\r\n\t\t\t$buf .= '</td>';\r\n\r\n\t\t\t$buf .= '<td align=\"left\" valign=\"top\" width=\"100%\" height=\"100%\">';\r\n\r\n\t\t\t//$buf.= '<input type=\"hidden\" id=\"'.$n.'\" name=\"'.$n.'\">';\r\n\t\t\t$buf.= '<textarea id=\"'.$n.'\" name=\"'.$orn.'\" style=\"width:'.$this->getWidth().'; height:'.$this->getHeight().'; display:none;\" class=\"SPAW_'.$this->theme.'_editarea\"></textarea>';\r\n\t\t\t$buf.= '<input type=\"hidden\" id=\"SPAW_'.$n.'_editor_mode\" name=\"SPAW_'.$n.'_editor_mode\" value=\"design\">';\r\n\t\t\t$buf.= '<input type=\"hidden\" id=\"SPAW_'.$n.'_lang\" value=\"'.$this->lang->lang.'\">';\r\n\t\t\t$buf.= '<input type=\"hidden\" id=\"SPAW_'.$n.'_theme\" value=\"'.$this->theme.'\">';\r\n\t\t\t$buf.= '<input type=\"hidden\" id=\"SPAW_'.$n.'_borders\" value=\"on\">';\r\n\r\n\t\t\t$buf.= '<iframe id=\"'.$n.'_rEdit\" style=\"width:100%; height:'.$this->getHeight().'; direction:'.$this->lang->getDir().';\" class=\"SPAW_'.$this->theme.'_editarea\" frameborder=\"no\" src=\"'.$spaw_dir.'empty.html\"></iframe><br>';\r\n\r\n\t\t\t$buf.= \"\\n<script language=\\\"javascript\\\">\\n<!--\\n\";\r\n\r\n\t\t\t$tmpstr = str_replace(\"\\r\\n\",\"\\n\",$this->getValue());\r\n\t\t\t$tmpstr = str_replace(\"\\r\",\"\\n\",$tmpstr);\r\n\t\t\t$content = explode(\"\\n\",$tmpstr);\r\n\t\t\t$plus = \"\";\r\n\t\t\tforeach ($content as $line)\r\n\t\t\t{\r\n\t\t\t\t$buf.=\"setTimeout('document.getElementById(\\\"\".$n.\"\\\").value \".$plus.\"=\\\"\".str_replace('-->','@@END_COMMENT',str_replace('<!--','@@START_COMMENT',str_replace('\"','"',str_replace(\"'\",\"\\'\",str_replace(\"\\\\\",\"\\\\\\\\\\\\\\\\\",$line))))).\"\\\\\\\\n\\\";',0);\\n\";\r\n\t\t\t\t$plus = \"+\";\r\n\t\t\t}\r\n\r\n\t\t\t$buf.=\"setTimeout('document.getElementById(\\\"\".$n.\"\\\").value = document.getElementById(\\\"\".$n.\"\\\").value.replace(/"/g,\\'\\\"\\');',0);\".\"\\n\";\r\n\t\t\t$buf.=\"setTimeout('document.getElementById(\\\"\".$n.\"\\\").value = document.getElementById(\\\"\".$n.\"\\\").value.replace(/@@START_COMMENT/g,\\'<!--\\');',0);\".\"\\n\";\r\n\t\t\t$buf.=\"setTimeout('document.getElementById(\\\"\".$n.\"\\\").value = document.getElementById(\\\"\".$n.\"\\\").value.replace(/@@END_COMMENT/g,\\'-->\\');',0);\".\"\\n\";\r\n\r\n\t\t\t// $buf.='setTimeout(\"alert(document.all.'.$n.'.value);\",0);'.\"\\n\";\r\n\r\n\t\t\t// $buf.='setTimeout(\"'.$n.'_rEdit.document.body.innerHTML += document.all.'.$n.'.value;\",0);'.\"\\n\";\r\n\r\n\t\t\t// $buf.='setTimeout(\"SPAW_toggle_borders(\\''.$n.'\\',this[\\''.$n.'_rEdit\\'].document.body,null);\",0);'.\"\\n\";\r\n\r\n\t\t\t// editor init\r\n\t\t\t$buf.='setTimeout(\"SPAW_editorInit(\\''.$n.'\\',\\''.htmlspecialchars($this->getCssStyleSheet()).'\\',\\''.$this->lang->getDir().'\\');\",0);'.\"\\n\";\r\n\r\n\t\t\t$buf.= '//--></script>';\r\n\r\n\t\t\t$buf.= '</td>';\r\n\r\n\t\t\t$buf.= '<td id=\"SPAW_'.$n.'_toolbar_right_design\" valign=\"top\" class=\"SPAW_'.$this->theme.'_toolbar\">';\r\n\t\t\t$buf.= $this->toolbars->get('right');\r\n\t\t\t$buf .= '</td>';\r\n\r\n\t\t\t$buf.= '<td id=\"SPAW_'.$n.'_toolbar_right_html\" valign=\"top\" class=\"SPAW_'.$this->theme.'_toolbar\" style=\"display : none;\">';\r\n\t\t\t$buf.= $this->toolbars->get('right','html');\r\n\t\t\t$buf .= '</td>';\r\n\r\n\t\t\t$buf.= '</tr>';\r\n\t\t\t$buf.= '<tr><td class=\"SPAW_'.$this->theme.'_toolbar\"></td>';\r\n\r\n\t\t\t$buf .= '<td id=\"SPAW_'.$n.'_toolbar_bottom_design\" class=\"SPAW_'.$this->theme.'_toolbar\" width=\"100%\">';\r\n\t\t\t$buf.= $this->toolbars->get('bottom');\r\n\t\t\t$buf .= '</td>';\r\n\r\n\t\t\t$buf .= '<td id=\"SPAW_'.$n.'_toolbar_bottom_html\" class=\"SPAW_'.$this->theme.'_toolbar\" width=\"100%\" style=\"display : none;\">';\r\n\t\t\t$buf.= $this->toolbars->get('bottom','html');\r\n\t\t\t$buf .= '</td>';\r\n\r\n\t\t\t$buf .= '<td class=\"SPAW_'.$this->theme.'_toolbar\"></td></tr>';\r\n\t\t\t$buf.= '</table>';\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t// show simple text area\r\n\t\t\t$buf = '<textarea cols=\"20\" rows=\"5\" name=\"'.$n.'\" style=\"width:'.$this->getWidth().'; height:'.$this->getHeight().'\">'.htmlspecialchars($this->getValue()).'</textarea>';\r\n\t\t}\r\n\t\treturn $buf;\r\n\t}",
"function print_admin_styles()\n {\n }",
"function drawButtonsPlanning() { \r\n global $canPlan,$showValidationButton, $planningType;?>\r\n <table>\r\n <tr>\r\n <?php \r\n if ($canPlan and ($planningType=='planning' or $planningType=='global') ) { \r\n if($showValidationButton){\r\n ?>\r\n <td colspan=\"1\" width=\"32px\">\r\n <button id=\"savePlanningButton\" dojoType=\"dijit.form.Button\" showlabel=\"false\"\r\n title=\"<?php echo i18n('validatePlanning');?>\" \r\n iconClass=\"dijitButtonIcon dijitButtonIconValidPlan\" class=\"buttonIconNewGui detailButton\">\r\n <script type=\"dojo/connect\" event=\"onClick\" args=\"evt\">\r\n\t\t showPlanSaveDates();\r\n return false; \r\n </script>\r\n </button>\r\n </td>\r\n <?php \r\n }\r\n ?>\r\n <td colspan=\"1\" width=\"32px\">\r\n <button id=\"saveBaselineButton\" dojoType=\"dijit.form.Button\" showlabel=\"false\"\r\n title=\"<?php echo i18n('savePlanningBaseline');?>\"\r\n iconClass=\"dijitButtonIcon dijitButtonIconSavePlan\" class=\"buttonIconNewGui detailButton\">\r\n <script type=\"dojo/connect\" event=\"onClick\" args=\"evt\">\r\n\t\t showPlanningBaseline();\r\n return false; \r\n </script>\r\n </button>\r\n </td>\r\n <?php \r\n }\r\n ?> \r\n <td colspan=\"1\" width=\"32px\">\r\n <button title=\"<?php echo i18n('printPlanning')?>\"\r\n dojoType=\"dijit.form.Button\"\r\n id=\"listPrint\" name=\"listPrint\"\r\n iconClass=\"dijitButtonIcon dijitButtonIconPrint\" class=\"buttonIconNewGui detailButton\" showLabel=\"false\">\r\n <script type=\"dojo/connect\" event=\"onClick\" args=\"evt\">\r\n <?php \r\n $ganttPlanningPrintOldStyle=Parameter::getGlobalParameter('ganttPlanningPrintOldStyle');\r\n if (!$ganttPlanningPrintOldStyle) {$ganttPlanningPrintOldStyle=\"NO\";}\r\n if ($ganttPlanningPrintOldStyle=='YES') {?>\r\n\t showPrint(\"../tool/jsonPlanning.php\", 'planning');\r\n <?php } else { ?>\r\n showPrint(\"planningPrint.php\", 'planning');\r\n <?php }?> \r\n </script>\r\n </button>\r\n </td>\r\n <td colspan=\"1\" width=\"32px\">\r\n <button title=\"<?php echo i18n('reportPrintPdf')?>\"\r\n dojoType=\"dijit.form.Button\"\r\n id=\"listPrintPdf\" name=\"listPrintPdf\"\r\n iconClass=\"dijitButtonIcon dijitButtonIconPdf\" class=\"buttonIconNewGui detailButton\" showLabel=\"false\">\r\n <script type=\"dojo/connect\" event=\"onClick\" args=\"evt\">\r\n var paramPdf='<?php echo Parameter::getGlobalParameter(\"pdfPlanningBeta\");?>';\r\n if(paramPdf!='false') planningPDFBox();\r\n else showPrint(\"../tool/jsonPlanning_pdf.php\", 'planning', null, 'pdf');\r\n </script>\r\n </button>\r\n </td>\r\n <?php if ($planningType=='planning' or $planningType=='global') {?>\r\n <td width=\"32px\" style=\"padding-right:10px;\">\r\n <button title=\"<?php echo i18n('reportExportMSProject')?>\"\r\n dojoType=\"dijit.form.Button\"\r\n id=\"listPrintMpp\" name=\"listPrintMpp\"\r\n iconClass=\"dijitButtonIcon dijitButtonIconMSProject\" class=\"buttonIconNewGui detailButton\" showLabel=\"false\">\r\n <script type=\"dojo/connect\" event=\"onClick\" args=\"evt\">\r\n showPrint(\"../tool/jsonPlanning.php\", 'planning', null, 'mpp');\r\n </script>\r\n </button>\r\n <input type=\"hidden\" id=\"outMode\" name=\"outMode\" value=\"\" />\r\n </td>\r\n <?php }?>\r\n </tr>\r\n </table>\r\n<?php \r\n}",
"function wpvideocoach_show_toolbar_link()\r\n{\r\n\tglobal $wpvideocoach_toolbar_link;\r\n\tif( $wpvideocoach_toolbar_link == 0){\r\n\t\techo \"checked='checked'\";\r\n\t}\r\n}",
"function _print_styles()\n {\n }",
"function beginDraw()\r\n {\r\n echo \"<script type=\\\"text/javascript\\\">\\n\";\r\n echo \" var cnv=findObj('$this->_object');\\n\";\r\n echo \" if (cnv==null) cnv=findObj('{$this->_object}_outer');\\n\";\r\n echo \" var $this->_canvas = new jsGraphics(cnv);\\n\";\r\n $this->_canvas= \" \" . $this->_canvas;\r\n }",
"protected function getJSToolbarArray() {}",
"protected function addDisplayToolbar() {\r\n\t\t$doc = JFactory::getDocument();\r\n\t\t$doc->addStyleDeclaration('.icon-48-jmap{background-image:url(\"components/com_jmap/images/icon-48-help.png\")}');\r\n\t\t$doc->addStyleDeclaration('.icon-32-config{background-image:url(\"components/com_jmap/images/icon-32-config.png\")}');\r\n\t\tJToolBarHelper::title( JText::_( 'HELP' ), 'jmap' );\r\n\t\tJToolBarHelper::custom('cpanel.display', 'config', 'config', 'CPANEL', false);\r\n\t}",
"function setElementToolbar()\n\t{\n\t\t$task = JRequest::getVar('task', '', 'method', 'string');\n\t\tJToolBarHelper::title($task == 'add' ? JText::_('ELEMENT') . ': <small><small>[ '. JText::_('NEW') .' ]</small></small>' : JText::_('ELEMENT') . ': <small><small>[ '. JText::_('EDIT') .' ]</small></small>', 'fabrik-element.png');\n\t\tJToolBarHelper::save();\n\t\tJToolBarHelper::apply();\n\t\tJToolBarHelper::cancel();\n\t}",
"protected function addToolBar() \r\n {\r\n // Ponemos el nombre del titulo de la vista y el icono que seleccionemos.\r\n JToolBarHelper::title(JText::_('Modelos de Marcas de Vehiculo'),'bookmark banners');\r\n JToolBarHelper::deleteList('', 'nodelos.delete');\r\n JToolBarHelper::editList('nodelo.edit');\r\n JToolBarHelper::addNew('nodelo.add');\r\n }",
"private function initToolbar()\n\t{\n\t\t$toolbar_btn = array();\n\t\t$toolbar_btn['save'] = array('href' => '#', 'desc' => $this->l('Save'));\n\t\treturn $toolbar_btn;\n\t}"
] |
[
"0.75918233",
"0.6468942",
"0.644945",
"0.63916373",
"0.629168",
"0.6218519",
"0.6154144",
"0.6135826",
"0.60676736",
"0.60061306",
"0.5941962",
"0.5929393",
"0.5891681",
"0.58812374",
"0.58516866",
"0.5772789",
"0.57314366",
"0.5689893",
"0.56862295",
"0.56787366",
"0.5662644",
"0.5626023",
"0.5624071",
"0.5623076",
"0.5594514",
"0.5588193",
"0.55729115",
"0.55484384",
"0.55301785",
"0.5521235"
] |
0.70597523
|
1
|
This returns the date_modified of a page
|
public function getDateModified() {
return $this->date_modified;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function get_date_modified();",
"function get_date_mod(){\n\treturn date (\"F d Y H:i:s.\", filemtime(lastModifiedInFolder(ABSPATH . 'wp-content/')));\n}",
"function get_timemodified() {\n return $this->timemodified;\n }",
"function getDateModified() {\n\t\treturn $this->_DateModified;\n\t}",
"public function getDateModified();",
"public function getModifiedDate()\n\t{\n\t\treturn $this->_mdate;\n\t}",
"public function getDateModified()\n {\n return $this->_DateModified;\n }",
"public function getDateModified()\n {\n return $this->dateModified;\n }",
"public function getModifiedAt()\n {\n return $this->getProperty(self::MODIFIED_AT);\n }",
"function getLastModifiedDate() {\n\t\treturn $this->data_array['last_modified_date'];\n\t}",
"function getLastModified() {\n\t\treturn $this->getData('lastModified');\n\t}",
"function get_page_mod_time() { \n\tdate_default_timezone_set('America/Los_Angeles');\n\n $incls = get_included_files(); \n $incls = array_filter($incls, \"is_file\"); \n $mod_times = array_map('filemtime', $incls); \n $mod_time = max($mod_times); \n\n return $mod_time; \n}",
"function get_the_modified_date($format = '', $post = \\null)\n {\n }",
"public function getModifiedStamp();",
"public function getModifiedDate() : \\DateTime {\n return $this->modifiedDate;\n }",
"public function getModifiedAt()\n {\n return $this->modifiedAt;\n }",
"public function last_modified() {\n\t\treturn $this->timestamp;\n\t}",
"public function getModifiedDate()\n {\n $this->modified_date = null;\n\n if ($this->exists === true) {\n } else {\n return;\n }\n\n if ($this->is_file === true) {\n } else {\n return;\n }\n\n $this->modified_date =\n $this->temp_files[$this->path]->year . '-' .\n $this->temp_files[$this->path]->month . '-' .\n $this->temp_files[$this->path]->day . ' ' .\n $this->temp_files[$this->path]->time;\n\n return;\n }",
"public function getModificationDate()\n {\n return $this->modificationDate;\n }",
"public function getLastModified()\n {\n return ($this->item['mtime'] ? $this->item['mtime'] : ($this->item['ctime'] ? $this->item['ctime'] : time()));\n }",
"public function getLastModificationDateTime() {\n $timestamp = $this->getUpdatedAt();\n // we don't know when the module content is updated, so we \"guess\"\n if ($this->getModule() != '') {\n $timestamp->setDate(date('Y'), date('m'), date('d'));\n }\n return $timestamp;\n }",
"public function getDateModification()\n {\n return $this->dateModification;\n }",
"public function getModificationDate() {\n return $this->modificationDate;\n }",
"private function retrieve_modified() {\n\t\t$replacement = null;\n\n\t\tif ( ! empty( $this->args->post_modified ) ) {\n\t\t\t$replacement = mysql2date( get_option( 'date_format' ), $this->args->post_modified, true );\n\t\t}\n\n\t\treturn $replacement;\n\t}",
"function getLastModified()\n {\n $this->loadStats();\n return $this->stat['mtime'];\n }",
"public function getModifiedTime()\n\t{\n\t\treturn $this->modifiedTime; \n\n\t}",
"function getModificationTime() ;",
"public function getModifiedAt();",
"public function getModifiedAt();",
"public function getModifyDate()\n {\n return $this->modifyDate;\n }"
] |
[
"0.8009395",
"0.70217323",
"0.69703156",
"0.69510144",
"0.6945405",
"0.69387305",
"0.6864403",
"0.68248636",
"0.6771027",
"0.6753807",
"0.67414176",
"0.6736892",
"0.6710283",
"0.66857374",
"0.66807216",
"0.6649478",
"0.66446185",
"0.6622537",
"0.6607237",
"0.6597128",
"0.656478",
"0.6562012",
"0.6552491",
"0.65273744",
"0.6511546",
"0.651063",
"0.6509814",
"0.64944136",
"0.64944136",
"0.64626646"
] |
0.70345086
|
1
|
This returns the date_published of a page
|
public function getDatePublished() {
return $this->date_published;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function getDatePublished() {\n\t\treturn date(\"d/m/Y\", strtotime($this->datePublished));\n\t}",
"public function _getDatePublish()\n {\n return $this->_getArticleDataVal('pubDate');\n }",
"function getDatePublished()\n {\n $datePublished = $this->get('schema:datePublished');\n return $datePublished;\n }",
"public function getPublishedAt()\n {\n if ($this->status == PageStatus::PUBLISHED && $this->publishedAt === null) {\n $this->setPublishedAt($this->getCreatedAt());\n }\n\n return $this->publishedAt;\n }",
"public function getPublishedAt()\n {\n return $this->published_at;\n }",
"public function getDatePublished(): DateTime\n {\n return $this->datePublished;\n }",
"public function getPublishedAt()\n {\n return $this->publishedAt;\n }",
"public function getPublishedAt()\n {\n return $this->publishedAt;\n }",
"public function getPublishedAt()\n {\n return $this->_publishedAt;\n }",
"public function getPublish_date() {\n return $this->publish_date;\n }",
"private function getPublishedDate(): string\n {\n if ($this->context->get('is_term')) {\n return '';\n }\n\n if (!$this->context->get('date')) {\n return '';\n }\n\n return $this->formatIso8601($this->augmented($this->context->get('date')), false);\n }",
"function get_published_date($meta_object,$time){\n $date2 = \"\";\n \n for($i=0;$i<$meta_object->length;$i++){\n $meta = $meta_object->item($i);\n if($meta->getAttribute('property')==\"article:published_time\"){\n $date = $meta->getAttribute('content');\n if(!empty($date)){\n $date1 = date_create($date);\n $date2 = date_format($date1,\"Y-m-d H:i:s\");\n return $date2;\n break;\n }\n }\n }\n if(empty($date2)){\n $date = get_webpage_date($meta_object,$time);\n return $date;\n }\n}",
"public function getPublishDateAttribute()\n {\n return $this->content->publish_date;\n }",
"public static function published()\n {\n return self::where('published', '=', true)->orderBy('published_at', 'DESC')->get();\n }",
"function getPubDate() {\n\t\treturn $this->getElementText(DOMIT_RSS_ELEMENT_PUBDATE);\n\t}",
"function getPubDate() {\n\t\treturn $this->getElementText(DOMIT_RSS_ELEMENT_PUBDATE);\n\t}",
"public function publishedPage()\n\t{\n\t\treturn $this->hasOne(Page::class, 'revision_id')->where('version', Page::STATE_PUBLISHED);\n\t}",
"public function getPublishedTime()\n {\n $this->initialRequest();\n if (isset($this->item['snippet']['publishedAt'])) {\n return date('Y-m-d H:i:s', strtotime($this->item['snippet']['publishedAt']));\n }\n else {\n $this->onApiBadInterpretation(\"snippet.publishedAt not found\");\n }\n }",
"public function getPublishedDateTime()\n {\n if (array_key_exists(\"publishedDateTime\", $this->_propDict)) {\n if (is_a($this->_propDict[\"publishedDateTime\"], \"\\DateTime\") || is_null($this->_propDict[\"publishedDateTime\"])) {\n return $this->_propDict[\"publishedDateTime\"];\n } else {\n $this->_propDict[\"publishedDateTime\"] = new \\DateTime($this->_propDict[\"publishedDateTime\"]);\n return $this->_propDict[\"publishedDateTime\"];\n }\n }\n return null;\n }",
"public function getPubDate()\n {\n return $this->_pubDate;\n }",
"public function firstPublished(): DateTimeInterface;",
"public function publishedAt()\n {\n $publishedAt = array_get($this->data, 'published_at', null);\n\n if ($publishedAt === null) {\n return trans('gzero-core::common.unknown');\n }\n\n return $publishedAt;\n }",
"public function published()\n {\n if ($this->published === null) {\n return;\n }\n\n if ($this->published->ts === null) {\n return;\n }\n\n $date = new DateTimeImmutable();\n\n return $date->setTimestamp($this->published->ts);\n }",
"private function get_article_published_date() {\n\n\t\tif ( ! $this->is_json_valid() )\n\t\t\treturn [];\n\n\t\tif ( ! ( $post = $this->get_current_post() ) ) {\n\t\t\t$this->invalidate( 'amp' );\n\t\t\treturn [];\n\t\t}\n\n\t\t$i = strtotime( $post->post_date );\n\n\t\treturn [\n\t\t\t'datePublished' => \\esc_attr( date( 'c', $i ) ),\n\t\t];\n\t}",
"public function getPublished() {\n\t\treturn $this->published;\n\t}",
"public function getPublishDateFrom();",
"public static function getPubDate()\n {\n return self::$pubDate;\n }",
"public function getPublishTime()\n {\n return $this->publish_time;\n }",
"public function getDatePubli()\r\n {\r\n return $this->datePubli;\r\n }",
"public function has_published_pages()\n {\n }"
] |
[
"0.77822345",
"0.7510975",
"0.7450933",
"0.7420373",
"0.7380542",
"0.7327413",
"0.722257",
"0.722257",
"0.72027016",
"0.7115651",
"0.700648",
"0.6992941",
"0.6836049",
"0.6760571",
"0.67370075",
"0.67370075",
"0.6684185",
"0.66363037",
"0.6633592",
"0.6600987",
"0.6567577",
"0.65673816",
"0.65533",
"0.65468305",
"0.65413636",
"0.6541289",
"0.6502853",
"0.6468769",
"0.64522964",
"0.6448453"
] |
0.77938765
|
0
|
This returns the name of the parent of a page
|
public function getParentName() {
$parent = new Page();
$parent->loadByGUID($this->parent);
return $parent->name;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"function getParentPageID () {return $this->getFieldValue ('parent_page_id');}",
"function tutv_get_parent_title( $page = null ) {\n global $post;\n\n if ( ! $page ) {\n $page = $post->ID;\n }\n\n\n if ( empty( $post->post_parent ) ) { // if there is no parent...\n return get_the_title( $post->ID ); // return the current page's title\n } else { // if there is a parent...\n return get_the_title( $post->post_parent ); // return the parent's title\n }\n}",
"public function get_plugin_parent_page(): string\n {\n return $this->plugin_parent_page;\n }",
"function get_admin_page_parent($parent_page = '')\n {\n }",
"protected function getParentPageID(){\n if( $this->displayBeneath == self::DISPLAY_PAGES_BENEATH_CURRENT ){\n return Page::getCurrentPage()->getCollectionID();\n }\n return $this->parentPageID;\n }",
"public function get_parent();",
"public function getParentName()\n {\n return $this->getParentContext()->getName();\n }",
"Public function getParentPageId() {\n\t\tif(!empty($this->parent_pageid))\n\t\t\treturn $this->parent_pageid;\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}",
"public function parent()\n\t{\n\t\tif ($this->parent_id) {\n\t\t\tif (is_null($this->parent)) {\n\t\t\t\t$parent = \\PagesRepository::retrieve($this->parent_id);\n\t\t\t\t$this->parent = \\App::make('Monal\\Pages\\Models\\FrontendPage', $parent);\n\t\t\t}\n\t\t}\n\t\treturn $this->parent;\n\t}",
"public function parent() { return $this->post->post_parent; }",
"public function getParent() {\n $parentNode = $this->getNode()->getParent();\n if (!$parentNode) {\n throw new PageException('Parent node not found (my page id is ' . $this->getId() . ')');\n }\n $parent = $parentNode->getPage($this->getLang());\n if (!$parent) {\n throw new PageException('Parent page not found (my page id is ' . $this->getId() . ')');\n }\n return $parent;\n }",
"public function getGrandparent() {\n\t\t\tglobal $db;\n\t\t\t$data = $db->get_var(\"SELECT parent FROM pages WHERE guid = (SELECT parent FROM pages where guid = '{$this->guid}')\"); \n\t\t\treturn $data;\n\t\t}",
"public function drawParent() {\n\t\t\tglobal $db;\n\t\t\t$data = $db->get_var(\"SELECT title FROM pages WHERE guid = (SELECT parent FROM pages where guid = '{$this->guid}')\"); \n\t\t\treturn $data;\n\t\t}",
"function getParent();",
"abstract protected function getParentObjectName();",
"public static function parent()\n\t{\n $label = Text::_('JPARENT');\n\n $html = <<<EOT\n<label for=\"parent\">$label</label>\n<span name=\"parent\" class=\"\" aria-hidden=\"true\"><i>Implement ViewTemplates/Common/HelperEditWidgets::parent</i></span>\nEOT;\n\n\t\treturn $html;\n }",
"abstract protected function getParentName($document);",
"abstract protected function getParentName($document);",
"function getParentText();",
"protected function retrieveParent()\n {\n }",
"function getTopParentPostTitle($myid){\n\t$mypage = get_page($myid);\n\tif ($mypage->post_parent == 0){\n\t\treturn $mypage->post_title;\n\t}\n\telse{\n\t\treturn getTopParentPostTitle($mypage->post_parent);\n\t}\n}",
"private function retrieve_parent_title() {\n\t\t$replacement = null;\n\n\t\tif ( ! isset( $replacement ) && ( ( is_singular() || is_admin() ) && isset( $GLOBALS['post'] ) ) ) {\n\t\t\tif ( isset( $GLOBALS['post']->post_parent ) && 0 !== $GLOBALS['post']->post_parent ) {\n\t\t\t\t$replacement = get_the_title( $GLOBALS['post']->post_parent );\n\t\t\t}\n\t\t}\n\n\t\treturn $replacement;\n\t}",
"public function get_parent() {\n\t\treturn $this->parent();\n\t}",
"public function getParent()\n {\n return $this->hasOne(Pages::className(), ['id' => 'parent_id']);\n }",
"public function get_parent_id() {\n\t\treturn $this->post->post_parent;\n\t}",
"function get_parent_dir() {\n $path = $_SERVER['PHP_SELF'];\n $splitPath = explode('/', $path);\n return $splitPath[1];\n }",
"public function getParentText(){\n return $this->parent_text;\n }",
"public function getParent()\n {\n return $this->Root->parentOfSection($this->URLSegment);\n }",
"public function getParentTitle()\n {\n if ($parent = $this->Parent()) {\n return $parent->Title ?: ($parent->ClassName . ' #' . $parent->ID);\n }\n }",
"protected function get_parent()\r\n {\r\n return $this->parent;\r\n }"
] |
[
"0.8002085",
"0.7823016",
"0.7768092",
"0.77258533",
"0.75647813",
"0.7255091",
"0.7178818",
"0.7154393",
"0.7059287",
"0.6985698",
"0.6977002",
"0.692844",
"0.68896395",
"0.68877876",
"0.6795023",
"0.6784463",
"0.6783235",
"0.6783235",
"0.6779118",
"0.6776789",
"0.67319155",
"0.6716718",
"0.6691743",
"0.66872996",
"0.66734314",
"0.6672054",
"0.6654913",
"0.665411",
"0.6634114",
"0.66177744"
] |
0.88501734
|
0
|
16/12/2008 Phil Redclift Release a users lock on a page by deleting the lock guid
|
public function releaseLock($user_id) {
global $db;
$query = "UPDATE users SET lock_guid='' WHERE id=$user_id";
//print "$query<br>\n";
if ($db->query($query)) {
$_SESSION['treeline_user_lock_guid']='';
return true;
}
return false;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"function lock_release($name) {\n global $locks;\n\n unset($locks[$name]);\n db_delete('semaphore')\n ->condition('name', $name)\n ->condition('value', _lock_id())\n ->execute();\n}",
"protected function releaseLock() \n {\n $log = FezLog::get();\n $db = DB_API::get();\n \n $sql = \"DELETE FROM \".$this->_dbtp.\"locks WHERE \".$this->_dblp.\"name=?\";\n try {\n $db->query($sql, $this->_lock);\n }\n catch(Exception $ex) {\n $log->err($ex);\n $log->err(array(\"Queue releaseLock failed\", $res));\n } \n }",
"protected function RemoveLock()\n {\n if (false === isset($_SERVER['HTTP_REFERER']) || empty($_SERVER['HTTP_REFERER'])) {\n return;\n }\n $sReferer = $_SERVER['HTTP_REFERER'];\n if (false === stristr($sReferer, 'pagedef=tableeditor')) {\n return;\n }\n $aURLParts = parse_url($sReferer);\n if (false === isset($aURLParts['query']) || empty($aURLParts['query'])) {\n return;\n }\n $sLastOpenRecordID = null;\n $sLastOpenTableID = null;\n\n $aParams = explode('&', $aURLParts['query']);\n foreach ($aParams as $sParam) {\n if ('id=' === substr($sParam, 0, 3)) {\n $sLastOpenRecordID = substr($sParam, 3);\n } elseif ('tableid=' === substr($sParam, 0, 8)) {\n $sLastOpenTableID = substr($sParam, 8);\n }\n }\n\n if (null === $sLastOpenRecordID || null === $sLastOpenTableID) {\n return;\n }\n $oTableEditor = new TCMSTableEditorManager();\n if ($oTableEditor->Init($sLastOpenTableID, $sLastOpenRecordID)) {\n $oTableEditor->RemoveLock();\n }\n }",
"private function unlockByIdUser($data)\n {\n $sql = \"DELETE FROM {$this->config->dbTablePrefix}keyword_lock\n WHERE `by_id_user`={$data['id_user']}\";\n\n $this->model->dba->query($sql); \n }",
"function wp_ajax_wp_remove_post_lock()\n {\n }",
"function unlockCacheObject ()\n {\n return unlink($this->cacheObjectId.'.lock');\n }",
"private function unlock() {\n\t\tif (file_exists($this -> lockfile)) {\n\t\t\tunlink($this -> lockfile);\n\t\t}\n\t}",
"function lock_release_all($lock_id = NULL) {\n global $locks;\n\n $locks = array();\n if (empty($lock_id)) {\n $lock_id = _lock_id();\n }\n db_delete('semaphore')\n ->condition('value', $lock_id)\n ->execute();\n}",
"abstract protected function releaseLock($name);",
"public function unlock(): void;",
"private function releaseLockScript(): string\n {\n return <<<'LUA'\nif redis.call(\"get\",KEYS[1]) == ARGV[1] then\n return redis.call(\"del\",KEYS[1])\nelse\n return 0\nend\nLUA;\n }",
"public function unlock(): void {}",
"public function unlock(): void {}",
"public function unlock(): void {}",
"public function unlock(): void {}",
"public function unlock(): void {}",
"public function unlock($uri, Sabre_DAV_Locks_LockInfo $lockInfo)\n {\n $query = 'DELETE FROM '. $this->DB->Tbl['core_lock'].' WHERE `uri`=\"'.$this->DB->esc($uri).'\" AND `token`=\"'.$this->DB->esc($lockInfo->token).'\"';\n return $this->DB->query($query);\n }",
"public function unlockSite() {\n\t\tif (is_resource($this->lockResource)) {\n\t\t\tflock($this->lockResource, LOCK_UN);\n\t\t\tfclose($this->lockResource);\n\t\t}\n\t\t@unlink($this->lockFlagPathAndFilename);\n\t}",
"public function release() {\n $this->locked = 0;\n $this->save();\n }",
"public function release() {\n $this->locked = 0;\n $this->save();\n }",
"function lockout($username = \"\") {\n\t\tglobal $wpdb;\n\n\t\t$ip = $this->get_user_ip();;\n\n\t\t$username = sanitize_user($username);\n\n\t\t$user = get_user_by( 'login', $username );\n\n\t\tif ( !$user ) { \n\t\t\t$user = new stdClass();\n\t\t\t$user->ID = 0;\n\t\t}\n\n\t\t$sql = \"insert into \" . $this->lock_table . \" (user_id, lockdown_date, release_date, lockdown_IP) \" .\n\t\t\t \"values ('\" . $user->ID . \"', NOW(), date_add( NOW(), interval \" .\n\t\t\t $this->ll_options['lockout_length'] . \" MINUTE), '\" . $wpdb->escape($ip) . \"')\";\n\n\t\t$wpdb->query($sql);\n\n\t\tif ( 'yes' == $this->ll_options['notify_admins'] )\n\t\t\t$this->ll_notify_admins( $ip, $username );\n\n\t}",
"function free_lock(string $key): void\n{\n $logger = \\Logger::getLogger(\"files.lock\");\n $lockfn = get_lock_filename($key);\n $logger->debug(\"Free lock '$key'\");\n if (!unlink($lockfn)) {\n $logger->error(\"Error unlocking $key\");\n }\n}",
"public function releaseLock($lockstr)\n {\n if ($this->validateLock($lockstr)) {\n self::$db->query('UPDATE jukebox.playlists SET locktime=NULL WHERE playlistid=$1', [$this->getID()]);\n }\n }",
"function db_killAuthUser($userid)\n{\n $userid = db_esc($userid);\n db_run(\"DELETE FROM \".TBL_AUTH.\" WHERE userid='$userid'\");\n}",
"public function releaseLocks()\n {\n foreach ($this->lockedKeys as $key => $value) {\n self::appRelease($key);\n }\n }",
"public function testLockReleaseFailsNotLockedAnymore() {\n\n\t\t\t$lockName = uniqid();\n\n\t\t\tSharedLock::lock($lockName, 0, 10);\n\n\t\t\t// simulate that the database lock was not hold\n\t\t\tif ($this->sqlExecute('DELETE FROM ' . SharedLock::getTable() . ' WHERE name = :name', [':name' => $lockName])->rowCount() != 1) {\n\t\t\t\t$this->fail('Test-Scenario-Error: Simulating lock deleted failed');\n\t\t\t}\n\n\t\t\t$this->setExpectedException(SharedLockReleaseException::class);\n\n\t\t\tSharedLock::unlock($lockName);\n\t\t}",
"private function removeLock($key) {\n @apc_delete($key . '.lock');\n }",
"public function appRelease($id)\n {\n unset($this->lockedKeys[$id]);\n\n try {\n AppLockQuery::create()->filterById($id)->delete();\n dbDelete('system_app_lock', array('id' => $id));\n } catch (\\Exception $e) {\n }\n }",
"public function unlockCommand() {\n\t\tif (@is_file((PATH_typo3conf . 'LOCK_BACKEND'))) {\n\t\t\tunlink(PATH_typo3conf . 'LOCK_BACKEND');\n\t\t\tif (@is_file((PATH_typo3conf . 'LOCK_BACKEND'))) {\n\t\t\t\t$message = 'ERROR: Could not remove lock file \\'typo3conf/LOCK_BACKEND\\'!';\n\t\t\t\t$this->outputLine($message);\n\t\t\t\t$this->logger->error($message);\n\t\t\t\t$this->quit(1);\n\t\t\t} else {\n\t\t\t\t$message = 'Removed lock file \\'typo3conf/LOCK_BACKEND\\'';\n\t\t\t\t$this->outputLine($message);\n\t\t\t\t$this->logger->info($message);\n\t\t\t}\n\t\t} else {\n\t\t\t$message = 'No lock file \\'typo3conf/LOCK_BACKEND\\' was found, hence no lock could be removed.';\n\t\t\t$this->outputLine($message);\n\t\t\t$this->logger->info($message);\n\t\t\t$this->quit(1);\n\t\t}\n\t}",
"public function release($lockHandle);"
] |
[
"0.6717426",
"0.6452282",
"0.6364582",
"0.6297931",
"0.62368417",
"0.61703473",
"0.6117142",
"0.61101866",
"0.6092446",
"0.60086566",
"0.5928569",
"0.59093606",
"0.59093606",
"0.59093606",
"0.59093606",
"0.59093606",
"0.588403",
"0.5847837",
"0.5845838",
"0.5845838",
"0.5840645",
"0.5836085",
"0.5771982",
"0.5748132",
"0.5739434",
"0.57340544",
"0.5726755",
"0.570592",
"0.570579",
"0.5686439"
] |
0.67573214
|
0
|
22nd Jan 2009 Phil Redclift Check if a particular guid has been locked for edit (by a set user)
|
public function LockedForEdit($guid, $user_id=0) {
global $db;
$query="SELECT id FROM users WHERE lock_guid='$guid' ";
if ($user_id>0) $query.="AND id=".$user_id;
return $db->get_var($query);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"abstract public function canEdit($user_guid = 0);",
"public function isLocked();",
"public function isLocked();",
"public function isLocked();",
"public function canEdit()\n {\n return $this->is_locked == 0;\n }",
"public function isLocked() {}",
"public function systemIsLocked($element, $user_id){\n\t\t\tif ($element){\n\t\t\t\t$oPage = $element->getObject();\n\t\t\t\t$lockTime = $oPage->getValue(\"locktime\");\n\t\t\t\t$lockUser = $oPage->getValue(\"lockuser\");\n\t\t\t\tif ($lockTime == null || $lockUser == null){\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t$lockDuration = regedit::getInstance()->getVal(\"//settings/lock_duration\");\n\t\t\t\tif (($lockTime->timestamp + $lockDuration) > time() && $lockUser!=$user_id){\n\t\t\t\t\treturn true;\n\t\t\t\t}else{\n\t\t\t\t\t$oPage->setValue(\"lockuser\", null);\n\t\t\t\t\t$oPage->setValue(\"locktime\", null);\n\t\t\t\t\t$oPage->commit();\n\t\t\t\t\t$element->commit();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"function document_locked($table, $id, &$vusername, &$vuserid){\n \t\t\tglobal $database;\n \t\t\t\n\t\t\t$vuserid = 0;\n\t\t\t$vusername = \"\";\n\t\t\t\n\t\t\t$sql = \"SELECT \n\t\t\t\t\t\t\t\tlockedby_user_id, user_name\n\t\t\t\t\t FROM \n\t\t\t\t\t \t\t\t`$table` d, users u\n\t\t\t\t\t WHERE \n\t\t\t\t\t \t\t\td.id=$id AND \n\t\t\t\t\t\t\t d.lockedby_user_id = u.id AND \n\t\t\t\t\t\t\t u.id;\";\t\t\t\t\t\t\t\t \t\t \n\t\t\t$ret = $database->query($sql);\n\t\t\t\n\t\t\tif (!$ret || !$ret->num_rows){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\t$row = $ret->fetch_array();\n\t\t\t\n\t\t\t$vuserid = $row['lockedby_user_id'];\n\t\t\t$vusername = $row['user_name'];\n\t\t\t \n\t\t\treturn true;\n }",
"public function hasUnlock(){\n return $this->_has(3);\n }",
"function auth_can_edit_user($user, $target)\n{\n global $min_user_editing_level;\n \n // Always allowed to modify your own stuff\n if(strcasecmp($user, $target) == 0)\n {\n return 1;\n }\n\n if(authGetUserLevel($user) >= $min_user_editing_level)\n {\n return 1;\n }\n\n // Unathorised access\n return 0;\n}",
"function IsRecordEditable($values, $isEditable)\n{\n\n\t\t\n\n$lkd=$values[\"Locked\"];\n\nif($lkd==1) {\n\nreturn $isEditable=false;\n\n}\n\nelse return $isEditable=true;\n;\t\t\n}",
"public function ownsLock()\n {\n return $this->owner() === $this->id;\n }",
"protected function editLockPermissions() {}",
"public function isLocked()\n {\n return !!$this->special;\n }",
"private function isLocked() {\n return true === $this->status->is_locked;\n }",
"function is_contest_modifiable($cid) {\n if (is_admins())\n return true;\n if (is_manager()) {\n // This is a manager. \n $contest = new ContestsTbl($cid);\n if (!$contest->Get())\n return false;\n if (!$contest->detail['avail'])\n return false;\n $perm = $contest->detail['perm'];\n if ($perm == \"user\" || $perm == 'manager' || $perm == 'temp') {\n global $login_uid;\n return ($contest->detail['owner'] == $login_uid);\n }\n }\n return false;\n}",
"function canEdit() {\r\n\t\t$user\t=& JFactory::getUser();\r\n\r\n\t\tif (!JAccess::check($user->id, 'core.admin', 'root.1')) {\r\n\t\t\t\t$permission = FlexicontentHelperPerm::getPerm();\r\n\t\t\t\t$id = $this->getState($this->getName().'.id');\r\n\t\t\t\tif ($id) {\r\n\t\t\t\t\t$rights \t= FlexicontentHelperPerm::checkAllItemAccess($uid, 'item', $id);\r\n\t\t\t\t\t$canEdit \t= in_array('flexicontent.editall', $rights) || $permission->CanEdit;\r\n\t\t\t\t\t$canEditOwn\t= (in_array('flexicontent.editown', $rights) && ($item->created_by == $user->id));\r\n\t\t\t\t\tif ($canEdit || $canEditOwn) return true;\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"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}",
"private function is_locked(){\n\t\t//return $batch_txt_file_object->exists();\n\t\treturn \"no\";\n\t\t\n\t}",
"function EditITEMPermissionCheck($link, $data){\n if ($data['admin'] == 1){\n //echo 'allowed';\n return;\n }\n $index = array_search ($data['club_year_id'], $data['permissions']['club_year_id_array']);\n if ( $index === FALSE ){\n $returnData['errcode'] = 4;\n //TODO proper code\n $returnData['errno'] = 4000;\n $returnData['errstr'] = \"User is not associated with Club\";\n exitfnc($returnData);\n }\n}",
"function check_user() {\n\treturn false; // update allowed\n\treturn true; //no update allowed\n}",
"private function UserCanEditTask($taskId)\r\n {\r\n $task = $this->TaskModel->getTask($taskId);\r\n if(!empty($task['users'])) {\r\n if ($task['IdUser'] == $this->userId)\r\n return true;\r\n }\r\n return false;\r\n }",
"function is_course_modifiable($course_id) {\n if (is_admins())\n return true;\n if (is_manager()) {\n // This is a manager. \n $courseTbl = new CourseTbl($course_id);\n if (!$courseTbl->Get())\n return false;\n if (!$courseTbl->detail['avail'])\n return false;\n global $login_uid;\n return ($courseTbl->detail['owner'] == $login_uid);\n }\n return false;\n}",
"public function isEditable(User $u){\n\t\t\tif( $u->id == $this->user->id){\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"function canEdit($user) {\n if($user->getId() == $this->getId()) {\n return true; // user can change his own account\n } // if\n\n return $user->isCompanyManager($this->getCompany());\n }",
"public function test_manual_field_is_view_or_editable_with_pm_using_invalid_entity_id() {\n global $DB, $CFG;\n\n // Skip test if elis/program doesn't exist.\n if (!file_exists($CFG->dirroot.'/elis/program/lib/setup.php')) {\n $this->markTestSkipped('Requires elis/program to be installed.');\n }\n\n $this->resetAfterTest(true);\n $this->load_libraries_for_additional_tests();\n // Load CSV data.\n $this->load_csv_data();\n\n // Setup place holders for capabilities.\n $editcap = 'elis/program:user_edit';\n $viewcap = 'elis/program:user_view';\n\n // Retrieve the PM user id to be assigned to a userset.\n $param = array('id' => 103);\n $pmuserinusersetid = $DB->get_field('crlm_user', 'id', $param);\n\n // Get the userset context.\n $usersetcontext = context_elis_userset::instance(1);\n // System context.\n $syscontext = context_system::instance();\n\n $field = new field(array('id' => 101));\n $field->load();\n\n $result = manual_field_is_view_or_editable($field, $syscontext, $editcap, $viewcap, 'user', '99999');\n\n $this->assertEquals(MANUAL_FIELD_NO_VIEW_OR_EDIT, $result);\n }",
"public function getLock($user_id, $guid) {\n\t\t\tglobal $db;\n\t\t\tif ($user_id>0 && $guid>'') {\n\t\t\t\t\n\t\t\t\t// Check this page is not already locked by anyone else\n\t\t\t\t$query = \"SELECT u.full_name FROM users u\n\t\t\t\t\tWHERE u.lock_guid='$guid' AND u.lock_time > NOW() - INTERVAL 1 HOUR\n\t\t\t\t\tAND u.id != $user_id\";\n\t\t\t\t//print \"$query<br>\\n\";\n\t\t\t\tif (($lock_user=$db->get_var($query))>'') {\n\t\t\t\t\treturn $lock_user;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Attempt to get a lock\n\t\t\t\t$query = \"UPDATE users SET lock_guid='$guid', lock_time=NOW() where id=$user_id\";\n\t\t\t\t//print \"$query<br>\\n\";\n\t\t\t\tif ($db->query($query)) return 0;\n\t\t\t\telse return \"LF - error code: 332\";\n\t\t\t}\n\t\t\treturn \"LF - error code: 942\";\n\t\t}",
"public function doesCheckModifyAccessListHookModifyAccessAllowed() {}",
"function user_can_edit_user($user_id, $other_user)\n {\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}"
] |
[
"0.72576684",
"0.6634916",
"0.6634916",
"0.6634916",
"0.6627747",
"0.6461544",
"0.6289371",
"0.6276954",
"0.6260726",
"0.6249591",
"0.6221206",
"0.616779",
"0.6150013",
"0.6136446",
"0.61234426",
"0.6083614",
"0.60541",
"0.6047813",
"0.6045949",
"0.6023215",
"0.6020562",
"0.5992229",
"0.5988868",
"0.5979793",
"0.5957252",
"0.59556615",
"0.59289783",
"0.5912232",
"0.59108746",
"0.5901952"
] |
0.755736
|
0
|
This returns the title of the page specified by GUID
|
public function drawTitleByGUID($guid) {
global $db;
$data = $db->get_var("SELECT title FROM pages WHERE guid = '$guid'");
return $data;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function getPageTitle(): string;",
"static public function getTitle() {\n\t\treturn self::$page_title;\n\t}",
"function get_page_title()\n {\n return $this->object->name;\n }",
"abstract protected function getPageTitle(): string;",
"private function getPageTitle() {\n return $this->pageTitle;\n }",
"protected function getPageTitle() {\r\n\t\treturn $this->pageTitle;\r\n\t}",
"public function get_title();",
"public function title() {\n\t\tif ( ! is_object( $this->object ) ) {\n\t\t\treturn esc_html__( 'Page not found', 'nhg-seo' );\n\t\t}\n\n\t\t$title = Strategy::get_from_meta( 'post', $this->object->ID, $this->object, 'title' );\n\t\tif ( \\is_string( $title ) && '' !== $title ) {\n\t\t\treturn $title;\n\t\t}\n\n\t\treturn Strategy::get_title( 'post', $this->object->post_type, $this->object );\n\t}",
"public function getPageTitle() {\r\n\t\t$config = $this->getConfig();\r\n return $config[\"title\"];\r\n }",
"public static function find_title()\n {\n $page = self::get_if_account_page_exists();\n\n return $page->Title;\n }",
"public function get_page_title() {\n return $this->get_string('page_title');\n }",
"public function get_page_title() {\n\n\t\tob_start();\n\n\t\t$this->output_page_title();\n\t\t$this->output_vendor_info();\n\n\t\treturn ob_get_clean();\n\t}",
"public function getPageTitle()\n {\n return $this->page_title;\n }",
"public function getPageTitle()\n {\n $element = $this->query('title')->first();\n if ($element) {\n return $element->text();\n }\n\n return '';\n }",
"function getDataTitle($data)\n{\n\t\t$dataTitle = getData($data, \"Page/Title\");\n\t\treturn $dataTitle[0];\n}",
"public function getPageTitle() {\n\t\treturn $this->pageTitle;\n\t}",
"public function getMetaTitle();",
"function get_the_title() {\n\n md_get_the_title();\n \n }",
"public static function get_page_title() {\n\t\t// Set the current page of the WP query since it's used by SEO plugins.\n\t\tglobal $wp_query, $page;\n\t\t$oldPage = $wp_query->get( 'page' );\n\t\tif ( $page > 1 ) {\n\t\t\t$wp_query->set( 'page', $page );\n\t\t} else {\n\t\t\t$wp_query->set( 'page', null );\n\t\t}\n\n\t\t// Get the title.\n\t\t$title = self::get_page_titleHelper();\n\t\t$title = html_entity_decode( $title, ENT_QUOTES, 'UTF-8' );\n\n\t\t// Set back the current page.\n\t\t$wp_query->set( 'page', $oldPage );\n\n\t\t// Return the title.\n\t\treturn $title;\n\t}",
"function GetTitle() {\r\n global $PageTitle;\r\n if (isset($PageTitle)){echo $PageTitle;}else{echo 'BHM Accessories';}\r\n }",
"private static final function getPageTitle () {\r\n // Execute the <title tag> .tp file;\r\n $webHeaderString = new FileContent (FORM_TP_DIR . _S . 'frm_web_header_title.tp');\r\n return $webHeaderString->doToken ('[%TITLE_REPLACE_STRING%]',\r\n implode (_DCSP, ((self::$objPageTitleBackward->toInt () == 1) ? (self::$objPageTitle->arrayReverse ()->toArray ()) :\r\n self::$objPageTitle->toArray ())));\r\n }",
"function getPageTitle() {\n return $this->title;\n }",
"public function title() { \n $title = $this->content()->get('title');\n if($title != '') {\n return $title;\n } else {\n $title->value = $this->uid();\n return $title;\n }\n }",
"public function _GetPageTitle() {\n\t\t$page_title = 'Shirtswithstamps: T-Shirts with stamps for every ocassion';\n\t\t\n\t\tif (isset($_GET['DepartmentId']) && isset($_GET['CategoryId'])) {\n\t\t\t$page_title = Catalog::GetDepartmentName($_GET['DepartmentId']).' » '.Catalog::GetCategoryName($_GET['CategoryId']).' - Shirts With Stamps';\n\t\t\t\n\t\tif (isset($_GET['Page']) && ((int)$_GET['Page']) > 1)\n\t\t\t$page_title = Catalog::GetDepartmentName($_GET['DepartmentId']).' » '.Catalog::GetCategoryName($_GET['CategoryId']).' - Page '.((int)$_GET['Page']).' - Shirtswithstamps';\t\n\t\t}\n\t\t\n\t\telseif (isset($_GET['DepartmentId'])) {\n\t\t\t$page_title = Catalog::GetDepartmentName($_GET['DepartmentId']).' - Shirts With Stamps';\n\t\t\t\n\t\t\tif (isset($_GET['Page']) && ((int)$_GET['Page']) > 1)\n\t\t\t\t$page_title = Catalog::GetDepartmentName($_GET['DepartmentId']).' - Page '.((int)$_GET['Page']).' - Shirts With Stamps';\n\t\t}\n\t\t\n\t\telseif (isset($_GET['ProductId'])) {\n\t\t\t$page_title = Catalog::GetProductName($_GET['ProductId']).' - Shirts With Stamps';\n\t\t}\n\t\t\n\t\telseif (isset($_GET['SearchResults'])) {\n\t\t\t$page_title = '';\n\t\t\t\n\t\t\t// Display the search string\n\t\t\t$page_title = trim(str_replace('-', ' ', $_GET['SearchString'])).' (';\n\t\t\t\n\t\t\t// Display 'all-words' search or 'any-words' search\n\t\t\t$all_words = isset($_GET['AllWords']) ? $_GET['AllWords'] : 'off';\n\t\t\t\n\t\t\t$page_title .= (($all_words == 'on') ? 'all' : 'any').'-words search';\n\t\t\t\n\t\t\t// Display the page number\n\t\t\tif (isset($_GET['Page']) && ((int)$_GET['Page'] < 1))\n\t\t\t\t$page_title .= ', page '.((int)$_GET['Page']);\n\t\t\t\t\n\t\t\t$page_title .= ')';\n\t\t}\n\t\t\n\t\telse {\n\t\t\tif (isset($_GET['Page']) && ((int)$_GET['Page']) > 1)\n\t\t\t\t$page_title .= ' - Page '.((int)$_GET['Page']);\n\t\t}\n\t\t\n\t\treturn $page_title;\n\t}",
"protected function renderPageTitle() {}",
"public function getPageTitle() {\n return $this->configuration['page_title'];\n }",
"private static function get_page_titleHelper() {\n\t\tglobal $wpseo_front;\n\t\tif (\n\t\t\tisset( $wpseo_front ) &&\n\t\t\tmethod_exists( $wpseo_front, 'title' )\n\t\t) {\n\t\t\treturn $wpseo_front->title( '', false );\n\t\t}\n\n\t\t// If the SEO Ultimate plugin is active and compatible.\n\t\tglobal $seo_ultimate;\n\t\tif (\n\t\t\tisset( $seo_ultimate ) &&\n\t\t\tproperty_exists( $seo_ultimate, 'modules' ) &&\n\t\t\tisset( $seo_ultimate->modules['titles'] ) &&\n\t\t\tmethod_exists( $seo_ultimate->modules['titles'], 'get_title' )\n\t\t) {\n\t\t\t@$title = $seo_ultimate->modules['titles']->get_title();\n\n\t\t\treturn $title;\n\t\t}\n\n\t\t// If all else fails, return the standard WordPress title. Unfortunately, most theme hard-code their <title> tag.\n\t\treturn wp_title( '', false );\n\t}",
"public function get_title () {\r\n\t\treturn $this->get_info()['title'];\r\n\t}",
"private function _get_page_title($url)\n\t{\n\t\t$page_title = 'Not defined.';\n\t\t\n\t\tif (isset($url))\n\t\t{\n\t\t\t$page_title = $url;\n\t\t\n\t\t\t//Initialize the Curl session \n\t\t\t$ch = curl_init(); \n\t\t\n\t\t\t//Set curl to return the data instead of printing it to the browser. \n\t\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); \n\t\t\n\t\t\t//Set the URL \n\t\t\tcurl_setopt($ch, CURLOPT_URL, $url); \n\t\t\n\t\t\t//Execute the fetch \n\t\t\t$page_title = curl_exec($ch); \n\t\t\n\t\t\t//Close the connection\n\t\t\tcurl_close($ch);\n\t\t\n\t\t\tpreg_match(\"#<title>(.+)<\\/title>#iU\", $page_title, $title);\n\t\t\n\t\t\tif (isset($title[1]))\n\t\t\t{\n\t\t\t\t$page_title = $title[1];\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $page_title;\n\t}",
"public function getTitle()\n {\n $list = $this->getPages();\n\n return isset($list[$this->page])\n ? $list[$this->page]\n : '';\n }"
] |
[
"0.729507",
"0.6987124",
"0.69545066",
"0.69179815",
"0.6849779",
"0.68297803",
"0.6811563",
"0.67787707",
"0.67768097",
"0.6758536",
"0.67577624",
"0.67433643",
"0.6734872",
"0.67278963",
"0.6722135",
"0.67178434",
"0.6710486",
"0.67103434",
"0.6688377",
"0.6680606",
"0.6668838",
"0.66376346",
"0.6622304",
"0.66088384",
"0.66055125",
"0.65997475",
"0.65992427",
"0.65963566",
"0.65638906",
"0.65339375"
] |
0.7988288
|
0
|
This returns the parent of the page specified by the GUID
|
public function getParentByGUID($guid) {
global $db;
$query = "SELECT parent FROM pages WHERE guid = '$guid'";
$data = $db->get_var($query);
return $data;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"function getParentPageID () {return $this->getFieldValue ('parent_page_id');}",
"protected function getParentPageID(){\n if( $this->displayBeneath == self::DISPLAY_PAGES_BENEATH_CURRENT ){\n return Page::getCurrentPage()->getCollectionID();\n }\n return $this->parentPageID;\n }",
"public function getGrandparent() {\n\t\t\tglobal $db;\n\t\t\t$data = $db->get_var(\"SELECT parent FROM pages WHERE guid = (SELECT parent FROM pages where guid = '{$this->guid}')\"); \n\t\t\treturn $data;\n\t\t}",
"Public function getParentPageId() {\n\t\tif(!empty($this->parent_pageid))\n\t\t\treturn $this->parent_pageid;\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}",
"public function getParent() {\n $parentNode = $this->getNode()->getParent();\n if (!$parentNode) {\n throw new PageException('Parent node not found (my page id is ' . $this->getId() . ')');\n }\n $parent = $parentNode->getPage($this->getLang());\n if (!$parent) {\n throw new PageException('Parent page not found (my page id is ' . $this->getId() . ')');\n }\n return $parent;\n }",
"public function drawGrandparentByGUID($guid) {\n\t\t\tglobal $db;\n\t\t\t$data = $db->get_var(\"SELECT parent FROM pages WHERE guid = '{$this->getParentByGUID($guid)}'\");\n\t\t\treturn $data;\n\t\t}",
"public function getChildByGUID($guid) {\n\t\t\tglobal $db;\n\t\t\t$data = $db->get_var(\"SELECT guid FROM pages WHERE parent = '$guid'\");\n\t\t\treturn $data;\n\t\t}",
"public function getParentName() {\n\t\t\t$parent = new Page();\n\t\t\t$parent->loadByGUID($this->parent);\n\t\t\treturn $parent->name;\n\t\t}",
"public function parent()\n\t{\n\t\tif ($this->parent_id) {\n\t\t\tif (is_null($this->parent)) {\n\t\t\t\t$parent = \\PagesRepository::retrieve($this->parent_id);\n\t\t\t\t$this->parent = \\App::make('Monal\\Pages\\Models\\FrontendPage', $parent);\n\t\t\t}\n\t\t}\n\t\treturn $this->parent;\n\t}",
"function get_admin_page_parent($parent_page = '')\n {\n }",
"public function getParent() : ?Page\n {\n $key = $this->getParentId();\n\n if (empty($key)) {\n return null;\n }\n\n return Page::Store()->getById($key);\n }",
"public function getParent()\n {\n return $this->hasOne(Pages::className(), ['id' => 'parent_id']);\n }",
"public function get_parent();",
"function get_top_parent_ID($id){\n\t$page = get_page($id);\n\t$id = $page->post_parent;\n\t$parent = get_page($id);\n\t\n\tif ($parent->post_parent == 0){\n\t\treturn $id;\n\t}\n\telse{\n\t\treturn get_top_parent_ID($id);\n\t}\n}",
"public function getParent()\n {\n return $this->Root->parentOfSection($this->URLSegment);\n }",
"function _wswwpx_page_get_parent_id ( $child = 0 ) {\n\tglobal $wpdb;\n\t// Make sure there is a child ID to process\n\tif ( $child > 0 ) {\n\t\t$result = $wpdb->get_var(\"\n\t\t\t\t\t\t\t\t\tSELECT post_parent\n\t\t\t\t\t\t\t\t\t\tFROM $wpdb->posts\n\t\t\t\t\t\t\t\t\t\tWHERE ID = $child\");\n\t} else {\n\t\t// ... or set a zero result.\n\t\t$result = 0;\n\t}\n\t//\n\treturn $result;\n}",
"public function getParentEntity() {\n\t\treturn get_entity($this->getParentGUID());\n\t}",
"public function getParentEntry(){\r\n\r\n $url_parts = explode('/', $this->url);\r\n\r\n $size = count($url_parts);\r\n\r\n\r\n\r\n #Remove collection id and slash from end of url\r\n\r\n $url = substr($this->url, 0, -strlen($url_parts[$size-1])-1);\r\n\r\n\r\n\r\n try {\r\n\r\n $data = $this->adapter->request('GET', $url);\r\n\r\n return new AWeberEntry($data, $url, $this->adapter);\r\n\r\n } catch (Exception $e) {\r\n\r\n return NULL;\r\n\r\n }\r\n\r\n }",
"public function drawParent() {\n\t\t\tglobal $db;\n\t\t\t$data = $db->get_var(\"SELECT title FROM pages WHERE guid = (SELECT parent FROM pages where guid = '{$this->guid}')\"); \n\t\t\treturn $data;\n\t\t}",
"public function get_parent_id() {\n\t\treturn $this->post->post_parent;\n\t}",
"public function parent(){\n return $this->where('id', $this->parent_id)->first();\n }",
"public static function findParentPageID($pageId)\r\n {\r\n $lang = Zend_Registry::get(\"languageID\");\r\n $parentArray = new Pages();\r\n\r\n $select = $parentArray->select()\r\n ->setIntegrityCheck(false)\r\n ->from('Pages')\r\n ->joinLeft('PagesIndex', 'PI_PageID = P_ID')\r\n ->where('Pages.P_ID = ?', $pageId)\r\n ->where('PagesIndex.PI_LanguageID = ?', $lang);\r\n\r\n return $parentArray->fetchRow($select);\r\n }",
"function get_parent($type) {\n $relationships = get_field('post_detail_page_relationship', 'option');\n $parent = null;\n foreach ($relationships as $relationship) {\n if ($relationship['post_type'] === $type) {\n return $relationship['detail_page'];\n }\n }\n}",
"function get_post_parent($post = \\null)\n {\n }",
"public function retrieveParent() {\n $prepare = $this->database->prepare(\"\n SELECT parent_object\n FROM manuscripts\n WHERE collection = :collection\n AND pointer = :pointer\n LIMIT 1\n \");\n\n $prepare->execute(array(\n \":collection\" => $this->collection,\n \":pointer\" => $this->pointer\n ));\n\n return $prepare->fetchColumn();\n }",
"function getTopParentPostID($myid){\n\t$mypage = get_page($myid);\n\tif ($mypage->post_parent == 0){\n\t\treturn $mypage->ID;\n\t}\n\telse{\n\t\treturn getTopParentPostID($mypage->post_parent);\n\t}\n}",
"public function getParentId();",
"public function getParentId();",
"public function getParentId();",
"public function getParent() {\r\n\t\tif ($this->pzkParentId) {\r\n\t\t\treturn pzk_store_element($this->pzkParentId);\r\n\t\t}\r\n\t\treturn NULL;\r\n\t}"
] |
[
"0.776622",
"0.75383466",
"0.7320044",
"0.7288367",
"0.712744",
"0.71237224",
"0.70921963",
"0.70898247",
"0.70707995",
"0.7042733",
"0.7019372",
"0.695073",
"0.69148016",
"0.66854084",
"0.6648798",
"0.66443074",
"0.6612277",
"0.6608355",
"0.65825313",
"0.65469617",
"0.6534154",
"0.6528675",
"0.6521656",
"0.6491457",
"0.6489843",
"0.6483542",
"0.6482328",
"0.6482328",
"0.6482328",
"0.64815867"
] |
0.8095994
|
0
|
This returns the grandparent of a page as a GUID
|
public function getGrandparent() {
global $db;
$data = $db->get_var("SELECT parent FROM pages WHERE guid = (SELECT parent FROM pages where guid = '{$this->guid}')");
return $data;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"function getParentPageID () {return $this->getFieldValue ('parent_page_id');}",
"public function drawGrandparentByGUID($guid) {\n\t\t\tglobal $db;\n\t\t\t$data = $db->get_var(\"SELECT parent FROM pages WHERE guid = '{$this->getParentByGUID($guid)}'\");\n\t\t\treturn $data;\n\t\t}",
"public function getParentName() {\n\t\t\t$parent = new Page();\n\t\t\t$parent->loadByGUID($this->parent);\n\t\t\treturn $parent->name;\n\t\t}",
"public function getGrandParent();",
"public function drawGrandparent() {\n\t\t\tglobal $db;\n\t\t\t$data = $db->get_var(\"SELECT title FROM pages WHERE guid = {$this->getGrandparent()}'\"); \n\t\t\treturn $data;\n\t\t}",
"function get_admin_page_parent($parent_page = '')\n {\n }",
"protected function getParentPageID(){\n if( $this->displayBeneath == self::DISPLAY_PAGES_BENEATH_CURRENT ){\n return Page::getCurrentPage()->getCollectionID();\n }\n return $this->parentPageID;\n }",
"public function getParentGUID() {\n\t\tif (isset($this->parent_guid)) {\n\t\t\treturn (int) $this->parent_guid;\n\t\t}\n\t\t\n\t\treturn $this->guid;\n\t}",
"Public function getParentPageId() {\n\t\tif(!empty($this->parent_pageid))\n\t\t\treturn $this->parent_pageid;\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}",
"function wp_get_post_parent_id($post = \\null)\n {\n }",
"function get_tpa(){\n\tglobal $post;\n\tif($post->post_parent){\n\t\t$ancestors = array_reverse(get_post_ancestors($post->ID));\n\t\treturn $ancestors[0];\n\t}\n\treturn $post->ID;\n}",
"public function drawParent() {\n\t\t\tglobal $db;\n\t\t\t$data = $db->get_var(\"SELECT title FROM pages WHERE guid = (SELECT parent FROM pages where guid = '{$this->guid}')\"); \n\t\t\treturn $data;\n\t\t}",
"function get_top_parent_ID($id){\n\t$page = get_page($id);\n\t$id = $page->post_parent;\n\t$parent = get_page($id);\n\t\n\tif ($parent->post_parent == 0){\n\t\treturn $id;\n\t}\n\telse{\n\t\treturn get_top_parent_ID($id);\n\t}\n}",
"function tutv_get_parent_title( $page = null ) {\n global $post;\n\n if ( ! $page ) {\n $page = $post->ID;\n }\n\n\n if ( empty( $post->post_parent ) ) { // if there is no parent...\n return get_the_title( $post->ID ); // return the current page's title\n } else { // if there is a parent...\n return get_the_title( $post->post_parent ); // return the parent's title\n }\n}",
"public function getParentId(): string;",
"public function get_parent();",
"public function getParentId();",
"public function getParentId();",
"public function getParentId();",
"function _wswwpx_page_get_parent_id ( $child = 0 ) {\n\tglobal $wpdb;\n\t// Make sure there is a child ID to process\n\tif ( $child > 0 ) {\n\t\t$result = $wpdb->get_var(\"\n\t\t\t\t\t\t\t\t\tSELECT post_parent\n\t\t\t\t\t\t\t\t\t\tFROM $wpdb->posts\n\t\t\t\t\t\t\t\t\t\tWHERE ID = $child\");\n\t} else {\n\t\t// ... or set a zero result.\n\t\t$result = 0;\n\t}\n\t//\n\treturn $result;\n}",
"public function getParentByGUID($guid) {\n\t\t\tglobal $db;\n\t\t\t$query = \"SELECT parent FROM pages WHERE guid = '$guid'\";\n\t\t\t$data = $db->get_var($query);\n\t\t\treturn $data;\n\t\t}",
"function frg_ancestor_id()\n{\n global $post;\n\n if ( $post->post_parent ) {\n $ancestors = array_reverse( get_post_ancestors( $post->ID ) );\n return $ancestors[0];\n }\n\n return $post->ID;\n}",
"public function get_parent_id() {\n\t\treturn $this->post->post_parent;\n\t}",
"protected function ParentID() {\n\treturn $this->GetFieldValue('ID_Parent');\n }",
"public function get_plugin_parent_page(): string\n {\n return $this->plugin_parent_page;\n }",
"public function getParentId()\n\t{\n\t\tif( isset( $this->values[$this->prefix . 'parentid'] ) ) {\n\t\t\treturn (string) $this->values[$this->prefix . 'parentid'];\n\t\t}\n\t}",
"function ss_get_parent_url( $child_id ) {\r\n\t$child = get_post( $child_id );\r\n\t$parentId = $child->post_parent;\r\n\t$linkToParent = get_permalink( $parentId );\r\n\treturn $linkToParent;\r\n}",
"function get_parent($type) {\n $relationships = get_field('post_detail_page_relationship', 'option');\n $parent = null;\n foreach ($relationships as $relationship) {\n if ($relationship['post_type'] === $type) {\n return $relationship['detail_page'];\n }\n }\n}",
"public function getRelationParentRealId();",
"public function getParentIdentifier()\n {\n return $this->parent;\n }"
] |
[
"0.75686604",
"0.7109888",
"0.7093596",
"0.70649695",
"0.7006274",
"0.6985742",
"0.6950144",
"0.6831107",
"0.6819875",
"0.673477",
"0.67334604",
"0.66945326",
"0.66442055",
"0.66441476",
"0.6640586",
"0.6633855",
"0.66294026",
"0.66294026",
"0.66294026",
"0.66241586",
"0.6554628",
"0.6552948",
"0.6520837",
"0.65172946",
"0.64923644",
"0.6445531",
"0.64241254",
"0.641627",
"0.64129615",
"0.64087135"
] |
0.8003583
|
0
|
This returns the grandparent of the page specified by the GUID
|
public function drawGrandparentByGUID($guid) {
global $db;
$data = $db->get_var("SELECT parent FROM pages WHERE guid = '{$this->getParentByGUID($guid)}'");
return $data;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function getGrandparent() {\n\t\t\tglobal $db;\n\t\t\t$data = $db->get_var(\"SELECT parent FROM pages WHERE guid = (SELECT parent FROM pages where guid = '{$this->guid}')\"); \n\t\t\treturn $data;\n\t\t}",
"public function getParentByGUID($guid) {\n\t\t\tglobal $db;\n\t\t\t$query = \"SELECT parent FROM pages WHERE guid = '$guid'\";\n\t\t\t$data = $db->get_var($query);\n\t\t\treturn $data;\n\t\t}",
"public function getGrandParent();",
"function getParentPageID () {return $this->getFieldValue ('parent_page_id');}",
"public function getChildByGUID($guid) {\n\t\t\tglobal $db;\n\t\t\t$data = $db->get_var(\"SELECT guid FROM pages WHERE parent = '$guid'\");\n\t\t\treturn $data;\n\t\t}",
"public function drawGrandparent() {\n\t\t\tglobal $db;\n\t\t\t$data = $db->get_var(\"SELECT title FROM pages WHERE guid = {$this->getGrandparent()}'\"); \n\t\t\treturn $data;\n\t\t}",
"function get_admin_page_parent($parent_page = '')\n {\n }",
"public function get_parent();",
"protected function getParentPageID(){\n if( $this->displayBeneath == self::DISPLAY_PAGES_BENEATH_CURRENT ){\n return Page::getCurrentPage()->getCollectionID();\n }\n return $this->parentPageID;\n }",
"public function getParentName() {\n\t\t\t$parent = new Page();\n\t\t\t$parent->loadByGUID($this->parent);\n\t\t\treturn $parent->name;\n\t\t}",
"function get_top_parent_ID($id){\n\t$page = get_page($id);\n\t$id = $page->post_parent;\n\t$parent = get_page($id);\n\t\n\tif ($parent->post_parent == 0){\n\t\treturn $id;\n\t}\n\telse{\n\t\treturn get_top_parent_ID($id);\n\t}\n}",
"public function drawParent() {\n\t\t\tglobal $db;\n\t\t\t$data = $db->get_var(\"SELECT title FROM pages WHERE guid = (SELECT parent FROM pages where guid = '{$this->guid}')\"); \n\t\t\treturn $data;\n\t\t}",
"function get_parent($type) {\n $relationships = get_field('post_detail_page_relationship', 'option');\n $parent = null;\n foreach ($relationships as $relationship) {\n if ($relationship['post_type'] === $type) {\n return $relationship['detail_page'];\n }\n }\n}",
"function _wswwpx_page_get_parent_id ( $child = 0 ) {\n\tglobal $wpdb;\n\t// Make sure there is a child ID to process\n\tif ( $child > 0 ) {\n\t\t$result = $wpdb->get_var(\"\n\t\t\t\t\t\t\t\t\tSELECT post_parent\n\t\t\t\t\t\t\t\t\t\tFROM $wpdb->posts\n\t\t\t\t\t\t\t\t\t\tWHERE ID = $child\");\n\t} else {\n\t\t// ... or set a zero result.\n\t\t$result = 0;\n\t}\n\t//\n\treturn $result;\n}",
"Public function getParentPageId() {\n\t\tif(!empty($this->parent_pageid))\n\t\t\treturn $this->parent_pageid;\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}",
"public function getParent()\n {\n return $this->hasOne(Pages::className(), ['id' => 'parent_id']);\n }",
"public function getParent() {\n $parentNode = $this->getNode()->getParent();\n if (!$parentNode) {\n throw new PageException('Parent node not found (my page id is ' . $this->getId() . ')');\n }\n $parent = $parentNode->getPage($this->getLang());\n if (!$parent) {\n throw new PageException('Parent page not found (my page id is ' . $this->getId() . ')');\n }\n return $parent;\n }",
"protected function retrieveParent()\n {\n }",
"public function parent()\n\t{\n\t\tif ($this->parent_id) {\n\t\t\tif (is_null($this->parent)) {\n\t\t\t\t$parent = \\PagesRepository::retrieve($this->parent_id);\n\t\t\t\t$this->parent = \\App::make('Monal\\Pages\\Models\\FrontendPage', $parent);\n\t\t\t}\n\t\t}\n\t\treturn $this->parent;\n\t}",
"function ww_get_top_parent( $id = null ) {\n global $post;\n $temp_post = $id ? get_post( $id ) : $post;\n while( $temp_post->post_parent != 0 ) {\n $temp_post = get_post( $temp_post->post_parent );\n }\n return $temp_post;\n}",
"function getTopParentPostID($myid){\n\t$mypage = get_page($myid);\n\tif ($mypage->post_parent == 0){\n\t\treturn $mypage->ID;\n\t}\n\telse{\n\t\treturn getTopParentPostID($mypage->post_parent);\n\t}\n}",
"function wp_get_post_parent_id($post = \\null)\n {\n }",
"function get_post_parent($post = \\null)\n {\n }",
"function get_parent($obj = null){\n\tglobal $wp_query;\n\tif(!$obj){\n\t\t$obj = $wp_query->post;\n\t}\n\t\n\t// Checks to see if we've got a parent or not:\n\tif(empty($obj->post_parent))\n\t\treturn $obj->ID;\n\telse\n\t\treturn $obj->post_parent;\n}",
"function getParent();",
"public function get_parent() {\n\t\treturn $this->parent();\n\t}",
"function tutv_get_parent_title( $page = null ) {\n global $post;\n\n if ( ! $page ) {\n $page = $post->ID;\n }\n\n\n if ( empty( $post->post_parent ) ) { // if there is no parent...\n return get_the_title( $post->ID ); // return the current page's title\n } else { // if there is a parent...\n return get_the_title( $post->post_parent ); // return the parent's title\n }\n}",
"function ss_get_parent_url( $child_id ) {\r\n\t$child = get_post( $child_id );\r\n\t$parentId = $child->post_parent;\r\n\t$linkToParent = get_permalink( $parentId );\r\n\treturn $linkToParent;\r\n}",
"public function getParentEntity() {\n\t\treturn get_entity($this->getParentGUID());\n\t}",
"public function getParent()\n {\n return $this->Root->parentOfSection($this->URLSegment);\n }"
] |
[
"0.8253938",
"0.7491439",
"0.7414751",
"0.7199634",
"0.6980476",
"0.6967594",
"0.6954593",
"0.6871052",
"0.6724739",
"0.6713657",
"0.6651914",
"0.66131294",
"0.65764886",
"0.652942",
"0.6481049",
"0.64641356",
"0.64426905",
"0.64108425",
"0.640209",
"0.6394858",
"0.6394637",
"0.6382808",
"0.6335092",
"0.633168",
"0.62734467",
"0.62381524",
"0.623523",
"0.6234568",
"0.6182776",
"0.6171043"
] |
0.7810837
|
1
|
This returns the guids of ALL the descendents of the page specified by the GUID, in an array
|
public function getDescendentsByGUID($guid) {
global $db; //, $page;
$array = array();
if ($rows = $db->get_results("SELECT guid FROM pages WHERE parent = '$guid'")) {
foreach ($rows as $row) {
array_push($array,$row->guid);
$array = array_merge($array,$this->getDescendentsByGUID($row->guid));
}
}
return $array;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"function _wswwpx_page_get_descendant_ids ( $parent = 0, $inclusive=true ) {\n \tif ( $parent && $inclusive ) $descendants[] = $parent;\n \tif ( $children = _wswwpx_page_get_child_ids ( $parent ) ) {\n \t\tforeach ( $children as $child ) {\n \t\t\t$descendants[] = $child;\n \t\t\t$grandchildren = _wswwpx_page_get_child_ids ( $child );\n \t\t}\n \t}\n \t//\n \treturn $descendants;\n }",
"public function getPageIds()\n {\n $arr = array();\n foreach($this->elements as $displayElement){\n if($displayElement->getType() == 'element'){\n $page = $displayElement->getElement()->getPage();\n while($page != null) { \n $arr[] = $page->getId();\n $page = $page->getParent();\n }\n }\n if($displayElement->getType() == 'page'){\n $page = $displayElement->getPage();\n while($page != null) { \n $arr[] = $page->getId();\n $page = $page->getParent();\n }\n }\n }\n\n return array_unique($arr);\n }",
"private function _getIdsFromRecursiveEvent(Kwf_Component_Event_Component_RecursiveAbstract $event)\n {\n $c = Kwf_Component_Data_Root::getInstance()->getComponentById($event->componentId, array('ignoreVisible'=>true));\n $c = $c->getPageOrRoot();\n $ids = array($c->componentId);\n foreach (Kwf_Component_Data_Root::getInstance()->getPageGenerators() as $gen) {\n $ids = array_merge($ids, $gen->getVisiblePageChildIds($c->dbId));\n }\n return $ids;\n }",
"function get_all_page_ids()\n {\n }",
"public function getChildByGUID($guid) {\n\t\t\tglobal $db;\n\t\t\t$data = $db->get_var(\"SELECT guid FROM pages WHERE parent = '$guid'\");\n\t\t\treturn $data;\n\t\t}",
"public function getChildPages(): array\n {\n return $this->childPages;\n }",
"public function getPageEntryIds();",
"function five_get_ancestors(){\n\t\t\n\t\tglobal $wpdb;\n\t\t$result = $wpdb->get_results(\"SELECT ID, post_title, guid FROM $wpdb->posts WHERE post_type = 'page' AND post_parent = 0 AND post_status = 'publish'\");\n\t\treturn $result;\n\t\t}",
"function _wswwpx_page_get_ancestor_ids ( $child = 0, $inclusive=true, $topdown=true ) {\n \tif ( $child && $inclusive ) $ancestors[] = $child;\n \twhile ($parent = _wswwpx_page_get_parent_id ( $child ) ) {\n \t\t$ancestors[] = $parent;\n \t\t$child = $parent;\n \t}\n \t//\tIf there are ancestors, test for resorting, and apply\n \tif ($ancestors && $topdown) krsort($ancestors);\n\tif ( !$ancestors ) $ancestors[] = 0;\n \t//\n \treturn $ancestors;\n }",
"function _wswwpx_page_get_child_ids ( $parent = 0 ) {\n\tglobal $wpdb;\n\tif ( $parent > 0 ) {\n\t\t// Get the ID of the parent.\n\n\t\t$results = $wpdb->get_results(\"\n\t \t\t\t\t\t\t\tSELECT ID\n\t \t\t\t\t\t\t\t\t FROM $wpdb->posts\n\t \t\t\t\t\t\t\t\t WHERE post_parent = $parent\", ARRAY_N );\n \t\tif ($results) {\n\t\t\tforeach ($results AS $r) {\n\t\t\t \tforeach ($r AS $v) {\n\t\t\t \t\t$result[] = $v;\n\t\t\t \t}\n\t\t\t }\n\t\t} else {\n\t\t\t$result = false;\n\t\t}\n\t} else {\n\t\t// ... or set a zero result.\n\t\t$pages = get_pages();\n\t\tforeach ($pages AS $page) {\n\t\t\t$result[]=$page->ID;\n\t\t}\n//\t\t$result = 0;\n\t}\n\t//\n\treturn $result;\n}",
"public function getAllChildIds()\n\t{\n\t\t$ids = array($this->id);\n\t\tforeach ($this->children as $child) {\n\t\t\t$ids = array_merge($ids, $child->getAllChildIds());\n\t\t}\n\n\t\treturn $ids;\n\t}",
"public function getPages()\n {\n list($page_id, $scope_pages, $scope_page_type) = array(\n $this['page_id'],\n $this['scope']['pages'],\n $this['scope']['page_type']\n );\n\n $result_pages = array();\n\n if ($scope_pages == 'this') {\n /**\n * Only current page\n */\n $result_pages[] = $page_id;\n } elseif (in_array($scope_pages, array('descendants', 'children'))) {\n /**\n * All descendants\n */\n $finder = fx::data('content')->descendantsOf($page_id);\n if ($scope_page_type) {\n $finder->where('type', $scope_page_type);\n }\n $result_pages = array_merge($result_pages, $finder->all()->getValues('id'));\n /**\n * With self page\n */\n if ($scope_pages == 'descendants') {\n $result_pages[] = $page_id;\n }\n }\n return array_unique($result_pages);\n }",
"function descendants() {\n\t\t$out = array();\n\t\t$this->get_descendants($out);\n\t\treturn $out;\n\t}",
"function ajan_core_get_directory_page_ids() {\n\t$page_ids = ajan_get_option( 'ajan-pages' );\n\n\t// Ensure that empty indexes are unset. Should only matter in edge cases\n\tif ( !empty( $page_ids ) && is_array( $page_ids ) ) {\n\t\tforeach( (array) $page_ids as $component_name => $page_id ) {\n\t\t\tif ( empty( $component_name ) || empty( $page_id ) ) {\n\t\t\t\tunset( $page_ids[$component_name] );\n\t\t\t}\n\t\t}\n\t}\n\n\treturn apply_filters( 'ajan_core_get_directory_page_ids', $page_ids );\n}",
"protected function getPageIds()\n {\n return (array)explode(',', $this->getData('pages'));\n }",
"function getChildrenForMenu($pageSlug) {\n $page = $this->findBySlug($pageSlug);\n $pages = $this->children($page[$this->name]['id']);\n if (empty($pages)) {\n return null;\n }\n $titles = Set::extract($pages, \"{n}.{$this->name}.title\");\n $urls = Set::extract($pages, \"{n}.{$this->name}.url\");\n return array_combine($titles, $urls);\n }",
"public function getDescendants($idEntry = 0);",
"public function getSearchRootPageIdList() {}",
"public function getSearchRootPageIdList() {}",
"public function drawGrandparentByGUID($guid) {\n\t\t\tglobal $db;\n\t\t\t$data = $db->get_var(\"SELECT parent FROM pages WHERE guid = '{$this->getParentByGUID($guid)}'\");\n\t\t\treturn $data;\n\t\t}",
"function getStoragePageIds() ;",
"static function getAdminGuidArray() {\n $admin_array = array();\n $admins = getEntities(array(\n \"type\" => \"User\",\n \"metadata_name\" => \"level\", \"metadata_value\" => \"admin\"\n ));\n foreach ($admins as $admin) {\n $admin_array[] = $admin->\n guid;\n }\n return $admin_array;\n }",
"public function getChildIds($a_node)\n\t{\n\t\tglobal $ilDB;\n\t\t\n\t\t$query = 'SELECT * FROM tree '.\n\t\t\t\t'WHERE parent = '.$ilDB->quote($a_node,'integer').' '.\n\t\t\t\t'AND tree > '.$ilDB->quote(0,'integer');\n\t\t$res = $ilDB->query($query);\n\t\t\n\t\t$childs = array();\n\t\twhile($row = $res->fetchRow(DB_FETCHMODE_OBJECT))\n\t\t{\n\t\t\t$childs[] = $row->child;\n\t\t}\n\t\treturn $childs;\n\t}",
"private function get_node_children(midgard_page $node)\n {\n $children = array();\n $mc = midgard_page::new_collector('up', $node->id);\n $mc->set_key_property('name');\n $mc->add_value_property('title');\n $mc->execute(); \n $pages = $mc->list_keys();\n foreach ($pages as $name => $array)\n {\n if (empty($name))\n {\n continue;\n }\n $children[] = array\n (\n 'uri' => \"{$_MIDCOM->context->prefix}{$name}/\", // FIXME: dispatcher::generate_url\n 'title' => $mc->get_subkey($name, 'title'),\n 'mimetype' => 'httpd/unix-directory',\n 'resource' => 'collection',\n );\n }\n \n if ($_MIDCOM->context->page->id == $_MIDCOM->context->host->root)\n {\n // Additional \"special\" URLs\n $children[] = array\n (\n 'uri' => \"{$_MIDCOM->context->prefix}__snippets/\", // FIXME: dispatcher::generate_url\n 'title' => 'Code Snippets',\n 'mimetype' => 'httpd/unix-directory',\n 'resource' => 'collection',\n );\n $children[] = array\n (\n 'uri' => \"{$_MIDCOM->context->prefix}__styles/\", // FIXME: dispatcher::generate_url\n 'title' => 'Style Templates',\n 'mimetype' => 'httpd/unix-directory',\n 'resource' => 'collection',\n );\n }\n\n return $children;\n }",
"function get_page_children($page_id, $pages)\n {\n }",
"public function getDescendants();",
"public function getStoragePageIds() {}",
"function children_of_parent_page($parent_title){\n $my_wp_query = new WP_Query();\n $all_wp_pages = $my_wp_query->query(array('post_type' => 'page', 'order' => 'ASC', 'orderby' => 'menu_order', 'posts_per_page' => -1));\n $parent_page = get_page_by_title($parent_title);\n $page_children = get_page_children($parent_page->ID, $all_wp_pages);\n return $page_children; //outputs an array of child page objects\n}",
"function descendants() {\n\t\t/*\n\t\tget all children of this article\n\t\tfor each child, run the same query..\n\t\t*/\n\t\t$childs = $this->children();\n\t\t$subChilds = array();\n\t\tforeach ($childs as $oneChild) {\n\t\t\t$subChilds = array_merge($subChilds, $oneChild->descendants());\n\t\t}\n\t\t$childs = array_merge($childs, $subChilds);\n\t\tpb_pqp_log_speed(\"article descendants()\");\n\t\treturn $childs;\n\t}",
"function theme_haarlem_pages_get_widget_selector(ElggEntity $container, $depth = 0) {\n\n\tif (empty($container) || !elgg_instanceof($container)) {\n\t\treturn false;\n\t}\n\tif ($depth == 0) {\n\t\t$ordered = elgg_get_entities(array(\n\t\t\t'type' => 'object',\n\t\t\t'subtype' => 'page_top',\n\t\t\t'container_guid' => $container->getGUID(),\n\t\t\t'limit' => false,\n\t\t));\n\t} else {\n\t\t$ordered = elgg_get_entities_from_metadata(array(\n\t\t\t'type' => 'object',\n\t\t\t'subtype' => 'page',\n\t\t\t'metadata_name' => 'parent_guid',\n\t\t\t'metadata_value' => $container->getGUID(),\n\t\t\t'limit' => false,\n\t\t));\n\t}\n\n\tif (empty($ordered)) {\n\t\treturn false;\n\t}\n\n\t$result = array();\n\n\tforeach ($ordered as $order => $page) {\n\t\t// add this page\n\t\t$result[$page->getGUID()] = trim(str_repeat('-', $depth) . ' ' . $page->title);\n\t\t// invalidate cache for OOM\n\t\t// @todo find a better way for this\n\t\t_elgg_invalidate_cache_for_entity($page->getGUID());\n\n\t\t// append children\n\t\t$children = theme_haarlem_pages_get_widget_selector($page, $depth + 1);\n\t\tif (!empty($children)) {\n\t\t\t$result += $children;\n\t\t\t\t\n\t\t\tunset($children);\n\t\t}\n\t}\n\n\tunset($ordered);\n\n\treturn $result;\n}"
] |
[
"0.6514598",
"0.64603114",
"0.61321515",
"0.6065487",
"0.6028037",
"0.5967714",
"0.59093225",
"0.582889",
"0.57838535",
"0.5773632",
"0.57420915",
"0.57125634",
"0.5708148",
"0.57072484",
"0.5695287",
"0.5680997",
"0.5644799",
"0.5640032",
"0.5640032",
"0.56162536",
"0.560223",
"0.56008184",
"0.5554081",
"0.55430686",
"0.5537821",
"0.552343",
"0.54943",
"0.5459147",
"0.54485786",
"0.54247767"
] |
0.7445764
|
0
|
This function returns the GUID of the site to which the page belongs, whether that's a microsite or root
|
public function getSiteGUID() {
global $db;
if ($site = $db->get_var("SELECT guid FROM sites WHERE guid = '{$this->guid}'")) {
return $site;
}
else {
if ($this->parent == 0 || $this->parent == 1) {
return 1;
}
else {
$parent = new Page;
$parent->loadByGUID($this->parent);
$this->siteID = $parent->getSiteGUID();
return $this->siteID;
}
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function getSiteRootGUID($thispage = '',$type=false) {\n\t\t\tif(!$thispage){ $thispage= $this->guid;}\n\t\t\t// This function returns the root GUID of the site to which the page belongs, whether that's a microsite or root\n\t\t\t// The two functions below seem like they could be amalgamated and a switch could be thrown in to return guid, name or title...\n\t\t\tglobal $db;\n\t\t\t//$newsquery = \"SELECT guid,name FROM pages WHERE name='news' AND parent=''\";\n\n\t\t\tif ($row = $db->get_row(\"SELECT pages.guid,pages.name FROM sites, pages WHERE sites.guid = pages.guid && pages.guid = '\".$this->guid.\"'\")) {\n\t\t\t\t// Is this the microsite 'homepage'?\n\t\t\t\tif($type=='news'){\n\t\t\t\t\t$newsguid = $db->get_row(\"SELECT guid,name FROM pages WHERE name='news' AND parent='\".$row->guid.\"'\");\n\t\t\t\t\treturn $newsguid->guid;\n\t\t\t\t}else{\n\t\t\t\t\treturn $row->guid;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif ($this->parent == 0 || $this->parent == 1) {\n\t\t\t\t\tif($type=='news'){\n\t\t\t\t\t\t$newsguid = $db->get_row(\"SELECT guid,name FROM pages WHERE name='news-and-views' AND parent='1'\");\n\t\t\t\t\t\t// through hardcoding, it's not that flexible but using LIKE seemed to open to failure\n\t\t\t\t\t\treturn $newsguid->guid;\n\t\t\t\t\t}else{\n\t\t\t\t\t\treturn 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$parent = new Page;\n\t\t\t\t\t$parent->loadByGUID($this->parent);\n\t\t\t\t\treturn $parent->getSiteRootGUID($thispage,$type);\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"protected function getCurrentPageIdFromCurrentSiteRoot() {}",
"public function get_site_id()\n {\n }",
"public function get_site_id()\n {\n }",
"public static function getSiteId(){\n return 1;\n\n }",
"public function getSiteId();",
"public static function getSiteId()\n {\n return get_current_blog_id();\n }",
"public function get_site_identifier() {\n global $CFG;\n return $CFG->wwwroot.'phpunit';\n }",
"function getSiteID()\n {\n return VISTA_SITE;\n }",
"public function getSiteName() {\n\t\t\t// This is very similar to the above function, and the two could probably be merged in a much better way\n\t\t\tglobal $db;\n\t\t\tif ($row = $db->get_row(\"SELECT pages.name, pages.guid FROM sites, pages WHERE pages.lang='\". $_COOKIE['lang'] .\"' AND sites.guid = pages.guid && pages.guid = '{$this->guid}'\")) {\n\t\t\t\t// Is this the microsite 'homepage'?\n\t\t\t\treturn $row->name;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif ($this->parent == 0 || $this->parent == 1) {\n\t\t\t\t\treturn 'Root';\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$parent = new Page;\n\t\t\t\t\t$parent->loadByGUID($this->parent);\n\t\t\t\t\treturn $parent->getSiteName();\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"function getSiteId() {\n\t\treturn $this->getData('siteId');\n\t}",
"function siteId(): ?string\n {\n return app(\\LeMaX10\\MultiSite\\Classes\\Contracts\\SiteManager::class)\n ->id();\n }",
"public function get_site_id()\n {\n if ( ! $this->_site_id)\n {\n $this->_site_id = intval($this->EE->config->item('site_id'));\n }\n\n return $this->_site_id;\n }",
"function getSiteId()\n {\n return $this->_props['SiteId'];\n }",
"function kleo_bp_get_page_id() {\n $current_page_id = NULL;\n $page_array = get_option('bp-pages');\n\n if (bp_is_register_page()) { /* register page */\n $current_page_id = $page_array['register'];\n } elseif( bp_is_members_directory() ) { /* members directory */\n $current_page_id = $page_array['members'];\n } elseif ( bp_is_activity_directory() ) { /* activity directory */\n $current_page_id = $page_array['activity'];\n } elseif ( bp_is_groups_directory() ) { /* groups directory */\n $current_page_id = $page_array['groups'];\n } elseif ( bp_is_activation_page() ) { /* activation page */\n $current_page_id = $page_array['activate'];\n }\n return $current_page_id;\n}",
"public function getSiteHash() {\n if (function_exists('search_api_site_hash')) {\n return search_api_site_hash();\n }\n return FALSE;\n }",
"function url_site(): string\n{\n //return input_server('REQUEST_SCHEME') . '://' . input_server('SERVER_NAME');\n $site = \\get_site_url();\n $pos = strpos($site, '/', 8);\n return $pos ? substr($site, 0, $pos) : $site;\n}",
"private function getCurrentWebsiteId()\n {\n return $this->storeManager->getWebsite()->getId();\n }",
"function get_dfp_site_id() {\n\t$ad_stack_options = get_option( 'ad_stack', false );\n\tif ( ! empty( $ad_stack_options['dfp_site_id'] ) ) {\n\t\t$dfp_site_id = $ad_stack_options['dfp_site_id'];\n\t} else {\n\t\t$dfp_site_id = 'cpt';\n\t}\n\t$dfp_site_id = apply_filters( 'dfp_site_id', $dfp_site_id );\n\treturn ( $dfp_site_id );\n}",
"function get_current_site()\n {\n }",
"public function getIdentifier()\n {\n $configID = $this->get_config() ? $this->get_config()->ID : 1;\n return ucfirst($this->get_mode()) . \"Site\" . $configID;\n }",
"private static function get_site_name()\n {\n }",
"public function getCurrentSiteId()\n {\n if (empty($this->currentSiteId)) {\n $this->currentSiteId = $this->getCurrentSiteIdFromDomain();\n }\n\n return $this->currentSiteId;\n }",
"protected function determinePageId() {}",
"protected function determinePageId() {}",
"function getsite( )\n{\n\t\t\t\tif ( empty( $_SERVER['HTTP_HOST'] ) )\n\t\t\t\t{\n\t\t\t\t\t\t\t\t$R8607b50296 = \"http://\".$_SERVER['HTTP_HOST'];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t\t\t\t$R8607b50296 = \"http://\".$_SERVER['SERVER_NAME'];\n\t\t\t\t}\n\t\t\t\tif ( !empty( $_SERVER['REQUEST_URI'] ) )\n\t\t\t\t{\n\t\t\t\t\t\t\t\t$Rd4e4624cdb = $_SERVER['REQUEST_URI'];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t\t\t\t$Rd4e4624cdb = $_SERVER['PHP_SELF'];\n\t\t\t\t}\n\t\t\t\t$Rcc5c6e696c = explode( \"/\", $Rd4e4624cdb );\n\t\t\t\tarray_pop( $Rcc5c6e696c );\n\t\t\t\tarray_pop( $Rcc5c6e696c );\n\t\t\t\tarray_pop( $Rcc5c6e696c );\n\t\t\t\t$Rd4e4624cdb = implode( \"/\", $Rcc5c6e696c );\n\t\t\t\treturn $R8607b50296.$Rd4e4624cdb;\n}",
"static function id(): string { return 'website'; }",
"function get_proper_ID() {\n\n $page_id = get_the_ID();\n\n #4851\n global $wp_query;\n $page_id = $wp_query->post->ID;\n\n if ( !is_front_page() && is_home() ) {\n $page_id = ( 'page' == get_option( 'show_on_front' ) ? get_option( 'page_for_posts' ) : get_the_ID() ); // $page_id ?\n }\n\n if ( class_exists( 'woocommerce' ) ) {\n if (gecko_is_shop()) {\n $page_id = get_option( 'woocommerce_shop_page_id' );\n }\n }\n\n return $page_id;\n}",
"public function getSiteHost();",
"function siteName() {\n\t\treturn $GLOBALS[\"siteName\"];\n\t}"
] |
[
"0.732572",
"0.724835",
"0.712576",
"0.712576",
"0.7062376",
"0.7018315",
"0.6945985",
"0.68616605",
"0.68526685",
"0.6791464",
"0.6645053",
"0.66224664",
"0.6591846",
"0.64326775",
"0.6416074",
"0.6411704",
"0.64068776",
"0.6358728",
"0.63392663",
"0.6324945",
"0.6260944",
"0.62508225",
"0.62470055",
"0.62454426",
"0.62454426",
"0.6239337",
"0.62293464",
"0.62193835",
"0.6219106",
"0.62153614"
] |
0.77918655
|
0
|
type was adde to throw a switch if it's a news page to return the news section guid for a site/mircosite...
|
public function getSiteRootGUID($thispage = '',$type=false) {
if(!$thispage){ $thispage= $this->guid;}
// This function returns the root GUID of the site to which the page belongs, whether that's a microsite or root
// The two functions below seem like they could be amalgamated and a switch could be thrown in to return guid, name or title...
global $db;
//$newsquery = "SELECT guid,name FROM pages WHERE name='news' AND parent=''";
if ($row = $db->get_row("SELECT pages.guid,pages.name FROM sites, pages WHERE sites.guid = pages.guid && pages.guid = '".$this->guid."'")) {
// Is this the microsite 'homepage'?
if($type=='news'){
$newsguid = $db->get_row("SELECT guid,name FROM pages WHERE name='news' AND parent='".$row->guid."'");
return $newsguid->guid;
}else{
return $row->guid;
}
}
else {
if ($this->parent == 0 || $this->parent == 1) {
if($type=='news'){
$newsguid = $db->get_row("SELECT guid,name FROM pages WHERE name='news-and-views' AND parent='1'");
// through hardcoding, it's not that flexible but using LIKE seemed to open to failure
return $newsguid->guid;
}else{
return 1;
}
}
else {
$parent = new Page;
$parent->loadByGUID($this->parent);
return $parent->getSiteRootGUID($thispage,$type);
}
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"function publicationsSite($site)\n{\n\tif ($site == 1) return \"Important\"; \n\tif ($site == 2) return \"Publication\";\n\tif ($site == 3) return \"Releases\";\n\tif ($site == 4) return \"Info\";\n}",
"function PageLink($menutype,$menuid,$parent,$link)\n{\n\tif ($parent==0) $parent='no';\n\t$url=\"\";\n\tswitch ($menutype)\n\t{\n\t\tcase 0: //Muc chinh, trang chu, lien ket den trang index.php\n\t\t\t//$url='index.php?id='.$menuid;\n\t\t\t$url='index.php';\n\t\t\tbreak;\t\t\t\n\t\tcase 1://Muc con, chua tin tuc con 1 newsgroup, lien ket den trang newsgroup.php\n\t\t\t//$url='newsgroup.php?id='.$menuid.'&pr='.$parent; \n\t\t\t$url='groups.php?id='.$menuid.'&p='.$parent; \n\t\t\tbreak; \n\t\tcase 2://Muc con, lien ket den trang noi dung cuc bo content.php\n\t\t\t//$url='content.php?id='.$menuid.'&pr='.$parent; \n\t\t\t$url='view.php?id='.$menuid.'&p='.$parent; \n\t\t\tbreak; \t\t\t\t\t\t\n\t\tcase 3://Muc CHINH, khong co lien ket\n\t\t\t$url=''; \n\t\t\tbreak;\n\t\tcase 4://Muc CHINH, lien ket ngoai\n\t\t\t$url=$link;\n\t\t\tbreak;\t\t\t\t\n\t\tcase 5://Muc CHINH, lien ket den trang noi dung cuc bo content.php\n\t\t\t$url='view.php?id='.$menuid;\n\t\t\tbreak;\n\t\tcase 6://Muc CHINH, lien ket den trang van ban phap luat lawdocument.php\n\t\t\t$url='lawdocument.php?id='.$menuid;\n\t\t\tbreak;\n\t\tcase 7://Muc CHINH, lien ket den trang hoi dap faq.php\n\t\t\t$url='faq.php?id='.$menuid;\n\t\t\tbreak;\n\t\tcase 8://Muc CHINH, lien ket den trang lien he contact.php\n\t\t\t$url='contact.php?id='.$menuid;\n\t\t\tbreak;\t\n\t\tcase 9://Muc CHINH, lien ket den trang so do website webstruct.php\n\t\t\t$url='webstruct.php?id='.$menuid;\n\t\t\tbreak;\t\n\t\tcase 10://Muc CHINH, trang danh muc cac lien ket, lien ket den trang list.php\n\t\t\t$url='list.php?id='.$menuid;\n\t\t\tbreak;\t\t\n\t\tcase 11://Muc CHINH, trang lich cong tac, lien ket den trang timetable.php\n\t\t\t$url='timetable.php?id='.$menuid;\n\t\t\tbreak;\t\t\n\t\tcase 12://Muc CHINH, trang danh ba doanh nghiep, lien ket den trang orglist.php\n\t\t\t$url='orglist.php?id='.$menuid;\n\t\t\tbreak;\t\t\t\t\t\n\t\tcase 13://Muc con, chua tin tuc rss, lien ket den trang rssnews.php\n\t\t\t$url='rssnews.php?id='.$menuid.'&pr='.$parent;\n\t\t\tbreak;\n\t\tcase 14://Muc con, trang san pham\n\t\t\t$url='product.php?id='.$menuid.'&pr='.$parent; \n\t\t\tbreak;\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t}\n\treturn $url;\n}",
"function owa_get_page_type() {\t\r\n\t\r\n\tif (is_home()):\r\n\t\t$type = \"Home\";\r\n\telseif (is_attachment()):\r\n\t\t$type = \"Attachment\";\r\n\telseif (is_page()):\r\n\t\t$type = \"Page\";\r\n\t// general page catch, should be after more specific post types\t\r\n\telseif (is_single()):\r\n\t\t$type = \"Post\";\r\n\telseif (is_feed()):\r\n\t\t$type = \"Feed\";\r\n\telseif (is_author()):\r\n\t\t$type = \"Author\";\r\n\telseif (is_category()):\r\n\t\t$type = \"Category\";\r\n\telseif (is_search()):\r\n\t\t$type = \"Search Results\";\r\n\telseif (is_month()):\r\n\t\t$type = \"Month\";\r\n\telseif (is_day()):\r\n\t\t$type = \"Day\";\r\n\telseif (is_year()):\r\n\t\t$type = \"Year\";\r\n\telseif (is_time()):\r\n\t\t$type = \"Time\";\r\n\telseif (is_tag()):\r\n\t\t$type = \"Tag\";\r\n\telseif (is_tax()):\r\n\t\t$type = \"Taxonomy\";\r\n\t// general archive catch, should be after specific archive types\t\r\n\telseif (is_archive()):\r\n\t\t$type = \"Archive\";\r\n\telse:\r\n\t\t$type = '(not set)';\r\n\tendif;\r\n\t\r\n\treturn $type;\r\n}",
"function feed_content_type($type = '')\n {\n }",
"abstract protected function determinePageId() ;",
"function voyage_mikado_get_blog_type($type) {\n\n $blog_query = voyage_mikado_get_blog_query();\n\n $paged = voyage_mikado_paged();\n $blog_classes = '';\n\n if(voyage_mikado_options()->getOptionValue('blog_page_range') != \"\") {\n $blog_page_range = esc_attr(voyage_mikado_options()->getOptionValue('blog_page_range'));\n } else {\n $blog_page_range = $blog_query->max_num_pages;\n }\n $show_load_more = voyage_mikado_enable_load_more();\n\n if($show_load_more) {\n $blog_classes .= ' mkdf-blog-load-more';\n }\n\n $params = array(\n 'blog_query' => $blog_query,\n 'paged' => $paged,\n 'blog_page_range' => $blog_page_range,\n 'blog_type' => $type,\n 'blog_classes' => $blog_classes\n );\n\n voyage_mikado_get_module_template_part('templates/lists/'.$type, 'blog', '', $params);\n }",
"function medigroup_mikado_get_blog_type($type) {\n\n $blog_query = medigroup_mikado_get_blog_query();\n\n $paged = medigroup_mikado_paged();\n $blog_classes = '';\n\n if(medigroup_mikado_options()->getOptionValue('blog_page_range') != \"\") {\n $blog_page_range = esc_attr(medigroup_mikado_options()->getOptionValue('blog_page_range'));\n } else {\n $blog_page_range = $blog_query->max_num_pages;\n }\n $show_load_more = medigroup_mikado_enable_load_more();\n\n if($show_load_more) {\n $blog_classes .= ' mkd-blog-load-more';\n }\n\n $params = array(\n 'blog_query' => $blog_query,\n 'paged' => $paged,\n 'blog_page_range' => $blog_page_range,\n 'blog_type' => $type,\n 'blog_classes' => $blog_classes\n );\n\n medigroup_mikado_get_module_template_part('templates/lists/'.$type, 'blog', '', $params);\n }",
"protected function getSitemapType() {\n\t\t$type = t3lib_div::_GP('sitemap');\n\t\treturn ($type == 'news' ? self::SITEMAP_TYPE_NEWS : self::SITEMAP_TYPE_PAGES);\n\t}",
"private function x_get_page_type(){\n global $wp_query;\n \n \n $og_type = 'website';\n \n if ( self::is_home_static_page() ) {\n $this->mod_defaults[ 'is_home' ] = true; \n $og_type = 'website';\n }\n elseif ( self::is_home_posts_page() ) {\n $this->mod_defaults[ 'is_home_page' ] = true; \n $og_type = 'website';\n }\n elseif ( self::is_posts_page() ) {\n $this->mod_defaults[ 'is_home_index' ] = true; \n $og_type = 'website';\n }\n elseif ( is_singular() ) {\n $this->mod_defaults[ 'is_singular' ] = true; \n }\n elseif ( is_search() ) {\n $this->mod_defaults[ 'is_search' ] = true; \n }\n elseif ( is_category() ) {\n $this->mod_defaults[ 'is_category' ] = true; \n }\n elseif ( is_tag() ) {\n $this->mod_defaults[ 'is_tag' ] = true; \n }\n elseif ( is_tax() ) {\n $this->mod_defaults[ 'is_tax' ] = true; \n }\n// elseif ( is_term() ) {\n// $this->mod_defaults[ 'is_term' ] = true; \n// }\n elseif ( is_author() ) {\n $og_type = 'profile';\n $this->mod_defaults[ 'is_author' ] = true; \n }\n elseif ( function_exists ('is_shop') && is_shop() ) {\n $this->mod_defaults[ 'is_shop' ] = true; \n $this->mod_defaults[ 'is_shop_archive' ] = true; \n }\n elseif ( is_post_type_archive() ) {\n $this->mod_defaults[ 'is_post_type_archive' ] = true; \n }\n elseif ( is_archive() ) {\n $this->mod_defaults[ 'is_archive' ] = true; \n }\n elseif ( is_404() ) {\n $this->mod_defaults[ 'is_404' ] = true; \n }\n \n $this->mod_defaults[ 'is_post_type_archive' ] = isset($wp_query->is_post_type_archive) ? $wp_query->is_post_type_archive : false;\n \n if( $this->is_post_page() ){\n if( ! empty( $post_type = get_post_type() ) && isset( MetaTagAssets::$MTA[ 'head' ][ 'og_type_ns' ][ $post_type ] )){\n $og_type = $post_type;\n }else {\n $og_type = !isset($this->options->aios_web_graph_options['og_post_type']) || empty( $this->options->aios_web_graph_options['og_post_type'] ) ? 'article' : $this->options->aios_web_graph_options['og_post_type'];\n }\n }\n \n $this->mod_defaults[ 'og_type' ] = $og_type;\n \n }",
"protected function determinePageId() {}",
"protected function determinePageId() {}",
"function dtm_get_post_id( $post_type, $post_id ) {\n\t//$accepted_post_type = array( 'article', 'listicle' );\n\t//$post_type = self::get_post_type( $post_type );\n\t//if ( WP_Base::is_toh() ) {\n\t//\tif ( in_array( $post_type, $accepted_post_type ) ) {\n\t//\t\treturn ( '' );\n\t//\t}\n\t//\n\t//\tif ( WP_Base::is_recipe() ) {\n\t//\t\treturn get_post_meta( $post_id, 'rms_legacy_id', true );\n\t//\t}\n\t//}\n\t$post_id = apply_filters( 'dtm_wordpress_content_id', $post_id );\n\n\treturn $post_id;\n}",
"public function getID($url,$type = \"video\"){\n parse_str(preg_replace('/https:\\/\\/[www|m]\\.youtube\\.com\\/|watch\\?|https:\\/\\/[www|m]\\.youtube\\.com\\/|playlist\\?/','',$url));\n if($type == \"video\"){\n if(isset($v)){return $v;}\n else{return FALSE;} \n }elseif($type == \"playlist\"){\n\n if(isset($list)){return $list;}\n else{return FALSE;}\n }else{return FALSE; } \n }",
"function owa_get_title($page_type) {\r\n\r\n\tif ($page_type == \"Home\"):\r\n\t\t$title = get_bloginfo('name');\r\n\telseif ($page_type == \"Search Results\"):\r\n\t\t$title = \"Search Results for \\\"\".$_GET['s'].\"\\\"\";\t\r\n\telseif ($page_type == \"Page\" || \"Post\"):\r\n\t\t$title = wp_title($sep = '', $display = 0);\r\n\telseif ($page_type == \"Author\"):\r\n\t\t$title = wp_title($sep = '', $display = 0);\r\n\telseif ($page_type == \"Category\"):\r\n\t\t$title = wp_title($sep = '', $display = 0);\r\n\telseif ($page_type == \"Month\"):\r\n\t\t$title = wp_title($sep = '', $display = 0);\r\n\telseif ($page_type == \"Day\"):\r\n\t\t$title = wp_title($sep = '', $display = 0);\r\n\telseif ($page_type == \"Year\"):\r\n\t\t$title = wp_title($sep = '', $display = 0);\r\n\telseif ($page_type == \"Time\"):\r\n\t\t$title = wp_title($sep = '', $display = 0);\r\n\telseif ($page_type == \"Feed\"):\r\n\t\t$title = wp_title($sep = '', $display = 0);\r\n\tendif;\t\r\n\t\r\n\treturn $title;\r\n}",
"function get_page_type_wct($html){\n\t$main_page = 0;\n\t$schedule_page = 0;\n\t$event_page = 0;\n\t\n\t$dom = str_get_html($html);\n\t\n\t$title = $dom->find('title');\n\tforeach($title as $title_name) {\n\t\tif($title_name->innertext == \"World Curling Tour\") {\n\t\t\t$main_page += 1;\n\t\t\t$schedule_page += 1;\n\t\t}\n\t}\n\t\n\tif (strpos($html, \"Top 20 Women\") !== false) $main_page += 1;\n\tif (strpos($html, \"Top 20 Men\") !== false) $main_page += 1;\n\tif (strpos($html, \"Men's Money List\") !== false) $main_page += 1;\n\tif (strpos($html, \"Women's Money List\") !== false) $main_page += 1;\n\tif (strpos($html, \"Featured Profile\") !== false) $main_page += 1;\n\tif (strpos($html, \"Social Media\") !== false) $main_page += 1;\n\tif (strpos($html, \"Sheet Show\") !== false) $main_page += 1;\n\tif (substr_count($html, \"youtube\") >= 3) $main_page += 1;\n\t\n\tif (strpos($html, \"Women's Money List\") !== false) $schedule_page += 1;\n\tif (strpos($html, \"2015-16 Tour Schedule\") !== false) $schedule_page += 1;\n\tif (strpos($html, \"2015-16 Tour Schedule\") !== false) $schedule_page += 1;\n\tif (strpos($html, \"Men's Money List\") !== false) $schedule_page += 1;\n\tif (substr_count($html, \"Week\") > 6) $schedule_page += 1;\n\tif (substr_count($html, \"Purse\") > 6) $schedule_page += 1;\n\tif (substr_count($html, \"Format\") > 6) $schedule_page += 1;\n\tif (substr_count($html, \"Round Robin\") > 6) $schedule_page += 1;\n\t\n\tif (strpos($html, \"Statistics\") !== false) $event_page += 1;\n\tif (strpos($html, \"Scores\") !== false) $event_page += 1;\n\tif (strpos($html, \"Playoffs\") !== false) $event_page += 1;\n\tif (strpos($html, \"Draw\") !== false) $event_page += 1;\n\tif (strpos($html, \"Teams\") !== false) $event_page += 1;\n\tif (strpos($html, \"News\") !== false) $event_page += 1;\n\tif (strpos($html, \"HMR\") !== false) $event_page += 1;\n\tif (strpos($html, \"SF\") !== false) $event_page += 1;\n\tif (strpos($html, \"qualifiers\") !== false) $event_page += 1;\n\t\n\tif ($main_page > $schedule_page && $main_page > $event_page) \n\t\treturn WCT_HOME_PAGE;\n\telse if ($schedule_page > $main_page && $schedule_page > $event_page)\n\t\treturn WCT_SCHEDULE_PAGE;\n\telse if ($event_page > $schedule_page && $event_page > $main_page)\n\t\treturn WCT_EVENT_PAGE;\n\telse\n\t\treturn ERROR;\n\t\n}",
"function identifyPage() {\n//\t\t$req_uri = $_SERVER['REQUEST_URI'];\n//\t\tprint \"init\";\n\t\t$query = new Query();\n\t\tif($query->sql(\"SELECT id, relation, name, url FROM \" . UT_MEN . \" WHERE url LIKE '%\".$this->url.\"%'\")) {\n\t\t\t$item->id = $query->getQueryResult(0, \"id\");\n\t\t\t$item->name = $this->translate($query->getQueryResult(0, \"name\"));\n\n\t\t\t$item->url = str_replace(FRAMEWORK_PATH.\"/admin\", \"\", $this->url);\n\t\t\t$item->url = str_replace(GLOBAL_PATH.\"/admin\", \"\", $item->url);\n\t\t\t$item->url = str_replace(REGIONAL_PATH.\"/admin\", \"\", $item->url);\n\n//\t\t\t$item->url = ereg_replace(FRAMEWORK_PATH.\"/admin|\".GLOBAL_PATH.\"/admin|\".REGIONAL_PATH.\"/admin\", \"\", $query->getQueryResult(0, \"url\"));\n\t\t\tarray_unshift($this->trail, $item);\n\t\t\t$relation = $query->getQueryResult(0, \"relation\");\n\t\t\tif($relation) {\n\t\t\t\t$this->pageTrail($relation);\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"private static function getUrl($type,$id=\"\")\n\t{\n\t\t$link = self::base_url;\n\t\tswitch ($type) {\n\t\t\tcase 1:\n\t\t\t\t$link = $link.\"collections\";\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t$link = $link.\"bills\";\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\t$link = $link.\"collections/\".$id;\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\t$link = $link.\"bills/\".$id;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t# code...\n\t\t\t\tbreak;\n\t\t}\n\t\treturn $link;\n\t}",
"function News()\n{\n\t$this->type_moi = \"news\";\n}",
"public function getPageType();",
"public function getPageType();",
"function voyage_mikado_get_blog($type) {\n\n $sidebar = voyage_mikado_sidebar_layout();\n\n $params = array(\n \"blog_type\" => $type,\n \"sidebar\" => $sidebar\n );\n voyage_mikado_get_module_template_part('templates/lists/holder', 'blog', '', $params);\n }",
"public function getDataWithTypePage() {}",
"function _arc_meta($type = null, $typeId = null, $admin = false)\n{\n global $thisarticle, $thiscategory, $thissection, $s, $c, $arc_meta;\n\n if (empty($arc_meta)) {\n $arc_meta = array(\n 'id' => null,\n 'title' => null,\n 'description' => null,\n 'image' => null,\n 'robots' => null\n );\n\n if ($admin === true && $typeId === null) {\n return $arc_meta;\n }\n\n if (empty($type)) {\n if (!empty($thisarticle['thisid'])) {\n $typeId = $typeId ?: $thisarticle['thisid'];\n $type = 'article';\n } elseif (!empty($c)) {\n $typeId = $typeId ?: $c;\n $type = 'category';\n } elseif (!empty($s)) {\n $typeId = $typeId ?: $s;\n $type = 'section';\n }\n\n } elseif ($typeId === null) {\n if (strpos($type, 'category') === 0) {\n $type = 'category';\n $typeId = $thiscategory ? $thiscategory['name'] : $c;\n } elseif ($type === 'section') {\n $typeId = $thissection['name'] ? $thissection['name'] : $s;\n } elseif ($type === 'article') {\n assert_article();\n $typeId = $thisarticle ? $thisarticle['thisid'] : null;\n }\n\n }\n\n if (empty($type) || empty($typeId)) {\n if (!empty($thisarticle['thisid'])) {\n $typeId = $thisarticle['thisid'];\n $type = 'article';\n } elseif (!empty($c)) {\n $typeId = $c;\n $type = 'category';\n } elseif (!empty($s)) {\n $typeId = $s;\n $type = 'section';\n }\n\n }\n\n if (!empty($typeId) && !empty($type)) {\n $meta = safe_row('*', 'arc_meta', \"type_id='$typeId' AND type='$type'\");\n $arc_meta = array_merge($arc_meta, $meta);\n return $arc_meta;\n }\n\n }\n\n return $arc_meta;\n}",
"public function getLink($type='')\n\t{\n\t\tif (!$id = $this->get('uidNumber'))\n\t\t{\n\t\t\treturn '';\n\t\t}\n\n\t\t$link = 'index.php?option=com_members&id=' . $id;\n\n\t\t// If it doesn't exist or isn't published\n\t\t$type = strtolower($type);\n\t\tswitch ($type)\n\t\t{\n\t\t\tcase 'edit':\n\t\t\tcase 'changepassword':\n\t\t\t\t$link .= '&task=' . $type;\n\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\n\t\treturn $link;\n\t}",
"private function get_page_view_type() {\n\t\tif ( is_blog_admin() ) {\n\t\t\t$page_view_type = 'Site Admin';\n\t\t} elseif ( is_network_admin() ) {\n\t\t\t$page_view_type = 'Network Admin';\n\t\t} elseif ( ! is_admin() ) {\n\t\t\t$page_view_type = 'Front End';\n\t\t} else {\n\t\t\t$page_view_type = 'Unknown';\n\t\t}\n\t\treturn $page_view_type;\n\t}",
"function get_forum_type()\n{\n global $SITE_INFO;\n if (!isset($SITE_INFO['forum_type'])) {\n $SITE_INFO['forum_type'] = 'cns';\n }\n if ($SITE_INFO['forum_type'] === 'ocf') {\n $SITE_INFO['forum_type'] = 'cns'; // LEGACY\n }\n return $SITE_INFO['forum_type'];\n}",
"function getpage() {\n global $pages; /* so the included files know about it */\n\n $page = $_GET['page'];\n if ((preg_match('^/[a-z][a-z]/', $page)) && (in_array($page, $pages)))\n return $page;\n else\n return 'news';\n}",
"function medigroup_mikado_get_blog($type) {\n\n $sidebar = medigroup_mikado_sidebar_layout();\n\n $params = array(\n \"blog_type\" => $type,\n \"sidebar\" => $sidebar\n );\n medigroup_mikado_get_module_template_part('templates/lists/holder', 'blog', '', $params);\n }",
"function cah_news_get_news_page_link() {\r\n $page = get_option('cah_news_set_news_page', 'news'); \r\n $url = get_home_url(null, $page); \r\n return $url; \r\n}",
"function deals_get_view_type($type = 'list') {\n\n global $post, $wp_rewrite;\n\n $pagenum = (int) $pagenum;\n\n $request = remove_query_arg( 'view_type' );\n\n $home_root = parse_url(home_url());\n $home_root = ( isset($home_root['path']) ) ? $home_root['path'] : '';\n $home_root = preg_quote( trailingslashit( $home_root ), '|' );\n\n $request = preg_replace('|^'. $home_root . '|', '', $request);\n $request = preg_replace('|^/+|', '', $request);\n\n if ( !$wp_rewrite->using_permalinks() || is_admin() ) {\n $base = trailingslashit( get_bloginfo( 'url' ) );\n $result = $base . $request . '&view_type='.$type; \n } else {\n $qs_regex = '|\\?.*?$|';\n preg_match( $qs_regex, $request, $qs_match );\n\n if ( !empty( $qs_match[0] ) ) {\n $query_string = $qs_match[0];\n $request = preg_replace( $qs_regex, '', $request );\n } else {\n $query_string = '';\n }\n\n $request = preg_replace( \"|view_type/\\d+/?$|\", '', $request);\n $request = preg_replace( '|^index\\.php|', '', $request);\n $request = ltrim($request, '/');\n\n $base = trailingslashit( get_bloginfo( 'url' ) );\n\n $result = $base . $request . '?view_type=' . $type;\n }\n\n $result = apply_filters('get_viewtype_link', $result);\n\n return $result;\n\n}"
] |
[
"0.62689775",
"0.61787647",
"0.6162177",
"0.61468005",
"0.6031037",
"0.5997561",
"0.59727764",
"0.5897637",
"0.58705795",
"0.5817078",
"0.5817078",
"0.5793125",
"0.5787117",
"0.57710665",
"0.5744803",
"0.5688476",
"0.5651281",
"0.56473196",
"0.5641818",
"0.5641818",
"0.56256086",
"0.5625014",
"0.56224805",
"0.5575929",
"0.55740666",
"0.55620545",
"0.5560953",
"0.5549336",
"0.5535042",
"0.5530252"
] |
0.6558352
|
0
|
This function returns the name of the site to which the page belongs, whether that's a microsite or root
|
public function getSiteName() {
// This is very similar to the above function, and the two could probably be merged in a much better way
global $db;
if ($row = $db->get_row("SELECT pages.name, pages.guid FROM sites, pages WHERE pages.lang='". $_COOKIE['lang'] ."' AND sites.guid = pages.guid && pages.guid = '{$this->guid}'")) {
// Is this the microsite 'homepage'?
return $row->name;
}
else {
if ($this->parent == 0 || $this->parent == 1) {
return 'Root';
}
else {
$parent = new Page;
$parent->loadByGUID($this->parent);
return $parent->getSiteName();
}
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private static function get_site_name()\n {\n }",
"public function meta_site_name();",
"public function getSiteName();",
"function get_site_name() {\n\t\tglobal $site_array;\n\t\tif (isset($site_array)) {\n\t\t\treturn $site_array[\"site_name\"];\n\t\t}\n\t}",
"public static function getSiteName() {\n $settings = self::getSettings();\n \n return $settings->sitename;\n }",
"function siteName() {\n\t\treturn $GLOBALS[\"siteName\"];\n\t}",
"function site_name() {\n\treturn site_meta('sitename');\n}",
"function site_name()\n {\n return config_item('site_name');\n }",
"public function getSiteName()\n {\n return $this->settings->get('branding.site_name');\n }",
"function get_current_site_name($current_site)\n {\n }",
"public function siteName()\n {\n return get_bloginfo('name', 'display');\n }",
"public function siteName()\n {\n return $this->siteName;\n }",
"public function renderSiteName() {\n\t\t$adminTheme = $this->wire('adminTheme');\n\t\t$user = $this->wire('user');\n\n\t\tif ($user->isSuperuser()) {\n\t\t\treturn $adminTheme->sitename;\n\t\t}\n\t}",
"protected function getSiteName() {\r\n\t\treturn $this->siteName;\r\n\t}",
"function get_sitename() {\n\treturn get_bloginfo('name');\n}",
"function url_site(): string\n{\n //return input_server('REQUEST_SCHEME') . '://' . input_server('SERVER_NAME');\n $site = \\get_site_url();\n $pos = strpos($site, '/', 8);\n return $pos ? substr($site, 0, $pos) : $site;\n}",
"public function getCurrentSiteName(): string {\n try {\n return $this->findCurrentSite()->getSiteName();\n } catch (\\Exception $e) {\n $this->logger->error((string) $e);\n\n return $_SERVER['SITE_NAME'] ?? '[name unavailable]';\n }\n }",
"function get_site_name() {\n\t// Check the Altis config first.\n\t$site_name = has_altis_config() ? Altis\\get_config()['hm-juicer']['juicer-site-name'] : false;\n\tif ( ! empty( $site_name ) ) {\n\t\treturn $site_name;\n\t}\n\n\t// Check the JUICER_SITE_NAME constant and return it if it exists.\n\tif ( defined( 'JUICER_SITE_NAME' ) ) {\n\t\treturn JUICER_SITE_NAME;\n\t}\n\n\t// Return the option, if it exists.\n\treturn Settings\\juicer_get_option( 'JUICER_SITE_NAME', false );\n}",
"public function getSiteName() {\r\n return $this->siteName;\r\n }",
"function _get_site_hostname() {\n\t\treturn strtolower( wp_parse_url( get_site_url(), PHP_URL_HOST ) );\n\t}",
"public static function get_site_hostname() {\n\t\t\treturn strtolower( wp_parse_url( get_site_url(), PHP_URL_HOST ) );\n\t\t}",
"function sitename () {\n//returns the \"name\" of the website, taken from settings\nglobal $settings;\nreturn $settings['sitename'];\n}",
"function getsite( )\n{\n\t\t\t\tif ( empty( $_SERVER['HTTP_HOST'] ) )\n\t\t\t\t{\n\t\t\t\t\t\t\t\t$R8607b50296 = \"http://\".$_SERVER['HTTP_HOST'];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t\t\t\t$R8607b50296 = \"http://\".$_SERVER['SERVER_NAME'];\n\t\t\t\t}\n\t\t\t\tif ( !empty( $_SERVER['REQUEST_URI'] ) )\n\t\t\t\t{\n\t\t\t\t\t\t\t\t$Rd4e4624cdb = $_SERVER['REQUEST_URI'];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t\t\t\t$Rd4e4624cdb = $_SERVER['PHP_SELF'];\n\t\t\t\t}\n\t\t\t\t$Rcc5c6e696c = explode( \"/\", $Rd4e4624cdb );\n\t\t\t\tarray_pop( $Rcc5c6e696c );\n\t\t\t\tarray_pop( $Rcc5c6e696c );\n\t\t\t\tarray_pop( $Rcc5c6e696c );\n\t\t\t\t$Rd4e4624cdb = implode( \"/\", $Rcc5c6e696c );\n\t\t\t\treturn $R8607b50296.$Rd4e4624cdb;\n}",
"function get_site_name()\n{\n return get_option('site_name');\n}",
"private function retrieve_sitename() {\n\t\tstatic $replacement;\n\n\t\tif ( ! isset( $replacement ) ) {\n\t\t\t$sitename = WPSEO_Utils::get_site_name();\n\t\t\tif ( $sitename !== '' ) {\n\t\t\t\t$replacement = $sitename;\n\t\t\t}\n\t\t}\n\n\t\treturn $replacement;\n\t}",
"function pantomime_sitename(){\n\tif (is_home()){\n\t\t$heading_tag = 'h1';\n\t\t$copy = get_bloginfo( \"name\" );\t\n\t} else {\n\t\t$heading_tag = 'h2';\n\t\t$copy = '<a href=\"'. get_bloginfo( \"url\" ) .'\" class=\"emboss-dark\">'. get_bloginfo( \"name\" ) .'</a>';\n\t}\n\n\techo '\n\t\t<div id=\"sitename-wrap\" class=\"emboss-dark\">\n\t\t\t<'. $heading_tag .' id=\"sitename\">'. $copy .'</'. $heading_tag .'>\n\t\t\t<p>'. get_bloginfo( \"description\" ) .'</p>\n\t\t</div>\n\t';\n}",
"function site_name()\r\r\n {\r\r\n $CI =& get_instance(); \r\r\n //return the full asset path\r\r\n return $CI->config->item('site_name');\r\r\n }",
"function get_current_site()\n {\n }",
"public function getSiteTitle() {\n\t\treturn isset($this->cache->siteTitle) ? $this->cache->siteTitle : 'Crystal-Web System';\n\t}",
"private function site_url()\n\t{\n\t\t$protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443)\n\t\t\t? \"https://\"\n\t\t\t: \"http://\";\n\t\t$domainName = $_SERVER['HTTP_HOST'];\n\n\t\treturn $protocol.$domainName;\n\t}"
] |
[
"0.80405027",
"0.79676956",
"0.78227663",
"0.77782744",
"0.77590775",
"0.77585787",
"0.77498394",
"0.77414995",
"0.76771474",
"0.75617653",
"0.75109494",
"0.74322885",
"0.7419641",
"0.7382979",
"0.7373724",
"0.73350537",
"0.72385776",
"0.7238077",
"0.72307867",
"0.72190577",
"0.7141203",
"0.7117317",
"0.70608413",
"0.705011",
"0.7021675",
"0.6915563",
"0.68993783",
"0.6895099",
"0.6877412",
"0.68756485"
] |
0.8580365
|
0
|
This returns the content of a page's placeholder
|
public function drawContent($placeholder) {
// NOTE that this only returns the current content for now -- we'll need to change revision_id to '1' if we're editing a page
global $db;
$data = $db->get_var("SELECT content FROM content WHERE parent = '".$this->guid."' AND revision_id = 0 AND placeholder = '$placeholder'");
return $data;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function getPageContent(): string {\n\t\treturn $this->m_pageContent;\n\t}",
"public function getPlaceholder();",
"public function currentPageContent()\n {\n return $this->pageGuide->getParsedContent($this->currentPage);\n }",
"public function tempPageCacheContent() {}",
"public function getContent(){\n return $this->getPage();\n }",
"public function realPageCacheContent() {}",
"public function getFallbackContentFrom($page) {\n $this->isVirtual = true;\n $this->content = $page->getContent();\n $this->module = $page->getModule();\n $this->cmd = $page->getCmd();\n $this->skin = $page->getSkin();\n $this->customContent = $page->getCustomContent();\n $this->cssName = $page->getCssName();\n $this->cssNavName = $page->getCssNavName();\n \n $this->type = $page->getType();\n $this->target = $page->getTarget();\n }",
"function getPageContent($pageName){\n\t\t\t$pageContent = $this->manage_content->getValue_where('otherpage','*','page',$pageName);\n\t\t\techo $pageContent[0]['content'];\n\t\t}",
"public function getDefaultContent(): string;",
"function page_content()\n {\n //This needs to deliver page data that is requested by the ROUTE.\n }",
"protected function getRawContent() {\n @trigger_error('AssertLegacyTrait::getRawContent() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->getSession()->getPage()->getContent() instead. See https://www.drupal.org/node/3129738', E_USER_DEPRECATED);\n return $this->getSession()->getPage()->getContent();\n }",
"public function getHtml() {\n $tplString = Parser::getTemplate('notfound', true)\n ?: '<!DOCTYPE html><html><head><meta charset=\"utf-8\"><title>{%lang.$.generic.PAGE_NOT_FOUND%}</title></head><body><h1>{%TITLE%}</h1><p>{%MESSAGE%}</p></body></html>';\n \n return Parser::parseString($tplString, [\n \"TITLE\" => ifNotNull($this->title, Lang::get('foundation.PAGE_NOT_FOUND')),\n \"MESSAGE\" => ifNotNull($this->message, Lang::get('foundation.PAGE_NOT_FOUND_TEXT'))\n ]);\n }",
"private function content($page = 1)\n {\n return file_get_contents($this->endpoint() . '&Pagina=' . $page);\n }",
"public function content()\n {\n $Parsedown = new Parsedown();\n return $Parsedown->text($this->_content);\n }",
"function get_content() {\n\t\treturn $this->get_data( 'comment_content' );\n\t}",
"function get_content() {\r\n\t\treturn $this->content;\r\n\t}",
"public function content();",
"public function get_static_page(){\n\n global $wp_query;\n\n // Get initial page data\n $post = $wp_query->posts[0];\n setup_postdata( $post );\n $title = $this->get_html_title( $post, false );\n\n // Is this page locked?\n if( !post_password_required( $post->ID ) ){\n // No. The password has already been entered\n $raw_html = get_the_content( null, false, $post->ID );\n $html = '<article class=\"wm-article\" id=\"post-' . $post->ID . '\">' . $title;\n $html .= apply_filters('the_content', $raw_html );\n $html .= '</article>';\n } else {\n // Yes. The user needs to enter the password to this page\n $html = '<article class=\"wm-article\" id=\"post-' . $post->ID . '\">' . $title;\n $html .= get_the_password_form( $post->ID );\n $html .= '</article>';\n }\n\n return $html;\n }",
"public function content()\n {\n return $this->cache->get('content');\n }",
"public function showContent()\r\n {\r\n $this->preparePage();\r\n /**\r\n * @todo do code refactoring\r\n */\r\n if (clsSysCommon::isAjax()) {\r\n $content = $this->getContent();\r\n } else {\r\n $content = $this->getContent();\r\n }\r\n return $content;\r\n }",
"public function getOptionalContent() {}",
"public function getMainContentOfPage()\n {\n return $this->mainContentOfPage;\n }",
"public function getPageContent() {\n\t\tif ($this->url) {\n\t\t\t// Get content\n\t\t\t$sql = \"\n\t\t\tSELECT *\n\t\t\tFROM VContent\n\t\t\tWHERE\n\t\t\t type = 'page' AND\n\t\t\t url = ? AND\n\t\t\t published <= NOW(); AND\n\t\t\t deleted IS NULL;\n\t\t\t\";\n\t\t\t$res = $this->getContent($sql, array($this->url));\n\n\t\t\tif ($res[0]) {\n\t\t\t\t$c = $res[0];\n\t\t\t\t// Filter content before using it.\n\t\t\t\t$c->data = $this->textfilter->doFilter($c->data, \"{$c->filter},purify,typography\");\n\t\t\t\t\n\t\t\t\treturn array('id' => $c->id,\n\t\t\t\t\t\t'title' => $c->title,\n\t\t\t\t\t\t'data' => $c->data,\n\t\t\t\t\t\t'link' => $c->link,\n\t\t\t\t\t\t'name' => $c->UserName,\n\t\t\t\t\t'acronym' => $this->acronym);\n\t\t\t} else {\n\t\t\t\treturn $this->emptypage;\n\t\t\t}\n\t\t} else {\n\t\t\treturn $this->emptypage;\n\t\t}\n\t}",
"public function extractContent()\n {\n $metas = $this->parsedDOM->getElementsByTagName('meta');\n\n // If exists meta-description, uses it\n foreach ($metas as $meta)\n {\n // Loops the list of attributes\n foreach ($meta->attributes as $attribute)\n {\n\n // Checks if the page is OG Compliant\n if ($attribute->name == 'name'\n && $attribute->value == 'og:description'\n && $meta->attributes->getNamedItem('content')->value !== ''\n ) {\n // Returns the og:description\n return trim($meta->attributes->getNamedItem('content')->value);\n }\n\n // looks for the description meta tag\n if ($attribute->name == 'name'\n && $attribute->value == 'description'\n && $meta->attributes->getNamedItem('content')->value !== ''\n ) {\n return trim($meta->attributes->getNamedItem('content')->value);\n }\n }\n }\n\n $article = $this->parsedDOM->getElementsByTagName('article')->item(0);\n\n if ($article !== null ) {\n // Search the first paragraph inside the article\n $paragraph = $article->firstChild->nodeValue;\n return trim($paragraph);\n\n }\n\n $paragraph = $this\n ->parsedDOM\n ->getElementsByTagName('p')\n ->item(0);\n\n if ($paragraph !== null) {\n return trim($paragraph);\n }\n\n return trim($this\n ->parsedDOM\n ->getElementsByTagName('body')\n ->item(0)\n ->nodeValue);\n }",
"abstract public function getHtml();",
"public function getUndefinedContent()\n {\n return $this->undefinedContent;\n }",
"public function get_content()\n\t\t{\n\t\t\tif (!$this->is_cached()) {\n\t\t\t\t$this->load();\n\t\t\t}\n\n\t\t\treturn $this->content;\n\t\t}",
"function extract($content)\n\t{\n if (!is_string($content) OR !$this->is_pjax()) {\n return $content;\n }\n\n // We only process if we find a valid <body>\n preg_match('/(?:<body[^>]*>)(.*)<\\/body>/isU', $content, $matches);\n\n // Did we find the body\n if (count($matches) !== 2) {\n return $content;\n }\n\n $body = $matches[1];\n\n // Does the page have a title\n preg_match('@<title>([^<]+)</title>@', $content, $matches);\n\n // Did we find the title\n $title = (count($matches) === 2) ? $matches[0] : '';\n\n // Set new content\n return $title.$body;\n\t}",
"public function getPageInfo(){\n\n $content = array();\n\n return $content;\n }",
"public function prePageContent();"
] |
[
"0.6605146",
"0.6372364",
"0.6148701",
"0.6142214",
"0.6105429",
"0.60982287",
"0.6016788",
"0.59873474",
"0.59198034",
"0.59100556",
"0.5907577",
"0.5843562",
"0.5838776",
"0.5830994",
"0.58293813",
"0.5819779",
"0.57740617",
"0.57640827",
"0.5750821",
"0.5749322",
"0.57330525",
"0.5728359",
"0.5716949",
"0.5713612",
"0.57070625",
"0.5702898",
"0.5695933",
"0.5693757",
"0.56923115",
"0.5689818"
] |
0.70457345
|
0
|
draws a link to the current page
|
public function drawLink() {
return $this->drawLinkByGUID($this->guid);
global $db;
$data = $db->get_row("SELECT parent,name FROM pages WHERE guid = '{$this->guid}'");
$location = array();
$html = '';
if ($data->parent == 0) {
//$html .= '/'.$data->name.$html;
$html = '';
}
else {
while ($data->parent != 0) {
$html = '/'.$data->name.$html;
$data = $db->get_row("SELECT parent,name FROM pages WHERE guid = '{$data->parent}'");
}
}
return $html . '/'; // .html removed and replaced by a /
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"function drawLink()\r\n\t{\r\n\t\tglobal $user;\r\n\t\tif(!$user) return;\r\n\t\t$forum_id = $this->topic->forum_id;\r\n\t\t\r\n\t\tif($this->subscription)\r\n\t\t{\r\n\t\t\t$this->drawIconLink($this->subscribedForumIcon, \"You are Currently Subscribed to all Topics in this Forum\", \r\n\t\t\t\t$forum_id);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif($this->topicSubscription)\r\n\t\t\t{\r\n\t\t\t\t$this->drawIconLink($this->subscribedTopicIcon, \"You are Currently Subscribed to this Topic\", \r\n\t\t\t\t\t$forum_id);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$this->drawButtonLink($this->subscribeTopicButton, $forum_id);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"protected function renderCurrentUrl() {}",
"protected function renderCurrentUrl() {}",
"function DrawPages( $link=\"\" )\r\n\t\t{\r\n\t\t\tif( $link == \"\" )\r\n\t\t\t{\r\n\t\t\t\t$link = $_SERVER[\"PHP_SELF\"] . \"?\" . $_SERVER[\"QUERY_STRING\"];\r\n\t\t\t\t\r\n\t\t\t\tif( $pos_PAGE = strpos( $link, \"&page=\" ) )\r\n\t\t\t\t{\r\n\t\t\t\t\t$link = substr( $link, 0, $pos_PAGE );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// usando el array remove_words\r\n\t\t\t// ejecuta la eliminación de posibles parametros\r\n\t\t\tfor( $ij=0; $ij<count($this->remove_words); $ij++ )\r\n\t\t\t{\r\n\t\t\t\t$link = str_replace( $this->remove_words[$ij], \"\", $link );\r\n\t\t\t}\r\n\r\n\t\t\techo \"<br>\";\r\n\r\n\t\t\t$str_page = \"Páginas\";\r\n\t\t\t\r\n\t\t\tif( $this->lang != 1 )\r\n\t\t\t{\r\n\t\t\t\tif( $this->lang == 2 )\r\n\t\t\t\t\t$str_page = \"Pages\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\techo \"<div style='float:left; width:74%;'>\";\r\n\t\t\techo \"<table align='center' border='0'>\";\r\n\t\t\techo \"<tr><td align='center' class='columna'>\" . (($this->TotalPages==0) ? \"\" : \"$str_page\") . \" \";\r\n\r\n\t\t\tif( $this->page > 1 )\r\n\t\t\t echo \" <a href='$link&page=\" . ($this->page-1) . \"'><img src='../images/back_btn.gif' alt='Anterior'></a>\";\t\t\r\n\r\n\t\t\t$since = 1;\r\n\t\t\t$to = $this->TotalPages;\r\n\r\n\t\t\tif( $this->TotalPages > 20 )\r\n\t\t\t{\r\n\t\t\t\t$since = $this->page;\r\n\t\t\t\t$to = $since + 20;\r\n\r\n\t\t\t\tif( $to > $this->TotalPages )\r\n\t\t\t\t{\r\n\t\t\t\t\t$to = $this->TotalPages;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif( $this->TotalPages > 20 and $this->style==\"N\")\r\n\t\t\t{\r\n\t\t\t\techo \" <a href=''>...</a>\";\t\r\n\t\t\t}\r\n\r\n\t\t\t$index_page = $this->page;\r\n\r\n\t\t\tif( $this->style == \"A\" )\r\n\t\t\t{\r\n\t\t\t\t$since = 1;\r\n\t\t\t\t$to = 26;\r\n\r\n\t\t\t\tif( substr($this->page,0,1) == \"!\" )\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->page = substr($this->page, 1, strlen($this->page));\r\n\t\t\t\t\t$this->page = 26 + $this->page;\r\n\t\t\t\t\t\r\n\t\t\t\t\t$index_page = $this->page;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t// convertir la página Alfabetica a un INDICE\r\n\t\t\t\t\t$index_page = (ord($this->page) - 64);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tfor($i=$since; $i<=$to; $i++ )\r\n\t\t\t{\r\n\t\t\t\tif( $i == $index_page )\r\n\t\t\t\t{\r\n\t\t\t\t\techo \"<b><font size=+1>\";\r\n\t\t\t\t\t\r\n\t\t\t\t\tif( $this->style == \"A\" )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$str = chr(64+$i);\r\n\t\t\t\t\t\techo $str;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\techo $i;\t\t\t\t\t\r\n\r\n\t\t\t\t\techo \"</font></b> \";\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tif( $this->style == \"A\" )\r\n\t\t\t\t\t\t$str = chr(64+$i);\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\t$str = $i;\r\n\r\n\t\t\t\t\techo \"<a href='\" . $link . \"&page=$str'>\";\r\n\t\t\t\t\techo (($i==$this->page-1 or $i==$this->page+1) ? \"<font size=+0>\" : \"\");\r\n\r\n\t\t\t\t\techo $str;\r\n\r\n\t\t\t\t\techo (($i==$this->page-1 or $i==$this->page+1) ? \"</font>\" : \"\");\r\n\t\t\t\t\techo \"</a> \";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif( $this->style == \"A\" )\r\n\t\t\t{\r\n\t\t\t\tfor($i=0; $i<=9; $i++ )\r\n\t\t\t\t{\r\n\t\t\t\t\tif( 26+$i == $index_page )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\techo \"<strong><font size=+1>\";\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$str = chr(48+$i);\r\n\t\t\t\t\t\techo $str;\r\n\t\r\n\t\t\t\t\t\techo \"</font></strong> \";\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$str = chr(48+$i);\r\n\t\r\n\t\t\t\t\t\techo \"<a href='\" . $link . \"&page=!$str'>\";\r\n\t\t\t\t\t\techo ((26+$i==$this->page-1 or 26+$i==$this->page+1) ? \"<font size=+0>\" : \"\");\r\n\t\r\n\t\t\t\t\t\techo $str;\r\n\t\r\n\t\t\t\t\t\techo ((26+$i==$this->page-1 or 26+$i==$this->page+1) ? \"</font>\" : \"\");\r\n\t\t\t\t\t\techo \"</a> \";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\tif( $this->TotalPages > 20 and $this->style==\"N\" )\r\n\t\t\t{\r\n\t\t\t\techo \" <a href=''>...</a>\";\t\r\n\t\t\t}\r\n\r\n\t\t\tif ($this->page<($this->TotalPages-1))\r\n\t\t\t echo \" <a href='$link&page=\" . ($this->page+1) . \"'><img src='../images/forward_btn.gif' alt='Siguiente'></a>\";\t\r\n\r\n\t\t\techo \"</td></tr>\";\r\n\t\t\techo \"</table>\";\r\n\t\t\techo \"</div>\";\r\n\t\t\t\r\n\t\t\tglobal $pr;\r\n\t\t\t\r\n\t\t\tif( isset($pr) )\r\n\t\t\t{\r\n\t\t\t\tglobal $LBL_RECS_X_PAGE;\r\n\t\t\t\techo \"<div style='float:right; width:25%; text-align:right;' class='x-pageRanges'>$LBL_RECS_X_PAGE \";\r\n\t\t\t\techo \"\t<span \" . (($pr==10) ? \"class='current' \" : \"\") . \"><a href='\" . $_SERVER[\"PHP_SELF\"] . \"?pr=10'>10</a></span> \";\r\n\t\t\t\techo \"\t<span \" . (($pr==15) ? \"class='current' \" : \"\") . \"><a href='\" . $_SERVER[\"PHP_SELF\"] . \"?pr=15'>15</a></span> \";\r\n\t\t\t\techo\"\t<span \" . (($pr==20) ? \"class='current' \" : \"\") . \"><a href='\" . $_SERVER[\"PHP_SELF\"] . \"?pr=20'>20</a></span> \";\r\n\t\t\t\techo \" </div>\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\techo \"<br style='clear:both'>\";\r\n\t\t}",
"function printMenuLink() {\r\n\tprint '<br><br><a href=\"/menu/menu.php\">Back to Menu</a>';\r\n}",
"public function getLink() {\n\t\t\t// This is currently identical to drawLink()\n\t\t\t// but that's designed to return HTML, and may in the future contain formatting etc\n\t\t\tglobal $db;\n\t\t\t$data = $db->get_row(\"SELECT parent,name FROM pages WHERE guid = '{$this->guid}'\");\n\t\t\t$location = array();\n\t\t\t$html = '';\n\t\t\twhile ($data->parent != 0) {\n\t\t\t\t$html = '/'.$data->name.$html;\n\t\t\t\t$data = $db->get_row(\"SELECT parent,name FROM pages WHERE guid = '{$data->parent}'\");\n\t\t\t}\n\t\t\treturn $html . '/'; // .html removed and replaced by a /\n\t\t}",
"public function links()\n\t{\n\t\techo view('sketchpad::help/output/links');\n\t}",
"public function link()\r\n\t{\r\n\t\t$language_segment = (Config::get('core::languages')) ? $this->language->uri . '/' : '';\r\n\r\n\t\treturn url($language_segment . 'galleries/' . $this->gallery->slug . '/' . $this->id);\r\n\t}",
"public function drawLinkByGUID($guid) {\n\t\t\tglobal $db, $site, $siteLink, $http;\n\t\t\t$query = \"SELECT p.parent, p.name FROM pages p WHERE guid = '$guid'\";\n\t\t\t$data = $db->get_row($query);\n\t\t\t//echo \"SELECT parent,name FROM pages WHERE guid = '$guid'<br />\";\n\t\t\t$location = array();\n\t\t\t$html = '';\n\t\t\t\n\t\t\t// Its a bit messy but make sure we don't have any pages that are their own parent.\n\t\t\tif ($data->parent == $guid) {\n\t\t\t\t$query = \"UPDATE pages SET parent='\".($site->id+0).\"' WHERE guid='$guid'\";\n\t\t\t\t//print \"$query<br>\\n\";\n\t\t\t\t$db->query($query);\n\t\t\t}\n\t\t\t\n\t\t\tif ($data->parent == 0 && $guid != 1) {\n\t\t\t\t// if this is the homepage\n\t\t\t\t$html = $data->name.\"/\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\twhile ($data->parent != 0 && $data->parent!=$guid) {\n\t\t\t\t\t$html = $data->name.\"/\".$html;\n\t\t\t\t\t$data = $db->get_row(\"SELECT parent,name FROM pages WHERE guid = '{$data->parent}'\");\n\t\t\t\t\t//echo \"SELECT parent,name FROM pages WHERE guid = '{$data->parent}'<br />\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t//print_r($data);\n\t\t\t//echo \"<!-- html - $html -->\\n\";\n\t\t\t//echo \"<!-- site link ($siteLink) -->\\n\";\n\t\t\tif ($siteLink) $microsite=$siteLink;\n\t\t\t//else $microsite=\"http://\".$_SERVER['SERVER_NAME'].\"/\".$_SESSION['treeline_user_site_name'].\"/\".$_SESSION['treeline_user_language'].\"/\";\n else $microsite=$http.\"://\".$_SERVER['SERVER_NAME'].\"/\".$_SESSION['treeline_user_site_name'].\"/\".$_SESSION['treeline_user_language'].\"/\";\n\t\t\tif (substr($html, -1, 1)!=\"/\") $html.=\"/\";\n\t\t\t$new_link=$microsite.$html;\n\t\t\t//print \"<!-- got new link($new_link) last2(\".substr($new_link, -2, 2).\") -->\\n\";\n\t\t\t// Sometimes end up with an extra / on the end of the home page.\n\t\t\tif (substr($new_link, -2, 2)==\"//\") $new_link=substr($new_link, 0, -1);\n\t\t\treturn $new_link;\n\t\t}",
"public function drawPage()\n\t\t{\n\t\t}",
"function draw() {\n\t\t$currentMonthInfo = getdate($this->_monthTimestamp);\n\t\t$nextMonthInfo = getdate($this->_nextMonthTimestamp());\n\t\t$prevMonthInfo = getdate($this->_previousMonthTimestamp());\n\t\t\n\t\t$prevLinkTop = \"\";\n\t\t$nextLinkTop = \"\";\n\t\t$prevLinkBottom = \"\";\n\t\t$nextLinkBottom = \"\";\n\t\t$extraVars = \"\";\n\t\t$varBase = \"\";\n\t\tif ($this->_submitMethod == \"post\") {\n\t\t\tif (sizeof($this->_extraVars) > 0) {\n\t\t\t\tforeach ($this->_extraVars as $extraVar=>$extraVal) {\n\t\t\t\t\t$extraVars .= \"<input type=\\\"hidden\\\" name=\\\"\".htmlentities($extraVar).\"\\\" value=\\\"\".htmlentities($extraVal).\"\\\" />\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t$varBase = \"<a href=\\\"javascript: document.forms['%s'].submit()\\\"><form name=\\\"%s\\\" action=\\\"\".$_SERVER['PHP_SELF'].\"\\\" method=\\\"post\\\" style=\\\"display: inline; margin: 0; padding: 0\\\"><input type=\\\"hidden\\\" name=\\\"\".$this->_monthParamName.\"\\\" value=\\\"%s\\\" /><input type=\\\"hidden\\\" name=\\\"\".$this->_yearParamName.\"\\\" value=\\\"%s\\\" />\".$extraVars.\"</form>%s</a>\";\n\t\t\t$prevLinkTop = sprintf($varBase, \"prevLinkTop\", \"prevLinkTop\", $prevMonthInfo['mon'], $prevMonthInfo['year'], \"<span class=\\\"link_arrows\\\"><<</span> <span class=\\\"link_month\\\">\".$prevMonthInfo['month'].\"</span> <span class=\\\"link_year\\\">\".$prevMonthInfo['year'].\"</span>\");\n\t\t\t$nextLinkTop = sprintf($varBase, \"nextLinkTop\", \"nextLinkTop\", $nextMonthInfo['mon'], $nextMonthInfo['year'], \"<span class=\\\"link_month\\\">\".$nextMonthInfo['month'].\"</span> <span class=\\\"link_year\\\">\".$nextMonthInfo['year'].\"</span> <span class=\\\"link_arrows\\\">>></span>\");\n\t\t\t$prevLinkBottom = sprintf($varBase, \"prevLinkBottom\", \"prevLinkBottom\", $prevMonthInfo['mon'], $prevMonthInfo['year'], \"<span class=\\\"link_arrows\\\"><<</span> <span class=\\\"link_month\\\">\".$prevMonthInfo['month'].\"</span> <span class=\\\"link_year\\\">\".$prevMonthInfo['year'].\"</span>\");\n\t\t\t$nextLinkBottom = sprintf($varBase, \"nextLinkBottom\", \"nextLinkBottom\", $nextMonthInfo['mon'], $nextMonthInfo['year'], \"<span class=\\\"link_month\\\">\".$nextMonthInfo['month'].\"</span> <span class=\\\"link_year\\\">\".$nextMonthInfo['year'].\"</span> <span class=\\\"link_arrows\\\">>></span>\");\n\t\t}\n\t\telse {\n\t\t\tif (sizeof($this->_extraVars) > 0) {\n\t\t\t\tforeach ($this->_extraVars as $extraVar=>$extraVal) {\n\t\t\t\t\t$extraVars .= \"&\".urlencode($extraVar).\"=\".urlencode($extraVal);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$varBase = \"<a href=\\\"\".$_SERVER['PHP_SELF'].\"?\".$this->_monthParamName.\"=%s&\".$this->_yearParamName.\"=%s\".$extraVars.\"\\\">%s</a>\";\n\t\t\t$prevLinkTop = $prevLinkBottom = sprintf($varBase, $prevMonthInfo['mon'], $prevMonthInfo['year'], \"<span class=\\\"link_arrows\\\"><<</span> <span class=\\\"link_month\\\">\".$prevMonthInfo['month'].\"</span> <span class=\\\"link_year\\\">\".$prevMonthInfo['year'].\"</span>\");\n\t\t\t$nextLinkTop = $nextLinkBottom = sprintf($varBase, $nextMonthInfo['mon'], $nextMonthInfo['year'], \"<span class=\\\"link_month\\\">\".$nextMonthInfo['month'].\"</span> <span class=\\\"link_year\\\">\".$nextMonthInfo['year'].\"</span> <span class=\\\"link_arrows\\\">>></span>\");\n\t\t}\n\t\t\n\t\tprint '<div class=\"calendar_container\">\n\t<table class=\"calendar\">\n\t\t<tr class=\"calendar_title_row_top\">\n\t\t\t<td class=\"calendar_cell calendar_previous_link\" colspan=\"'.(($this->_showPreWeekColumn) ? '3' : '2').'\">'.$prevLinkTop.'</td>\n\t\t\t<td class=\"calendar_cell calendar_title\" colspan=\"3\"><span>'.$this->calendarTitleCellContent().'</span></td>\n\t\t\t<td class=\"calendar_cell calendar_next_link\" colspan=\"'.(($this->_showPostWeekColumn) ? '3' : '2').'\">'.$nextLinkTop.'</td>\n\t\t</tr>\n\t\t<tr class=\"calendar_header_row_top\">'.\"\\n\";\n\t\tif ($this->_showPreWeekColumn) print '\t\t\t<th class=\"calendar_cell calendar_column_0\" width=\"0\"><span>'.$this->_fillContent($this->preWeekColumnHeader()).'</span></th>'.\"\\n\";\n\t\tprint '\t\t\t<th class=\"calendar_cell calendar_column_1\" width=\"14%\"><span>'.$this->_fillContent($this->SundayColumnHeader()).'</span></th>\n\t\t\t<th class=\"calendar_cell calendar_column_2\" width=\"14%\"><span>'.$this->_fillContent($this->MondayColumnHeader()).'</span></th>\n\t\t\t<th class=\"calendar_cell calendar_column_3\" width=\"14%\"><span>'.$this->_fillContent($this->TuesdayColumnHeader()).'</span></th>\n\t\t\t<th class=\"calendar_cell calendar_column_4\" width=\"14%\"><span>'.$this->_fillContent($this->WednesdayColumnHeader()).'</span></th>\n\t\t\t<th class=\"calendar_cell calendar_column_5\" width=\"14%\"><span>'.$this->_fillContent($this->ThursdayColumnHeader()).'</span></th>\n\t\t\t<th class=\"calendar_cell calendar_column_6\" width=\"14%\"><span>'.$this->_fillContent($this->FridayColumnHeader()).'</span></th>\n\t\t\t<th class=\"calendar_cell calendar_column_7\" width=\"14%\"><span>'.$this->_fillContent($this->SaturdayColumnHeader()).'</span></th>'.\"\\n\";\n\t\tif ($this->_showPostWeekColumn) print '\t\t\t<th class=\"calendar_cell calendar_column_8\" width=\"0\"><span>'.$this->_fillContent($this->postWeekColumnHeader()).'</span></th>'.\"\\n\";\n\t\tprint '\t\t</tr>'.\"\\n\";\n\t\t\t\n\t\t$iDaysPerWeek = 7;\n\t\t$iCurrDay = 0;\n\t\t$iCurrWeek = 1;\n\t\t$iCounter = 0;\n\n\t\t//Write any initial blank days\n\t\tif ($currentMonthInfo['wday'] > 0) {\n\t\t\tprint '\t\t<tr class=\"calendar_week_row\" id=\"calendar_week_'.$iCurrWeek.'\">'.\"\\n\";\n\t\t\tif ($this->_showPreWeekColumn) print '\t\t\t<td class=\"calendar_cell calendar_column_0 calendar_day calendar_day_0\" id=\"calendar_week_'.$iCurrWeek.'_column_0\"><div class=\"calendar_day_date\"><span> </span></div><div class=\"calendar_day_content\"><span>'.((array_key_exists($iCurrWeek,$this->_preWeekArray)) ? $this->_fillContent($this->_preWeekArray[($iCurrWeek)]) : \"\").'</span></div></td>'.\"\\n\";\n\t\t\twhile ($iCounter < $currentMonthInfo['wday'] && $iCounter < $iDaysPerWeek) {\n\t\t\t\tprint '\t\t\t<td class=\"calendar_cell calendar_column_'.(($iCounter % $iDaysPerWeek) + 1).' calendar_day calendar_day_0\">\n\t\t\t\t<div class=\"calendar_day_container\">\n\t\t\t\t\t<div class=\"calendar_day_date\"><span> </span></div>\n\t\t\t\t\t<div class=\"calendar_day_content\"><span> </span></div>\n\t\t\t\t</div>\n\t\t\t</td>'.\"\\n\";\n\t\t\t\t$iCounter++;\n\t\t\t}\n\t\t\tif ($iCounter % $iDaysPerWeek == $iDaysPerWeek) {\n\t\t\t\tif ($this->_showPostWeekColumn) print '\t\t\t<td class=\"calendar_cell calendar_column_8 calendar_day calendar_day_0\" id=\"calendar_week_'.$iCurrWeek.'_column_8\"><div class=\"calendar_day_date\"><span> </span></div><div class=\"calendar_day_content\"><span>'.((array_key_exists($iCurrWeek,$this->_postWeekArray)) ? $this->_fillContent($this->_postWeekArray[($iCurrWeek)]) : \"\").'</span></div></td>'.\"\\n\";\n\t\t\t\tprint '\t\t</tr>'.\"\\n\";\n\t\t\t\t$iCurrWeek++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t//Pick up at the first day and continue through end of month\n\t\twhile ($iCurrDay < $this->_currentMonthNumDays) {\n\t\t\t$this->_dayTimestamp = mktime(0,0,0,$this->_currentMonth,($iCurrDay + 1),$this->_currentYear);\n\t\t\t\n\t\t\tif ($iCounter % $iDaysPerWeek == 0) {\n\t\t\t\tprint '\t\t<tr class=\"calendar_week_row\" id=\"calendar_week_'.$iCurrWeek.'\">'.\"\\n\";\n\t\t\t\tif ($this->_showPreWeekColumn) print '\t\t\t<td class=\"calendar_cell calendar_column_0 calendar_day calendar_day_0\" id=\"calendar_week_'.$iCurrWeek.'_column_0\"><div class=\"calendar_day_date\"><span> </span></div><div class=\"calendar_day_content\"><span>'.((array_key_exists($iCurrWeek,$this->_preWeekArray)) ? $this->_fillContent($this->_preWeekArray[($iCurrWeek)]) : \"\").'</span></div></td>'.\"\\n\";\n\t\t\t}\n\t\t\t\n\t\t\tprint '\t\t\t<td class=\"calendar_cell calendar_column_'.(($iCounter % $iDaysPerWeek) + 1).' calendar_day '.((trim($this->_dateArray[($iCurrDay + 1)]) == \"\") ? 'calendar_day_no_content' : 'calendar_day_with_content').((date('Ymd') == date('Ymd',mktime(0,0,0,$this->_currentMonth,$iCurrDay + 1,$this->_currentYear))) ? ' calendar_day_today' : '').'\" id=\"calendar_date_'.($iCurrDay + 1).'\">\n\t\t\t\t<div class=\"calendar_day_container\">\n\t\t\t\t\t<div class=\"calendar_day_date\"><span>'.($iCurrDay + 1).'</span></div>\n\t\t\t\t\t<div class=\"calendar_day_content\"><span>'.((array_key_exists($iCurrDay + 1,$this->_dateArray)) ? $this->_fillContent($this->_dateArray[($iCurrDay + 1)]) : \"\").'</span></div>\n\t\t\t\t</div>\n\t\t\t</td>'.\"\\n\";\n\t\t\t\n\t\t\tif ($iCounter % $iDaysPerWeek == $iDaysPerWeek - 1) {\n\t\t\t\tif ($this->_showPostWeekColumn) print '\t\t\t<td class=\"calendar_cell calendar_column_8 calendar_day calendar_day_0\" id=\"calendar_week_'.$iCurrWeek.'_column_8\"><div class=\"calendar_day_date\"><span> </span></div><div class=\"calendar_day_content\"><span>'.((array_key_exists($iCurrWeek,$this->_postWeekArray)) ? $this->_fillContent($this->_postWeekArray[($iCurrWeek)]) : \"\").'</span></div></td>'.\"\\n\";\n\t\t\t\tprint '\t\t</tr>'.\"\\n\";\n\t\t\t\t$iCurrWeek++;\n\t\t\t}\n\t\t\t\n\t\t\t$iCurrDay++;\n\t\t\t$iCounter++;\n\t\t}\n\t\t\n\t\t//Write any remaining TD's\n\t\tif (($iCounter % $iDaysPerWeek) > 0 && ($iCounter % $iDaysPerWeek) <= ($iDaysPerWeek - 1)) {\n\t\t\twhile (($iCounter % $iDaysPerWeek) !== 0) {\n\t\t\t\tprint '\t\t\t<td class=\"calendar_cell calendar_column_'.(($iCounter % $iDaysPerWeek) + 1).' calendar_day calendar_day_0\">\n\t\t\t\t<div class=\"calendar_day_container\">\n\t\t\t\t\t<div class=\"calendar_day_date\"><span> </span></div>\n\t\t\t\t\t<div class=\"calendar_day_content\"><span> </span></div>\n\t\t\t\t</div>\n\t\t\t</td>'.\"\\n\";\n\t\t\t\t$iCounter++;\n\t\t\t}\n\t\t\tif ($this->_showPostWeekColumn) print '\t\t\t<td class=\"calendar_cell calendar_column_8 calendar_day calendar_day_0\" id=\"calendar_week_'.$iCurrWeek.'_column_8\"><div class=\"calendar_day_date\"><span> </span></div><div class=\"calendar_day_content\"><span>'.((array_key_exists($iCurrWeek,$this->_postWeekArray)) ? $this->_fillContent($this->_postWeekArray[($iCurrWeek)]) : \"\").'</span></div></td>'.\"\\n\";\n\t\t\tprint '\t\t</tr>'.\"\\n\";\n\t\t}\n\t\t\n\t\t//Reset dayTimestamp to beginning of month\n\t\t$this->_dayTimestamp = $this->_monthTimestamp;\n\t\t\n\t\t//Finish writing table elements\n\t\tprint '\t\t<tr class=\"calendar_header_row_bottom\">'.\"\\n\";\n\t\tif ($this->_showPreWeekColumn) print '\t\t\t<th class=\"calendar_cell calendar_column_0\" width=\"0\"><span>'.$this->_fillContent($this->preWeekColumnHeader()).'</span></th>'.\"\\n\";\n\t\tprint '\t\t\t<th class=\"calendar_cell calendar_column_1\" width=\"14%\"><span>'.$this->_fillContent($this->SundayColumnHeader()).'</span></th>\n\t\t\t<th class=\"calendar_cell calendar_column_2\" width=\"14%\"><span>'.$this->_fillContent($this->MondayColumnHeader()).'</span></th>\n\t\t\t<th class=\"calendar_cell calendar_column_3\" width=\"14%\"><span>'.$this->_fillContent($this->TuesdayColumnHeader()).'</span></th>\n\t\t\t<th class=\"calendar_cell calendar_column_4\" width=\"14%\"><span>'.$this->_fillContent($this->WednesdayColumnHeader()).'</span></th>\n\t\t\t<th class=\"calendar_cell calendar_column_5\" width=\"14%\"><span>'.$this->_fillContent($this->ThursdayColumnHeader()).'</span></th>\n\t\t\t<th class=\"calendar_cell calendar_column_6\" width=\"14%\"><span>'.$this->_fillContent($this->FridayColumnHeader()).'</span></th>\n\t\t\t<th class=\"calendar_cell calendar_column_7\" width=\"14%\"><span>'.$this->_fillContent($this->SaturdayColumnHeader()).'</span></th>'.\"\\n\";\n\t\tif ($this->_showPostWeekColumn) print '\t\t\t<th class=\"calendar_cell calendar_column_8\" width=\"0\"><span>'.$this->_fillContent($this->postWeekColumnHeader()).'</span></th>'.\"\\n\";\n\t\tprint '\t\t</tr>\n\t\t<tr class=\"calendar_title_row_bottom\">\n\t\t\t<td class=\"calendar_cell calendar_previous_link\" colspan=\"'.(($this->_showPreWeekColumn) ? '3' : '2').'\">'.$prevLinkBottom.'</td>\n\t\t\t<td class=\"calendar_cell calendar_title\" colspan=\"3\"><span>'.$this->calendarTitleCellContent().'</span></td>\n\t\t\t<td class=\"calendar_cell calendar_next_link\" colspan=\"'.(($this->_showPostWeekColumn) ? '3' : '2').'\">'.$nextLinkBottom.'</td>\n\t\t</tr>\n\t</table>\n</div>'.\"\\n\";\n\t}",
"public function href();",
"public function link() { return site_url().'/'.$this->post->post_name; }",
"function create_links()\n\t{\n\t\t$output = '';\n\t\t\n\t\t/*if($this->block > 1){\n\t\t\t$this->prev = $this->first-1; \n\t\t\t$output .= '<a href=\"'.$this->url.'/page/1\" class=\"pBtn prev2\">처음</a>'.chr(10);\n\t\t}else{\n\t\t\t$output .= '<a href=\"javascript:void(0);\"class=\"pBtn prev2\">처음</a>'.chr(10);\n }*/\n\n\t\tif($this->page>1){\n\t\t\t$this->go_page=$this->page-1;\n\t\t\t$output .= '<a href=\"'.$this->url.'/page/'.$this->go_page.$this->querystring.'\"><img src=\"'.$this->theme.'/images/prev1.gif\" alt=\"Prev\" /></a>'.chr(10);\n\t\t}else{\n\t\t\t$output .= '<a href=\"javascript:void(0);\"><img src=\"'.$this->theme.'/images/prev1.gif\" alt=\"Prev\" /></a>'.chr(10);\n\t\t}\n\t\t\n\t\t$pgNum = '';\n\t\tfor($this->pagelnk=$this->first+1; $this->pagelnk <= $this->last; $this->pagelnk++)\n\t\t{\n\t\t\tif($this->first+1 < $this->pagelnk) $pgNum .= \"\t\"; \n\t\t\tif($this->pagelnk==$this->page){\n\t\t\t\t$pgNum .='<strong>'.$this->pagelnk.'</strong>'.chr(10);\n\t\t\t}else{\n\t\t\t\t$pgNum .='<a href=\"'.$this->url.'/page/'.$this->pagelnk.$this->querystring.'\">'.$this->pagelnk.'</a>'.chr(10);\n\t\t\t}\n \n if($this->paglnk!=$this->first+1 && $this->paglnk!=$this->last){\n $pgNum .= '';\n }\n\t\t}\n\t\t\n\t\t//$output .= $pgNum;\n $output .= '<span class=\"num\">'.$pgNum.'</span>';\n\n\t\tif($this->total_page>$this->page){\n\t\t\t$this->go_page=$this->page+1;\n\t\t\t$output .= '<a href=\"'.$this->url.'/page/'.$this->go_page.$this->querystring.'\"><img src=\"'.$this->theme.'/images/next1.gif\" alt=\"Next\" /></a>'.chr(10);\n\t\t}else{\n\t\t\t$output .= '<a href=\"javascript:void(0);\"><img src=\"'.$this->theme.'/images/next1.gif\" alt=\"Next\" /></a>'.chr(10);\n\t\t}\n\n\t\t/*if($this->block < $this->total_block){\n\t\t\t$this->next=$this->last+1;\n\t\t\t$output .= '<a href=\"'.$this->url.'/page/'.$this->total_page.'\" class=\"pBtn next2\">마지막</a>';\n\t\t}else{\n $output .= '<a href=\"javascript:void(0);\" class=\"pBtn next2\">마지막</a>';\n }*/\n\t\t\n\t\tif($this->total_page <= 1) $output =null;\n\n\t\treturn $output;\n\t}",
"public function Link() {\n\t\treturn self::$url_segment .'/';\n\t}",
"function build_link($text, $page){\n\t$format = '<a href=\"%2$s\">%1$s</a>';\n\n\tprintf($format, $text, link_to($page, false));\n}",
"function href() {\n\t\t$usemodrewrite = polarbear_setting('usemodrewrite');\n\t\tif ($usemodrewrite) {\n\t\t\treturn $this->fullpath();\n\t\t} else {\n\t\t\treturn $this->templateToUse() . '?polarbear-page=' . $this->getId();\n\t\t}\n\t}",
"public function makeLinkButton() {}",
"function showNoticeLink()\n {\n $noticeurl = $this->notice->bestUrl();\n\n // above should always return an URL\n\n assert(!empty($noticeurl));\n\n $this->out->elementStart('a', array('rel' => 'bookmark',\n 'class' => 'timestamp',\n 'href' => $noticeurl));\n $dt = common_date_iso8601($this->notice->created);\n $this->out->element('abbr', array('class' => 'published',\n 'title' => $dt),\n common_date_string($this->notice->created));\n $this->out->elementEnd('a');\n }",
"function printAsideLink($img_profilo) {\r\n \r\n $img_profilo = '../' . $img_profilo;\r\n \r\n echo '<div class=\"profilo-img-container\">' .\r\n '<a href=\"profilo.php\">' .\r\n '<img class=\"img-profilo-dim pointer\" src=\"' . $img_profilo .'\"' .'alt=\"Immagine del profilo\"/>' . \r\n '</a>' .\r\n '<div class=\"aside-testo\">' . $_SESSION['nickname'] . '</div>' .\r\n '</div>';\r\n \r\n}",
"public function index()\n\t{\n\t\t//on récupère l'URL\n\t\t//echo \"on cherche : \".$this->guid;\n\t\t\n\t\t\n\t}",
"function formatCurrentUrl() ;",
"function getLink () {\n\t\t$baseLink = 'index.php';\n\t\tif ($this->getAction ()) {\n\t\t\treturn $baseLink .= '?action='.$this->getAction ();\n\t\t}\n\t\telseif ($this->isAdminPage ()) {\n\t\t\treturn $baseLink .= '?action=admin&pageID='.$this->getID ();\n\t\t} else {\n\t\t\treturn $baseLink .= '?action=viewPage&pageID='.$this->getID ();\n\t\t}\n\t}",
"function render_link($page, $text, $menu = null) {\n global $PATH;\n\n if ( file_exists( \"pages/$page.php\" ) && $PATH[0] === $page) { // if the current page is this link\n $ele = \"<span>$text</span>\";\n } else {\n if( !isset($menu) ) {\n $menu = $_GET['menu']; //copy the menu parameter if not specified\n }\n $query = array('menu' => $menu);\n $query_string = http_build_query($query);\n $ele = \"<a href='/{$page}?{$query_string}'>$text</a>\";\n }\n echo \"<li>$ele</li>\";\n}",
"public function drawHTMLNavigation() {\r\n \t\techo (\"<table \".$this->cssTableId.\">\\n\");\r\n\t\techo (\" <tr \".$this->cssTrId.\">\\n\");\r\n\t\techo (\" <td \".$this->cssTdId.\"> \\n\");\r\n\t\t// FIRST \t\t\r\n\t\t$this->drawFirst();\r\n\t\techo (\" </td>\\n\");\r\n\t\techo (\" <td \".$this->cssTdId.\"> \\n\");\r\n \t// PREV\r\n \t$this->drawPrev();\r\n\t\techo (\" </td>\\n\");\r\n\t\techo (\" <td \".$this->cssTdId.\"> \\n\");\r\n \t// NEXT\r\n\t\t$this->drawNext();\r\n\t\techo (\" </td>\\n\");\r\n\t\techo (\" <td \".$this->cssTdId.\"> \\n\");\r\n \t// LAST\r\n \t$this->drawLast();\r\n\t\techo (\" </td>\\n\");\r\n\t\techo (\" </tr>\\n\");\r\n\t\techo (\"</table>\\n\");\r\n \t}",
"function style(){\r\n\t\tif (isset($_GET[\"page\"]) && is_numeric($_GET[\"page\"])) {\r\n\t\t\t$getPage = $_GET[\"page\"];\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$getPage = 0;\r\n\t\t}\r\n\t\techo \"#li\".$getPage.\"nk{color: #3e8958; text-decoration: underline;}\";\r\n\t}",
"function referrer_link( $format = '%link', $title = '%title', $sep = '»', $sepdirection = 'left' ) {\n\techo Smarter_Navigation::referrer_link( $format, $title, $sep, $sepdirection );\n}",
"function click_link($url)\n\t{\n\t\treturn Backend_Html::click_link($url);\n\t}",
"function back_link($width)\n\t{\n\t\tif(empty($_POST))\n\t\t\t$_SESSION['back_page'] = $_SERVER['HTTP_REFERER'];\n\t\t\t\n\t\t\techo '<table width=\"'.$width.'\" border=\"0\" align=\"center\"><tr><td align=\"right\" valign=\"middle\"><a href=\"'.$_SESSION['back_page'].'\" title=\"'.BACK_ICON_ALT.'\"><img border=\"0\" align=\"absmiddle\" src=\"'.BACK_ICON.'\" title=\"'.BACK_ICON_ALT.'\" alt=\"'.BACK_ICON_ALT.'\">Back</a></td></tr></table>';\n\t}",
"public function sessionLink(){\n\t\tif($page = SessionsHolder::get()->First()) {\n\t\t\treturn $page->Link();\n\t\t}\n\t}"
] |
[
"0.67241204",
"0.64281714",
"0.64281714",
"0.62718755",
"0.624596",
"0.6194429",
"0.61796737",
"0.61580276",
"0.6112657",
"0.6101462",
"0.60403633",
"0.59967077",
"0.59899426",
"0.595221",
"0.5941149",
"0.5928515",
"0.58930814",
"0.58877265",
"0.5871034",
"0.5851947",
"0.5831491",
"0.58262855",
"0.58215475",
"0.58114845",
"0.579371",
"0.5792604",
"0.578661",
"0.57834285",
"0.5780954",
"0.577394"
] |
0.7561607
|
0
|
draws a link to the page specified by the GUID
|
public function drawLinkByGUID($guid) {
global $db, $site, $siteLink, $http;
$query = "SELECT p.parent, p.name FROM pages p WHERE guid = '$guid'";
$data = $db->get_row($query);
//echo "SELECT parent,name FROM pages WHERE guid = '$guid'<br />";
$location = array();
$html = '';
// Its a bit messy but make sure we don't have any pages that are their own parent.
if ($data->parent == $guid) {
$query = "UPDATE pages SET parent='".($site->id+0)."' WHERE guid='$guid'";
//print "$query<br>\n";
$db->query($query);
}
if ($data->parent == 0 && $guid != 1) {
// if this is the homepage
$html = $data->name."/";
}
else {
while ($data->parent != 0 && $data->parent!=$guid) {
$html = $data->name."/".$html;
$data = $db->get_row("SELECT parent,name FROM pages WHERE guid = '{$data->parent}'");
//echo "SELECT parent,name FROM pages WHERE guid = '{$data->parent}'<br />";
}
}
//print_r($data);
//echo "<!-- html - $html -->\n";
//echo "<!-- site link ($siteLink) -->\n";
if ($siteLink) $microsite=$siteLink;
//else $microsite="http://".$_SERVER['SERVER_NAME']."/".$_SESSION['treeline_user_site_name']."/".$_SESSION['treeline_user_language']."/";
else $microsite=$http."://".$_SERVER['SERVER_NAME']."/".$_SESSION['treeline_user_site_name']."/".$_SESSION['treeline_user_language']."/";
if (substr($html, -1, 1)!="/") $html.="/";
$new_link=$microsite.$html;
//print "<!-- got new link($new_link) last2(".substr($new_link, -2, 2).") -->\n";
// Sometimes end up with an extra / on the end of the home page.
if (substr($new_link, -2, 2)=="//") $new_link=substr($new_link, 0, -1);
return $new_link;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function drawLink() {\n\t\t\treturn $this->drawLinkByGUID($this->guid);\n\t\t\t\n\t\t\tglobal $db;\n\t\t\t$data = $db->get_row(\"SELECT parent,name FROM pages WHERE guid = '{$this->guid}'\");\n\t\t\t$location = array();\n\t\t\t$html = '';\n\t\t\tif ($data->parent == 0) {\n\t\t\t\t//$html .= '/'.$data->name.$html;\n\t\t\t\t$html = '';\n\t\t\t}\n\t\t\telse {\n\t\t\t\twhile ($data->parent != 0) {\n\t\t\t\t\t$html = '/'.$data->name.$html;\n\t\t\t\t\t$data = $db->get_row(\"SELECT parent,name FROM pages WHERE guid = '{$data->parent}'\");\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $html . '/'; // .html removed and replaced by a /\n\t\t}",
"public function static_page($guid)\n {\n\n $this->_layout($guid);\n }",
"public function index()\n\t{\n\t\t//on récupère l'URL\n\t\t//echo \"on cherche : \".$this->guid;\n\t\t\n\t\t\n\t}",
"function PDF_add_weblink($pdfdoc, $lowerleftx, $lowerlefty, $upperrightx, $upperrighty, $url)\n{\n}",
"public function generateLink($params)\n {\n }",
"function personlink($personid, $text) {\n\treturn \"<a href=\\\"\". personlinkurl($personid) .\"\\\">$text</a>\";\n}",
"public function setGuid($guid, $isPermalink = false);",
"public function getLink() {\n\t\t\t// This is currently identical to drawLink()\n\t\t\t// but that's designed to return HTML, and may in the future contain formatting etc\n\t\t\tglobal $db;\n\t\t\t$data = $db->get_row(\"SELECT parent,name FROM pages WHERE guid = '{$this->guid}'\");\n\t\t\t$location = array();\n\t\t\t$html = '';\n\t\t\twhile ($data->parent != 0) {\n\t\t\t\t$html = '/'.$data->name.$html;\n\t\t\t\t$data = $db->get_row(\"SELECT parent,name FROM pages WHERE guid = '{$data->parent}'\");\n\t\t\t}\n\t\t\treturn $html . '/'; // .html removed and replaced by a /\n\t\t}",
"function locallink($hash, $name = null, $returnonly = false) {\n global $ID;\n $name = $this->_getLinkTitle($name, $hash, $isImage);\n $hash = $this->_headerToLink($hash);\n $title = $ID.' ↵';\n\n $doc = '<a href=\"#'.$hash.'\" title=\"'.$title.'\" class=\"wikilink1\">';\n $doc .= $name;\n $doc .= '</a>';\n\n if($returnonly) {\n return $doc;\n } else {\n $this->doc .= $doc;\n }\n }",
"function linkgml($gkz, $gml, $typ) {\n\t$kurzid=substr($gml, 12); // ID in Anzeige kuerzen (4 Zeichen), der Anfang ist immer gleich\n\techo \"\\n\\t\\t<a target='_blank' title='ID \".$typ.\"' class='gmlid noprint' \";\n\techo \"href='alkisrelationen.php?gkz=\".$gkz.\"&gmlid=\".$gml.\"&otyp=\".$typ.\"'>\";\n\techo \"<img src='ico/Beziehung_link.ico' width='16' height='16' alt=''>\".$kurzid.\"</a>\";\n\treturn 0;\n}",
"function drawLink()\r\n\t{\r\n\t\tglobal $user;\r\n\t\tif(!$user) return;\r\n\t\t$forum_id = $this->topic->forum_id;\r\n\t\t\r\n\t\tif($this->subscription)\r\n\t\t{\r\n\t\t\t$this->drawIconLink($this->subscribedForumIcon, \"You are Currently Subscribed to all Topics in this Forum\", \r\n\t\t\t\t$forum_id);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif($this->topicSubscription)\r\n\t\t\t{\r\n\t\t\t\t$this->drawIconLink($this->subscribedTopicIcon, \"You are Currently Subscribed to this Topic\", \r\n\t\t\t\t\t$forum_id);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$this->drawButtonLink($this->subscribeTopicButton, $forum_id);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"function click_link($url)\n\t{\n\t\treturn Backend_Html::click_link($url);\n\t}",
"public function link()\r\n\t{\r\n\t\t$language_segment = (Config::get('core::languages')) ? $this->language->uri . '/' : '';\r\n\r\n\t\treturn url($language_segment . 'galleries/' . $this->gallery->slug . '/' . $this->id);\r\n\t}",
"function echoDocumentLink ($row)\r{\r\t// name and the event ids that need to be highlighted.\r\r\t$file = $row[3];\r\t$id1 = $row[6];\r\t$id2 = $row[7];\r\t$file = $row['tmlfile'];\r\t$id1 = $row['eid1'];\r\t$id2 = $row['eid2'];\r\techo \"<a href=displayArticle.php?file=$file&highlight=$id1,$id2 target=_NEW>\";\r\techo \"<img src=inline004.gif border=0></a>\\n\";\r}",
"function Link($x,$y,$w,$h,$link)\n\t\t{\n\t\t\t$this->PageLinks[$this->page][]=array($x*$this->k,$this->hPt-$y*$this->k,$w*$this->k,$h*$this->k,$link);\n\t\t}",
"function render_link($text, $url) {\n return \"<a href=\\\"$url\\\">$text</a>\";\n }",
"public function makeLinkButton() {}",
"function getLinkToEvent($id, $customText = \"\", $urlOnly = false) {\n\t\t$d = $this->getEventDetails($id);\n\t\t//$url = \"/\".$this->fullslug.\"/\".date(\"Y\",$d['start']).\"/?show_event=$id\";\n\t\t$url = $this->generateCoolURL(\"/\",\"show_event=\".$id);\n\t\t$year = date(\"Y\",$d['startdate']);\n\t\tif (!empty($d['slug'])) $url = $this->generateCoolURL(\"/$year/\".stripslashes($d['slug']));\n\t\tif ($urlOnly) return $url;\n\t\t$txt = $d['caption'];\n\t\tif (!empty($customText)) $txt = $customText;\n\t\treturn \"<a href=\\\"$url\\\" class=\\\"icn\\\" style=\\\"background-image:url(/images/icns/calendar.png);\\\">$txt</a>\";\n\t}",
"public function drawBreadcrumb($guid = false){\n\t\t global $db, $siteID, $page;\n\t\t $guid = ($guid) ? $guid : $this->guid;\n\t\t $html = '';\n\t\t $link = array();\n\t\t \n\t\t \t// current page\n\t\t \t$link[] = $this->drawTitleByGUID($guid);\n\t\t \n\t\t \t// add all precedings parents to the array\n\t\t\twhile($parent = $this->getParentByGUID($guid)){\n\t\t\t\t$pagetitle=$this->drawTitleByGUID($parent);\n\t\t\t\t$pagetitle=(strtolower($pagetitle)==\"home\")?$page->drawLabel(\"home\", \"Home\"):$pagetitle;\n\t\t\t\t$link[] = '<a href=\"'. $this->drawLinkByGUID($parent) .'\">'.ucfirst($pagetitle).'</a>';\n\t\t\t\t$guid = $parent;\n\t\t \t}\n\t\t \n\t\t \tif($link){\n\t\t\t\tkrsort($link);\n\t\t \t}\n\t\t \n\t\t \t// Add a home link\n\t\t\t$last = sizeof($link);\n\t\t\t$pagetitle=$this->drawTitleByGUID($siteID);\n\t\t\t$pagetitle=(strtolower($pagetitle)==\"home\")?$page->drawLabel(\"home\", \"Home\"):$pagetitle;\n\t\t \t$link[$last-1] = '<a href=\"'. $this->drawLinkByGUID($siteID) .'\">'.$pagetitle.'</a>';\n\t\t \t// this is a microsite so remove the first (duplicate) link\n\t\t \tif($link[$last-1] == $link[$last-2]){\n\t\t\t\tunset($link[$last-1]);\n\t\t \t}\n\n\t\t \t$html = join(' > ',$link); // add the separator\n\t\t \n\t\t \treturn $html; \n\t\t}",
"function _wp_link_page($i)\n {\n }",
"function echoDocumentLink2 ($file,$id1,$id2)\r{\r\t// name and the event ids that need to be highlighted.\r\t// *** Very similar to echoDocumentLink, need to merge them\r\t\r\techo \"<a href=displayArticle.php?file=$file&highlight=$id1,$id2 target=_NEW>\";\r\techo \"<img src=inline004.gif border=0></a>\\n\";\r}",
"function lqd_page_link( $link, $post_id ) {\n\tglobal $wp_query;\n\tif( isset( $wp_query->query_vars['messages-app-view'] ) ) {\n\t\treturn $link . 'messages-app-view/';\n\t}\n\treturn $link;\n}",
"function Link($x, $y, $w, $h, $link) {\n if (is_subclass_of($this, 'TCPDF')) {\n \t$args = func_get_args();\n\t\t\treturn call_user_func_array(array($this, 'TCPDF::Link'), $args);\n }\n \n if ($this->_intpl)\n $this->Error('Using links in templates aren\\'t possible!');\n \n parent::Link($x, $y, $w, $h, $link);\n }",
"public function getLink();",
"public function getLink();",
"function build_link($text, $page){\n\t$format = '<a href=\"%2$s\">%1$s</a>';\n\n\tprintf($format, $text, link_to($page, false));\n}",
"function randomPageObject()\n\t{\n\t\t$this->checkPermission(\"read\");\n\t\t\n\t\tinclude_once(\"./Modules/Wiki/classes/class.ilWikiPage.php\");\n\t\t$page = ilWikiPage::getRandomPage($this->object->getId());\n\t\t$this->gotoPageObject($page);\n\t}",
"function _get_page_link($post = \\false, $leavename = \\false, $sample = \\false)\n {\n }",
"function createURLLink($purchase_id){\r\n\t\t$p_removed_id = substr($purchase_id, 1);\r\n\t\t$link = '<a href=\"https://www.trademe.co.nz/MyTradeMe/PurchaseSummary.aspx?asid='.$p_removed_id.'\">'.$purchase_id.'</a>';\r\n\t\treturn $link;\r\n\t}",
"function Link($id,$title,$url,$description,$category_id,$on_homepage)\n\t{\n\t\tparent::Resource($id,RESOURCE_LINK);\n\t\t$this->title = $title;\n\t\t$this->url = $url;\n\t\t$this->description = $description;\t\n\t\t$this->category_id = $category_id;\n\t\t$this->on_homepage = $on_homepage;\n\t}"
] |
[
"0.70534223",
"0.59024376",
"0.5776497",
"0.57279086",
"0.56900275",
"0.56597596",
"0.56207883",
"0.55742484",
"0.55579853",
"0.555112",
"0.55494875",
"0.55317414",
"0.55221874",
"0.54681855",
"0.54570544",
"0.54319376",
"0.54293054",
"0.54262024",
"0.5424044",
"0.54216206",
"0.5410416",
"0.54081106",
"0.53999305",
"0.5390766",
"0.5390766",
"0.5362663",
"0.53530383",
"0.53493917",
"0.533959",
"0.532601"
] |
0.7601138
|
0
|
/ drawBreadcrumb create a breadcrumb string of current page and it's parents
|
public function drawBreadcrumb($guid = false){
global $db, $siteID, $page;
$guid = ($guid) ? $guid : $this->guid;
$html = '';
$link = array();
// current page
$link[] = $this->drawTitleByGUID($guid);
// add all precedings parents to the array
while($parent = $this->getParentByGUID($guid)){
$pagetitle=$this->drawTitleByGUID($parent);
$pagetitle=(strtolower($pagetitle)=="home")?$page->drawLabel("home", "Home"):$pagetitle;
$link[] = '<a href="'. $this->drawLinkByGUID($parent) .'">'.ucfirst($pagetitle).'</a>';
$guid = $parent;
}
if($link){
krsort($link);
}
// Add a home link
$last = sizeof($link);
$pagetitle=$this->drawTitleByGUID($siteID);
$pagetitle=(strtolower($pagetitle)=="home")?$page->drawLabel("home", "Home"):$pagetitle;
$link[$last-1] = '<a href="'. $this->drawLinkByGUID($siteID) .'">'.$pagetitle.'</a>';
// this is a microsite so remove the first (duplicate) link
if($link[$last-1] == $link[$last-2]){
unset($link[$last-1]);
}
$html = join(' > ',$link); // add the separator
return $html;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"function create_crumbs() {\n\t\n\t\t$breadcrumb = '';\n\t\t$args = $this->args;\n\n\t\t// Get the items based on page context \n\t\t$trail = $this->get_trail();\n\n\t\t// If items are found, build the trail \n\t\tif ( !empty( $trail ) && is_array( $trail ) ) {\n\n\t\t\t// Wrap the trail and add the 'Before' element\n\t\t\t$breadcrumb = '<'.$args['container']. ' class=\"breadcrumb-trail breadcrumbs\">';\n\t\t\t$breadcrumb .= ( !empty( $args['before'] ) ? '<span class=\"trail-before\">' . $args['before'] . '</span> ' : '' );\n\t\t\t\n\t\t\t// Adds the 'trail-end' class around last item \n\t\t\tarray_push( $trail, '<span class=\"trail-end\">' . array_pop( $trail ) . '</span>' );\n\t\t\t\n\t\t\t// Format the separator \n\t\t\t$separator = ( !empty( $args['separator'] ) ? $args['separator'] : '' );\n\n\t\t\t// Join the individual trail items into a single string \n\t\t\t$breadcrumb .= join( \" {$separator} \", $trail );\n\n\t\t\t// Close the breadcrumb trail containers \n\t\t\t$breadcrumb .= '</' . $args['container'] . '>';\n\t\t}\n\n\t\t// Return the formatted breadcrumbs\n\t\treturn $breadcrumb;\n\t}",
"private function _buildBreadcrumbsHtml()\n {\n // Get active elements\n $nodes = $this->_getActiveElements();\n\n // Do we have custom nodes?\n $customNodes = $this->_getParam('customNodes', false);\n if ($customNodes && is_array($customNodes) && count($customNodes)) {\n $nodes = array_merge($nodes, $customNodes);\n }\n\n // Create breadcrumbs\n $length = count($nodes);\n $breadcrumbs = \"\\n\" . sprintf('<%1$s%2$s%3$s xmlns:v=\"http://rdf.data-vocabulary.org/#\">',\n $this->_getParam('wrapper', 'ol'),\n $this->_getParam('id', false) ? ' id=\"' . $this->_getParam('id', '') . '\"' : '',\n $this->_getParam('class', false) ? ' class=\"' . $this->_getParam('class', '') . '\"' : ''\n );\n\n // Before text\n if ($this->_getParam('beforeText', false)) {\n $breadcrumbs .= sprintf(\"\\n\" . '<li%1$s><span>%2$s</span></li>',\n $this->_getParam('classDefault', false) ? ' class=\"' . $this->_getParam('classDefault', '') . '\"' : '',\n $this->_getParam('beforeText', '')\n );\n }\n\n foreach ($nodes as $index => $node) {\n $nodeTitle = is_array($node) ? (isset($node['title']) ? $node['title'] : Craft::t('Unknown')) : $node->__toString();\n $nodeUrl = is_array($node) ? (isset($node['url']) ? $node['url'] : '') : $node->url;\n\n // Gather node classes\n $childClasses = array();\n if ($this->_getParam('classDefault', false)) {\n $childClasses[] = $this->_getParam('classDefault', '');\n }\n\n // First\n if ($index == 0) {\n $childClasses[] = $this->_getParam('classFirst', 'first');\n $breadcrumbs .= sprintf(\"\\n\" . '<li%1$s typeof=\"v:Breadcrumb\"><a href=\"%2$s\" title=\"%3$s\" rel=\"v:url\" property=\"v:title\">%3$s</a></li>',\n $childClasses ? ' class=\"' . implode(' ', $childClasses) . '\"' : '',\n $nodeUrl,\n $this->_getParam('renameHome', $nodeTitle)\n );\n }\n // Last\n elseif ($index == $length - 1)\n {\n $childClasses[] = $this->_getParam('classLast', 'last');\n $breadcrumb = sprintf('<span property=\"v:title\">%1$s</span>',\n $nodeTitle\n );\n if ($this->_getParam('lastIsLink', false)) {\n $breadcrumb = sprintf('<a href=\"%1$s\" title=\"%2$s\" rel=\"v:url\" property=\"v:title\">%2$s</a>',\n $nodeUrl,\n $nodeTitle\n );\n }\n $breadcrumbs .= sprintf(\"\\n\" . '<li%1$s typeof=\"v:Breadcrumb\">%2$s</li>',\n $childClasses ? ' class=\"' . implode(' ', $childClasses) . '\"' : '',\n $breadcrumb\n );\n }\n else {\n $breadcrumbs .= sprintf(\"\\n\" . '<li%1$s typeof=\"v:Breadcrumb\"><a href=\"%2$s\" title=\"%3$s\" rel=\"v:url\" property=\"v:title\">%3$s</a></li>',\n $childClasses ? ' class=\"' . implode(' ', $childClasses) . '\"' : '',\n $nodeUrl,\n $nodeTitle\n );\n }\n }\n $breadcrumbs .= \"\\n\" . sprintf('</%1$s>',\n $this->_getParam('wrapper', 'ol')\n );\n return TemplateHelper::getRaw($breadcrumbs);\n }",
"public static function getCrumbsHtml()\n {\n $html = \"\\n\";\n $glue = ' <span class=\"glyphicon glyphicon-chevron-right\"></span> ';\n $trail = [];\n $menuArray = self::getMenuArray();\n\n // get pagePath (only from site-root), and adjust to the same format as how the $menu_array paths are defined\n $pagePath = self::pagePathFromSiteRoot(''); // '' = no extension as per $menu_array path definitions\n if(substr($pagePath,-5)=='index') $pagePath = substr($pagePath,0,strlen($pagePath)-5); // also remove /path/\"index\" as per $menu_array path definitions\n #dmsg('pagePath',$pagePath,'crumbs');\n\n // prepare home link for beginning of trail\n $homeLink = '<a href=\"' . self::_menuLink2href(self::homePath()) . '\">Home</a>';\n\n // search the menu array for matching path\n if ( self::findPageInMenu( $pagePath, $menuArray, $trail ) ) {\n $trail[] = $homeLink;\n dmsg('trail',$trail,'crumbs');\n $html .= implode( $glue, array_reverse( $trail ) );\n } else {\n // not in menuArray, use this pages dir components to build a virtual trail\n $trail = explode('/', trim(self::$pathComponentDirs,'/')); if(isset($trail[0]) && $trail[0]=='') $trail=[];\n #$trail[] = '<a href=\"' . self::_menuLink2href($pagePath) . '\">'.self::pageFilename('').'</a>';\n $trail[] = self::pageFilename(''); // dont href self\n array_unshift($trail, $homeLink);\n dmsg('trail',$trail,'crumbs');\n $html .= '<span class=\"capitalize\">' . implode( $glue, $trail ) . '</span>';\n }\n return $html;\n }",
"function eo_bbpm_get_breadcrumb() {\n}",
"protected function _generateBreadcrumb()\r\n {\r\n $links = null;\r\n $texthomelink = $this->view->translate('id_menu_home');\r\n // id_title_overseas = 'Overseas Representatives'\r\n $title = $this->view->translate('id_title_overseas');\r\n $links = array(\r\n $texthomelink => $this->view->baseUrl('/'),\r\n $title => '',\r\n );\r\n $this->view->pageTitle = $title;\r\n\r\n Zend_Registry::set('breadcrumb', $links);\r\n }",
"public function trail() {\n\n\t\t$breadcrumb = '';\n\t\t$item_count = count( $this->items );\n\t\t$item_position = 0;\n\n\t\tif ( 0 < $item_count ) {\n\n\t\t\tif ( true === $this->args['show_browse'] )\n\t\t\t\t$breadcrumb .= sprintf( '<h2 class=\"trail-browse\">%s</h2>', $this->labels['browse'] );\n\n\t\t\t$breadcrumb .= '<ol class=\"breadcrumb '.$this->args['classes'].'\" itemscope itemtype=\"http://schema.org/BreadcrumbList\">';\n\n\t\t\t$breadcrumb .= sprintf( '<meta name=\"numberOfItems\" content=\"%d\" />', absint( $item_count ) );\n\t\t\t$breadcrumb .= '<meta name=\"itemListOrder\" content=\"Ascending\" />';\n\n\t\t\tforeach ( $this->items as $item ) {\n\n\t\t\t\t++$item_position;\n\n\t\t\t\tpreg_match( '/(<a.*?>)(.*?)(<\\/a>)/i', $item, $matches );\n\n\t\t\t\t$item = !empty( $matches ) ? sprintf( '%s<span itemprop=\"name\">%s</span>%s', $matches[1], $matches[2], $matches[3] ) : sprintf( '<span itemprop=\"name\">%s</span>', $item );\n\n\t\t\t\t$item_class = 'breadcrumb-item';\n\n\t\t\t\tif ( $item_count === $item_position )\n\t\t\t\t\t$item_class .= ' active';\n\n\t\t\t\t$attributes = 'itemprop=\"itemListElement\" itemscope itemtype=\"http://schema.org/ListItem\" class=\"' . $item_class . '\"';\n\n\t\t\t\t$meta = sprintf( '<meta itemprop=\"position\" content=\"%s\" />', absint( $item_position ) );\n\n\t\t\t\t$breadcrumb .= sprintf( '<li %s>%s%s</li>', $attributes, $item, $meta );\n\t\t\t}\n\n\t\t\t$breadcrumb .= '</ol>';\n\n\t\t\t$breadcrumb = sprintf(\n\t\t\t\t'<%1$s role=\"navigation\" aria-label=\"%2$s\" class=\"breadcrumbs\" itemprop=\"breadcrumb\">%3$s%4$s%5$s</%1$s>',\n\t\t\t\ttag_escape( $this->args['container'] ),\n\t\t\t\tesc_attr( $this->labels['aria_label'] ),\n\t\t\t\t$this->args['before'],\n\t\t\t\t$breadcrumb,\n\t\t\t\t$this->args['after']\n\t\t\t);\n\t\t}\n\n\t\tif ( false === $this->args['echo'] )\n\t\t\treturn $breadcrumb;\n\n\t\techo $breadcrumb;\n\t}",
"private function buildBreadCrumb() {\n if (is_array($this->breadcrumb)) {\n foreach ($this->breadcrumb as $index => $value) {\n $breadcrumb .= ! is_null($breadcrumb) ? \"<li>› </li>\" : NULL;\n if (is_string($index))\n $breadcrumb .= sprintf(\"<li><a class='current_page' href='%s' title='%s' alt='%s'>%s</a></li>\", $value, $index, $index, $index);\n else\n $breadcrumb .= sprintf(\"<li>%s</li>\", $value);\n }\n }\n return $breadcrumb;\n }",
"public function breadCrumb()\n\t{\n\t\treturn parent::breadCrumb().\" \".$GLOBALS['super']->config->crumbSeperator.\" \".$this->getName();\n\t}",
"public function breadCrumb()\n\t{\n\t\treturn parent::breadCrumb().\" \".$GLOBALS['super']->config->crumbSeperator.\" \".$this->getName();\n\t}",
"public static function breadcrumbs() {\n\t\tif(!self::has_breadcrumbs()) return;\n\t\t?>\n\t\t\t<h6 id=\"header-breadcrumbs\">\n\t\t\t\t<?php dimox_breadcrumbs('·') ?>\n\t\t\t</h6>\n\t\t<?php\n\t}",
"function breadcrumbs(BreadcrumbsParams $params) : string\n{\n $path = array_filter(explode('/', parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)));\n // This one removes 'oildiscovery' from the path in development environment\n $path = array_diff($path, ['oildiscovery']);\n\n // This is the base URL\n $base = URLROOT;\n \n\n // Initialize a temporary array with our breadcrumbs. (starting with our home page, which will be the base URL)\n $breadcrumbs = array(\"<a class='breadcrumbs__link' href=\\\"$base\\\">$params->home</a>\");\n\n // Find out the index for the last value in our path array\n $pathkeys = array_keys($path);\n $last = end($pathkeys);\n // Build the rest of the breadcrumbs\n foreach ($path as $key => $crumb) {\n // \"title\" is the text that will be displayed (strip out .php and turn '_' into a space)\n $title = ucwords(str_replace(array('.php', '_'), array('', ' '), $crumb));\n\n // If we are not on the last index, then display an <a> tag\n if ($key != $last) {\n $breadcrumbs[] = \"<a class='breadcrumbs__link' href=\\\"$base\\\\$crumb\\\">$title</a>\";\n }\n // Otherwise, just display the title (minus)\n if ($key === $last) {\n // If the last index is an integer then replace the post id with post title\n if (is_numeric($crumb)) {\n $breadcrumbs[] = $params->post_title;\n } else {\n $breadcrumbs[] = $title;\n }\n }\n\n if (is_numeric($crumb)) {\n }\n }\n\n // Build our temporary array (pieces of bread) into one big string :)\n return implode($params->separator, $breadcrumbs);\n}",
"function the_breadcrumb() {\n\t global $post;\n\t $separator = '<span class=\"breadcrumb-divider\"><svg width=\"16\" height=\"17\" viewBox=\"0 0 16 17\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M16 8.49993L13.4394 5.93933V7.99599H0V9.00394H13.4394V11.0606L16 8.49993Z\" fill=\"#121212\" /></svg></span>';\n\t echo '<nav aria-label=\"breadcrumb\"><ol class=\"breadcrumb\">';\n\t if (!is_home()) {\n\t\t\t echo '<li class=\"breadcrumb-item\"><a href=\"';\n\t\t\t echo get_option('home');\n\t\t\t echo '\">';\n\t\t\t echo __( 'Home', 'thegrapes' );\n\t\t\t echo '</a></li>' . $separator;\n\t\t\t if ( is_category() ) {\n\t\t\t\t\t echo '<li class=\"breadcrumb-item active\">';\n\t\t\t\t\t the_category(' </li>' . $separator . '<li class=\"breadcrumb-item\"> ');\n\t\t\t } elseif ( is_single() ) {\n echo '<li class=\"breadcrumb-item\">';\n echo '<a href=\"' . get_post_type_archive_link( 'post' ) . '\">';\n echo get_the_title( get_option('page_for_posts', true) );\n echo '</a>';\n echo '</li>' . $separator . '<li class=\"breadcrumb-item active\">';\n the_title();\n echo '</li>';\n } elseif ( is_page() ) {\n\t\t\t\t\t if($post->post_parent){\n\t\t\t\t\t\t\t $anc = get_post_ancestors( $post->ID );\n\t\t\t\t\t\t\t $title = get_the_title();\n\t\t\t\t\t\t\t foreach ( $anc as $ancestor ) {\n\t\t\t\t\t\t\t\t\t $output = '<li class=\"breadcrumb-item\"><a href=\"'.get_permalink($ancestor).'\" title=\"'.get_the_title($ancestor).'\">'.get_the_title($ancestor).'</a></li>' . $separator;\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t echo $output;\n\t\t\t\t\t\t\t echo '<li class=\"breadcrumb-item active\">'.$title.'</li>';\n\t\t\t\t\t } else {\n\t\t\t\t\t\t\t echo '<li class=\"breadcrumb-item active\">'.get_the_title().'</li>';\n\t\t\t\t\t }\n\t\t\t }\n\t }\n\t elseif (is_tag()) {single_tag_title();}\n\t elseif (is_day()) {echo\"<li>Archive for \"; the_time('F jS, Y'); echo'</li>';}\n\t elseif (is_month()) {echo\"<li>Archive for \"; the_time('F, Y'); echo'</li>';}\n\t elseif (is_year()) {echo\"<li>Archive for \"; the_time('Y'); echo'</li>';}\n\t elseif (is_author()) {echo\"<li>Author Archive\"; echo'</li>';}\n\t elseif (isset($_GET['paged']) && !empty($_GET['paged'])) {echo \"<li>Blog Archives\"; echo'</li>';}\n\t elseif (is_search()) {echo\"<li>Search Results\"; echo'</li>';}\n\t echo '</ol></nav>';\n}",
"function mpcth_display_breadcrumb() {\r\n\tglobal $post;\r\n\t$id = $post->ID;\r\n\t$return = '<a href=\"/\">' . __('Home', 'mpcth') . '</a>';\r\n\r\n\tif(is_front_page()) {\r\n\t\t// do nothing\r\n\t} elseif(is_page()) {\r\n\t\t$page = get_post($id);\r\n\r\n\t\t$parent_pages = array();\r\n\t\t$parent_pages[] = ' <span class=\"mpcth-header-devider\">/</span> ' . $page->post_title . \"\\n\";\r\n\r\n\t\twhile ($page->post_parent) {\r\n\t\t\t$page = get_post($page->post_parent);\r\n\t\t\t$parent_pages[] = ' <span class=\"mpcth-header-devider\">/</span> <a href=\"' . get_permalink($page->ID) . '\">' . $page->post_title . '</a>';\r\n\t\t}\r\n\r\n\t\t$parent_pages = array_reverse($parent_pages);\r\n\r\n\t\tforeach ($parent_pages as $parent) {\r\n\t\t\t$return .= $parent;\r\n\t\t}\r\n\t} elseif(is_single()) {\r\n\t\tif($post->post_type == 'post') {\r\n\t\t\t$category = get_the_category($id);\r\n\r\n\t\t\tif(!empty($category)){\r\n\t\t\t\t$data = get_category_parents($category[0]->cat_ID, true, ' <span class=\"mpcth-header-devider\">/</span> ');\r\n\t\t\t\t$return .= ' <span class=\"mpcth-header-devider\">/</span> ' . substr($data, 0, -strlen(' <span class=\"mpcth-header-devider\">/</span> '));\r\n\t\t\t}\r\n\t\t} elseif($post->post_type == 'portfolio') {\r\n\t\t\t$terms = get_the_terms($id, 'mpcth_portfolio_category');\r\n\t\t\t\r\n\t\t\tif(!empty($terms)){\r\n\t\t\t\t$return .= ' <span class=\"mpcth-header-devider\">/</span> ';\r\n\r\n\t\t\t\tforeach ($terms as $term) {\r\n\t\t\t\t\t$return .= ' <a href=\"' . get_term_link($term) . '\">' . $term->name . '</a>';\r\n\t\t\t\t\t\r\n\t\t\t\t\tif($term !== end($terms))\r\n\t\t\t\t\t\t$return .= ', ';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$return .= ' <span class=\"mpcth-header-devider\">/</span> ' . $post->post_title . \"\\n\";\r\n\t} elseif(is_category()) {\r\n\t\t$category = get_the_category($id);\r\n\t\t$data = get_category_parents($category[0]->cat_ID, true, ' <span class=\"mpcth-header-devider\">/</span> ');\r\n\r\n\t\tif(!empty($category)){\r\n\t\t\t$return .= ' <span class=\"mpcth-header-devider\">/</span> ' . substr($data,0,-8);\r\n\t\t}\r\n\t} elseif(is_tax()) {\r\n\t\t$term = get_term_by('slug', get_query_var('term'), get_query_var('taxonomy'));\r\n\t\t$return .= ' <span class=\"mpcth-header-devider\">/</span> <a href=\"' . get_term_link($term) . '\">' . $term->name . '</a>';\r\n\t}\r\n\r\n\treturn $return;\r\n}",
"public function getBreadcrumb() \r\n {\r\n if(!empty($this->_current_cms_seo)) {\r\n return isset($this->_current_cms_seo['breadcrumb']) ? $this->_current_cms_seo['breadcrumb'] : '';\r\n }\r\n }",
"protected function getBreadcrumbsPart()\n {\n ?>\n <?php\n //breadCrums\n $bc = $this->getBreadcrumbs();\n ?>\n\n <ol class=\"breadcrumb\" style=\"\">\n <?php\n\n foreach ($bc as $item):\n ?>\n <li><a href=\"<?= $item['url'] ?>\"><?= $item['name'] ?></a></li>\n <?php\n endforeach;\n ?>\n </ol>\n\n <?php\n }",
"public function getBreadcrumbs();",
"function breadcrumb(){\n\t global $view;\n\t \n \t$view_header = ucfirst($view);\n\treturn \"<ul class='breadcrumb'>\n\t <li>System</li>\n\t <li class='active'>$view_header</li>\n\t\t </ul>\";\n }",
"function _update_breadcrumb_line()\n {\n $tmp = Array();\n\n $tmp[] = Array\n (\n MIDCOM_NAV_URL => \"/\",\n MIDCOM_NAV_NAME => $this->_l10n->get('index'),\n );\n\n $_MIDCOM->set_custom_context_data('midcom.helper.nav.breadcrumb', $tmp);\n }",
"function print_breadcrumb()\n{\n $breadcrumbs = get_breadcrumb();\n for ($i = 0; $i < sizeof($breadcrumbs); $i++) {\n echo '<li class=\"breadcrumb-path breadcrumb-level-' . $i . '\">';\n echo '<a href=\"' . $breadcrumbs[$i]['url'] . '\">' . $breadcrumbs[$i]['title'] . '</a>';\n echo '</li>';\n }\n}",
"function breadcrumbs($separator = ' » ', $home = 'Home') {\n $path = array_filter(explode('/', parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)));\n\n // This will build our \"base URL\" ... Also accounts for HTTPS :)\n $base = ($_SERVER['HTTPS'] ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST'] . '/';\n\n // Initialize a temporary array with our breadcrumbs. (starting with our home page, which I'm assuming will be the base URL)\n $breadcrumbs = array(\"<a href=\\\"$base\\\">$home</a>\");\n\n // Initialize crumbs to track path for proper link\n $crumbs = '';\n\n // Find out the index for the last value in our path array\n $last = @end(array_keys($path));\n\n // Build the rest of the breadcrumbs\n foreach ($path as $x => $crumb) {\n // Our \"title\" is the text that will be displayed (strip out .php and turn '_' into a space)\n $title = ucwords(str_replace(array('.php', '_', '%20'), array('', ' ', ' '), $crumb));\n\n // If we are not on the last index, then display an <a> tag\n if ($x != $last) {\n $breadcrumbs[] = \"<a href=\\\"$base$crumbs$crumb\\\">$title</a>\";\n $crumbs .= $crumb . '/';\n }\n // Otherwise, just display the title (minus)\n else {\n $breadcrumbs[] = $title;\n }\n\n }\n\n // Build our temporary array (pieces of bread) into one big string :)\n return implode($separator, $breadcrumbs);\n}",
"function BreadCrumb(){}",
"function breadcrumbs($separator = ' » ', $home = 'Home') {\n\t // This gets the REQUEST_URI (/path/to/file.php), splits the string (using '/') into an array, and then filters out any empty values\n\t $path = array_filter(explode('/', parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)));\n\t //pre($path);\n\t // This will build our \"base URL\" ... Also accounts for HTTPS :)\n\t $base = base_url();\n\t \n\t // Initialize a temporary array with our breadcrumbs. (starting with our home page, which I'm assuming will be the base URL)\n\t $breadcrumbs = Array(\"<a href=\\\"$base\\\">$home</a>\");\n\t \n\t // Find out the index for the last value in our path array\n\t $last = end(array_keys($path));\n\t \n\t // Build the rest of the breadcrumbs\n\t foreach ($path AS $x => $crumb) {\n\t // Our \"title\" is the text that will be displayed (strip out .php and turn '_' into a space)\n\t $title = ucwords(str_replace(Array('.php', '_'), Array('', ' '), $crumb));\n\t \n\t // If we are not on the last index, then display an <a> tag\n\t if ($x != $last)\n\t $breadcrumbs[] = \"<a href=\\\"$base$crumb\\\">$title</a>\";\n\t // Otherwise, just display the title (minus)\n\t else\n\t $breadcrumbs[] = $title;\n\t }\n\t \n\t // Build our temporary array (pieces of bread) into one big string :)\n\t return implode($separator, $breadcrumbs);\n\t}",
"function ou_df_easy_breadcrumb($variables) {\n\n $breadcrumb = $variables['breadcrumb'];\n $segments_quantity = $variables['segments_quantity'];\n $separator = $variables['separator'];\n\n $html = '';\n\n if ($segments_quantity > 0) {\n\n $html .= '<dl class=\"breadcrumb\"><dt>You are here:</dt><dd>';\n\n for ($i = 0, $s = $segments_quantity - 1; $i < $segments_quantity; ++$i) {\n $it = $breadcrumb[$i];\n $content = decode_entities($it['content']);\n if (isset($it['url'])) {\n $html .= l($content, $it['url'], array('attributes' => array('class' => $it['class'])));\n } else {\n $class = implode(' ', $it['class']);\n $html .= '<span class=\"' . $class . '\">'\t. $content . '</span>';\n }\n if ($i < $s) {\n $html .= '<span class=\"easy-breadcrumb_segment-separator\"> ' . $separator . ' </span>';\n }\n }\n\n $html .= '</dd></dl>';\n }\n\n return $html;\n}",
"function breadcrumb_navigation( $page, $ref = array() ){\n\t$breadcrumb = $ref;\n\tif( !count( $breadcrumb ) ){\n\t\tarray_unshift( $breadcrumb, array( $page->post_title ) );\n\t} else {\n\t\tarray_unshift( $breadcrumb, array( $page->post_title, get_permalink( $page->ID ) ) );\n\t}\n\tif( $page->post_parent ){\n\t\tbreadcrumb_navigation( get_page( $page->post_parent ), $breadcrumb );\n\t\treturn;\n\t} else {\n\t\t/// process the breadcrumb\n\t\t$output = '<li class=\"home\"><a href=\"' . get_home_url() . '\">' . __( 'Home', '_supply_ontario' ) . '</a></li>';\n\t\tfor( $q = 0; $q < count( $breadcrumb ); ++$q ){\n\t\t\tif( count( $breadcrumb[$q] ) > 1 ){\n\t\t\t\t$output .= '<li><a href=\"' . $breadcrumb[$q][1] . '\">' . $breadcrumb[$q][0] . '</a></li>';\n\t\t\t} else {\n\t\t\t\t$output .= '<li class=\"current\">' . $breadcrumb[$q][0] . '</li>';\n\t\t\t}\n\t\t}\n\t\techo '<ul class=\"breadcrumb\">' . $output . '</ul>';\n\t}\n}",
"function hbreadcrumbs()\n\t{\n\t\t$uri = luri_get();\n\t\t$html = \"\";\n\n\t\t$cat = lconf_dbget(\"default_uri\");\n\t\t$cat = mcategories_read($cat);\n\t\t$html = $cat[\"name\"];\n\n\t\tif (strlen($uri[0]))\n\t\t{\n\t\t\t$html = '<a href=\"' . hanchor_shref() . '\">' . $html . '</a>';\n\n\t\t\tfor($i = 0; $i < count($uri); $i++)\n\t\t\t{\n\t\t\t\t$cat = mcategories_read($uri[$i]);\n\t\t\t\tif ($i < count($uri) - 1 && $cat) $html .= ' > <a href=\"' . hanchor_href(\"main/index/content\", mcategories_read_path($uri[$i], false)) . '\">' . $cat[\"name\"] . '</a>';\n\t\t\t\telse if ($cat) $html .= ' > <span>' . $cat[\"name\"] . '</span>';\n\t\t\t}\n\t\t}\n\t\telse $html = '<span>' . $html . '</span>';\n\n\t\treturn $html;\n\t}",
"function simple_pages_display_breadcrumbs($pageId = null, $seperator=' > ', $includePage=true)\n{\n $html = '';\n\n if ($pageId === null) {\n $page = get_current_record('simple_pages_page', false);\n } else {\n $page = get_db()->getTable('SimplePagesPage')->find($pageId);\n }\n\n if ($page) {\n $ancestorPages = get_db()->getTable('SimplePagesPage')->findAncestorPages($page->id);\n $bPages = array_merge(array($page), $ancestorPages);\n\n // make sure all of the ancestors and the current page are published\n foreach($bPages as $bPage) {\n if (!$bPage->is_published) {\n $html = '';\n return $html;\n }\n }\n\n // find the page links\n $pageLinks = array();\n foreach($bPages as $bPage) {\n if ($bPage->id == $page->id) {\n if ($includePage) {\n $pageLinks[] = html_escape($bPage->title);\n }\n } else {\n $pageLinks[] = '<a href=\"' . public_url($bPage->slug) . '\">' . html_escape($bPage->title) . '</a>';\n }\n }\n $pageLinks[] = '<a href=\"'. public_url('') . '\">' . __('Home') . '</a>';\n\n // create the bread crumb\n $html .= implode(html_escape($seperator), array_reverse($pageLinks));\n }\n return $html;\n}",
"function _get_breadcrumbs($starting_page, $container = array())\n{\n\n //make sure you're working with an object\n $sp = (!is_object($starting_page)) ? get_post($starting_page) : $starting_page;\n\n //make sure to insert starting page only once\n if (!in_array(get_permalink($sp->ID), $container)) {\n $container[get_permalink($sp->ID)] = get_the_title($sp->ID);\n }\n\n //if parent, recursion!\n if ($sp->post_parent > 0) {\n $container[get_permalink($sp->post_parent)] = get_the_title($sp->post_parent);\n $container = _get_breadcrumbs($sp->post_parent, $container);\n }\n\n return $container;\n}",
"function CreateBreadcrumb($categoryid, $tagtype='<a>') // or '<li>'\n{\n global $DB, $userinfo, $mainsettings, $pages_md_arr, $pages_parents_md_arr;\n\n if(!isset($pages_parents_md_arr)) return;\n $categories = array();\n $cat_id = $categoryid;\n while(!empty($cat_id))\n {\n if(isset($pages_md_arr[$cat_id]))\n {\n $cat = $pages_md_arr[$cat_id];\n array_unshift($categories, $cat);\n $cat_id = $cat['parentid'];\n }\n else\n {\n break;\n }\n }\n\n if(empty($categories))\n {\n return '';\n }\n\n $Breadcrumb = '';\n $count = count($categories);\n $idx = 1;\n // $categories is array with pages for a specific parent page\n foreach($categories as $category_arr)\n {\n // $category_arr contains actual page row (either cached or from DB)\n $category_name = strlen($category_arr['title'])?$category_arr['title']:$category_arr['name'];\n $category_link = strlen($category_arr['link']) ? $category_arr['link'] : RewriteLink('index.php?categoryid=' . $category_arr['categoryid']);\n $category_target = strlen($category_arr['target']) ? ' target=\"' . $category_arr['target'] . '\"' : '';\n switch($idx)\n {\n case 1 : $class ='class=\"first\" '; break;\n case $count: $class ='class=\"last\" '; break;\n default : $class = '';\n }\n //SD370: allow list items output\n //if($tagtype == '<li>') $Breadcrumb .= '<li>';\n if($category_arr['categoryid'] == $categoryid){\n $Breadcrumb .= '<li>'.$category_name.'</li>';\n }\n else{\n $Breadcrumb .= '<li><a '.$class.'href=\"'.$category_link.'\" '.$category_target.'>'.$category_name.'</a></li>';\n }\n //$Breadcrumb .= '<li><a '.$class.'href=\"'.$category_link.'\" '.$category_target.'>'.$category_name.'</a></li>';\n //if($tagtype == '<li>') $Breadcrumb .= '</li>';\n $idx++;\n }\n $Breadcrumb .= '<div style=\"clear:both;\"></div>'.\"\\n\";\n\n return $Breadcrumb;\n\n}",
"function apoc_breadcrumbs( $args = array() ) {\n\t$crumbs = new Apoc_Breadcrumbs( $args );\n\techo $crumbs->crumbs;\n}",
"function dimox_breadcrumbs() {\n\t\t$text['home'] = 'Home'; // text for the 'Home' link\n\t\t$text['category'] = '%s'; // text for a category page\n\t\t$text['search'] = 'Wyniki wyszukiwania dla \"%s\"'; // text for a search results page\n\t\t$text['404'] = 'Błąd 404'; // text for the 404 page\n\t\t$text['page'] = '%s'; // text 'Page N'\n\t\t$text['cpage'] = 'Comment Page %s'; // text 'Comment Page N'\n\t\t$wrap_before = '<div class=\"breadcrumbs\" itemscope itemtype=\"htt://schema.org/BreadCrumbList\">'; // the opening wrapper tag\n\t\t$wrap_after = '</div><!-- .breadcrumbs -->'; // the closing wrapper tag\n\t\t$sep = '›'; // separator between crumbs\n\t\t$sep_before = '<span class=\"sep\">'; // tag before separator\n\t\t$sep_after = '</span>'; // tag after separator\n\t\t$show_home_link = 1; // 1 - show the 'Home' link, 0 - don't show\n\t\t$show_on_home = 0; // 1 - show breadcrumbs on the homepage, 0 - don't show\n\t\t$show_current = 1; // 1 - show current page title, 0 - don't show\n\t\t$before = '<span class=\"current\">'; // tag before the current crumb\n\t\t$after = '</span>'; // tag after the current crumb\n\t\t/* === END OF OPTIONS === */\n\t\tglobal $post;\n\t\t$home_link = home_url('/');\n\t\t$link_before = '<span itemprop=\"itemListElement\" itemscope itemtype=\"http://schema.org/ListItem\">';\n\t\t$link_after = '</span>';\n\t\t$link_attr = ' itemprop=\"url\"';\n\t\t$link_in_before = '<span itemprop=\"title\">';\n\t\t$link_in_after = '</span>';\n\t\t$link = $link_before . '<a href=\"%1$s\"' . $link_attr . '>' . $link_in_before . '%2$s' . $link_in_after . '</a>' . $link_after;\n\t\t$frontpage_id = get_option('page_on_front');\n\t\t$parent_id = $post->post_parent;\n\t\t$sep = ' ' . $sep_before . $sep . $sep_after . ' ';\n\t\tif (is_home() || is_front_page()) {\n\t\t\tif ($show_on_home) echo $wrap_before . '<a href=\"' . $home_link . '\">' . $text['home'] . '</a>' . $wrap_after;\n\t\t} else {\n\t\t\techo $wrap_before;\n\t\t\tif ($show_home_link) echo sprintf($link, $home_link, $text['home']);\n\t\t\tif ( is_category() ) {\n\t\t\t\t$cat = get_category(get_query_var('cat'), false);\n\t\t\t\tif ($cat->parent != 0) {\n\t\t\t\t\t$cats = get_category_parents($cat->parent, TRUE, $sep);\n\t\t\t\t\t$cats = preg_replace(\"#^(.+)$sep$#\", \"$1\", $cats);\n\t\t\t\t\t$cats = preg_replace('#<a([^>]+)>([^<]+)<\\/a>#', $link_before . '<a$1' . $link_attr .'>' . $link_in_before . '$2' . $link_in_after .'</a>' . $link_after, $cats);\n\t\t\t\t\tif ($show_home_link) echo $sep;\n\t\t\t\t\techo $cats;\n\t\t\t\t}\n\t\t\t\tif ( get_query_var('paged') ) {\n\t\t\t\t\t$cat = $cat->cat_ID;\n\t\t\t\t\techo $sep . sprintf($link, get_category_link($cat), get_cat_name($cat)) . $sep . $before . sprintf($text['page'], get_query_var('paged')) . $after;\n\t\t\t\t} else {\n\t\t\t\t\tif ($show_current) echo $sep . $before . sprintf($text['category'], single_cat_title('', false)) . $after;\n\t\t\t\t}\n\t\t\t} elseif ( is_search() ) {\n\t\t\t\tif (have_posts()) {\n\t\t\t\t\tif ($show_home_link && $show_current) echo $sep;\n\t\t\t\t\tif ($show_current) echo $before . sprintf($text['search'], get_search_query()) . $after;\n\t\t\t\t} else {\n\t\t\t\t\tif ($show_home_link) echo $sep;\n\t\t\t\t\techo $before . sprintf($text['search'], get_search_query()) . $after;\n\t\t\t\t}\n\t\t\t} elseif ( is_single() && !is_attachment() ) {\n\t\t\t\tif ($show_home_link) echo $sep;\n\t\t\t\tif ( get_post_type() != 'post' ) {\n\t\t\t\t\t$post_type = get_post_type_object(get_post_type());\n\t\t\t\t\t$slug = $post_type->rewrite;\n\t\t\t\t\tprintf($link, $home_link . $slug['slug'] . '/', $post_type->labels->singular_name);\n\t\t\t\t\tif ($show_current) echo $sep . $before . get_the_title() . $after;\n\t\t\t\t} else {\n\t\t\t\t\t$cat = get_the_category(); $cat = $cat[0];\n\t\t\t\t\t$cats = get_category_parents($cat, TRUE, $sep);\n\t\t\t\t\tif (!$show_current || get_query_var('cpage')) $cats = preg_replace(\"#^(.+)$sep$#\", \"$1\", $cats);\n\t\t\t\t\t$cats = preg_replace('#<a([^>]+)>([^<]+)<\\/a>#', $link_before . '<a$1' . $link_attr .'>' . $link_in_before . '$2' . $link_in_after .'</a>' . $link_after, $cats);\n\t\t\t\t\techo $cats;\n\t\t\t\t\tif ( get_query_var('cpage') ) {\n\t\t\t\t\t\techo $sep . sprintf($link, get_permalink(), get_the_title()) . $sep . $before . sprintf($text['cpage'], get_query_var('cpage')) . $after;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ($show_current) echo $before . get_the_title() . $after;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t// custom post type\n\t\t\t} elseif ( !is_single() && !is_page() && get_post_type() != 'post' && !is_404() ) {\n\t\t\t\t$post_type = get_post_type_object(get_post_type());\n\t\t\t\tif ( get_query_var('paged') ) {\n\t\t\t\t\techo $sep . sprintf($link, get_post_type_archive_link($post_type->name), $post_type->label) . $sep . $before . sprintf($text['page'], get_query_var('paged')) . $after;\n\t\t\t\t} else {\n\t\t\t\t\tif ($show_current) echo $sep . $before . $post_type->label . $after;\n\t\t\t\t}\n\t\t\t} elseif ( is_page() && !$parent_id ) {\n\t\t\t\tif ($show_current) echo $sep . $before . get_the_title() . $after;\n\t\t\t} elseif ( is_page() && $parent_id ) {\n\t\t\t\tif ($show_home_link) echo $sep;\n\t\t\t\tif ($parent_id != $frontpage_id) {\n\t\t\t\t\t$breadcrumbs = array();\n\t\t\t\t\twhile ($parent_id) {\n\t\t\t\t\t\t$page = get_page($parent_id);\n\t\t\t\t\t\tif ($parent_id != $frontpage_id) {\n\t\t\t\t\t\t\t$breadcrumbs[] = sprintf($link, get_permalink($page->ID), get_the_title($page->ID));\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$parent_id = $page->post_parent;\n\t\t\t\t\t}\n\t\t\t\t\t$breadcrumbs = array_reverse($breadcrumbs);\n\t\t\t\t\tfor ($i = 0; $i < count($breadcrumbs); $i++) {\n\t\t\t\t\t\techo $breadcrumbs[$i];\n\t\t\t\t\t\tif ($i != count($breadcrumbs)-1) echo $sep;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ($show_current) echo $sep . $before . get_the_title() . $after;\n\t\t\t} elseif ( is_404() ) {\n\t\t\t\tif ($show_home_link && $show_current) echo $sep;\n\t\t\t\tif ($show_current) echo $before . $text['404'] . $after;\n\t\t\t} elseif ( has_post_format() && !is_singular() ) {\n\t\t\t\tif ($show_home_link) echo $sep;\n\t\t\t\techo get_post_format_string( get_post_format() );\n\t\t\t}\n\t\t\techo $wrap_after;\n\t\t}\n\t}"
] |
[
"0.71042824",
"0.6899634",
"0.6875399",
"0.68744063",
"0.67655104",
"0.675449",
"0.6738329",
"0.6686126",
"0.6686126",
"0.6626228",
"0.6616606",
"0.65868396",
"0.6558155",
"0.6555853",
"0.65501714",
"0.65462065",
"0.65421826",
"0.6463206",
"0.64543813",
"0.64513445",
"0.64448303",
"0.64432144",
"0.64424855",
"0.6436964",
"0.6436346",
"0.64293635",
"0.6406985",
"0.6405952",
"0.637502",
"0.6372089"
] |
0.7264157
|
0
|
This draws a TinyMCE area
|
public function drawPanelTinyMCE() {
// This needs cutting down to edit a panel -- basic formatting etc
$html = '<script type="text/javascript" src="/treeline/includes/tiny_mc3/jscripts/tiny_mce/tiny_mce.js"></script>'."\n";
$html .= '<script type="text/javascript" src="/treeline/behaviour/tiny_mce/tiny_mce_panel.js"></script>';
return $html;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function drawSpecialTinyMCE(){\n\t\t\t// This needs cutting down every now and again\n\t\t\t$html = '<script type=\"text/javascript\" src=\"/treeline/includes/tiny_mce/tiny_mce.js\"></script>'.\"\\n\";\n\t\t\t$html .= '<script type=\"text/javascript\" src=\"/treeline/behaviour/tiny_mce/tiny_mce_special.js\"></script>';\n\t\t\treturn $html;\n\t\t}",
"public function drawTinyMCE($files=array()) {\n\t\t\t// This draws a TinyMCE area\n $filepath=\"/treeline/includes/tiny_mc3/jscripts/tiny_mce/tiny_mce.js\";\n //$filepath=\"/treeline/includes/tiny_mc3/jscripts/tiny_mce/tiny_mce_src.js\";\n if (file_exists($_SERVER['DOCUMENT_ROOT'].$filepath) ) {\n\t\t\t\t//$html.='<!-- Add tiny mce js ('.$_SERVER['DOCUMENT_ROOT'].$filepath.') -->';\n\t\t\t\t/*\n\t\t\t\t$html.='<script type=\"text/javascript\">';\n\t\t\t\t$html.=file_get_contents($_SERVER['DOCUMENT_ROOT'].$filepath);\n\t\t\t\t$html.=\"</script>\";\n\t\t\t\t*/\n\t\t\t\t$html = '<script type=\"text/javascript\" src=\"'.$filepath.'\"></script>'.\"\\n\";\n if (is_array($files)) {\n foreach($files as $mceFile) {\n $html .= '<script type=\"text/javascript\" src=\"/treeline/behaviour/tiny_mce/tiny_mce_'.$mceFile.'.js\"></script>';\n }\n }\n }\n else $html=\"<!-- cant find requested tiny_mce file -->\";\n\t\t\treturn $html;\n\t\t}",
"public function drawContent()\n\t\t{\n\t\t}",
"protected function EditorInit()\r\n\t{\r\n\t\t$editor = \t'<script type=\"text/javascript\" src=\"application/controls/tinymce/jscripts/tiny_mce/tiny_mce.js\"></script>'.NEW_LINE.\r\n\t\t\t\t\t'<script type=\"text/javascript\"> '.NEW_LINE.\r\n\t\t\t\t\t'\ttinyMCE.init({'.NEW_LINE.\r\n\t\t\t\t\t'\t\t// General options'.NEW_LINE.\r\n\t\t\t\t\t'\t\tmode : \"textareas\",'.NEW_LINE.\r\n\t\t\t\t\t'\t\ttheme : \"advanced\",'.NEW_LINE.\r\n\t\t\t\t\t'\t\tplugins : \"safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,inlinepopups\",'.NEW_LINE.\r\n\t\t\t\t\t\r\n\t\t\t\t\t'\t\t// Theme options'.NEW_LINE.\r\n\t\t\t\t\t'\t\ttheme_advanced_buttons1 : \"save,newdocument,|,cut,copy,paste,pastetext,pasteword,|,search,replace,|,undo,redo,|,cleanup,code,iespell,|,preview,template,fullscreen\",'.NEW_LINE.\r\n\t\t\t\t\t'\t\ttheme_advanced_buttons2 : \"bold,italic,underline,strikethrough,sub,sup,|,justifyleft,justifycenter,justifyright,justifyfull,|,bullist,numlist,|,outdent,indent,blockquote,|,forecolor,backcolor,|,removeformat,visualaid\",'.NEW_LINE.\r\n\t\t\t\t\t'\t\ttheme_advanced_buttons3 : \"tablecontrols,|,insertdate,inserttime,|,charmap,media,image,advhr,|,link,unlink,anchor\",'.NEW_LINE.\r\n\t\t\t\t\t'\t\ttheme_advanced_buttons4 : \"formatselect,|,fontselect,|,fontsizeselect,|,del,ins,|,ltr,rtl,visualchars,nonbreaking,pagebreak\",'.NEW_LINE.\r\n\t\t\t\t\t'\t\ttheme_advanced_toolbar_location : \"top\",'.NEW_LINE.\r\n\t\t\t\t\t'\t\ttheme_advanced_toolbar_align : \"left\",'.NEW_LINE.\r\n\t\t\t\t\t'\t\ttheme_advanced_statusbar_location : \"bottom\",'.NEW_LINE.\r\n\t\t\t\t\t'\t\ttheme_advanced_resizing : true,'.NEW_LINE.\r\n\t\t\t\t\t \r\n\t\t\t\t\t'\t\t// Example word content CSS (should be your site CSS) this one removes paragraph margins'.NEW_LINE.\r\n\t\t\t\t\t'\t\tcontent_css : \"/includes/word.css\",'.NEW_LINE.\r\n\t\t\t\t\t \r\n\t\t\t\t\t'\t\t// Drop lists for link/image/media/template dialogs'.NEW_LINE.\r\n\t\t\t\t\t'\t\ttemplate_external_list_url : \"lists/template_list.js\",'.NEW_LINE.\r\n\t\t\t\t\t'\t\texternal_link_list_url : \"lists/link_list.js\",'.NEW_LINE.\r\n\t\t\t\t\t'\t\texternal_image_list_url : \"lists/image_list.js\",'.NEW_LINE.\r\n\t\t\t\t\t'\t\tmedia_external_list_url : \"lists/media_list.js\",'.NEW_LINE.\r\n\t\t\t\t\t \r\n\t\t\t\t\t'\t\t// Replace values for the template plugin'.NEW_LINE.\r\n\t\t\t\t\t'\t\ttemplate_replace_values : {'.NEW_LINE.\r\n\t\t\t\t\t'\t\t\tusername : \"Some User\",'.NEW_LINE.\r\n\t\t\t\t\t'\t\t\tstaffid : \"991234\"'.NEW_LINE.\r\n\t\t\t\t\t'\t\t}'.NEW_LINE.\r\n\t\t\t\t\t'\t});'.NEW_LINE.\r\n\t\t\t\t\t'</script>'.NEW_LINE;\r\n\t\t\r\n\t\treturn $editor;\r\n\t}",
"function botSpawEditorArea($name, $content, $hiddenField, $width, $height, $col, $row) {\n\trequire_once(dirname(__FILE__) . \"/spaw/spaw.inc.php\");\n\t$sw = new SpawEditor($hiddenField, html_entity_decode($content, ENT_QUOTES));\n\t$sw->show();\n}",
"public function drawWorkPanelTinyMCE() {\n\t\t\t$html = '<script type=\"text/javascript\" src=\"/treeline/includes/tiny_mc3/jscripts/tiny_mce/tiny_mce.js\"></script>'.\"\\n\";\n\t\t\t$html .= '<script type=\"text/javascript\" src=\"/treeline/behaviour/tiny_mce/tiny_mce_workpanel.js\"></script>';\n\t\t\treturn $html;\n\t\t}",
"public function callback_wysiwyg( $args ) {\n\n $name_id = $args['name_id'];\n if ($args['parent']) {\n $value = $this->get_option( $args['parent']['id'], $args['section'], $args['std'], $args['global'] );\n $value = isset($value[$args['id']]) ? $value[$args['id']] : $args['std'];\n }else {\n $value = $this->get_option( $args['id'], $args['section'], $args['std'], $args['global'] );\n }\n $size = isset( $args['size'] ) && !is_null( $args['size'] ) ? $args['size'] : '500px';\n\n echo '<div style=\"max-width: ' . $size . ';\">';\n\n $editor_settings = array(\n 'teeny' => true,\n 'textarea_name' => $name_id,\n 'textarea_rows' => 10\n );\n\n if ( isset( $args['options'] ) && is_array( $args['options'] ) ) {\n $editor_settings = array_merge( $editor_settings, $args['options'] );\n }\n\n wp_editor( $value, $args['section'] . '-' . $args['id'], $editor_settings );\n\n echo '</div>';\n\n echo $this->get_field_description( $args );\n }",
"function &previewTarea( &$text, $html = 0, $smiley = 1, $xcode = 1, $image = 1, $br = 1 ) {\n return $this->displayTarea( $text, $html, $smiley, $xcode, $image, $br );\n }",
"public static function renderTextarea();",
"function wysiwyg($args) {\r\n\t\t\t$args = $this->apply_name_fix($this->apply_default_args($args)) ;\r\n\t\t\techo \"<div class='postarea'>\";\r\n\t\t\tthe_editor($args['value'] , $args['formname']);\r\n\t\t\techo \"</div>\";\r\n\t\t\t$this->description($args['description']);\r\n\t\t}",
"public static function add_editor() {\n\t\t\twp_enqueue_script( 'tiny_mce' );\n\n\t\t\techo '<div id=\"kirki_editor_pane\" class=\"hide\">';\n\t\t\twp_editor( '', 'kirki-editor', array(\n\t\t\t\t'_content_editor_dfw' => false,\n\t\t\t\t'drag_drop_upload' => true,\n\t\t\t\t'tabfocus_elements' => 'content-html,save-post',\n\t\t\t\t'editor_height' => 200,\n\t\t\t\t'default_editor' => 'tinymce',\n\t\t\t\t'teeny' => true,\n\t\t\t\t'tinymce' => array(\n\t\t\t\t\t'resize' => false,\n\t\t\t\t\t'wp_autoresize_on' => false,\n\t\t\t\t\t'add_unload_trigger' => false,\n\t\t\t\t),\n\t\t\t) );\n\t\t\techo '</div>';\n\t\t\tdo_action( 'admin_footer' );\n\t\t\tdo_action( 'admin_print_footer_scripts' );\n\t\t}",
"function beaver_extender_fe_style_editor() {\n\t\n?>\n\t<div id=\"beaver-extender-fe-style-editor\" style=\"display:none;\">\n\t\t\n\t\t<h3>\n\t\t\t<span class=\"dashicons dashicons-move\" style=\"padding-top:3px;\"></span>\n\t\t</h3>\n\t\t\n\t\t<?php do_action( 'beaver_extender_fe_style_editor_form' ); ?>\n\t\t\n\t</div><!-- END #beaver-extender-fe-style-editor -->\n<?php\n\n}",
"function render()\r\n {\r\n $ret = $this->editor->render();\r\n $ret .= parent::render();\r\n\r\n return $ret;\r\n }",
"function beaver_extender_fe_style_editor_add_html() {\n\n\t$enable_ace_editor_syntax_validation = beaver_extender_get_settings( 'enable_ace_editor_syntax_validation' );\n\t$ace_editor_syntax_validation = !empty( $enable_ace_editor_syntax_validation ) ? 'true' : 'false';\n\n?>\n<script type=\"text/javascript\">\nvar ace_editor_syntax_validation = <?php echo $ace_editor_syntax_validation ?>;\nvar beaver_extender_fe_style_editor_images_url = 'url(<?php echo beaver_extender_get_stylesheet_location( 'url' ) . 'images'; ?>';\nvar beaver_extender_fe_style_editor_images_url_single_quotes = 'url(\\'<?php echo beaver_extender_get_stylesheet_location( 'url' ) . 'images'; ?>';\nvar beaver_extender_fe_style_editor_images_url_double_quotes = 'url(\"<?php echo beaver_extender_get_stylesheet_location( 'url' ) . 'images'; ?>';\nvar ajaxurl = '<?php echo admin_url( 'admin-ajax.php' ); ?>';\n</script>\n<?php\n\n\techo '<span id=\"beaver-extender-fe-style-editor-css\"><span class=\"dashicons dashicons-editor-code\"></span></span>' . \"\\n\";\n\tbeaver_extender_fe_style_editor();\n\t\n}",
"public function render_content() {\n\t\t\t?>\n\t\t\t<label>\n\t\t\t\t<span class=\"customize-control-title\"><?php echo esc_html( $this->label ); ?></span>\n\t\t\t\t<span class=\"description customize-control-description\"><?php echo esc_html( $this->description ); ?></span>\n\t\t\t</label>\n\t\t\t<div class=\"wds-customize-text-editor\">\n\t\t\t\t<?php\n\t\t\t\t// Setttings for the editor.\n\t\t\t\t$settings = array(\n\t\t\t\t\t'textarea_name' => $this->id,\n\t\t\t\t\t'textarea_rows' => 4,\n\t\t\t\t\t'media_buttons' => true,\n\t\t\t\t);\n\n\t\t\t\t// Add the editor.\n\t\t\t\twp_editor( $this->value(), $this->id, $settings );\n\n\t\t\t\t// Only enqueue scripts once.\n\t\t\t\tif ( 0 === self::$count ) {\n\t\t\t\t\t$this->enqueue_scripts();\n\t\t\t\t}\n\n\t\t\t\t// add the footer scripts.\n\t\t\t\t$this->add_footer_scripts();\n\n\t\t\t\t// Increment count.\n\t\t\t\t++self::$count;\n\t\t\t\t?>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}",
"public function create_visual_editor( $params ) {\n\t\t\t\n\t\t\t$innerHtml = '<div class=\"oxo_iconbox textblock_element textblock_element_style\" id=\"oxo_shortcodes\">';\n\t\t\t$innerHtml .= '<div class=\"bilder_icon_container\"><span class=\"oxo_iconbox_icon\"><i class=\"oxoa-shopping-cart\"></i><sub class=\"sub\">' . __( 'Woo Shortcodes', 'oxo-core' ) . '</sub><p class=\"woo_shortcode\">[woocommerce_order_tracking]</p></span></div>';\n\t\t\t$innerHtml .= '</div>';\n\t\t\t$this->config['innerHtml'] = $innerHtml;\n\t\t\t\n\t\t}",
"public function after_editor() {\n echo '</div>';\n $this->render_builder();\n }",
"public function render_content() {\n\t\t\t?>\n\t\t\t<div class=\"tinymce-control\">\n\t\t\t\t<span class=\"customize-control-title\"><?php echo esc_html( $this->label ); ?></span>\n\t\t\t\t<?php if ( ! empty( $this->description ) ) { ?>\n\t\t\t\t\t<span class=\"customize-control-description\"><?php echo esc_html( $this->description ); ?></span>\n\t\t\t\t<?php } ?>\n\t\t\t\t<textarea id=\"<?php echo esc_attr( $this->id ); ?>\" class=\"customize-control-tinymce-editor\" <?php $this->link(); ?>><?php echo esc_attr( $this->value() ); ?></textarea>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}",
"function dumpContents()\r\n {\r\n\r\n if(($this->ControlState & csDesigning) == csDesigning)\r\n {\r\n $attr = \"\";\r\n if($this->_width != \"\")\r\n $attr .= \" width=\\\"$this->_width\\\" \";\r\n if($this->_height != \"\")\r\n $attr .= \" height=\\\"$this->_height\\\" \";\r\n\r\n $bstyle = \" style=\\\"border: 1px dotted #000000\\\" \";\r\n echo \"<table $attr $bstyle><tr><td>\\n\";\r\n }\r\n\r\n $l = $this->_left;\r\n $t = $this->_top;\r\n $w = $this->_left + $this->_width;\r\n $h = $this->_top + $this->_height;\r\n $centerx = $this->_left + $this->_width / 2;\r\n $centery = $this->_top + $this->_height / 2;\r\n $minimum = $this->_width >= $this->_height? $this->_width: $this->_height;\r\n $radius = $minimum / 2;\r\n\r\n $events = $this->readJsEvents();\r\n\r\n $shape = \"\";\r\n $coords = \"\";\r\n\r\n switch($this->_kind)\r\n {\r\n case skRectangle:\r\n $shape = 'rect';\r\n $coords = \"$l,$t,$w,$h\";\r\n break;\r\n case skCircle:\r\n $shape = 'circle';\r\n $coords = \"$centerx,$centery,$radius\";\r\n break;\r\n case skDefault:\r\n $shape = 'default';\r\n break;\r\n default:\r\n exit('Shape kind not valid.');\r\n\r\n }\r\n\r\n $target = \"\";\r\n if($this->_target != '')\r\n $target = ' target=\"' . $this->_target . '\" ';\r\n\r\n // add or replace the JS events with the wrappers if necessary\r\n $this->addJSWrapperToEvents($events, $this->_onclick, $this->_jsonclick, \"onclick\");\r\n $this->addJSWrapperToEvents($events, $this->_ondblclick, $this->_jsondblclick, \"ondblclick\");\r\n\r\n //$hint = $this->Hint != \"\" & $this->ShowHint? $this->Hint: \"\";\r\n\r\n $hint = $this->HintAttribute();\r\n $hint .= \" alt=\\\"\" . htmlspecialchars($this->_hint, ENT_QUOTES) . \"\\\"\";\r\n\r\n $coords_final = ($coords != \"\") ? \"coords=\\\"$coords\\\"\" : \"\";\r\n\r\n echo \"<area id=\\\"$this->_name\\\" shape=\\\"$shape\\\" $coords_final $hint href=\\\"$this->_link\\\" $target $events />\\n\";\r\n\r\n if(($this->ControlState & csDesigning) == csDesigning)\r\n {\r\n echo \"</table>\\n\";\r\n }\r\n\r\n\r\n\r\n\r\n // add a hidden field so we can determine which event for the Paintbox was fired\r\n if($this->_onclick != null || $this->_ondblclick != null)\r\n {\r\n $hiddenwrapperfield = $this->readJSWrapperHiddenFieldName();\r\n echo \"<input type=\\\"hidden\\\" id=\\\"$hiddenwrapperfield\\\" name=\\\"$hiddenwrapperfield\\\" value=\\\"\\\" />\";\r\n }\r\n\r\n\r\n }",
"function add_wysiwyg() {\n\t\techo '\n<script type=\"text/javascript\">\n\tjQuery(function($) {\n\t\t';\n\t\tforeach($this->wysiwyg_items as $item) {\n\t\t\techo '\n\t\t\t\tCKEDITOR.replace( \"'.$item.'\",{\n\t\t\t\t\tcustomConfig : \"/index.php?cf_meta_action=ckeditor_toolbar_config\"\n\t\t\t\t});\n\t\t\t';\n\t\t}\n\t\techo '\n\t});\n</script>\n\t\t\t';\n\t\treturn;\n\t}",
"public function create_visual_editor( $params ) {\n\n\t\t\t$innerHtml = '<div class=\"oxo_iconbox textblock_element textblock_element_style\">';\n\t\t\t$innerHtml .= '<div class=\"bilder_icon_container\"><span class=\"oxo_iconbox_icon\"><i class=\"oxoa-tag\"></i><sub class=\"sub\">' . __( 'Events', 'oxo-core' ) . '</sub></span></div>';\n\t\t\t$innerHtml .= '</div>';\n\t\t\t$this->config['innerHtml'] = $innerHtml;\n\t\t}",
"public function editView() {\n $this->template()->addTplFile('edit.phtml');\n $this->setTinyMCE($this->formEdit->text, 'advanced');\n $this->setTinyMCE($this->formEdit->textPanel, 'advanced', array('height' => 300));\n if(isset($this->formEdit->textFooter)){\n $this->setTinyMCE($this->formEdit->textFooter, 'advanced', array('height' => 300));\n }\n Template_Module::setEdit(true);\n }",
"function setTextEditor(&$t, $auto_editor, $form_field='', $full_page=false)\r\n\t{\r\n\r\n\t\t global $CONFIG, $general_strings;\r\n\r\n\t\t $browser=browser_get_agent();\r\n\t\t if (($browser['agent']=='IE' && $browser['version']>=5.5 && $browser['platform']=='Win') || $browser['gecko_version']>='20030210' \r\n//Safari still too useless... and it hangs when you try to drag an image around.. test again after build 420 is out.\r\n//\t\t|| ($browser['agent']=='SAFARI' && $browser['version']>=420)\r\n\t\t){\r\n\r\n\t\t\t$init_ed=\"init_editor('\".$form_field.\"','Editor2', {});\";\r\n\r\n\t\t\tif(strpos($t->get_var('SCRIPT_EDITOR'),'dojo_ed.js')===false) {\r\n\t\t\t\t$t->set_var('SCRIPT_EDITOR','<script type=\"text/javascript\" language=\"javascript\" src=\"'.$CONFIG['PATH'].'/includes/dojo/dojo_ed.js?v2\"></script>',true);\r\n\t\t\t}\r\n\r\n\t\t\tif ($auto_editor && $form_field) {\r\n\t\t\t\t$t->set_var('SCRIPT_EDITOR','<script type=\"text/javascript\">',true);\r\n\t\t\t\t$t->set_var('SCRIPT_EDITOR',\r\n\t\t\t\t\t'dojo.addOnLoad(function() {'.$init_ed.'});',true);\r\n\t\t\t\t$t->set_var('SCRIPT_EDITOR','</script>',true);\r\n\r\n\t\t\t\t$t->set_var('EDITOR_BUTTONS_'.$form_field,'');\r\n\t\t\t\t$t->set_var('EDITOR_STYLE_'.$form_field,''); //hidden?\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\t$t->set_var('EDITOR_STYLE_'.$form_field,'');\r\n\t\t\t\t$t->set_var('EDITOR_BUTTONS_'.$form_field,'<span class=\"ed_button\" id=\"button_for_'.$form_field.'\"><input type=\"button\" name=\"Button\" value=\"'.$general_strings['easy_edit'].'\" class=\"small\" onClick=\"'.$init_ed.'\"></span>');\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$t->set_var('EDITOR_STYLE_'.$form_field,'');\r\n\t\t\t$t->set_var('EDITOR_BUTTONS_'.$form_field,'<div class=\"ed_button\"><input type=\"button\" name=\"link\" value=\"'.$general_strings['insert_link'].'\" class=\"small\" onClick=\"make_link(\\''.$form_field.'\\')\"/>\r\n<input type=\"button\" name=\"elink\" value=\"'.$general_strings['email_link'].'\" class=\"small\" onClick=\"make_email_link(\\''.$form_field.'\\')\" /> \r\n<input type=\"button\" value=\"'.$general_strings['preview'].'\" name=\"preview\" class=\"small\" onClick=\"display_html(\\''.$form_field.'\\')\"/> \r\n<input type=\"button\" name=\"Italics\" value=\"'.$general_strings['italic_abb'].'\" class=\"small\" style=\"font-style:italic\" onClick=\"make_italics(\\''.$form_field.'\\')\" /> \r\n<input type=\"button\" name=\"Bols\" value=\"'.$general_strings['bold_abb'].'\" class=\"small\" style=\"font-weight:bold\" onClick=\"make_bold(\\''.$form_field.'\\')\"/> ');\r\n\r\n\t\t\t$t->set_var('EDITOR_BUTTONS_'.$form_field,'<input type=\"button\" name=\"image\" value=\"'.$general_strings['add_image'].'\" class=\"small\" onClick=\"get_image(\\''.$CONFIG['PATH'].'\\',\\''.$form_field.'\\');\" />',true);\r\n\r\n\t\t\tif (!($t->get_var('SCRIPT_EDITOR'))) {\r\n// \t\t\t\t$t->set_var('SCRIPT_EDITOR','<script type=\"text/javascript\" language=\"javascript\" src=\"'.$CONFIG['PATH'].'/includes/editor/popups/popup.js\" ></script>\r\n// \t\t\t\t<script type=\"text/javascript\" language=\"javascript\" src=\"'.$CONFIG['PATH'].'/includes/editor/use_dialogs.js\" ></script>', true);\r\n\r\n\t\t\t\t$t->set_var('SCRIPT_INCLUDES','<script type=\"text/javascript\" language=\"javascript\" src=\"'.$CONFIG['PATH'].'/includes/editor/popups/popup.js\" ></script>\r\n\t\t\t\t<script type=\"text/javascript\" language=\"javascript\" src=\"'.$CONFIG['PATH'].'/includes/editor/dialogs.js\" ></script>\r\n\t\t\t\t<script type=\"text/javascript\" language=\"javascript\" src=\"'.$CONFIG['PATH'].'/includes/editor/use_dialogs.js\" ></script>\r\n\t\t\t\t', true);\r\n\t\t\t}\r\n\t\t\t$t->set_var('EDITOR_BUTTONS_'.$form_field,'</div>',true);\r\n\t\t}\r\n\t\treturn true;\r\n\t\r\n\t}",
"function callback_wysiwyg(array $args)\n {\n }",
"function tlspi_make_text_area() { ?>\n\t<div class=\"wrap\"> \n\t\t<h1>The La Source Newspaper Post Importer</h1> \n \n\t\t<form method=\"post\" action=\"\"> \n\t\t\t<label>copy and paste document here... <br />\n\t\t\t<textarea rows=\"60\" cols=\"100\" name=\"preview\" id=\"code\" ></textarea> </label>\n\t\t\t\n\t\t\t<br> \n\t\t\t<input type =\"submit\" value=\"Preview\" name=\"submit\" class=\"button-primary\"> \n\t\t\t<br>\n\t\t</form> <br> \n\t\t<script>\n\t\t\tvar editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n\t\t\t\tmode: { name: \"xml\", alignCDATA: true},\n\t\t\t\tlineNumbers: true\n\t\t\t});\n\t\t</script>\n\t</div>\n<?php\n}",
"function wp_tinymce_inline_scripts()\n {\n }",
"function fbWriteTextarea($areaname, $html, $width, $height, $useRte, $emoticons)\r\n {\r\n // well $html is the $message to edit, generally it means in PLAINTEXT @FireBoard!\r\n global $editmode;\r\n // ERROR: mixed global $editmode\r\n global $fbConfig;\r\n\r\n // (JJ) JOOMLA STYLE CHECK\r\n if ($fbConfig->joomlastyle < 1) {\r\n $boardclass = \"fb_\";\r\n }\r\n ?>\r\n\r\n <tr class = \"<?php echo $boardclass; ?>sectiontableentry1\">\r\n <td class = \"fb_leftcolumn\" valign = \"top\">\r\n <strong><a href = \"<?php echo sefRelToAbs(JB_LIVEURLREL.'&func=faq').'#boardcode';?>\"><?php echo _COM_BOARDCODE; ?></a></strong>:\r\n </td>\r\n\r\n <td>\r\n <table border = \"0\" cellspacing = \"0\" cellpadding = \"0\" class = \"fb-postbuttonset\">\r\n <tr>\r\n <td class = \"fb-postbuttons\">\r\n <input type = \"button\" class = \"<?php echo $boardclass;?>button\" accesskey = \"b\" name = \"addbbcode0\" value = \" B \" style = \"font-weight:bold; \" onclick = \"bbstyle(0)\" onmouseover = \"helpline('b')\"/>\r\n\r\n <input type = \"button\" class = \"<?php echo $boardclass;?>button\" accesskey = \"i\" name = \"addbbcode2\" value = \" i \" style = \"font-style:italic; \" onclick = \"bbstyle(2)\" onmouseover = \"helpline('i')\"/>\r\n\r\n <input type = \"button\" class = \"<?php echo $boardclass;?>button\" accesskey = \"u\" name = \"addbbcode4\" value = \" u \" style = \"text-decoration: underline;\" onclick = \"bbstyle(4)\" onmouseover = \"helpline('u')\"/>\r\n\r\n <input type = \"button\" class = \"<?php echo $boardclass;?>button\" accesskey = \"q\" name = \"addbbcode6\" value = \"Quote\" onclick = \"bbstyle(6)\" onmouseover = \"helpline('q')\"/>\r\n\r\n <input type = \"button\" class = \"<?php echo $boardclass;?>button\" accesskey = \"c\" name = \"addbbcode8\" value = \"Code\" onclick = \"bbstyle(8)\" onmouseover = \"helpline('c')\"/>\r\n\r\n <input type = \"button\" class = \"<?php echo $boardclass;?>button\" accesskey = \"k\" name = \"addbbcode10\" value = \"ul\" onclick = \"bbstyle(10)\" onmouseover = \"helpline('k')\"/>\r\n\r\n <input type = \"button\" class = \"<?php echo $boardclass;?>button\" accesskey = \"o\" name = \"addbbcode12\" value = \"ol\" onclick = \"bbstyle(12)\" onmouseover = \"helpline('o')\"/>\r\n\r\n <input type = \"button\" class = \"<?php echo $boardclass;?>button\" accesskey = \"l\" name = \"addbbcode18\" value = \"li\" onclick = \"bbstyle(18)\" onmouseover = \"helpline('l')\"/>\r\n\r\n <input type = \"button\" class = \"<?php echo $boardclass;?>button\" accesskey = \"p\" name = \"addbbcode14\" value = \"Img\" onclick = \"bbstyle(14)\" onmouseover = \"helpline('p')\"/>\r\n\r\n <input type = \"button\" class = \"<?php echo $boardclass;?>button\" accesskey = \"w\" name = \"addbbcode16\" value = \"URL\" style = \"text-decoration: underline; \" onclick = \"bbstyle(16)\" onmouseover = \"helpline('w')\"/>\r\n\r\n <input type = \"button\" class = \"<?php echo $boardclass;?>button\" accesskey = \"h\" name = \"addbbcode24\" value = \"Hide\" onclick = \"bbstyle(20)\" onmouseover = \"helpline('h')\"/>\r\n\r\n <?php echo _SMILE_COLOUR; ?>:\r\n\r\n <select name = \"addbbcode20\"\r\n onchange = \"bbfontstyle('[color=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/color]');\" onmouseover = \"helpline('s')\" class = \"<?php echo $boardclass;?>slcbox\">\r\n <option style = \"color:black; background-color: #FAFAFA\" value = \"\"><?php echo _COLOUR_DEFAULT; ?></option>\r\n\r\n <option style = \"color:#FF0000; background-color: #FAFAFA\" value = \"#FF0000\"><?php echo _COLOUR_RED; ?></option>\r\n\r\n <option style = \"color:#800080; background-color: #FAFAFA\" value = \"#800080\"><?php echo _COLOUR_PURPLE; ?></option>\r\n\r\n <option style = \"color:#0000FF; background-color: #FAFAFA\" value = \"#0000FF\"><?php echo _COLOUR_BLUE; ?></option>\r\n\r\n <option style = \"color:#008000; background-color: #FAFAFA\" value = \"#008000\"><?php echo _COLOUR_GREEN; ?></option>\r\n\r\n <option style = \"color:#FFFF00; background-color: #FAFAFA\" value = \"#FFFF00\"><?php echo _COLOUR_YELLOW; ?></option>\r\n\r\n <option style = \"color:#FF6600; background-color: #FAFAFA\" value = \"#FF6600\"><?php echo _COLOUR_ORANGE; ?></option>\r\n\r\n <option style = \"color:#000080; background-color: #FAFAFA\" value = \"#000080\"><?php echo _COLOUR_DARKBLUE; ?></option>\r\n\r\n <option style = \"color:#825900; background-color: #FAFAFA\" value = \"#825900\"><?php echo _COLOUR_BROWN; ?></option>\r\n\r\n <option style = \"color:#9A9C02; background-color: #FAFAFA\" value = \"#9A9C02\"><?php echo _COLOUR_GOLD; ?></option>\r\n\r\n <option style = \"color:#A7A7A7; background-color: #FAFAFA\" value = \"#A7A7A7\"><?php echo _COLOUR_SILVER; ?></option>\r\n </select>\r\n\r\n <?php echo _SMILE_SIZE; ?>:\r\n\r\n <select name = \"addbbcode22\" onchange = \"bbfontstyle('[size=' + this.form.addbbcode22.options[this.form.addbbcode22.selectedIndex].value + ']', '[/size]')\" onmouseover = \"helpline('f')\" class = \"<?php echo $boardclass;?>button\">\r\n <option value = \"1\"><?php echo _SIZE_VSMALL; ?></option>\r\n\r\n <option value = \"2\"><?php echo _SIZE_SMALL; ?></option>\r\n\r\n <option value = \"3\" selected = \"selected\"><?php echo _SIZE_NORMAL; ?></option>\r\n\r\n <option value = \"4\"><?php echo _SIZE_BIG; ?></option>\r\n\r\n <option value = \"5\"><?php echo _SIZE_VBIG; ?></option>\r\n </select>\n\n\t\t\t\t\t<?php if ($fbConfig->showspoilertag) {?>\n <script type=\"text/javascript\">\n\t\t\t\t\t\tfunction fb_spoiler_help() {document.postform.helpbox.value = 'Spoiler: [spoiler] ... [/spoiler]';}\n\t\t\t\t\t</script>\n <input type = \"button\" class = \"<?php echo $boardclass;?>button\" accesskey = \"s\" name = \"addbbcode40\" value = \"Spoiler\" onclick = \"bbfontstyle('[spoiler]', '[/spoiler]')\" onmouseover = \"fb_spoiler_help()\"/>\n\t\t\t\t\t<?php } ?>\n\n\t\t\t\t\t<?php if ($fbConfig->showebaytag) {?>\n <script type=\"text/javascript\">\n\t\t\t\t\t\tfunction fb_ebay_help() {document.postform.helpbox.value = 'eBay: [ebay]ItemId[/ebay]';}\n\t\t\t\t\t</script>\n <input type = \"button\" class = \"<?php echo $boardclass;?>button\" accesskey = \"e\" name = \"addbbcode30\" value = \"eBay\" onclick = \"bbfontstyle('[ebay]', '[/ebay]')\" onmouseover = \"fb_ebay_help()\"/>\n\t\t\t\t\t<?php } ?>\n\n\t\t\t\t\t<?php if ($fbConfig->showvideotag) {?>\n <span style=\"white-space:nowrap;\">\r\n\t\t\t\t\t<script type=\"text/javascript\">\r\n\t\t\t\t\t\tfunction fb_vid_help1() {document.postform.helpbox.value = 'Video: [video type=provider size=100 width=480 height=360]xyz[/video]';}\r\n\t\t\t\t\t\tfunction fb_vid_help2() {document.postform.helpbox.value = 'Video: [video size=100 width=480 height=360]http://myvideodomain.com/myvideo[/video]';}\r\n\t\t\t\t\t</script>\r\n\t\t\t\t\t<a href = \"javascript: bbfontstyle('[video]', '[/video]')\" onmouseover = \"fb_vid_help2()\">Video:</a>\r\n\t\t\t\t\t<select name = \"fb_vid_code1\" onchange = \"bbfontstyle('[video type=' + this.form.fb_vid_code1.options[this.form.fb_vid_code1.selectedIndex].value, '[/video]');\" onmouseover = \"fb_vid_help1()\" class = \"<?php echo $boardclass;?>button\">\r\n\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t$vid_provider = array('','AnimeEpisodes','Biku','Bofunk','Break','Clip.vn','Clipfish','Clipshack','Collegehumor','Current',\r\n\t\t\t\t\t\t\t'DailyMotion','DivX,divx]http://','DownloadFestival','Flash,flash]http://','FlashVars,flashvars param=]http://','Fliptrack',\r\n\t\t\t\t\t\t\t'Fliqz','Gametrailers','Gamevideos','Glumbert','GMX','Google','GooglyFoogly','iFilm','Jumpcut','Kewego','LiveLeak','LiveVideo',\r\n\t\t\t\t\t\t\t'MediaPlayer,mediaplayer]http://','MegaVideo','Metacafe','Mofile','Multiply','MySpace','MyVideo','QuickTime,quicktime]http://','Quxiu',\r\n\t\t\t\t\t\t\t'RealPlayer,realplayer]http://','Revver','RuTube','Sapo','Sevenload','Sharkle','Spikedhumor','Stickam','Streetfire','StupidVideos','Toufee','Tudou',\r\n\t\t\t\t\t\t\t'Unf-Unf','Uume','Veoh','VideoclipsDump','Videojug','VideoTube','Vidiac','VidiLife','Vimeo','WangYou','WEB.DE','Wideo.fr','YouKu','YouTube');\r\n\t\t\t\t\t\tforeach($vid_provider as $vid_type) {\r\n\t\t\t\t\t\t\tlist($vid_name, $vid_type) = explode(',', $vid_type);\r\n\t\t\t\t\t\t\techo '<option value = \"'.(($vid_type)?$vid_type:strtolower($vid_name).']').'\">'.$vid_name.'</option>';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t?>\r\n\t\t\t\t\t</select></span>\r\n\t\t\t\t\t<?php } ?>\n\r\n <a href = \"javascript: bbstyle(-1)\"onmouseover = \"helpline('a')\"><small><?php echo _BBCODE_CLOSA; ?></small></a>\r\n </td>\r\n </tr>\r\n\r\n <tr>\r\n <td class = \"<?php echo $boardclass;?>posthint\">\r\n <input type = \"text\" name = \"helpbox\" size = \"45\" class = \"<?php echo $boardclass;?>inputbox\" maxlength = \"100\" value = \"<?php echo _BBCODE_HINT;?>\"/>\r\n </td>\r\n </tr>\r\n </table>\r\n </td>\r\n </tr>\r\n\r\n <tr class = \"<?php echo $boardclass; ?>sectiontableentry2\">\r\n <td valign = \"top\" class = \"fb_leftcolumn\">\r\n <strong><?php echo _MESSAGE; ?></strong>:\r\n\r\n <?php\r\n if ($emoticons != 1)\r\n {\r\n ?>\r\n\r\n <br/>\r\n\r\n <br/>\r\n\r\n <div align = \"right\">\r\n <table border = \"0\" cellspacing = \"3\" cellpadding = \"0\">\r\n <tr>\r\n <td colspan = \"4\" style = \"text-align: center;\">\r\n <strong><?php echo _GEN_EMOTICONS; ?></strong>\r\n </td>\r\n </tr>\r\n\r\n <tr>\r\n <?php\r\n generate_smilies(); //the new function Smiley mod\r\n ?>\r\n </tr>\r\n </table>\r\n </div>\r\n\r\n <?php\r\n }\r\n ?>\r\n </td>\r\n\r\n <td valign = \"top\">\r\n <textarea class = \"<?php echo $boardclass;?>txtarea\" name = \"<?php echo $areaname;?>\" id = \"<?php echo $areaname;?>\"><?php echo htmlspecialchars($html, ENT_QUOTES); ?></textarea>\r\n<?php\r\nif ($editmode) {\r\n // Moderator edit area\r\n ?>\r\n <fieldset>\r\n <legend><?php echo _FB_EDITING_REASON?></legend>\r\n <input name=\"modified_reason\" size=\"40\" maxlength=\"200\" type=\"text\"><br />\r\n\r\n </fieldset>\r\n<?php\r\n}\r\n?>\r\n </td>\r\n </tr>\r\n\r\n<?php\r\n }",
"function drum_beat_add_editor_styles() {\n add_editor_style( 'assets/stylesheets/wysiwyg-style.css' );\n}",
"function uultra_get_me_wphtml_editor($meta, $content)\r\n\t{\r\n\t\tob_start();\r\n\t\t\r\n\t\t$editor_id = $meta;\t\t\t\t\r\n\t\t$editor_settings = array('media_buttons' => false , 'textarea_rows' => 40 , 'teeny' =>true, 'tinymce' => array( 'height' => 300 )); \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\twp_editor( $content, $editor_id , $editor_settings);\r\n\t\t\r\n\t\t// Store the contents of the buffer in a variable\r\n\t\t$editor_contents = ob_get_clean();\r\n\t\t\r\n\t\t// Return the content you want to the calling function\r\n\t\treturn $editor_contents;\r\n\t\t\t\r\n\t}",
"function showPreview() {\r\n $tpl = new tpl('gbook');\r\n $tpl->set(\"TEXT\", BBcode(escape($_POST[\"txt\"], \"textarea\")));\r\n $tpl->out('preview');\r\n}"
] |
[
"0.6556241",
"0.6377041",
"0.63154554",
"0.6290016",
"0.6186799",
"0.6085311",
"0.6066942",
"0.6054626",
"0.5952229",
"0.59283644",
"0.58668303",
"0.5851833",
"0.5836819",
"0.57559216",
"0.5728118",
"0.5687434",
"0.5668943",
"0.5650618",
"0.5646882",
"0.5641832",
"0.5621702",
"0.5621325",
"0.5608057",
"0.5592668",
"0.5559848",
"0.55384725",
"0.5538302",
"0.5534663",
"0.5519455",
"0.5517879"
] |
0.6503759
|
1
|
This draws a TinyMCE area for workstream panels
|
public function drawWorkPanelTinyMCE() {
$html = '<script type="text/javascript" src="/treeline/includes/tiny_mc3/jscripts/tiny_mce/tiny_mce.js"></script>'."\n";
$html .= '<script type="text/javascript" src="/treeline/behaviour/tiny_mce/tiny_mce_workpanel.js"></script>';
return $html;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function drawPanelTinyMCE() {\n\t\t\t// This needs cutting down to edit a panel -- basic formatting etc\n\t\t\t$html = '<script type=\"text/javascript\" src=\"/treeline/includes/tiny_mc3/jscripts/tiny_mce/tiny_mce.js\"></script>'.\"\\n\";\n\t\t\t$html .= '<script type=\"text/javascript\" src=\"/treeline/behaviour/tiny_mce/tiny_mce_panel.js\"></script>';\n\t\t\treturn $html;\n\t\t}",
"function botSpawEditorArea($name, $content, $hiddenField, $width, $height, $col, $row) {\n\trequire_once(dirname(__FILE__) . \"/spaw/spaw.inc.php\");\n\t$sw = new SpawEditor($hiddenField, html_entity_decode($content, ENT_QUOTES));\n\t$sw->show();\n}",
"public function drawSpecialTinyMCE(){\n\t\t\t// This needs cutting down every now and again\n\t\t\t$html = '<script type=\"text/javascript\" src=\"/treeline/includes/tiny_mce/tiny_mce.js\"></script>'.\"\\n\";\n\t\t\t$html .= '<script type=\"text/javascript\" src=\"/treeline/behaviour/tiny_mce/tiny_mce_special.js\"></script>';\n\t\t\treturn $html;\n\t\t}",
"public function drawContent()\n\t\t{\n\t\t}",
"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 create_visual_editor( $params ) {\n\t\t\t\n\t\t\t$innerHtml = '<div class=\"oxo_iconbox textblock_element textblock_element_style\" id=\"oxo_shortcodes\">';\n\t\t\t$innerHtml .= '<div class=\"bilder_icon_container\"><span class=\"oxo_iconbox_icon\"><i class=\"oxoa-shopping-cart\"></i><sub class=\"sub\">' . __( 'Woo Shortcodes', 'oxo-core' ) . '</sub><p class=\"woo_shortcode\">[woocommerce_order_tracking]</p></span></div>';\n\t\t\t$innerHtml .= '</div>';\n\t\t\t$this->config['innerHtml'] = $innerHtml;\n\t\t\t\n\t\t}",
"public function create_visual_editor( $params ) {\n\n\t\t\t$innerHtml = '<div class=\"oxo_iconbox textblock_element textblock_element_style\">';\n\t\t\t$innerHtml .= '<div class=\"bilder_icon_container\"><span class=\"oxo_iconbox_icon\"><i class=\"oxoa-tag\"></i><sub class=\"sub\">' . __( 'Events', 'oxo-core' ) . '</sub></span></div>';\n\t\t\t$innerHtml .= '</div>';\n\t\t\t$this->config['innerHtml'] = $innerHtml;\n\t\t}",
"public function render_content() {\n\t\t\t?>\n\t\t\t<label>\n\t\t\t\t<span class=\"customize-control-title\"><?php echo esc_html( $this->label ); ?></span>\n\t\t\t\t<span class=\"description customize-control-description\"><?php echo esc_html( $this->description ); ?></span>\n\t\t\t</label>\n\t\t\t<div class=\"wds-customize-text-editor\">\n\t\t\t\t<?php\n\t\t\t\t// Setttings for the editor.\n\t\t\t\t$settings = array(\n\t\t\t\t\t'textarea_name' => $this->id,\n\t\t\t\t\t'textarea_rows' => 4,\n\t\t\t\t\t'media_buttons' => true,\n\t\t\t\t);\n\n\t\t\t\t// Add the editor.\n\t\t\t\twp_editor( $this->value(), $this->id, $settings );\n\n\t\t\t\t// Only enqueue scripts once.\n\t\t\t\tif ( 0 === self::$count ) {\n\t\t\t\t\t$this->enqueue_scripts();\n\t\t\t\t}\n\n\t\t\t\t// add the footer scripts.\n\t\t\t\t$this->add_footer_scripts();\n\n\t\t\t\t// Increment count.\n\t\t\t\t++self::$count;\n\t\t\t\t?>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}",
"public function drawTinyMCE($files=array()) {\n\t\t\t// This draws a TinyMCE area\n $filepath=\"/treeline/includes/tiny_mc3/jscripts/tiny_mce/tiny_mce.js\";\n //$filepath=\"/treeline/includes/tiny_mc3/jscripts/tiny_mce/tiny_mce_src.js\";\n if (file_exists($_SERVER['DOCUMENT_ROOT'].$filepath) ) {\n\t\t\t\t//$html.='<!-- Add tiny mce js ('.$_SERVER['DOCUMENT_ROOT'].$filepath.') -->';\n\t\t\t\t/*\n\t\t\t\t$html.='<script type=\"text/javascript\">';\n\t\t\t\t$html.=file_get_contents($_SERVER['DOCUMENT_ROOT'].$filepath);\n\t\t\t\t$html.=\"</script>\";\n\t\t\t\t*/\n\t\t\t\t$html = '<script type=\"text/javascript\" src=\"'.$filepath.'\"></script>'.\"\\n\";\n if (is_array($files)) {\n foreach($files as $mceFile) {\n $html .= '<script type=\"text/javascript\" src=\"/treeline/behaviour/tiny_mce/tiny_mce_'.$mceFile.'.js\"></script>';\n }\n }\n }\n else $html=\"<!-- cant find requested tiny_mce file -->\";\n\t\t\treturn $html;\n\t\t}",
"function beaver_extender_fe_style_editor() {\n\t\n?>\n\t<div id=\"beaver-extender-fe-style-editor\" style=\"display:none;\">\n\t\t\n\t\t<h3>\n\t\t\t<span class=\"dashicons dashicons-move\" style=\"padding-top:3px;\"></span>\n\t\t</h3>\n\t\t\n\t\t<?php do_action( 'beaver_extender_fe_style_editor_form' ); ?>\n\t\t\n\t</div><!-- END #beaver-extender-fe-style-editor -->\n<?php\n\n}",
"public function callback_wysiwyg( $args ) {\n\n $name_id = $args['name_id'];\n if ($args['parent']) {\n $value = $this->get_option( $args['parent']['id'], $args['section'], $args['std'], $args['global'] );\n $value = isset($value[$args['id']]) ? $value[$args['id']] : $args['std'];\n }else {\n $value = $this->get_option( $args['id'], $args['section'], $args['std'], $args['global'] );\n }\n $size = isset( $args['size'] ) && !is_null( $args['size'] ) ? $args['size'] : '500px';\n\n echo '<div style=\"max-width: ' . $size . ';\">';\n\n $editor_settings = array(\n 'teeny' => true,\n 'textarea_name' => $name_id,\n 'textarea_rows' => 10\n );\n\n if ( isset( $args['options'] ) && is_array( $args['options'] ) ) {\n $editor_settings = array_merge( $editor_settings, $args['options'] );\n }\n\n wp_editor( $value, $args['section'] . '-' . $args['id'], $editor_settings );\n\n echo '</div>';\n\n echo $this->get_field_description( $args );\n }",
"public function drawPanelToolbar() {\n\t\t$html = '';\n\t\t$html .= '<div id=\"toolbar\">'.\"\\n\";\n\t\t$html .= '\t<div id=\"toolbar_container\">'.\"\\n\";\n\t\t$html .= '\t<div class=\"logo\"><a href=\"/treeline/\"><img src=\"/treeline/img/logo.gif\" alt=\"Treeline\" /></a></div>'.\"\\n\";\n\t\t$html .= '\t<div class=\"options\">'.\"\\n\";\n\t\t$html .= '\t\t<input type=\"submit\" class=\"button\" name=\"treeline\" id=\"treeline\" value=\"Save changes\" />'.\"\\n\";\n\t\t$html .= '\t\t<input type=\"submit\" class=\"button cancel\" name=\"treeline\" id=\"treeline\" value=\"Discard changes\" />'.\"\\n\";\t\t\t\n\t\t$html .= '\t</div>'.\"\\n\";\n\t\t$html .= '\t</div>'.\"\\n\";\n\t\t$html .= '\t<div class=\"clear\"></div>';\n\t\t$html .= '</div>';\n\t\treturn $html;\n\t}",
"function add_wysiwyg() {\n\t\techo '\n<script type=\"text/javascript\">\n\tjQuery(function($) {\n\t\t';\n\t\tforeach($this->wysiwyg_items as $item) {\n\t\t\techo '\n\t\t\t\tCKEDITOR.replace( \"'.$item.'\",{\n\t\t\t\t\tcustomConfig : \"/index.php?cf_meta_action=ckeditor_toolbar_config\"\n\t\t\t\t});\n\t\t\t';\n\t\t}\n\t\techo '\n\t});\n</script>\n\t\t\t';\n\t\treturn;\n\t}",
"public function render_content() {\n\t\t\t?>\n\t\t\t<div class=\"tinymce-control\">\n\t\t\t\t<span class=\"customize-control-title\"><?php echo esc_html( $this->label ); ?></span>\n\t\t\t\t<?php if ( ! empty( $this->description ) ) { ?>\n\t\t\t\t\t<span class=\"customize-control-description\"><?php echo esc_html( $this->description ); ?></span>\n\t\t\t\t<?php } ?>\n\t\t\t\t<textarea id=\"<?php echo esc_attr( $this->id ); ?>\" class=\"customize-control-tinymce-editor\" <?php $this->link(); ?>><?php echo esc_attr( $this->value() ); ?></textarea>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}",
"public static function add_editor() {\n\t\t\twp_enqueue_script( 'tiny_mce' );\n\n\t\t\techo '<div id=\"kirki_editor_pane\" class=\"hide\">';\n\t\t\twp_editor( '', 'kirki-editor', array(\n\t\t\t\t'_content_editor_dfw' => false,\n\t\t\t\t'drag_drop_upload' => true,\n\t\t\t\t'tabfocus_elements' => 'content-html,save-post',\n\t\t\t\t'editor_height' => 200,\n\t\t\t\t'default_editor' => 'tinymce',\n\t\t\t\t'teeny' => true,\n\t\t\t\t'tinymce' => array(\n\t\t\t\t\t'resize' => false,\n\t\t\t\t\t'wp_autoresize_on' => false,\n\t\t\t\t\t'add_unload_trigger' => false,\n\t\t\t\t),\n\t\t\t) );\n\t\t\techo '</div>';\n\t\t\tdo_action( 'admin_footer' );\n\t\t\tdo_action( 'admin_print_footer_scripts' );\n\t\t}",
"public function apply_editor_wrap() {\n\n // Grab current screen\n $screen = get_current_screen();\n\n // Make sure we're on the correct screen\n if ( ! in_array( $screen->id, $this->screens ) ) {\n return;\n }\n\n add_action( 'edit_form_after_title', array( $this, 'before_editor' ), 100000 );\n add_action( 'edit_form_after_editor', array( $this, 'after_editor' ), 1 );\n\n }",
"function wysiwyg($args) {\r\n\t\t\t$args = $this->apply_name_fix($this->apply_default_args($args)) ;\r\n\t\t\techo \"<div class='postarea'>\";\r\n\t\t\tthe_editor($args['value'] , $args['formname']);\r\n\t\t\techo \"</div>\";\r\n\t\t\t$this->description($args['description']);\r\n\t\t}",
"protected function EditorInit()\r\n\t{\r\n\t\t$editor = \t'<script type=\"text/javascript\" src=\"application/controls/tinymce/jscripts/tiny_mce/tiny_mce.js\"></script>'.NEW_LINE.\r\n\t\t\t\t\t'<script type=\"text/javascript\"> '.NEW_LINE.\r\n\t\t\t\t\t'\ttinyMCE.init({'.NEW_LINE.\r\n\t\t\t\t\t'\t\t// General options'.NEW_LINE.\r\n\t\t\t\t\t'\t\tmode : \"textareas\",'.NEW_LINE.\r\n\t\t\t\t\t'\t\ttheme : \"advanced\",'.NEW_LINE.\r\n\t\t\t\t\t'\t\tplugins : \"safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,inlinepopups\",'.NEW_LINE.\r\n\t\t\t\t\t\r\n\t\t\t\t\t'\t\t// Theme options'.NEW_LINE.\r\n\t\t\t\t\t'\t\ttheme_advanced_buttons1 : \"save,newdocument,|,cut,copy,paste,pastetext,pasteword,|,search,replace,|,undo,redo,|,cleanup,code,iespell,|,preview,template,fullscreen\",'.NEW_LINE.\r\n\t\t\t\t\t'\t\ttheme_advanced_buttons2 : \"bold,italic,underline,strikethrough,sub,sup,|,justifyleft,justifycenter,justifyright,justifyfull,|,bullist,numlist,|,outdent,indent,blockquote,|,forecolor,backcolor,|,removeformat,visualaid\",'.NEW_LINE.\r\n\t\t\t\t\t'\t\ttheme_advanced_buttons3 : \"tablecontrols,|,insertdate,inserttime,|,charmap,media,image,advhr,|,link,unlink,anchor\",'.NEW_LINE.\r\n\t\t\t\t\t'\t\ttheme_advanced_buttons4 : \"formatselect,|,fontselect,|,fontsizeselect,|,del,ins,|,ltr,rtl,visualchars,nonbreaking,pagebreak\",'.NEW_LINE.\r\n\t\t\t\t\t'\t\ttheme_advanced_toolbar_location : \"top\",'.NEW_LINE.\r\n\t\t\t\t\t'\t\ttheme_advanced_toolbar_align : \"left\",'.NEW_LINE.\r\n\t\t\t\t\t'\t\ttheme_advanced_statusbar_location : \"bottom\",'.NEW_LINE.\r\n\t\t\t\t\t'\t\ttheme_advanced_resizing : true,'.NEW_LINE.\r\n\t\t\t\t\t \r\n\t\t\t\t\t'\t\t// Example word content CSS (should be your site CSS) this one removes paragraph margins'.NEW_LINE.\r\n\t\t\t\t\t'\t\tcontent_css : \"/includes/word.css\",'.NEW_LINE.\r\n\t\t\t\t\t \r\n\t\t\t\t\t'\t\t// Drop lists for link/image/media/template dialogs'.NEW_LINE.\r\n\t\t\t\t\t'\t\ttemplate_external_list_url : \"lists/template_list.js\",'.NEW_LINE.\r\n\t\t\t\t\t'\t\texternal_link_list_url : \"lists/link_list.js\",'.NEW_LINE.\r\n\t\t\t\t\t'\t\texternal_image_list_url : \"lists/image_list.js\",'.NEW_LINE.\r\n\t\t\t\t\t'\t\tmedia_external_list_url : \"lists/media_list.js\",'.NEW_LINE.\r\n\t\t\t\t\t \r\n\t\t\t\t\t'\t\t// Replace values for the template plugin'.NEW_LINE.\r\n\t\t\t\t\t'\t\ttemplate_replace_values : {'.NEW_LINE.\r\n\t\t\t\t\t'\t\t\tusername : \"Some User\",'.NEW_LINE.\r\n\t\t\t\t\t'\t\t\tstaffid : \"991234\"'.NEW_LINE.\r\n\t\t\t\t\t'\t\t}'.NEW_LINE.\r\n\t\t\t\t\t'\t});'.NEW_LINE.\r\n\t\t\t\t\t'</script>'.NEW_LINE;\r\n\t\t\r\n\t\treturn $editor;\r\n\t}",
"public function getPanelContent()\n {\n return null;\n }",
"public function renderQuickEdit() {}",
"function pexeto_show_pane( $atts, $content = null ) {\r\n\t\treturn '<div>'.do_shortcode( $content ).'</div>';\r\n\t}",
"function dumpContents()\r\n {\r\n\r\n if(($this->ControlState & csDesigning) == csDesigning)\r\n {\r\n $attr = \"\";\r\n if($this->_width != \"\")\r\n $attr .= \" width=\\\"$this->_width\\\" \";\r\n if($this->_height != \"\")\r\n $attr .= \" height=\\\"$this->_height\\\" \";\r\n\r\n $bstyle = \" style=\\\"border: 1px dotted #000000\\\" \";\r\n echo \"<table $attr $bstyle><tr><td>\\n\";\r\n }\r\n\r\n $l = $this->_left;\r\n $t = $this->_top;\r\n $w = $this->_left + $this->_width;\r\n $h = $this->_top + $this->_height;\r\n $centerx = $this->_left + $this->_width / 2;\r\n $centery = $this->_top + $this->_height / 2;\r\n $minimum = $this->_width >= $this->_height? $this->_width: $this->_height;\r\n $radius = $minimum / 2;\r\n\r\n $events = $this->readJsEvents();\r\n\r\n $shape = \"\";\r\n $coords = \"\";\r\n\r\n switch($this->_kind)\r\n {\r\n case skRectangle:\r\n $shape = 'rect';\r\n $coords = \"$l,$t,$w,$h\";\r\n break;\r\n case skCircle:\r\n $shape = 'circle';\r\n $coords = \"$centerx,$centery,$radius\";\r\n break;\r\n case skDefault:\r\n $shape = 'default';\r\n break;\r\n default:\r\n exit('Shape kind not valid.');\r\n\r\n }\r\n\r\n $target = \"\";\r\n if($this->_target != '')\r\n $target = ' target=\"' . $this->_target . '\" ';\r\n\r\n // add or replace the JS events with the wrappers if necessary\r\n $this->addJSWrapperToEvents($events, $this->_onclick, $this->_jsonclick, \"onclick\");\r\n $this->addJSWrapperToEvents($events, $this->_ondblclick, $this->_jsondblclick, \"ondblclick\");\r\n\r\n //$hint = $this->Hint != \"\" & $this->ShowHint? $this->Hint: \"\";\r\n\r\n $hint = $this->HintAttribute();\r\n $hint .= \" alt=\\\"\" . htmlspecialchars($this->_hint, ENT_QUOTES) . \"\\\"\";\r\n\r\n $coords_final = ($coords != \"\") ? \"coords=\\\"$coords\\\"\" : \"\";\r\n\r\n echo \"<area id=\\\"$this->_name\\\" shape=\\\"$shape\\\" $coords_final $hint href=\\\"$this->_link\\\" $target $events />\\n\";\r\n\r\n if(($this->ControlState & csDesigning) == csDesigning)\r\n {\r\n echo \"</table>\\n\";\r\n }\r\n\r\n\r\n\r\n\r\n // add a hidden field so we can determine which event for the Paintbox was fired\r\n if($this->_onclick != null || $this->_ondblclick != null)\r\n {\r\n $hiddenwrapperfield = $this->readJSWrapperHiddenFieldName();\r\n echo \"<input type=\\\"hidden\\\" id=\\\"$hiddenwrapperfield\\\" name=\\\"$hiddenwrapperfield\\\" value=\\\"\\\" />\";\r\n }\r\n\r\n\r\n }",
"function editor_element($params)\n {\n $params['innerHtml'] = \"<img src='\".$this->config['icon'].\"' title='\".$this->config['name'].\"' />\";\n $params['innerHtml'].= \"<div class='avia-element-label'>\".$this->config['name'].\"</div>\";\n $params['content'] \t = NULL; //remove to allow content elements\n\n return $params;\n }",
"function darksnow_widgets_init() {\n\n\t\n\t\n\t\n}",
"protected function render_content() {\n\t\t\t?>\n\t\t\t\t<div class=\"customizer-divider\"></div>\n\t\t\t<?php\n\t\t}",
"function editor($div)\n {\n $editorLocation=base_url().'assets/plugins/niceEdit';\n\n $js = \"<script type='text/javascript' src='{$editorLocation}/nicEdit.js'>\n </script>\n <script type='text/javascript'>\n //<![CDATA[\n bkLib.onDomLoaded(function() {\n new nicEditor({iconsPath : '{$editorLocation}/nicEditorIcons.gif'\n }).panelInstance($div);\n });\n //]]>\n </script>\";\n\n return $js;\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 }",
"function radium_bbpress_widget_area_content() {\n\n echo '<div class=\"widget widget_text\"><div class=\"widget-wrap\">';\n\n echo '<div class=\"section-title\"><h4 class=\"widget-title\">';\n __( 'Forum Sidebar Widget Area', 'newsfront-bbpress' );\n echo '</h4></div>';\n\n echo '<div class=\"textwidget\"><p>';\n printf( __( 'This is the Forum Sidebar Widget Area. You can add content to this area by visiting your <a href=\"%s\">Widgets Panel</a> and adding new widgets to this area.', 'newsfront-bbpress' ), admin_url( 'widgets.php' ) );\n echo '</p></div>';\n echo '</div></div>';\n\n }",
"public function inline_css() { ?>\n\n\t\t\t<style type=\"text/css\">\n\t\t\t\tbody #wprt-add-widget h3 { text-align: center !important; padding: 15px 7px; font-size: 1.3em; margin-top: 5px; }\n\t\t\t\tbody div#widgets-right .sidebar-wprt-custom .widgets-sortables { padding-bottom: 45px }\n\t\t\t\tbody div#widgets-right .sidebar-wprt-custom.closed .widgets-sortables { padding-bottom: 0 }\n\t\t\t\tbody .wprt-widget-area-footer { display: block; position: absolute; bottom: 0; left: 0; height: 40px; line-height: 40px; width: 100%; border-top: 1px solid #e4e4e4; }\n\t\t\t\tbody .wprt-widget-area-footer > div { padding: 8px 8px 0 }\n\t\t\t\tbody .wprt-widget-area-footer .wprt-widget-area-id { display: block; float: left; max-width: 48%; overflow: hidden; position: relative; top: -6px; }\n\t\t\t\tbody .wprt-widget-area-footer .wprt-widget-area-buttons { float: right }\n\t\t\t\tbody .wprt-widget-area-footer .description { padding: 0 !important; margin: 0 !important; }\n\t\t\t\tbody div#widgets-right .sidebar-wprt-custom.closed .widgets-sortables .wprt-widget-area-footer { display: none }\n\t\t\t\tbody .wprt-widget-area-footer .wprt-widget-area-delete { display: block; float: right; margin: 0; }\n\t\t\t\tbody .wprt-widget-area-footer .wprt-widget-area-delete-confirm { display: none; float: right; margin: 0 5px 0 0; }\n\t\t\t\tbody .wprt-widget-area-footer .wprt-widget-area-delete-cancel { display: none; float: right; margin: 0; }\n\t\t\t\tbody .wprt-widget-area-delete-confirm:hover:before { color: red }\n\t\t\t\tbody .wprt-widget-area-delete-confirm:hover { color: #333 }\n\t\t\t\tbody .wprt-widget-area-delete:hover:before { color: #919191 }\n\t\t\t\tbody .activate_spinner { display: block !important; position: absolute; top: 10px; right: 4px; background-color: #ECECEC; }\n\t\t\t\tbody #wprt-add-widget form { text-align: center }\n\t\t\t\tbody #widget_area-wprt-custom,\n\t\t\t\tbody #widget_area-wprt-custom h3 { position: relative }\n\t\t\t\tbody #wprt-add-widget p { margin-top: 0 }\n\t\t\t\tbody #wprt-add-widget { margin: 10px 0 0; position: relative; }\n\t\t\t\tbody #wprt-add-widget-input { max-width: 95%; padding: 8px; margin-bottom: 14px; margin-top: 3px; text-align: center; }\n\t\t\t</style>\n\n\t\t<?php }",
"function siteorigin_panels_the_widget( $widget, $instance, $section, $grid, $cell, $panel, $is_last, $post_id = false ) {\n\tif ( !class_exists( $widget ) ) return;\n\tif( empty($post_id) ) $post_id = get_the_ID();\n\n\t$the_widget = new $widget;\n\n\t$classes = array( 'panel' );\n\tif ( !empty( $the_widget->id_base ) ) $classes[] = $the_widget->id_base;\n\tif ( $is_last ) $classes[] = 'panel-last';\n\tif ($instance['align']) $classes[] = $instance['align'];\n\t$classes[] = 'panel-'.($panel+1);\n\n\t$the_widget->widget( array(\n\t\t'before_widget' => '<div class=\"' . esc_attr( implode( ' ', $classes ) ) . '\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h3>',\n\t\t'after_title' => '</h3>'\n\t), $instance );\n}"
] |
[
"0.72126967",
"0.63477916",
"0.6169561",
"0.60817474",
"0.5958625",
"0.59205747",
"0.58576584",
"0.5855306",
"0.5834674",
"0.5833665",
"0.5828502",
"0.5819284",
"0.5788769",
"0.57825243",
"0.56552345",
"0.5642422",
"0.563686",
"0.5562818",
"0.5505961",
"0.54764557",
"0.54686487",
"0.5459967",
"0.5454301",
"0.54540783",
"0.5442606",
"0.5422397",
"0.5410782",
"0.5406383",
"0.5397896",
"0.53914756"
] |
0.7308784
|
0
|
This draws a TinyMCE area
|
public function drawSpecialTinyMCE(){
// This needs cutting down every now and again
$html = '<script type="text/javascript" src="/treeline/includes/tiny_mce/tiny_mce.js"></script>'."\n";
$html .= '<script type="text/javascript" src="/treeline/behaviour/tiny_mce/tiny_mce_special.js"></script>';
return $html;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function drawPanelTinyMCE() {\n\t\t\t// This needs cutting down to edit a panel -- basic formatting etc\n\t\t\t$html = '<script type=\"text/javascript\" src=\"/treeline/includes/tiny_mc3/jscripts/tiny_mce/tiny_mce.js\"></script>'.\"\\n\";\n\t\t\t$html .= '<script type=\"text/javascript\" src=\"/treeline/behaviour/tiny_mce/tiny_mce_panel.js\"></script>';\n\t\t\treturn $html;\n\t\t}",
"public function drawTinyMCE($files=array()) {\n\t\t\t// This draws a TinyMCE area\n $filepath=\"/treeline/includes/tiny_mc3/jscripts/tiny_mce/tiny_mce.js\";\n //$filepath=\"/treeline/includes/tiny_mc3/jscripts/tiny_mce/tiny_mce_src.js\";\n if (file_exists($_SERVER['DOCUMENT_ROOT'].$filepath) ) {\n\t\t\t\t//$html.='<!-- Add tiny mce js ('.$_SERVER['DOCUMENT_ROOT'].$filepath.') -->';\n\t\t\t\t/*\n\t\t\t\t$html.='<script type=\"text/javascript\">';\n\t\t\t\t$html.=file_get_contents($_SERVER['DOCUMENT_ROOT'].$filepath);\n\t\t\t\t$html.=\"</script>\";\n\t\t\t\t*/\n\t\t\t\t$html = '<script type=\"text/javascript\" src=\"'.$filepath.'\"></script>'.\"\\n\";\n if (is_array($files)) {\n foreach($files as $mceFile) {\n $html .= '<script type=\"text/javascript\" src=\"/treeline/behaviour/tiny_mce/tiny_mce_'.$mceFile.'.js\"></script>';\n }\n }\n }\n else $html=\"<!-- cant find requested tiny_mce file -->\";\n\t\t\treturn $html;\n\t\t}",
"public function drawContent()\n\t\t{\n\t\t}",
"protected function EditorInit()\r\n\t{\r\n\t\t$editor = \t'<script type=\"text/javascript\" src=\"application/controls/tinymce/jscripts/tiny_mce/tiny_mce.js\"></script>'.NEW_LINE.\r\n\t\t\t\t\t'<script type=\"text/javascript\"> '.NEW_LINE.\r\n\t\t\t\t\t'\ttinyMCE.init({'.NEW_LINE.\r\n\t\t\t\t\t'\t\t// General options'.NEW_LINE.\r\n\t\t\t\t\t'\t\tmode : \"textareas\",'.NEW_LINE.\r\n\t\t\t\t\t'\t\ttheme : \"advanced\",'.NEW_LINE.\r\n\t\t\t\t\t'\t\tplugins : \"safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,inlinepopups\",'.NEW_LINE.\r\n\t\t\t\t\t\r\n\t\t\t\t\t'\t\t// Theme options'.NEW_LINE.\r\n\t\t\t\t\t'\t\ttheme_advanced_buttons1 : \"save,newdocument,|,cut,copy,paste,pastetext,pasteword,|,search,replace,|,undo,redo,|,cleanup,code,iespell,|,preview,template,fullscreen\",'.NEW_LINE.\r\n\t\t\t\t\t'\t\ttheme_advanced_buttons2 : \"bold,italic,underline,strikethrough,sub,sup,|,justifyleft,justifycenter,justifyright,justifyfull,|,bullist,numlist,|,outdent,indent,blockquote,|,forecolor,backcolor,|,removeformat,visualaid\",'.NEW_LINE.\r\n\t\t\t\t\t'\t\ttheme_advanced_buttons3 : \"tablecontrols,|,insertdate,inserttime,|,charmap,media,image,advhr,|,link,unlink,anchor\",'.NEW_LINE.\r\n\t\t\t\t\t'\t\ttheme_advanced_buttons4 : \"formatselect,|,fontselect,|,fontsizeselect,|,del,ins,|,ltr,rtl,visualchars,nonbreaking,pagebreak\",'.NEW_LINE.\r\n\t\t\t\t\t'\t\ttheme_advanced_toolbar_location : \"top\",'.NEW_LINE.\r\n\t\t\t\t\t'\t\ttheme_advanced_toolbar_align : \"left\",'.NEW_LINE.\r\n\t\t\t\t\t'\t\ttheme_advanced_statusbar_location : \"bottom\",'.NEW_LINE.\r\n\t\t\t\t\t'\t\ttheme_advanced_resizing : true,'.NEW_LINE.\r\n\t\t\t\t\t \r\n\t\t\t\t\t'\t\t// Example word content CSS (should be your site CSS) this one removes paragraph margins'.NEW_LINE.\r\n\t\t\t\t\t'\t\tcontent_css : \"/includes/word.css\",'.NEW_LINE.\r\n\t\t\t\t\t \r\n\t\t\t\t\t'\t\t// Drop lists for link/image/media/template dialogs'.NEW_LINE.\r\n\t\t\t\t\t'\t\ttemplate_external_list_url : \"lists/template_list.js\",'.NEW_LINE.\r\n\t\t\t\t\t'\t\texternal_link_list_url : \"lists/link_list.js\",'.NEW_LINE.\r\n\t\t\t\t\t'\t\texternal_image_list_url : \"lists/image_list.js\",'.NEW_LINE.\r\n\t\t\t\t\t'\t\tmedia_external_list_url : \"lists/media_list.js\",'.NEW_LINE.\r\n\t\t\t\t\t \r\n\t\t\t\t\t'\t\t// Replace values for the template plugin'.NEW_LINE.\r\n\t\t\t\t\t'\t\ttemplate_replace_values : {'.NEW_LINE.\r\n\t\t\t\t\t'\t\t\tusername : \"Some User\",'.NEW_LINE.\r\n\t\t\t\t\t'\t\t\tstaffid : \"991234\"'.NEW_LINE.\r\n\t\t\t\t\t'\t\t}'.NEW_LINE.\r\n\t\t\t\t\t'\t});'.NEW_LINE.\r\n\t\t\t\t\t'</script>'.NEW_LINE;\r\n\t\t\r\n\t\treturn $editor;\r\n\t}",
"function botSpawEditorArea($name, $content, $hiddenField, $width, $height, $col, $row) {\n\trequire_once(dirname(__FILE__) . \"/spaw/spaw.inc.php\");\n\t$sw = new SpawEditor($hiddenField, html_entity_decode($content, ENT_QUOTES));\n\t$sw->show();\n}",
"public function drawWorkPanelTinyMCE() {\n\t\t\t$html = '<script type=\"text/javascript\" src=\"/treeline/includes/tiny_mc3/jscripts/tiny_mce/tiny_mce.js\"></script>'.\"\\n\";\n\t\t\t$html .= '<script type=\"text/javascript\" src=\"/treeline/behaviour/tiny_mce/tiny_mce_workpanel.js\"></script>';\n\t\t\treturn $html;\n\t\t}",
"public function callback_wysiwyg( $args ) {\n\n $name_id = $args['name_id'];\n if ($args['parent']) {\n $value = $this->get_option( $args['parent']['id'], $args['section'], $args['std'], $args['global'] );\n $value = isset($value[$args['id']]) ? $value[$args['id']] : $args['std'];\n }else {\n $value = $this->get_option( $args['id'], $args['section'], $args['std'], $args['global'] );\n }\n $size = isset( $args['size'] ) && !is_null( $args['size'] ) ? $args['size'] : '500px';\n\n echo '<div style=\"max-width: ' . $size . ';\">';\n\n $editor_settings = array(\n 'teeny' => true,\n 'textarea_name' => $name_id,\n 'textarea_rows' => 10\n );\n\n if ( isset( $args['options'] ) && is_array( $args['options'] ) ) {\n $editor_settings = array_merge( $editor_settings, $args['options'] );\n }\n\n wp_editor( $value, $args['section'] . '-' . $args['id'], $editor_settings );\n\n echo '</div>';\n\n echo $this->get_field_description( $args );\n }",
"function &previewTarea( &$text, $html = 0, $smiley = 1, $xcode = 1, $image = 1, $br = 1 ) {\n return $this->displayTarea( $text, $html, $smiley, $xcode, $image, $br );\n }",
"public static function renderTextarea();",
"function wysiwyg($args) {\r\n\t\t\t$args = $this->apply_name_fix($this->apply_default_args($args)) ;\r\n\t\t\techo \"<div class='postarea'>\";\r\n\t\t\tthe_editor($args['value'] , $args['formname']);\r\n\t\t\techo \"</div>\";\r\n\t\t\t$this->description($args['description']);\r\n\t\t}",
"public static function add_editor() {\n\t\t\twp_enqueue_script( 'tiny_mce' );\n\n\t\t\techo '<div id=\"kirki_editor_pane\" class=\"hide\">';\n\t\t\twp_editor( '', 'kirki-editor', array(\n\t\t\t\t'_content_editor_dfw' => false,\n\t\t\t\t'drag_drop_upload' => true,\n\t\t\t\t'tabfocus_elements' => 'content-html,save-post',\n\t\t\t\t'editor_height' => 200,\n\t\t\t\t'default_editor' => 'tinymce',\n\t\t\t\t'teeny' => true,\n\t\t\t\t'tinymce' => array(\n\t\t\t\t\t'resize' => false,\n\t\t\t\t\t'wp_autoresize_on' => false,\n\t\t\t\t\t'add_unload_trigger' => false,\n\t\t\t\t),\n\t\t\t) );\n\t\t\techo '</div>';\n\t\t\tdo_action( 'admin_footer' );\n\t\t\tdo_action( 'admin_print_footer_scripts' );\n\t\t}",
"function beaver_extender_fe_style_editor() {\n\t\n?>\n\t<div id=\"beaver-extender-fe-style-editor\" style=\"display:none;\">\n\t\t\n\t\t<h3>\n\t\t\t<span class=\"dashicons dashicons-move\" style=\"padding-top:3px;\"></span>\n\t\t</h3>\n\t\t\n\t\t<?php do_action( 'beaver_extender_fe_style_editor_form' ); ?>\n\t\t\n\t</div><!-- END #beaver-extender-fe-style-editor -->\n<?php\n\n}",
"function render()\r\n {\r\n $ret = $this->editor->render();\r\n $ret .= parent::render();\r\n\r\n return $ret;\r\n }",
"function beaver_extender_fe_style_editor_add_html() {\n\n\t$enable_ace_editor_syntax_validation = beaver_extender_get_settings( 'enable_ace_editor_syntax_validation' );\n\t$ace_editor_syntax_validation = !empty( $enable_ace_editor_syntax_validation ) ? 'true' : 'false';\n\n?>\n<script type=\"text/javascript\">\nvar ace_editor_syntax_validation = <?php echo $ace_editor_syntax_validation ?>;\nvar beaver_extender_fe_style_editor_images_url = 'url(<?php echo beaver_extender_get_stylesheet_location( 'url' ) . 'images'; ?>';\nvar beaver_extender_fe_style_editor_images_url_single_quotes = 'url(\\'<?php echo beaver_extender_get_stylesheet_location( 'url' ) . 'images'; ?>';\nvar beaver_extender_fe_style_editor_images_url_double_quotes = 'url(\"<?php echo beaver_extender_get_stylesheet_location( 'url' ) . 'images'; ?>';\nvar ajaxurl = '<?php echo admin_url( 'admin-ajax.php' ); ?>';\n</script>\n<?php\n\n\techo '<span id=\"beaver-extender-fe-style-editor-css\"><span class=\"dashicons dashicons-editor-code\"></span></span>' . \"\\n\";\n\tbeaver_extender_fe_style_editor();\n\t\n}",
"public function render_content() {\n\t\t\t?>\n\t\t\t<label>\n\t\t\t\t<span class=\"customize-control-title\"><?php echo esc_html( $this->label ); ?></span>\n\t\t\t\t<span class=\"description customize-control-description\"><?php echo esc_html( $this->description ); ?></span>\n\t\t\t</label>\n\t\t\t<div class=\"wds-customize-text-editor\">\n\t\t\t\t<?php\n\t\t\t\t// Setttings for the editor.\n\t\t\t\t$settings = array(\n\t\t\t\t\t'textarea_name' => $this->id,\n\t\t\t\t\t'textarea_rows' => 4,\n\t\t\t\t\t'media_buttons' => true,\n\t\t\t\t);\n\n\t\t\t\t// Add the editor.\n\t\t\t\twp_editor( $this->value(), $this->id, $settings );\n\n\t\t\t\t// Only enqueue scripts once.\n\t\t\t\tif ( 0 === self::$count ) {\n\t\t\t\t\t$this->enqueue_scripts();\n\t\t\t\t}\n\n\t\t\t\t// add the footer scripts.\n\t\t\t\t$this->add_footer_scripts();\n\n\t\t\t\t// Increment count.\n\t\t\t\t++self::$count;\n\t\t\t\t?>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}",
"public function create_visual_editor( $params ) {\n\t\t\t\n\t\t\t$innerHtml = '<div class=\"oxo_iconbox textblock_element textblock_element_style\" id=\"oxo_shortcodes\">';\n\t\t\t$innerHtml .= '<div class=\"bilder_icon_container\"><span class=\"oxo_iconbox_icon\"><i class=\"oxoa-shopping-cart\"></i><sub class=\"sub\">' . __( 'Woo Shortcodes', 'oxo-core' ) . '</sub><p class=\"woo_shortcode\">[woocommerce_order_tracking]</p></span></div>';\n\t\t\t$innerHtml .= '</div>';\n\t\t\t$this->config['innerHtml'] = $innerHtml;\n\t\t\t\n\t\t}",
"public function after_editor() {\n echo '</div>';\n $this->render_builder();\n }",
"public function render_content() {\n\t\t\t?>\n\t\t\t<div class=\"tinymce-control\">\n\t\t\t\t<span class=\"customize-control-title\"><?php echo esc_html( $this->label ); ?></span>\n\t\t\t\t<?php if ( ! empty( $this->description ) ) { ?>\n\t\t\t\t\t<span class=\"customize-control-description\"><?php echo esc_html( $this->description ); ?></span>\n\t\t\t\t<?php } ?>\n\t\t\t\t<textarea id=\"<?php echo esc_attr( $this->id ); ?>\" class=\"customize-control-tinymce-editor\" <?php $this->link(); ?>><?php echo esc_attr( $this->value() ); ?></textarea>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}",
"function dumpContents()\r\n {\r\n\r\n if(($this->ControlState & csDesigning) == csDesigning)\r\n {\r\n $attr = \"\";\r\n if($this->_width != \"\")\r\n $attr .= \" width=\\\"$this->_width\\\" \";\r\n if($this->_height != \"\")\r\n $attr .= \" height=\\\"$this->_height\\\" \";\r\n\r\n $bstyle = \" style=\\\"border: 1px dotted #000000\\\" \";\r\n echo \"<table $attr $bstyle><tr><td>\\n\";\r\n }\r\n\r\n $l = $this->_left;\r\n $t = $this->_top;\r\n $w = $this->_left + $this->_width;\r\n $h = $this->_top + $this->_height;\r\n $centerx = $this->_left + $this->_width / 2;\r\n $centery = $this->_top + $this->_height / 2;\r\n $minimum = $this->_width >= $this->_height? $this->_width: $this->_height;\r\n $radius = $minimum / 2;\r\n\r\n $events = $this->readJsEvents();\r\n\r\n $shape = \"\";\r\n $coords = \"\";\r\n\r\n switch($this->_kind)\r\n {\r\n case skRectangle:\r\n $shape = 'rect';\r\n $coords = \"$l,$t,$w,$h\";\r\n break;\r\n case skCircle:\r\n $shape = 'circle';\r\n $coords = \"$centerx,$centery,$radius\";\r\n break;\r\n case skDefault:\r\n $shape = 'default';\r\n break;\r\n default:\r\n exit('Shape kind not valid.');\r\n\r\n }\r\n\r\n $target = \"\";\r\n if($this->_target != '')\r\n $target = ' target=\"' . $this->_target . '\" ';\r\n\r\n // add or replace the JS events with the wrappers if necessary\r\n $this->addJSWrapperToEvents($events, $this->_onclick, $this->_jsonclick, \"onclick\");\r\n $this->addJSWrapperToEvents($events, $this->_ondblclick, $this->_jsondblclick, \"ondblclick\");\r\n\r\n //$hint = $this->Hint != \"\" & $this->ShowHint? $this->Hint: \"\";\r\n\r\n $hint = $this->HintAttribute();\r\n $hint .= \" alt=\\\"\" . htmlspecialchars($this->_hint, ENT_QUOTES) . \"\\\"\";\r\n\r\n $coords_final = ($coords != \"\") ? \"coords=\\\"$coords\\\"\" : \"\";\r\n\r\n echo \"<area id=\\\"$this->_name\\\" shape=\\\"$shape\\\" $coords_final $hint href=\\\"$this->_link\\\" $target $events />\\n\";\r\n\r\n if(($this->ControlState & csDesigning) == csDesigning)\r\n {\r\n echo \"</table>\\n\";\r\n }\r\n\r\n\r\n\r\n\r\n // add a hidden field so we can determine which event for the Paintbox was fired\r\n if($this->_onclick != null || $this->_ondblclick != null)\r\n {\r\n $hiddenwrapperfield = $this->readJSWrapperHiddenFieldName();\r\n echo \"<input type=\\\"hidden\\\" id=\\\"$hiddenwrapperfield\\\" name=\\\"$hiddenwrapperfield\\\" value=\\\"\\\" />\";\r\n }\r\n\r\n\r\n }",
"function add_wysiwyg() {\n\t\techo '\n<script type=\"text/javascript\">\n\tjQuery(function($) {\n\t\t';\n\t\tforeach($this->wysiwyg_items as $item) {\n\t\t\techo '\n\t\t\t\tCKEDITOR.replace( \"'.$item.'\",{\n\t\t\t\t\tcustomConfig : \"/index.php?cf_meta_action=ckeditor_toolbar_config\"\n\t\t\t\t});\n\t\t\t';\n\t\t}\n\t\techo '\n\t});\n</script>\n\t\t\t';\n\t\treturn;\n\t}",
"public function editView() {\n $this->template()->addTplFile('edit.phtml');\n $this->setTinyMCE($this->formEdit->text, 'advanced');\n $this->setTinyMCE($this->formEdit->textPanel, 'advanced', array('height' => 300));\n if(isset($this->formEdit->textFooter)){\n $this->setTinyMCE($this->formEdit->textFooter, 'advanced', array('height' => 300));\n }\n Template_Module::setEdit(true);\n }",
"public function create_visual_editor( $params ) {\n\n\t\t\t$innerHtml = '<div class=\"oxo_iconbox textblock_element textblock_element_style\">';\n\t\t\t$innerHtml .= '<div class=\"bilder_icon_container\"><span class=\"oxo_iconbox_icon\"><i class=\"oxoa-tag\"></i><sub class=\"sub\">' . __( 'Events', 'oxo-core' ) . '</sub></span></div>';\n\t\t\t$innerHtml .= '</div>';\n\t\t\t$this->config['innerHtml'] = $innerHtml;\n\t\t}",
"function setTextEditor(&$t, $auto_editor, $form_field='', $full_page=false)\r\n\t{\r\n\r\n\t\t global $CONFIG, $general_strings;\r\n\r\n\t\t $browser=browser_get_agent();\r\n\t\t if (($browser['agent']=='IE' && $browser['version']>=5.5 && $browser['platform']=='Win') || $browser['gecko_version']>='20030210' \r\n//Safari still too useless... and it hangs when you try to drag an image around.. test again after build 420 is out.\r\n//\t\t|| ($browser['agent']=='SAFARI' && $browser['version']>=420)\r\n\t\t){\r\n\r\n\t\t\t$init_ed=\"init_editor('\".$form_field.\"','Editor2', {});\";\r\n\r\n\t\t\tif(strpos($t->get_var('SCRIPT_EDITOR'),'dojo_ed.js')===false) {\r\n\t\t\t\t$t->set_var('SCRIPT_EDITOR','<script type=\"text/javascript\" language=\"javascript\" src=\"'.$CONFIG['PATH'].'/includes/dojo/dojo_ed.js?v2\"></script>',true);\r\n\t\t\t}\r\n\r\n\t\t\tif ($auto_editor && $form_field) {\r\n\t\t\t\t$t->set_var('SCRIPT_EDITOR','<script type=\"text/javascript\">',true);\r\n\t\t\t\t$t->set_var('SCRIPT_EDITOR',\r\n\t\t\t\t\t'dojo.addOnLoad(function() {'.$init_ed.'});',true);\r\n\t\t\t\t$t->set_var('SCRIPT_EDITOR','</script>',true);\r\n\r\n\t\t\t\t$t->set_var('EDITOR_BUTTONS_'.$form_field,'');\r\n\t\t\t\t$t->set_var('EDITOR_STYLE_'.$form_field,''); //hidden?\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\t$t->set_var('EDITOR_STYLE_'.$form_field,'');\r\n\t\t\t\t$t->set_var('EDITOR_BUTTONS_'.$form_field,'<span class=\"ed_button\" id=\"button_for_'.$form_field.'\"><input type=\"button\" name=\"Button\" value=\"'.$general_strings['easy_edit'].'\" class=\"small\" onClick=\"'.$init_ed.'\"></span>');\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$t->set_var('EDITOR_STYLE_'.$form_field,'');\r\n\t\t\t$t->set_var('EDITOR_BUTTONS_'.$form_field,'<div class=\"ed_button\"><input type=\"button\" name=\"link\" value=\"'.$general_strings['insert_link'].'\" class=\"small\" onClick=\"make_link(\\''.$form_field.'\\')\"/>\r\n<input type=\"button\" name=\"elink\" value=\"'.$general_strings['email_link'].'\" class=\"small\" onClick=\"make_email_link(\\''.$form_field.'\\')\" /> \r\n<input type=\"button\" value=\"'.$general_strings['preview'].'\" name=\"preview\" class=\"small\" onClick=\"display_html(\\''.$form_field.'\\')\"/> \r\n<input type=\"button\" name=\"Italics\" value=\"'.$general_strings['italic_abb'].'\" class=\"small\" style=\"font-style:italic\" onClick=\"make_italics(\\''.$form_field.'\\')\" /> \r\n<input type=\"button\" name=\"Bols\" value=\"'.$general_strings['bold_abb'].'\" class=\"small\" style=\"font-weight:bold\" onClick=\"make_bold(\\''.$form_field.'\\')\"/> ');\r\n\r\n\t\t\t$t->set_var('EDITOR_BUTTONS_'.$form_field,'<input type=\"button\" name=\"image\" value=\"'.$general_strings['add_image'].'\" class=\"small\" onClick=\"get_image(\\''.$CONFIG['PATH'].'\\',\\''.$form_field.'\\');\" />',true);\r\n\r\n\t\t\tif (!($t->get_var('SCRIPT_EDITOR'))) {\r\n// \t\t\t\t$t->set_var('SCRIPT_EDITOR','<script type=\"text/javascript\" language=\"javascript\" src=\"'.$CONFIG['PATH'].'/includes/editor/popups/popup.js\" ></script>\r\n// \t\t\t\t<script type=\"text/javascript\" language=\"javascript\" src=\"'.$CONFIG['PATH'].'/includes/editor/use_dialogs.js\" ></script>', true);\r\n\r\n\t\t\t\t$t->set_var('SCRIPT_INCLUDES','<script type=\"text/javascript\" language=\"javascript\" src=\"'.$CONFIG['PATH'].'/includes/editor/popups/popup.js\" ></script>\r\n\t\t\t\t<script type=\"text/javascript\" language=\"javascript\" src=\"'.$CONFIG['PATH'].'/includes/editor/dialogs.js\" ></script>\r\n\t\t\t\t<script type=\"text/javascript\" language=\"javascript\" src=\"'.$CONFIG['PATH'].'/includes/editor/use_dialogs.js\" ></script>\r\n\t\t\t\t', true);\r\n\t\t\t}\r\n\t\t\t$t->set_var('EDITOR_BUTTONS_'.$form_field,'</div>',true);\r\n\t\t}\r\n\t\treturn true;\r\n\t\r\n\t}",
"function callback_wysiwyg(array $args)\n {\n }",
"function tlspi_make_text_area() { ?>\n\t<div class=\"wrap\"> \n\t\t<h1>The La Source Newspaper Post Importer</h1> \n \n\t\t<form method=\"post\" action=\"\"> \n\t\t\t<label>copy and paste document here... <br />\n\t\t\t<textarea rows=\"60\" cols=\"100\" name=\"preview\" id=\"code\" ></textarea> </label>\n\t\t\t\n\t\t\t<br> \n\t\t\t<input type =\"submit\" value=\"Preview\" name=\"submit\" class=\"button-primary\"> \n\t\t\t<br>\n\t\t</form> <br> \n\t\t<script>\n\t\t\tvar editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n\t\t\t\tmode: { name: \"xml\", alignCDATA: true},\n\t\t\t\tlineNumbers: true\n\t\t\t});\n\t\t</script>\n\t</div>\n<?php\n}",
"function wp_tinymce_inline_scripts()\n {\n }",
"function fbWriteTextarea($areaname, $html, $width, $height, $useRte, $emoticons)\r\n {\r\n // well $html is the $message to edit, generally it means in PLAINTEXT @FireBoard!\r\n global $editmode;\r\n // ERROR: mixed global $editmode\r\n global $fbConfig;\r\n\r\n // (JJ) JOOMLA STYLE CHECK\r\n if ($fbConfig->joomlastyle < 1) {\r\n $boardclass = \"fb_\";\r\n }\r\n ?>\r\n\r\n <tr class = \"<?php echo $boardclass; ?>sectiontableentry1\">\r\n <td class = \"fb_leftcolumn\" valign = \"top\">\r\n <strong><a href = \"<?php echo sefRelToAbs(JB_LIVEURLREL.'&func=faq').'#boardcode';?>\"><?php echo _COM_BOARDCODE; ?></a></strong>:\r\n </td>\r\n\r\n <td>\r\n <table border = \"0\" cellspacing = \"0\" cellpadding = \"0\" class = \"fb-postbuttonset\">\r\n <tr>\r\n <td class = \"fb-postbuttons\">\r\n <input type = \"button\" class = \"<?php echo $boardclass;?>button\" accesskey = \"b\" name = \"addbbcode0\" value = \" B \" style = \"font-weight:bold; \" onclick = \"bbstyle(0)\" onmouseover = \"helpline('b')\"/>\r\n\r\n <input type = \"button\" class = \"<?php echo $boardclass;?>button\" accesskey = \"i\" name = \"addbbcode2\" value = \" i \" style = \"font-style:italic; \" onclick = \"bbstyle(2)\" onmouseover = \"helpline('i')\"/>\r\n\r\n <input type = \"button\" class = \"<?php echo $boardclass;?>button\" accesskey = \"u\" name = \"addbbcode4\" value = \" u \" style = \"text-decoration: underline;\" onclick = \"bbstyle(4)\" onmouseover = \"helpline('u')\"/>\r\n\r\n <input type = \"button\" class = \"<?php echo $boardclass;?>button\" accesskey = \"q\" name = \"addbbcode6\" value = \"Quote\" onclick = \"bbstyle(6)\" onmouseover = \"helpline('q')\"/>\r\n\r\n <input type = \"button\" class = \"<?php echo $boardclass;?>button\" accesskey = \"c\" name = \"addbbcode8\" value = \"Code\" onclick = \"bbstyle(8)\" onmouseover = \"helpline('c')\"/>\r\n\r\n <input type = \"button\" class = \"<?php echo $boardclass;?>button\" accesskey = \"k\" name = \"addbbcode10\" value = \"ul\" onclick = \"bbstyle(10)\" onmouseover = \"helpline('k')\"/>\r\n\r\n <input type = \"button\" class = \"<?php echo $boardclass;?>button\" accesskey = \"o\" name = \"addbbcode12\" value = \"ol\" onclick = \"bbstyle(12)\" onmouseover = \"helpline('o')\"/>\r\n\r\n <input type = \"button\" class = \"<?php echo $boardclass;?>button\" accesskey = \"l\" name = \"addbbcode18\" value = \"li\" onclick = \"bbstyle(18)\" onmouseover = \"helpline('l')\"/>\r\n\r\n <input type = \"button\" class = \"<?php echo $boardclass;?>button\" accesskey = \"p\" name = \"addbbcode14\" value = \"Img\" onclick = \"bbstyle(14)\" onmouseover = \"helpline('p')\"/>\r\n\r\n <input type = \"button\" class = \"<?php echo $boardclass;?>button\" accesskey = \"w\" name = \"addbbcode16\" value = \"URL\" style = \"text-decoration: underline; \" onclick = \"bbstyle(16)\" onmouseover = \"helpline('w')\"/>\r\n\r\n <input type = \"button\" class = \"<?php echo $boardclass;?>button\" accesskey = \"h\" name = \"addbbcode24\" value = \"Hide\" onclick = \"bbstyle(20)\" onmouseover = \"helpline('h')\"/>\r\n\r\n <?php echo _SMILE_COLOUR; ?>:\r\n\r\n <select name = \"addbbcode20\"\r\n onchange = \"bbfontstyle('[color=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/color]');\" onmouseover = \"helpline('s')\" class = \"<?php echo $boardclass;?>slcbox\">\r\n <option style = \"color:black; background-color: #FAFAFA\" value = \"\"><?php echo _COLOUR_DEFAULT; ?></option>\r\n\r\n <option style = \"color:#FF0000; background-color: #FAFAFA\" value = \"#FF0000\"><?php echo _COLOUR_RED; ?></option>\r\n\r\n <option style = \"color:#800080; background-color: #FAFAFA\" value = \"#800080\"><?php echo _COLOUR_PURPLE; ?></option>\r\n\r\n <option style = \"color:#0000FF; background-color: #FAFAFA\" value = \"#0000FF\"><?php echo _COLOUR_BLUE; ?></option>\r\n\r\n <option style = \"color:#008000; background-color: #FAFAFA\" value = \"#008000\"><?php echo _COLOUR_GREEN; ?></option>\r\n\r\n <option style = \"color:#FFFF00; background-color: #FAFAFA\" value = \"#FFFF00\"><?php echo _COLOUR_YELLOW; ?></option>\r\n\r\n <option style = \"color:#FF6600; background-color: #FAFAFA\" value = \"#FF6600\"><?php echo _COLOUR_ORANGE; ?></option>\r\n\r\n <option style = \"color:#000080; background-color: #FAFAFA\" value = \"#000080\"><?php echo _COLOUR_DARKBLUE; ?></option>\r\n\r\n <option style = \"color:#825900; background-color: #FAFAFA\" value = \"#825900\"><?php echo _COLOUR_BROWN; ?></option>\r\n\r\n <option style = \"color:#9A9C02; background-color: #FAFAFA\" value = \"#9A9C02\"><?php echo _COLOUR_GOLD; ?></option>\r\n\r\n <option style = \"color:#A7A7A7; background-color: #FAFAFA\" value = \"#A7A7A7\"><?php echo _COLOUR_SILVER; ?></option>\r\n </select>\r\n\r\n <?php echo _SMILE_SIZE; ?>:\r\n\r\n <select name = \"addbbcode22\" onchange = \"bbfontstyle('[size=' + this.form.addbbcode22.options[this.form.addbbcode22.selectedIndex].value + ']', '[/size]')\" onmouseover = \"helpline('f')\" class = \"<?php echo $boardclass;?>button\">\r\n <option value = \"1\"><?php echo _SIZE_VSMALL; ?></option>\r\n\r\n <option value = \"2\"><?php echo _SIZE_SMALL; ?></option>\r\n\r\n <option value = \"3\" selected = \"selected\"><?php echo _SIZE_NORMAL; ?></option>\r\n\r\n <option value = \"4\"><?php echo _SIZE_BIG; ?></option>\r\n\r\n <option value = \"5\"><?php echo _SIZE_VBIG; ?></option>\r\n </select>\n\n\t\t\t\t\t<?php if ($fbConfig->showspoilertag) {?>\n <script type=\"text/javascript\">\n\t\t\t\t\t\tfunction fb_spoiler_help() {document.postform.helpbox.value = 'Spoiler: [spoiler] ... [/spoiler]';}\n\t\t\t\t\t</script>\n <input type = \"button\" class = \"<?php echo $boardclass;?>button\" accesskey = \"s\" name = \"addbbcode40\" value = \"Spoiler\" onclick = \"bbfontstyle('[spoiler]', '[/spoiler]')\" onmouseover = \"fb_spoiler_help()\"/>\n\t\t\t\t\t<?php } ?>\n\n\t\t\t\t\t<?php if ($fbConfig->showebaytag) {?>\n <script type=\"text/javascript\">\n\t\t\t\t\t\tfunction fb_ebay_help() {document.postform.helpbox.value = 'eBay: [ebay]ItemId[/ebay]';}\n\t\t\t\t\t</script>\n <input type = \"button\" class = \"<?php echo $boardclass;?>button\" accesskey = \"e\" name = \"addbbcode30\" value = \"eBay\" onclick = \"bbfontstyle('[ebay]', '[/ebay]')\" onmouseover = \"fb_ebay_help()\"/>\n\t\t\t\t\t<?php } ?>\n\n\t\t\t\t\t<?php if ($fbConfig->showvideotag) {?>\n <span style=\"white-space:nowrap;\">\r\n\t\t\t\t\t<script type=\"text/javascript\">\r\n\t\t\t\t\t\tfunction fb_vid_help1() {document.postform.helpbox.value = 'Video: [video type=provider size=100 width=480 height=360]xyz[/video]';}\r\n\t\t\t\t\t\tfunction fb_vid_help2() {document.postform.helpbox.value = 'Video: [video size=100 width=480 height=360]http://myvideodomain.com/myvideo[/video]';}\r\n\t\t\t\t\t</script>\r\n\t\t\t\t\t<a href = \"javascript: bbfontstyle('[video]', '[/video]')\" onmouseover = \"fb_vid_help2()\">Video:</a>\r\n\t\t\t\t\t<select name = \"fb_vid_code1\" onchange = \"bbfontstyle('[video type=' + this.form.fb_vid_code1.options[this.form.fb_vid_code1.selectedIndex].value, '[/video]');\" onmouseover = \"fb_vid_help1()\" class = \"<?php echo $boardclass;?>button\">\r\n\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t$vid_provider = array('','AnimeEpisodes','Biku','Bofunk','Break','Clip.vn','Clipfish','Clipshack','Collegehumor','Current',\r\n\t\t\t\t\t\t\t'DailyMotion','DivX,divx]http://','DownloadFestival','Flash,flash]http://','FlashVars,flashvars param=]http://','Fliptrack',\r\n\t\t\t\t\t\t\t'Fliqz','Gametrailers','Gamevideos','Glumbert','GMX','Google','GooglyFoogly','iFilm','Jumpcut','Kewego','LiveLeak','LiveVideo',\r\n\t\t\t\t\t\t\t'MediaPlayer,mediaplayer]http://','MegaVideo','Metacafe','Mofile','Multiply','MySpace','MyVideo','QuickTime,quicktime]http://','Quxiu',\r\n\t\t\t\t\t\t\t'RealPlayer,realplayer]http://','Revver','RuTube','Sapo','Sevenload','Sharkle','Spikedhumor','Stickam','Streetfire','StupidVideos','Toufee','Tudou',\r\n\t\t\t\t\t\t\t'Unf-Unf','Uume','Veoh','VideoclipsDump','Videojug','VideoTube','Vidiac','VidiLife','Vimeo','WangYou','WEB.DE','Wideo.fr','YouKu','YouTube');\r\n\t\t\t\t\t\tforeach($vid_provider as $vid_type) {\r\n\t\t\t\t\t\t\tlist($vid_name, $vid_type) = explode(',', $vid_type);\r\n\t\t\t\t\t\t\techo '<option value = \"'.(($vid_type)?$vid_type:strtolower($vid_name).']').'\">'.$vid_name.'</option>';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t?>\r\n\t\t\t\t\t</select></span>\r\n\t\t\t\t\t<?php } ?>\n\r\n <a href = \"javascript: bbstyle(-1)\"onmouseover = \"helpline('a')\"><small><?php echo _BBCODE_CLOSA; ?></small></a>\r\n </td>\r\n </tr>\r\n\r\n <tr>\r\n <td class = \"<?php echo $boardclass;?>posthint\">\r\n <input type = \"text\" name = \"helpbox\" size = \"45\" class = \"<?php echo $boardclass;?>inputbox\" maxlength = \"100\" value = \"<?php echo _BBCODE_HINT;?>\"/>\r\n </td>\r\n </tr>\r\n </table>\r\n </td>\r\n </tr>\r\n\r\n <tr class = \"<?php echo $boardclass; ?>sectiontableentry2\">\r\n <td valign = \"top\" class = \"fb_leftcolumn\">\r\n <strong><?php echo _MESSAGE; ?></strong>:\r\n\r\n <?php\r\n if ($emoticons != 1)\r\n {\r\n ?>\r\n\r\n <br/>\r\n\r\n <br/>\r\n\r\n <div align = \"right\">\r\n <table border = \"0\" cellspacing = \"3\" cellpadding = \"0\">\r\n <tr>\r\n <td colspan = \"4\" style = \"text-align: center;\">\r\n <strong><?php echo _GEN_EMOTICONS; ?></strong>\r\n </td>\r\n </tr>\r\n\r\n <tr>\r\n <?php\r\n generate_smilies(); //the new function Smiley mod\r\n ?>\r\n </tr>\r\n </table>\r\n </div>\r\n\r\n <?php\r\n }\r\n ?>\r\n </td>\r\n\r\n <td valign = \"top\">\r\n <textarea class = \"<?php echo $boardclass;?>txtarea\" name = \"<?php echo $areaname;?>\" id = \"<?php echo $areaname;?>\"><?php echo htmlspecialchars($html, ENT_QUOTES); ?></textarea>\r\n<?php\r\nif ($editmode) {\r\n // Moderator edit area\r\n ?>\r\n <fieldset>\r\n <legend><?php echo _FB_EDITING_REASON?></legend>\r\n <input name=\"modified_reason\" size=\"40\" maxlength=\"200\" type=\"text\"><br />\r\n\r\n </fieldset>\r\n<?php\r\n}\r\n?>\r\n </td>\r\n </tr>\r\n\r\n<?php\r\n }",
"function drum_beat_add_editor_styles() {\n add_editor_style( 'assets/stylesheets/wysiwyg-style.css' );\n}",
"function uultra_get_me_wphtml_editor($meta, $content)\r\n\t{\r\n\t\tob_start();\r\n\t\t\r\n\t\t$editor_id = $meta;\t\t\t\t\r\n\t\t$editor_settings = array('media_buttons' => false , 'textarea_rows' => 40 , 'teeny' =>true, 'tinymce' => array( 'height' => 300 )); \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\twp_editor( $content, $editor_id , $editor_settings);\r\n\t\t\r\n\t\t// Store the contents of the buffer in a variable\r\n\t\t$editor_contents = ob_get_clean();\r\n\t\t\r\n\t\t// Return the content you want to the calling function\r\n\t\treturn $editor_contents;\r\n\t\t\t\r\n\t}",
"function showPreview() {\r\n $tpl = new tpl('gbook');\r\n $tpl->set(\"TEXT\", BBcode(escape($_POST[\"txt\"], \"textarea\")));\r\n $tpl->out('preview');\r\n}"
] |
[
"0.6503084",
"0.6378286",
"0.6311063",
"0.62932825",
"0.6187236",
"0.6084175",
"0.60697144",
"0.6055841",
"0.59548074",
"0.5931179",
"0.5869135",
"0.58528143",
"0.58376616",
"0.57573885",
"0.572894",
"0.56874925",
"0.5670205",
"0.5651625",
"0.56432176",
"0.564284",
"0.56236655",
"0.5621487",
"0.5611591",
"0.5594292",
"0.55637604",
"0.5541558",
"0.5541285",
"0.553603",
"0.5522739",
"0.5519732"
] |
0.65549064
|
0
|
12/12/2008 Phil Redclift Draw a list of publishable pages or panels with available options and pagination
|
public function drawPagePublishableList($page = 1, $format = 0){
global $site;
//print "dPPL($page, $format)<br>\n";
$this->setPerPage(10);
$this->setPage($page);
if($results = $this->getPagePublishableList($page, $format, $site->id) ){
switch($format){
case '0':
case 'pages':
$format = 'pages';
break;
case '1':
case 'panels':
$format = 'panels';
break;
default:
$format = '';
break;
}
$html = '<table class="treeline">
<caption>Publishable '.$format.'</caption>
<thead>
<tr>
<th scope="col">Preview</th>
<th scope="col">Title</th>
<th scope="col">Author</th>
<th scope="col">Created On</th>
<th scope="col">Publish</th>
<th scope="col">Reject</th>
</tr>
</thead>
<tbody>
';
foreach($results as $thispage){
$html .= "<tr>\n";
$html .= '<td class="action preview"><a href="'. $this->drawLinkByGUID($thispage->guid) .'?mode=preview&KeepThis=true&TB_iframe=true&height=520&width='.$site->getConfig("site_page_width").'" class="thickbox" title="Preview this">Preview this</a></td>'."\n";
$html .="<td><strong>".$thispage->title .'</strong>';
if($thispage->template == 'panelrss.php'){
$html .= ' <em style="color:#3a3">[RSS Panel]</em>';
}
$html .= '</td>'."\n";
$html .= '<td><a href="mailto:'.$thispage->created_by_email .'" title="Email '.$thispage->created_by.'">'. $thispage->created_by_username .'</a></td>'."\n";
$html .= '<td>'.$thispage->date_created."</td>\n";
if ($thispage->template == 'gallery.php') {
$format = 'galleries';
}
$html .= '<td class="action publish"><a href="/treeline/'.$format.'/?action=publish&guid='.$thispage->guid.'" title="Publish this item">Publish this item</a></td>'."\n";
$html .= '<td class="action delete"><a href="/treeline/'.$format.'/?action=reject&guid='.$thispage->guid.'" title="Reject this edit">Reject this edit</a></td>'."\n".'</tr>'."\n";
}
$html .= "</tbody>\n</table>\n";
//$html .= $this->getPagination($page, $action, $cat, $term);
//$html .= $this->drawPagination('/treeline/'.$format.'/?action=publish', $this->getTotal(), 10, $page);
$html .= drawPagination($this->getTotal(), 10, $page, '/treeline/'.$format.'/?action=publish');
return $html;
}
else return "<p>There are no $format to display</p>";
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function drawPageList($page=1, $action=false, $cat=false, $term=false, $type=false, $format=0, $guid=''){\n \tglobal $site, $help, $db;\n\t\t//print \"dPL(page-$page, action-$action, cat-$cat, term-$term, type-$type, format-$format, guid-$guid)<br>\\n\";\n\n\t\t$action = $_REQUEST['action'];\n\t\t$this->setPerPage(10);\n\t\t$this->setPage($page);\n\t\t\t\n $orig_format=$format;\n switch($format){\n case '0':\n $format='pages';\n break;\n case '1':\n $format='panels';\n break;\n default:\n $format='';\n break;\n }\n\n\t\tif ($guid) {\n\t\t\t$query = \"SELECT \n\t\t\tguid, title, template_title, template, locked, offline, publishable,\n\t\t\tdate_created, created_by, created_by_email, created_by_username, \n\t\t\tdate_modified, modified_by, date_published, published_by, \n\t\t\tIF(o_date_created>o_date_modified,date_created,IF(o_date_modified>o_date_published,date_modified,date_published)) AS date_updated,\n\t\t\tIF (o_date_created>o_date_modified,created_by,IF(o_date_modified>o_date_published,modified_by,published_by)) AS updated_by,\n\t\t\tIF (o_date_created>o_date_modified,'created',IF(o_date_modified>o_date_published,'modified','published')) AS updated_action\n\t\t\tFROM get_page_properties WHERE guid='$guid' LIMIT 1\";\n\t\t\t//print \"$query<br>\\n\";\n\t\t\t$this->setTotal(1);\t\n\t\t\t$this->setTotalPages(1);\t\n\t\t\t$results = $db->get_results($query);\n\t\t}\n\t\telse $results = $this->getPageList($cat, $term, $type, $orig_format, $site->id);\n\t\t\n\t\tif ($results){\n\n\t\t\t$html = '<table class=\"tl_list\">\n<caption>'. $this->drawTotal($format) .'</caption>\n<thead>\n<tr>\n\t<th scope=\"col\">'.$this->drawLabel(\"tl_recent_th_title\", \"Title\").'</th>\n\t<th scope=\"col\">'.$this->drawLabel(\"tl_recent_th_type\", \"Type\").'</th>\n\t<th scope=\"col\">'.$this->drawLabel(\"tl_recent_th_updated\", \"Last updated\").'</th>\n\t<th scope=\"col\">'.$this->drawLabel(\"tl_recent_th_lastuse\", \"Last used by\").'</th>\n\t<th scope=\"col\">'.$this->drawLabel(\"tl_recent_th_status\", \"Status\").'</th>\n\t<th scope=\"col\">'.$this->drawLabel(\"tl_recent_th_action\", \"Manage this page\").'</th>\n</tr>\n</thead>\n<tbody>\n';\n\t\t\tforeach($results as $thispage){\n\n\t\t\t\t/*\n\t\t\t\tswitch($thispage->template){\n\t\t\t\t\tcase 7:\n\t\t\t\t\t\t$html .= ' <span style=\"color:#3a3\">[RSS Panel]</span>';\n\t\t\t\t\t\t$thisaction = ($action=='edit') ? 'editrss' : $action;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 17:\n\t\t\t\t\t\t$html .= ' <span style=\"color:#3a3\">[Poll Panel]</span>';\n\t\t\t\t\t\t$thisaction = ($action=='edit') ? 'editpoll' : $action;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 18:\n\t\t\t\t\t\t$html .= ' <span style=\"color:#3a3\">[Gallery]</span>';\n\t\t\t\t\t\t$thisaction = ($action=='edit') ? 'edit' : $action;\n\t\t\t\t\t\tbreak;\t\t\t\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$thisaction=$action;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t*/\n\n\t\t\t\t// Create extra info for popup. \n\t\t\t\t// NOTE : Dont use <br /> in popup html\n\t\t\t\t$xtrainfo=$xtradate='';\n\t\t\t\tswitch ($thispage->updated_action) {\n\t\t\t\t\tcase \"published\" : \n\t\t\t\t\t\t$xtrainfo=$thispage->modified_by?\"<br>\".$this->drawLabel(\"tl_recent_editby\", 'Lasted edited by').\" \".$thispage->modified_by:\"\";\n\t\t\t\t\t\t$xtradate=$thispage->date_modified?\"<br>\".$this->drawLabel(\"tl_recent_editdate\", \"Last edited on\").\" \".$this->languageDate($thispage->date_modified):\"\";\n\t\t\t\t\tcase \"modified\" :\n\t\t\t\t\t\t$xtrainfo=$thispage->created_by?$this->drawLabel(\"tl_recent_createby\", \"Created by\").\" \".$thispage->created_by.$xtrainfo:\"\";\n\t\t\t\t\t\t$xtradate=$thispage->date_created?$this->drawLabel(\"tl_recent_createdate\", \"Page created\"). \" \".$this->languageDate($thispage->date_created).$xtradate:\"\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"created\": \n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t// Work out this resources status...\n\t\t\t\tif (!$thispage->modified_by) $status=\"New\";\n\t\t\t\telse if ($thispage->publishable) $status=\"Unpublished\";\n\t\t\t\telse if ($thispage->published_by) $status = \"Live\";\n\t\t\t\tif ($thispage->offline ) $status = \"Offline\";\n\t\t\t\telse if ($thispage->locked) $status = \"Being edited\";\n\n\t\t\t\t// Have to truncate long titles as mess up my layout.\n\t\t\t\t$pagetitle=(strlen($thispage->title)>25)?substr($thispage->title,0,22).\"...\":$thispage->title;\n\n\t\t\t\t// Normally just show the template title\n\t\t\t\t$templatetitle = $thispage->template_title;\n\t\t\t\t$templatetitle = $this->drawLabel(\"tl_p_\".str_replace(\" \", \"-\", $templatetitle), $templatetitle);\n\t\t\t\t// Its a bit kak but for events allow event management from clicking the template\n\t\t\t\tif ($thispage->template==19) {\n\t\t\t\t\t$templatetitle = '<a '.$help->drawInfoPopup($this->drawLabel(\"tl_event_popup_man\", \"Click to manage this event\")).' href=\"/treeline/events/?guid='.$thispage->guid.'\">'.$templatetitle.'</a>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$html .= '<tr>\n<td '.$help->drawInfoPopup($this->drawLinkByGUID($thispage->guid)).'><strong>'.$pagetitle .'</strong>\n<td>'.$templatetitle.'</td>\n<td '.$help->drawInfoPopup($xtradate).' nowrap>'.$this->languageDate($thispage->date_updated).'</td>\n<td '.$help->drawInfoPopup($xtrainfo).'>'.$thispage->updated_by.'</a></td>\n<td>'.$this->drawLabel(\"tl_p_status_\".$status, $status).'</td>\n<td class=\"action\">\n'.$this->drawEditCheckboxes($thispage->guid, substr($format,0,-1), $thispage->template_title, $thispage->template, $thispage->publishable, $thispage->locked, $thispage->offline).'\n</td>\n';\n\t\t\t\t/*\n\t\t\t\tif($action == 'edit' && !in_array($thispage->template, array(7,17)) ){ // RRS Panels' content isn't editable so don't show that link\n\t\t\t\t\t$html .= '<td class=\"action edit\"><a href=\"'.$this->drawLinkByGUID($thispage->guid).'?mode=edit&referer=/treeline/'.$format.'/&guid='.$thispage->guid.'\" title=\"Edit '.$format.' content\">Edit '.$format.' content</a></td>'.\"\\n\";\n\t\t\t\t} else if( in_array($thispage->template, array(7,17)) && $action != 'delete'){\n\t\t\t\t\t$html .= '<td><abbr title=\"Not applicable\">N/A</abbr></td>'.\"\\n\";\n\t\t\t\t}\n\t\t\t\t$html .= '<td class=\"action '.$action.'\"><a href=\"/treeline/'. $format .'/?action='. $thisaction .'&guid='.$thispage->guid.'\" title=\"'. $action .' this '.$format.'\">'. $action .' this '.$format.'</a></td>'.\"\\n\".'</tr>'.\"\\n\";\n\t\t\t\t*/\n\t\t\t}\n\t\t\t$html .= \"</tbody>\\n</table>\\n\";\n\t\t\t//$html .= $this->getPagination($page,$action,$cat,$term);\n\t\t\t//$html .= $this->drawPagination('/treeline/'.$format.'/?action='.$action, $this->getTotal(), 10, $page, $cat, $term);\n\t\t\t//$html .= drawPagination($this->getTotal(), 10, $page, '/treeline/'.$format.'/?action='.$action.'&category='.$cat.'&keywords='.$term);\n\t\t\t$html .= drawPagination($this->getTotal(), 10, $page, '/treeline/'.$format.'/?action=edit&category='.$cat.'&keywords='.$term);\n\t\t\t\n\t\t\treturn $html;\n\t\t}\n\t\telse {\n\t\t\tif($term){\n\t\t\t\treturn '<p>There are no '. $format .' whose <strong>'.$cat.'</strong> matches \\'<strong>'.$term.'</strong>\\'</p>';\n\t\t\t}else{\n\t\t\t\treturn '<p>There are no '. $format .' to display</p>';\n\t\t\t}\n\t\t}\n\t}",
"private function pageList() {\n //get pager range\n $this->getPagerRange();\n\n //loop specified ranged pager list\n\t\t//there is no link for current page number\n for ($i = $this->minPager; $i <= $this->maxPager; $i++) {\n if ($i == $this->currentPage) {\n print '<li class=\"current-page\">' . $i . '</li>';\n } else {\n print '<li><a href=\"' . $this->url . '&page=' . $i . '\">' . $i . '</a></li>';\n }\n }\n }",
"public function getPagesLinks()\r\n\t{\r\n\t\t$app = JFactory::getApplication();\r\n\t\t// Yjsg instance\r\n\t\t$yjsg = Yjsg::getInstance(); \r\n\t\t\r\n\t\t// Build the page navigation list.\r\n\t\t$data = $this->_buildDataObject();\r\n\r\n\t\t$list = array();\r\n\t\t$list['prefix'] = $this->prefix;\r\n\r\n\t\t$itemOverride = false;\r\n\t\t$listOverride = false;\r\n\r\n\t\t$chromePath \t= JPATH_THEMES . '/' . $app->getTemplate() . '/html/pagination.php';\r\n\t\t//yjsg start\r\n\t\tif (!file_exists($chromePath)){\r\n\t\t\tif($yjsg->preplugin()){\r\n\t\t\t\r\n\t\t\t\t$chromePath = YJSGPATH . 'legacy' . YJDS . 'html' . YJDS . 'pagination.php';\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\t\r\n\t\t\t\t$chromePath = YJSGPATH . 'includes' . YJDS . 'html' . YJDS . 'pagination.php';\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t//yjsg end\r\n\t\tif (file_exists($chromePath))\r\n\t\t{\r\n\t\t\tinclude_once $chromePath;\r\n\t\t\tif (function_exists('pagination_item_active') && function_exists('pagination_item_inactive'))\r\n\t\t\t{\r\n\t\t\t\t$itemOverride = true;\r\n\t\t\t}\r\n\t\t\tif (function_exists('pagination_list_render'))\r\n\t\t\t{\r\n\t\t\t\t$listOverride = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Build the select list\r\n\t\tif ($data->all->base !== null)\r\n\t\t{\r\n\t\t\t$list['all']['active'] = true;\r\n\t\t\t$list['all']['data'] = ($itemOverride) ? pagination_item_active($data->all) : $this->_item_active($data->all);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$list['all']['active'] = false;\r\n\t\t\t$list['all']['data'] = ($itemOverride) ? pagination_item_inactive($data->all) : $this->_item_inactive($data->all);\r\n\t\t}\r\n\r\n\t\tif ($data->start->base !== null)\r\n\t\t{\r\n\t\t\t$list['start']['active'] = true;\r\n\t\t\t$list['start']['data'] = ($itemOverride) ? pagination_item_active($data->start) : $this->_item_active($data->start);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$list['start']['active'] = false;\r\n\t\t\t$list['start']['data'] = ($itemOverride) ? pagination_item_inactive($data->start) : $this->_item_inactive($data->start);\r\n\t\t}\r\n\t\tif ($data->previous->base !== null)\r\n\t\t{\r\n\t\t\t$list['previous']['active'] = true;\r\n\t\t\t$list['previous']['data'] = ($itemOverride) ? pagination_item_active($data->previous) : $this->_item_active($data->previous);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$list['previous']['active'] = false;\r\n\t\t\t$list['previous']['data'] = ($itemOverride) ? pagination_item_inactive($data->previous) : $this->_item_inactive($data->previous);\r\n\t\t}\r\n\r\n\t\t$list['pages'] = array(); //make sure it exists\r\n\t\tforeach ($data->pages as $i => $page)\r\n\t\t{\r\n\t\t\tif ($page->base !== null)\r\n\t\t\t{\r\n\t\t\t\t$list['pages'][$i]['active'] = true;\r\n\t\t\t\t$list['pages'][$i]['data'] = ($itemOverride) ? pagination_item_active($page) : $this->_item_active($page);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$list['pages'][$i]['active'] = false;\r\n\t\t\t\t$list['pages'][$i]['data'] = ($itemOverride) ? pagination_item_inactive($page) : $this->_item_inactive($page);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ($data->next->base !== null)\r\n\t\t{\r\n\t\t\t$list['next']['active'] = true;\r\n\t\t\t$list['next']['data'] = ($itemOverride) ? pagination_item_active($data->next) : $this->_item_active($data->next);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$list['next']['active'] = false;\r\n\t\t\t$list['next']['data'] = ($itemOverride) ? pagination_item_inactive($data->next) : $this->_item_inactive($data->next);\r\n\t\t}\r\n\r\n\t\tif ($data->end->base !== null)\r\n\t\t{\r\n\t\t\t$list['end']['active'] = true;\r\n\t\t\t$list['end']['data'] = ($itemOverride) ? pagination_item_active($data->end) : $this->_item_active($data->end);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$list['end']['active'] = false;\r\n\t\t\t$list['end']['data'] = ($itemOverride) ? pagination_item_inactive($data->end) : $this->_item_inactive($data->end);\r\n\t\t}\r\n\r\n\t\tif ($this->total > $this->limit)\r\n\t\t{\r\n\t\t\treturn ($listOverride) ? pagination_list_render($list) : $this->_list_render($list);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn '';\r\n\t\t}\r\n\t}",
"function getPagesLinks()\n\t{\n\t\tglobal $mainframe;\n\n\t\t$lang =& JFactory::getLanguage();\n\n\t\t// Build the page navigation list\n\t\t$data = $this->_buildDataObject();\n\n\t\t$list = array();\n\n\t\t$itemOverride = false;\n\t\t$listOverride = false;\n\n\t\t$chromePath = JPATH_THEMES.DS.$mainframe->getTemplate().DS.'html'.DS.'pagination.php';\n\t\tif (file_exists($chromePath))\n\t\t{\n\t\t\trequire_once ($chromePath);\n\t\t\tif (function_exists('pagination_item_active') && function_exists('pagination_item_inactive')) {\n\t\t\t\t$itemOverride = true;\n\t\t\t}\n\t\t\tif (function_exists('pagination_list_render')) {\n\t\t\t\t$listOverride = true;\n\t\t\t}\n\t\t}\n\n\t\t// Build the select list\n\t\tif ($data->all->base !== null) {\n\t\t\t$list['all']['active'] = true;\n\t\t\t$list['all']['data'] = ($itemOverride) ? pagination_item_active($data->all) : $this->_item_active($data->all);\n\t\t} else {\n\t\t\t$list['all']['active'] = false;\n\t\t\t$list['all']['data'] = ($itemOverride) ? pagination_item_inactive($data->all) : $this->_item_inactive($data->all);\n\t\t}\n\n\t\tif ($data->start->base !== null) {\n\t\t\t$list['start']['active'] = true;\n\t\t\t$list['start']['data'] = ($itemOverride) ? pagination_item_active($data->start) : $this->_item_active($data->start);\n\t\t} else {\n\t\t\t$list['start']['active'] = false;\n\t\t\t$list['start']['data'] = ($itemOverride) ? pagination_item_inactive($data->start) : $this->_item_inactive($data->start);\n\t\t}\n\t\tif ($data->previous->base !== null) {\n\t\t\t$list['previous']['active'] = true;\n\t\t\t$list['previous']['data'] = ($itemOverride) ? pagination_item_active($data->previous) : $this->_item_active($data->previous);\n\t\t} else {\n\t\t\t$list['previous']['active'] = false;\n\t\t\t$list['previous']['data'] = ($itemOverride) ? pagination_item_inactive($data->previous) : $this->_item_inactive($data->previous);\n\t\t}\n\n\t\t$list['pages'] = array(); //make sure it exists\n\t\tforeach ($data->pages as $i => $page)\n\t\t{\n\t\t\tif ($page->base !== null) {\n\t\t\t\t$list['pages'][$i]['active'] = true;\n\t\t\t\t$list['pages'][$i]['data'] = ($itemOverride) ? pagination_item_active($page) : $this->_item_active($page);\n\t\t\t} else {\n\t\t\t\t$list['pages'][$i]['active'] = false;\n\t\t\t\t$list['pages'][$i]['data'] = ($itemOverride) ? pagination_item_inactive($page) : $this->_item_inactive($page);\n\t\t\t}\n\t\t}\n\n\t\tif ($data->next->base !== null) {\n\t\t\t$list['next']['active'] = true;\n\t\t\t$list['next']['data'] = ($itemOverride) ? pagination_item_active($data->next) : $this->_item_active($data->next);\n\t\t} else {\n\t\t\t$list['next']['active'] = false;\n\t\t\t$list['next']['data'] = ($itemOverride) ? pagination_item_inactive($data->next) : $this->_item_inactive($data->next);\n\t\t}\n\t\tif ($data->end->base !== null) {\n\t\t\t$list['end']['active'] = true;\n\t\t\t$list['end']['data'] = ($itemOverride) ? pagination_item_active($data->end) : $this->_item_active($data->end);\n\t\t} else {\n\t\t\t$list['end']['active'] = false;\n\t\t\t$list['end']['data'] = ($itemOverride) ? pagination_item_inactive($data->end) : $this->_item_inactive($data->end);\n\t\t}\n\n\t\tif($this->total > $this->limit){\n\t\t\treturn ($listOverride) ? pagination_list_render($list) : $this->_list_render($list);\n\t\t}\n\t\telse{\n\t\t\treturn '';\n\t\t}\n\t}",
"private function pagedata_preprocessor()\r\n {/*{{{*/\r\n $items_st = $this->items_ordered_struct;\r\n // the number of items per page\r\n $this->pagedata['limit'] = isset(self::$preferences->item->itemsperpage) \r\n ? self::$preferences->item->itemsperpage : 10;\r\n if(self::$is_admin_panel)\r\n $this->pagedata['limit'] = isset(self::$preferences->item->bitemsperpage) \r\n ? self::$preferences->item->bitemsperpage : 10;\r\n $this->pagedata['viewpage'] = isset(self::$preferences->item->page) \r\n ? self::$preferences->item->page : '';\r\n // How many adjacent pages should be shown on each side\r\n $this->pagedata['adjacents'] = 3;\r\n // last page\r\n $this->pagedata['lastpage'] = (int)(ceil(count($items_st) / $this->pagedata['limit']));\r\n // handle get\r\n if(isset(self::$input['page']) && self::$input['page'] <= 0)\r\n self::$input['page'] = 1;\r\n elseif(isset(self::$input['page']) && self::$input['page'] > $this->pagedata['lastpage'])\r\n self::$input['page'] = $this->pagedata['lastpage'];\r\n\t $this->pagedata['page'] = !empty(self::$input['page']) ? (int)self::$input['page'] : 1;\r\n // first page to display\r\n $this->pagedata['start'] = !empty($this->pagedata['page']) \r\n ? (($this->pagedata['page'] - 1) * $this->pagedata['limit']) : 0;\r\n // next page\r\n $this->pagedata['next'] = $this->pagedata['page'] + 1;\r\n\r\n // just for counting of rows\r\n $act_row = $this->pagedata['start'];\r\n $index = $this->pagedata['start'] + $this->pagedata['limit'];\r\n\r\n // active item keys\r\n\t\t$this->pagedata['itemkeys'] = array();\r\n while(isset($items_st[$act_row]) && $act_row < $index)\r\n {\r\n $this->pagedata['itemkeys'][] = $act_row;\r\n $act_row++;\r\n }\r\n\r\n // initialize jquery id\r\n $this->pagedata['jid'] = '';\r\n if(isset(self::$input['delete']))\r\n $this->pagedata['jid'] = safe_slash_html_input(self::$input['delete']);\r\n elseif(isset(self::$input['promo']))\r\n $this->pagedata['jid'] = safe_slash_html_input(self::$input['promo']);\r\n elseif(isset(self::$input['visible']))\r\n $this->pagedata['jid'] = safe_slash_html_input(self::$input['visible']);\r\n \r\n // Setup page vars to display.\r\n\t $this->pagedata['prev'] = $this->pagedata['page'] - 1;\r\n\t //$this->pagedata['next'] = $this->pagedata['page'] + 1;\r\n $this->pagedata['lpm1'] = $this->pagedata['lastpage'] - 1;\r\n\r\n // try to fix our url inside admin, remove redundant 'page' param\r\n // todo: search engine friendly URL \r\n $this->pagedata['pageurl'] = self::$properties['paths']['siteurl'].return_page_slug().'/?page=';\r\n if(self::$is_admin_panel)\r\n if(strpos(curPageURL(),'&page=')!==false)\r\n $this->pagedata['pageurl'] = reparse_url(parse_url(curPageURL()));\r\n else\r\n $this->pagedata['pageurl'] = curPageURL().'&cat='.ImCategory::$current_category.'&page=';\r\n\r\n }",
"function cpl_print_button_pages($numArticle, $buttonSelected){\r\n if($numArticle != 0) {\r\n echo '<section>',\r\n '<p>Pages : </p>';\r\n for ($i=0; $i < $numArticle/4; $i++) {\r\n if($i+1 == $buttonSelected) {\r\n echo '<a id=\"linkDown\">',$i+1,'</a>';\r\n } else {\r\n echo '<a href=\"actus.php?buttonPage=',cp_encrypt_url([$i+1]),'\">',$i+1,'</a>';\r\n }\r\n }\r\n echo '</section>';\r\n }\r\n }",
"function show_pages($amount, $rowamount, $id = '') {\n if ($amount > $rowamount) {\n $num = 8;\n $poutput = '';\n $lastpage = ceil($amount / $rowamount);\n $startpage = 1;\n\n if (!isset($_GET[\"start\"]))\n $_GET[\"start\"] = 1;\n $start = $_GET[\"start\"];\n\n if ($lastpage > $num & $start > ($num / 2)) {\n $startpage = ($start - ($num / 2));\n }\n\n echo _('Show page') . \":<br>\";\n\n if ($lastpage > $num & $start > 1) {\n $poutput .= '<a href=\" ' . htmlentities($_SERVER[\"PHP_SELF\"], ENT_QUOTES);\n $poutput .= '?start=' . ($start - 1);\n if ($id != '')\n $poutput .= '&id=' . $id;\n $poutput .= '\">';\n $poutput .= '[ < ]';\n $poutput .= '</a>';\n }\n if ($start != 1) {\n $poutput .= '<a href=\" ' . htmlentities($_SERVER[\"PHP_SELF\"], ENT_QUOTES);\n $poutput .= '?start=1';\n if ($id != '')\n $poutput .= '&id=' . $id;\n $poutput .= '\">';\n $poutput .= '[ 1 ]';\n $poutput .= '</a>';\n if ($startpage > 2)\n $poutput .= ' .. ';\n }\n\n for ($i = $startpage; $i <= min(($startpage + $num), $lastpage); $i++) {\n if ($start == $i) {\n $poutput .= '[ <b>' . $i . '</b> ]';\n } elseif ($i != $lastpage & $i != 1) {\n $poutput .= '<a href=\" ' . htmlentities($_SERVER[\"PHP_SELF\"], ENT_QUOTES);\n $poutput .= '?start=' . $i;\n if ($id != '')\n $poutput .= '&id=' . $id;\n $poutput .= '\">';\n $poutput .= '[ ' . $i . ' ]';\n $poutput .= '</a>';\n }\n }\n\n if ($start != $lastpage) {\n if (min(($startpage + $num), $lastpage) < ($lastpage - 1))\n $poutput .= ' .. ';\n $poutput .= '<a href=\" ' . htmlentities($_SERVER[\"PHP_SELF\"], ENT_QUOTES);\n $poutput .= '?start=' . $lastpage;\n if ($id != '')\n $poutput .= '&id=' . $id;\n $poutput .= '\">';\n $poutput .= '[ ' . $lastpage . ' ]';\n $poutput .= '</a>';\n }\n\n if ($lastpage > $num & $start < $lastpage) {\n $poutput .= '<a href=\" ' . htmlentities($_SERVER[\"PHP_SELF\"], ENT_QUOTES);\n $poutput .= '?start=' . ($start + 1);\n if ($id != '')\n $poutput .= '&id=' . $id;\n $poutput .= '\">';\n $poutput .= '[ > ]';\n $poutput .= '</a>';\n }\n\n echo $poutput;\n }\n}",
"function pagination(){}",
"function Paging(){\n\tif(isset($_GET['page']))\t$page=$_GET['page'];\n\telse $page=5;\n\n\t$onePage=2;\n\t$allPage=ceil($num_row/$onePage);\n\n\tif($page < 1 && $page > $allPage)\texit;\n\n\t$oneSection=2;\n\t$currentSection=ceil($page/$oneSection);\n\t$allSection=ceil($allPage/$oneSection);\n\n\t$firstPage=($currentSection * $oneSection) - ($oneSection - 1);\n\n\tif($currentSection == $allSection)\t$lastPage=$allPage;\n\telse \t$lastPage=$currentSection * $oneSection;\n\n\t$prevPage=(($currentSection-1) * $oneSection);\n\t$nextPage=(($currentSection+1) * $oneSection)-($oneSection-1);\n\n\t$paging='<ul>';\n\n\tif($page != 1)\t\t\t\t\t\t$paging .='<li><a href=\"./Board_list.php?page=1\">First</a></li>';\n\tif($currentSection != 1)\t\t\t\t$paging .='<li><a href=\"./Board_list.php?page='.$prevPage.'\">Prev</a></li>';\n\n\tfor($i=$firstPage;$i<=$lastPage;$i++){\n\t\tif($i==$page)\t\t\t\t\t$paging.='<li>'.$i.'</li>';\n\t\telse \t\t\t\t\t\t\t$paging.='<li><a href=\"./Board_list.php?page='.$i.'\">'.$i.'</a></li>';\n\t}\n\n\tif($currentSection != $allSection)\t$paging.='<li><a href=\"./Board_list.php?page='.$nextPage.'\">Next</a></li>';\n\tif($page!=$allPage)\t\t\t\t\t$paging.='<li><a href=\"./Board_list.php?page='.$allPage.'\">End</a></li>';\n\t\n\t$paging.='</ul>';\n\n\t$currentLimit=($onePage * $page)-$onePage;\n\t$sqlLimit='limit '.$currentLimit.','.$onePage;\n\t\n\t$sql=\"select * from board \".$sqlLimit;\n\t$result=$con->query($sql);\n\techo $sql;\n}",
"function horizon_theme_paging_nav() {\n\t\t$mid = 2; // Total of items that will show along with the current page.\n\t\t$end = 1; // Total of items displayed for the last few pages.\n\t\t$show = false; // Show all items.\n\n\t\techo horizon_theme_pagination( $mid, $end, false );\n\t}",
"public function list_pages() {\n\t\t$this->print_prev();\n\n\t\tif ($this->current_page+2 >= $this->total_pages-1) {\n\t\t\t$this->pages_right();\n\t\t} else {\n\t\t\t$this->pages_left();\n\t\t}\n\n\t\t$this->print_next();\n\t}",
"function _cmd_list(SGL_Registry $input, SGL_Output $output)\n {\n SGL::logMessage(null, PEAR_LOG_DEBUG);\n $output->template = 'pageList.html';\n $output->mode = 'Browse';\n\n // get all sections\n $aSections = $this->da->getSectionTree();\n $output->results = $aSections;\n\n $output->pageArrayJS = $this->_createNodesArrayJS($aSections);\n $output->addOnLoadEvent(\"switchRowColorOnHover()\");\n }",
"function getPaging() {\n\t\t//if the total number of rows great than page size\n\t\tif($this->totalRows > $this->pageSize) {\n\t\t\tprint '<div class=\"paging\">';\n\t\t\tprint '<ul>';\n\t\t\tprint $this->first() . $this->prev() . $this->pageList() . $this->next() . $this->end();\n\t\t\tprint '</ul>';\n\t\t\tprint '</div>';\n\t\t}\n }",
"function pagination($title, $start, $start_name, $max, $max_name, $max_rows, $keep_post = false, $max_page_links = 5, $_selectors = null, $hash = '')\n{\n inform_non_canonical_parameter($max_name);\n inform_non_canonical_parameter($start_name);\n\n if (get_page_name() == 'members') {\n // Don't allow guest bots to probe too deep into the forum index, it gets very slow; the XML Sitemap is for guiding to topics like this\n if (($start > $max * 5) && (is_guest()) && (!is_null(get_bot_type()))) {\n access_denied('NOT_AS_GUEST');\n }\n }\n\n $post_array = array();\n if ($keep_post) {\n foreach ($_POST as $key => $val) {\n if (is_array($val)) {\n continue;\n }\n if (get_magic_quotes_gpc()) {\n $val = stripslashes($val);\n }\n $post_array[$key] = $val;\n }\n }\n\n $get_url = get_self_url(true);\n\n // How many to show per page\n if (is_null($_selectors)) {\n $_selectors = array(10, 25, 50, 80);\n }\n if (has_privilege(get_member(), 'remove_page_split')) {\n if (get_param_integer('keep_avoid_memory_limit', 0) == 1) {\n $_selectors[] = $max_rows;\n }\n }\n $_selectors[] = $max;\n sort($_selectors);\n $_selectors = array_unique($_selectors);\n $selectors = new Tempcode();\n foreach ($_selectors as $selector_value) {\n if ($selector_value > $max_rows) {\n $selector_value = $max_rows;\n }\n $selected = ($max == $selector_value);\n $selectors->attach(do_template('PAGINATION_PER_PAGE_OPTION', array('_GUID' => '1a0583bab42257c60289459ce1ac1e05', 'SELECTED' => $selected, 'VALUE' => strval($selector_value), 'NAME' => integer_format($selector_value))));\n\n if ($selector_value == $max_rows) {\n break;\n }\n }\n $hidden = build_keep_form_fields('_SELF', true, array($max_name, $start_name));\n $per_page = do_template('PAGINATION_PER_PAGE', array('_GUID' => '1993243727e58347d1544279c5eba496', 'HASH' => ($hash == '') ? null : $hash, 'HIDDEN' => $hidden, 'URL' => $get_url, 'MAX_NAME' => $max_name, 'SELECTORS' => $selectors));\n $GLOBALS['INCREMENTAL_ID_GENERATOR']++;\n\n if ($max < $max_rows) { // If they don't all fit on one page\n $parts = new Tempcode();\n $num_pages = ($max == 0) ? 1 : intval(ceil(floatval($max_rows) / floatval($max)));\n\n // Link to first\n if ($start > 0) {\n $url_array = array('page' => '_SELF', $start_name => running_script('index') ? null : 0);\n $cat_url = _build_pagination_cat_url($url_array, $post_array, $hash);\n $first = do_template('PAGINATION_CONTINUE_FIRST', array('_GUID' => 'f5e510da318af9b37c3a4b23face5ae3', 'TITLE' => $title, 'P' => strval(1), 'FIRST_URL' => $cat_url));\n } else {\n $first = new Tempcode();\n }\n\n // Link to previous\n if ($start > 0) {\n $url_array = array('page' => '_SELF', $start_name => strval(max($start - $max, 0)));\n $cat_url = _build_pagination_cat_url($url_array, $post_array, $hash);\n $previous = do_template('PAGINATION_PREVIOUS_LINK', array('_GUID' => 'ec4d4da9677b5b9c8cea08676337c6eb', 'TITLE' => $title, 'P' => integer_format(intval($start / $max)), 'URL' => $cat_url));\n } else {\n $previous = do_template('PAGINATION_PREVIOUS');\n }\n\n // CALCULATIONS FOR CROPPING OF SEQUENCE\n // $from is the index number (one less than written page number) we start showing page-links from\n // $to is the index number (one less than written page number) we stop showing page-links from\n if ($max != 0) {\n $max_dispersal = $max_page_links / 2;\n $from = max(0, intval(floatval($start) / floatval($max) - $max_dispersal));\n $to = intval(ceil(min(floatval($max_rows) / floatval($max), floatval($start) / floatval($max) + $max_dispersal)));\n $dif = (floatval($start) / floatval($max) - $max_dispersal);\n if ($dif < 0.0) { // We have more forward range than max dispersal as we're near the start\n $to = intval(ceil(min(floatval($max_rows) / floatval($max), floatval($start) / floatval($max) + $max_dispersal - $dif)));\n }\n } else {\n $from = 0;\n $to = 0;\n }\n\n // Indicate that the sequence is incomplete with an ellipsis\n if ($from > 0) {\n $continues_left = do_template('PAGINATION_CONTINUE');\n } else {\n $continues_left = new Tempcode();\n }\n\n $bot = (is_guest()) && (!is_null(get_bot_type()));\n\n // Show the page number jump links\n for ($x = $from; $x < $to; $x++) {\n $url_array = array('page' => '_SELF', $start_name => ($x == 0) ? null : strval($x * $max));\n $cat_url = _build_pagination_cat_url($url_array, $post_array, $hash);\n if ($x * $max == $start) {\n $parts->attach(do_template('PAGINATION_PAGE_NUMBER', array('_GUID' => '13cdaf548d5486fb8d8ae0d23b6a08ec', 'P' => strval($x + 1))));\n } else {\n $rel = null;\n if ($x == 0) {\n $rel = 'first';\n }\n $parts->attach(do_template('PAGINATION_PAGE_NUMBER_LINK', array('_GUID' => 'a6d1a0ba93e3b7deb6fe6f8f1c117c0f', 'NOFOLLOW' => ($x * $max > $max * 5) && ($bot), 'REL' => $rel, 'TITLE' => $title, 'URL' => $cat_url, 'P' => strval($x + 1))));\n }\n }\n\n // Indicate that the sequence is incomplete with an ellipsis\n if ($to < $num_pages) {\n $continues_right = do_template('PAGINATION_CONTINUE');\n } else {\n $continues_right = new Tempcode();\n }\n\n // Link to next\n if (($start + $max) < $max_rows) {\n $url_array = array('page' => '_SELF', $start_name => strval($start + $max));\n $cat_url = _build_pagination_cat_url($url_array, $post_array, $hash);\n $p = ($max == 0) ? 1.0 : ($start / $max + 2);\n $rel = null;\n if (($start + $max * 2) > $max_rows) {\n $rel = 'last';\n }\n $next = do_template('PAGINATION_NEXT_LINK', array('_GUID' => '6da9b396bdd46b7ee18c05b5a7eb4d10', 'NOFOLLOW' => ($start + $max > $max * 5) && ($bot), 'REL' => $rel, 'TITLE' => $title, 'NUM_PAGES' => integer_format($num_pages), 'P' => integer_format(intval($p)), 'URL' => $cat_url));\n } else {\n $next = do_template('PAGINATION_NEXT');\n }\n\n // Link to last\n if ($start + $max < $max_rows) {\n $url_array = array('page' => '_SELF', ($num_pages - 1 == 0) ? null : $start_name => strval(($num_pages - 1) * $max));\n $cat_url = _build_pagination_cat_url($url_array, $post_array, $hash);\n $last = do_template('PAGINATION_CONTINUE_LAST', array('_GUID' => '2934936df4ba90989e949a8ebe905522', 'TITLE' => $title, 'P' => strval($num_pages), 'LAST_URL' => $cat_url));\n } else {\n $last = new Tempcode();\n }\n\n // Page jump dropdown, if we had to crop\n if ($num_pages > $max_page_links) {\n $list = new Tempcode();\n $pg_start = 0;\n $pg_to = $num_pages;\n $pg_at = intval(floatval($start) / floatval($max));\n if ($pg_to > 100) {\n $pg_start = max($pg_at - 50, 0);\n $pg_to = $pg_start + 100;\n }\n if ($pg_start != 0) {\n $list->attach(form_input_list_entry('', false, '...', false, true));\n }\n for ($i = $pg_start; $i < $pg_to; $i++) {\n $list->attach(form_input_list_entry(strval($i * $max), ($i * $max == $start), strval($i + 1)));\n }\n if ($pg_to != $num_pages) {\n $list->attach(form_input_list_entry('', false, '...', false, true));\n }\n $dont_auto_keep = array();\n $hidden = build_keep_form_fields('_SELF', true, $dont_auto_keep);\n $pages_list = do_template('PAGINATION_LIST_PAGES', array('_GUID' => '9e1b394763619433f23b8ed95f5ac134', 'URL' => $get_url, 'HIDDEN' => $hidden, 'START_NAME' => $start_name, 'LIST' => $list));\n } else {\n $pages_list = new Tempcode();\n }\n\n // Put it all together\n return do_template('PAGINATION_WRAP', array(\n '_GUID' => '2c3fc957d4d8ab9103ef26458e18aed1',\n 'TEXT_ID' => $title,\n 'PER_PAGE' => $per_page,\n 'FIRST' => $first,\n 'PREVIOUS' => $previous,\n 'CONTINUES_LEFT' => $continues_left,\n 'PARTS' => $parts,\n 'CONTINUES_RIGHT' => $continues_right,\n 'NEXT' => $next,\n 'LAST' => $last,\n 'PAGES_LIST' => $pages_list,\n\n 'START' => strval($start),\n 'MAX' => strval($max),\n 'MAX_ROWS' => strval($max_rows),\n 'NUM_PAGES' => strval($num_pages),\n ));\n }\n\n if (get_value('pagination_when_not_needed') === '1') {\n return do_template('PAGINATION_WRAP', array('_GUID' => '451167645e67c7beabcafe11c78680db', 'TEXT_ID' => $title,\n 'PER_PAGE' => $per_page,\n 'FIRST' => '',\n 'PREVIOUS' => '',\n 'CONTINUES_LEFT' => '',\n 'PARTS' => '',\n 'CONTINUES_RIGHT' => '',\n 'NEXT' => '',\n 'LAST' => '',\n 'PAGES_LIST' => '',\n\n 'START' => strval($start),\n 'MAX' => strval($max),\n 'MAX_ROWS' => strval($max_rows),\n 'NUM_PAGES' => strval(1),\n ));\n }\n\n return new Tempcode();\n}",
"function wp_widget_multi_pages($args, $number = 1)\n {\n extract($args);\n $options = get_option('widget_multi_pages');\n \n \n $sortby = empty($options[$number]['sortby']) ? 'menu_order' : $options[$number]['sortby'];\n $exclude = empty($options[$number]['exclude']) ? '' : '&exclude=' . $options[$number]['exclude'];\n $headpage = empty($options[$number]['headpage']) ? '' : '&child_of=' . $options[$number]['headpage'];\n $posts = empty($options[$number]['posts']) ? '' : $options[$number]['posts'];\n \n if ($sortby == 'menu_order') {\n $sortby = 'menu_order, post_title';\n }\n $title = $options[$number]['title'];\n \n if ($posts != '') {\n $out = '';\n echo $before_widget . $before_title . $title . $after_title . \"<ul>\";\n global $post;\n $myposts = get_posts('include=' . $posts);\n foreach ($myposts as $post) {\n setup_postdata($post);\n echo '<li><a href=\"';\n the_permalink();\n echo '\">';\n the_title();\n echo '</a></li>';\n }\n echo \"</ul>\" . $after_widget;\n } else {\n $out = wp_list_pages('title_li=&echo=0&sort_column=' . $sortby . $exclude . $headpage);\n \n if (!empty($title) && !empty($out)) {\n $out = $before_widget . $before_title . $title . $after_title . \"<ul>\" . $out . \"</ul>\" . $after_widget;\n }\n \n \n if (!empty($out)) {\n?>\n <?php\n echo $out;\n?>\n <?php\n }\n }\n }",
"function getlist($pagecount,$page)\n{\n\t$echo = \"<select size=1 class='page_select' name=page onchange=javascript:location.href='\".getparam(\"page\",\"\").\"'+this.options[this.selectedIndex].value>\";\n\tfor($i=1;$i<=$pagecount;$i++)\n\t{\n\t\t$result = $pagecount/15;\n\t\tif($i>=$page-20 && $i<=$page+15){// ||\n\t\t\t$echo .= \"<option value=$i\".($page==$i ? ' selected' : '').\">\".$i.\"</option>\";\n\t\t}elseif($i%$result ==0 || $i==1 || $i==$pagecount){\n\t\t\t$echo .= \"<option value=$i>\".$i.\"</option>\";\n\t\t}\n\t}\n\t$echo.= \"</select>\";\n\treturn $echo;\n}",
"public function getPages();",
"public function pagingV1($DivID,$count,$perpage,$start,$link)\n\t{\n\t\t$num = $count;\n\t\t$per_page = $perpage; // Number of items to show per page\n\t\t$showeachside = 4; // Number of items to show either side of selected page\n\t\tif(empty($start)){$start = 0;} // Current start position\n\t\telse{$start = $start;}\n\t\t$max_pages = ceil($num / $per_page); // Number of pages\n\t\t$cur = ceil($start / $per_page)+1; // Current page number\n\t\t\n\t\t// ADDED: 8/21/14 by Robotman321\n\t\t// Used to make the pages \"nicer\"\n\t\tif($max_pages == 1)\n\t\t{\n\t\t\t$front = \"<span style=\\\"padding:1px 3px 1px 3px;margin:1px;border:1px solid gray;background-color:#99e6ff;\\\">$max_pages Page</span> \";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$front = \"<span style=\\\"padding:1px 3px 1px 3px;margin:1px;border:1px solid gray;background-color:#99e6ff;\\\">$max_pages Pages</span> \";\n\t\t}\n\t\t\n\t\tif(($start-$per_page) >= 0)\n\t\t{\n\t\t\t$next = $start-$per_page;\n\t\t\t$startpage = '<a href=\"#\" onClick=\"$(\\'#' . $DivID . '\\').load(\\'' . $link.($next>0?(\"&page=\").$next:\"\") . '\\');return false;\" style=\"padding:1px 3px 1px 3px;margin:1px;border:1px solid gray;background-color:#99e6ff;\"><</a>';\n\t\t}\n\t\telse \n\t\t{\n\t\t\t$startpage = '';\n\t\t}\n\t\tif($start+$per_page<$num){\n\t\t\t$endpage = '<a href=\"#\" onClick=\"$(\\'#' . $DivID . '\\').load(\\'' . $link.'&page='.max(0,$start+1) . '\\');return false;\" style=\"padding:1px 3px 1px 3px;margin:1px;border:1px solid gray;background-color:#99e6ff;\">></a>';\n\t\t}\n\t\telse {\n\t\t\t$endpage = '';\n\t\t}\n\t\t$eitherside = ($showeachside * $per_page);\n\t\tif($start+1 > $eitherside){\n\t\t\t$frontdots = \" ...\";\n\t\t}\n\t\telse {$frontdots = '';}\n\t\t$pg = 1;\n\t\t$middlepage = '';\n\t\tfor($y=0;$y<$num;$y+=$per_page)\n\t\t{\n\t\t\t$style=($y==$start)?\"padding:1px 3px 1px 3px;margin:1px;border:1px solid gray;background-color:#99e6ff;font-weight:bold;\":\"padding:1px 3px 1px 3px;margin:1px;border:1px solid gray;background-color:#99e6ff;\";\n\t\t\tif(($y > ($start - $eitherside)) && ($y < ($start + $eitherside)))\n\t\t\t{\n\t\t\t\t$middlepage .= '<a style=\"'.$style.'\" href=\"#\" onClick=\"$(\\'#' . $DivID . '\\').load(\\'' . $link.($y>0?(\"&page=\").$y:\"\") . '\\');return false;\">'.$pg.'</a> ';\n\t\t\t}\n\t\t\t$pg++;\n\t\t}\n\t\tif(($start+$eitherside)<$num){\n\t\t\t$enddots = \"... \";\n\t\t}\n\t\telse {$enddots = '';}\n\t\t\n\t\techo '<div class=\"fontcolor\">'.$front.$startpage.$frontdots.$middlepage.$enddots.$endpage.'</div>';\n\t}",
"function displayPaging() \r\n {\r\n $self = $_SERVER['PHP_SELF'];\r\n if($this->openPage<=0) {\r\n $next = 2;\r\n }\r\n\r\n else {\r\n $next = $this->openPage+1;\r\n }\r\n $prev = $this->openPage-1;\r\n $last = $this->pages;\r\n\t\t$queryString = '';\r\n\t\t\r\n\t\tif ($_GET['keywords']!= '') {\r\n\t\t\t$queryString .= '&keywords='.$_GET['keywords'];\r\n\t\t}\r\n\t\t\r\n\t\tif ($_GET['sort'] != '') {\r\n\t\t\t$queryString .= '&sort='.$_GET['sort'];\r\n\t\t}\r\n\t\t\r\n\t\tif ($_GET['filters']!='') {\r\n\t\t\t$queryString .= '&filters='.$_GET['filters'];\r\n\t\t}\r\n\t\t\t\t\t\r\n\t\tif ($_GET['cat']!='') {\r\n\t\t\t$queryString .= '&cat='.$_GET['cat'];\r\n\t\t}\r\n\t\t\r\n\t\tif ($_GET['media']!='') {\r\n\t\t\t$queryString .= '&media='.$_GET['media'];\r\n\t\t}\r\n\t\tif ($_GET['content']!='') {\r\n\t\t\t$queryString .= '&content='.$_GET['content'];\r\n\t\t}\r\n\t\tif ($_GET['genre']!='') {\r\n\t\t\t$queryString .= '&genre='.$_GET['genre'];\r\n\t\t}\r\n\r\n if($this->openPage > 1) {\r\n echo \",<a href=\\\"\".$_SERVER['SCRIPT_NAME'].\"?page=1\".$queryString.\"\\\">\";\r\n\t\t\t\t\t\r\n\t\t\t\r\n\t\t\techo \"First</a><span style='color:#e5e5e5; padding-left:2px;padding-right:2px;'>|</span>\";\r\n \techo \",<a href=\\\"\".$_SERVER['SCRIPT_NAME'].\"?page=$prev\".$queryString.\"\\\">\";\r\n\t\t\t\t\t\r\n\t\t\techo \"Prev</a>] \";\r\n }\r\n else {\r\n echo \"[First<span style='color:#e5e5e5; padding-left:2px;padding-right:2px;'>|</span>\";\r\n echo \"Prev] \";\r\n }\r\n for($i=1;$i<=$this->pages;$i++) {\r\n if($i == $this->openPage) \r\n\t\t\t\tif ($i==1)\r\n \techo \"$i\";\r\n\t\t\t\telse \r\n\t\t\t\t\t echo \", $i\";\r\n else\r\n\t\t\tif ($i==1) {\r\n \t\techo \",<a href=\\\"\".$_SERVER['SCRIPT_NAME'].\"?page=$i\".$queryString.\"\\\">$i</a>\";\r\n\t\t\t\t}else{ \r\n \t\techo \",<a href=\\\"\".$_SERVER['SCRIPT_NAME'].\"?page=$i\".$queryString.\"\\\">$i</a>\";\r\n } }\r\n if($this->openPage < $this->pages) {\r\n echo \",<a href=\\\"\".$_SERVER['SCRIPT_NAME'].\"?page=$next\".$queryString.\"\\\">Next</a><span style='color:#e5e5e5; padding-left:2px;padding-right:2px;'>|</span>\";\r\n echo \",<a href=\\\"\".$_SERVER['SCRIPT_NAME'].\"?page=$last\".$queryString.\"\\\">Last</a>]\";\r\n }\r\n else {\r\n echo \" [Next<span style='color:#e5e5e5; padding-left:2px;padding-right:2px;'>|</span>\";\r\n echo \"Last]\";\r\n } \r\n }",
"protected function buildPagination() {}",
"protected function buildPagination() {}",
"function pagination($page_count,$page,$browse_range=3,$show_last=true)\n {\n if($page_count>1)\n {\n $xpagination['current'] = $page;\n if($page_count > $page)\n {\n $xpagination['next'] = $page+1;\n }\n else\n {\n $xpagination['next'] = 0;\n }\n if($page > 1)\n {\n $xpagination['previous'] = $page-1;\n }\n else\n {\n $xpagination['previous'] = 0;\n }\n $xpagination['items'][] = 1;\n if ($page > $browse_range+1) $xpagination['items'][] = 0;\n $n_range = $page-($browse_range-1);\n $p_range = $page+$browse_range;\n for($page_browse=$n_range; $page_browse<$p_range; $page_browse++)\n {\n if($page_browse > 1 && $page_browse <= $page_count) $xpagination['items'][] = $page_browse;\n }\n if($show_last)\n {\n if($page < $page_count-($browse_range)) $xpagination['items'][] = 0;\n if(!in_array($page_count,$xpagination['items'])) $xpagination['items'][] = $page_count;\n }\n return $xpagination;\n }\n return false;\n }",
"public function getPageItems()\n {\n }",
"public function getPageVisible() {}",
"private function generatePages()\n {\n $all_pages = self::getPages($this->records, $this->recordsInPage);\n $total = 0;\n $start = 1;\n while ($total < $all_pages) {\n $shift = $this->getShift();\n $paging_start = $total < $this->getLeftShift() ? true : false;\n $paging_end = $total >= ($all_pages - $this->getRightShift()) ? true : false;\n\n if ($this->currentPage == $start) {\n $this->appendData(sprintf('<li class=\"active\"><span>%d</span></li>', $start));\n }\n elseif ($paging_start|| $paging_end) {\n $this->appendData(sprintf('<li><a href=\"%s%d\">%d</a></li>', $this->url, $start, $start));\n }\n elseif (($this->currentPage == $start - $shift) || ($this->currentPage == $start + $shift)) {\n $this->appendData('<li><span>...</span></li>');\n }\n $total++;\n $start++;\n }\n }",
"function page()\n {\n $urldata = $this->uri->uri_to_assoc(3, array('m', 'i'));\n\n # Pick all assigned data\n $data = assign_to_data($urldata);\n # print_r($data);\n # exit();\n\n #Get the paginated list of the news items\n $data = add_msg_if_any($this, $data);\n\n //if user has permission\n if (check_user_access($this, 'view_procurement_plans')) \n {\n $search_str = '';\n if($this->session->userdata('isadmin') == 'N')\n {\n $userdata = $this->db->get_where('users', array('userid'=>$this->session->userdata('userid')))->result_array();\n $search_str = ' AND PP.pde_id=\"'. $userdata[0]['pde'] .'\"';\n }\n \n \n #Get the paginated list of plans\n $data['procurement'] = paginate_list($this, $data, 'procurement_plans', array('orderby'=>'PP.financial_year DESC', 'searchstring'=>$search_str));\n #exit($this->db->last_query());\n $data['page_title'] = 'Manage procurement plans';\n $data['current_menu'] = 'view_procurement_plans';\n $data['view_to_load'] = 'procurement/admin/all_procurement_plans_v';\n $data['view_data']['form_title'] = $data['page_title'];\n $this->load->view('dashboard_v', $data);\n \n } else {\n //load access denied page\n load_restriction_page();\n\n }\n\n\n }",
"function displayPagingGrid()\r\n {\r\n\t $InfoArray = $this->InfoArray();\r\n \t\r\n\t\tif($InfoArray[\"TOTAL_RESULTS\"] <= RECORD_PER_PAGE)\r\n\t\t\treturn null;\r\n\t /* Everything below here are just examples! */\r\n\t\r\n\t /* Print our some info like \"Displaying page 1 of 49\" */\r\n\t $paging = \"<table class='paging' width='100%'><tr><td align='left'>Displaying page \" . $InfoArray[\"CURRENT_PAGE\"] . \" of \" . $InfoArray[\"TOTAL_PAGES\"] . \"</td>\";\r\n\t \r\n\t\t$paging .= \"<td align='center'>\";\r\n\t /* Print our first link */\r\n\t if($InfoArray[\"CURRENT_PAGE\"]!= 1) {\r\n\t\t $paging .= \"<a href=\\\"javascript:ajaxPaging('',1);\\\"><<</a> \";\r\n\t } else {\r\n\t\t $paging .= \"<< \";\r\n\t }\r\n\t\r\n\t /* Print out our prev link */\r\n\t if($InfoArray[\"PREV_PAGE\"]) {\r\n\t\t $paging .= \"<a href=javascript:ajaxPaging('',\" . $InfoArray[\"PREV_PAGE\"] . \")>Previous</a> | \";\r\n\t } else {\r\n\t\t $paging .= \"Previous | \";\r\n\t }\r\n\t\r\n\t /* Example of how to print our number links! */\r\n\t for($i=0; $i<count($InfoArray[\"PAGE_NUMBERS\"]); $i++) {\r\n\t\t if($InfoArray[\"CURRENT_PAGE\"] == $InfoArray[\"PAGE_NUMBERS\"][$i]) {\r\n\t\t\t $paging .= $InfoArray[\"PAGE_NUMBERS\"][$i] . \" | \";\r\n\t\t } else {\r\n\t\t\t $paging .= \"<a href=javascript:ajaxPaging('',\" . $InfoArray[\"PAGE_NUMBERS\"][$i] . \")>\" . $InfoArray[\"PAGE_NUMBERS\"][$i] . \"</a> | \";\r\n\t\t }\r\n\t }\r\n\t\r\n\t /* Print out our next link */\r\n\t if($InfoArray[\"NEXT_PAGE\"]) {\r\n\t\t $paging .= \" <a href=javascript:ajaxPaging('',\" . $InfoArray[\"NEXT_PAGE\"] . \")>Next</a>\";\r\n\t } else {\r\n\t\t $paging .= \" Next\";\r\n\t }\r\n\t\r\n\t /* Print our last link */\r\n\t if($InfoArray[\"CURRENT_PAGE\"]!= $InfoArray[\"TOTAL_PAGES\"]) {\r\n\t\t $paging .= \" <a href=javascript:ajaxPaging('',\" . $InfoArray[\"TOTAL_PAGES\"] . \")>>></a>\";\r\n\t } else {\r\n\t\t $paging .= \" >>\";\r\n\t }\r\n\t \r\n\t $InfoArray[\"START_OFFSET\"] = ($InfoArray[\"START_OFFSET\"] == 0) ? 1 : $InfoArray[\"START_OFFSET\"];\r\n\t\t\r\n\t $paging .= \"</td><td align='right'>Displaying results \" . $InfoArray[\"START_OFFSET\"] . \" - \" . $InfoArray[\"END_OFFSET\"] . \" of \" . $InfoArray[\"TOTAL_RESULTS\"] . \"</td></tr></table>\";\r\n\t \r\n\t return $paging;\r\n\t}",
"function _syndicated_content_listings_page()\n{\n}",
"function displayCommonPaging($onClick='')\r\n {\r\n\t $InfoArray = $this->InfoArray();\r\n \t\r\n\t\tif($InfoArray[\"TOTAL_RESULTS\"] <= RECORD_PER_PAGE)\r\n\t\t\treturn null;\r\n\t /* Everything below here are just examples! */\r\n\t\r\n\t /* Print our some info like \"Displaying page 1 of 49\" */\r\n\t $paging = \"<table class='paging' width='100%'><tr><td align='left'>Displaying page \" . $InfoArray[\"CURRENT_PAGE\"] . \" of \" . $InfoArray[\"TOTAL_PAGES\"] . \"</td>\";\r\n\t \r\n\t\t$paging .= \"<td align='center'>\";\r\n\t /* Print our first link */\r\n\t if($InfoArray[\"CURRENT_PAGE\"]!= 1) {\r\n\t\t $paging .= \"<a href=\\\"javascript:\".$onClick.\"('',1);\\\"><<</a> \";\r\n\t } else {\r\n\t\t $paging .= \"<< \";\r\n\t }\r\n\t\r\n\t /* Print out our prev link */\r\n\t if($InfoArray[\"PREV_PAGE\"]) {\r\n\t\t $paging .= \"<a href=javascript:\".$onClick.\"('',\" . $InfoArray[\"PREV_PAGE\"] . \")>Previous</a> | \";\r\n\t } else {\r\n\t\t $paging .= \"Previous | \";\r\n\t }\r\n\t\r\n\t /* Example of how to print our number links! */\r\n\t for($i=0; $i<count($InfoArray[\"PAGE_NUMBERS\"]); $i++) {\r\n\t\t if($InfoArray[\"CURRENT_PAGE\"] == $InfoArray[\"PAGE_NUMBERS\"][$i]) {\r\n\t\t\t $paging .= \"<strong>\".$InfoArray[\"PAGE_NUMBERS\"][$i] . \"</strong> | \";\r\n\t\t } else {\r\n\t\t\t $paging .= \"<a href=javascript:\".$onClick.\"('',\" . $InfoArray[\"PAGE_NUMBERS\"][$i] . \")>\" . $InfoArray[\"PAGE_NUMBERS\"][$i] . \"</a> | \";\r\n\t\t }\r\n\t }\r\n\t\r\n\t /* Print out our next link */\r\n\t if($InfoArray[\"NEXT_PAGE\"]) {\r\n\t\t $paging .= \" <a href=javascript:\".$onClick.\"('',\" . $InfoArray[\"NEXT_PAGE\"] . \")>Next</a>\";\r\n\t } else {\r\n\t\t $paging .= \" Next\";\r\n\t }\r\n\t\r\n\t /* Print our last link */\r\n\t if($InfoArray[\"CURRENT_PAGE\"]!= $InfoArray[\"TOTAL_PAGES\"]) {\r\n\t\t $paging .= \" <a href=javascript:\".$onClick.\"('',\" . $InfoArray[\"TOTAL_PAGES\"] . \")>>></a>\";\r\n\t } else {\r\n\t\t $paging .= \" >>\";\r\n\t }\r\n\t \r\n\t $InfoArray[\"START_OFFSET\"] = ($InfoArray[\"START_OFFSET\"] == 0) ? 1 : $InfoArray[\"START_OFFSET\"];\r\n\t \r\n\t $paging .= \"</td><td align='right'>Displaying results \" . $InfoArray[\"START_OFFSET\"] . \" - \" . $InfoArray[\"END_OFFSET\"] . \" of \" . $InfoArray[\"TOTAL_RESULTS\"] . \"</td></tr></table>\";\r\n\t \r\n\t return $paging;\r\n\t}",
"function paging($condtion='1')\r\n {\r\n /*\r\n $url = '';\r\n \t if(isset($_GET[\"brand\"])){\r\n \t \t$value = trim($_GET['brand']);\r\n \t \tif($value != \"\"){\r\n\t \t \t$condtion = sprintf(\"brand='%s'\",$value);\r\n\t \t \t$url = '&brand='.$value;\r\n \t \t}\r\n \t }\r\n \t \r\n \t if(isset($_GET[\"module\"])){\r\n \t \t$value = trim($_GET['module']);\r\n \t \tif($value != \"\"){\r\n\t \t \t$module = sprintf(\"series='%s'\",$value);\r\n\t \t \t$condtion = $condtion.' and '.$module;\r\n\t \t \t$url = $url.'&module='.$value;\r\n \t \t}\r\n \t }\r\n \t \r\n \t if(isset($_GET[\"part\"])){\r\n \t \t$value = trim($_GET['part']);\r\n \t \tif($value != \"\"){ \t \t\r\n\t \t \t$part = sprintf(\"module='%s'\",$value);\r\n\t \t \t$condtion = $condtion.' and '.$part;\r\n\t \t \t$url = $url.'&part='.$value;\r\n \t \t}\r\n \t }\r\n \t \r\n \t if(isset($_GET[\"key\"])){\r\n \t \t$value = trim($_GET[\"key\"]);\r\n \t \tif($value != \"\"){\r\n\t \t \t$condtion = $this->key_query($value,$url);\r\n\t \t \techo \"++++++++++\".$condtion;\r\n\t \t \t//$url = $url.'&part='.$value; \t \t\r\n \t \t}\r\n \t }\r\n \t */\r\n // get current page index\r\n $page = 1;\r\n \t if(isset($_GET[\"page\"])){\r\n \t \t$page = $_GET['page'];\r\n \t }\r\n \t \r\n \t // set paging parameters\r\n $number = 6; \r\n $total = $this->total;\r\n $url = $this->pget;\r\n $condtion = $this->cond;\r\n //$total = $this->getTotal($condtion);\r\n \r\n $url = '?page={page}'.$url; \r\n $pager = new Paging($total,$number,$page,$url);\r\n \t \r\n \t // get publish records\r\n\t $db = GLOBALDB();\r\n $sql = \"SELECT * FROM publish WHERE \".$condtion.\" order by id desc LIMIT \".$pager->limit.\",\".$pager->size;\r\n $result = $db->query($sql); \r\n $this->display($result);\r\n \r\n // show paging bar\r\n //echo $sql;\r\n\t $pager->show();\r\n }"
] |
[
"0.68333185",
"0.671128",
"0.660589",
"0.64493936",
"0.64398426",
"0.64063853",
"0.6394497",
"0.63881314",
"0.6373561",
"0.63563",
"0.6354984",
"0.63354003",
"0.6331671",
"0.6303768",
"0.63000077",
"0.6298029",
"0.62846",
"0.62740624",
"0.6240661",
"0.6232736",
"0.6232736",
"0.62266934",
"0.6210122",
"0.6207886",
"0.6195802",
"0.61922085",
"0.6159947",
"0.61589915",
"0.6157269",
"0.61561185"
] |
0.7056663
|
0
|
16th Jan 2009 Phil Redclift Create a list of clickable boxes applicable to validating comments
|
public function drawCommentsCheckboxes($guid, $comment_id) {
global $db, $help, $site;
//print "dCC($guid, $comment_id)<br>\n";
// Set default options...
$no_link='<span class="no-action"></span>';
$publishlink=$previewlink=$rejectlink=$no_link;
$previewlink = '<a '.$help->drawInfoPopup($this->drawLabel("tl_task_comm_preview", "Preview this page")).' class="preview" href="'.$this->drawLinkByGUID($guid).'?mode=preview&showcomments=1&commentid='.$comment_id.'" target="_blank">Preview</a>';
$publishlink = '<a '.$help->drawInfoPopup($this->drawLabel("tl_task_comm_publish", "Publish this comment")).' class="publish" href="/treeline/comments/?action=approve&id='.$comment_id.'">Publish</a>';
$rejectlink = '<a '.$help->drawInfoPopup($this->drawLabel("tl_task_comm_reject", "Reject this comment")).' class="reject" href="/treeline/comments/?action=reject&id='.$comment_id.'">Reject</a>';
$html = $previewlink.$publishlink.$rejectlink;
return $html;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"function comments_popup_script()\n {\n }",
"function buildRecentComments($comments) {\n foreach($comments as $comment){\n echo \"<div class=\\\"panel-body\\\">\\n\n <p>$comment[1] on <a href=\\\"/phase5/pages/info.php?id=$comment[4]\\\">$comment[3]</a></p>\\n\n <p class=\\\"well\\\">$comment[0]</p>\\n\n </div>\\n\";\n }\n}",
"function suggestcomment_form_items()\n{\nif((get_option('suggestcomment_posttypes_posts')=='1' && get_post_type()=='post')|(get_option('suggestcomment_posttypes_pages')=='1' && get_post_type()=='page')){\n$commentlist = suggestcomment_get_comments();\n$suggestcomment_describe = stripslashes(get_option('suggestcomment_describe'));\necho $suggestcomment_describe.\"\\n<ul>\\n\";\n\nif (get_option('suggestcomment_randomize')=='1')\n{\n//random comments \n$sugcomment_keys = array_rand($commentlist,get_option('suggestcomment_randomize_count'));\nforeach ($sugcomment_keys as $sugcommentnum){\n $sugcomment = $commentlist[$sugcommentnum];\n echo \"<li><a href=\\\"#respond\\\" onclick=\\\"suggestcomment_replace_comment('\".$sugcomment->comment_id.\"')\\\">\".stripslashes($sugcomment->comment_text).\"</a></li>\\n\";\n}\n}else{\n//all comments\nforeach ($commentlist as $sugcomment){\n echo \"<li><a href=\\\"#respond\\\" onclick=\\\"suggestcomment_replace_comment('\".$sugcomment->comment_id.\"')\\\">\".stripslashes($sugcomment->comment_text).\"</a></li>\\n\";\n}\n}\necho \"</ul>\";\n}\n}",
"function get_comments_popup_template()\n {\n }",
"function thinkup_input_comments() {\n\t$args = array( \n\t\t'callback' => 'thinkup_input_commenttemplate', \n\t);\n\twp_list_comments( $args );\n}",
"function dp_facebook_comment_box() {\n\tglobal $options, $options_visual;\n\t// Facebook comment\n\tif ( get_post_meta(get_the_ID(), 'dp_hide_fb_comment', true) ) return;\n\n\tif ( ($options['facebookcomment'] && get_post_type() === 'post') || ($options['facebookcomment_page'] && is_page()) ) {\n\t\techo '<div class=\"dp_fb_comments_div\"><h3 class=\"inside-title\"><span class=\"title\">'.htmlspecialchars_decode($options['fb_comments_title']).'</span></h3><div class=\"fb-comments\" data-href=\"'.get_permalink ().'\" data-num-posts=\"'.$options['number_fb_comment'].'\" data-width=\"100%\"></div></div>';\n\t}\n}",
"function tempera_comments_on() {\nglobal $temperas;\nforeach ($temperas as $key => $value) { ${\"$key\"} = $value; }\t\n\tif ( comments_open() && ! post_password_required() && $tempera_blog_show['comments'] && ! is_single()) :\n\t\tprint '<div class=\"comments-link\"><i class=\"icon-comments icon-metas\" title=\"' . __('Comments', 'tempera') . '\"></i>';\n\t\tprintf ( comments_popup_link( __( '<b>0</b>', 'tempera' ), __( '<b>1</b>', 'tempera' ), __( '<b>%</b>', 'tempera' ),(''),__('<b>-</b>','tempera') ));\n\t\tprint '</div>';\n\tendif;\n}",
"function showComments($postId){\n $user = getUserIdPost($postId);\n $commentIds = getCommentIdsofPost($postId);\n\n\n # displays Comments\n foreach ($commentIds as $commentId) {\n\n printComment($commentId);\n\n }\n\n # new Comment Input Form \n ?>\n <form method=\"POST\">\n <input type=\"hidden\" name=\"postId\" value=\"<?php echo $postId; ?>\">\n <input type=\"hidden\" name=\"user\" value=\"<?php echo $user; ?>\">\n <input type=\"hidden\" name=\"url\" value=\"<?php echo parse_url($_SERVER[\"REQUEST_URI\"], PHP_URL_PATH); ?>\">\n <input class=\"inputComment\" type=\"text\" name=\"newCommentText\" maxlength=150 placeholder=\"Comment...\">\n <button class=\"submitComment\" type=\"submit\" name=\"newCommentSubmit\">></button>\n </form>\n\n <?php\n\n}",
"function comments_popup_link($zero = \\false, $one = \\false, $more = \\false, $css_class = '', $none = \\false)\n {\n }",
"function zanblog_latest_comments_list($list_number, $avatar_size, $cut_length) {\r\n global $wpdb;\r\n\r\n $sql = \"SELECT DISTINCT ID, post_title, post_password, comment_ID, comment_post_ID, comment_author, comment_date_gmt, comment_approved, comment_type,comment_author_url,comment_author_email, comment_content AS com_excerpt FROM $wpdb->comments LEFT OUTER JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID = $wpdb->posts.ID) WHERE comment_approved = '1' AND comment_type = '' AND comment_author != 'zwwooooo' AND post_password = '' ORDER BY comment_date_gmt DESC LIMIT $list_number\" ;\r\n \r\n $comments = $wpdb->get_results($sql);\r\n \r\n foreach ($comments as $comment) {\r\n $output .= \"\\n<li class=\\\"list-group-item\\\">\" . get_avatar(get_comment_author_email(), $avatar_size) . \"<span class=\\\"comment-log\\\"> <a href=\\\"\" . htmlspecialchars(get_comment_link( $comment->comment_ID )) . \"\\\" title=\\\"on \" .$comment->post_title . \"\\\">\" . zanblog_cut_string(strip_tags($comment->com_excerpt), $cut_length).\" </a></span></li>\";\r\n }\r\n\r\n $output = convert_smilies($output);\r\n\r\n return $output;\r\n}",
"function starter_comment_block() {\n $items = array();\n $number = variable_get('comment_block_count', 10);\n\n foreach (comment_get_recent($number) as $comment) {\n //kpr($comment->changed);\n //print date('Y-m-d H:i', $comment->changed);\n $items[] =\n '<h3>' . l($comment->subject, 'comment/' . $comment->cid, array('fragment' => 'comment-' . $comment->cid)) . '</h3>' .\n ' <time datetime=\"'.date('Y-m-d H:i', $comment->changed).'\">' . t('@time ago', array('@time' => format_interval(REQUEST_TIME - $comment->changed))) . '</time>';\n }\n\n if ($items) {\n return theme('item_list', array('items' => $items, 'daddy' => 'comments'));\n }\n else {\n return t('No comments available.');\n }\n}",
"function tempera_list_comments() {\t\n\t\t\t\t\twp_list_comments( array( 'callback' => 'tempera_comment' ) );\n\t\t\t}",
"public function displayComments()\n {\n global $lexicon;\n $lexicon = new Lexicon(COMMENTIA_LEX_LOCALE);\n\n global $roles;\n $roles = new Roles();\n\n /**\n * Iterates through each comment recursively, and appends it to the var holding the HTML markup.\n *\n * @param array $comment An array containing all the comment data\n */\n\n foreach ($this->comments as $comment) {\n if (isset($this->comments['ucid-'.$comment['ucid']])) {\n $this->renderCommentView($comment['ucid']);\n unset($this->comments['ucid-'.$comment['ucid']]);\n }\n }\n\n if ($_SESSION['__COMMENTIA__']['member_is_logged_in']) {\n $this->html_output .= ('<div class=\"commentia-new_comment_area\">'.\"\\n\".'<h4>'.TITLES_NEW_COMMENT.'</h4>'.\"\\n\".'<textarea id=\"comment-box\" oninput=\"autoGrow(this);\"></textarea>'.\"\\n\".'<button id=\"post-comment-button\" onclick=\"postNewComment(this);\">'.COMMENT_CONTROLS_PUBLISH.'</button>'.\"\\n\".'</div>'.\"\\n\");\n }\n\n return $this->html_output;\n }",
"function recent_comments_widget( $number = 3 , $size = 50 ) {\n\n\t// This widget depends on BuddyPress, so bail if it's not active \n\tif ( !function_exists( 'bp_version' ) )\n\t\treturn false;\n\n\t// Exclude posts in the Guild News category \n\tglobal $wpdb;\n\t\n\t// Build the SQL \n\t$request =\n\t\t\"SELECT DISTINCT ID, post_title, post_password, comment_ID, comment_post_ID,\n\t\tcomment_author, user_id, comment_date, comment_date_gmt, comment_approved, comment_type\n\t\tFROM $wpdb->comments, $wpdb->posts\n\t\tWHERE comment_approved = '1'\n\t\tAND comment_type = ''\n\t\tAND ID = comment_post_ID\n\t\tAND post_status = 'publish'\n\t\tAND post_password = ''\n\t\tORDER BY comment_date DESC LIMIT $number\";\n\t$comments = $wpdb->get_results( $request );\n\n\t// If comments are found, loop them \n\tif ($comments) : ?>\n\t<div class=\"recent-comments-widget widget\">\n\t\t<header class=\"widget-header\"><h3 class=\"widget-title\">Article Discussion</h3></header>\n\t\t<ul class=\"recent-discussion-list\">\n\n\t\t<?php $comment_alt = 1; ?>\n\t\t<?php foreach ($comments as $comment) : \n\t\t\n\t\t\t// Get the comment author\n\t\t\t$user_id \t= $comment->user_id;\n\t\t\t\n\t\t\t// Get the comment time, and make it relative \n\t\t\t$comment_time = $comment->comment_date_gmt;\n\t\t\t$comment_time = bp_core_time_since( $comment_time , current_time( 'timestamp' , true ) );\n\t\t\t$comment_time = '<time class=\"recent-discussion-time\" datetime=\"' . date( 'Y-m-d\\TH:i' , strtotime($comment->comment_date) ) . '\">' . $comment_time . '</time>';\t\t\t\n\t\t\tob_start(); \n\t\t\t\n\t\t\t// Count evens and odds \n\t\t\t$class = ( $comment_alt % 2 ) ? 'odd' : 'even';\n\t\t\t$comment_alt++;\n\t\t\n\t\t\t// Display the comment \n echo '<li class=\"recent-discussion '.$class.'\">';\n\t\t\t\n\t\t\t// Get the avatar\n\t\t\t$avatar\t= new Apoc_Avatar( array( 'user_id' => $user_id , 'type' => 'thumb' , 'size' => $size ) );\n\t\t\t\n\t\t\t// If it's a registered user, link to BuddyPress \n\t\t\tif ( $comment->user_id > 0 ) : \n\t\t\t\t$author = bp_core_get_userlink( $user_id ); ?>\n <a class=\"discussion-avatar\" href=\"<?php echo bp_core_get_user_domain( $user_id ); ?>\" title=\"View <?php echo $comment->comment_author; ?>'s Profile\"><?php echo $avatar->avatar; ?></a><?php \n\t\t\t\t\n\t\t\t// Otherwise, get their guest info \n\t\t\telse : \n\t\t\t\t$author = $comment->comment_author; ?>\n <a class=\"discussion-avatar\"><?php echo $avatar; ?></a><?php\n\t\t\t\t\n\t\t\t// Build the recent comment excerpt \n\t\t\tendif; ?>\n\t\t\t\t<div class=\"recent-discussion-content\">\n\t\t\t\t\t<span class=\"recent-discussion-title\">\n\t\t\t\t\t\t<?php echo $author; ?> commented on <a href=\"<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>\" title=\"View Comment\"><?php echo get_the_title($comment->comment_post_ID); ?></a>\n\t\t\t\t\t</span>\n\t\t\t\t\t<?php echo $comment_time; ?>\n\t\t\t\t</div> \n </li>\n <?php ob_end_flush(); endforeach; ?>\n\t\t</ul>\n\t</div><!-- .recent-comments-widget -->\n\t<?php endif; \n}",
"function wp_dashboard_recent_comments_control()\n {\n }",
"function draw_proposal($proposal){ ?>\n <li class=\"proposal-container-<?php \n if($proposal['status'] == 'P') echo 'pending';\n else if($proposal['status'] == 'A') echo 'accepted';\n else if($proposal['status'] == 'R') echo 'refused' ?>\">\n Proposal by: \n <div class=\"proposal-username\"><h1><a href=\"../pages/profile.php?username=<?= $proposal['username'] ?>\"><?= $proposal['username'] ?></a></h1></div>\n <div class=\"proposal-description\"><?=htmlentities($proposal['description'])?></div>\n <div class=\"proposal-buttons\">\n <?php if($proposal['status'] == 'P' && @$_SESSION['username'] != $proposal['username']){\n echo '<button class=\"approve-button\" onclick=\"approvalOrRefusalBox(true, ' . $proposal[\"idUser\"] . ', ' . $proposal[\"idTopic\"] . ')\">Approve</button>';\n echo '<button class=\"refuse-button\" onclick=\"approvalOrRefusalBox(false, ' . $proposal[\"idUser\"] . ', ' . $proposal[\"idTopic\"] . ')\">Refuse</button>';\n }?>\n </div>\n </li>\n<?php }",
"function print_embed_comments_button()\n {\n }",
"function tz_list_pings($comment, $args, $depth) {\n $GLOBALS['comment'] = $comment; ?>\n<li id=\"comment-<?php comment_ID(); ?>\"><?php comment_author_link(); ?>\n<?php }",
"function displaycomments(){\nif(isset($_POST['vid'])){$this->presentation_url = safeAddSlashes($_POST['vid']);}else{$this->presentation_url = safeAddSlashes($_GET['vid']);}\nif(isset($_POST['lead_comment_author'])){$this->lead_comment_author = safeAddSlashes($_POST['lead_comment_author']);}else{$this->lead_comment_author = safeAddSlashes($_GET['lead_comment_author']);}\nif(isset($_POST['comment_author'])){$this->comment_author = safeAddSlashes($_POST['comment_author']);}else{$this->comment_author = safeAddSlashes($_GET['comment_author']);}\n//database connection begins\nrequire('database/connx.php');\n\n$db = & new MySQL($host,$dbUser,$dbPass,$dbName);\n$sql1=\"select str_name,str_comment,time_pubdate,str_msg_type from comments where str_presentation_url='\" . $this->presentation_url . \"' and str_msg_type='Posted'\" ;\n$result1=$db->query($sql1);\n$this->strcommenthtml3 = \"\";\n$this->strcommenthtml1 = \"<div><div name='no_of_comments'>\" . $result1->size() . \" comments</div>\";\nwhile ($row1 = $result1->fetch()) {\n if($row1['str_msg_type'] == 'Posted'){$this->strcommenthtml2 = \"<div id='msg_type_posted'>\";}\n else{$this->strcommenthtml2 = \"<div id='msg_type_reply'>\";};\n $this->strcommenthtml3 .= $this->strcommenthtml2 . \"<span id='db_comment'>\" . $row1['str_comment'] . \"</span><br/>\" . \"<span id='db_comment_author'>\" . $row1['str_msg_type'] . \" by \" . $row1['str_name'] . \" on \" . $row1['time_pubdate'] . \"</span> <span id='reply'><a href='#postcomment' onclick=\\\"postcomment('reply', '\" . $row1['str_name'] . \"');\\\">Reply</a></span></div>\";\n\n//comment out the reply link\n//$this->strcommenthtml3 .= $this->strcommenthtml2 . \"<span id='db_comment'>\" . $row1['str_comment'] . \"</span><br/>\" . \"<span id='db_comment_author'>\" . $row1['str_msg_type'] . \" by \" . $row1['str_name'] . \" on \" . $row1['time_pubdate'] . \"</span></div>\";\n\n//for each comment, display corresponding replies\n$sql2=\"select str_name,str_comment,time_pubdate,str_msg_type from comments where str_lead_name = '\" . $row1['str_name'] . \"' and str_presentation_url='\" . $this->presentation_url . \"' and str_msg_type='Replied'\";\n//echo $sql2 . \"<p>\";\n$result2=$db->query($sql2);\n$this->strcommenthtml5 = \"\";\n$this->strcommenthtml_1 = \"<div>\";\nwhile ($row2 = $result2->fetch()) {\n if($row2['str_msg_type'] == 'Replied'){$this->strcommenthtml6 = \"<div id='msg_type_reply'>\";}\n else{$this->strcommenthtml7 = \"<div id='msg_type_posted'>\";};\n $this->strcommenthtml5 .= $this->strcommenthtml6 . \"<span id='db_comment'>\" . $row2['str_comment'] . \"</span><br/>\" . \"<span id='db_comment_author'>\" . $row2['str_msg_type'] . \" by \" . $row2['str_name'] . \" on \" . $row2['time_pubdate'] . \"</span> <span id='reply'><a href='#postcomment' onclick=\\\"postcomment('reply', '\" . $row1['str_name'] . \"');\\\">Reply</a></span></div>\";\n\n//comment out the reply link\n//$this->strcommenthtml5 .= $this->strcommenthtml6 . \"<span id='db_comment'>\" . $row2['str_comment'] . \"</span><br/>\" . \"<span id='db_comment_author'>\" . $row2['str_msg_type'] . \" by \" . $row2['str_name'] . \" on \" . $row2['time_pubdate'] . \"</span></div>\";\n }\n$this->strcommenthtml4 = \"</div>\";\n$this->strcommenthtml3 .= $this->strcommenthtml_1 . $this->strcommenthtml5 . $this->strcommenthtml4;\n//end of display of replies\n }\n$this->strcommenthtml4 = \"</div>\";\necho $this->strcommenthtml1 . $this->strcommenthtml3 . $this->strcommenthtml4;\n\n }",
"function render_block_core_post_comments_form($attributes, $content, $block)\n {\n }",
"public function is_comments_popup()\n {\n }",
"function displayReviews($reviews){\r\n$reviewConatainer=\"<ul id='reviews'>\";\r\nforeach($reviews as $blocks){ \r\n$reviewConatainer.='<li>';\r\n// take first character from first name\r\n$clientName = substr($blocks['clientFirstname'], 0,1);\r\n// transform to uppercase \r\n$clientName = strtoupper($clientName);\r\n// transform fist character from Lastname to uppercase \r\n$clientLasname = ucfirst($blocks['clientLastname']);\r\n$userReviewName = $clientName.$clientLasname;\r\n\r\n//Simplify date \r\n$date = substr($blocks['reviewDate'],0,10);\r\n\r\n$reviewConatainer.=\"<p><span>$userReviewName</span> wrote on $date</p>\";\r\n$reviewConatainer.=\"<p class='reviewText'>$blocks[reviewText]</p>\";\r\n$reviewConatainer.='</li>';\r\n}\r\n\r\n$reviewConatainer.='</ul>';\r\nreturn $reviewConatainer;\r\n}",
"function display_bids_for_review ()\n{\n\n\n // Only bid committe members, the bid chair and the GM Liaison may access\n // this page\n\n if ((! user_has_priv (PRIV_BID_COM)) &&\n (! user_has_priv (PRIV_BID_CHAIR)) &&\n (! user_has_priv (PRIV_GM_LIAISON)))\n return display_access_error ();\n\n $order = 'Status, Title';\n $desc = 'Status';\n\n if (array_key_exists ('order', $_REQUEST))\n {\n switch ($_REQUEST['order'])\n {\n case 'Game':\n\t$order = 'Title';\n $desc = 'Game Title';\n break;\n\n case 'LastUpdated':\n\t$order = 'LastUpdated DESC';\n $desc = 'Last Updated';\n break;\n\n case 'Created':\n\t$order = 'Bids.Created DESC';\n $desc = 'Created';\n break;\n\n case 'Submitter':\n\t$order = 'DisplayName';\n $desc = 'Submitter';\n break;\n \n case 'Type':\n\t $order = 'GameSystem';\n $desc = 'Class Type';\n break;\n }\n }\n\n\n display_header ('Content Submitted for ' . CON_NAME . ' by ' . $desc);\n echo \"<a name=\\\"#Classes\\\">Classes/Workshops only - go to <a href=\\\"#Panels\\\">Panels Section</a> to see Panels</a>\";\n echo \"Click on the item's title to view the details<br>\\n\";\n echo \"Click on the submitter to send mail\\n\";\n if (user_has_priv (PRIV_BID_CHAIR))\n echo \"<br>Click on the status to change the status\\n\";\n echo \"<p>\\n\";\n\n display_class_table ($order, $desc);\n\n echo \"<P>\\n\";\n\n echo \"<a name=\\\"Panels\\\"><b>Panels</b></a> - to see classes, go <a href=\\\"#Classes\\\">up</a><br>\\n\";\n display_panel_table ($order, $desc);\n\n\n\n\n echo \"<TABLE>\\n\";\n echo \" <TR VALIGN=TOP>\\n\";\n echo \" <TD BGCOLOR=#FFFFCC>Pending</TD>\\n\";\n echo \" <TD>\\n\";\n echo \" A newly submitted item. The Conference Coordinator is working\\n\";\n echo \" with the submitter to make sure that it is complete\\n\";\n echo \" </TD>\\n\";\n echo \" </tr>\\n\";\n echo \" <TR VALIGN=TOP>\\n\";\n echo \" <TD BGCOLOR=#DDDDFF>Under Review</TD>\\n\";\n echo \" <TD>\\n\";\n echo \" An item that is available for review by the Conference Committee\\n\";\n echo \" </TD>\\n\";\n echo \" </tr>\\n\";\n echo \" <TR VALIGN=TOP>\\n\";\n echo \" <TD BGCOLOR=#CCFFCC>Accepted</TD>\\n\";\n echo \" <TD>\\n\";\n echo \" An item that has been accepted for \".(USE_CON_SHORT_NAME ? CON_SHORT_NAME : CON_NAME).\"\\n\";\n echo \" </TD>\\n\";\n echo \" </tr>\\n\";\n echo \" <TR VALIGN=TOP>\\n\";\n echo \" <TD BGCOLOR=#FFCCCC>Rejected</TD>\\n\";\n echo \" <TD>\\n\";\n echo \" An item that has been rejected for \".(USE_CON_SHORT_NAME ? CON_SHORT_NAME : CON_NAME).\"\\n\";\n echo \" </TD>\\n\";\n echo \" </tr>\\n\";\n echo \" <TR VALIGN=TOP>\\n\";\n echo \" <TD BGCOLOR=#FFCC99>Dropped</TD>\\n\";\n echo \" <TD>\\n\";\n echo \" An item that was previously accepted and has been dropped\\n\";\n echo \" from the schedule\\n\";\n echo \" </TD>\\n\";\n echo \" </tr>\\n\";\n echo \"</TABLE>\\n\";\n\n echo \"<P>\\n\";\n \n mysql_free_result ($result);\n\n}",
"public function showSignaledComments()\n {\n foreach ($this->_commentsArray as $comment) {\n if ($comment['Signalement']==1) {\n echo commentsTemplate('signaled', $comment);\n }\n };\n }",
"function list_pings($comment, $args, $depth) {\r\n\r\n\t$GLOBALS['comment'] = $comment; ?>\r\n\t\r\n\t<li id=\"comment-<?php comment_ID(); ?>\">\r\n\t\t<span class=\"author\"><?php comment_author_link(); ?></span> - \r\n\t\t<span class=\"date\"><?php echo get_comment_date() ?></span>\r\n\t\t<span class=\"pingcontent\"><?php comment_text() ?></span>\r\n\r\n<?php \r\n}",
"function lightboxgallery_print_recent_activity($course, $viewfullnames, $timestart) {\n global $DB, $CFG, $OUTPUT;\n\n $sql = \"SELECT c.*, l.name, u.firstname, u.lastname\n FROM {lightboxgallery_comments} c\n JOIN {lightboxgallery} l ON l.id = c.gallery\n JOIN {user} u ON u.id = c.userid\n WHERE c.timemodified > $timestart AND l.course = {$course->id}\n ORDER BY c.timemodified ASC\";\n\n if ($comments = $DB->get_records_sql($sql)) {\n echo $OUTPUT->heading(get_string('newgallerycomments', 'lightboxgallery').':', 3);\n\n echo '<ul class=\"unlist\">';\n\n foreach ($comments as $comment) {\n $display = lightboxgallery_resize_text(trim(strip_tags($comment->comment)), MAX_COMMENT_PREVIEW);\n\n $output = '<li>'.\n ' <div class=\"head\">'.\n ' <div class=\"date\">'.userdate($comment->timemodified, get_string('strftimerecent')).'</div>'.\n ' <div class=\"name\">'.fullname($comment, $viewfullnames).' - '.format_string($comment->name).'</div>'.\n ' </div>'.\n ' <div class=\"info\">'.\n ' \"<a href=\"'.$CFG->wwwroot.'/mod/lightboxgallery/view.php?l='.$comment->gallery.'#c'.$comment->id.'\">'.\n $display.'</a>\"'.\n ' </div>'.\n '</li>';\n echo $output;\n }\n\n echo '</ul>';\n\n }\n\n return true;\n}",
"public function add_completion_rules() {\r\n $mform = $this->_form;\r\n $items = array();\r\n\r\n $group = array();\r\n $group[] = $mform->createElement('advcheckbox', 'completionpass', null, get_string('completionpass', 'quiz'),\r\n array('group' => 'cpass'));\r\n $mform->disabledIf('completionpass', 'completionusegrade', 'notchecked');\r\n $group[] = $mform->createElement('advcheckbox', 'completionattemptsexhausted', null,\r\n get_string('completionattemptsexhausted', 'quiz'),\r\n array('group' => 'cattempts'));\r\n $mform->disabledIf('completionattemptsexhausted', 'completionpass', 'notchecked');\r\n $mform->addGroup($group, 'completionpassgroup', get_string('completionpass', 'quiz'), ' ', false);\r\n $mform->addHelpButton('completionpassgroup', 'completionpass', 'quiz');\r\n $items[] = 'completionpassgroup';\r\n return $items;\r\n }",
"function newsdot_comments_link() {\n\t\tif ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) {\n\t\t\techo '<span class=\"comments-link\">';\n\t\t\techo '<i class=\"far fa-comments mr-1\"></i>';\n\t\t\tcomments_popup_link(\n\t\t\t\tsprintf(\n\t\t\t\t\twp_kses(\n\t\t\t\t\t\t/* translators: %s: post title */\n\t\t\t\t\t\t__( 'Leave a Comment<span class=\"screen-reader-text\"> on %s</span>', 'newsdot' ),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'span' => array(\n\t\t\t\t\t\t\t\t'class' => array(),\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\twp_kses_post( get_the_title() )\n\t\t\t\t)\n\t\t\t);\n\t\t\techo '</span>';\n\t\t}\n\t}",
"function doCommentDiv($p_commentTarget){\n\t\techo '<div class=\"fb-comments\" data-href=\"'. $p_commentTarget .'\" data-width=\"350\" data-numposts=\"3\" data-colorscheme=\"light\"></div>';\n\t}",
"public function find_new_comments() {\n\t\t$new = array();\n\n\t\t// Profile comments\n\t\tif ($this->new_comment_count) {\n\t\t\t$new['new-comments'] = HTML::anchor(\n\t\t\t\tURL::user($this),\n\t\t\t\t__(':comments', array(':comments' => '<div></div><var>' . $this->new_comment_count . '</var>')),\n\t\t\t\tarray('title' => __('New comments')\n\t\t\t));\n\t\t}\n\n\t\t// Blog comments\n\t\t$blog_comments = Model_Blog_Entry::find_new_comments($this);\n\t\tif (count($blog_comments)) {\n\t\t\t$new_comments = 0;\n\t\t\tforeach ($blog_comments as $blog_entry) {\n\t\t\t\t$new_comments += $blog_entry->new_comment_count;\n\t\t\t}\n\t\t\t$new['new-blog-comments'] = HTML::anchor(\n\t\t\t\tRoute::model($blog_entry),\n\t\t\t\t__(':comments', array(':comments' => '<div></div><var>' . $new_comments . '</var>')),\n\t\t\t\tarray('title' => __('New blog comments')\n\t\t\t));\n\t\t}\n\t\tunset($blog_comments);\n\n\t\t// Forum quotes\n\t\t$forum_quotes = Model_Forum_Quote::find_by_user($this);\n\t\tif (count($forum_quotes)) {\n\t\t\t$new_quotes = count($forum_quotes);\n\t\t\t$quote = $forum_quotes->current();\n\t\t\t$new['new-forum-quotes'] = HTML::anchor(\n\t\t\t\tRoute::get('forum_post')->uri(array('topic_id' => Route::model_id($quote->topic), 'id' => $quote->post->id)) . '#post-' . $quote->post->id,\n\t\t\t\t__(':quotes', array(':quotes' => '<div></div><var>' . $new_quotes . '</var>')),\n\t\t\t\tarray('title' => __('Forum quotes')\n\t\t\t));\n\t\t}\n\n\t\t// Images waiting for approval\n\t\tif (Permission::has(new Model_Gallery, Model_Gallery::PERMISSION_APPROVE_WAITING, $this)) {\n\t\t\t$gallery_approvals = Model_Gallery::find_pending(Permission::has(new Model_Gallery, Model_Gallery::PERMISSION_APPROVE, $this) ? null : $this);\n\t\t\tif (count($gallery_approvals)) {\n\t\t\t\t$new_approvals = count($gallery_approvals);\n\t\t\t\t$new['new-gallery-approvals'] = HTML::anchor(\n\t\t\t\t\tRoute::get('galleries')->uri(array('action' => 'approval')),\n\t\t\t\t\t__(':galleries', array(':galleries' => '<div></div><var>' . $new_approvals . '</var>')),\n\t\t\t\t\tarray('title' => __('Galleries waiting for approval')\n\t\t\t\t));\n\t\t\t}\n\t\t}\n\n\t\t// Image comments\n\t\t$image_comments = Model_Image::find_new_comments($this);\n\t\tif (count($image_comments)) {\n\t\t\t$new_comments = 0;\n\t\t\tforeach ($image_comments as $image) {\n\t\t\t\t$new_comments += $image->new_comment_count;\n\t\t\t}\n\t\t\t$new['new-image-comments'] = HTML::anchor(\n\t\t\t\tRoute::get('gallery_image')->uri(array('gallery_id' => Route::model_id(Model_Gallery::find_by_image($image->id)), 'id' => $image->id, 'action' => '')),\n\t\t\t\t__(':comments', array(':comments' => '<div></div><var>' . $new_comments . '</var>')),\n\t\t\t\tarray('title' => __('New image comments')\n\t\t\t));\n\t\t}\n\t\tunset($image_comments);\n\n\t\t// Private messages\n\n\t\treturn $new;\n\t}"
] |
[
"0.5734879",
"0.5674912",
"0.5654856",
"0.55429083",
"0.5517093",
"0.5477009",
"0.54081494",
"0.5373968",
"0.5368878",
"0.5347501",
"0.5297888",
"0.5259564",
"0.5234716",
"0.52289045",
"0.5227373",
"0.5203742",
"0.5199796",
"0.5188669",
"0.51817596",
"0.51814026",
"0.516937",
"0.51674193",
"0.5166916",
"0.5160817",
"0.5152269",
"0.51418483",
"0.5110759",
"0.5109026",
"0.51003337",
"0.5093508"
] |
0.63120157
|
0
|
Lists all Description models.
|
public function actionIndex()
{
$dataProvider = new ActiveDataProvider([
'query' => Description::find(),
'pagination' => [
'pageSize' => 500,
],
]);
return $this->render('index', [
'dataProvider' => $dataProvider,
]);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"function listDescriptions() {\n\t\tglobal $HTML;\n\t\tglobal $page;\n\t\tglobal $id;\n\n\t\t$this->getDescription();\n\n\t\t$languages = $this->languageClass->getItems();\n\n\t\t$table = $HTML->table();\n\t\t$table->setTableId(\"descriptions\");\n\t\t$table->setHeader(0, $this->translate(\"Language\"), \"sortby\");\n\t\t$table->setHeader(1, $this->translate(\"Title\"));\n\t\t$table->setHeader(2, $this->translate(\"Search\"), \"max search\");\n\t\t$column_1 = false;\n\t\t$column_2 = false;\n\t\t$column_3 = false;\n\t\t$ids = false;\n\t\t$status = false;\n\t\t$count = isset($this->item[\"title\"]) ? (\" (\" . count($this->item[\"title\"][0]) .\")\") : \"\";\n\t\tforeach($languages[\"id\"] as $language_key => $language_id) {\n\t\t\tif($this->item[\"description_language_id\"][0] && array_search($language_id, $this->item[\"description_language_id\"][0]) !== false) {\n\t\t\t\t$column_1[] = $this->languageClass->getItemName($language_id);\n\t\t\t\t$column_2[] = $this->item[\"title\"][0][array_search($language_id, $this->item[\"description_language_id\"][0])];\n\t\t\t\t$column_3[] = $this->item[\"description_short\"][0][array_search($language_id, $this->item[\"description_language_id\"][0])];\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$column_1[] = $this->languageClass->getItemName($language_id);\n\t\t\t\t$column_2[] = \"-\";\n\t\t\t\t$column_3[] = \"-\";\n\t\t\t}\n\t\t\t$ids[] = $language_id; \n\t\t\t$status[] = \"description_edit\";\n\t\t}\n\n\t\t$table->setRowStatus($status);\n\t\t$table->setRowId($ids);\n\t\t$table->setColumnValues($column_1, $column_2, $column_3);\n\n\t\t$_ = '';\n\t\t$_ .= '<div class=\"c init:form form:action:'.$page->url.'\" id=\"container:description\">';\n\t\t$_ .= '<div class=\"c init:expandable id:descriptions\">';\n\t\t$_ .= $HTML->head($this->translate(\"Descriptions\") . $count, \"2\");\n\t\t$_ .= '<fieldset>';\n\n\t\t$_ .= $HTML->inputHidden(\"id\", $id);\n\t\t$_ .= $HTML->inputHidden(\"item_id\", $id);\n\t\t$_ .= $HTML->inputHidden(\"page_status\", \"description_edit\");\n\n\t\t$_ .= $table->build();\n\t\t$_ .= '</fieldset>';\n\t\t$_ .= '</div>';\n\t\t$_ .= '</div>';\n\t\treturn $_;\n\t}",
"function getDescriptions()\n {\n $description = $this->all('schema:description');\n return $description;\n }",
"public function descriptions()\n {\n return $this->hasMany(Description::class);\n }",
"public function descriptions()\n\t{\n\t\treturn $this->oneToMany(__NAMESPACE__ . '\\\\Description', 'project_id');\n\t}",
"public function descriptions()\n {\n return $this->hasMany('App\\Description','category_id');\n }",
"public function models()\n {\n $this->_display('models');\n }",
"public function getDescriptions()\n {\n return $this->descriptions;\n }",
"public function getDescriptions()\n {\n return $this->descriptions;\n }",
"public function getDescriptionsList() {\n return $this->_get(3);\n }",
"public function getCargoDescriptionListAction(array $options = []): Model;",
"public function getDescriptionList() {\n return $this->_get(3);\n }",
"public function getDescriptionList() {\n return $this->_get(3);\n }",
"public function listModels() {\n\n $config = $this->initConfig($version = AnalyzeModel::VERSION);\n\n $config->setQuery( [ 'version' => $version ] );\n\n $config->setMethod(HttpClientConfiguration::METHOD_GET);\n $config->setType(HttpClientConfiguration::DATA_TYPE_JSON);\n $config->setURL(self::BASE_URL.\"/models\");\n\n return $this->sendRequest($config);\n }",
"public function index()\n {\n return $this->model->all();\n }",
"public function getDescriptions() {\n return $this->description;\n }",
"public function getDescriptionList() {\n return $this->_get(4);\n }",
"public function getDescriptionList() {\n return $this->_get(4);\n }",
"public function descriptions()\n {\n return $this->hasMany('App\\Models\\Description', 'subcategoryWork_id');\n }",
"public function getDescriptionList() {\n return $this->_get(7);\n }",
"public function getAll()\n {\n return DB::table('product_models')->get()->all();\n }",
"public function getDescriptionAction() {\n\n $project_id = $this->input->post('project_id');\n\n $response = $this->project_model->getDescription($project_id);\n\n echo $response[0]['description'];\n }",
"public function findAllDesc()\n {\n $builder = $this->_em->createQueryBuilder();\n \n return $builder->select(['a'])\n ->from('Articles\\Entity\\Article', 'a')\n ->addOrderBy('a.published', 'DESC')\n ->addOrderBy('a.status', 'DESC')\n ->addOrderBy('a.id', 'DESC')\n ->getQuery()\n ->getResult();\n }",
"public function actionList()\r\n {\r\n $this->_userAutehntication();\r\n switch($_GET['model'])\r\n {\r\n case 'posts': \r\n $models = Post::model()->findAll();\r\n break; \r\n default: \r\n $this->_sendResponse(501, sprintf('Error: Mode <b>list</b> is not implemented for model <b>%s</b>',$_GET['model']) );\r\n exit; \r\n }\r\n if(is_null($models)) {\r\n $this->_sendResponse(200, sprintf('No Post found for model <b>%s</b>', $_GET['model']) );\r\n } else {\r\n $rows = array();\r\n foreach($models as $model)\r\n $rows[] = $model->attributes;\r\n\r\n $this->_sendResponse(200, CJSON::encode($rows));\r\n }\r\n }",
"public function ListarDEMO()\n\t{\n\t\ttry\n\t\t{\n\t\t $result= $this->modelo->Listar(\"becario\");\n \n\t\t\treturn $result;\n\t\t}\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\tdie($e->getMessage());\n\t\t}\n\t}",
"public function index()\n {\n return $this->model->getAll();\n }",
"public function getModels();",
"public function getModels();",
"public function index()\n {\n return view('backend.Category.index')\n ->withCategorys($this->category->eagerLoad('category_description', 9));\n }",
"public function liste()\n {\n $discs = $this->LoadModel('Disc');\n $discDetail = $discs->info_record();\n $this->render('liste', [\n 'discs' => $discDetail\n ]);\n }",
"public function index(){\n return $this->model->all();\n }"
] |
[
"0.70090115",
"0.6997039",
"0.6897286",
"0.6590344",
"0.65867376",
"0.64061403",
"0.63147694",
"0.63147694",
"0.6262452",
"0.61530447",
"0.6132926",
"0.6132926",
"0.6089586",
"0.60877186",
"0.608287",
"0.6020357",
"0.6020357",
"0.6017267",
"0.6012613",
"0.5985329",
"0.5964233",
"0.59559804",
"0.595127",
"0.5948174",
"0.59467727",
"0.5932811",
"0.5932811",
"0.5914744",
"0.5913848",
"0.5902888"
] |
0.7364362
|
0
|
Creates a new Description model. If creation is successful, the browser will be redirected to the 'view' page.
|
public function actionCreate($id)
{
$model = new Description();
$model['document_id'] = $id;
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['documents/view', 'id' => $model->document_id]);
//return $this->redirect(['documents/view']);
}
return $this->render('create', [
'model' => $model,
]);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function actionCreate()\n {\n $model = new Oadode();\n $modelDescription = new DescriptionOfGoods();\n $posts = Yii::$app->request->post();\n if (!empty(Yii::$app->request->post())) {\n $posts['DescriptionOfGoods']['application_id'] = $posts['Oadode']['application_id'];\n $posts['DescriptionOfGoods']['customer_id'] = $posts['Oadode']['customer_id'];\n $posts['DescriptionOfGoods']['user_id'] = $posts['Oadode']['user_id'];\n }\n \n if ($model->load($posts) && $model->save()) {\n if ($modelDescription->load($posts) && $modelDescription->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n }\n\n return $this->render('create', [\n 'model' => $model,\n 'modelDescription' =>$modelDescription\n ]);\n }",
"public function create() {\n\t\t$model = new $this->model_class;\n\t\t$model->status = 3;\n\t\t$model->author_id = Session::get('wildfire_user_cookie');\n\t\t$model->url = time();\n\t\tif(Request::get(\"title\")) $model->title = Request::get(\"title\");\n\t\telse $model->title = \"Enter Your Title Here\";\n\t\t$this->redirect_to(\"/admin/content/edit/\".$model->save()->id.\"/\");\n\t}",
"public function actionCreate()\n {\n $model = new Content();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index']);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new Article();\n if(!empty($_GET['kind'])) $model->kind=$_GET['kind'];\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new Ddiet();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new Article();\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n\n switch ($model->category_id){\n case Article::CAT_VIDEO:\n return $this->redirect(['video']);\n break;\n case Article::CAT_SUPPORT:\n return $this->redirect(['support']);\n break;\n case Article::CAT_BLOG:\n return $this->redirect(['blog']);\n break;\n default:\n return $this->redirect(['index']);\n }\n } else {\n\n return $this->render('create', [\n 'model' => $model,\n 'categories' => ArticleCategory::find()->active()->all(),\n ]);\n }\n }",
"public function actionCreate()\n\t{\n\t\tif (isset(Yii::app()->user->isAdmin) && Yii::app()->user->isAdmin){\n\t\t\t$this->layout = \"admin\";\n\t\t}\n\t\t\n\t\t$model=new Articles;\n\t\tif(isset($_POST['Articles']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Articles'];\n\t\t\tif (isset(Yii::app()->user->isAdmin) && Yii::app()->user->isAdmin){\n\t\t\t\t$model->status = 0;\n\t\t\t}\n\t\t\t$model->user_id = Yii::app()->user->id;\n\t\t\tif($model->save())\n\t\t\t{\n\t\t\t\tif (Yii::app()->user->isAdmin){\n\t\t\t\t\t$this->redirect(array('admin')); //,'id'=>$model->id));\n\t\t\t\t}else{\n\t\t\t\t\t$this->redirect(array('list')); //,'id'=>$model->id));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t$this->render('create',array('model'=>$model));\n\t}",
"public function descriptionAction()\n {\n $module = $this->getModule();\n $config = Pi::config('', $module);\n\n if ($this->request->isPost()) {\n $data = $this->request->getPost();\n\n // Set form\n $form = new DescForm('solution-desc-form', 'html');\n $form->setInputFilter(new DescFilter);\n $form->setData($data);\n\n if ($form->isValid()) {\n $values = $form->getData();\n\n // Save\n $description = Pi::user()->data->set(0, 'solutions_description', $values['description']);\n\n } else {\n $message = _a('Invalid data, please check and re-submit.');\n }\n } else {\n $data['description'] = Pi::user()->data->get(0, 'solutions_description');\n if (empty($data['description'])) {\n $data['description'] = '<div style=\"font-size: 20px;\">Content is empty.</div>';\n }\n $form = new DescForm('solution-desc-form', 'html');\n $form->setData($data);\n $message = '';\n }\n\n $this->view()->assign('form', $form);\n $this->view()->assign('title', _a('Solutions Description'));\n $this->view()->assign('message', $message);\n $this->view()->setTemplate('solution-description');\n\n }",
"public function actionCreate()\n\t{\n\n\t\t$model=new Knowledgecatalogue;\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['Knowledgecatalogue']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Knowledgecatalogue'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->fCatalogueNo));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}",
"public function create($id = null)\n {\n $operation = 'create';\n if (is_null($id)) {\n return view(config('laravel-description-module.views.description.create'), compact('operation'));\n }\n\n $description_category = DescriptionCategory::findOrFail($id);\n return view(config('laravel-description-module.views.description.create'), compact('description_category','operation'));\n }",
"public function actionCreate(){\n $model = new MgfConceptNote();\n if ($model->load(Yii::$app->request->post()) && $model->save()) { \n Yii::$app->session->setFlash('success', 'Saved successfully.');\n return $this->redirect(['view', 'id' => $model->id]);\n }else{\n Yii::$app->session->setFlash('error', 'NOT Saved.');\n return $this->redirect(['/mgf-applicant/profile']);\n }\n }",
"public function actionCreate(){\n $model = new Category();\n// d($model);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->category_id]);\n } else {\n// d($_POST);\n return $this->render('create', ['model' => $model,]);\n }\n }",
"public function create()\n {\n\n $categories = $this->categoryModel->getCategories();\n $tags = $this->tagModel->getTags();\n\n $data = [\n 'title' =>'',\n 'slug' => '',\n 'body' => '',\n 'created_at' => '',\n 'categories' => $categories,\n 'tags' => $tags,\n 'date'=>'',\n 'image' => '',\n 'user_id' =>'',\n 'status' =>'',\n\n ];\n $this->view('articles/create', $data);\n\n\n }",
"public function actionCreate()\n {\n $model = new Category();\n $model->scenario = 'create';\n \n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new Detallecarrito();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'codProducto' => $model->codProducto, 'idCarrito' => $model->idCarrito]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function create()\n {\n $data = array();\n $data['title'] = $_POST['title'];\n $data['content'] = $_POST['content'];\n $data['time'] = $_POST['time'];\n \n $this->model->create($data);\n header('location:'. URL .'index');\n }",
"public function actionCreate()\n\t{\n\t\t//\n\t\t// if ($model->load(Yii::$app->request->post()) && $model->validate()) {\n\t\t// try {\n\t\t// $model->save();\n\t\t// Yii::$app->session->setFlash('alert', [\n\t\t// 'body' => Yii::$app->params['create-success'],\n\t\t// 'class' => 'bg-success',\n\t\t// ]);\n\t\t// } catch (\\yii\\db\\Exception $exception) {\n\t\tYii::$app->session->setFlash('alert', [\n\t\t\t'body' => Yii::$app->params['create-danger'],\n\t\t\t'class' => 'bg-danger',\n\t\t]);\n\n\t\t// }\n\t\treturn $this->redirect(['index']);\n\t\t// }\n\n\t\t// return $this->render('create', [\n\t\t// 'model' => $model,\n\t\t// ]);\n\t}",
"public function create()\n {\n return view('softwaredescs.create');\n }",
"public function add()\n {\n $course_description = new CourseDescription();\n $session_id = api_get_session_id();\n $course_description->set_session_id($session_id);\n\n $data = array();\n if (strtoupper($_SERVER['REQUEST_METHOD']) == \"POST\") {\n if (!empty($_POST['title']) && !empty($_POST['contentDescription'])) {\n if (1) {\n $title = $_POST['title'];\n $content = $_POST['contentDescription'];\n $description_type = $_POST['description_type'];\n if ($description_type >= ADD_BLOCK) {\n $course_description->set_description_type($description_type);\n $course_description->set_title($title);\n $course_description->set_content($content);\n $course_description->insert(api_get_course_int_id());\n }\n\n Display::addFlash(\n Display::return_message(\n get_lang('CourseDescriptionUpdated')\n )\n );\n }\n $this->listing(false);\n } else {\n $data['error'] = 1;\n $data['default_description_titles'] = $course_description->get_default_description_title();\n $data['default_description_title_editable'] = $course_description->get_default_description_title_editable();\n $data['default_description_icon'] = $course_description->get_default_description_icon();\n $data['question'] = $course_description->get_default_question();\n $data['information'] = $course_description->get_default_information();\n $data['description_title'] = $_POST['title'];\n $data['description_content'] = $_POST['contentDescription'];\n $data['description_type'] = $_POST['description_type'];\n $this->view->set_data($data);\n $this->view->set_layout('layout');\n $this->view->set_template('add');\n $this->view->render();\n }\n } else {\n $data['default_description_titles'] = $course_description->get_default_description_title();\n $data['default_description_title_editable'] = $course_description->get_default_description_title_editable();\n $data['default_description_icon'] = $course_description->get_default_description_icon();\n $data['question'] = $course_description->get_default_question();\n $data['information'] = $course_description->get_default_information();\n $data['description_type'] = $course_description->get_max_description_type();\n // render to the view\n $this->view->set_data($data);\n $this->view->set_layout('layout');\n $this->view->set_template('add');\n $this->view->render();\n }\n }",
"public function actionCreate()\n {\n $model = new ArticleCategory();\n $articleCategories = ArticleCategory::getCategories();\n $locales = LocaleHelper::getAvailableLocales();\n\n if ($model->load(Yii::$app->request->post(), null) && $model->save()) {\n return $this->redirect(['index']);\n }\n\n return $this->render('create', [\n 'model' => $model,\n 'categories' => $articleCategories,\n 'locales' => $locales\n ]);\n\n }",
"public function actionCreate()\n {\n $model = new RefJkel();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function actionCreate()\n {\n $model = new Post();\n\n if ($model->load(Yii::$app->request->post())) {\n $model->alias = Inflector::slug($model->title);\n $model->created_date = time();\n $model->publish_date = time();\n if($model->save()) {\n \\Yii::$app->session->setFlash('success', Module::t('general', 'Create post successfull'));\n return $this->redirect(['view', 'id' => $model->id]);\n }\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n\t{\n\t\t$model = new Post;\n\t\tif ($model->load(Yii::$app->request->post()) && $model->save())\n\t\t{\n\t\t\treturn $this->redirect(['site/index']);\n\t\t}\n\t\t\n\t\techo $this->render('create', array(\n\t\t\t'model' => $model\n\t\t));\n\t}",
"public function actionCreate()\n {\n $model = new Category();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['update', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function create(): void\n {\n\n $description = null;\n $image = null;\n $velo_id = null;\n\n if (!empty($_POST['description']) && $_POST['description'] != \"\") {\n $description = htmlspecialchars($_POST['description']);\n }\n if (!empty($_POST['image'])) {\n $image = htmlspecialchars($_POST['image']);\n }\n if (!empty($_POST['velo_id']) && ctype_digit($_POST['velo_id'])) {\n $velo_id = $_POST['velo_id'];\n }\n\n if (!$description || !$image || !$velo_id) {\n die(\"formulaire mal rempli\");\n }\n\n $this->model->insert($description, $image, $velo_id);\n\n \\Http::redirect(\"index.php?controller=velo&task=show&id=$velo_id\");\n }",
"public function actionCreate()\n {\n $model = new Url();\n\n if ($this->request->isPost) {\n if ($model->load($this->request->post()) && $model->save()) {\n return $this->redirect(['view', 'idurl' => $model->idurl]);\n }\n } else {\n $model->loadDefaultValues();\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function actionCreate()\n {\n $model = new BlogComments();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function actionCreate()\n\t{\n\t\t$model=new Comment;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Comment']))\n\t\t{\n $model->attributes=$_POST['Comment'];\n\t\t\n \n if($model->save()){\n $dataProvider=new CActiveDataProvider('Comment');\n\t\t\t$this->redirect(array('index'),array(\n 'dataProvider'=>$dataProvider,\n 'updated'=>'1',\n 'message'=>\"Comentario introducido\"\n ));\n }\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}",
"public function actionCreate() {\n $model = new TabelleRelease();\n\n if ($model->loadAll(Yii::$app->request->post())) {\n if ($model->saveAll()) {\n\n return $this->redirect(['update', 'id' => $model->id, 'mySuccess' => 2]);\n } else {\n $this->success = -1; // -1->insert Fehler\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new Course();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect('index');\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }"
] |
[
"0.7433268",
"0.6871088",
"0.68105143",
"0.670898",
"0.6687145",
"0.66647655",
"0.6550234",
"0.65500414",
"0.65337807",
"0.6521266",
"0.6513174",
"0.6511628",
"0.6503335",
"0.6501384",
"0.6466586",
"0.6458145",
"0.6431864",
"0.64296955",
"0.6421154",
"0.641741",
"0.6416731",
"0.6410454",
"0.6400115",
"0.6389746",
"0.63706774",
"0.63692427",
"0.63423955",
"0.6341077",
"0.6340784",
"0.6331635"
] |
0.7537911
|
0
|
Finds the Description model based on its primary key value. If the model is not found, a 404 HTTP exception will be thrown.
|
protected function findModel($id, $PSD_Type_Id)
{
if (($model = Description::findOne(['id' => $id, 'PSD_Type_Id' => $PSD_Type_Id])) !== null) {
return $model;
}
throw new NotFoundHttpException('The requested page does not exist.');
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function find($id){\n\t\t$db = static::getDatabaseConnection();\n\t\t//Create a select query\n\t\t$query = \"SELECT \" . implode(\",\" , static::$columns).\" FROM \" . static::$tableName . \" WHERE id = :id\";\n\t\t//prepare the query\n\t\t$statement = $db->prepare($query);\n\t\t//bind the column id with :id\n\t\t$statement->bindValue(\":id\", $id);\n\t\t//Run the query\n\t\t$statement->execute();\n\n\t\t//Put the associated row into a variable\n\t\t$record = $statement->fetch(PDO::FETCH_ASSOC);\n\n\t\t//If there is not a row in the database with that id\n\t\tif(! $record){\n\t\t\tthrow new ModelNotFoundException();\n\t\t}\n\n\t\t//put the record into the data variable\n\t\t$this->data = $record;\n\t}",
"public abstract function find($primary_key, $model);",
"public static function find( $primaryKey )\n\t{\n\t\tself::init();\n\t\t\n\t\t// Select one item by primary key in Database\n\t\t$result = Database::selectOne(\"SELECT * FROM `\" . static::$table . \"` WHERE `\" . static::$primaryKey . \"` = ?\", $primaryKey);\t\t\n\t\tif( $result == null )\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t// Create & return new object of Model\n\t\treturn self::newItem($result);\n\t}",
"public function findById() {\n // TODO: Implement findById() method.\n }",
"public function returnDetailFindByPK($id);",
"protected function findModel($id)\n {\n if (($model = Offer::findOne($id)) !== null) {\n return $model;\n } else {\n throw new HttpException(404, 'The requested page does not exist.');\n }\n }",
"protected function findModel($id)\n {\n if (($model = Menu::findOne([ 'id' => $id ])) !== null)\n {\n return $model;\n }\n else\n {\n throw new HttpException(404, Yii::t('backend', 'The requested page does not exist.'));\n }\n }",
"protected function findModel($id)\n\t{\n\t\tif (($model = Trailer::findOne($id)) !== null) {\n\t\t\treturn $model;\n\t\t} else {\n\t\t\tthrow new HttpException(404, 'The requested page does not exist.');\n\t\t}\n\t}",
"function find($id)\n{\n\t$model = $this->newModel(null);\n\treturn $model->find($id);\n}",
"protected function findModel($id)\n {\n if (($model = JackpotDetails::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }",
"protected function findModel($id)\n {\n if (($model = Picture::findOne($id)) !== null) {\n return $model;\n } else {\n throw new HttpException(404, \\Yii::t('The requested object does not exist or has been already deleted.'));\n }\n }",
"protected function findModel($id)\n {\n if (($model = WorksystemContentinfo::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }",
"protected function findModel($id)\n {\n if (($model = Catalog2::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }",
"public function loadModel($id)\n\t{\n\t\t$model=Knowledgecatalogue::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Information::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n {\n if (($model = Reviews::model()->findByPk($id)) === null) {\n throw new CHttpException(\n 404,\n Yii::t($this->aliasModule, 'Requested page was not found!')\n );\n }\n \n return $model;\n }",
"public function find($id)\n\t{\n\t\treturn $this->model->where(\"id\", \"=\", $id)->first();\n\t}",
"protected function findModel($id)\n {\n if (($model = CatalogDocument::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException(Yii::t('catalog', 'The requested page does not exist.'));\n }",
"public function find($model, $id);",
"public function find($primary)\n {\n if (isset($this->models[$primary])) {\n return $this->models[$primary];\n }\n\n return;\n }",
"public function loadModel($id)\n\t{\n\t\t$model=CerDoc::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"protected function findModel($id)\n {\n\t\t$p = $this->primaryModel;\n if (($model = $p::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }",
"public function loadModel($id)\n\t{\n\t\t$model=Basic_definition::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"protected function findModel($id) {\n if (($model = Configuration::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }",
"public function find($id){\n return $this->model->query()->findOrFail($id);\n }",
"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 }",
"protected function findModel($id)\n {\n if (($model = Addetails::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }",
"function findkey()\n\t{\n\t\t// Initialize variables\n\t\t$db = & JFactory::getDBO();\n\t\t$keyref = JRequest::getVar( 'keyref', null, 'default', 'cmd' );\n\t\tJRequest::setVar( 'keyref', $keyref );\n\n\t\t// If no keyref left, throw 404\n\t\tif ( empty( $keyref ) === true )\n\t\t{\n\t\t\tJError::raiseError( 404, JText::_( \"Key Not Found\" ) );\n\t\t}\n\n\t\t$keyref = $db->Quote( '%keyref=' . $db->getEscaped( $keyref, true ) . '%', false );\n\t\t$query = 'SELECT id' .\n\t\t\t\t\t\t' FROM #__content' .\n\t\t\t\t\t\t' WHERE attribs LIKE ' . $keyref;\n\t\t$db->setQuery( $query );\n\t\t$id = (int) $db->loadResult();\n\n\t\tif ( $id > 0 )\n\t\t{\n\t\t\t// Create the view\n\t\t\t$view = & $this->getView( 'article', 'html' );\n\n\t\t\t// Get/Create the model\n\t\t\t$model = & $this->getModel( 'Article' );\n\n\t\t\t// Set the id of the article to display\n\t\t\t$model->setId( $id );\n\n\t\t\t// Push the model into the view (as default)\n\t\t\t$view->setModel( $model, true );\n\n\t\t\t// Display the view\n\t\t\t$view->display();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tJError::raiseError( 404, JText::_( 'Key Not Found' ) );\n\t\t}\n\n\t}",
"protected function findModel($idurl)\n {\n if (($model = Url::findOne($idurl)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }",
"protected function findModel($id)\n\t{\n if (($model = CoreSettings::findOne($id)) !== null) {\n return $model;\n }\n\n\t\tthrow new \\yii\\web\\NotFoundHttpException(Yii::t('app', 'The requested page does not exist.'));\n\t}"
] |
[
"0.658229",
"0.63709015",
"0.62728024",
"0.6266193",
"0.6265787",
"0.61703366",
"0.60990906",
"0.60218537",
"0.60062784",
"0.5987006",
"0.59716517",
"0.5964488",
"0.59459615",
"0.58995694",
"0.58664155",
"0.5835307",
"0.5834684",
"0.58264565",
"0.5825656",
"0.58187425",
"0.5802366",
"0.5795073",
"0.5789564",
"0.57789797",
"0.57743806",
"0.57700574",
"0.57651055",
"0.576042",
"0.57568246",
"0.57549417"
] |
0.66298854
|
0
|
Reads up to $length bytes from the socket
|
public function read($length)
{
$this->checkClosed();
$buffer = '';
while (\mb_strlen($buffer, '8BIT') < $length) {
$result = \socket_read($this->socket, $length - mb_strlen($buffer, '8BIT'));
if (false === $result) {
$this->throwException();
}
$buffer .= $result;
}
return $buffer;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"protected function _read($length) {\n $data = false;\n if (!feof($this->_socket)) {\n $data = fread($this->_socket, $length);\n }\n return $data;\n }",
"public function readBytes($length) {}",
"public function read($length) {\n\n $readArray = array($this->client);\n $writeArray = array();\n $errorArray = array();\n $count = swoole_client_select($readArray, $writeArray, $errorArray, 1);\n foreach($readArray as $client) {\n $data = $client->recv($length);\n }\n $dataArray = unpack(\"N\", $data);\n $length = $dataArray[1];\n $data = $length . substr($data, -$length);\n return $data;\n }",
"public function read($length);",
"public function read($length);",
"public function read($length);",
"public function read($length)\n {\n }",
"function Read($length=1) \r\n{ \r\nif(intval($length) <= 0) \r\n{ \r\n$this->LastError = \"Cannot read zero or less bytes\"; \r\nreturn null; \r\n} \r\n//** no connection is available to read from, no data can be read. \r\n\r\nelse if(!$this->isOpen()) \r\n{ \r\n$this->LastError = \"No connection available for reading\"; \r\nreturn null; \r\n} \r\nelse //** a valid connection identifier is available. \r\n{ \r\n$this->_SetTimeout(); //** ensure timeout is set. \r\nreturn fread($this->Socket, $length); //** attempt to read n-bytes. \r\n} \r\n}",
"public function read(int $length = 2048): string\n {\n $output = '';\n\n if (!is_resource($this->socket)) {\n Bolt::error('Not initialized socket');\n return $output;\n }\n\n do {\n $readed = socket_read($this->socket, $length - mb_strlen($output, '8bit'), PHP_BINARY_READ);\n if ($readed === false) {\n $code = socket_last_error($this->socket);\n Bolt::error(socket_strerror($code), $code);\n } else {\n $output .= $readed;\n }\n } while (mb_strlen($output, '8bit') < $length);\n\n if (Bolt::$debug)\n $this->printHex($output, false);\n\n return $output;\n }",
"private function fread($length) {\n\t\t$data = fread($this->stream, $length);\n\t\t$this->contentIndex += strlen($data);\n\t\t$this->checkReadTimeout();\n\n\t\treturn $data;\n\t}",
"public function read($len) {\n if (strlen($this->rbuffer_) > 0) {\n $ret = substr($this->rbuffer_, 0, $len);\n $this->rbuffer_ = substr($this->rbuffer_, $len);\n return $ret;\n }\n\n $data = $this->transport_->readAll(4);\n $array = unpack('Nlength', $data);\n $length = $array['length'];\n\n $this->rbuffer_ = $this->transport_->readAll($length);\n $ret = substr($this->rbuffer_, 0, $len);\n $this->rbuffer_ = substr($this->rbuffer_, $len);\n return $ret;\n }",
"private function readData($length) {\n $result = '';\n while ($length > 0) {\n $bytesToRead = self::CHUNK_SIZE < $length\n ? self::CHUNK_SIZE : $length\n ;\n $result .= socket_read($this->communicationSocket, $bytesToRead);\n $length -= self::CHUNK_SIZE;\n }\n\n return $result;\n }",
"public function read($length) {\n $this->waitForData();\n return $this->readData($length);\n }",
"public function pipe($length)\n {\n $data = $this->connection->read($length);\n $this->buffer .= $data;\n\n return strlen($data);\n }",
"public function stream_read(int $length)\n\t{\n\t\treturn fread($this->tempHandle, $length);\n\t}",
"public function read($length)\n {\n return fread($this->stream, $length);\n }",
"public function read($length, $untilDataEnough = true)\n {\n $data = $this->peek($length, $untilDataEnough);\n\n if($data) {\n $this->buffer = substr($this->buffer, strlen($data));\n }\n\n return $data;\n }",
"public function read($start = 0, $length) {}",
"public function readBytes($length, $pos = null) {}",
"public function readBytes($length, $pos = null) {}",
"public function read($length)\n {\n return $this->fread($length);\n }",
"public function readSocket()\n {\n $output = socket_read($this->socket, 2048);\n\n echo $output;\n socket_close($this->socket);\n }",
"public function baseRead($socket)\n {\n while($buffer = fread($socket, self::READ_BUFFER_SIZE))\n {\n $this->_recvBuffer .= $buffer; \n }\n \n if($this->_recvBuffer)\n {\n if(!$this->onMessage)\n {\n return ;\n }\n \n // protocol has been set\n if($this->protocol)\n {\n $parser = $this->protocol;\n while($this->_recvBuffer)\n {\n // already know current package length \n if($this->_currentPackageLength)\n {\n // we need more buffer\n if($this->_currentPackageLength > strlen($this->_recvBuffer))\n {\n break;\n }\n }\n else\n {\n // try to get the current package length\n $this->_currentPackageLength = $parser::input($this->_recvBuffer, $this);\n // need more buffer\n if($this->_currentPackageLength === 0)\n {\n break;\n }\n elseif($this->_currentPackageLength > 0 && $this->_currentPackageLength <= self::$maxPackageSize)\n {\n // need more buffer\n if($this->_currentPackageLength > strlen($this->_recvBuffer))\n {\n break;\n }\n }\n // error package\n else\n {\n $this->close('error package. package_length='.var_export($this->_currentPackageLength, true));\n }\n }\n \n // recvived the whole data \n self::$statistics['total_request']++;\n $one_request_buffer = substr($this->_recvBuffer, 0, $this->_currentPackageLength);\n $this->_recvBuffer = substr($this->_recvBuffer, $this->_currentPackageLength);\n $this->_currentPackageLength = 0;\n try\n {\n call_user_func($this->onMessage, $this, $parser::decode($one_request_buffer, $this));\n }\n catch(Exception $e)\n {\n self::$statistics['throw_exception']++;\n echo $e;\n }\n }\n if($this->_status !== self::STATUS_CLOSED && feof($socket))\n {\n $this->destroy();\n return;\n }\n return;\n }\n self::$statistics['total_request']++;\n // protocol not set\n try \n {\n call_user_func($this->onMessage, $this, $this->_recvBuffer);\n }\n catch(Exception $e)\n {\n self::$statistics['throw_exception']++;\n echo $e;\n }\n $this->_recvBuffer = '';\n if($this->_status !== self::STATUS_CLOSED && feof($socket))\n {\n $this->destroy();\n return;\n }\n }\n else if(feof($socket))\n {\n $this->destroy();\n return;\n }\n }",
"public function readBytes($length, $pos = null);",
"function read(int $length): string {\n $size = $this->getSize();\n if($size < $length) {\n throw new \\OverflowException('Trying to read behind buffer, requested '.$length.' bytes, only got '.$size.' bytes');\n }\n \n $str = \\substr($this->buffer, 0, $length);\n $this->buffer = \\substr($this->buffer, $length);\n \n return $str;\n }",
"public function readLine($length = 1024) {}",
"public function readLine($length = 1024);",
"public function read($length) {\n\t\tif (! $this->readable) {\n\t\t\tthrow new RuntimeException(\"Stream is not readable\");\n\t\t}\n\t\treturn fread($this->handle, $length);\n\t}",
"public function read($count)\n {\n return fread($this->socket, $count);\n }",
"public function readBlocking($len)\n {\n if ($len > self::READ_MAX_LENGTH) {\n throw new \\Kafka\\Exception('Invalid length given, it should be lesser than or equals to ' . self:: READ_MAX_LENGTH);\n }\n\n $null = null;\n $read = [$this->stream];\n $readable = $this->select($read, $this->recvTimeoutSec, $this->recvTimeoutUsec);\n if ($readable === false) {\n $this->close();\n throw new \\Kafka\\Exception('Could not read ' . $len . ' bytes from stream (not readable)');\n }\n if ($readable === 0) { // select timeout\n $res = $this->getMetaData();\n $this->close();\n if (! empty($res['timed_out'])) {\n throw new \\Kafka\\Exception('Timed out reading ' . $len . ' bytes from stream');\n } else {\n throw new \\Kafka\\Exception('Could not read ' . $len . ' bytes from stream (not readable)');\n }\n }\n\n $remainingBytes = $len;\n $data = $chunk = '';\n while ($remainingBytes > 0) {\n $chunk = fread($this->stream, $remainingBytes);\n if ($chunk === false || strlen($chunk) === 0) {\n // Zero bytes because of EOF?\n if (feof($this->stream)) {\n $this->close();\n throw new \\Kafka\\Exception('Unexpected EOF while reading ' . $len . ' bytes from stream (no data)');\n }\n // Otherwise wait for bytes\n $readable = $this->select($read, $this->recvTimeoutSec, $this->recvTimeoutUsec);\n if ($readable !== 1) {\n throw new \\Kafka\\Exception('Timed out while reading ' . $len . ' bytes from socket, ' . $remainingBytes . ' bytes are still needed');\n }\n continue; // attempt another read\n }\n $data .= $chunk;\n $remainingBytes -= strlen($chunk);\n }\n return $data;\n }"
] |
[
"0.7984958",
"0.77911794",
"0.77310944",
"0.7719773",
"0.7719773",
"0.7719773",
"0.7476275",
"0.7390496",
"0.7373764",
"0.72505784",
"0.7250164",
"0.7219543",
"0.7185529",
"0.7082907",
"0.69429016",
"0.68879724",
"0.67739826",
"0.6772535",
"0.6731308",
"0.6731308",
"0.6726359",
"0.6700831",
"0.66864157",
"0.66417575",
"0.65736973",
"0.6551063",
"0.6521218",
"0.650404",
"0.63523126",
"0.63485026"
] |
0.7827217
|
1
|
Get info box links
|
public function getInfoBoxLinks(): array
{
return $this->infoBoxLinks;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function getInfoLinks()\n {\n $links = array();\n\t\t\n\t\t$modulevars = ModUtil::getVar('Mediasharex');\n\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'info'),\n 'text' => $this->__('Status'),\n 'class' => 'z-icon-es-confi');\n }\n\t\t\n return $links;\n }",
"public function getlinks()\n {\n $links = array();\n if (UserUtil::isLoggedIn()) {\n $links[] = array(\n 'url' => ModUtil::url('InterCom', 'user', 'inbox'),\n 'text' => $this->__('Inbox'),\n 'class' => 'z-icon-es-inbox'\n );\n $links[] = array(\n 'url' => ModUtil::url('InterCom', 'user', 'outbox'),\n 'text' => $this->__('Outbox'),\n 'class' => 'z-icon-es-outbox'\n );\n $links[] = array(\n 'url' => ModUtil::url('InterCom', 'user', 'archive'),\n 'text' => $this->__('Archive'),\n 'class' => 'z-icon-es-gears'\n );\n if ($this->getVar('messages_allow_emailnotification')|| $this->getVar('messages_allow_autoreply')) {\n $links[] = array(\n 'url' => ModUtil::url('InterCom', 'user', 'settings'),\n 'text' => $this->__('Settings'),\n 'class' => 'z-icon-es-config'\n );\n }\n $links[] = array(\n 'url' => ModUtil::url('InterCom', 'user', 'newpm'),\n 'text' => $this->__('New message'),\n 'class' => 'z-icon-es-new'\n );\n }\n return $links;\n }",
"public function getlinks()\n {\n $links = array();\n\n if (SecurityUtil::checkPermission($this->name . '::', '::', ACCESS_READ)) {\n $links[] = array('url' => ModUtil::url($this->name, 'user', 'hooks'),\n 'text' => $this->__('Frontend'),\n 'title' => $this->__('Switch to user area.'),\n 'class' => 'z-icon-es-home');\n }\n if (SecurityUtil::checkPermission($this->name . ':Twitterparm:', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'view', array('ot' => 'twitterparm')),\n 'text' => $this->__('Twitterparms'),\n 'title' => $this->__('Twitterparm list'));\n }\n\n return $links;\n }",
"function links() {\n return array(\n\n );\n }",
"protected function getInfoLink()\n {\n return Injector::inst()->create(\n GridFieldHtmlFragment::class,\n 'buttons-before-right',\n DBField::create_field('HTMLFragment', ArrayData::create([\n 'Link' => 'https://userhelp.silverstripe.org/en/4/optional_features/modules_report',\n 'Label' => _t(__CLASS__ . '.MORE_INFORMATION', 'More information'),\n ])->renderWith(__CLASS__ . '/MoreInformationLink'))\n );\n }",
"public function getlinks()\n {\n $links = array();\n\n if (SecurityUtil::checkPermission('SysInfo::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url('SysInfo', 'admin', 'main'), 'text' => $this->__('System summary'));\n }\n if (SecurityUtil::checkPermission('SysInfo::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url('SysInfo', 'admin', 'phpinfo', array('info' => 4)), 'text' => $this->__('PHP configuration'));\n }\n if (SecurityUtil::checkPermission('SysInfo::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url('SysInfo', 'admin', 'phpinfo', array('info' => 8)), 'text' => $this->__('PHP modules'));\n }\n if (SecurityUtil::checkPermission('SysInfo::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url('SysInfo', 'admin', 'phpinfo', array('info' => 16)), 'text' => $this->__('Server environment'));\n }\n if (SecurityUtil::checkPermission('SysInfo::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url('SysInfo', 'admin', 'phpinfo', array('info' => 32)), 'text' => $this->__('PHP variables'));\n }\n if (SecurityUtil::checkPermission('SysInfo::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url('SysInfo', 'admin', 'extensions'), 'text' => $this->__('Zikula extensions'));\n }\n if (SecurityUtil::checkPermission('SysInfo::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url('SysInfo', 'admin', 'filesystem'), 'text' => $this->__('Zikula file system'));\n }\n if (SecurityUtil::checkPermission('SysInfo::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url('SysInfo', 'admin', 'ztemp'), 'text' => $this->__('Zikula ztemp directory'));\n }\n\n return $links;\n }",
"public function links() {\n\t\t?>\n\t\t<ul>\n\t\t\t<li>\n\t\t\t\t<a href=\"http://bit.ly/15uoww1\" target=\"_blank\"><?php echo __( 'Installation manual', $this->_google_drive_cdn->get_textdomain() ); ?></a>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<a href=\"http://bit.ly/W9GDQT\" target=\"_blank\"><?php echo __( 'Frequently Asked Questions', $this->_google_drive_cdn->get_textdomain() ); ?></a>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<a href=\"http://bit.ly/WW93Sk\" target=\"_blank\"><?php echo __( 'Report a bug', $this->_google_drive_cdn->get_textdomain() ); ?></a>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<a href=\"http://bit.ly/11UE2lF\" target=\"_blank\"><?php echo __( 'Request a function', $this->_google_drive_cdn->get_textdomain() ); ?></a>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<a href=\"http://bit.ly/XkivOW\" target=\"_blank\"><?php echo __( 'Submit a translation', $this->_google_drive_cdn->get_textdomain() ); ?></a>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<a href=\"http://bit.ly/UlDG4t\" target=\"_blank\"><?php echo __( 'More cool stuff by WPBuddy', $this->_google_drive_cdn->get_textdomain() ); ?></a>\n\t\t\t</li>\n\t\t</ul>\n\t<?php\n\t}",
"function thd_re_info_show_box() {\n\tthd_meta_box_callback(thd_re_meta_box_fields(), 'page');\n}",
"function popuplinks($text)\n {\n }",
"function links_popup_script($text = 'Links', $width = 400, $height = 400, $file = 'links.all.php', $count = \\true)\n {\n }",
"public function getLinks()\n {\n $links = array();\n \n if (SecurityUtil::checkPermission('Ztools::', '::', ACCESS_READ)) {\n $links[] = array(\n 'url' => ModUtil::url($this->name, 'admin', 'displaysysinfo'),\n 'text' => $this->__('Server'),\n 'class' => 'z-icon-es-info');\n }\n if (SecurityUtil::checkPermission('Ztools::', '::', ACCESS_OVERVIEW)) {\n $links[] = array(\n 'url' => ModUtil::url($this->name, 'admin', 'displaybrowserinfo'),\n 'text' => $this->__('Client'),\n 'class' => 'z-icon-es-info');\n }\n if (SecurityUtil::checkPermission('Ztools::', '::', ACCESS_EDIT)) {\n $links[] = array(\n 'url' => ModUtil::url($this->name, 'admin', 'backupdb'),\n 'text' => $this->__('Backup'),\n 'class' => 'z-icon-es-export');\n }\n if (SecurityUtil::checkPermission('Ztools::', '::', ACCESS_ADMIN)) {\n $links[] = array(\n 'url' => ModUtil::url($this->name, 'admin', 'scripts'),\n 'text' => $this->__('Scripts'),\n 'class' => 'z-icon-es-gears');\n }\n if (SecurityUtil::checkPermission('Ztools::', '::', ACCESS_ADMIN)) {\n $links[] = array(\n 'url' => ModUtil::url('Zfiler', 'admin', 'filer'),\n 'text' => $this->__('Filer'),\n 'class' => 'z-icon-es-folder');\n }\n if (SecurityUtil::checkPermission('Ztools::', '::', ACCESS_ADMIN)) {\n $links[] = array(\n 'url' => ModUtil::url($this->name, 'admin', 'modifyconfig'),\n 'text' => $this->__('Settings'),\n 'class' => 'z-icon-es-config');\n }\n if (SecurityUtil::checkPermission('Ztools::', '::', ACCESS_ADMIN)) {\n $links[] = array(\n 'url' => 'https://github.com/nmpetkov/Ztools/wiki',\n 'text' => $this->__('Wiki'),\n 'class' => 'z-icon-es-help');\n }\n\n return $links;\n }",
"public function get_links()\n {\n }",
"function getAllAddOnTools(){\n\t $url = urlize();\n\t $url = substr($url,0,strpos($url,'index.php'));\n\t $url .= 'jukebox/jukeboxes/junctionbox/?id=';\n\t return ' - <a href=\"'.htmlentities($url).'\" target=\"_BLANK\"> [Click to open]</a>';\n\t}",
"public function getLink();",
"public function getLink();",
"public function links()\n\t{\n\t\techo view('sketchpad::help/output/links');\n\t}",
"public function getLinkInfo()\n {\n return array(\n 'PageURL' => $this->curlInfo['url'],\n 'page_title' => $this->getPageTitle(),\n 'description' => trim((isset($this->collected['metaData']['description'])) ? $this->collected['metaData']['description'] : Standards::$default),\n 'content_language' => $this->getLanguage(),\n 'external_links' => $this->countLinks('external'),\n 'internal_links' => $this->countLinks('internal'),\n 'no_follow_links' => $this->countLinks('no-follow'),\n 'follow_links' => ($this->countLinks('external') + $this->countLinks('internal') - $this->countLinks('no-follow')),\n 'h1' => $this->collected['headingsCount']['h1'],\n 'h2' => $this->collected['headingsCount']['h2'],\n 'h3' => $this->collected['headingsCount']['h3'],\n 'h4' => $this->collected['headingsCount']['h4'],\n 'h5' => $this->collected['headingsCount']['h5'],\n 'h6' => $this->collected['headingsCount']['h6'],\n 'http_code' => $this->curlInfo['http_code'],\n 'charset' => $this->getCharset(),\n 'server_config' => implode(';', $this->getServerConfig()),\n\n // fetched by others:\n # 'load_time' => Standards::$default,\n # 'page_weight' => Standards::$default,\n # 'indexed_bing' => Standards::$default,\n # 'indexed_google' => Standards::$default,\n );\n }",
"function link_xfn_meta_box($link)\n {\n }",
"public function more(){\n $url = \"https://faucetbox.com/en/list/{$this->site_settings['currency']}\"; \n //set good browser agent\n ini_set('user_agent', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071025 Firefox/2.0.0.9');\n //load external faucet page - convert links and add referral addy\n $page = \\Web::instance()->request( $url );\n $xml = load_simplexml_page($page['body'] , 'html');\n if($xml){\n $faucets = [];\n foreach($xml->xpath(\"//a[contains(@href , '?url=')]\") as $faucet){\n parse_str(parse_url($faucet['href'] , PHP_URL_QUERY) , $parts);\n $faucets[] = [\n trim((string)$faucet) , //link text\n \"{$parts['url']}?r={$this->fw->get('COOKIE.r')}\"\n ];\n }//end - get faucet links\n $this->fw->set('faucets' , $faucets);\n }else{\n $this->fw->set('SESSION.flash' , ['type' => 'warning' , 'message' => 'Sorry...Unable to load faucets']);\n }\n }",
"function get_infobox($atts){\n\t// use each slug to search for an infobox, if match push content into $boxes\n\t// return a random selection\n\tglobal $all_infoboxes;\n\t$boxes = array();\n\tif (!empty($atts)) {\n\t\t$atts = is_array($atts) ? $atts : array($atts);\n\t\tforeach($atts as $slug){\n\t\t\tif(isset($all_infoboxes[$slug])){\n\t\t\t\t$boxes[] = $all_infoboxes[$slug];\n\t\t\t}\n\t\t}\n\t}\n\tif(count($boxes) > 0) return $boxes[array_rand($boxes)];\n\telse return $all_infoboxes[array_rand($all_infoboxes)]; // pick one from all at random\n}",
"public function getLink() {}",
"function link_categories_meta_box($link)\n {\n }",
"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 link_advanced_meta_box($link)\n {\n }",
"function link_target_meta_box($link)\n {\n }",
"function getInfo() {\n return array(\n 'author' => 'Sam Wilson',\n 'email' => '[email protected]',\n 'date' => '2012-03-10',\n 'name' => 'Proofread Page',\n 'desc' => 'View images side-by-side with pages, for viewing and editing.',\n 'url' => 'http://www.dokuwiki.org/plugin:proofreadpage',\n );\n }",
"public function printResultSectionLinks() {}",
"function link_meta_box() {\n add_meta_box(\n 'global-notice',\n __( 'Link', 'sitepoint' ),\n 'link_meta_box_callback',\n 'projects',\n 'side',\n 'low'\n );\n}",
"public function getlinks($args)\n {\n $links = array();\n if (SecurityUtil::checkPermission('IWmain::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url('IWmain', 'admin', 'conf'), 'text' => $this->__('Configure parameters'), 'id' => 'iwmain_conf', 'class' => 'z-icon-es-config');\n $links[] = array('url' => ModUtil::url('IWmain', 'admin', 'main2'), 'text' => $this->__('Programmed sequences information'), 'id' => 'iwmain_crone', 'class' => 'z-icon-es-gears');\n }\n return $links;\n }",
"public function getMoreInfoUrls()\n {\n return $this->more_info_urls;\n }"
] |
[
"0.70678055",
"0.63040435",
"0.62986875",
"0.62572926",
"0.6247154",
"0.6224018",
"0.6160695",
"0.60526663",
"0.6035727",
"0.5989982",
"0.5966752",
"0.5943227",
"0.59385127",
"0.59358466",
"0.59358466",
"0.5913795",
"0.5863666",
"0.5793611",
"0.5783598",
"0.57747376",
"0.57680184",
"0.5759788",
"0.57521427",
"0.5750959",
"0.5741819",
"0.57411",
"0.5740435",
"0.57391995",
"0.5738441",
"0.573698"
] |
0.7830577
|
0
|
supplier vs item data table
|
function suppliers_x_items_table($guid){
$aColumns = array( 'guid','i_name','i_name','i_code','quty','cost','price','mrp','active_status','active_status','i_guid','guid' );
$start = "";
$end="";
if ( $this->input->get_post('iDisplayLength') != '-1' ) {
$start = $this->input->get_post('iDisplayStart');
$end= $this->input->get_post('iDisplayLength');
}
$order="";
if ( isset( $_GET['iSortCol_0'] ) )
{
for ( $i=0 ; $i<intval($this->input->get_post('iSortingCols') ) ; $i++ )
{
if ( $_GET[ 'bSortable_'.intval($this->input->get_post('iSortCol_'.$i)) ] == "true" )
{
$order.= $aColumns[ intval( $this->input->get_post('iSortCol_'.$i) ) ]." ".$this->input->get_post('sSortDir_'.$i ) .",";
}
}
$order = substr_replace( $order, "", -1 );
}
$like = array();
if ( $_GET['sSearch'] != "" )
{
$like =array('items.name'=> $this->input->get_post('sSearch'),
);
}
$this->load->model('supplier') ;
$rResult1 = $this->supplier->supplier_vs_items($end,$start,$like,$this->session->userdata['branch_id'],$guid);
$iFilteredTotal =$this->supplier->supplier_vs_items_count($this->session->userdata['branch_id'],$guid);
$iTotal =$this->supplier->supplier_vs_items_count($this->session->userdata['branch_id'],$guid);
$output1 = array(
"sEcho" => intval($_GET['sEcho']),
"iTotalRecords" => $iTotal,
"iTotalDisplayRecords" => $iFilteredTotal,
"aaData" => array()
);
foreach ($rResult1 as $aRow )
{
$row = array();
for ( $i=0 ; $i<count($aColumns) ; $i++ )
{
if ( $aColumns[$i] == "id" )
{
$row[] = ($aRow[ $aColumns[$i] ]=="0") ? '-' : $aRow[ $aColumns[$i] ];
}
else if ( $aColumns[$i] != ' ' )
{
/* General output */
$row[] = $aRow[$aColumns[$i]];
}
}
$output1['aaData'][] = $row;
}
echo json_encode($output1);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"function get_supplier_manage_table_data_rows($suppliers,$controller)\n{\n\t$CI =& get_instance();\n\t$table_data_rows='';\n\t\n\tforeach($suppliers->result() as $supplier)\n\t{\n\t\t$table_data_rows.=get_supplier_data_row($supplier,$controller);\n\t}\n\t\n\tif($suppliers->num_rows()==0)\n\t{\n\t\t$table_data_rows.=\"<tr><td colspan='7'><div class='warning_message' style='padding:7px;'>\".$CI->lang->line('common_no_persons_to_display').\"</div></tr></tr>\";\n\t}\n\t\n\treturn $table_data_rows;\n}",
"public function getAllSuppliersToDataTables();",
"function get_supplier_manage_table_data_rows($suppliers,$controller)\n{\n\t$CI =& get_instance();\n\t$table_data_rows='';\n\n\tforeach($suppliers->result() as $supplier)\n\t{\n\t\t$table_data_rows.=get_supplier_data_row($supplier,$controller);\n\t}\n\n\tif($suppliers->num_rows()==0)\n\t{\n\t\t$table_data_rows.=\"<tr><td colspan='7'><div class='warning_message' style='padding:7px;'>\".$CI->lang->line('common_no_persons_to_display').\"</div></tr></tr>\";\n\t}\n\n\treturn $table_data_rows;\n}",
"function get_supplier_manage_table($suppliers,$controller)\n{\n\t$CI =& get_instance();\n\t$table='<table class=\"tablesorter\" id=\"sortable_table\">';\n\t\n\t$headers = array('<input type=\"checkbox\" id=\"select_all\" />',\n\t$CI->lang->line('suppliers_company_name'),\n\t$CI->lang->line('common_last_name'),\n\t$CI->lang->line('common_first_name'),\n\t$CI->lang->line('common_phone_number'),\n\t$CI->lang->line('common_commision_value'),\n\t$CI->lang->line('common_commision_type'),\n\t' ');\n\t\n\t$table.='<thead><tr>';\n\tforeach($headers as $header)\n\t{\n\t\t$table.=\"<th>$header</th>\";\n\t}\n\t$table.='</tr></thead><tbody>';\n\t$table.=get_supplier_manage_table_data_rows($suppliers,$controller);\n\t$table.='</tbody></table>';\n\treturn $table;\n}",
"public function getSupplierData(){\n\n\t\t$supperDataSQL = \"select * FROM\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\tSELECT *,\n\t\t\t\t\t\t\t(SELECT COUNT(inward_id) FROM inward AS inw WHERE inw.legal_entity_id=l.legal_entity_id) AS 'TotalGRN'\n\t\t\t\t\t\t\tFROM legal_entities AS l\n\t\t\t\t\t\t\tWHERE legal_entity_type_id='1002' AND is_posted=0\n\t\t\t\t\t\t) AS innertbl WHERE TotalGRN>0\";\n\n\t\t$supperData = DB::select(DB::raw($supperDataSQL));\n\n\t\t/*$supperData = DB::table('legal_entities_live')\n\t\t\t\t\t->where(\"legal_entity_type_id\",\"=\",\"1002\")\n\t\t\t\t\t->where('is_posted', '=', '0')\n\t\t\t\t\t->get();*/\n\n\t\treturn $supperData;\n\n\t}",
"function get_supplier_manage_table($suppliers,$controller)\n{\n\t$CI =& get_instance();\n\t$table='<table class=\"tablesorter\" id=\"sortable_table\">';\n\n\t$headers = array('<input type=\"checkbox\" id=\"select_all\" />',\n\t$CI->lang->line('suppliers_company_name'),\n\t$CI->lang->line('common_last_name'),\n\t$CI->lang->line('common_first_name'),\n\t$CI->lang->line('common_email'),\n\t$CI->lang->line('common_phone_number'),\n\t' ');\n\n\t$table.='<thead><tr>';\n\tforeach($headers as $header)\n\t{\n\t\t$table.=\"<th>$header</th>\";\n\t}\n\t$table.='</tr></thead><tbody>';\n\t$table.=get_supplier_manage_table_data_rows($suppliers,$controller);\n\t$table.='</tbody></table>';\n\treturn $table;\n}",
"public function supplierdata($supplier_id)\n {\n $supplierdata = $this->Dbmodel->get_supplier_data($supplier_id); \n return $supplierdata;\n }",
"public function detail($id,$supplier){\n\t\tif(!empty($id)){\n\t\t\treturn Product::select(\n\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\tDB::raw(\"check_coupon(pro_product.id,pro_product.cid_cate,1) AS discountcoupon\"),\n\t\t\t\t\t\t\t\tDB::raw(\"check_coupon(pro_product.id,pro_product.cid_cate,2) AS coupons\"),\n\t\t\t\t\t\t\t\tDB::raw(\"get_review(pro_product.id,1) AS rating\"),\n\t\t\t\t\t\t\t \tDB::raw(\"get_review(pro_product.id,2) AS countrating\"),\n\t\t\t\t\t\t\t \tDB::raw(\"get_price(pro_supplier_product.id,pro_supplier_product.discount) AS discount\"),\n\t\t\t\t\t\t\t \tDB::raw(\"get_sale_price(pro_supplier_product.id,pro_supplier_product.saleprice) AS saleprice\"),\n\n\t\t\t\t\t\t\t\t\"pro_product.id AS myid\",\n\t\t\t\t\t\t\t\t\"pro_product.code\",\"pro_product.sap_code\",\n\t\t\t\t\t\t\t\t\"pro_product.name\",\"pro_product.cid_series\",\n\t\t\t\t\t\t\t\t\"pro_product.cid_cate\",\"pro_supplier_product.id AS cid_res\"\n\t\t\t\t\t\t\t \t\t,\"pro_product.isprice\"\t\n\t\t\t\t\t\t\t \t\t,\"pro_supplier_product.stock_num\"\n\t\t\t\t\t\t\t \t\t\n\t\t\t\t\t\t\t \t\t\n\t\t\t\t\t\t\t \t\t,\"m.name AS name_supplier\"\n\t\t\t\t\t\t\t\t,\"pro_supplier_product.id AS cid_res\",\"pro_supplier_product.cid_supplier\"\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t\t->whereRaw(\"pro_product.id={$id} AND pro_supplier_product.cid_supplier={$supplier} AND pro_supplier_product.status='1' AND pro_product.status='1' AND pro_product.is_status_cate='1' AND pro_product.is_status_series='1' \")\n\t\t\t\t\t\t\n\t\t\t\t\t\t->join(\"pro_supplier_product\",function($join){\n\t\t\t\t\t\t\t$join->on(\"pro_product.id\",\"=\",\"pro_supplier_product.cid_product\");\n\t\t\t\t\t\t})\n\t\t\t\t\t\t->join(\"market_supplier AS m\",function($join){\n\t\t\t\t\t\t\t$join->on(\"m.id\",\"=\",\"pro_supplier_product.cid_supplier\");\n\t\t\t\t\t\t})\n\t\t\t\t\t\t->orderBy(\"pro_supplier_product.date_mod\",\"DESC\")\n\t\t\t\t\t\t->first()->toJson();\n\t\t}\n\t}",
"public function index($supplier){\n $data=Supplier::where('name',$supplier)->first();\n if(!$data){\n return $this->error404();\n }\n $categories=ProductCategory::where('supplier_id',$data->id)->get();\n $this->data['supplier']=$data;\n $this->data['categories']=$categories;\n\n $this->data['sizes']=Attribute::where('type','size')->get();\n $this->data['colors']=Color::all();\n \n return $this->_view('suppliers.index', 'Front');\n\n }",
"public function getSupplier(){\n $sql =\"SELECT * from supplier inner join company on supplier.companyID=company.companyID INNER JOIN country on supplier.supplier_country=country.countryID \";\n $result = $this->db->query($sql);\n if($result->num_rows > 0){\n while($row = $result->fetch_assoc()){\n $data[] = $row;\n }\n }\n return !empty($data)?$data:false;\n }",
"public function itemsSummaryData()\n {\n $items = Item::all();\n $batches = Batch::all();\n $deficitItems = $items->filter(function ($item) {\n return $item->stock <= $item->reorder_level;\n });\n $deficitItemsCount = $deficitItems->count();\n $expiredItems = $batches->filter(function ($batch) {\n return $batch->expire_date <= now()->toDateString();\n });\n $expiredItemsCount = $expiredItems->count();\n return ResponseHelper::findSuccess('Items Summary Data', [\n 'deficitItems' => ItemSuppliersResource::collection($deficitItems),\n 'deficitItemsCount' => $deficitItemsCount,\n 'expiredItems' => BatchResource::collection($expiredItems),\n 'expiredItemsCount' => $expiredItemsCount\n ]);\n }",
"public function detail($id,$supplier)\n\t{\n\t\t\n\t\tif(!empty($id)){\n\t\t\t$detail= Product::select(\n\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\tDB::raw(\"check_coupon(pro_product.id,pro_product.cid_cate,1) AS discountcoupon\"),\n\t\t\t\t\t\t\t\tDB::raw(\"check_coupon(pro_product.id,pro_product.cid_cate,2) AS coupons\"),\n\t\t\t\t\t\t\t\tDB::raw(\"get_review(pro_product.id,1) AS rating\"),\n\t\t\t\t\t\t\t \tDB::raw(\"get_review(pro_product.id,2) AS countrating\"),\n\t\t\t\t\t\t\t \tDB::raw(\"get_price(pro_supplier_product.id,pro_supplier_product.discount) AS discount\"),\n\t\t\t\t\t\t\t \tDB::raw(\"get_sale_price(pro_supplier_product.id,pro_supplier_product.saleprice) AS saleprice\"),\n\n\t\t\t\t\t\t\t\t\"pro_product.id AS myid\",\"pro_product.code\",\"pro_product.sap_code\",\"pro_product.is_hot\",\"pro_product.name\",\"pro_product.cid_series\",\"pro_product.cid_cate\",\"pro_supplier_product.id AS cid_res\"\n\t\t\t\t\t\t\t \t\t,\"pro_product.isprice\"\t\n\t\t\t\t\t\t\t \t\t,\"pro_supplier_product.stock_num\"\n\t\t\t\t\t\t\t \t\t,\"pro_product.is_sample\"\n\t\t\t\t\t\t\t \t\t,\"pro_product.is_shopping\"\n\t\t\t\t\t\t\t \t\t,\"pro_supplier_product.is_tranc\"\n\t\t\t\t\t\t\t \t\t,\"pro_supplier_product.content\"\n\t\t\t\t\t\t\t \t\t,\"m.name AS name_supplier\"\n\t\t\t\t\t\t\t\t,\"pro_supplier_product.id AS cid_res\",\"pro_supplier_product.cid_supplier\"\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t\t->whereRaw(\"pro_product.id={$id} AND pro_supplier_product.cid_supplier={$supplier} AND pro_supplier_product.status='1' AND pro_product.status='1' AND pro_product.is_status_cate='1' AND pro_product.is_status_series='1' \")\n\t\t\t\t\t\t\n\t\t\t\t\t\t->join(\"pro_supplier_product\",function($join){\n\t\t\t\t\t\t\t$join->on(\"pro_product.id\",\"=\",\"pro_supplier_product.cid_product\");\n\t\t\t\t\t\t})\n\t\t\t\t\t\t->join(\"market_supplier AS m\",function($join){\n\t\t\t\t\t\t\t$join->on(\"m.id\",\"=\",\"pro_supplier_product.cid_supplier\");\n\t\t\t\t\t\t})\n\t\t\t\t\t\t->orderBy(\"pro_supplier_product.date_mod\",\"DESC\")\n\t\t\t\t\t\t->first();\n\n\t\t\t\t$detail->content=str_replace( ['\"http://dienmaycholon.vn/public','\"/public'], '\"http://m.dienmaycholon.vn/img', $detail->content);\n\n\t\t\t\treturn Response::json($detail);\n\t\t}\n\t}",
"public function supplier_details(){\n\t\t$supplier_id = $this->input->post('id');\n\t\t$parameters['where'] = array('id' => $supplier_id);\n\t\t$data['view_edit'] = $this->MY_Model->getRows('supplier',$parameters,'row');\n\t\t// echo $this->db->last_query();\n\t\techo json_encode($data);\n\t}",
"public function show(Supplier $supplier)\n {\n $this->viewData['breadcrumb'] = [\n [\n 'text' => __('Home'),\n 'url' => url('system'),\n ],\n [\n 'text' => __('Supplier'),\n 'url' => route('system.supplier.index'),\n ],\n [\n 'text' => 'Show',\n ]\n ];\n//\n//\n $this->viewData['pageTitle'] = 'Supplier';\n $this->viewData['result'] = $supplier;\n $this->viewData['total_orders'] = $supplier->supplier_order()->sum('total_price');\n $this->viewData['total_expence'] = $supplier->supplier_expence()->sum('amount');\n $this->viewData['order_count'] = $supplier->supplier_order()->count('id');\n\n $this->viewData['tableColumns'] = [\n __('ID'),\n __('Name'),\n __('Init Credit'),\n __('Total Order Prices'),\n __('Total Order back Prices'),\n __('Total Slices'),\n __('Credit'),\n __('Action')\n ];\n\n $this->viewData['orderTableColumns'] = [\n __('ID'),\n __('Supplier'),\n __('Date'),\n __('No OF Items'),\n __('Plus'),\n __('Minus'),\n __('Total Price'),\n __('Created By'),\n __('Created At'),\n __('Action')];\n\n $this->viewData['orderBackTableColumns'] = [\n __('ID'),\n __('Supplier'),\n __('Date'),\n __('Total Price'),\n __('Created By'),\n __('Created At'),\n __('Action')];\n\n $this->viewData['depositsTableColumns'] = [\n __('ID'),\n __('Date'),\n __('Amount'),\n __('Description'),\n __('Expense Causes'),\n __('Created By'),\n __('Created At'),\n __('Action')];\n\n\n return $this->view('suppliers.show', $this->viewData);\n }",
"public function anyData()\n\t{\n\t return Datatables::collection(goods::all())->make(true);\n\t}",
"function products_table(){\n\n $collection = collect_find('Products');\n\n $products = $collection->find();\n\n foreach ($products as $item) {\n\n $id = ((array) $item['_id'])['oid'];\n $item = (array) $item;\n cms_user($item['name'], $item['price'],$item['stock'], $id);\n \n }\n}",
"function showItems() {\n global $DB;\n\n $budgets_id = $this->fields['id'];\n\n if (!$this->can($budgets_id, READ)) {\n return false;\n }\n\n $iterator = $DB->request([\n 'SELECT' => 'itemtype',\n 'DISTINCT' => true,\n 'FROM' => 'glpi_infocoms',\n 'WHERE' => [\n 'budgets_id' => $budgets_id,\n 'NOT' => ['itemtype' => ['ConsumableItem', 'CartridgeItem', 'Software']]\n ],\n 'ORDER' => 'itemtype'\n ]);\n\n $number = count($iterator);\n\n echo \"<div class='spaced'><table class='tab_cadre_fixe'>\";\n echo \"<tr><th colspan='2'>\";\n Html::printPagerForm();\n echo \"</th><th colspan='4'>\";\n if ($number == 0) {\n echo __('No associated item');\n } else {\n echo _n('Associated item', 'Associated items', $number);\n }\n echo \"</th></tr>\";\n\n echo \"<tr><th>\".__('Type').\"</th>\";\n echo \"<th>\".__('Entity').\"</th>\";\n echo \"<th>\".__('Name').\"</th>\";\n echo \"<th>\".__('Serial number').\"</th>\";\n echo \"<th>\".__('Inventory number').\"</th>\";\n echo \"<th>\"._x('price', 'Value').\"</th>\";\n echo \"</tr>\";\n\n $num = 0;\n $itemtypes = [];\n while ($row = $iterator->next()) {\n $itemtypes[] = $row['itemtype'];\n }\n $itemtypes[] = 'Contract';\n $itemtypes[] = 'Ticket';\n $itemtypes[] = 'Problem';\n $itemtypes[] = 'Change';\n $itemtypes[] = 'Project';\n\n foreach ($itemtypes as $itemtype) {\n if (!($item = getItemForItemtype($itemtype))) {\n continue;\n }\n\n if ($item->canView()) {\n switch ($itemtype) {\n\n case 'Contract' :\n $criteria = [\n 'SELECT' => [\n $item->getTable() . '.id',\n $item->getTable() . '.entities_id',\n 'SUM' => 'glpi_contractcosts.cost AS value'\n ],\n 'FROM' => 'glpi_contractcosts',\n 'INNER JOIN' => [\n $item->getTable() => [\n 'ON' => [\n $item->getTable() => 'id',\n 'glpi_contractcosts' => 'contracts_id'\n ]\n ]\n ],\n 'WHERE' => [\n 'glpi_contractcosts.budgets_id' => $budgets_id,\n $item->getTable() . '.is_template' => 0\n ] + getEntitiesRestrictCriteria($item->getTable()),\n 'GROUPBY' => [\n $item->getTable() . '.id',\n $item->getTable() . '.entities_id'\n ],\n 'ORDERBY' => [\n $item->getTable() . '.entities_id',\n $item->getTable() . '.name'\n ]\n ];\n break;\n\n case 'Ticket' :\n case 'Problem' :\n case 'Change' :\n $costtable = getTableForItemType($item->getType().'Cost');\n\n $sum = new QueryExpression(\n \"SUM(\" . $DB->quoteName(\"$costtable.actiontime\") . \" * \" . $DB->quoteName(\"$costtable.cost_time\") . \"/\".HOUR_TIMESTAMP.\"\n + \" . $DB->quoteName(\"$costtable.cost_fixed\") . \"\n + \" . $DB->quoteName(\"$costtable.cost_material\") . \") AS \" . $DB->quoteName('value')\n );\n $criteria = [\n 'SELECT' => [\n $item->getTable() . '.id',\n $item->getTable() . '.entities_id',\n $sum\n ],\n 'FROM' => $costtable,\n 'INNER JOIN' => [\n $item->getTable() => [\n 'ON' => [\n $item->getTable() => 'id',\n $costtable => $item->getForeignKeyField()\n ]\n ]\n ],\n 'WHERE' => [\n $costtable . '.budgets_id' => $budgets_id\n ] + getEntitiesRestrictCriteria($item->getTable()),\n 'GROUPBY' => [\n $item->getTable() . '.id',\n $item->getTable() . '.entities_id'\n ],\n 'ORDERBY' => [\n $item->getTable() . '.entities_id',\n $item->getTable() . '.name'\n ]\n ];\n break;\n\n case 'Project' :\n $criteria = [\n 'SELECT' => [\n $item->getTable() . '.id',\n $item->getTable() . '.entities_id',\n 'SUM' => 'glpi_projectcosts.cost AS value'\n ],\n 'FROM' => 'glpi_projectcosts',\n 'INNER JOIN' => [\n $item->getTable() => [\n 'ON' => [\n $item->getTable() => 'id',\n 'glpi_projectcosts' => 'projects_id'\n ]\n ]\n ],\n 'WHERE' => [\n 'glpi_projectcosts.budgets_id' => $budgets_id\n ] + getEntitiesRestrictCriteria($item->getTable()),\n 'GROUPBY' => [\n $item->getTable() . '.id',\n $item->getTable() . '.entities_id'\n ],\n 'ORDERBY' => [\n $item->getTable() . '.entities_id',\n $item->getTable() . '.name'\n ]\n ];\n break;\n\n case 'Cartridge' :\n $criteria = [\n 'SELECT' => [\n $item->getTable() . '.*',\n 'glpi_cartridgeitems.name',\n 'glpi_infocoms.value'\n ],\n 'FROM' => 'glpi_infocoms',\n 'INNER JOIN' => [\n $item->getTable() => [\n 'ON' => [\n $item->getTable() => 'id',\n 'glpi_infocoms' => 'items_id'\n ]\n ],\n 'glpi_cartridgeitems' => [\n 'ON' => [\n $item->getTable() => 'cartridgeitems_id',\n 'glpi_cartridgeitems' => 'id'\n ]\n ]\n ],\n 'WHERE' => [\n 'glpi_infocoms.itemtype' => $itemtype,\n 'glpi_infocoms.budgets_id' => $budgets_id\n ] + getEntitiesRestrictCriteria($item->getTable()),\n 'ORDERBY' => [\n 'entities_id',\n 'glpi_cartridgeitems.name'\n ]\n ];\n break;\n\n case 'Consumable' :\n $criteria = [\n 'SELECT' => [\n $item->getTable() . '.*',\n 'glpi_consumableitems.name',\n 'glpi_infocoms.value'\n ],\n 'FROM' => 'glpi_infocoms',\n 'INNER JOIN' => [\n $item->getTable() => [\n 'ON' => [\n $item->getTable() => 'id',\n 'glpi_infocoms' => 'items_id'\n ]\n ],\n 'glpi_consumableitems' => [\n 'ON' => [\n $item->getTable() => 'consumableitems_id',\n 'glpi_consumableitems' => 'id'\n ]\n ]\n ],\n 'WHERE' => [\n 'glpi_infocoms.itemtype' => $itemtype,\n 'glpi_infocoms.budgets_id' => $budgets_id\n ] + getEntitiesRestrictCriteria($item->getTable()),\n 'ORDERBY' => [\n 'entities_id',\n 'glpi_cartridgeitems.name'\n ]\n ];\n break;\n\n default:\n $criteria = [\n 'SELECT' => [\n $item->getTable() . '.*',\n 'glpi_infocoms.value',\n ],\n 'FROM' => 'glpi_infocoms',\n 'INNER JOIN' => [\n $item->getTable() => [\n 'ON' => [\n $item->getTable() => 'id',\n 'glpi_infocoms' => 'items_id'\n ]\n ]\n ],\n 'WHERE' => [\n 'glpi_infocoms.itemtype' => $itemtype,\n 'glpi_infocoms.budgets_id' => $budgets_id\n ] + getEntitiesRestrictCriteria($item->getTable()),\n 'ORDERBY' => [\n $item->getTable() . '.entities_id'\n ]\n ];\n if ($item->maybeTemplate()) {\n $criteria['WHERE'][$item->getTable() . '.is_template'] = 0;\n }\n\n if ($item instanceof Item_Devices) {\n $criteria['ORDERBY'][] = $item->getTable() .'.itemtype';\n } else {\n $criteria['ORDERBY'][] = $item->getTable() . '.name';\n }\n break;\n }\n\n $iterator = $DB->request($criteria);\n $nb = count($iterator);\n if ($nb > $_SESSION['glpilist_limit']) {\n echo \"<tr class='tab_bg_1'>\";\n $name = $item->getTypeName($nb);\n //TRANS: %1$s is a name, %2$s is a number\n echo \"<td class='center'>\".sprintf(__('%1$s: %2$s'), $name, $nb).\"</td>\";\n echo \"<td class='center' colspan='2'>\";\n\n $opt = ['order' => 'ASC',\n 'is_deleted' => 0,\n 'reset' => 'reset',\n 'start' => 0,\n 'sort' => 80,\n 'criteria' => [0 => ['value' => '$$$$'.$budgets_id,\n 'searchtype' => 'contains',\n 'field' => 50]]];\n\n echo \"<a href='\". $item->getSearchURL() . \"?\" .Toolbox::append_params($opt). \"'>\".\n __('Device list').\"</a></td>\";\n echo \"<td class='center'>-</td><td class='center'>-</td><td class='center'>-\".\n \"</td></tr>\";\n\n } else if ($nb) {\n for ($prem=true; $data = $iterator->next(); $prem=false) {\n $name = NOT_AVAILABLE;\n if ($item->getFromDB($data[\"id\"])) {\n if ($item instanceof Item_Devices) {\n $tmpitem = new $item::$itemtype_2();\n if ($tmpitem->getFromDB($data[$item::$items_id_2])) {\n $name = $tmpitem->getLink(['additional' => true]);\n }\n } else {\n $name = $item->getLink(['additional' => true]);\n }\n }\n echo \"<tr class='tab_bg_1'>\";\n if ($prem) {\n $typename = $item->getTypeName($nb);\n echo \"<td class='center top' rowspan='$nb'>\".\n ($nb>1 ? sprintf(__('%1$s: %2$s'), $typename, $nb) : $typename).\"</td>\";\n }\n echo \"<td class='center'>\".Dropdown::getDropdownName(\"glpi_entities\",\n $data[\"entities_id\"]);\n echo \"</td><td class='center\";\n echo (isset($data['is_deleted']) && $data['is_deleted'] ? \" tab_bg_2_2'\" : \"'\");\n echo \">\".$name.\"</td>\";\n echo \"<td class='center'>\".(isset($data[\"serial\"])? \"\".$data[\"serial\"].\"\" :\"-\");\n echo \"</td>\";\n echo \"<td class='center'>\".\n (isset($data[\"otherserial\"])? \"\".$data[\"otherserial\"].\"\" :\"-\").\"</td>\";\n echo \"<td class='center'>\".\n (isset($data[\"value\"]) ? \"\".Html::formatNumber($data[\"value\"], true).\"\"\n :\"-\");\n\n echo \"</td></tr>\";\n }\n }\n $num += $nb;\n }\n }\n\n if ($num>0) {\n echo \"<tr class='tab_bg_2'>\";\n echo \"<td class='center b'>\".sprintf(__('%1$s = %2$s'), __('Total'), $num).\"</td>\";\n echo \"<td colspan='5'> </td></tr> \";\n }\n echo \"</table></div>\";\n }",
"public function getSupplierList()\n {\n return 'supplier';\n }",
"public function run()\n\t{\n\t\t// DB::table('suppliers')->truncate();\n\n\n\n\t\t$insert = [\n\t\t\t[\n\t\t\t'itemName' => 'Paracetamol', \n\t\t\t'Description' => ' It is commonly used for the relief of headaches and other minor aches and pains',\n\t\t\t'inStockQuantity'=>'100',\n\t\t\t'unitPrice'=>'3.5'\n\t\t\t],\n\t\t\t[\n\t\t\t'itemName' => 'Biogesic', \n\t\t\t'Description' => 'The most prescribed Headache and Fever brand that\\'s Effective and Safe.',\n\t\t\t'inStockQuantity'=>'200',\n\t\t\t'unitPrice'=>'4.5'\n\t\t\t],\n\t\t\t[\n\t\t\t'itemName' => 'Bioflu', \n\t\t\t'Description' => ' Relief of clogged nose, runny nose, postnasal drip, sneezing, headache, body aches & fever associated w/ common cold',\n\t\t\t'inStockQuantity'=>'50',\n\t\t\t'unitPrice'=>'13.5'\n\t\t\t],\n\t\t\t[\n\t\t\t'itemName' => 'Medicol', \n\t\t\t'Description' => 'Provides advance relief from intense headache and pain.',\n\t\t\t'inStockQuantity'=>'55',\n\t\t\t'unitPrice'=>'3.5'\n\t\t\t],\n\t\t\t[\n\t\t\t'itemName' => 'Test item no. 1', \n\t\t\t'Description' => 'default description for test item no. 1.',\n\t\t\t'inStockQuantity'=>'100',\n\t\t\t'unitPrice'=>'60'\n\t\t\t],\n\t\t\t[\n\t\t\t'itemName' => 'Test item no. 2', \n\t\t\t'Description' => 'default description for test item no. 2.',\n\t\t\t'inStockQuantity'=>'33',\n\t\t\t'unitPrice'=>'10'\n\t\t\t],\n\t\t\t[\n\t\t\t'itemName' => 'Test item no. 3', \n\t\t\t'Description' => 'default description for test item no. 4.',\n\t\t\t'inStockQuantity'=>'50',\n\t\t\t'unitPrice'=>'160'\n\t\t\t],\n\t\t\t[\n\t\t\t'itemName' => 'Test item no. 4', \n\t\t\t'Description' => 'default description for test item no. 4.',\n\t\t\t'inStockQuantity'=>'40',\n\t\t\t'unitPrice'=>'160'\n\t\t\t],\n\t\t\t[\n\t\t\t'itemName' => 'Test item no. 5', \n\t\t\t'Description' => 'default description for test item no. 5.',\n\t\t\t'inStockQuantity'=>'100',\n\t\t\t'unitPrice'=>'60'\n\t\t\t],\n\t\t\t[\n\t\t\t'itemName' => 'Test item no. 6', \n\t\t\t'Description' => 'default description for test item no. 6.',\n\t\t\t'inStockQuantity'=>'120',\n\t\t\t'unitPrice'=>'560'\n\t\t\t],\n\t\t\t[\n\t\t\t'itemName' => 'Test item no. 7', \n\t\t\t'Description' => 'default description for test item no. 7.',\n\t\t\t'inStockQuantity'=>'25',\n\t\t\t'unitPrice'=>'120'\n\t\t\t]\n\n\t\t];\n\n\n\n\t\t// Uncomment the below to run the seeder\n\t\tDB::table('tblItemList')->insert($insert);\n\t}",
"function ambil_data()\n \t{\n \t\t$this->db->distinct();\n \t\t$this->db->select('bk.id_buku, s.nama_supplier, bk.judul, bk.tema, bk.penulis, bk.harga');\n \t\t$this->db->from('buku bk');\n \t\t$this->db->join('supplier s', 's.id_supplier = bk.id_supplier');\n \t\treturn $this->db->get($this->nama_table)->result();\n\n \t\t$data['buku'] = $this->db->order_by($this->id, $this->order);\n \t\treturn $this->db->get($this->nama_table)->result();\n \t}",
"public function supplier_sales_details($supplier_id)\n\t{\t\n\t\t$content = $this->lsupplier->supplier_sales_details($supplier_id);\n\t\t$this->supplier_id=$supplier_id;\n\t\t$this->template->full_admin_html_view($content);\n\t}",
"function cp_do_display_entry_supplier($adata) {\n\t# Get security vars\n\t\t$_SEC\t= get_security_flags();\n\t\t$_PERMS\t= do_decode_perms_admin($_SEC['_sadmin_perms']);\n\n\t# Dim some Vars:\n\t\tglobal $_CCFG, $_TCFG, $_DBCFG, $db_coin, $_LANG, $_nl, $_sp;\n\n\t# Build common td start tag / strings (reduce text)\n\t\t$_td_str_left\t\t\t= '<td class=\"TP1SML_NR\" valign=\"top\">';\n\t\t$_td_str_right\t\t\t= '<td class=\"TP1SML_NL\" valign=\"top\">';\n\t\t$_td_str_right_span3\t= '<td class=\"TP1SML_NL\" valign=\"top\" colspan=\"3\">';\n\n\n\t# Build output\n\t\t$_out = '<br>'.$_nl;\n\t\t$_out .= '<div align=\"center\">'.$_nl;\n\t\t$_out .= '<table width=\"100%\" border=\"0\" bordercolor=\"'.$_TCFG['_TAG_TABLE_BRDR_COLOR'].'\" bgcolor=\"'.$_TCFG['_TAG_TRTD_BKGRND_COLOR'].'\" cellpadding=\"0\" cellspacing=\"1\">'.$_nl;\n\t\t$_out .= '<tr class=\"BLK_DEF_TITLE\"><td class=\"TP3MED_BC\">'.$_nl;\n\n\t\t$_out .= '<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\">'.$_nl;\n\t\t$_out .= '<tr class=\"BLK_IT_TITLE_TXT\">'.$_nl.'<td class=\"TP0MED_NL\">'.$_nl;\n\t\t$_out .= '<b>'.$_LANG['_ADMIN']['Supplier_Info_Entry'].'</b>';\n\t\t$_out .= '</td>'.$_nl.'<td class=\"TP0MED_NR\">'.$_nl;\n\t\tIF ($_CCFG['_IS_PRINT'] != 1) {\n \t\t\tIF ($_PERMS['AP16'] == 1 || $_PERMS['AP04'] == 1) {\n\t\t\t\t$_out .= do_nav_link('admin.php?cp=suppliers&op=edit&s_id='.$adata['s_id'], $_TCFG['_S_IMG_EDIT_S'],$_TCFG['_S_IMG_EDIT_S_MO'],'','');\n\t\t\t}\n\t\t\tIF ($_PERMS['AP16'] == 1 || $_PERMS['AP04'] == 1) {\n\t\t\t\t$_out .= do_nav_link('admin.php?cp=suppliers&op=delete&stage=1&s_id='.$adata['s_id'].'&s_name_first='.$adata['s_name_first'].'&s_name_last='.$adata['s_name_last'], $_TCFG['_S_IMG_DEL_S'],$_TCFG['_S_IMG_DEL_S_MO'],'','');\n\t\t\t}\n\t\t} ELSE {\n\t\t\t$_out .= $_sp;\n\t\t}\n\t\t$_out .= '</td>'.$_nl.'</tr>'.$_nl.'</table>'.$_nl;\n\n\t\t$_out .= '</td></tr>'.$_nl;\n\t\t$_out .= '<tr class=\"BLK_DEF_ENTRY\"><td class=\"BLK_IT_ENTRY\">'.$_nl;\n\n\t\t$_out .= '<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">'.$_nl;\n\n\t\t$_out .= '<tr class=\"BLK_DEF_ENTRY\">'.$_nl;\n\t\t$_out .= $_td_str_left.'<b>'.$_LANG['_ADMIN']['l_Supplier_ID'].$_sp.'</b></td>'.$_nl;\n\t\t$_out .= $_td_str_right.$adata['s_id'].'</td>'.$_nl;\n\t\t$_out .= $_td_str_left.'<b>'.$_LANG['_ADMIN']['l_Company'].$_sp.'</b></td>'.$_nl;\n\t\t$_out .= $_td_str_right.htmlspecialchars($adata['s_company']).'</td>'.$_nl;\n\t\t$_out .= '</tr>'.$_nl;\n\n\t\t$_out .= '<tr class=\"BLK_DEF_ENTRY\">'.$_nl;\n\t\t$_out .= $_td_str_left.'<b>'.$_sp.'</b></td>'.$_nl;\n\t\t$_out .= $_td_str_right.$_sp.'</td>'.$_nl;\n\t\t$_out .= $_td_str_left.'<b>'.$_LANG['_ADMIN']['l_Full_Name'].$_sp.'</b></td>'.$_nl;\n\t\t$_out .= $_td_str_right.htmlspecialchars($adata['s_name_first'].' '.$adata['s_name_last']).'</td>'.$_nl;\n\t\t$_out .= '</tr>'.$_nl;\n\n\t\t$_out .= '<tr class=\"BLK_DEF_ENTRY\">'.$_nl;\n\t\t$_out .= $_td_str_left.'<b>'.$_LANG['_ADMIN']['l_Status'].$_sp.'</b></td>'.$_nl;\n\t\t$_out .= $_td_str_right.$adata['s_status'].'</td>'.$_nl;\n\t\t$_out .= $_td_str_left.'<b>'.$_LANG['_ADMIN']['l_Address_Street_1'].$_sp.'</b></td>'.$_nl;\n\t\t$_out .= $_td_str_right.$adata['s_addr_01'].'</td>'.$_nl;\n\t\t$_out .= '</tr>'.$_nl;\n\n\t\t$_out .= '<tr class=\"BLK_DEF_ENTRY\">'.$_nl;\n\t\t$_out .= $_td_str_left.'<b>'.$_LANG['_ADMIN']['l_AccountID'].$_sp.'</b></td>'.$_nl;\n\t\t$_out .= $_td_str_right.$adata['s_account'].'</td>'.$_nl;\n\t\tIF ($adata['s_addr_02']) {\n\t\t\t$_out .= $_td_str_left.'<b>'.$_LANG['_ADMIN']['l_Address_Street_2'].$_sp.'</b></td>'.$_nl;\n\t\t\t$_out .= $_td_str_right.$adata['s_addr_02'].'</td>'.$_nl;\n\t\t} ELSE {\n\t\t\t$_out .= $_td_str_left.$_sp.'</td>'.$_nl;\n\t\t\t$_out .= $_td_str_right.$_sp.'</td>'.$_nl;\n\t\t}\n\t\t$_out .= '</tr>'.$_nl;\n\n\t\t$_out .= '<tr class=\"BLK_DEF_ENTRY\">'.$_nl;\n\t\t$_out .= $_td_str_left.'<b>'.$_LANG['_ADMIN']['l_Terms'].$_sp.'</b></td>'.$_nl;\n\t\t$_out .= $_td_str_right.$adata['s_terms'].'</td>'.$_nl;\n\t\t$_out .= $_td_str_left.'<b>'.$_LANG['_ADMIN']['l_City'].$_sp.'</b></td>'.$_nl;\n\t\t$_out .= $_td_str_right.htmlspecialchars($adata['s_city']).'</td>'.$_nl;\n\t\t$_out .= '</tr>'.$_nl;\n\n\t\t$_out .= '<tr class=\"BLK_DEF_ENTRY\">'.$_nl;\n\t\t$_out .= $_td_str_left.$_sp.'</td>'.$_nl;\n\t\t$_out .= $_td_str_right.$_sp.'</td>'.$_nl;\n\t\t$_out .= $_td_str_left.'<b>'.$_LANG['_ADMIN']['l_State_Province'].$_sp.'</b></td>'.$_nl;\n\t\t$_out .= $_td_str_right.htmlspecialchars($adata['s_state_prov']).'</td>'.$_nl;\n\t\t$_out .= '</tr>'.$_nl;\n\n\t\t$_out .= '<tr class=\"BLK_DEF_ENTRY\">'.$_nl;\n\t\tIF ($adata['s_phone']) {\n\t\t\t$_out .= $_td_str_left.'<b>'.$_LANG['_ADMIN']['l_Phone'].$_sp.'</b></td>'.$_nl;\n\t\t\t$_out .= $_td_str_right.htmlspecialchars($adata['s_phone']).'</td>'.$_nl;\n\t\t} ELSE {\n\t\t\t$_out .= $_td_str_left.$_sp.'</td>'.$_nl;\n\t\t\t$_out .= $_td_str_right.$_sp.'</td>'.$_nl;\n\t\t}\n\t\t$_out .= $_td_str_left.'<b>'.$_LANG['_ADMIN']['l_Country'].$_sp.'</b></td>'.$_nl;\n\t\t$_out .= $_td_str_right.htmlspecialchars($adata['s_country']).'</td>'.$_nl;\n\t\t$_out .= '</tr>'.$_nl;\n\n\t\t$_out .= '<tr class=\"BLK_DEF_ENTRY\">'.$_nl;\n\t\tIF ($adata['s_fax']) {\n\t\t\t$_out .= $_td_str_left.'<b>'.$_LANG['_ADMIN']['l_Fax'].$_sp.'</b></td>'.$_nl;\n\t\t\t$_out .= $_td_str_right.htmlspecialchars($adata['s_fax']).'</td>'.$_nl;\n\t\t} ELSE {\n\t\t\t$_out .= $_td_str_left.$_sp.'</td>'.$_nl;\n\t\t\t$_out .= $_td_str_right.$_sp.'</td>'.$_nl;\n\t\t}\n\t\t$_out .= $_td_str_left.'<b>'.$_LANG['_ADMIN']['l_Zip_Postal_Code'].$_sp.'</b></td>'.$_nl;\n\t\t$_out .= $_td_str_right.htmlspecialchars($adata['s_zip_code']).'</td>'.$_nl;\n\t\t$_out .= '</tr>'.$_nl;\n\n\t\tIF ($adata['s_tollfree']) {\n\t\t\t$_out .= '<tr class=\"BLK_DEF_ENTRY\">'.$_nl;\n\t\t\t$_out .= $_td_str_left.'<b>'.$_LANG['_ADMIN']['l_TollFree'].$_sp.'</b></td>'.$_nl;\n\t\t\t$_out .= $_td_str_right.htmlspecialchars($adata['s_tollfree']).'</td>'.$_nl;\n\t\t\t$_out .= $_td_str_left.$_sp.'</td>'.$_nl;\n\t\t\t$_out .= $_td_str_right.$_sp.'</td>'.$_nl;\n\t\t\t$_out .= '</tr>'.$_nl;\n\t\t}\n\n\t\t$_out .= '<tr class=\"BLK_DEF_ENTRY\">'.$_nl;\n\t\t$_out .= $_td_str_left.'<b>'.$_LANG['_ADMIN']['l_Email_Address'].$_sp.'</b></td>'.$_nl;\n\t\t$_out .= $_td_str_right.htmlspecialchars($adata['s_email']).'</td>'.$_nl;\n\t\t$_out .= $_td_str_left.'<b>'.$_LANG['_ADMIN']['l_TaxID'].$_sp.'</b></td>'.$_nl;\n\t\t$_out .= $_td_str_right.htmlspecialchars($adata['s_taxid']).'</td>'.$_nl;\n\t\t$_out .= '</tr>'.$_nl;\n\n\t\t$_out .= '<tr class=\"BLK_DEF_ENTRY\">'.$_nl;\n\t\t$_out .= $_td_str_left.'<b>'.$_LANG['_ADMIN']['l_Email_Address_Additional'].$_sp.'</b></td>'.$_nl;\n\t\t$_out .= $_td_str_right.$_nl;\n\n\t# Set Query for select (additional emails).\n\t\t$ae_query\t= 'SELECT *';\n\t\t$ae_query .= ' FROM '.$_DBCFG['suppliers_contacts'];\n\t\t$ae_query .= ' WHERE contacts_s_id='.$adata['s_id'];\n\t\t$ae_query .= ' ORDER BY contacts_email ASC';\n\t\t$ae_result\t= $db_coin->db_query_execute($ae_query);\n\t\tIF ($db_coin->db_query_numrows($ae_result)) {\n\t\t\twhile ($ae_row = $db_coin->db_fetch_array($ae_result)) {\n\t\t\t\t$_out .= htmlspecialchars($ae_row['contacts_email']).'<br>'.$_nl;\n \t }\n\t\t}\n\t\t$_out .= '</td>'.$_nl;\n\n\t\t$_out .= $_td_str_left.$_sp.'</td>'.$_nl;\n\t\t$_out .= $_td_str_right.$_sp.'</td>'.$_nl;\n\t\t$_out .= '</tr>'.$_nl;\n\n\t\t$_out .= '<tr class=\"BLK_DEF_ENTRY\"><td colspan=\"4\"><hr></td></tr>'.$_nl;\n\t\t$_out .= '<tr class=\"BLK_DEF_ENTRY\">'.$_nl;\n\t\t$_out .= $_td_str_left.'<b>'.$_LANG['_ADMIN']['l_Notes'].$_sp.'</b></td>'.$_nl;\n\t\t$_out .= $_td_str_right_span3.nl2br($adata['s_notes']).'</td>'.$_nl;\n\t\t$_out .= '</tr>'.$_nl;\n\n\t\t$_out .= '</table>'.$_nl;\n\n\t\t$_out .= '</td></tr>'.$_nl;\n\t\t$_out .= '</table>'.$_nl;\n\t\t$_out .= '</div>'.$_nl;\n\n\t\treturn $_out;\n}",
"function json_SuppItemByItemId($itemId) {\n\t\t$query = \"SELECT fabID, Supp_ArtNo, SupplierID, Comp, Density, YarnCount, \n WidthPrint, CuttablePrint, Weight_gm2, Weight_gyd, Finishing, Supp_FinishingNum\n\t\t\t\tFROM fabricvw\n\t\t\t\tWHERE Supp_ArtNo LIKE '%\".$itemId.\"%' \";\n\t\t\n\t\tmysql_connect(DB_SERVER, DB_USER, DB_PASSWORD);\n\t\tmysql_select_db(DB_NAME);\n \t\n\t\t if($result = mysql_query($query)){\t\t\n\t\t\t$rows = Array(); // returned object\n\t\t\t$rows['identifier'] = \"fabID\";\n\t\t\t\n \t\t\twhile($r=mysql_fetch_assoc($result)) {\n \t\t\t $rows['items'][] = $r;\n \t\t\t}\n\n\t\t\treturn json_encode($rows);\n } else {\n die(mysql_error());\n }\n\t}",
"public function stock_report_supplier_bydate($product_id,$supplier_id,$date,$perpage,$page){\n\n\t\t$this->db->select(\"\n\t\t\t\ta.product_name,\n\t\t\t\ta.unit,\n\t\t\t\ta.product_id,\n\t\t\t\ta.price,\n\t\t\t\ta.supplier_price,\n\t\t\t\ta.product_model,\n\t\t\t\tc.category_name,\n\t\t\t\tsum(b.quantity) as 'totalPrhcsCtn',\n\t\t\t\te.purchase_date as purchase_date,\n\t\t\t\");\n\n\t\t$this->db->from('product_information a');\n\t\t$this->db->join('product_purchase_details b','b.product_id = a.product_id','left');\n\t\t$this->db->join('product_category c' ,'c.category_id = a.category_id');\n\t\t$this->db->join('product_purchase e','e.purchase_id = b.purchase_id');\n\t\t$this->db->join('unit f','f.unit_id = a.unit','left');\n\t\t$this->db->join('variant g','g.variant_id = b.variant_id','left');\n\t\t$this->db->join('store_set h','h.store_id = b.store_id');\n\t\t$this->db->where('b.store_id !=',null);\n\t\t$this->db->group_by('a.product_id');\n\t\t$this->db->order_by('a.product_name','asc');\n\n\t\tif(empty($supplier_id))\n\t\t{\n\t\t\t$this->db->where(array('a.status'=>1));\n\t\t}else\n\t\t{\n\t\t\t$this->db->where('a.status',1);\n\t\t\t$this->db->where('e.purchase_date <=' ,$date);\n\t\t\t$this->db->where('a.supplier_id',$supplier_id);\t\n\t\t}\n\t\t$this->db->limit($perpage,$page);\n\t\t$query = $this->db->get();\n\t\treturn $query->result_array();\n\t}",
"function json_SuppliersList() {\n\t\t$query = \"SELECT SupplierID, FullName FROM supplier\";\n\t\t\n\t\tmysql_connect(DB_SERVER, DB_USER, DB_PASSWORD);\n\t\tmysql_select_db(DB_NAME);\n \t\n\t\t\t$result = mysql_query($query) or die(mysql_error());\t\n\t\t\t$rows = Array(); // returned object\n\t\t\t$rows['identifier'] = \"SupplierID\";\n\t\t\t\n \t\t\twhile($r=mysql_fetch_assoc($result)) {\n \t\t\t $rows['items'][] = $r;\n \t\t\t}\n\n\t\t\treturn json_encode($rows);\n\t}",
"function getDataItemByID($strDataID)\n{\n global $db;\n $tbl = new cGaItem();\n $dataEdit = $tbl->findAll(\"id = $strDataID\", \"\", \"\", null, 1, \"id\");\n $arrResult['dataIdItem'] = $dataEdit[$strDataID]['id'];\n //$arrResult['dataItemStock'] = $dataEdit[$strDataID]['item_stock'];\n return $arrResult;\n}",
"public function getSuppliers($suppliers_id);",
"public function show(Supplier $supplier)\n {\n //\n }",
"public function show(Supplier $supplier)\n {\n //\n }",
"public function show(Supplier $supplier)\n {\n //\n }"
] |
[
"0.6663818",
"0.6651554",
"0.66482705",
"0.5978315",
"0.5964407",
"0.5944025",
"0.59414816",
"0.5929946",
"0.58717054",
"0.5830291",
"0.57457614",
"0.5730872",
"0.57233405",
"0.56822395",
"0.56577396",
"0.56539977",
"0.56525624",
"0.5643018",
"0.5632225",
"0.56105226",
"0.55865365",
"0.55548",
"0.55291224",
"0.54955894",
"0.54927254",
"0.5487403",
"0.5484797",
"0.54812264",
"0.54812264",
"0.54812264"
] |
0.69523793
|
0
|
Retorna o valor da variavel sobrecarregada readonly
|
public function getReadonly() {
return $this->readonly;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function get_readonly() {\n return $this->readonly;\n }",
"function getReadOnly() { return $this->_readonly; }",
"public function readonly()\n {\n return $this->readOnly;\n }",
"public function getReadOnlyFlag() {}",
"function isReadonly()\n {\n return $this->readonly;\n }",
"public function isReadonly()\n {\n return $this->_isReadonly;\n }",
"public function isReadonly()\n {\n return false;\n }",
"public function isReadonly(): bool;",
"public function getReadOnly()\n {\n return $this->readOnly;\n }",
"public function isReadonly() : bool {\n return (bool) ($this->flags & Class_::MODIFIER_READONLY);\n }",
"public function isReadonly(): bool\n {\n return $this->readonly;\n }",
"public function isReadOnly() {}",
"public function isReadOnly() {}",
"public function isReadOnly() {}",
"function wp_readonly($readonly_value, $current = \\true, $display = \\true)\n {\n }",
"public function isReadOnly()\n\t{\n\t\treturn $this->_readOnly;\n\t}",
"public function getName()\n {\n return 'readonly';\n }",
"public function isReadOnly();",
"public function isReadOnly();",
"public function isReadOnly();",
"public function isReadOnly(): bool;",
"public function isReadOnly() {\n\t\treturn false;\n\t}",
"public function isReadOnly()\n {\n return $this->_readOnly;\n }",
"public function isReadOnlyReal(): bool\n {\n return ($this->getFlags() & ast\\flags\\MODIFIER_READONLY) !== 0;\n }",
"public function isReadOnly()\n {\n return $this->readOnly;\n }",
"public function isReadOnly ()\n {\n return $this->readOnly;\n }",
"public function isReadOnly()\r\n {\r\n return $this->isReadOnly;\r\n }",
"function performReadonlyTransformation() {\n\t\t$stars = '*****';\n\n\t\t$field = new ReadonlyField($this->name, $this->title ? $this->title : '', $stars);\n\t\t$field->setForm($this->form);\n\t\t$field->setReadonly(true);\n\t\treturn $field;\n\t}",
"public function define_readonly($p_readonly)\r\n\t\t{\r\n\t\t\t$this->c_readonly = $p_readonly;\r\n\t\t}",
"public function getIsReadOnly()\n {\n if (array_key_exists(\"isReadOnly\", $this->_propDict)) {\n return $this->_propDict[\"isReadOnly\"];\n } else {\n return null;\n }\n }"
] |
[
"0.7760357",
"0.7470642",
"0.737028",
"0.7365338",
"0.7151776",
"0.714521",
"0.71421534",
"0.70207226",
"0.69978625",
"0.6965153",
"0.6891848",
"0.68911356",
"0.68911356",
"0.6890165",
"0.66784906",
"0.66634506",
"0.66554147",
"0.6650697",
"0.6650697",
"0.6650697",
"0.6650623",
"0.6631541",
"0.661209",
"0.6557261",
"0.6552115",
"0.65433955",
"0.65373456",
"0.64609057",
"0.6450015",
"0.6411265"
] |
0.75702703
|
1
|
Get the coaches for the sport.
|
public function coaches()
{
return $this->hasMany('App\Coach');
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function fetchCoach()\n {\n $url = $this->domain . $this->uri;\n $dom = HtmlDomParser::file_get_html($url);\n $this->coach = $dom;\n $content = $this->coach->find('div[class=item-page]', 0);\n $h2s = $content->find('h2');\n $groups = array();\n foreach ($h2s as $h2) {\n $arr = $this->parseCoachGroup($h2->next_sibling(), trim($h2->innertext));\n $groups = array_merge($groups, $arr);\n }\n\n return $groups;\n }",
"public function getCourses()\n {\n return $this->hasMany(Section::className(), ['course_id' => 'course_id', 'sec_id' => 'sec_id', 'semester' => 'semester', 'year' => 'year'])->viaTable('teaches', ['ID' => 'ID']);\n }",
"public function getSports()\n {\n return $this->sports;\n }",
"public function getCouplesPerChampionship()\n { \n $stmt = $this->db->prepare(\"select count(idPareja) as num, ca.nombreCampeonato as name \n FROM pareja p, categoriascampeonato c , campeonato ca \n WHERE p.idCategoriaCampeonato = c.idCategoriasCampeonato AND c.idCampeonato = ca.idCampeonato \n GROUP BY c.idCampeonato\");\n $stmt->execute();\n \n $results = $stmt->fetchAll(PDO::FETCH_ASSOC);\n \n $torret = array();\n \n foreach ($results as $result) {\n array_push($torret, array(\n \"left\" => $result[\"name\"],\n \"rigth\" => $result[\"num\"]\n ));\n }\n return $torret;\n }",
"public function coworkers()\n {\n // find shifts with a start time before or equal to this start time\n // an end time after this start time\n // and a start time less than the end time\n $coworkers = Shift::where('start_time', '>=', $this->start_time)\n ->where('end_time','>',$this->start_time)\n ->where('start_time', '<', $this->end_time)\n ->with('employee')->get();\n return $coworkers;\n }",
"protected function getFighters()\n {\n return $this->championship->teams;\n }",
"public function getContestsByGame($game);",
"public function getSchedule($coaches){\n $schedule = [];\n foreach ($coaches as $coache){\n if($coache->getTeamPosition()->getId() == 1){\n $headCoache = $coache;\n $schedule = $headCoache->getSchedule();\n }else{\n $headCoache = null;\n }\n }\n return $schedule;\n }",
"public function get_sports()\n\t\t{\n\t\t\t$retArr = null;\n\n\t\t\t// Scaffolding Code For Array:\n\t\t\t$objs = $this->obj->find_all();\n\t\t\tforeach($objs as $obj)\n\t\t\t{\n\t\t\t\t$retArr[] = $obj->getBasics();\n\t\t\t}\n\t\t\treturn $retArr;\n\t\t}",
"public function getCompetitions() {\n if ($this->competitionsLoaded) return $this->competitions;\n\n // else load them from database\n $req = CompetitionDBClient::selectByTournamentId($this->getId());\n while ($comp = mysql_fetch_assoc($req)) {\n try {\n $this->competitions[] = Competition::getById($comp['id']);\n } catch (Exception $e) {\n // TODO use error log file\n echo $e->getMessage();\n }\n }\n\n $this->competitionsLoaded = true;\n return $this->competitions;\n }",
"public function getHotels(): Collection;",
"public function getChampionships(){\n\t\t$this->db->select('id_champ, namechamp, year, id_sportsman, id_team, resultchamp');\n\t\t$this->db->from('Championships');\n\t\treturn $this->db->get()->result_array();\n\t}",
"public static function getChargers()\n {\n return ChargersGetter :: get();\n }",
"public function getTeams();",
"public function getPlaces();",
"public function getCities(): Collection\n {\n return $this->cities;\n }",
"public function put_sport()\n\t\t{\n\t\t\t$retArr = array();\n\t\t\t// Scaffolding Code For Single:\n\t\t\t$retArr = $this->obj->getBasics();\n\n\t\t\treturn $retArr;\n\t\t}",
"public function getChampions(){\n\t\treturn $this->_makeCall('champions?');\n\t}",
"public function fetchAllComedies()\n\t{\n\t\t$genreid = 7;\n\t\t$query = \"SELECT {$this->table}.*,\n\t\t\t\t\t\t\tgenre.*,\n\t\t\t\t\t\t\tvid_collection.*\n\t\t\t\t\t\t\tFROM \n\t\t\t\t\t\t\t{$this->table}\n\t\t\t\t\t\t\tJOIN vid_collection \n\t\t\t\t\t\t\tON ({$this->table}.video_id = vid_collection.video_id) \n\t\t\t\t\t\t\tJOIN genre \n\t\t\t\t\t\t\tON({$this->table}.genre_id = genre.genre_id)\n\t\t\t\t\t\t\tWHERE {$this->table}.genre_id = :genreid\";\n\n\t\t$params = array(':genreid' => $genreid);\n\t\t$stmt = static::$dbh->prepare($query);\n\t\t$stmt->execute($params);\n\t\treturn $stmt->fetchAll(\\PDO::FETCH_ASSOC);\n\t}",
"public function getCourses()\n {\n return $this->courses;\n }",
"function getDecisionTeamTeaches() {\n\n global $CFG;\n\n $sql = \"SELECT team.*\n FROM {$CFG->prefix}block_courseprefs_teamteach team,\n {$CFG->prefix}block_courseprefs_teachers teach\n WHERE team.tt_sectionsid = teach.sectionsid\n AND teach.usersid = \" . $this->id . \"\n AND teach.primary_flag = 1\n AND team.approval_flag = 1\n AND team.status = 'todo'\";\n\n $results = get_records_sql($sql);\n $teamteaches = array();\n\n // Return an empty array if there are no records to process\n if (!$results) {\n return $teamteaches;\n }\n\n foreach ($results as $result) {\n $teamteaches[$result->id] = new CoursePrefsTeamTeach($result->usersid, \n $result->sectionsid, $result->tt_sectionsid, $result->status,\n $result->approval_flag, $result->id);\n }\n\n return $teamteaches;\n }",
"public function getFeaturedCovered(): CompanyCollection\n {\n return $this->featuredCovered;\n }",
"public function recupererToutesLesCompetitions()\n {\n return $this->getAll('competition','Competition');\n }",
"public function getPopularCourses()\n {\n\n // SAME HERE ---- TRYING TO GET ANYTHING TEACHER-RELATED BECAUSE THERE ARE VERY FEW INSTRUCTORS BUT LOOKS BETTER IF SHOWING MORE ON DASHBOARD\n\n $instructors = Role::where('shortname', 'coursecreator')->first()->users()->take(4)->get();\n $editTeachers = Role::where('shortname', 'editingteacher')->first()->users()->take(4)->get();\n $courseCreators = Role::where('shortname', 'coursecreator')->first()->users()->take(4)->get();\n\n $t = $this->coursesForRecents($instructors);\n $et = $this->coursesForRecents($editTeachers);\n $cr = $this->coursesForRecents($courseCreators);\n\n return collect(array_merge($t->toArray(), $et->toArray(), $cr->toArray()))->sortBy('timecreated')->take(5);\n }",
"public function getCampeonatos()\n {\n $stmt = $this->db->query(\"SELECT *\n\t\t\tFROM campeonato\");\n $toret_db = $stmt->fetchAll(PDO::FETCH_ASSOC);\n \n $championships = array();\n \n foreach ($toret_db as $championship) {\n array_push($championships, new Championship($championship[\"idCampeonato\"], $championship[\"fechaInicioInscripcion\"], $championship[\"fechaFinInscripcion\"], $championship[\"fechaInicioCampeonato\"], $championship[\"fechaFinCampeonato\"], $championship[\"nombreCampeonato\"], $championship[\"fase\"]));\n }\n return $championships;\n }",
"public function get_seasonteams()\n\t\t{\n\t\t\t// Scaffolding Code For Array:\n\t\t\t$objs = $this->obj->execute();\n\t\t//\tprint_r($objs);\n\t\t\tforeach($objs as $obj)\n\t\t\t{\n\t\t//\t\tprint_r($obj);\n\t\t\t\t$team = ORM::factory('Sportorg_Team',$obj['team_id']);\n\n\t\t\t\t$retArr[] = $team->getBasics();\n\t\t\t}\n\n\t\t\treturn $retArr;\n\t\t}",
"public function getContestants() {\n if (property_exists($this, 'is_new') && $this->is_new) return array();\n\n foreach ($this->getTournaments() as $tourney) {\n $this->contestants = array_merge($this->contestants, $tourney->getContestants());\n }\n\n return $this->contestants;\n }",
"public function getCafes()\n {\n $cafes = Cafe::with('brewMethods')\n ->with(['tags' => function ($query)\n {\n $query->select('name');\n }])\n ->with('company')\n ->withCount('likes')\n ->get();\n return response()->json($cafes);\n }",
"public function giftcards(): Collection\n {\n return $this->giftcards;\n }",
"public function getCampos()\n {\n return $this->campos;\n }"
] |
[
"0.6077908",
"0.58442396",
"0.5729185",
"0.5562814",
"0.551353",
"0.5495791",
"0.53992075",
"0.53810436",
"0.53208745",
"0.5312413",
"0.5297692",
"0.5281813",
"0.524017",
"0.516862",
"0.51519597",
"0.5138134",
"0.51354593",
"0.51167816",
"0.5106155",
"0.51030225",
"0.5100379",
"0.50808805",
"0.5075875",
"0.50714123",
"0.50571376",
"0.5053269",
"0.5029427",
"0.5026103",
"0.500274",
"0.4994015"
] |
0.66552895
|
0
|
end of function countdown_page()
|
function countdown_setup($data_name,$div_name) {
?><script id="<?php echo $data_name;?>" type="text/countdown"><?php echo countdown_get_contents(); ?></script>
<script>
/*[ongoing event]
The <span style='color:#ffd800;'>$1</span> is going on!
[countto event]
Countdown to the <span style='color:#ffd800;font-size:100%;'>$1</span>:<br class=mobileonly>###
examples:
[countto Rochester ACS <em>Relay for Life </em>]
[ongoing Rochester ACS <em>Relay for Life </em>]*/
(function() { // scopes
var data = <?php echo $data_name;?>.innerHTML.split("\n");
var r = [];
for (var i = 0; i < data.length; i++) {
if (data[i] != "") {
var epoch = 1*data[i].replace(/^(\d+).*/,"$1");
var message = data[i].replace(/^\d+ (.*)/,"$1");
message = message.replace(/\[ongoing ([^\]]*)\]/,"The <span style='color:#ffd800;'>$1</span> is going on!");
message = message.replace(/\[countto ([^\]]*)\]/,"Countdown to the <span style='color:#ffd800;font-size:100%;'>$1</span>:<br class=mobileonly>###");
r.push({epoch:epoch,message:message});
}
}
function pluralUnit(num,tex) {
return "<span style='display:inline-block;'><span style='font-weight:bold;color:#ffd800;padding-left:10px;width:30px;display:inline-block;text-align:center;font-size:100%;'>" + num + "</span> " + tex + (num != 1 ? "s" : "") + " " + "</span>";
}
function loop() {
var now = Date.now();
var i = 0;
while (i < r.length && r[i].epoch < now) {
i++;
}
var s = "";
if (i < r.length) {
// message
var difference = r[i].epoch - now;
var message = r[i].message;
// next, add in the fancy time thing
var rem = difference / 1000; //rem is in seconds
var minSec = 60;
var hrSec = 60*minSec;
var daySec = 24*hrSec;
var weekSec = 7*daySec;
var weeks = Math.floor(rem / weekSec);
rem = rem % weekSec;
var days = Math.floor(rem / daySec);
rem = rem % daySec;
var hours = Math.floor(rem / hrSec);
rem = rem % hrSec;
var minutes = Math.floor(rem / minSec);
rem = rem % minSec;
var seconds = Math.floor(rem);
var timeString = (weeks != 0 ? pluralUnit(weeks,"week") : "") + (days != 0 ? pluralUnit(days,"day") : "")+ pluralUnit(hours,"hour") + pluralUnit(minutes,"minute") + pluralUnit(seconds,"second");
s = message.replace("###",timeString);
}
<?php echo $div_name;?>.innerHTML = s;
}
loop();
setInterval(loop,1000); // render every second
})();
</script>
<?php
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"function countdown($year,$month,$day,$hour,$min,$sec,$setup) {\r\nrequire(\"$setup.php\");\r\n$future_time = mktime($hour,$min,$sec,$month,$day,$year);\r\n\r\n$curr_time = time();\r\n$utcdiff = date('Z', $curr_time);\r\n$user_time = $curr_time - $utcdiff + ($utc_diff * 3600);\r\n$time_diff = $future_time - $user_time;\r\n\r\nswitch($style) {\r\n\t// Style 1\r\n\tcase 1:\r\n$n_years = intval($time_diff/31536000);\r\n$sec_rem = $time_diff%31536000;\r\n$n_days = intval($sec_rem/86400);\r\n$sec_rem = $sec_rem%86400;\r\n$n_hours = intval($sec_rem/3600);\r\n$sec_rem = $sec_rem%3600;\r\n$n_mins = intval($sec_rem/60);\r\n$n_secs = $sec_rem%60;\r\n\r\n\tswitch($n_years) {\r\n\t\tcase 0:\r\n\t\t$layout = \"\";\r\n\t\t$prev_empty = 1;\r\n\t\tbreak;\r\n\t\tcase 1:\r\n\t\t$layout = $n_years . \" $year_text \";\r\n\t\t$prev_empty = 0;\r\n\t\tbreak;\r\n\t\tdefault:\r\n\t\t$layout = $n_years . \" $years_text \";\r\n\t\t$prev_empty = 0;\r\n\t\tbreak;\r\n\t}\r\n\tswitch($n_days) {\r\n\t\tcase 0:\r\n\t\t\t if($prev_empty == 1) {\r\n\t\t\t $layout = \"\";\r\n\t\t\t $prev_empty = 1;\r\n\t\t\t }\r\n\t\t\t else {\r\n\t\t\t $layout .= $n_days . \" $days_text \";\r\n\t\t\t $prev_empty = 0;\r\n\t\t\t }\r\n\t\tbreak;\r\n\t\tcase 1:\r\n\t\t$layout .= $n_days . \" $day_text \";\r\n\t\t$prev_empty = 0;\r\n\t\tbreak;\r\n\t\tdefault:\r\n\t\t$layout .= $n_days . \" $days_text \";\r\n\t\t$prev_empty = 0;\r\n\t\tbreak;\r\n\t}\r\n\tswitch($n_hours) {\r\n\t\tcase 0:\r\n\t\t\t if($prev_empty == 1) {\r\n\t\t\t $layout = \"\";\r\n\t\t\t $prev_empty = 1;\r\n\t\t\t }\r\n\t\t\t else {\r\n\t\t\t $layout .= $n_hours . \" $hours_text \";\r\n\t\t\t $prev_empty = 0;\r\n\t\t\t }\r\n\t\tbreak;\r\n\t\tcase 1:\r\n\t\t$layout .= $n_hours . \" $hour_text \";\r\n\t\tbreak;\r\n\t\tdefault:\r\n\t\t$layout .= $n_hours . \" $hours_text \";\r\n\t\tbreak;\r\n\t}\r\n\tswitch($n_mins) {\r\n\t\tcase 0:\r\n\t\t\t if($prev_empty == 1) {\r\n\t\t\t $layout = \"\";\r\n\t\t\t $prev_empty = 1;\r\n\t\t\t }\r\n\t\t\t else {\r\n\t\t\t $layout .= $n_mins . \" $mins_text \";\r\n\t\t\t $prev_empty = 0;\r\n\t\t\t }\r\n\t\tbreak;\r\n\t\tcase 1:\r\n\t\t$layout .= $n_mins . \" $min_text \";\r\n\t\tbreak;\r\n\t\tdefault:\r\n\t\t$layout .= $n_mins . \" $mins_text \";\r\n\t\tbreak;\r\n\t}\r\n\tswitch($n_secs) {\r\n\t\tcase 0:\r\n\t\t\t if($prev_empty == 1) {\r\n\t\t\t $layout = \"\";\r\n\t\t\t $prev_empty = 1;\r\n\t\t\t }\r\n\t\t\t else {\r\n\t\t\t $layout .= $n_secs . \" $secs_text \";\r\n\t\t\t $prev_empty = 0;\r\n\t\t\t }\r\n\t\tbreak;\r\n\t\tcase 1:\r\n\t\t$layout .= $n_secs . \" $sec_text \";\r\n\t\tbreak;\r\n\t\tdefault:\r\n\t\t$layout .= $n_secs . \" $secs_text \";\r\n\t\tbreak;\r\n\t}\r\n\t\r\n\tif($layout == \"\" || $n_secs < 0) {\r\n\techo \"$msg_complete\";\r\n\t}\r\n\telse {\r\n\techo $layout;\r\n\t}\r\n\tbreak;\r\n\t\r\n\t// Style 2\r\n\tcase 2:\r\n$n_days = intval($time_diff/86400);\r\n\t\tswitch($n_days) {\r\n\t\t\t case 0:\r\n\t\t\t echo \"$msg_complete\";\r\n\t\t\t break;\r\n\t\t\t case 1:\r\n\t\t\t echo $n_days . \" $day_text\";\r\n\t\t\t break;\r\n\t\t\t default:\r\n\t\t\t echo $n_days . \" $days_text\";\r\n\t\t\t break;\r\n\t\t}\r\n\tbreak;\r\n\t\r\n\t// Style 3\r\n\tcase 3:\r\n$n_hours = intval($time_diff/3600);\r\n\t\tswitch($n_hours) {\r\n\t\t\t case 0:\r\n\t\t\t echo \"$msg_complete\";\r\n\t\t\t break;\r\n\t\t\t case 1:\r\n\t\t\t echo $n_hours . \" $hour_text\";\r\n\t\t\t break;\r\n\t\t\t default:\r\n\t\t\t echo $n_hours . \" $hours_text\";\r\n\t\t\t break;\r\n\t\t}\r\n\tbreak;\r\n\t\r\n\t// Style 4\r\n\tcase 4:\r\n$n_mins = intval($time_diff/60);\r\n\t\tswitch($n_mins) {\r\n\t\t\t case 0:\r\n\t\t\t echo \"$msg_complete\";\r\n\t\t\t break;\r\n\t\t\t case 1:\r\n\t\t\t echo $n_mins . \" $min_text\";\r\n\t\t\t break;\r\n\t\t\t default:\r\n\t\t\t echo $n_mins . \" $mins_text\";\r\n\t\t\t break;\r\n\t\t}\r\n\tbreak;\r\n\t\r\n\t// Style 5\r\n\tcase 5:\r\n$n_secs = $time_diff;\r\n\t\tswitch($n_secs) {\r\n\t\t\t case 0:\r\n\t\t\t echo \"$msg_complete\";\r\n\t\t\t break;\r\n\t\t\t case 1:\r\n\t\t\t echo $n_secs . \" $sec_text\";\r\n\t\t\t break;\r\n\t\t\t default:\r\n\t\t\t echo $n_secs . \" $secs_text\";\r\n\t\t\t break;\r\n\t\t}\t\t\r\n}\r\n\r\n// End function\r\n}",
"function warquest_holiday_message() {\r\n\r\n\t/* input */\r\n\tglobal $player;\r\n\tglobal $config;\r\n\t\r\n\t/* output */\r\n\tglobal $page;\r\n\t\r\n\tif ($player->holiday_date > date(\"Y-m-d H:i:s\", time())) {\r\n\t\r\n\t\t$value = strtotime($player->holiday_date)-time();\r\n\t\r\n\t\t$page .= '<script language=\"JavaScript\" src=\"'.$config[\"content_url\"].'js/countdown5.js\" type=\"text/javascript\"></script>';\r\n\t\r\n\t\t$tmp = '<div class=\"countdown\"><div id=\"countdown_time5\"></div></div>';\t\t\r\n\t\t\t\t\r\n\t\t$message = '<table>';\r\n\t\t$message .= '<tr>';\r\n\t\t$message .= '<td width=\"200\">';\r\n\t\t$message .= warquest_image(\"restore/restore8.jpg\", ' width=\"170\" height=\"120\" ');\r\n\t\t$message .= '</td>';\r\n\t\t$message .= '<td>';\r\n\t\t$message .= '<div class=\"subparagraph\"><b>'.t('HOME_HOLIDAY').'</b></div>';\r\n\t\t$message .= t('HOME_HOLIDAY_PERIOD_ACTIVE', $tmp);\r\n\t\t$message .= '</td>';\r\n\t\t$message .= '</tr>';\r\n\t\t$message .= '</table>';\r\n\t\t\t\t\t\t\r\n\t\t$page .= warquest_box(\"\", $message);\t\r\n\t\t\t\t\t\t\r\n\t\t$page .= '<script language=\"JavaScript\" type=\"text/javascript\">';\r\n\t\t$page .= \"countdown5.init(\".$value.\", 'countdown_time5', '00:00:00');\"; \r\n\t\t$page .= '</script>';\r\n\t}\r\n}",
"function learn_press_single_quiz_timer() {\n\t\tlearn_press_get_template( 'content-quiz/timer.php' );\n\t}",
"function goPageTimer($url, $timer)\n{\n echo '\n <script type=\"text/javascript\">window.setTimeout(\"location=(\\'' . $url . '\\');\",' . $timer . ');</script>\n ';\n}",
"function msd_create_countdown_menu() {\n\tadd_menu_page(\n\t \t'CountDown Menu', \n\t \t'CountDown', \n\t \t'administrator', \n\t \t__FILE__, \n\t \t'msd_countdown_settings_page',\n\t\t'dashicons-admin-plugins'\n\t);\n\t\n\n}",
"public function endPage() {}",
"public function index(){\r\n $data = $this->common->getCommonData();\r\n \r\n $data['DirectorJS'] = '$(document).ready(function(){ Director.getUrl().timeCountdown(); });';\r\n \r\n $url = $this->input->get(\"url\", TRUE);\r\n $result = $this->db->select(\"id, count\")->from(\"redirects\")->where(\"url\", $url)->limit(1)->get()->result();\r\n $result = $result[0];\r\n $result->count = $result->count + 1;\r\n \r\n $this->db->where(\"id\", $result->id)->update(\"redirects\", array(\"count\" => $result->count));\r\n\r\n $this->parser->parse(\"crumbs/header\", $data);\r\n $this->parser->parse(\"director/home\", $data);\r\n $this->parser->parse(\"crumbs/footer\", $data);\r\n }",
"function showCountdowns(int $eventid) \n {\n // CHECK IF USER HASNT ZUGESAGT YET\n echo \"<div class='separateDivBox'>\";\n $countdowns = $this->sqlselect(\"SELECT * FROM eventcountdowns WHERE eventid=$eventid ORDER BY enddate\");\n\n $datetime1 = new DateTime(date(\"Y-m-d\"));\n for ($i = 0; $i < sizeof($countdowns); $i++) {\n\n $datetime2 = new DateTime($countdowns[$i]->enddate);\n $diff = $datetime1->diff($datetime2);\n echo \"<h2>Noch \" . $diff->format('%a Tage') . \", dann ist es soweit.</h2>\";\n }\n\n echo \"</div>\";\n }",
"function _endpage()\n\t\t{\n\t\t\t$this->state=1;\n\t\t}",
"function endPage(){\n global $_inContainer, $_pageName, $_loadChosen;\n require('inc/pageend.php');\n}",
"function send_countdown_if_appropriate($location_code, $trip_type)\n{\n\t$l_counter = 0;\n $do_send = true;\n $m_unit_send_ct = 0;\n $now = new DateTime();\n\n // Analyze the countdown parameters to work out which \n // countdown value is applicable whether to send in hhMM format etc\n // && $return previous values\n $this->get_countdown_values();\n\n if ( $this->should_send ($trip_type) )\n {\n // Reload countdown to check its counted down\n\t if ( true ) //$this->load( array(\"shedule_id\", \"sequence\") ) );\n {\n if ( !$this->counted_down )\n {\n\t\t\t\tswitch ( $this->display_type )\n {\n case \"B\":\n $m_status = $this->send_cntdwn_msg();\n break;\n case \"U\":\n $w_display_line = true;\n $m_status = $this->send_cntdwn_msg();\n break;\n case \"T\" :\n $m_status = $this->send_xmcountdownType($this->predictionParameters[\"countdown_dep_arr\"]);\n break;\n case \"S\" :\n $m_status = $this->send_surtronic_cntdwn_msg($this->predictionParameters[\"countdown_dep_arr\"], $loccode);\n break;\n default:\n // Not bus stop || $bus terminal - Omnistop, RTIG-XML?\n $m_status = 0;\n }\n\t\t\t\tif ( !$m_status ) {\n $this->text = $this->text. \" *FAIL* \";\n\t\t\t\t} else {\n\t\t\t\t\t$l_counter = $l_counter + 1;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\techo \" Already counted down select failed with status\". m_status.\"\\n\";\n\t\t\t}\n }\n }\n return $l_counter;\n}",
"function pantomime_num_queries(){\n\techo '<p id=\"footer-num-queries\">';\n\t_e('Generated from '. get_num_queries() .' queries in '. timer_stop(0,3) .' seconds.', 'pantomime');\n\techo '</p>';\n}",
"function genEventCountdownCard($event)\n{\n\n $startDate = date(\"jS F Y\", $event->startTime);\n $endDate = date(\"jS F Y\", $event->endTime);\n $endTime = date(\"g:iA\", $event->endTime);\n $startTime = date(\"g:iA\", $event->startTime);\n $endDate = $startDate === $endDate ? \"\" : \" - \" . $endDate;\n $location = $event->isOnline ? \"Remote\" : $event->location;\n $reservationsLeft = $event->tickets == 0 ? \"Unlimited\" : $event->getTicketsLeft();\n $name = htmlspecialchars($event->name);\n echo \" <a href='/event.php?event={$event->id}' class='upcoming-event'>\n <main class='content'>\n <h4 class='title'>{$name}</h4>\n <img class='event-image' src='{$event->image}' />\n <ul class='extra-details'>\n <li>\n <i class='far fa-clock'></i>\n {$startTime} - {$endTime}\n </li>\n <li>\n <i class='far fa-calendar-alt'></i>\n {$startDate}{$endDate}\n </li>\n <li>\n <i class='fas fa-map-marked-alt'></i>\n\n {$location}\n </li>\n </ul>\n </main>\n <div class='kitchen-sink'>\n <div class='item'>\n <p>Reservations Left</p>\n <h5>{$reservationsLeft}</h5>\n </div>\n <div class='item'>\n <p>Event registeration ends in</p>\n <h5 class='countdown' endTime='{$event->endTime}'></h5>\n </div>\n\n </div>\n </a>\";\n}",
"function endPage () {\n\tglobal $pageEnd;\n\techo $pageEnd;\n}",
"public function deprecated_adminpage() {\n\t\t?>\n\t\t<script type=\"text/javascript\">\n\t\t\tvar count = 6;\n\t\t\tvar redirect = \"<?php echo esc_url_raw( admin_url( 'themes.php?page=fusion_options' ) ); ?>\";\n\n\t\t\tfunction countDown(){\n\t\t\t\tvar timer = document.getElementById(\"timer\");\n\t\t\t\tif (count > 0){\n\t\t\t\t\tcount--;\n\t\t\t\t\t<?php /* translators: Number. */ ?>\n\t\t\t\t\ttimer.innerHTML = \"<?php printf( esc_html__( 'Theme options have changed, redirecting you to the new page in %s seconds.', 'Avada' ), '\" + count + \"' ); ?>\";\n\t\t\t\t\tsetTimeout(\"countDown()\", 1000);\n\t\t\t\t} else {\n\t\t\t\t\twindow.location.href = redirect;\n\t\t\t\t}\n\t\t\t}\n\t\t</script>\n\t\t<span id=\"timer\" style=\"font-size: 1.7em; padding: 100px; text-align: center; line-height: 10em;\"><script type=\"text/javascript\">countDown();</script></span>\n\t\t<?php\n\t}",
"public function ee_breakouts_page_load() {}",
"public static function counter() {}",
"function counter($js=false) {\n global $sql,$useronline,$where,$isSpider,$cache;\n \n if(!$js) {\n $counter = '<div style=\"width:100%;padding:10px 0;text-align:center\"><img src=\"../inc/images/ajax_loading.gif\" alt=\"\" /></div>'.\n \"<script language=\\\"javascript\\\" type=\\\"text/javascript\\\">DZCP.initDynLoader('navCounter','counter','',true);</script>\";\n } else {\n if(!$isSpider) {\n if(!$cache->isExisting('counter')) {\n $get2day = $sql->fetch(\"SELECT `visitors` FROM `{prefix_counter}` WHERE `today` = ?;\",array(date(\"j.n.Y\")));\n if($sql->rowCount()) {\n $v_today = $get2day['visitors'];\n }\n\n $gestern = time() - 86400;\n $tag = date(\"j\", $gestern);\n $monat = date(\"n\", $gestern);\n $jahr = date(\"Y\", $gestern);\n $yesterday = $tag.\".\".$monat.\".\".$jahr;\n\n $yDay = 0;\n $getyday = $sql->fetch(\"SELECT `visitors` FROM `{prefix_counter}` WHERE `today` = ?;\",array($yesterday));\n if($sql->rowCount()) {\n $yDay = $getyday['visitors'];\n }\n\n $getstats = $sql->fetch(\"SELECT SUM(visitors) AS `allvisitors`, \"\n . \"MAX(visitors) AS `maxvisitors`, \"\n . \"MAX(maxonline) AS `maxonline`, \"\n . \"AVG(visitors) AS `avgvisitors`, \"\n . \"SUM(visitors) AS `allvisitors` \"\n . \"FROM `{prefix_counter}`;\");\n\n $info = '';\n if(($online_reg = online_reg()) != 0) {\n $qryo = $sql->select(\"SELECT `id` FROM `{prefix_users}` WHERE (time+?) > ? AND `online` = 1 ORDER BY `nick`;\",array($useronline,time()));\n $kats = ''; $text = '';\n if($sql->rowCount()) {\n foreach($qryo as $geto) {\n $kats .= fabo_autor($geto['id']).';';\n $text .= jsconvert(getrank($geto['id'])).';';\n }\n }\n\n $info = 'onmouseover=\"DZCP.showInfo(\\''._online_head.'\\', \\''.$kats.'\\', \\''.$text.'\\')\" onmouseout=\"DZCP.hideInfo()\"';\n }\n\n $counter = show(\"menu/counter\", array(\"v_today\" => $v_today,\n \"v_yesterday\" => $yDay,\n \"v_all\" => ($getstats['allvisitors']),\n \"v_perday\" => round($getstats['avgvisitors'], 2),\n \"v_max\" => $getstats['maxvisitors'],\n \"g_online\" => strval(online_guests($where)),\n \"u_online\" => strval($online_reg),\n \"info\" => $info,\n \"v_online\" => $getstats['maxonline']));\n \n $cache->set('counter', $counter, 6);\n } else {\n $counter = $cache->get('counter');\n }\n }\n }\n\n return '<div id=\"navCounter\">'.$counter.'</div>';\n}",
"public function timeout() {\n $data['header'] = $this->header;\n $this->load->view('report_timeout_v', $data);\n }",
"protected function calculatePageCacheTimeout() {}",
"private function please_wait_page($UID) {\n\t\t\tcfs_show_header(plugins_url( '', __FILE__ ), \"Please wait\");\n\t\t\t?>\n\t\t\t<div class=\"container theme-showcase\" role=\"main\">\n\t\t\t <!-- Main jumbotron for a primary marketing message or call to action -->\n\t\t\t <div class=\"jumbotron\">\n\t\t\t\t<?php $this->spinner_html(); ?>\n\t\t\t\t<h2 id=\"msg1\">Working... <span id=\"countDown\"></span></h2>\n\t\t\t\t<div id=\"msg2\"></div>\n\t\t\t\t<div id=\"msg3\"></div>\n\t\t\t\t<div id=\"errmsg\"></div>\n\t\t\t </div>\n\t\t\t</div> <!-- / .container -->\n\t\t\t<?php\n\t\t\tcfs_show_js_libs();\n\t\t\techo \"\\n<script type='text/javascript'>var cfs_uid='$UID';</script>\";\n\t\t\t$js_path = plugins_url( '/js/wait_page.js', __FILE__ );\n\t\t\techo \"\\n<script src='${js_path}'></script>\\n\";\n\t\t\tcfs_show_footer();\n\t\t}",
"public function getPageClose() {}",
"function showManageCountdowns(int $eventid) \n {\n echo \"<div class='separateDivBox'>\";\n echo \"<h3><a name='countdowns'>Countdowns</a></h3>\";\n $this->addCountdown($eventid);\n $this->deleteCountdown();\n\n $cdlist = $this->sqlselect(\"SELECT * FROM eventcountdowns WHERE eventid=$eventid ORDER BY enddate\");\n echo \"<table class='kontoTable'>\";\n echo \"<thead><td>Enddate</td><td id='small'>Optionen</td></thead>\";\n\n for ($i = 0; $i < sizeof($cdlist); $i++) {\n echo \"<tbody>\"; \n echo \"<td>\".$cdlist[$i]->enddate.\"</td><td><a href='?delCD=\".$cdlist[$i]->id.\"&eventid=$eventid#countdowns'>X</a></td>\"; \n \n echo \"</tbody>\";\n }\n echo \"</table>\";\n echo \"</div>\";\n }",
"function shutdown() {\n global $start;\n //echo \"\\n<!-- \" . round(microtime(true) - $start, 4) . \"s -->\";\n}",
"function get_html_pre_page_end();",
"function count_site_visit($from_admin_overview=false) {\r\n\tif (file_exists(COUNTER_FILE)) {\r\n\t\t$ignore = false;\r\n\t\t$current_agent = (isset($_SERVER['HTTP_USER_AGENT'])) ? addslashes(trim($_SERVER['HTTP_USER_AGENT'])) : \"no agent\";\r\n\t\t$current_time = time();\r\n\t\t$current_ip = $_SERVER['REMOTE_ADDR']; \r\n\t \r\n\t\t// daten einlesen\r\n\t\t$c_file = array();\r\n\t\t$handle = fopen(COUNTER_FILE, \"r\");\r\n\t \r\n\t \tif ($handle) {\r\n\t\t\twhile (!feof($handle)) {\r\n\t\t\t\t$line = trim(fgets($handle, 4096)); \r\n\t\t\t\tif ($line != \"\") {\r\n\t\t\t\t\t$c_file[] = $line;\r\n\t\t\t\t}\t\t \r\n\t\t\t}\r\n\t\t\tfclose ($handle);\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$ignore = true;\r\n\t\t}\r\n\t \r\n\t\t// bots ignorieren \r\n\t\tif (substr_count($current_agent, \"bot\") > 0) {\r\n\t\t\t$ignore = true;\r\n\t\t}\r\n\t\t \r\n\t \r\n\t\t// hat diese ip einen eintrag in den letzten expire sec gehabt, dann igornieren?\r\n\t\tfor ($i = 1; $i < sizeof($c_file); $i++) {\r\n\t\t\tlist($counter_ip, $counter_time) = explode(\"||\", $c_file[$i]);\r\n\t\t\t$counter_time = trim($counter_time);\r\n\t\t \r\n\t\t\tif ($counter_ip == $current_ip && $current_time-COUNTER_IP_EXPIRE < $counter_time) {\r\n\t\t\t\t// besucher wurde bereits gezählt, daher hier abbruch\r\n\t\t\t\t$ignore = true;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t \r\n\t\t// counter hochzählen\r\n\t\tif (!$ignore) {\r\n\t\t\tif (sizeof($c_file) == 0) {\r\n\t\t\t\t// wenn counter leer, dann füllen \r\n\t\t\t\t$add_line1 = date(\"z\") . \":1||\" . date(\"W\") . \":1||\" . date(\"n\") . \":1||\" . date(\"Y\") . \":1||1||1||\" . $current_time . \"\\n\";\r\n\t\t\t\t$add_line2 = $current_ip . \"||\" . $current_time . \"\\n\";\r\n\t\t\t \r\n\t\t\t\t// daten schreiben\r\n\t\t\t\t$fp = fopen(COUNTER_FILE,\"w+\");\r\n\t\t\t\tif ($fp) {\r\n\t\t\t\t\tflock($fp, LOCK_EX);\r\n\t\t\t\t\tfwrite($fp, $add_line1);\r\n\t\t\t\t\tfwrite($fp, $add_line2);\r\n\t\t\t\t\tflock($fp, LOCK_UN);\r\n\t\t\t\t\tfclose($fp);\r\n\t\t\t\t}\r\n\t\t\t \r\n\t\t\t\t// werte zur verfügung stellen\r\n\t\t\t\t$day = $week = $month = $year = $all = $record = 1;\r\n\t\t\t\t$record_time = $current_time;\r\n\t\t\t\t$online = 1;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t// counter hochzählen\r\n\t\t\t\tlist($day_arr, $week_arr, $month_arr, $year_arr, $all, $record, $record_time) = explode(\"||\", $c_file[0]);\r\n\t\t\t \r\n\t\t\t\t// day\r\n\t\t\t\t$day_data = explode(\":\", $day_arr);\r\n\t\t\t\t$day = $day_data[1];\r\n\t\t\t\tif ($day_data[0] == date(\"z\")) $day++; else $day = 1;\r\n\t\t\t \r\n\t\t\t\t// week\r\n\t\t\t\t$week_data = explode(\":\", $week_arr);\r\n\t\t\t\t$week = $week_data[1];\r\n\t\t\t\tif ($week_data[0] == date(\"W\")) $week++; else $week = 1;\r\n\t\t\t \r\n\t\t\t\t// month\r\n\t\t\t\t$month_data = explode(\":\", $month_arr);\r\n\t\t\t\t$month = $month_data[1];\r\n\t\t\t\tif ($month_data[0] == date(\"n\")) $month++; else $month = 1;\r\n\t\t\t \r\n\t\t\t\t// year\r\n\t\t\t\t$year_data = explode(\":\", $year_arr);\r\n\t\t\t\t$year = $year_data[1];\r\n\t\t\t\tif ($year_data[0] == date(\"Y\")) $year++; else $year = 1;\r\n\t\t\t \r\n\t\t\t\t// all\r\n\t\t\t\t$all++;\r\n\t\t\t \r\n\t\t\t\t// neuer record?\r\n\t\t\t\t$record_time = trim($record_time);\r\n\t\t\t\tif ($day > $record) {\r\n\t\t\t\t\t$record = $day;\r\n\t\t\t\t\t$record_time = $current_time;\r\n\t\t\t\t}\r\n\t\t\t \r\n\t\t\t\t// speichern und aufräumen und anzahl der online leute bestimmten\r\n\t\t\t \r\n\t\t\t\t$online = 1;\r\n\t\t\t \t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t// daten schreiben\r\n\t\t\t\t$fp = fopen(COUNTER_FILE,\"w+\");\r\n\t\t\t\tif ($fp) {\r\n\t\t\t\t\tflock($fp, LOCK_EX);\r\n\t\t\t\t\t$add_line1 = date(\"z\") . \":\" . $day . \"||\" . date(\"W\") . \":\" . $week . \"||\" . date(\"n\") . \":\" . $month . \"||\" . date(\"Y\") . \":\" . $year . \"||\" . $all . \"||\" . $record . \"||\" . $record_time . \"\\n\";\t\t \r\n\t\t\t\t\tfwrite($fp, $add_line1);\r\n\r\n\t\t\t\t\tfor ($i = 1; $i < sizeof($c_file); $i++) {\r\n\t\t\t\t\t\tlist($counter_ip, $counter_time) = explode(\"||\", $c_file[$i]);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// übernehmen\r\n\t\t\t\t\t\tif ($current_time-COUNTER_IP_EXPIRE < $counter_time) {\r\n\t\t\t\t\t\t\t$counter_time = trim($counter_time);\r\n\t\t\t\t\t\t\t$add_line = $counter_ip . \"||\" . $counter_time . \"\\n\";\r\n\t\t\t\t\t\t\tfwrite($fp, $add_line);\r\n\t\t\t\t\t\t\t$online++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t$add_line = $current_ip . \"||\" . $current_time . \"\\n\";\r\n\t\t\t\t\tfwrite($fp, $add_line);\r\n\t\t\t\t\tflock($fp, LOCK_UN);\r\n\t\t\t\t\tfclose($fp);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}",
"function wptc_main_cycle() {\r\n\r\n\t$config = new WPTC_Config();\r\n\t$timestamp_plus_secs = time() + ADVANCED_SECONDS_FOR_TIME_CALCULATION;\r\n\t$usertime = $config->get_wptc_user_today_date_time('Y-m-d', $timestamp_plus_secs);\r\n\r\n\t//weekly backup validate\r\n\t// if (( wptc_is_weekly_backup_eligible($config) || ($config->get_option('wptc_today_main_cycle') != $usertime) ) && ($config->get_option('wptc_main_cycle_running') != true) && $config->get_option('first_backup_started_atleast_once') ) {\r\n\tif ($config->get_option('wptc_today_main_cycle') != $usertime && ($config->get_option('wptc_main_cycle_running') != true) && $config->get_option('first_backup_started_atleast_once') ) {\r\n\t\t$config->set_option('wptc_main_cycle_running', true);\r\n\t\twptc_main_cycle_event();\r\n\t} else {\r\n\t\tif ($config->get_option('wptc_main_cycle_running') && $config->get_option('first_backup_started_atleast_once') && !is_any_ongoing_wptc_backup_process()) {\r\n\t\t\t\t$config->set_option('wptc_main_cycle_running', true);\r\n\t\t\t\t$config->get_option('wptc_main_cycle_running', false);\r\n\t\t\t\twptc_log(array(), '---------declined_by_wptc_main_cycle RARE case------------');\r\n\t\t}\r\n\t\twptc_log(array(), '---------declined_by_wptc_main_cycle------------');\r\n\t\tsend_response_wptc('declined_by_wptc_main_cycle', 'SCHEDULE');\r\n\t}\r\n}",
"function om13_wait_for_going_live() {\n\tif (time() < 1365447600 && !is_user_logged_in()) {\n\t\twp_die('Die Website der #om13 ist demnächst verfügbar. Bei Fragen kannst du gern den Twitteraccount <a href=\"https://twitter.com/openmindkonf\">@openmindkonf</a> kontaktieren. Wir freuen uns auf dich!'); // TODO: __\n\t}\n}",
"function L_PageLoadTime() {\n\t\n\t/*\n\t\t$time = microtime();\n\t\t$time = explode(' ', $time);\n\t\t$time = $time[1] + $time[0];\n\t\t$finish = $time;\n\t\t$total_time = round(($finish - $start), 4);\n\t\t\n\t*/\n\t\n\t/*\n\t\t$end_time = microtime(TRUE);\n\t\t$time_taken = $end_time - $start_time;\n\t\t$time_taken = round($time_taken,5);\n\t\t\n\t*/\n\t\n\t\t// Start of code\n\t\t$time = microtime(true); // Gets microseconds\n\n\t\t// End of code\n\t\t$time_taken = (microtime(true) - $time);\n\t\t\n\t\treturn _e('Page generated in ' . $time_taken . ' seconds.','leonite');\n\n\t}",
"function DisplayTimer( $html='' )\n {\n $format = '<p style=\"text-align:center\">Script runtime: %.5f %s</p>';\n if( !empty($html) ):\n $format = preg_replace( '/\\[dec=([0-9]+)\\]/i', '%.$1f %s', $html, 1 );\n endif;\n $time = $this->pCalcTime();\n $sec = ( ($time > 1) ? 'secs.' : 'sec.' );\n printf( $format.NL, $time, $sec );\n }"
] |
[
"0.65994203",
"0.6133335",
"0.59521294",
"0.58889204",
"0.5875551",
"0.58207107",
"0.5803611",
"0.5793945",
"0.57295513",
"0.5703443",
"0.5678263",
"0.56755894",
"0.5578181",
"0.55665773",
"0.5557625",
"0.554954",
"0.5546846",
"0.5539047",
"0.5508629",
"0.5470375",
"0.5464553",
"0.5462391",
"0.5431893",
"0.5431844",
"0.5428822",
"0.54249585",
"0.53951544",
"0.53423226",
"0.53322774",
"0.53304267"
] |
0.66792786
|
0
|
Comprueba si la cesta tiene articulos
|
public function hayCesta(){
return (count($this->listArticulos)>0)?1:0;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private function checkOTOF($listeOT, $repo, $Art, $Creno) {\n\n $Horizon=10;\n //On va chercher les OT dans la CTJ pour chacun des CTO\n //On va commencer par regarder pour chaque OT de mon CTO si un OF existe dans mon CTJ\n $p=0;\n $TbDatasArt=[];\n foreach ($listeOT as $OTCTO) {\n //On cherche les articles liés à chaque OT\n $ArtOFCTJ=$Art->myFindByOT($OTCTO->getRef());\n // Cas des OT multi empreintes\n dump('Liste des articles composant l\\'OT'.$OTCTO->getRef());\n dump($ArtOFCTJ);\n if (sizeof($ArtOFCTJ)>1) {\n dump('Attention multi empreintes à traiter');\n $retourDatas=$this->checkOFChargMultiEmp($ArtOFCTJ, $Creno, $Horizon, $repo, $Art);\n } elseif (sizeof($ArtOFCTJ)==1) {\n //Il y a une seule pièce sur l'outillage\n $retourDatas[0]=$this->checkOFCharge($ArtOFCTJ[0], $Creno, $Horizon, $repo);\n //dump($TbDatasArt);\n }\n if (empty($retourDatas)==false) {\n $TbDatasArt[$OTCTO->getRef()]=$retourDatas;\n $p++;\n }\n $retourDatas=[];\n dump('Données à retourner correspondant à la charge et à l\\'OT');\n dump($TbDatasArt);\n }\n return $TbDatasArt;\n }",
"public function hasArticulations()\n {\n return ($this->articulations->count()) ? true : false;\n }",
"public function TieneCobranzasVigentes()\n\t{\n\t\t$q = Doctrine_Query::create()\n\t\t->from('CobranzaLiquidacion cl')\n\t\t->innerJoin('cl.Factura f')\n\t\t->andWhere('f.FechaAnulacion IS NULL')\n\t\t->where('cl.FacturaId = ?', $this->Id);\n\t\t \n\t\t$liquidaciones\t=\t $q->execute();\n\t\t\n\t\tif(count($liquidaciones) > 0)\n\t\t\treturn true;\n\t\t\n\t\treturn false;\n\t\t\n\t\t\n\t\t\n\t\t\n\t}",
"public function verArtCompra ($id)\n {\n $carrito = \\Session::get('carrito');\n $cont = \"0\";\n foreach ($carrito as $art ) {\n if (($art->id) == $id) {\n $cont = \"1\";\n return $cont;\n }\n } \n }",
"public function getIsVisible(){\n\t\tif(is_array($this->productos))\n\t\t{\t\t\n\t\t\tforeach($this->lookhasproducto as $lookhasproducto){\n\t\t\t\tif($lookhasproducto->producto->getCantidad(null, $lookhasproducto->color_id) > 0 && \n $lookhasproducto->producto->estado == 0)\n\t\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"protected function marcarArticulosTemporales($articulos)\n {\n $venta_temporal = $this->getArrayTemporal(VentaTemporal::class);\n\n // Verifico los articulos que fueron seleccionados y los marco\n foreach ($articulos as $articulo_existente) {\n foreach ($venta_temporal as $articulo_a_vender) {\n if ($articulo_existente->DatosArticulo->codigo == $articulo_a_vender['codigo']\n && $articulo_existente->Talle->nombre == $articulo_a_vender['talle']\n && $articulo_existente->color == $articulo_a_vender['color']\n && $articulo_existente->DatosArticulo->Genero->nombre == $articulo_a_vender['genero']\n ) {\n $articulo_existente['seleccionado'] = true;\n $articulo_existente['cantidad_a_vender'] = $articulo_a_vender['cantidad'];\n\n $articulo_existente['subtotal'] =\n $articulo_a_vender['cantidad'] * $articulo_existente->DatosArticulo->precio;\n\n $articulo_existente['descuento'] = $articulo_a_vender['descuento'];\n\n\n // Si hay descuento, lo aplico\n if ($articulo_a_vender['descuento'] > 0) {\n $articulo_existente['subtotal'] =\n $articulo_existente['subtotal'] -\n $articulo_existente['subtotal'] * ($articulo_existente['descuento'] / 100);\n }\n }\n }\n }\n\n return $articulos;\n }",
"function contarReprobados($espacios_por_cursar){\n $cantidad=0;\n if(count($espacios_por_cursar)>0){\n foreach ($espacios_por_cursar as $key => $espacio) {\n if($espacio['REPROBADO']==1){\n $cantidad++;\n \t }\n }\n }\n return $cantidad; \n }",
"function aindaPrecisa ( array $array) {\n\n foreach($array as $item) {\n // Se no array tiver sub e não for vazio\n if(!empty($item['sub'])){\n return true;\n }\n }\n // Se acabar o loop se não tiver mais o que organizar\n return false;\n }",
"function afficheArticle ($infosArticles) {\n\n foreach ($infosArticles as $key => $articles ) {\n\n if ($key === 0 or $key === 3) {\n $positionArticle = \"left\";\n }\n\n if ($key === 1 or $key === 4) {\n $positionArticle = \"center\";\n }\n\n if ($key === 2 or $key === 5) {\n $positionArticle = \"right\";\n }\n\n echo \"<div class='bloc_$positionArticle'>\";\n echo \"<div class='page_$positionArticle'>\";\n echo \"<div class='image_section_centrale'><img src=$articles[0] alt =$articles[1]></div>\";\n echo \"<div class='article_$positionArticle'>\";\n echo \"<h1 class='title_$positionArticle'>$articles[2]</h1>\";\n echo \"<p> $articles[3]<br> <a href=$articles[3]>$articles[4]</a></p>\";\n echo \"</div></div>\";\n echo \"<img src='../Images/logo_commitTree.png' class='logo_$positionArticle' alt='logo commit tree'>\";\n echo \"</div>\";\n\n }\n}",
"function order_contains_equal_plates_and_engravings($order) {\n if (!empty($order->commerce_line_items)) {\n $order_wrapper = entity_metadata_wrapper('commerce_order', $order);\n $plates = 0;\n $engravings = 0;\n\n foreach ($order_wrapper->commerce_line_items as $line_item_wrapper) {\n if (!empty($line_item_wrapper->value()->commerce_product) && $line_item_wrapper->commerce_product->value()->type == 'plates') {\n $plates++;\n }\n\n if ($line_item_wrapper->value()->type == 'engraving') {\n $engravings++;\n }\n }\n\n // If there is an equal number\n if (($engravings + $plates == 0) || ($engravings == $plates)) {\n return TRUE;\n }\n }\n\n return FALSE;\n}",
"static public function agregarArticulo($datos) \n\t{\n\t\tif ($datos['nombree'] != '' && $datos['precioo'] > 0 && $datos['descripcionn'] != '') {\n\t\t\tif (ArticulosModel::crearArticulo($datos)) { //Accedemos al modelo\n\t\t\t\treturn \"Se registro correctamente\"; \n\t\t\t}else{\n\t\t\t\treturn \"No se realizó el registro\";\n\t\t\t}\n\t\t}else{\n\t\t\treturn \"Datos no validos\";\n\t\t}\t\n\t}",
"public function tieneReceta()\n {\n if (!is_null($this->receta)) {\n return true;\n }\n\n return false;\n }",
"function courtjus_trouver_objet($id_rubrique, $objets_in_rubrique) {\n\n\t// Aller chercher les filtres\n\tinclude_spip('inc/filtres');\n\tinclude_spip('inc/config');\n\n\t// On récupère le configuration du plugin\n\t$config = lire_config('courtjus');\n\n\t// Maintenant qu'on a le tableau des objets de la rubrique on compte\n\t$nb_objet = count($objets_in_rubrique);\n\n\t// Si on est à 0 objet, on descend dans une sous rubrique\n\tif ($nb_objet <= 0) {\n\t\t// On renvoie false pour déclencher éventuellement la recherche dans une sous rubrique\n\t\treturn false;\n\t} elseif ($nb_objet == 1) {\n\t\t// Un seul objet dans la rubrique, on renvoie le tableau\n\t\treturn generer_url_entite($objets_in_rubrique[0]['id_objet'], $objets_in_rubrique[0]['objet'], '', '', true);\n\t} elseif ($nb_objet > 1\n\t\t\t and array_sum(array_column($objets_in_rubrique, 'num_titre')) > 0\n\t\t\t and $config['num_titre'] == 'on') {\n\t\t// S'il y plusieurs objets dans la rubrique et que le mode \"par num titre\"\n\t\t// est activé, on regiride sur le num titre le plus petit.\n\n\t\t// On créer un tableau avec uniquement les num titre\n\t\t$minmax = array_column($objets_in_rubrique, 'num_titre');\n\n\t\t// On va filtrer ce tableau pour n'avoir que des nombres à tester\n\t\t$minmax = array_filter($minmax, 'is_numeric');\n\n\t\t// On recherche l'index dans le tableau minmax\n\t\t$index = array_search(min($minmax), $minmax);\n\n\t\t// Créer l'URL de redirection\n\t\treturn generer_url_entite(\n\t\t\t$objets_in_rubrique[$index]['id_objet'],\n\t\t\t$objets_in_rubrique[$index]['objet'],\n\t\t\t'',\n\t\t\t'',\n\t\t\ttrue\n\t\t);\n\t} elseif ($nb_objet > 1\n\t\t\t and $config['recent'] == 'on') {\n\t\t// Si le mode par article le plus récent est activé\n\n\t\t// On créer un tableau avec uniquement les timestamps des dates\n\t\t$minmax = array_column($objets_in_rubrique, 'date');\n\n\t\t// On va filtrer ce tableau pour n'avoir que des nombres à tester\n\t\t$minmax = array_filter($minmax, 'is_numeric');\n\n\t\t// On recherche l'index avec le timestamp le plus grand\n\t\t$index = array_search(max($minmax), $minmax);\n\n\t\t// Créer l'URL de redirection\n\t\treturn generer_url_entite(\n\t\t\t$objets_in_rubrique[$index]['id_objet'],\n\t\t\t$objets_in_rubrique[$index]['objet'],\n\t\t\t'',\n\t\t\t'',\n\t\t\ttrue\n\t\t);\n\t}\n}",
"public function articulos($id_compras_orden=false){\r\n\t\t$table \t\t\t\t= '';\r\n\t\t$accion \t\t\t= $this->tab['articulos'];\r\n\t\t$uso_interno\t\t= (!$id_compras_orden)?false:true;\r\n\t\t$id_compras_orden \t= (!$id_compras_orden)?$this->ajax_post('id_compras_orden'):$id_compras_orden;\r\n\t\t$detalle \t\t\t= $this->ordenes_model->get_orden_unico($id_compras_orden);\r\n\r\n\t\t$data_sql = array('id_compras_orden'=>$id_compras_orden);\r\n\t\t$data_listado=$this->db_model->db_get_data_orden_listado_registrado_unificado($data_sql);\r\n\t\t$moneda = $this->session->userdata('moneda');\r\n\t\tif(count($data_listado)>0){\r\n\t\t\t\t$style_table='display:block';\r\n\t\t\t\t$html='';\r\n\t\t\tfor($i=0;count($data_listado)>$i;$i++){\r\n\t\t\t\t// Lineas\r\n\t\t\t\t$peso_unitario = (substr($data_listado[$i]['peso_unitario'], strpos($data_listado[$i]['peso_unitario'], \".\" ))=='.000')?number_format($data_listado[$i]['peso_unitario'],0):$data_listado[$i]['peso_unitario'];\r\n\t\t\t\t$presentacion_x_embalaje = (substr($data_listado[$i]['presentacion_x_embalaje'], strpos($data_listado[$i]['presentacion_x_embalaje'], \".\" ))=='.000')?number_format($data_listado[$i]['presentacion_x_embalaje'],0):$data_listado[$i]['presentacion_x_embalaje'];\r\n\t\t\t\t$embalaje = ($data_listado[$i]['embalaje'])?$data_listado[$i]['embalaje'].' CON ':'';\r\n\r\n\t\t\t\t//print_debug($data_listado);\r\n\t\t\t\t$Data['consecutivo'] \t\t\t\t =\t ($i+1);\r\n\t\t\t\t$Data['id_compras_articulo_precios'] =\t $data_listado[$i]['id_compras_articulo_precios'];\r\n\t\t\t\t$Data['id_compras_articulo_presentacion'] =\t $data_listado[$i]['id_compras_articulo_presentacion'];\r\n\t\t\t\t$Data['id_compras_orden_articulo'] =\t $data_listado[$i]['id_compras_orden_articulo'];\r\n\t\t\t\t$Data['id_compras_articulo'] \t\t =\t $data_listado[$i]['id_compras_articulo'];\r\n\t\t\t\t$Data['id_articulo_tipo'] \t\t \t =\t $data_listado[$i]['id_articulo_tipo'];\r\n\t\t\t\t$Data['id_compras_um'] \t\t\t \t =\t $data_listado[$i]['id_compras_um'];\r\n\t\t\t\t$Data['um_x_embalaje'] \t\t\t \t =\t $data_listado[$i]['um_x_embalaje'];\r\n\t\t\t\t$Data['um_x_presentacion'] \t\t \t =\t $data_listado[$i]['um_x_presentacion'];\r\n\t\t\t\t$Data['unidad_minima'] \t\t\t \t =\t $data_listado[$i]['unidad_minima'];\r\n\t\t\t\t$Data['cl_um']\t\t\t\t\t \t =\t $data_listado[$i]['cl_um'];\r\n\t\t\t\t$Data['nombre_comercial']\t\t\t =\t $data_listado[$i]['nombre_comercial'];\r\n\t\t\t\t$Data['articulo']\t\t\t\t\t =\t $data_listado[$i]['articulo'].' - '.$data_listado[$i]['presentacion_detalle'];\r\n\t\t\t\t$Data['peso_unitario'] \t\t\t \t =\t $peso_unitario;\r\n\t\t\t\t$Data['upc'] \t\t\t\t\t\t =\t 'SKU:'.$data_listado[$i]['sku'].' UPC:'.$data_listado[$i]['upc'];\r\n\t\t\t\t$Data['presentacion_x_embalaje'] \t =\t $embalaje.$presentacion_x_embalaje;\r\n\t\t\t\t$Data['presentacion'] \t\t\t\t =\t $data_listado[$i]['presentacion'];\r\n\t\t\t\t$Data['costo_sin_impuesto'] \t\t =\t $data_listado[$i]['costo_sin_impuesto'];\r\n\t\t\t\t$Data['moneda'] \t\t\t\t\t =\t $moneda;\r\n\t\t\t\t$Data['cantidad'] \t\t\t\t\t =\t $data_listado[$i]['cantidad'];\r\n\t\t\t\t$Data['costo_x_cantidad'] \t\t\t =\t $data_listado[$i]['costo_x_cantidad'];\r\n\t\t\t\t$Data['descuento'] \t\t\t\t \t =\t $data_listado[$i]['descuento'];\r\n\t\t\t\t$Data['subtotal'] \t\t\t\t\t =\t $data_listado[$i]['subtotal'];\r\n\t\t\t\t$Data['impuesto_porcentaje'] \t\t =\t $data_listado[$i]['impuesto_porcentaje'];\r\n\t\t\t\t$Data['valor_impuesto']\t\t\t \t =\t $data_listado[$i]['valor_impuesto'];\r\n\t\t\t\t$Data['total'] \t\t\t\t\t \t =\t $data_listado[$i]['total'];\r\n\t\t\t\t$Data['number_costo_sin_impuesto'] =\t number_format($data_listado[$i]['costo_sin_impuesto'],2);\r\n\t\t\t\t$Data['number_cantidad'] \t\t\t =\t number_format($data_listado[$i]['cantidad'],0);\r\n\t\t\t\t$Data['number_costo_x_cantidad'] \t =\t number_format($data_listado[$i]['costo_x_cantidad'],2);\r\n\t\t\t\t$Data['number_descuento'] \t\t\t =\t number_format($data_listado[$i]['descuento'],0);\r\n\t\t\t\t$Data['number_subtotal']\t\t\t =\t number_format($data_listado[$i]['subtotal'],2);\r\n\t\t\t\t$Data['number_impuesto_porcentaje'] =\t number_format($data_listado[$i]['impuesto_porcentaje'],0);\r\n\t\t\t\t$Data['number_valor_impuesto']\t\t =\t number_format($data_listado[$i]['valor_impuesto'],2);\r\n\t\t\t\t$Data['number_total']\t\t\t\t =\t number_format($data_listado[$i]['total'],2);\r\n\r\n\t\t\t\t$url_listado_tpl = $this->modulo.'/'.$this->seccion.'/'.$this->submodulo.'/'.'entradas_recepcion_listado';\r\n\t\t\t\t$html.=$this->load_view_unique($url_listado_tpl ,$Data, true);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse{\r\n\t\t\t$style_table='display:none';\r\n\t\t\t$html='';\r\n\t\t}\r\n\t\t$data='';\r\n\t\t$proveedores = $this->ordenes_model->db_get_proveedores($data,$detalle[0]['id_proveedor']);\r\n\t\t$sucursales\t = $this->sucursales_model->get_orden_unico_sucursal($detalle[0]['id_sucursal']);\r\n\t\t$forma_pago\t = $this->formas_de_pago_model->get_orden_unico_formapago($detalle[0]['id_forma_pago']);\r\n\t\t$creditos\t = $this->creditos_model->get_orden_unico_credito($detalle[0]['id_credito']);\r\n\t\t$orden_tipo\t = $this->ordenes_model->db_get_tipo_orden($detalle[0]['id_orden_tipo']);\r\n\t\t\r\n\t\t$fec=explode('-',$detalle[0]['entrega_fecha']);\r\n\t\t$entrega_fecha=$fec[2].'/'.$fec[1].'/'.$fec[0];\r\n\t\t$fec2=explode('-',$detalle[0]['orden_fecha']);\r\n\t\t$orden_fecha=$fec2[2].'/'.$fec2[1].'/'.$fec2[0];\r\n\t\t$tabData['id_compras_orden']\t\t = $id_compras_orden;\r\n\t\t$tabData['orden_num'] \t\t\t = $this->lang_item(\"orden_num\",false);\r\n $tabData['proveedor'] \t \t\t\t = $this->lang_item(\"proveedor\",false);\r\n\t\t$tabData['sucursal'] \t\t\t = $this->lang_item(\"sucursal\",false);\r\n $tabData['orden_fecha'] \t\t = $this->lang_item(\"orden_fecha\",false);\r\n\t\t$tabData['entrega_fecha'] = $this->lang_item(\"entrega_fecha\",false);\r\n $tabData['observaciones'] \t = $this->lang_item(\"observaciones\",false);\r\n $tabData['forma_pago'] \t\t\t = $this->lang_item(\"forma_pago\",false);\r\n\t\t$tabData['articulo'] \t\t\t \t = $this->lang_item(\"articulo\",false);\r\n\t\t$tabData['costo_unitario']\t \t\t = $this->lang_item(\"costo_unitario\",false);\r\n\t\t$tabData['cantidad'] \t\t\t \t = $this->lang_item(\"cantidad\",false);\r\n\t\t$tabData['costo_cantidad'] \t = $this->lang_item(\"costo_cantidad\",false);\r\n\t\t$tabData['descuento'] \t\t\t \t = $this->lang_item(\"descuento\",false);\r\n\t\t$tabData['subtotal'] \t\t\t \t = $this->lang_item(\"subtotal\",false);\r\n\t\t$tabData['imp'] \t\t\t \t\t = $this->lang_item(\"imp\",false);\r\n\t\t$tabData['valor_imp'] \t\t\t \t = $this->lang_item(\"valor_imp\",false);\r\n\t\t$tabData['total'] \t\t\t \t\t = $this->lang_item(\"total\",false);\r\n\t\t$tabData['accion'] \t\t\t\t = $this->lang_item(\"accion\",false);\r\n\t\t$tabData['impuesto'] \t\t\t\t = $this->lang_item(\"impuesto\",false);\r\n\t\t$tabData['a_pagar'] \t\t\t\t = $this->lang_item(\"a_pagar\",false);\r\n\t\t$tabData['cerrar_orden'] \t\t \t = $this->lang_item(\"cerrar_orden\",false);\r\n\t\t$tabData['cancelar_orden']\t\t\t = $this->lang_item(\"cancelar_orden\",false);\r\n\t\t$tabData['presentacion']\t\t\t = $this->lang_item(\"embalaje\",false);\r\n\t\t$tabData['consecutivo']\t\t\t\t = $this->lang_item(\"consecutivo\",false);\r\n\t\t$tabData['moneda']\t\t\t\t \t = $moneda;\r\n\t\t$tabData['aceptar_orden']\t\t\t = $this->lang_item(\"aceptar_orden\",false);\r\n\t\t$tabData['devolucion_orden']\t\t = $this->lang_item(\"devolucion_orden\",false);\r\n\t\t$tabData['no_factura']\t\t \t\t = $this->lang_item(\"no_factura\",false);\r\n\t\t$tabData['fecha_factura']\t\t \t = $this->lang_item(\"fecha_factura\",false);\r\n\t\t$tabData['#']\t\t \t \t\t\t = $this->lang_item(\"#\",false);\r\n\t\t$tabData['costo_unitario']\t\t \t = $this->lang_item(\"costo_unitario\",false);\r\n\t\t$tabData['costo_cantidad']\t\t \t = $this->lang_item(\"costo_cantidad\",false);\r\n\t\t$tabData['valor_imp']\t\t \t \t = $this->lang_item(\"valor_imp\",false);\r\n\t\t$tabData['aceptar']\t\t \t \t\t = $this->lang_item(\"aceptar\",false);\r\n\t\t$tabData['comentarios_entrada']\t\t = $this->lang_item(\"comentarios_entrada\",false);\r\n\t\t$tabData['recibir_enetrada']\t\t = $this->lang_item(\"recibir_enetrada\",false);\r\n\t\t$tabData['rechazar_entrada']\t\t = $this->lang_item(\"rechazar_entrada\",false);\r\n\t\t$tabData['fecha_caducidad']\t\t \t = $this->lang_item(\"fecha_caducidad\",false);\r\n\t\t$tabData['acciones']\t\t \t \t = $this->lang_item(\"acciones\",false);\r\n\t\t$tabData['lote']\t\t \t \t \t = $this->lang_item(\"lote\",false);\r\n\t\t\r\n\r\n\t\t//DATA\r\n\t\t$tabData['orden_num_value']\t \t\t = $detalle[0]['orden_num'];\r\n\t\t$tabData['estatus']\t \t\t \t\t = $detalle[0]['estatus'];\r\n\t\t$tabData['observaciones_value']\t \t = $detalle[0]['observaciones'];\r\n\t\t$tabData['fecha_registro']\t \t \t = $detalle[0]['timestamp'];\r\n\t\t$tabData['list_sucursales']\t\t\t = $sucursales[0]['sucursal'];\r\n\t\t$tabData['orden_fecha_value']\t \t = $orden_fecha;\r\n\t\t$tabData['entrega_fecha_value']\t = $entrega_fecha;\r\n\t\t$tabData['list_forma_pago']\t\t\t = $forma_pago[0]['forma_pago'];\r\n\t\t$tabData['table']\t\t\t\t\t = $html;\r\n\t\t$tabData['style_table']\t\t\t\t = $style_table;\r\n\r\n\t\t$uri_view = $this->path.$this->submodulo.'/'.$accion;\r\n\t\tif(!$uso_interno){\r\n\t\t\techo json_encode( $this->load_view_unique($uri_view ,$tabData, true));\r\n\t\t}else{\r\n\t\t\t$includes['css'][] = array('name' => 'style.default', 'dirname' => '');\r\n\t\t\t$includes['css'][] = array('name' => 'estilos-custom', 'dirname' => '');\r\n\t\t\treturn $this->load_view_unique($uri_view ,$tabData, true, $includes);\r\n\t\t}\r\n\t}",
"public function v_cambiar_detalles(){\n\t\tif($this -> e_fragmento === '' && $this -> e_personaje === '' && $this -> e_tarea === '' && $this -> e_leyenda === '' && $this -> e_id === ''){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public function tieneAccesoATodasLasObras()\n {\n return is_null($this->id_obra);\n }",
"function mes_articles(){\n\t\tglobal $infos_id;\n\t\t$requete = \"SELECT titre, id FROM articles WHERE auteur='{$infos_id['id']}'\";\n\t\t$donnees = connexion($requete);\n\t\tif(mysql_num_rows($donnees) >= 1){\n\t\t\t$res = '<ul>';\n\t\t\twhile($ligne = mysql_fetch_assoc($donnees)){\n\t\t\t$res .= \t\"<li>\".\n\t\t\t\t\t\t\t\"<a href='index.php?where=article&id={$ligne['id']}'>\".$ligne['titre'].\"</a>\n\t\t\t\t\t\t</li>\";\n\t\t\t}\n\t\t\t$res .= \"</ul>\";\n\t\t\treturn $res;\n\t\t}else{\n\t\t\treturn \"<div>{$infos_id['prenom']} {$infos_id['nom']} a rédigé aucun article</div>\";\n\t\t}\n\t}",
"function verificarReprobados($notas_estudiante){\n $reprobados = 0;\n if(count($notas_estudiante)>0){\n foreach ($notas_estudiante as $key => $estudiantes) {\n if ((isset($estudiantes['NOTA'])?$estudiantes['NOTA']:0)<30 || $estudiantes['OBSERVACION']==20 || $estudiantes['OBSERVACION']==23 || $estudiantes['OBSERVACION']==25){\n $reprobados=1;\n break;\n }\n }\n }\n return $reprobados;\n }",
"public function hasItems(){\n return $this->_has(13);\n }",
"public function verMarcaslista(){\n\t\t\t//$this->producto->set(\"marca\",$marca);\n\t\t\t$resultado=$this->producto->verMarcaslista();\n\t\t return $resultado;\n\t\t\t\n\t\t}",
"function afficher_derniers_articles(){\n\t\tglobal $logger;\n\t\tif($logger){// si connecté, affiche article public et privé\n\t\t\t$requete = 'SELECT * FROM articles ORDER BY date DESC';\n\t\t}else{// sinon que public\n\t\t\t$requete = 'SELECT * FROM articles WHERE statut=\"0\" ORDER BY date DESC';\n\t\t}\n\t\t$donnees = connexion( $requete);\n\t\t$res = \"\";\n\t\t\n\t\tif(mysql_num_rows($donnees) < 1){\n\t\t\treturn \"<div>Aucun article récent trouvé</div>\";\n\t\t}else{\n\t\t\tfor($i =1; $i <= 4; $i++){\n\t\t\t\tif($ligne = mysql_fetch_assoc($donnees)){\n\t\t\t\t\t$res .= \"<article>\n\t\t\t\t\t\t\t\t<a href='index.php?where=article&id={$ligne['id']}'><header>{$ligne['titre']}</header></a>\n\t\t\t\t\t\t\t\t<div class='article_auteur'>\n\t\t\t\t\t\t\t\t\t<img src='ressources/auteur.png' title='Auteur' alt='Auteur'>\n\t\t\t\t\t\t\t\t\tAuteur: <a href='index.php?where=profil&id={$ligne['auteur']}'>\";\n\t\t\t\t\t$res .= \t\tnom_auteur($ligne[\"auteur\"]);\t\n\t\t\t\t\t$res .= \t'</a></div>\n\t\t\t\t\t\t\t<div class=\"article_date\">Le '.conversion_date($ligne['date']).'</div>\n\t\t\t\t\t\t\t<p>'.taille_description($ligne['text'], $ligne['id']).'</p>';\n\t\t\t\t\t$res .= \tarticle_statut($ligne['statut']);\n\t\t\t\t\t$res .= \"</article>\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $res;\n\t}",
"function ler($nome) {\n $x = 1;\n\t while($x < $this->bd[0][0] && !$this->str_igual($nome, $this->bd[$x][2])) {$x++;}\n if($x >= $this->bd[0][0]) {return 0;}\n //comecando a setar tudo\n $this->id = $this->bd[$x][0];\n $this->maximo = $this->bd[$x][1];\n $this->nome = $this->bd[$x][2];\n $this->categoria = $this->bd[$x][3];\n $this->tipo = $this->bd[$x][4];\n $this->atributo = $this->bd[$x][5];\n $this->specie = $this->bd[$x][6];\n $this->lv = $this->bd[$x][7];\n $this->atk = $this->bd[$x][8];\n $this->def = $this->bd[$x][9];\n $this->preco = $this->bd[$x][10];\n $this->descricao = $this->bd[$x][11];\n $this->img = '../imgs/cards/'.$this->id.'.png';\nreturn 1;\n }",
"function checkAuthors () {\n\t\tif ( count ( $this->authors) == 0 ) return ;\n\t\n\t\tif ( isset($this->existing_q) ) {\n\t\t\t$this->wd->loadItem ( $this->existing_q ) ;\n\t\t\t$i = $this->wd->getItem ( $this->existing_q ) ;\n\t\t\t$c1 = $i->getClaims ( $this->props['author'] ) ;\n\t\t\t$c2 = $i->getClaims ( $this->props['short author'] ) ;\n\t\t\t$this->invalidateExistingAuthors ( $c1 ) ;\n\t\t\t$this->invalidateExistingAuthors ( $c2 ) ;\n\t\t\t\n\t\t\t// Special case: Single author, one author already in item...\n\t\t\tif ( count($this->authors) == 1 && count($c1)+count($c2) == 1 ) {\n\t\t\t\t$this->authors[1]->hadthat = true ;\n\t\t\t}\n\t\t}\n\t}",
"function courtjus_objets_in_rubrique($id_rubrique) {\n\t// On va compter le nombre d'objet présent dans la rubrique\n\t$tables = courtjus_trouver_objet_rubrique();\n\n\t// on va compter le nombre d'objet qu'il y a dans la rubrique.\n\t$objets_in_rubrique = array();\n\n\t// On boucle sur tout les table qui pourrait être ratacher à une rubrique\n\tforeach ($tables as $table) {\n\t\t// Simplification des variables. On a besoin du titre pour trouver le num titre\n\t\tlist($table, $titre) = $table;\n\t\t// L'objet\n\t\t$objet = table_objet($table);\n\t\t// l'identifiant de l'objet\n\t\t$champs_id = id_table_objet($table);\n\t\t// Le champ qui contient la date\n\t\t$champ_date = objet_info($objet, 'date');\n\n\t\t// Les champs qui seront utilisé pour la requête.\n\t\t$champs = array(\n\t\t\t$champs_id,\n\t\t\t$titre,\n\t\t\t// Convertir la date de l'objet en timestamp, cela permettra une comparaison rapide\n\t\t\t'UNIX_TIMESTAMP('.$champ_date.') AS '.$champ_date\n\t\t);\n\n\t\t// Le where\n\t\t$where = array(\n\t\t\t'id_rubrique='.intval($id_rubrique),\n\t\t\t'statut='.sql_quote('publie')\n\t\t);\n\n\t\t// Est-ce qu'il faut prendre en compte la langue ?\n\t\tinclude_spip('formulaires/configurer_multilinguisme');\n\t\tif (table_supporte_trad($table)) {\n\t\t\t$where[] = 'lang='.sql_quote($GLOBALS['spip_lang']);\n\t\t}\n\n\t\t// On récupère les objets de la rubrique.\n\t\t$objets_rubrique = sql_allfetsel($champs, $table, $where);\n\n\t\t// On boucle sur les objets à l'intérique de la rubrique.\n\t\tforeach ($objets_rubrique as $objet_rubrique) {\n\n\t\t\t$num_titre = recuperer_numero($objet_rubrique['titre']);\n\n\t\t\t// On créer le tableau contenant les données de l'objet\n\t\t\t$objets_in_rubrique[] = array(\n\t\t\t\t'id_objet' => $objet_rubrique[$champs_id],\n\t\t\t\t'objet' => $objet,\n\t\t\t\t'num_titre' => $num_titre,\n\t\t\t\t'date' => $objet_rubrique[$champ_date]\n\t\t\t);\n\t\t}\n\t}\n\n\treturn $objets_in_rubrique;\n}",
"public function esiste() {\n return isset($this->ruolo);\n }",
"public function gera_linhas_somatorios()\n\t{\n\t\tif(count($this->somatorios) > 0)\n\t\t{\n\t\t\techo \"<tr class=totalizadores>\";\n\t\t\tfor($i=0; $i < count($this->nome_colunas); $i++)\n\t\t\t{\n\t\t\t\t$alinhamento = $this->nome_colunas[$i][alinhamento];\n\n\t\t\t\tfor($b=0; $b < count($this->somatorios); $b++)\n\t\t\t\t{\n\t\t\t\t\tif($this->nome_colunas[$i][nome_coluna] == $this->somatorios[$b][nome_coluna])\n\t\t\t\t\t{\n\t\t\t\t\t\t$valor = $this->somatorios[$b][total];\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t// \tVERIFICO SE E PARA IMPRIMIR O VALOR\n\t\t\t\tif($this->nome_colunas[$i][somatorio] == 's')\n\t\t\t\t{\n\t\t\t\t\t//\t ESCOLHO O TIPO DE DADO\n\t\t\t\t\tswitch($this->nome_colunas[$i][tipo])\n\t\t\t\t\t{\n\t\t\t\t\t\tcase 'moeda':\n\t\t\t\t\t\t\t$valor = Util::exibe_valor_moeda($valor);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'data':\n\t\t\t\t\t\t\t$valor = Util::data_certa($valor);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t$valor = $valor;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\techo \"\n\t\t\t\t\t\t \t<td align=$alinhamento>\n\t\t\t\t\t\t\t\t\" . $valor . \"\n\t\t\t\t\t\t \t</td>\n\t\t\t\t\t\t \";\n\t\t\t\t\t$valor = '';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\techo \"<td align=$alinhamento></td>\";\n\t\t\t\t}\n\n\n\n\t\t\t}\n\t\t\techo '</tr>';\n\t\t}\n\t}",
"public function sePuedePagar(){\n $ahora = $this->obtenerTiempo();\n if(date('d', $ahora) == (date('d', $this->ultimoPagoMedio) + 1)) {\n $this->mediosDisponibles = 2;\n }\n if(($ahora - $this->ultimoPago) >= 300 && $this->mediosDisponibles != 0){\n return true;\n }else{\n return false;\n }\n }",
"public function lectureContenu ()\n {\n\n //$metadata = simplexml_load_file(\"xmoddledata/metadata.xml\");\n\n // on Vérifie si le cours existe\n\n /* @TODO Partie à décommenter lorsque le module de navigation sera intégré au reste de l'application */\n\n // $nbrCours = $metadata->attributes()->nbrCours;\n // $isFound = false;\n // $i = 0;\n // for ($i = 0; $i < $nbrCours; $i++) {\n // if ($metadata->cours[$i]->attributes()->title == $title && $metadata->cours[$i]->attributes()->id == $id) {\n // $isFound = true;\n // break;\n // }\n // }\n\n // if ($isFound) {\n //$cours = simplexml_load_file(\"xmoddledata/\" . $metadata->cours[$i]->attributes()->id . \"_\" . $metadata->cours[$i]->attributes()->title . \"/description.xml\"); \n\n $description = simplexml_load_file('xmoddledata/2_ModeleDeSupport2/description.xml');\n $notions = simplexml_load_file('xmoddledata/2_ModeleDeSupport2/descriptionNotions.xml');\n\n // Création d'un tableau associatif de notions avec l'id comme clé\n\n $notionsArray = $this->getNotions($notions);\n\n // Construction de la navigation\n $text_parties = \"\";\n $nav_parties = [];\n for ($i = 0; $i < $description->attributes()->nbrParties; $i++) {\n $text_parties = \"<div style='\";\n $text_parties .= $this->getStyle($description->partie[$i]->attributes());\n $text_parties .= \"'\";\n $text_parties .= \" id='\".$i.\"'>\";\n $nav_chapitres = [];\n $text_parties .= $description->partie[$i]->attributes()->title;\n $text_parties .= \"</div>\";\n $text_parties .= \"<br/><br/>\";\n $text_chapitres = \"\";\n for ($j = 0; $j < $description->partie[$i]->attributes()->nbrChapitres; $j++) {\n $text_chapitres .= \"<div style='\";\n $text_chapitres .= $this->getStyle($description->partie[$i]->chapitre[$j]->attributes());\n $text_chapitres .= \"'\";\n $text_chapitres .= \" id='\".$i.\"_\".$j.\"'>\";\n $nav_paragraphes = [];\n $text_chapitres .= $description->partie[$i]->chapitre[$j]->attributes()->title;\n $text_chapitres .= \"</div>\";\n $text_chapitres .= \"<br/><br/>\";\n $text_paragraphes = \"\";\n for ($k = 0; $k < $description->partie[$i]->chapitre[$j]->attributes()->nbrParagraphes; $k++) {\n // On renseigne le titre du paragraphe\n $text_paragraphes .= \"<div style='\";\n $text_paragraphes .= $this->getStyle($description->partie[$i]->chapitre[$j]->paragraphe[$k]->attributes());\n $text_paragraphes .= \"'\";\n // Ajout d'un ancre de navigation\n $text_paragraphes .= \" id='\".$i.\"_\".$j.\"_\".$k.\"'>\";\n $text_paragraphes .= $description->partie[$i]->chapitre[$j]->paragraphe[$k]->attributes()->title;\n $text_paragraphes .= \"</div>\";\n $text_paragraphes .= \"<br/>\";\n // Navigation avec paragraphes\n $nav_paragraphes[\"\".$i.\"_\".$j.\"_\".$k] = $description->partie[$i]->chapitre[$j]->paragraphe[$k]->attributes()->title;\n // On remplit les notions contenus dans le paragraphe\n for ($l = 0; $l < $description->partie[$i]->chapitre[$j]->paragraphe[$k]->attributes()->nbrNotions; $l++) {\n $text_paragraphes .= $notionsArray[\"\".$description->partie[$i]->chapitre[$j]->paragraphe[$k]->notion[$l]->attributes()->id];\n }\n }\n $text_chapitres .= $text_paragraphes;\n $nav_chapitres[\"\".$i.\"_\".$j] = $nav_paragraphes;\n }\n $text_parties .= $text_chapitres;\n $nav_parties[\"\".$i] = $nav_chapitres;\n }\n// dd($nav_parties);\n// dd($navigation);\n// dd($description);\n\n // Construction de la page web\n $titre = $description->attributes()->title;\n// dd($description);\n// forearch( $navigation->partie[] as $partie) {\n// dd($pantie);\n// }\n// dd($titre);\n\n\n // $notions = simplexml_load_file(\"../../../fichiersdestructuration/descriptionNotions.xml\");\n\n\n // $nbrNotions = $cours->attributes()->nbrNotions;\n // $notionsConvertis = array();\n // for ($i = 0; $i < $nbrNotions; $i++) {\n // $attributs = $cours->notion[$i]->attributes();\n // $style = \"\";\n // if ($attributs['font-weight'] != null) {\n // $style .= 'font-weight:' . $attributs['font-weight'] . \";\";\n // }\n // if ($attributs['font-size'] != null) {\n // $style .= 'font-size:' . $attributs['font-size'] . \";\";\n // }\n\n // if ($attributs['font-family'] != null) {\n // $style .= 'font-family:' . $attributs['font-family'] . \";\";\n // }\n\n // if ($attributs['color'] != null) {\n // $style .= 'color:' . $attributs['color'] . \";\";\n // }\n\n // if ($attributs['text-decoration'] != null) {\n // $style .= 'text-decoration:' . $attributs['text-decoration'] . \";\";\n // }\n\n // $text = \"\";\n // foreach ($cours->notion[$i]->children() as $child) {\n // $text .= $child->asXML();\n // }\n // $notionHtml = \"<div style='\";\n // $notionHtml .= $style;\n // $notionHtml .= \"'>\";\n // $notionHtml .= $text;\n // $notionHtml .= \"</div>\";\n\n\n // //dd(strval($text));\n // array_push($notionsConvertis, $notionHtml);\n\n // }\n // }else{\n // return view(\"/\");\n // }\n //$notions = $notionsConvertis;\n // return response()->json($notions,200);\n\n // return \"lecture cours\";\n return 0;\n }",
"public function validarPresentacionArt($articulo) {\n \t$query = \"SELECT \".\n \t\t\t\"artId \".\n \t\t\t\"FROM \".\n \t\t\t\"tblArticulos \".\n \t\t\t\"WHERE \".\n \t\t\t\"artId='$articulo' and art_presentado='si'\";\n \n \t$sth = $this->db->prepare($query);\n \t$sth->setFetchMode(PDO::FETCH_ASSOC);\n \t$sth->execute();\n \t$count = $sth->rowCount();\n \t$data = NULL;\n \tif ($count > 0) {\n \t\t$data = TRUE;\n \t} else {\n \t\t$data = FALSE;\n \t}\n \treturn $data;\n }",
"function show_articles($article_ids) {\n global $articles;\n $index = 0;\n foreach ($articles as $article) {\n if (in_array(intval($article['order']), $article_ids)) {\n echo render_article($index++, $article);\n }\n }\n}"
] |
[
"0.5918693",
"0.58424306",
"0.5764349",
"0.57531875",
"0.5690788",
"0.56095463",
"0.5607822",
"0.54852766",
"0.5456441",
"0.54298174",
"0.54295045",
"0.5389637",
"0.53869873",
"0.5363256",
"0.5292448",
"0.5262991",
"0.525462",
"0.524495",
"0.5198163",
"0.51875544",
"0.5183759",
"0.517",
"0.51651603",
"0.5164775",
"0.51522",
"0.51409715",
"0.51289517",
"0.5104254",
"0.5101911",
"0.50998217"
] |
0.68075603
|
0
|
Elimina el articulo indicado de la cesta
|
public function borrarArticulo($articulo){
parent::$log->debug("Borrar $articulo de la cesta");
$cesta = new ArrayObject($this->listArticulos);
$iterador = $cesta->getIterator();
while($iterador->valid()){
if (strtolower($iterador->current()->id) == $articulo){
unset($this->listArticulos[$iterador->key()]);
return;
}
$iterador->next();
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function eliminar(){\n $dimensiones = $this->descripciones()->distinct()->get()->pluck('id')->all();\n $this->descripciones()->detach($dimensiones);\n DescripcionProducto::destroy($dimensiones);\n $this->categorias()->detach();\n $this->imagenes()->delete();\n $this->delete();\n }",
"public function eliminar($objeto){\r\n\t}",
"public function excluir(){\r\n return (new Database('cartao'))->delete('id = '.$this->id);\r\n }",
"function eliminarImagenSusQ($campo, $tabla, $idAsignacion)\n {\n $data=$this->analisisRiesgo->getNombreImagen($campo, $tabla, $idAsignacion);\n //Delete el nombre de la imagen de la base de datos\n $borrar=Array($campo => null);\n $this->analisisRiesgo->deleteImagen($borrar, $tabla, $idAsignacion);\n //Unlink el nombre de la imagen del servidor\n foreach($data as $row)\n {\n $nombreImagen=$row[$campo];\n unlink(\"assets/img/fotoAnalisisRiesgo/fotoSustanciasQuimicas/$nombreImagen\");\n echo \"OK\";\n }\n\n }",
"function removePacote($campos){\n\t\t\t$listDel = $campos['InputDelPacote'];\t\t\t\n\t\t\t\t\n\t\t\t\tif(!empty($listDel)){\n\t\t\t\t\n\t\t\t\tfor($i=0;$i<sizeof($listDel);$i++){\n\t\t\t\t\t\tif($listDel[$i] != 0){\n\t\t\t\t\t\t\t\t$sql = \" DELETE FROM vekttor_venda_pacote WHERE pacotes_id = '$listDel[$i]' AND vekttor_venda_id = '$campos[venda_id]'\";\n\t\t\t\t\t\t\t\t//echo $sql;\n\t\t\t\t\t\t\t\tmysql_query($sql);\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t/*Seleciona os pacote para trazer os modulos */\n\t\t\t\t\t$sqlPacote = mysql_query($tn=\" SELECT * FROM pacote_item WHERE pacote_id = '$listDel[$i]' \");\n\t\t\t\t\t\twhile($pct=mysql_fetch_object($sqlPacote)){\n\t\t\t\t\t\t\t\t$modulos[] = $pct->sis_modulo_id;\n\t\t\t\t\t\t}\n\t\t\t\t} /*Fim de For*/\n\t\t\t\t\n\t\t\t\t\tfor($j=0;$j<sizeof($modulos);$j++){\n\t\t\t\t\t\t\t$sqlModulos = \" DELETE FROM usuario_tipo_modulo WHERE modulo_id = '$modulos[$j]' AND usuario_tipo_id = '$campos[id_usuario_tipo]'\";\n\t\t\t\t\t\t\tmysql_query($sqlModulos);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n}",
"public function remove();",
"public function remove();",
"public function remove();",
"public function remove();",
"public function eliminar() {\n\t\t\n\t\t\n\t\t$juradodni = $_GET[\"dniJurado\"];\n\t\t\n\t\t$this -> JuradoMapper -> delete($juradodni);\n\n\t\t\n\t\t$this -> view -> redirect(\"jurado\", \"listar\");\n\t\t//falta cambiar\n\t}",
"public function remover() {\n \n $queryVerificaInscricao = '\n select * from tb_inscricao_atividade where id_atividade = :id_atividade \n ';\n \n $stmtInscAtt = $this->conexao->prepare($queryVerificaInscricao);\n $stmtInscAtt->bindValue(':id_atividade', $_GET['id_att']);\n $stmtInscAtt->execute();\n \n $inscAtt = $stmtInscAtt->fetchAll(PDO::FETCH_OBJ);\n \n // echo '<pre>';\n // print_r($inscAtt);\n // echo '</pre>';\n \n if (!empty($inscAtt)) {\n foreach ($inscAtt as $inscAttInd) {\n $queryDeleteInscAtt = 'delete from tb_inscricao_atividade where \n id_atividade = :id_atividadeDel and \n id_evento = :id_eventoDel and \n id_usuario = :id_usuarioDel';\n \n $stmtInscAttDel = $this->conexao->prepare($queryDeleteInscAtt);\n $stmtInscAttDel->bindValue(':id_atividadeDel', $inscAttInd->id_atividade);\n $stmtInscAttDel->bindValue(':id_eventoDel', $inscAttInd->id_evento);\n $stmtInscAttDel->bindValue(':id_usuarioDel', $inscAttInd->id_usuario);\n $stmtInscAttDel->execute();\n }\n }\n\n $queryInscCupomAtt = '\n select * from tb_cupom where id_atividade = :id_atividadeCupDel\n ';\n\n $stmtInscCupomAtt = $this->conexao->prepare($queryInscCupomAtt);\n $stmtInscCupomAtt->bindValue(':id_atividadeCupDel', $_GET['id_att']);\n $stmtInscCupomAtt->execute();\n\n $cupomAtt = $stmtInscCupomAtt->fetchAll(PDO::FETCH_OBJ);\n\n // echo '<pre>';\n // print_r($cupomAtt);\n // echo '</pre>';\n\n if (!empty($cupomAtt)) {\n foreach ($cupomAtt as $cupomAttInd) {\n $queryDeleteCupomAtt = '\n delete from tb_cupom where id = :id_cupomDel\n ';\n\n echo $cupomAttInd->id;\n\n $stmtInscCupomAttDel = $this->conexao->prepare($queryDeleteCupomAtt);\n $stmtInscCupomAttDel->bindValue(':id_cupomDel', $cupomAttInd->id);\n $stmtInscCupomAttDel->execute();\n }\n }\n \n $query = '\n delete from tb_atividade \n where id = :id';\n\n $stmt = $this->conexao->prepare($query);\n $stmt->bindValue(':id', $_GET['id_att']);\n\n return $stmt->execute();\n }",
"function eliminar_insumos($objeto){\n\t\t$sql=\"\tDELETE FROM\n\t\t\t\t\t app_producto_material\n\t\t\t\tWHERE\n\t\t\t\t\tid_producto =\".$objeto['id'];\n\t\t// return $sql;\n\t\t$result = $this->query($sql);\n\n\t\treturn $result;\n\t}",
"public function Eliminar(){\n \n \n if (!$this->model->igualar($_REQUEST['id'])) {//si una categoria no esta asignada la puede eliminar\n \n $this->model->Eliminar($_REQUEST['id']);\n header('Location: ?c=Categoria'); \n }\n else{\n \n header('Location: ?c=Categoria&error'); //de lo contrario no se podra eliminar asta que se elimine el cliente que la tiene\n }\n\n\n\n \n \n \n\n\n\n\n \n \n \n }",
"public function excluir()\n {\n return (new Database('vagas'))->delete('id = '.$this->id);\n }",
"function eliminarImagenCarpeta($campo, $tabla, $idAsignacion, $carpeta)\n {\n $data=$this->analisisRiesgo->getNombreImagen($campo, $tabla, $idAsignacion);\n //Delete el nombre de la imagen de la base de datos\n $borrar=Array($campo => null);\n $this->analisisRiesgo->deleteImagen($borrar, $tabla, $idAsignacion);\n //Unlink el nombre de la imagen del servidor\n foreach($data as $row)\n {\n $nombreImagen=$row[$campo];\n unlink(\"assets/img/fotoAnalisisRiesgo/$carpeta/$nombreImagen\");\n echo \"OK\";\n }\n\n }",
"function Eliminar(){\n\t \n\t $this->Model->Eliminar($_GET['id']);\n\t\t\n\t }",
"public function excluirAnuncio($id){\n global $pdo;\n $sql = $pdo->prepare(\"DELETE FROM anuncios_imagens WHERE id_anuncio = :id_anuncio\"); // vai remover o registro de imagens\n $sql->bindValue(\":id_anuncio\", $id);\n $sql->execute(); \n\n $sql = $pdo->prepare(\"DELETE FROM anuncios WHERE id = :id\"); \n $sql->bindValue(\":id\", $id);\n $sql->execute(); \n\n \n\n\n\n }",
"public function EliminarDetallesCompras()\n{\n\tif($_SESSION['acceso'] == \"administrador\") {\n\n\t\tself::SetNames();\n\t\t$sql = \" select * from detallecompras where codcompra = ? \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codcompra\"])) );\n\t\t$num = $stmt->rowCount();\n\t\tif($num > 1)\n\t\t{\n\n\t\t\t$sql = \" delete from detallecompras where coddetallecompra = ? \";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->bindParam(1,$coddetallecompra);\n\t\t\t$coddetallecompra = base64_decode($_GET[\"coddetallecompra\"]);\n\t\t\t$stmt->execute();\n\n################ VERIFICAMOS SI EL TIPO DE ENTRADA ES UN INGREDINTE ###################\n\tif($_POST['tipoentrada']==\"INGREDIENTE\"){\n\n\t\t$sql2 = \"select cantingrediente from ingredientes where cantingrediente = ?\";\n\t\t$stmt = $this->dbh->prepare($sql2);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])));\n\t\t$num = $stmt->rowCount();\n\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$p[] = $row;\n\t\t}\n\t\t$existenciadb = $p[0][\"cantingrediente\"];\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t\t$sql = \" delete from kardexingredientes where codprocesoing = ? and codingrediente = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codcompra);\n\t\t$stmt->bindParam(2,$codproducto);\n\t\t$codcompra = strip_tags(base64_decode($_GET[\"codcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$stmt->execute();\n\n###################### ACTUALIZAMOS LOS DATOS DEL PRODUCTO EN ALMACEN ############################\n\t\t$sql = \" update ingredientes set \"\n\t\t.\" cantingrediente = ? \"\n\t\t.\" where \"\n\t\t.\" codingrediente = ?;\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $existencia);\n\t\t$stmt->bindParam(2, $codproducto);\n\t\t$cantcompra = strip_tags(base64_decode($_GET[\"cantcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$existencia = $existenciadb - $cantcompra;\n\t\t$stmt->execute();\n\n################ VERIFICAMOS SI EL TIPO DE ENTRADA ES UN PRODUCTO ###################\n\t\t\t} else {\n\n\t\t$sql2 = \"select existencia from productos where codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql2);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])));\n\t\t$num = $stmt->rowCount();\n\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$p[] = $row;\n\t\t}\n\t\t$existenciadb = $p[0][\"existencia\"];\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t\t$sql = \" delete from kardexproductos where codproceso = ? and codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codcompra);\n\t\t$stmt->bindParam(2,$codproducto);\n\t\t$codcompra = strip_tags(base64_decode($_GET[\"codcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$stmt->execute();\n\n###################### ACTUALIZAMOS LOS DATOS DEL PRODUCTO EN ALMACEN ############################\n\t\t$sql = \" update productos set \"\n\t\t.\" existencia = ? \"\n\t\t.\" where \"\n\t\t.\" codproducto = ?;\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $existencia);\n\t\t$stmt->bindParam(2, $codproducto);\n\t\t$cantcompra = strip_tags(base64_decode($_GET[\"cantcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$existencia = $existenciadb - $cantcompra;\n\t\t$stmt->execute();\n\n\t\t\t}\n\n\t\t$sql4 = \"select * from compras where codcompra = ? \";\n\t\t$stmt = $this->dbh->prepare($sql4);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codcompra\"])));\n\t\t$num = $stmt->rowCount();\n\n\t\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$paea[] = $row;\n\t\t\t}\n\t\t$subtotalivasic = $paea[0][\"subtotalivasic\"];\n\t\t$subtotalivanoc = $paea[0][\"subtotalivanoc\"];\n\t\t$iva = $paea[0][\"ivac\"]/100;\n\t\t$descuento = $paea[0][\"descuentoc\"]/100;\n\t\t$totalivac = $paea[0][\"totalivac\"];\n\t\t$totaldescuentoc = $paea[0][\"totaldescuentoc\"];\n\n\t$sql3 = \"select sum(importecompra) as importe from detallecompras where codcompra = ? and ivaproductoc = 'SI'\";\n $stmt = $this->dbh->prepare($sql3);\n $stmt->execute( array(base64_decode($_GET[\"codcompra\"])));\n $num = $stmt->rowCount();\n \n if($rowp = $stmt->fetch())\n {\n $p[] = $rowp;\n }\n $importeivasi = ($rowp[\"importe\"]== \"\" ? \"0\" : $rowp[\"importe\"]);\n\n$sql5 = \"select sum(importecompra) as importe from detallecompras where codcompra = ? and ivaproductoc = 'NO'\";\n $stmt = $this->dbh->prepare($sql5);\n $stmt->execute( array(base64_decode($_GET[\"codcompra\"])));\n $num = $stmt->rowCount();\n \n if($roww = $stmt->fetch())\n {\n $pw[] = $roww;\n }\n $importeivano = ($roww[\"importe\"]== \"\" ? \"0\" : $roww[\"importe\"]);\n\n if(base64_decode($_GET[\"ivaproductoc\"])==\"SI\"){\t\n\t\n\t\t$sql = \" update compras set \"\n\t\t\t .\" subtotalivasic = ?, \"\n\t\t\t .\" totalivac = ?, \"\n\t\t\t .\" totaldescuentoc = ?, \"\n\t\t\t .\" totalc= ? \"\n\t\t\t .\" where \"\n\t\t\t .\" codcompra = ?;\n\t\t\t \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $subtotal);\n\t\t$stmt->bindParam(2, $totaliva);\n\t\t$stmt->bindParam(3, $totaldescuentoc);\n\t\t$stmt->bindParam(4, $total);\n\t\t$stmt->bindParam(5, $codcompra);\n\t\t\n\t\t$subtotal= strip_tags($importeivasi);\n $totaliva= rount($subtotal*$iva,2);\n\t\t$tot= rount($subtotal+$subtotalivanoc+$totaliva,2);\n\t\t$totaldescuentoc= rount($tot*$descuento,2);\n\t\t$total= rount($tot-$totaldescuentoc,2);\n\t\t$codcompra = strip_tags(base64_decode($_GET[\"codcompra\"]));\n\t\t$stmt->execute();\n\t\t\n\t\t } else {\n\t\t\n\t\t$sql = \" update compras set \"\n\t\t\t .\" subtotalivanoc = ?, \"\n\t\t\t .\" totaldescuentoc = ?, \"\n\t\t\t .\" totalc= ? \"\n\t\t\t .\" where \"\n\t\t\t .\" codcompra = ?;\n\t\t\t \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $subtotal);\n\t\t$stmt->bindParam(2, $totaldescuentoc);\n\t\t$stmt->bindParam(3, $total);\n\t\t$stmt->bindParam(4, $codcompra);\n\t\t\n\t\t$subtotal= strip_tags($importeivano);\n\t\t$tot= rount($subtotal+$subtotalivasic+$totalivac,2);\n\t\t$totaldescuentoc= rount($tot*$descuento,2);\n\t\t$total= rount($tot-$totaldescuentoc,2);\n\t\t$codcompra = strip_tags(base64_decode($_GET[\"codcompra\"]));\n\t\t$stmt->execute();\t\t\n\t\t }\t\t\t\t\t\n\n\t\theader(\"Location: detallescompras?mesage=2\");\n\t\texit;\n\n\t\t}\n\t\telse\n\t\t{\n\n################ VERIFICAMOS SI EL TIPO DE ENTRADA ES UN INGREDINTE ###################\n\tif($_POST['tipoentrada']==\"INGREDIENTE\"){\n\n\t\t$sql2 = \"select cantingrediente from ingredientes where cantingrediente = ?\";\n\t\t$stmt = $this->dbh->prepare($sql2);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])));\n\t\t$num = $stmt->rowCount();\n\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$p[] = $row;\n\t\t}\n\t\t$existenciadb = $p[0][\"cantingrediente\"];\n\n###################### ACTUALIZAMOS LOS DATOS DEL PRODUCTO EN ALMACEN ############################\n\t\t$sql = \" update ingredientes set \"\n\t\t.\" cantingrediente = ? \"\n\t\t.\" where \"\n\t\t.\" codingrediente = ?;\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $existencia);\n\t\t$stmt->bindParam(2, $codproducto);\n\t\t$cantcompra = strip_tags(base64_decode($_GET[\"cantcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$existencia = $existenciadb - $cantcompra;\n\t\t$stmt->execute();\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t\t$sql = \" delete from kardexingredientes where codprocesoing = ? and codingrediente = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codcompra);\n\t\t$stmt->bindParam(2,$codproducto);\n\t\t$codcompra = strip_tags(base64_decode($_GET[\"codcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$stmt->execute();\n\n################ VERIFICAMOS SI EL TIPO DE ENTRADA ES UN PRODUCTO ###################\n\t\t\t} else {\n\n###################### ACTUALIZAMOS LOS DATOS DEL PRODUCTO EN ALMACEN ############################\n\t\t$sql2 = \"select existencia from productos where codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql2);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])));\n\t\t$num = $stmt->rowCount();\n\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$p[] = $row;\n\t\t}\n\t\t$existenciadb = $p[0][\"existencia\"];\n\n\t\t$sql = \" update productos set \"\n\t\t.\" existencia = ? \"\n\t\t.\" where \"\n\t\t.\" codproducto = ?;\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $existencia);\n\t\t$stmt->bindParam(2, $codproducto);\n\t\t$cantcompra = strip_tags(base64_decode($_GET[\"cantcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$existencia = $existenciadb - $cantcompra;\n\t\t$stmt->execute();\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t\t$sql = \" delete from kardexproductos where codproceso = ? and codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codcompra);\n\t\t$stmt->bindParam(2,$codproducto);\n\t\t$codcompra = strip_tags(base64_decode($_GET[\"codcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$stmt->execute();\n\n\t\t$sql = \" delete from compras where codcompra = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codcompra);\n\t\t$codcompra = base64_decode($_GET[\"codcompra\"]);\n\t\t$stmt->execute();\n\n\t\t$sql = \" delete from detallecompras where coddetallecompra = ? \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$coddetallecompra);\n\t\t$coddetallecompra = base64_decode($_GET[\"coddetallecompra\"]);\n\t\t$stmt->execute();\n\n\t\t\t}\n\n\t\t\theader(\"Location: detallescompras?mesage=2\");\n\t\t\texit;\n\t\t}\n\t}\n\telse\n\t{\n\t\theader(\"Location: detallescompras?mesage=3\");\n\t\texit;\n\t}\n}",
"function EliminaDetallePedido($NumPedido,$CodArti){\n\t\tif($this->con->conectar()==true){\n\t\treturn mysql_query(\"DELETE * FROM `DET_PedidosSolicitados` WHERE `NumPedido` = '\" .$NumPedido. \"' and `NumPedido` = '\" .$CodArti. \"'\");\n\t\t}\n\t}",
"public function eliminaPedido($codpedido) {\n $sql = \"SELECT elementoPedido_elementoPedido_id\n FROM tieneElemento\n WHERE pedido_pedido_id = $codpedido\";\n $result = $this->bd->query($sql);\n $numfilas = $result->num_rows;\n /* Elimino las asociaciones del pedido con sus elementos */\n $sql2 = \"DELETE FROM tieneElemento\n WHERE pedido_pedido_id = $codpedido\";\n $result2 = $this->bd->query($sql2);\n /* Elimino los elementos del pedido, con sus elementos de cola y asociaciones */\n for($i=0; $i<$numfilas ; $i++) {\n $row = $result->fetch_assoc();\n $cod = $row[\"elementoPedido_elementoPedido_id\"];\n $sql3 = \"DELETE FROM asociaPlato\n WHERE elementoColaCocina_elementoPedido_elementoPedido_id = $cod\";\n $sql4 = \"DELETE FROM asociaBebida\n WHERE elementoColaBar_elementoPedido_elementoPedido_id = $cod\";\n $sql5 = \"DELETE FROM elementoColaCocina\n WHERE elementoPedido_elementoPedido_id = $cod\";\n $sql6 = \"DELETE FROM elementoColaBar\n WHERE elementoPedido_elementoPedido_id = $cod\";\n $sql7 = \"DELETE FROM elementoPedido\n WHERE elementoPedido_id = $cod\";\n $result3 = $this->bd->query($sql3);\n $result4 = $this->bd->query($sql4);\n $result5 = $this->bd->query($sql5);\n $result6 = $this->bd->query($sql6);\n $result7 = $this->bd->query($sql7);\n }\n /* Elimino el pedido y */\n $sql8 = \"DELETE FROM facturaPedido\n WHERE pedido_pedido_id = $codpedido\";\n// $sql9 = \"DELETE FROM pedido\n// WHERE pedido_id = $codpedido\";\n\n $result8 = $this->bd->query($sql8);\n// $result9 = $this->bd->query($sql9);\n }",
"function borrarInscrito() {\n //Creamos la evaluacion\n leerClase('Evaluacion');\n leerClase('Estudiante');\n leerClase('Proyecto_dicta');\n $estudiante = new Estudiante($this->estudiante_id);\n $evaluacion = new Evaluacion($this->evaluacion_id);\n $protecto=$estudiante->getProyecto();\n $sql = \"select p.id as id from \" . $this->getTableName('Proyecto_dicta') . \" as p where p.proyecto_id = '$protecto->id' and p.dicta_id = '$this->dicta_id' \";\n $resultado = mysql_query($sql);\n\n $proyecto_array = mysql_fetch_array($resultado);\n $proyecto_dicta = new Proyecto_dicta($proyecto_array);\n $proyecto_dicta->delete();\n $evaluacion->delete();\n $this->delete();\n }",
"public function excluir(){\r\n return (new Database('atividades'))->delete('id = '.$this->id);\r\n }",
"function opcion__eliminar()\n\t{\n\t\t$id_proyecto = $this->get_id_proyecto_actual();\n\t\tif ( $id_proyecto == 'toba' ) {\n\t\t\tthrow new toba_error(\"No es posible eliminar el proyecto 'toba'\");\n\t\t}\n\t\ttry {\n\t\t\t$p = $this->get_proyecto();\n\t\t\tif ( $this->consola->dialogo_simple(\"Desea ELIMINAR los metadatos y DESVINCULAR el proyecto '\"\n\t\t\t\t\t.$id_proyecto.\"' de la instancia '\"\n\t\t\t\t\t.$this->get_id_instancia_actual().\"'\") ) {\n\t\t\t\t$p->eliminar_autonomo();\n\t\t\t}\n\t\t} catch (toba_error $e) {\n\t\t\t$this->consola->error($e->__toString());\n\t\t}\n\t\t$this->get_instancia()->desvincular_proyecto( $id_proyecto );\n\t}",
"function action_remove() {\n\t\t\t$data = UTIL::get_post('data');\n\t\t\t$id = (int)$data['rem_id'];\n\t\t\t$table = $data['rem_table'];\n\t\t\t\n\t\t\t$choosen = $this->SESS->get('objbrowser', 'choosen');\n\t\t\tunset($choosen[$table][$id]);\n\t\t\tif (count($choosen[$table]) == 0) unset($choosen[$table]);\n\t\t\t\n\t\t\t$this->SESS->set('objbrowser', 'choosen', $choosen);\n\t\t}",
"function EliminarMascotas($nombres, $primer_apellido, $segundo_apellido, $fehca_nacimiento, $lugar_nacimiento, $iddepartamento, $idmunicipio, $telefono_casa, $celular, $direccion, $foto){\n $conexion = Conectar();\n $sql = \"DELETE FROM padrinos WHERE id=:id\";\n $statement = $conexion->prepare($sql);\n $statement->bindParam(':idpadrinos', $idpadrinos);\n $statement->execute();\n $statement->setFetchMode(PDO::FETCH_ASSOC);\n $res=$statement->fetchAll();\n return $res;\n}",
"public function galeriaExcluir_action()\n\t{\n\t\t$bd = new GaleriasImagens_Model();\n\t\t$id = abs((int) $this->getParam(3));\n\t\t$resultado = $bd->read(\"galeria={$id} AND usuario={$this->_usuario}\");\n\t\tforeach($resultado as $dados){\n\t\t\tunlink('uploads/img_'.$dados['imagem']);\n\t\t\tunlink('uploads/tb_'.$dados['imagem']);\n\t\t\tunlink('uploads/destaque_'.$dados['imagem']);\n\t\t}\n\t\t$bd->delete(\"galeria={$id} AND usuario={$this->_usuario}\");\n\t\t\n\t\t$bd = new Galerias_Model();\n\t\t$bd->delete(\"id={$id} AND usuario={$this->_usuario}\");\n\t\t\n\t\tHTML::certo('Galeria excluída.');\n\t\t//POG Temporário\n\t\tHTML::Imprime('<script>Abrir(\"#abreGaleriasListar\",\"#galerias\");</script>');\n\t}",
"public function Eliminar()\n {\n $sentenciaSql = \"DELETE FROM \n detalle_orden \n WHERE \n id_detalle_orden = $this->idDetalleOrden\";\n $this->conn->preparar($sentenciaSql);\n $this->conn->ejecutar();\n }",
"public function eliminar()\n\t{\n\t\t$idestado = $_POST['idestado'];\n\t\t//en viamos por parametro el id del estado a eliminar\n\t\tEstado::delete($idestado);\n\t}",
"public function remover()\n\t{\n\t\t$sql = \"DELETE FROM $this->tabela WHERE $this->chave_primaria = :id\";\n\n\t\t$this->resultado = $this->conn->prepare($sql);\n\t\t$this->resultado->bindValue(':id', $this->id);\n\n\t\treturn $this->resultado->execute();\n\t}",
"abstract public function remove();"
] |
[
"0.70226777",
"0.66819316",
"0.6589273",
"0.6531563",
"0.6531059",
"0.650325",
"0.650325",
"0.650325",
"0.650325",
"0.64962345",
"0.6474483",
"0.6434549",
"0.64089113",
"0.6402286",
"0.6393352",
"0.6355782",
"0.6336887",
"0.6334653",
"0.6334584",
"0.6334398",
"0.6333325",
"0.6307286",
"0.6300947",
"0.6283019",
"0.6281999",
"0.62634254",
"0.6245086",
"0.6230378",
"0.6229919",
"0.62195563"
] |
0.68605864
|
1
|
devuelve el numero total de articulos de la cesta
|
public function total_articulos(){
if (count($this->listArticulos)==0) return 0;
$total = 0;
foreach ($this->listArticulos as $elArticulo)
$total+=$elArticulo->unidades;
return $total;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function peso_cesta(){\r\n\t\t\t$peso = 0;\r\n\t\t\tforeach ($this->listArticulos as $elArticulo){\r\n\t\t\t\t$peso+=($elArticulo->peso*$elArticulo->unidades);\r\n\t\t\t\tparent::$log->debug(\"Peso $elArticulo->articulo= $elArticulo->peso(kg) * $elArticulo->unidades(u) = \".($elArticulo->unidades*$elArticulo->peso).\" Peso acumulado de la cesta=\".$peso);\r\n\t\t\t}\r\n\t\t\treturn $peso;\r\n\t\t}",
"public function cesta_sin_iva(){\r\n\t\t\t$total = 0;\r\n\t\t\tforeach ($this->listArticulos as $elArticulo){\r\n\t\t\t\t$precio = $elArticulo->oferta>0?$elArticulo->oferta:$elArticulo->precio;\r\n\t\t\t\t$total+= round($elArticulo->unidades*$precio,2);\t\t\t\t\r\n\t\t\t}\r\n\t\t\treturn $total;\r\n\t\t}",
"function sizeCart(){\n\t\t//return array_sum($this->articulos);\n\t\t$sum = 0;\n\t\tforeach ($this->articulos as $bookid => $book) {\n\t\t\t$cantidad = $book['cantidad'];\n\t\t\t$sum += $cantidad;\n\t\t}\n\t\t\n\t\treturn $sum;\n\t}",
"public function get_total(){\n $total = 0;\n \n // récupert tous les articles de la commande\n $articles = $this->get_all_articles();\n \n // parcourt ces articles\n foreach($articles as $a){\n $price = $a->get_price(true);\n \n // puis calcul le prix\n $total += $a->nb * $price;\n }\n \n return $total;\n }",
"public function get_total_items(){\n\t \t$total = 0;\n\t \t//Si no esta vacio va sumando la cantidad de articulos\n\t \tif(!empty($this->cart)){\n\t \t\tforeach ($this->cart as $linea){\n\t\t\t\t\t$total += $linea['amount'];\n\t\t\t\t}\n\t \t}\n\t \techo $total;\n\t }",
"public function totcarte()\n {\n $detalle = FacturaDet::join('factura_cab', 'factura_cab.numfac', '=', 'factura_det.numfac')\n ->select(DB::raw('sum(cantserv*valserv) as total'))\n ->where('factura_cab.estfac','<>','0')\n ->where('factura_cab.estfac','<>','1')\n ->first();\n $total=$detalle->total+0;\n $pagos = Pago::select(DB::raw('sum(valpago) as total'))\n ->first();\n if($pagos)\n $pagado = $pagos->total;\n else\n $pagado=0;\n $total = $total - $pagado;\n return $total;\n }",
"public function nbArticles(){\n\t$nbArticles = 0;\n\tforeach($this->listeProduits as $value){\n\t\t$nbArticles += $value[1];\n\t}\n\treturn $nbArticles;\n }",
"public function cesta_con_iva(){\r\n\t\t\t$total = 0;\r\n\t\t\tforeach ($this->listArticulos as $elArticulo){\r\n\t\t\t\t$precio = $elArticulo->oferta_iva>0?$elArticulo->oferta_iva:$elArticulo->precio_iva;\r\n\t\t\t\t$total+= round($elArticulo->unidades*$precio,2);\r\n\t\t\t}\r\n\t\t\treturn $total;\r\n\t\t}",
"function calculerTotal () {\n\t $total = 0;\n\t \n\t foreach ($this->lignes as $lp) {\n\t $prod = $lp->prod;\n\t $prixLigne = $prod->prix * $lp->qte ;\n\t $total = $total + $prixLigne ;\n\t }\n\t \n\t return $total;\n\t }",
"abstract public function countTotal();",
"public function totalCount();",
"public function totalCount();",
"public function getTotalSubeixoRodovias(){\n\t\t$total = 0;\n\t\t$i=0;\n\t\twhile($i<count($this->result)){\n\t\t\tif($this->result[$i]->idn_digs == 1000)\n\t\t\t\t$total++;\n\t\t\t$i++;\n\t\t}\n\t\treturn $total;\n\t}",
"protected function getTotal()\n {\n $total = 0;\n foreach ($this->entries as $entry) {\n $total += $entry['price'] * $entry['quantity'];\n }\n\n return $total;\n }",
"function nbProduit(){\n\t$nombre = 0; \n\t\n\tif(isset($_SESSION['panier']['quantite'])){\n\t\tfor($i=0; $i < count($_SESSION['panier']['quantite']); $i++){\n\t\t// On tourne autant de fois qu'il y a de références dans le panier (nombre de ligne dans le petit tableau des quantités)\n\t\t\t$nombre += $_SESSION['panier']['quantite'][$i];\n\t\t}\n\t}\n\t\n\treturn $nombre;\n}",
"private function total()\n\t{\n\t\t//\tObteniendo los productos del carro.\n\t\t$cart = \\Session::get('cart');\n\t\t$total = 0;\n\t\t//\tSumando el precio de cada producto.\n\t\tforeach($cart as $item){\n\t\t\t$total += $item->precio * $item->cantidad;\n\t\t}\n\t\treturn $total;\n\t}",
"public function getTotal();",
"public function getTotal();",
"public function total();",
"public function total();",
"public function total();",
"public function getTotal(){\n $cantidad = $this->cantidad;\n\t\treturn $this->productos\n\t\t\t\t\t\t->map(function($prod){return $prod->precio;})\n\t\t\t\t\t\t->reduce(function($acum, $elem)use($cantidad){\n return $acum + ($elem * $cantidad);\n });\n\t}",
"public function nombreTotalTableau(){\n $req = $this->db->query(\"SELECT COUNT(*) AS nb FROM tableau\");\n $sortie = $req->fetch(PDO::FETCH_OBJ);\n return $sortie->nb;\n }",
"public function getTotal(): int;",
"public function recursos_totales() {\r\n $this->db->select('count(*) as total');\r\n $query = $this->db->get(\"publicacion\");\r\n //return $query->num_rows();\r\n $resultados = $query->result();\r\n if(!empty($resultados)){\r\n return $resultados[0]->total;\r\n } else {\r\n return false;\r\n }\r\n }",
"public function getTotalCount();",
"public function getTotalCount();",
"public function getTotalCount();",
"abstract public function prepareTotalCount();",
"public static function totalNumber()\n {\n return (int)self::find()->count();\n }"
] |
[
"0.7362208",
"0.7281163",
"0.72636515",
"0.72375077",
"0.7120975",
"0.6973062",
"0.6923486",
"0.69006646",
"0.6899283",
"0.6867667",
"0.6853451",
"0.6853451",
"0.67440104",
"0.6714775",
"0.67050654",
"0.6698671",
"0.66927797",
"0.66927797",
"0.6663949",
"0.6663949",
"0.6663949",
"0.6607855",
"0.65451145",
"0.6542861",
"0.6538025",
"0.6501798",
"0.6501798",
"0.6501798",
"0.6500692",
"0.64936835"
] |
0.7756246
|
0
|
calcula el valor de la cesta sin iva
|
public function cesta_sin_iva(){
$total = 0;
foreach ($this->listArticulos as $elArticulo){
$precio = $elArticulo->oferta>0?$elArticulo->oferta:$elArticulo->precio;
$total+= round($elArticulo->unidades*$precio,2);
}
return $total;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function iva_articulos(){\r\n\t\t\t$total = $this->cesta_con_iva()-$this->cesta_sin_iva();\t\t\t\r\n\t\t\treturn $total;\r\n\t\t}",
"public function cesta_con_iva(){\r\n\t\t\t$total = 0;\r\n\t\t\tforeach ($this->listArticulos as $elArticulo){\r\n\t\t\t\t$precio = $elArticulo->oferta_iva>0?$elArticulo->oferta_iva:$elArticulo->precio_iva;\r\n\t\t\t\t$total+= round($elArticulo->unidades*$precio,2);\r\n\t\t\t}\r\n\t\t\treturn $total;\r\n\t\t}",
"private function calcolaValutazione()\n {\n\n $media=0;\n $i=0;\n foreach ($this->valutazioni as &$value){\n $media=$media+$value->getvoto();\n $i++;}\n $this->valutazione=$media/$i;\n\n }",
"public function calculVa() {\n\n return ($this->cp + $this->cb) / $this->nbta;\n }",
"function iva($subtotal, $iva = 0.21){ // cuando le ponemos el valor a un parametro nos permite que cada vez que haga la operacion, lo haga con el valor que le pusimos al parametro obviamente, esto es mejor que asignarle un valor desde dentro y no estableciendo el valor fijo\n $porcentaje = $subtotal * $iva;\n\n // pusimos en comentarios esto porque no necesitamos que nos haga una operacion final, solo que nos muestre el dato final\n // $solucion = $subtotal + $porcentaje;\n return $porcentaje;\n }",
"public function calcularValorLlamada();",
"public function valorpasaje();",
"public function get_valor() {\n\t\t\n\t\t$ar_list_of_values\t= $this->get_ar_list_of_values();\n\t\t$dato \t\t\t\t= $this->get_dato();\n\t\t\n\t\tif (is_array ($ar_list_of_values)) foreach ($ar_list_of_values as $value => $rotulo) {\n\t\t\t\t\t\t\t\t\t\n\t\t\tif( $dato == $value ) {\n\t\t\t\t\n\t\t\t\t$this->valor = $rotulo; \n\t\t\t\t\n\t\t\t\treturn $this->valor;\n\t\t\t}\n\t\t\t#echo \"<br> - $dato - $value => $rotulo \";\n\t\t}\t\t\t\t\t\n\t}",
"public function getValorVenta()\n {\n return $this->valorVenta;\n }",
"public function getValorInventario()\n {\n return $this->valorInventario;\n }",
"public function smanjiCenu(){\n if($this->getGodiste() < 2010){\n $discount=$this->cenapolovnogauta*0.7;\n return $this->cenapolovnogauta=$discount;\n }\n return $this->cenapolovnogauta; \n }",
"public static function calculaVenda()\n {\n Marca::query()->update([\n 'dataultimacompra' => null,\n 'itensabaixominimo' => null,\n 'itensacimamaximo' => null,\n 'vendabimestrevalor' => null,\n 'vendasemestrevalor' => null,\n 'vendaanovalor' => null,\n 'vendaanopercentual' => null,\n ]);\n\n // Monta classificacao ABC\n $totalvendaano_geral = Marca::sum('vendaanovalor');\n $totalvendaano = Marca::where('abcignorar', '=', false)->sum('vendaanovalor');\n $posicao = 0;\n $percentual_acumulado = 0;\n\n foreach (Marca::orderByRaw('vendaanovalor DESC NULLS LAST')->orderBy('marca', 'ASC')->get() as $marca) {\n $abccategoria = 0;\n $abcposicao = null;\n\n if (!$marca->abcignorar) {\n $posicao++;\n $abcposicao = $posicao;\n $percentual_acumulado += (($marca->vendaanovalor / $totalvendaano) * 100);\n if ($percentual_acumulado <= 20) {\n $abccategoria = 3;\n } elseif ($percentual_acumulado <= 50) {\n $abccategoria = 2;\n } elseif ($percentual_acumulado <= 90) {\n $abccategoria = 1;\n } else {\n $abccategoria = 0;\n }\n }\n\n $marca->update([\n 'abccategoria' => $abccategoria,\n 'abcposicao' => $abcposicao,\n 'vendaanopercentual' => (($marca->vendaanovalor / $totalvendaano_geral) * 100),\n ]);\n\n $afetados++;\n }\n\n return $afetados;\n }",
"public function getValorUltimaReavaliacao() {\n\n if ($this->getTotalDeReavaliacoes() > 0) {\n\n $oDaoReavaliacaoBem = db_utils::getDao(\"inventariobem\");\n\n $sWhere = \"t77_bens = {$this->getCodigoBem()} and \";\n $sWhere .= \"t75_situacao = 3 \";\n $sOrder = \"t75_dataabertura desc limit 1\";\n\n $sSqlReavaliacaoBem = $oDaoReavaliacaoBem->sql_query_inventario(null,\n \"(t77_valordepreciavel +\n t77_valorresidual) as valor \",\n $sOrder,\n $sWhere\n );\n\n $rsReavaliacaoBem = $oDaoReavaliacaoBem->sql_record($sSqlReavaliacaoBem);\n if ($oDaoReavaliacaoBem->numrows == 1) {\n return db_utils::fieldsMemory($rsReavaliacaoBem, 0)->valor;\n }\n } else {\n return $this->getValorAquisicao();\n }\n }",
"public function calculAc() {\n\n return $this->va * (1 + ($this->nbta - $this->nbad) / $this->nbta);\n }",
"public function valordelospasajesplus();",
"public function VerIVA()\r\n {\r\n\t\r\n\t$reg=mysql_query(\"SELECT Valor FROM impret WHERE Nombre='IVA'\", $this->con) or die('no se pudo conectar: ' . mysql_error());\r\n\t$reg=mysql_fetch_array($reg);\t\r\n\t$impuesto=$reg[\"Valor\"];\r\n\treturn($impuesto);\r\n\t}",
"function getTotalTVA() {\n // if ($this->calculmontant) return (sprintf(\"%.2f\", ($this->totalTTC - $this->totalHT)));\n if (isset($this->calculmontant) && $this->calculmontant == true) return (sprintf(\"%.2f\", ($this->totalHT * ($this->TVA / 100))));\n else return 0;\n }",
"public function getPartitaIVAClinica() {\r\n return $this->_partitaIVA;\r\n }",
"public function getValor(){\n return $this->_data['valor'];\n }",
"public function peso_cesta(){\r\n\t\t\t$peso = 0;\r\n\t\t\tforeach ($this->listArticulos as $elArticulo){\r\n\t\t\t\t$peso+=($elArticulo->peso*$elArticulo->unidades);\r\n\t\t\t\tparent::$log->debug(\"Peso $elArticulo->articulo= $elArticulo->peso(kg) * $elArticulo->unidades(u) = \".($elArticulo->unidades*$elArticulo->peso).\" Peso acumulado de la cesta=\".$peso);\r\n\t\t\t}\r\n\t\t\treturn $peso;\r\n\t\t}",
"function getTotalFinalTVA() {\n if (isset($this->calculmontant) && $this->calculmontant == true) return (sprintf(\"%.2f\", (($this->totalHT+$this->port) * ($this->TVA / 100))));\n else return 0;\n }",
"public function getValor($atributo){//retornar algún valor\n \treturn $this->$atributo;\n }",
"public function tipo_iva_cesta(){\r\n\t\t\tforeach ($this->listArticulos as $elArticulo)\r\n\t\t\t\treturn $elArticulo->iva;\r\n\t\t}",
"public function getValorAnulado() {\n return $this->nValorAnulado;\n }",
"public function getAvecPrixVente() {\n return $this->avecPrixVente;\n }",
"public function getValorAtual() {\n return $this->nValorAtual;\n }",
"public function getValor()\n {\n return $this->valor;\n }",
"public function getValor()\n {\n return $this->valor;\n }",
"public function getEscalaValor( ){\n\t\t\treturn $this->escalaValor;\n\t\t}",
"static public function ctrCalcularIva(){\r\n\t\t$tabla = \"banco6278\";\r\n\r\n\t\t$respuesta = ModeloBanco6278Diario::mdlCalcularIva($tabla);\r\n\r\n\t\treturn $respuesta;\r\n\t}"
] |
[
"0.70917654",
"0.7078778",
"0.7063861",
"0.7031414",
"0.6912993",
"0.653774",
"0.64183605",
"0.6406777",
"0.63552207",
"0.6313561",
"0.63073564",
"0.6266073",
"0.62406814",
"0.62013954",
"0.6155552",
"0.61512136",
"0.6135551",
"0.61159354",
"0.60699856",
"0.6029383",
"0.6022998",
"0.60095686",
"0.6005857",
"0.5985691",
"0.5983713",
"0.5982645",
"0.5966633",
"0.5966633",
"0.59452367",
"0.5933649"
] |
0.7189105
|
0
|
calcula el valor de la cesta con iva
|
public function cesta_con_iva(){
$total = 0;
foreach ($this->listArticulos as $elArticulo){
$precio = $elArticulo->oferta_iva>0?$elArticulo->oferta_iva:$elArticulo->precio_iva;
$total+= round($elArticulo->unidades*$precio,2);
}
return $total;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private function calcolaValutazione()\n {\n\n $media=0;\n $i=0;\n foreach ($this->valutazioni as &$value){\n $media=$media+$value->getvoto();\n $i++;}\n $this->valutazione=$media/$i;\n\n }",
"public function cesta_sin_iva(){\r\n\t\t\t$total = 0;\r\n\t\t\tforeach ($this->listArticulos as $elArticulo){\r\n\t\t\t\t$precio = $elArticulo->oferta>0?$elArticulo->oferta:$elArticulo->precio;\r\n\t\t\t\t$total+= round($elArticulo->unidades*$precio,2);\t\t\t\t\r\n\t\t\t}\r\n\t\t\treturn $total;\r\n\t\t}",
"public function calcularValorLlamada();",
"public function get_valor() {\n\t\t\n\t\t$ar_list_of_values\t= $this->get_ar_list_of_values();\n\t\t$dato \t\t\t\t= $this->get_dato();\n\t\t\n\t\tif (is_array ($ar_list_of_values)) foreach ($ar_list_of_values as $value => $rotulo) {\n\t\t\t\t\t\t\t\t\t\n\t\t\tif( $dato == $value ) {\n\t\t\t\t\n\t\t\t\t$this->valor = $rotulo; \n\t\t\t\t\n\t\t\t\treturn $this->valor;\n\t\t\t}\n\t\t\t#echo \"<br> - $dato - $value => $rotulo \";\n\t\t}\t\t\t\t\t\n\t}",
"public function valorpasaje();",
"public function calculVa() {\n\n return ($this->cp + $this->cb) / $this->nbta;\n }",
"public function iva_articulos(){\r\n\t\t\t$total = $this->cesta_con_iva()-$this->cesta_sin_iva();\t\t\t\r\n\t\t\treturn $total;\r\n\t\t}",
"function iva($subtotal, $iva = 0.21){ // cuando le ponemos el valor a un parametro nos permite que cada vez que haga la operacion, lo haga con el valor que le pusimos al parametro obviamente, esto es mejor que asignarle un valor desde dentro y no estableciendo el valor fijo\n $porcentaje = $subtotal * $iva;\n\n // pusimos en comentarios esto porque no necesitamos que nos haga una operacion final, solo que nos muestre el dato final\n // $solucion = $subtotal + $porcentaje;\n return $porcentaje;\n }",
"public function getValor(){\n return $this->_data['valor'];\n }",
"public function getValorInventario()\n {\n return $this->valorInventario;\n }",
"public function getValorVenta()\n {\n return $this->valorVenta;\n }",
"public function getValor($atributo){//retornar algún valor\n \treturn $this->$atributo;\n }",
"public function getValor()\n {\n return $this->valor;\n }",
"public function getValor()\n {\n return $this->valor;\n }",
"public function getValorAnulado() {\n return $this->nValorAnulado;\n }",
"public function valordelospasajesplus();",
"public function obtenerValor() {\n return $this->valor;\n }",
"public function getEscalaValor( ){\n\t\t\treturn $this->escalaValor;\n\t\t}",
"public function smanjiCenu(){\n if($this->getGodiste() < 2010){\n $discount=$this->cenapolovnogauta*0.7;\n return $this->cenapolovnogauta=$discount;\n }\n return $this->cenapolovnogauta; \n }",
"public function gerencial_valorInventario(){\n\t\t\n\t\t$resultado = 0;\n\t\t\n\t\t$query = \"SELECT cantidad, idProducto\n\t\t\t\t\t\tFROM\n\t\t\t\t\t\t tb_productos_sucursal\";\n\t\t\n\t\t\n\t\t$conexion = parent::conexionCliente();\n\t\t\n \tif($res = $conexion->query($query)){\n \n /* obtener un array asociativo */\n while ($filas = $res->fetch_assoc()) {\n \t\n\t\t\t\t$idproducto = $filas['idProducto'];\n\t\t\t\t$cantidad\t= $filas['cantidad']; \n\t\t\t\t\n\t\t\t\t$query2 = \"SELECT precio \n\t\t\t\t\t\t\tFROM tb_productos WHERE idProducto = '$idproducto'\";\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tif($res2 = $conexion->query($query2)){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t while ($filas2 = $res2->fetch_assoc()) {\n\t\t\t\t\t\t\t\t \t\n\t\t\t\t\t\t\t\t\t$precio = str_replace('.', '',$filas2['precio']);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$subtotal = $precio * $cantidad;\n\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t $resultado = $resultado + $subtotal;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t }\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\t\n\t\t\t\t\n } \n \n }//fin if\n\t\t\n return $resultado;\t\n\t\t\n\t}",
"public function getValorInicial() {\n return $this->nValorInicial;\n }",
"public function getValoracion() {\n return $this->valoracion;\n }",
"public function getValorUltimaReavaliacao() {\n\n if ($this->getTotalDeReavaliacoes() > 0) {\n\n $oDaoReavaliacaoBem = db_utils::getDao(\"inventariobem\");\n\n $sWhere = \"t77_bens = {$this->getCodigoBem()} and \";\n $sWhere .= \"t75_situacao = 3 \";\n $sOrder = \"t75_dataabertura desc limit 1\";\n\n $sSqlReavaliacaoBem = $oDaoReavaliacaoBem->sql_query_inventario(null,\n \"(t77_valordepreciavel +\n t77_valorresidual) as valor \",\n $sOrder,\n $sWhere\n );\n\n $rsReavaliacaoBem = $oDaoReavaliacaoBem->sql_record($sSqlReavaliacaoBem);\n if ($oDaoReavaliacaoBem->numrows == 1) {\n return db_utils::fieldsMemory($rsReavaliacaoBem, 0)->valor;\n }\n } else {\n return $this->getValorAquisicao();\n }\n }",
"protected function mapeoValorProp(){\n\t $strPrecio='';\n\t if($this->propiedad->getPublicaprecio()==1){\n\t\t\tif(trim($this->propiedad->getOperacion())=='Venta'){\n\t\t\t\t$mon=$this->CAR_MONVTA;\n\t\t\t\t$val=$this->CAR_VALVTA;\n\t\t\t}else{\n\t\t\t\t$mon=$this->CAR_MONALQ;\n\t\t\t\t$val=$this->CAR_VALALQ;\n\t\t\t}\n\t\t\t$valor=\tintval($this->arrayCaracteristicas[$this->arrayClavesCarac[$val]]['contenido']);\n\t\t\t$moneda=$this->arrayCaracteristicas[$this->arrayClavesCarac[$mon]]['contenido'];\n\t\t\tif($valor!=0 && $valor!=''){\n\t\t\t\tif($moneda=='U$S'){\n\t\t\t\t\t$moneda='USD';\n\t\t\t\t}else{\n\t\t\t\t\t$moneda='ARS';\n\t\t\t\t}\n\t\t\t\t$strPrecio=\"<precio>\".$valor.\"</precio><tipoMoneda>\".$moneda.\"</tipoMoneda>\";\n\t\t\t}else{\n\t\t\t\t$strPrecio=\"<tipoMoneda></tipoMoneda>\";\n\t\t\t}\n\n\t }else{\n\t\t\t$strPrecio=\"<tipoMoneda></tipoMoneda>\";\n\t }\n\t return $strPrecio;\n\t}",
"public function getValorLancar(){\n return $this->nValorLancar;\n }",
"public function getValorAtual() {\n return $this->nValorAtual;\n }",
"public function VerIVA()\r\n {\r\n\t\r\n\t$reg=mysql_query(\"SELECT Valor FROM impret WHERE Nombre='IVA'\", $this->con) or die('no se pudo conectar: ' . mysql_error());\r\n\t$reg=mysql_fetch_array($reg);\t\r\n\t$impuesto=$reg[\"Valor\"];\r\n\treturn($impuesto);\r\n\t}",
"public static function calculaVenda()\n {\n Marca::query()->update([\n 'dataultimacompra' => null,\n 'itensabaixominimo' => null,\n 'itensacimamaximo' => null,\n 'vendabimestrevalor' => null,\n 'vendasemestrevalor' => null,\n 'vendaanovalor' => null,\n 'vendaanopercentual' => null,\n ]);\n\n // Monta classificacao ABC\n $totalvendaano_geral = Marca::sum('vendaanovalor');\n $totalvendaano = Marca::where('abcignorar', '=', false)->sum('vendaanovalor');\n $posicao = 0;\n $percentual_acumulado = 0;\n\n foreach (Marca::orderByRaw('vendaanovalor DESC NULLS LAST')->orderBy('marca', 'ASC')->get() as $marca) {\n $abccategoria = 0;\n $abcposicao = null;\n\n if (!$marca->abcignorar) {\n $posicao++;\n $abcposicao = $posicao;\n $percentual_acumulado += (($marca->vendaanovalor / $totalvendaano) * 100);\n if ($percentual_acumulado <= 20) {\n $abccategoria = 3;\n } elseif ($percentual_acumulado <= 50) {\n $abccategoria = 2;\n } elseif ($percentual_acumulado <= 90) {\n $abccategoria = 1;\n } else {\n $abccategoria = 0;\n }\n }\n\n $marca->update([\n 'abccategoria' => $abccategoria,\n 'abcposicao' => $abcposicao,\n 'vendaanopercentual' => (($marca->vendaanovalor / $totalvendaano_geral) * 100),\n ]);\n\n $afetados++;\n }\n\n return $afetados;\n }",
"static public function ctrCalcularIva(){\r\n\t\t$tabla = \"banco6278\";\r\n\r\n\t\t$respuesta = ModeloBanco6278Diario::mdlCalcularIva($tabla);\r\n\r\n\t\treturn $respuesta;\r\n\t}",
"public function getCurrentVal() {}"
] |
[
"0.70791763",
"0.6963673",
"0.6861621",
"0.6747814",
"0.674198",
"0.67208266",
"0.6698211",
"0.66798043",
"0.6679106",
"0.6644655",
"0.66413426",
"0.6618285",
"0.6531306",
"0.6531306",
"0.64778817",
"0.64447266",
"0.63951766",
"0.6391793",
"0.6363039",
"0.6334774",
"0.63219136",
"0.63166773",
"0.6248528",
"0.622817",
"0.62088233",
"0.62087554",
"0.6202445",
"0.6202011",
"0.6174333",
"0.61090595"
] |
0.7028373
|
1
|
Return the higher version of $version1 and $version2 if both match. Else return false.
|
public static function matchVersions($version1, $version2)
{
if ($version1 == '*') {
return $version2;
}
if ($version2 == '*') {
return $version1;
}
if ($version1 == $version2) {
return $version1;
}
$v1 = self::_normalizeVersion($version1);
$v2 = self::_normalizeVersion($version2);
try {
$v1 = Constraint::parse($v1);
$v2 = Constraint::parse($v2);
} catch (\UnexpectedValueException $e) {
return false;
}
if ($v1->isSubsetOf($v2)) {
return $version1;
} else if ($v2->isSubsetOf($v1)) {
return $version2;
} else {
return false;
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public static function cmp($version1, $version2) {\r\n list($N1, $M1, $K1) = explode(self::SEPARATOR, $version1);\r\n list($N2, $M2, $K2) = explode(self::SEPARATOR, $version2);\r\n if($N1 == $N2) {\r\n if($M1 == $M2) {\r\n if($K1 == $K2) {\r\n return 0; \r\n } else if(!is_numeric($K1) || !is_numeric($K2)) {\r\n throw new VersionComparisonException(sprintf(\"Versions %s and %s are not comparable\", $version1, $version2));\r\n } else if($K1 < $K2) {\r\n return -1;\r\n } else if($K1 > $K2) {\r\n return 1;\r\n } \r\n } else if(!is_numeric($M1) || !is_numeric($M2)) {\r\n throw new VersionComparisonException(sprintf(\"Versions %s and %s are not comparable\", $version1, $version2));\r\n } else if($M1 < $M2) {\r\n return -1;\r\n } else if($M1 > $M2) {\r\n return 1;\r\n } \r\n } else if($N1 < $N2) {\r\n return -1;\r\n } else if($N1 > $N2) {\r\n return 1;\r\n } \r\n }",
"function version_comparison($check_ver, $base_ver)\n{\n $ret = 0;\n\n // determine the parts of the version to compare to\n $base_tmp = split('\\.', $base_ver);\n $base = array();\n $base['major'] = $base_tmp[0] != '' ? $base_tmp[0]:0;\n $base['minor'] = $base_tmp[1] != '' ? $base_tmp[1]:0;\n $base['patch'] = $base_tmp[2] != '' ? $base_tmp[2]:0;\n $base['build'] = $base_tmp[3] != '' ? $base_tmp[3]:0;\n\n // determine the parts of the version to check\n $check_tmp = split('\\.', $check_ver);\n $check = array();\n $check['major'] = $check_tmp[0] != '' ? $check_tmp[0]:0;\n $check['minor'] = $check_tmp[1] != '' ? $check_tmp[1]:0;\n $check['patch'] = $check_tmp[2] != '' ? $check_tmp[2]:0;\n $check['build'] = $check_tmp[3] != '' ? $check_tmp[3]:0;\n\n // loop through each part of the version number\n foreach ($base as $key => $val)\n {\n if ($check[$key] != $val)\n {\n // determine higher or lower and set return var\n if ($check[$key] > $val)\n {\n\n $ret = 1;\n }\n else\n {\n $ret = -1;\n }\n\n // and break out of loop\n break;\n }\n }\n\n // return the verdict\n return $ret;\n}",
"static public function compareVersion($version)\n {\n return version_compare($version, Zend::VERSION);\n }",
"public static function compare(string $version1, string $version2, string $operator = self::EQUAL): bool\n {\n $floatSeparationSymbol = '.';\n if ((substr_count($version1, ',') + substr_count($version2, ',')) > 0) {\n $floatSeparationSymbol = ',';\n }\n $depthVersion1 = substr_count($version1, $floatSeparationSymbol);\n $depthVersion2 = substr_count($version2, $floatSeparationSymbol);\n if ($depthVersion1 > $depthVersion2) {\n $version2 = self::regularizeDepthVersion($version2, $depthVersion1, $floatSeparationSymbol);\n }\n if ($depthVersion2 > $depthVersion1) {\n $version1 = self::regularizeDepthVersion($version1, $depthVersion2, $floatSeparationSymbol);\n }\n return version_compare($version1, $version2, $operator);\n }",
"public function compareVersionNumbers($ver1, $ver2) {\n\t\t$ver1Array = explode('.', $ver1);\n\t\t$ver2Array = explode('.', $ver2);\n\n\t\tfor ($i = 0; $i < count($ver1Array) && $i < count($ver2Array); $i++) {\n\t\t\tif ($ver1Array[$i] > $ver2Array[$i]) {\n\t\t\t\treturn 1;\n\t\t\t} else if ($ver1Array[$i] < $ver2Array[$i]) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\n\t\tif (count($ver1Array) > count($ver2Array)) {\n\t\t\treturn 1;\n\t\t} else if (count($ver1Array) < count($ver2Array)) {\n\t\t\treturn -1;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}",
"function qa_php_version_below($version)\n{\n\t$minphp = qa_version_to_float($version);\n\t$thisphp = qa_version_to_float(phpversion());\n\n\treturn $minphp && $thisphp && $thisphp < $minphp;\n}",
"public static function compareVersion($version)\n {\n $version = strtolower($version);\n $version = preg_replace('/(\\d)pr(\\d?)/', '$1a$2', $version);\n return version_compare($version, strtolower(self::VERSION));\n }",
"static function compareVersion($inVersion) {\n\t\treturn version_compare(self::SCORPIO_VERSION, $inVersion, '<=');\n\t}",
"function qa_qa_version_below($version)\n{\n\t$minqa = qa_version_to_float($version);\n\t$thisqa = qa_version_to_float(QA_VERSION);\n\n\treturn $minqa && $thisqa && $thisqa < $minqa;\n}",
"private function compareVersions($a, $b)\n {\n if ($a == $b) {\n //var_dump(\"Equal!\");\n return 0;\n }\n $partsA = explode('.', $a);\n //var_dump($partsA);\n $partsB = explode('.', $b);\n $more = null;\n //var_dump($partsB);\n foreach ($partsA as $key => $partA) {\n //Console::output(\"Process \" . $partA);\n if ($more !== null) {\n //Console::output(\"Already found\");\n continue;\n }\n if (array_key_exists($key, $partsB)) {\n if ((int)$partA > (int)$partsB[$key]) {\n //Console::output($partA . \" more than \" . $partsB[$key]);\n $more = true;\n } elseif ((int)$partA < (int)$partsB[$key]) {\n //Console::output($partA . \" less than \" . $partsB[$key]);\n $more = false;\n }\n //Console::output($partA . \" equal \" . $partsB[$key]);\n } else {\n //Console::output($key . \" doesn't exist in partsB\");\n $more = true;\n }\n }\n\n //Console::output(\"Result \" . ($more) ? \"more\" : \"less\");\n return $more ? 1 : -1;\n }",
"public static function compare($version)\n\t{\n\t\t$currentVersion = str_replace(' ', '', strtolower(self::VERSION));\n\t\t$version = str_replace(' ', '', $version);\n\n\t\treturn version_compare($version, $currentVersion);\n\t}",
"function version_compare($version1, $version2, $operator = NULL)\n{\n}",
"function version_compare_string($a, $b) {\n\t// (If either version lacks a string part, assume intended to match all release levels)\n\tif (isset($a) && isset($b)) {\n\t\treturn version_compare_numeric(version_get_string_value($a), version_get_string_value($b));\n\t} else {\n\t\treturn 0;\n\t}\n}",
"function checkVersion($version)\n {\n return version_compare($this->getVersion(), $version, 'lt');\n }",
"function nucleus_version_compare($version1, $version2, $operator = '')\n{\n $args = func_get_args();\n for($i = 0; $i<=1; $i++)\n {\n $args[$i] = str_replace(array('_','-','+','/'), '.', $args[$i]);\n $args[$i] = preg_replace('#^[^0-9]+#', '', $args[$i]);\n $ver = explode('.', $args[$i]);\n $major = intval($ver[0]);\n if ($major <= 3)\n { // minor version\n $x = @intval($ver[1]);\n if ($x >= 10)\n $ver[1] = sprintf('%d.%d', $x / 10 , $x % 10);\n else\n $ver[1] = sprintf('%d.0', $x);\n }\n $args[$i] = implode('.', $ver);\n }\n return call_user_func_array('version_compare', $args);\n}",
"public static function compare($version)\n {\n $currentVersion = str_replace(' ', '', strtolower(self::VERSION));\n $version = str_replace(' ', '', $version);\n\n return version_compare($version, $currentVersion);\n }",
"function is_satisfied_by($version) {\n return ($this->version_min === null || $version >= $this->version_min) &&\n ($this->version_max === null || $version <= $this->version_max);\n }",
"public function laterThan($version);",
"public static function areSiblings($version1, $version2) {\r\n list($N1, $M1, $K1) = explode(self::SEPARATOR, $version1);\r\n list($N2, $M2, $K2) = explode(self::SEPARATOR, $version2);\r\n return ($N1 == $N2 && $M1 == $M2);\r\n }",
"private static function isPHPVersionHigher($version)\n {\n return version_compare(PHP_VERSION, $version) >= 0;\n }",
"public function compatVersionConditionMatchesSameRelease() {}",
"public function compatVersionConditionMatchesSameRelease() {}",
"public static function compare(Version $a, Version $b)\n {\n $aValues = $a->numeric();\n $bValues = $b->numeric();\n\n foreach (array_keys(self::$ordinality) as $key) {\n $aVal = $aValues[$key];\n $bVal = $bValues[$key];\n\n if ($aVal < $bVal) {\n return -1;\n } elseif ($aVal > $bVal) {\n return 1;\n }\n }\n return 0;\n }",
"public static function isBelow_6_2()\n {\n return (self::getVersionAsInteger() < self::VERSION_6_2);\n }",
"function check_php_version () {\n\t$testSplit = explode ('.', '4.3.0');\n\t$currentSplit = explode ('.', phpversion());\n\n\tif ($testSplit[0] < $currentSplit[0])\n\t\treturn True;\n\tif ($testSplit[0] == $currentSplit[0]) {\n\t\tif ($testSplit[1] < $currentSplit[1])\n\t\t\treturn True;\n\t\tif ($testSplit[1] == $currentSplit[1]) {\n\t\t\tif ($testSplit[2] <= $currentSplit[2])\n\t\t\t\treturn True;\n\t\t}\n\t}\n\treturn False;\n}",
"public static function isGreaterThan($versionNumber)\n {\n return (self::getVersionAsInteger() > self::_convertVersionNumberToInteger($versionNumber));\n }",
"function acf_version_compare($left = '', $compare = '>', $right = '')\n{\n}",
"function versionCheck($template) {\n\tglobal $communitySettings;\n\n\tif ( $template['MinVer'] && ( version_compare($template['MinVer'],$communitySettings['unRaidVersion']) > 0 ) ) return false;\n\tif ( $template['MaxVer'] && ( version_compare($template['MaxVer'],$communitySettings['unRaidVersion']) < 0 ) ) return false;\n\treturn true;\n}",
"public function isVersionRecommendedOrLarger()\n {\n return (\n (int) implode(null, explode('.', Mage::getVersion())) >=\n (int) implode(null, explode('.', self::RECOMMENDED_VERSION))\n );\n }",
"public final function isVersionSatisfiable(float $version): bool\n {\n if ($this->version === null) {\n return true;\n }\n\n if ($this->version[0] !== null && $this->version[1] !== null) {\n return $version >= $this->version[0] && $version <= $this->version[1];\n }\n\n if ($this->version[0] !== null) {\n return $version >= $this->version[0];\n }\n\n if ($this->version[1] !== null) {\n return $version <= $this->version[1];\n }\n\n return true;\n }"
] |
[
"0.6775682",
"0.6516803",
"0.64387816",
"0.637249",
"0.63653535",
"0.6319751",
"0.6317614",
"0.6222706",
"0.61863184",
"0.6147283",
"0.6147029",
"0.61251545",
"0.61182356",
"0.605372",
"0.5943914",
"0.59289575",
"0.59118646",
"0.590628",
"0.5859649",
"0.5773274",
"0.57573664",
"0.57569486",
"0.56669074",
"0.56334287",
"0.56209314",
"0.5603012",
"0.5579407",
"0.5565414",
"0.55424654",
"0.55410427"
] |
0.71580714
|
0
|
Busca un objeto Software en la base de datos.
|
public function select($software){
$idSoftware=$software->getIdSoftware();
try {
$sql= "SELECT `idSoftware`, `Equipo_idEquipo`, `Tipo_Software_idTipo_Software`, `fecha_vencimiento`, `version`, `nombre`"
."FROM `software`"
."WHERE `idSoftware`='$idSoftware'";
$data = $this->ejecutarConsulta($sql);
for ($i=0; $i < count($data) ; $i++) {
$software->setIdSoftware($data[$i]['idSoftware']);
$software->setEquipo_idEquipo($data[$i]['Equipo_idEquipo']);
$software->setTipo_Software_idTipo_Software($data[$i]['Tipo_Software_idTipo_Software']);
$software->setFecha_vencimiento($data[$i]['fecha_vencimiento']);
$software->setVersion($data[$i]['version']);
$software->setNombre($data[$i]['nombre']);
}
return $software; } catch (SQLException $e) {
throw new Exception('Primary key is null');
return null;
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"function addSoftware($software){\r\n\r\n $this->app->log->info(__CLASS__ . '::' . __METHOD__);\r\n // $this->app->log->info('software : '.$this->dumpRet($software));\r\n $dao = new \\PNORD\\Model\\SoftwareDAO($this->app); \r\n return $dao->addSoftware($software); \r\n\r\n }",
"function listSoftware($search){\r\n\r\n $this->app->log->info(__CLASS__ . '::' . __METHOD__);\r\n $dao = new \\PNORD\\Model\\SoftwareDAO($this->app); \r\n return $dao->listSoftware($search); \r\n\r\n }",
"function listar_so_software() {\n\t\t$query = \"SELECT software_so.*\n\t\tFROM software_so\n\t\tORDER BY so asc\";\n\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn $result;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}",
"public static function getSoftwares($data){\n //Array que será retornado\n $softwares = array();\n\n //Caso possua registros de softwares\n if(isset($data['PRODUCAO-TECNICA']['SOFTWARE'])):\n $softwaresRaw = $data['PRODUCAO-TECNICA']['SOFTWARE'];\n\n //Caso possua apenas um registro\n if(array_keys($softwaresRaw)[0] === '@attributes')\n $softwaresRaw = array($softwaresRaw);\n\n //Percorrer lista\n foreach ($softwaresRaw as $software) {\n //Classe temporária para atribuição\n $software_ = new self();\n //Definição de caminhos\n $dadosB = attr($software['DADOS-BASICOS-DO-SOFTWARE']);\n $details = attr($software['DETALHAMENTO-DO-SOFTWARE']);\n $autores = $software['AUTORES'];\n\n //dadosB\n $software_->natureza = $dadosB['NATUREZA'];\n $software_->titulo = $dadosB['TITULO-DO-SOFTWARE'];\n $software_->ano = $dadosB['ANO'];\n $software_->homepage = $dadosB['HOME-PAGE-DO-TRABALHO'];\n $software_->doi = $dadosB['DOI'];\n //details\n $software_->finalidade = $details['FINALIDADE'];\n $software_->plataforma = $details['PLATAFORMA'];\n $software_->ambiente = $details['AMBIENTE'];\n //autores\n $software_->autores = getAutores($autores);\n \n\n //Atribuição da classe temporária no Array\n array_push($softwares, $software_);\n }\n endif;\n return $softwares;\n }",
"function listar_tipo_software() {\n\t\t$query = \"SELECT software_tipo.*\n\t\tFROM software_tipo\n\t\tORDER BY tipo_software asc\";\n\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn $result;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}",
"function getSoftware($softwareId){\r\n\r\n $this->app->log->info(__CLASS__ . '::' . __METHOD__);\r\n $dao = new \\PNORD\\Model\\SoftwareDAO($this->app); \r\n return $dao->getSoftware($softwareId); \r\n\r\n }",
"public function __construct(Software $software)\n {\n $this->software = $software;\n }",
"public function inserir(Software $software){\n\t\t//Primeiro Passo - Inserir os dados basicos do software: nome e linguagem, pegando o Ultimo Id inserido.\n\t\t$nome = $software->getNome();\n\t\t$linguagem = $software->getLinguagem();\n\t\t$insert = \"INSERT into software(nome, linguagem) values('$nome', '$linguagem')\";\n\t\tif($this->conexao->query($insert)){\n\t\t\t//echo 'Software Inserido Com sucesso! -'. $insert;\n\t\t\t\n\t\t\t$sgdb = $software->getBancoDeDados()->getSistemaGerenciadorDeBancoDeDados();\n\t\t\t$host = $software->getBancoDeDados()->getHost();\n\t\t\t$pass = $software->getBancoDeDados()->getPass();\n\t\t\t$nomeDoBanco = $software->getBancoDeDados()->getNomeDoBanco();\n\t\t\t$idDoSoftware = $this->conexao->lastInsertId();\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//Segundo Passo - Inserir dados do BancoDeDados\n\t\t\t$insert2 = \"INSERT into banco_de_dados\n\t\t\t\t\t(nome_do_banco, sistema_gerenciador_de_banco, host, pass, software_id_software) \n\t\t\t\t\tvalues('$nomeDoBanco', '$sgdb', '$host', '$pass', $idDoSoftware)\";\n\t\t\t\n\t\t\tif($this->conexao->query($insert2)){\n\t\t\t\t//echo '<br>Dados do banco inseridos com sucesso! '. $insert2;\n\t\t\t\t//Terceiro Passo - Retornar o ultimo ID do software inserido para quem fez a insersão.\n\t\t\t\t\n\t\t\t\treturn $idDoSoftware;\n\t\t\t}else{\n\t\t\t\t//echo $insert2;\n\t\t\t\techo 'Erro ao tentar inserir dados referente ao banco';\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo 'Erro ao tentar inserir software'. $insert;\n\t\t\treturn 0;\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\n\t\t\n\t\t\n\n\n\t\t\n\t\t\n\t}",
"function datos_so_software($id_so) {\n\t\t$query = \"SELECT software_so.*\n\t\tFROM software_so\n\t\tWHERE id_so = '$id_so'\";\n\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\t$row=mysql_fetch_array($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn $result;\n\t\t}\n\t\telse {\n\t\t\treturn $row;\n\t\t}\n\t}",
"function datos_software($id) {\n\t\t\n\t\t$query = \"SELECT software.*, software_descripcion.*, software_informacion_adicional.*, software_objetivo.*, licencias.*\n\t\tFROM software, software_descripcion, software_informacion_adicional, software_objetivo, licencias\n\t\tWHERE software.id_software=$id\n\t\tAND software.id_software=software_descripcion.id_software\n\t\tAND software.id_software=software_informacion_adicional.id_software\n\t\tAND software.id_software=software_objetivo.id_software\n\t\tAND software.software_licencia=licencias.id_licencia\";\n\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\t$row=mysql_fetch_array($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn 0;\n\t\t}\n\t\telse {\n\t\t\treturn $row;\n\t\t}\n\t}",
"private function loadSoftware()\n\t\t{\n\n\t\t\t$software = FileSystem::getFilesInDirectory( Application::globals()->SOFTWARE_FILEPATH );\n\n\t\t\tforeach ($software as $softwares)\n\t\t\t{\n\n\n\t\t\t\tif (self::$factory->hasClass(FileSystem::getFileName($softwares)))\n\t\t\t\t\tcontinue;\n\n\t\t\t\tself::$factory->createClass(FileSystem::getFileName($softwares));\n\t\t\t}\n\t\t}",
"function buscar_software($registrado,$texto_buscar,$sql,$idioma) {\n\t\n\t\tif ($registrado==false) {\n\t\t\t$mostrar_visibles=\"AND software_estado=1\";\n\t\t}\n\t\t\n\t\tif ($texto_buscar !='' && $idioma=='es') {\n\t\t\t\n\t\t\t$sql_texto=\"AND (software.software_titulo LIKE '%$texto_buscar%' \n\t\t\tOR software_descripcion.software_descripcion LIKE '%$texto_buscar%' \n\t\t\tOR software_objetivo.software_objetivo LIKE '%$texto_buscar%'\n\t\t\tOR software_informacion_adicional.software_informacion_adicional LIKE '%$texto_buscar%') \n\t\t\t\";\n\t\t\n\t\t} elseif ($texto_buscar !='' && $idioma!='es') {\n\t\t\t\n\t\t\t$sql_texto=\"AND (software.software_titulo LIKE '%$texto_buscar%' \n\t\t\tOR software_descripcion.software_descripcion_\".$idioma.\" LIKE '%$texto_buscar%' \n\t\t\tOR software_objetivo.software_objetivo_\".$idioma.\" LIKE '%$texto_buscar%'\n\t\t\tOR software_informacion_adicional.software_informacion_adicional_\".$idioma.\" LIKE '%$texto_buscar%') \n\t\t\t\";\n\t\t} else {\n\t\t\t\n\t\t\t$sql_texto=\"AND (software.software_titulo LIKE '%$texto_buscar%' \n\t\t\tOR software_descripcion.software_descripcion LIKE '%$texto_buscar%' \n\t\t\tOR software_objetivo.software_objetivo LIKE '%$texto_buscar%'\n\t\t\tOR software_informacion_adicional.software_informacion_adicional LIKE '%$texto_buscar%') \n\t\t\t\";\n\t\t}\n\t\t\n\t\t$query = \"SELECT COUNT(*) \n\t\tFROM software, software_descripcion,software_objetivo,\n\t\tsoftware_informacion_adicional\n\t\tWHERE software.id_software=software_descripcion.id_software\n\t\tAND software.id_software=software_objetivo.id_software\n\t\tAND software.id_software=software_informacion_adicional.id_software\n\t\t$sql\n\t\t$sql_texto\n\t\t$mostrar_visibles\n\t\tORDER BY fecha_alta desc\";\n\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_fetch_array($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows[0] == 0) {\n\t\t\treturn false;\n\t\t}\n\t\telse {\n\t\t\treturn $numrows[0];\n\t\t}\n\t}",
"function updateSoftware($software){\r\n\r\n $this->app->log->info(__CLASS__ . '::' . __METHOD__);\r\n // $this->app->log->info('software : '.$this->dumpRet($software));\r\n $dao = new \\PNORD\\Model\\SoftwareDAO($this->app); \r\n return $dao->updateSoftware($software); \r\n\r\n }",
"public function setSoftwareName($software)\n {\n return $this->setParam(self::SOFTWARE_PARAM_NAME, $software);\n }",
"public function insert($software){\r\n $idSoftware=$software->getIdSoftware();\n$equipo_idEquipo=$software->getEquipo_idEquipo();\n$tipo_Software_idTipo_Software=$software->getTipo_Software_idTipo_Software();\n$fecha_vencimiento=$software->getFecha_vencimiento();\n$version=$software->getVersion();\n$nombre=$software->getNombre();\n\r\n try {\r\n $sql= \"INSERT INTO `software`( `idSoftware`, `Equipo_idEquipo`, `Tipo_Software_idTipo_Software`, `fecha_vencimiento`, `version`, `nombre`)\"\r\n .\"VALUES ('$idSoftware','$equipo_idEquipo','$tipo_Software_idTipo_Software','$fecha_vencimiento','$version','$nombre')\";\r\n return $this->insertarConsulta($sql);\r\n } catch (SQLException $e) {\r\n throw new Exception('Primary key is null');\r\n }\r\n }",
"public function getSoftware($softwareid)\n\t\t{\n\n\t\t\treturn self::$database->getSoftware($softwareid);\n\t\t}",
"public function getSoftwareName()\n {\n return $this->getParam(self::SOFTWARE_PARAM_NAME);\n }",
"public function __construct($_name, $_surname, $_license, $_software) {\n parent::__construct($_name, $_surname);\n $this->software = $_software;\n $this->licenze = $_license;\n }",
"function datos_tipo_software($id_tipo) {\n\t\t$query = \"SELECT software_tipo.*\n\t\tFROM software_tipo\n\t\tWHERE software_tipo.id_tipo_software='$id_tipo'\";\n\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$row = mysql_fetch_array($result);\n\t\tmysql_close($connection);\n\t\treturn $row;\n\t}",
"function buscar_software_limit($registrado,$texto_buscar,$sql,$inicial,$cantidad,$idioma) {\n\t\n\t\tif ($registrado==false) {\n\t\t\t$mostrar_visibles=\"AND software_estado=1\";\n\t\t}\n\t\t\n\t\tif ($texto_buscar !='' && $idioma=='es') {\n\t\t\t\n\t\t\t$sql_texto=\"AND (software.software_titulo LIKE '%$texto_buscar%' \n\t\t\tOR software_descripcion.software_descripcion LIKE '%$texto_buscar%' \n\t\t\tOR software_objetivo.software_objetivo LIKE '%$texto_buscar%'\n\t\t\tOR software_informacion_adicional.software_informacion_adicional LIKE '%$texto_buscar%') \n\t\t\t\";\n\t\t\n\t\t} elseif ($texto_buscar !='' && $idioma!='es') {\n\t\t\t\n\t\t\t$sql_texto=\"AND (software.software_titulo LIKE '%$texto_buscar%' \n\t\t\tOR software_descripcion.software_descripcion_\".$idioma.\" LIKE '%$texto_buscar%' \n\t\t\tOR software_objetivo.software_objetivo_\".$idioma.\" LIKE '%$texto_buscar%'\n\t\t\tOR software_informacion_adicional.software_informacion_adicional_\".$idioma.\" LIKE '%$texto_buscar%') \n\t\t\t\";\n\t\t} else {\n\t\t\t\n\t\t\t$sql_texto=\"AND (software.software_titulo LIKE '%$texto_buscar%' \n\t\t\tOR software_descripcion.software_descripcion LIKE '%$texto_buscar%' \n\t\t\tOR software_objetivo.software_objetivo LIKE '%$texto_buscar%'\n\t\t\tOR software_informacion_adicional.software_informacion_adicional LIKE '%$texto_buscar%') \n\t\t\t\";\n\t\t}\n\t\t\n\t\t$query = \"SELECT software.*, software_descripcion.*,software_objetivo.*,\n\t\tsoftware_informacion_adicional.* \n\t\tFROM software, software_descripcion,software_objetivo,\n\t\tsoftware_informacion_adicional\n\t\tWHERE software.id_software=software_descripcion.id_software\n\t\tAND software.id_software=software_objetivo.id_software\n\t\tAND software.id_software=software_informacion_adicional.id_software\n\t\t$sql\n\t\t$sql_texto\n\t\t$mostrar_visibles\n\t\tORDER BY software.software_destacado desc\n\t\tLIMIT $inicial,$cantidad\";\n\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn false;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}",
"public function getSoftwareData($softwareid)\n\t\t{\n\n\t\t\treturn json_decode(self::$database->getSoftware($softwareid)->data, true);\n\t\t}",
"function addMaintenance($data){\r\n\r\n $this->app->log->info(__CLASS__ . '::' . __METHOD__);\r\n // $this->app->log->info('software : '.$this->dumpRet($software));\r\n $dao = new \\PNORD\\Model\\SoftwareDAO($this->app); \r\n return $dao->addMaintenance($data); \r\n\r\n }",
"public function run()\n {\n \\App\\Models\\Info_Software::create(['nombre_software' => 'Sistema de auditoria academica',\n 'version_software'=>'version 1.0']);\n }",
"function addSoftware($name, $manufacturer_id, $entity, $comment = '',\n $is_recursive = false, $is_helpdesk_visible = null) {\n global $CFG_GLPI;\n\n $input[\"name\"] = $name;\n $input[\"manufacturers_id\"] = $manufacturer_id;\n $input[\"entities_id\"] = $entity;\n $input[\"is_recursive\"] = ($is_recursive ? 1 : 0);\n // No comment\n if (is_null($is_helpdesk_visible)) {\n $input[\"is_helpdesk_visible\"] = $CFG_GLPI[\"default_software_helpdesk_visible\"];\n } else {\n $input[\"is_helpdesk_visible\"] = $is_helpdesk_visible;\n }\n\n //Process software's category rules\n $softcatrule = new RuleSoftwareCategoryCollection();\n $result = $softcatrule->processAllRules(null, null, Toolbox::stripslashes_deep($input));\n\n if (!empty($result)) {\n if (isset($result['_ignore_import'])) {\n $input[\"softwarecategories_id\"] = 0;\n } else if (isset($result[\"softwarecategories_id\"])) {\n $input[\"softwarecategories_id\"] = $result[\"softwarecategories_id\"];\n } else if (isset($result[\"_import_category\"])) {\n $softCat = new SoftwareCategory();\n $input[\"softwarecategories_id\"]\n = $softCat->importExternal($input[\"_system_category\"]);\n }\n } else {\n $input[\"softwarecategories_id\"] = 0;\n }\n\n return $this->add($input);\n }",
"public function execute(array $data): Software\n {\n $this->data = $data;\n $this->validate();\n $this->checkOut();\n $this->log();\n\n return $this->software;\n }",
"public function getSoftwareOnComputer($computerid)\n\t\t{\n\n\t\t\treturn self::$database->getByComputer($computerid);\n\t\t}",
"function getSoftware($hostname) {\n\t\tset_time_limit(300);\n\t\texec(escapeshellcmd(\"wmic /node:$hostname product get name\"), $output, $result);\n\t\treturn array($output, $result);\n\t}",
"public static function getSoftwareInfo()\n\t{\n\t\treturn MHTTPD::$info['software'];\n\t}",
"function datos_software_tipo($id_tipo) {\n\t\t$query = \"SELECT software_tipo.*\n\t\tFROM software_tipo\n\t\tWHERE id_tipo_software = '$id_tipo'\";\n\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\t$row=mysql_fetch_array($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn $result;\n\t\t}\n\t\telse {\n\t\t\treturn $row;\n\t\t}\n\t}",
"function ultimas_fichas_software() {\n\t\n\t\t$query = \"SELECT COUNT(1) FROM software\";\n\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$rows = mysql_fetch_array($result);\n\t\tmysql_close($connection);\n\t\treturn $rows[0];\n\t}"
] |
[
"0.649294",
"0.6330059",
"0.6232831",
"0.6185739",
"0.61768323",
"0.6168882",
"0.61010635",
"0.6014792",
"0.5995253",
"0.5965261",
"0.5931545",
"0.58678806",
"0.5863684",
"0.5747631",
"0.5724595",
"0.56780756",
"0.55907685",
"0.5534432",
"0.55174387",
"0.5378859",
"0.53180486",
"0.528925",
"0.5278914",
"0.52698",
"0.5208262",
"0.51976377",
"0.51936764",
"0.5186356",
"0.51851386",
"0.51730657"
] |
0.6903513
|
0
|
Elimina un objeto Software en la base de datos.
|
public function delete($software){
$idSoftware=$software->getIdSoftware();
try {
$sql ="DELETE FROM `software` WHERE `idSoftware`='$idSoftware'";
return $this->insertarConsulta($sql);
} catch (SQLException $e) {
throw new Exception('Primary key is null');
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"function formularioSoftwareEliminar() {\nrequire_once \"conexionsql.php\";\nrequire_once \"formularios.php\";\n$conSoftware= \"SELECT ID_SOFTWARE,SOFTWARE from software WHERE ESTATUS_ACTIVO = '1' ORDER BY software ASC\";\n\t//Campo tipo de software\n\t$software= new campoSeleccion(\"selSoftware\",\"formularioCampoSeleccion\",\"$_POST[selSoftware]\",\"onChange\",\"\",$conSoftware,\"--SELECCIONE--\",\"\");\n\t$selSoftware=$software->retornar();\n\necho \"<form name=\\\"frmSoftware\\\" method=\\\"post\\\" action=\\\"\\\">\";\n\techo \"<input name=\\\"funcion\\\" type=\\\"hidden\\\" value=\\\"1\\\">\";\n\techo \"<input name=\\\"selSoftware\\\" type=\\\"hidden\\\" value=\\\"$_POST[selSoftware]\\\">\";\n\n\techo \"<table class=\\\"formularioTabla\\\"align=center width=\\\"100\\\" border=\\\"0\\\">\";\n\t\techo \"<tr>\";\n\t\t\techo \"<td class=\\\"formularioTablaTitulo\\\" colspan=\\\"2\\\">ELIMINAR SOFTWARE</td>\n \t\t\t\t</tr>\";\n\t echo \"<tr>\";\n\t\t\techo \"<tr align=center></tr>\n \t\t\t\t</tr><tr align=center><td valign=top class=\\\"formularioCampoTitulo\\\" ><p align=center >SOFTWARE<br>$selSoftware<br></tr>\";\n\t \techo \"<tr>\";\n\t\t\techo \"<td class=\\\"formularioTablaBotones\\\" colspan=\\\"2\\\"><input name=\\\"btnLimpiar\\\" type=\\\"submit\\\" value=\\\"ELIMINAR\\\">\n\t\t\t</td>\n \t\t</tr>\";\necho \"</table>\";\necho \"</form>\";\t\t\t\t\t\n}",
"public function eliminar($objeto){\r\n\t}",
"function cleanDBonPurge() {\n $sl = new SoftwareLicense();\n $sl->deleteByCriteria(['softwares_id' => $this->fields['id']]);\n\n $this->deleteChildrenAndRelationsFromDb(\n [\n Item_Project::class,\n SoftwareVersion::class,\n ]\n );\n }",
"public function excluir(){\r\n return (new Database('cartao'))->delete('id = '.$this->id);\r\n }",
"public function excluir()\n {\n return (new Database('vagas'))->delete('id = '.$this->id);\n }",
"final public function delete() {\n $db = Database::getInstance();\n $mysqli = $db->getConnection();\n\t\n $sql_query = 'DELETE FROM fresco_costing_component_array WHERE component_id ='.$this->_component_id;\n \n $result = $mysqli->query($sql_query);\n if (!$result) {\n trigger_error('Unable to delete from database : SQL query : ' . $sql_query);\n }\n\treturn;\n }",
"public function eliminarProducto($codigo){\r\n //Preparamos la conexion a la bdd:\r\n $pdo=Database::connect();\r\n $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n $sql=\"delete from producto where codigo=?\";\r\n $consulta=$pdo->prepare($sql);\r\n //Ejecutamos la sentencia incluyendo a los parametros:\r\n $consulta->execute(array($codigo));\r\n Database::disconnect();\r\n }",
"public function destroy(Software $software)\n {\n $software->delete();\n Session::flash('success', 'Software \"' . $software->id . '\" eliminado');\n return redirect()->route('softwares.index');\n }",
"function action_remove() {\n\t\t\t$data = UTIL::get_post('data');\n\t\t\t$id = (int)$data['rem_id'];\n\t\t\t$table = $data['rem_table'];\n\t\t\t\n\t\t\t$choosen = $this->SESS->get('objbrowser', 'choosen');\n\t\t\tunset($choosen[$table][$id]);\n\t\t\tif (count($choosen[$table]) == 0) unset($choosen[$table]);\n\t\t\t\n\t\t\t$this->SESS->set('objbrowser', 'choosen', $choosen);\n\t\t}",
"public function delete() {\n\n // Does the program object have an ID?\n if ( is_null( $this->programID ) ) trigger_error ( \"Program::delete(): Attempt to delete an program object that does not have its ID property set.\", E_USER_ERROR );\n\n // Delete the program\n $conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );\n $st = $conn->prepare ( \"DELETE FROM programs WHERE programID = :id LIMIT 1\" );\n $st->bindValue( \":id\", $this->programID, PDO::PARAM_INT );\n $st->execute();\n $conn = null;\n }",
"function eliminar($objeto){\n\t\t$sql=\"\tUPDATE\n\t\t\t\t\tcom_recetas\n\t\t\t\tSET\n\t\t\t\t\tstatus = 2\n\t\t\t\tWHERE\n\t\t\t\t\tid = \".$objeto['id'].\";\n\n\t\t\t\tUPDATE\n\t\t\t\t\tapp_productos\n\t\t\t\tSET\n\t\t\t\t\tstatus = 0\n\t\t\t\tWHERE\n\t\t\t\t\tid = \".$objeto['id'].\";\n\n\t\t\t\tUPDATE\n\t\t\t\t\tapp_producto_material\n\t\t\t\tSET\n\t\t\t\t\tstatus = 0\n\t\t\t\tWHERE\n\t\t\t\t\tid_producto = \".$objeto['id'].\";\";\n\t\t// return $sql;\n\t\t$result = $this->dataTransact($sql);\n\n\t\treturn $result;\n\t}",
"public function remove()\n {\n database()->run('DELETE FROM ' . $this->table . ' WHERE ' . $this->primaryKey . ' = ?', [ $this->{$this->primaryKey} ]);\n $this->__destruct();\n }",
"function deleteProyecto($proyecto){\n //no implementado por no requerimiento del proyecto\n }",
"public function EliminarProducto(Request $request)\n {\n $id=Crypt::decrypt($request->id);\n $Product = Producto::find($id); \n $Product->delete();\n }",
"public function remove();",
"public function remove();",
"public function remove();",
"public function remove();",
"public function excluir(){\r\n return (new Database('atividades'))->delete('id = '.$this->id);\r\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 }",
"private function deleteLicense()\n {\n try {\n $sql = \"DELETE FROM s_core_licenses WHERE module = 'SwagCommercial'\";\n $this->container->get('dbal_connection')->query($sql);\n } catch (\\PDOException $e) {\n throw new \\RuntimeException('Could not remove license from database', 0, $e);\n }\n }",
"public function Excluir(){\n $idMotorista = $_GET['id'];\n\n $motorista = new Motorista();\n\n $motorista->id = $idMotorista;\n\n $motorista::Delete($motorista);\n\n\n }",
"function eliminar_insumos($objeto){\n\t\t$sql=\"\tDELETE FROM\n\t\t\t\t\t app_producto_material\n\t\t\t\tWHERE\n\t\t\t\t\tid_producto =\".$objeto['id'];\n\t\t// return $sql;\n\t\t$result = $this->query($sql);\n\n\t\treturn $result;\n\t}",
"function Eliminar()\n{\n /**\n * Se crea una instanica a Concesion\n */\n $Concesion = new Titulo();\n /**\n * Se coloca el Id del acuifero a eliminar por medio del metodo SET\n */\n $Concesion->setId_titulo(filter_input(INPUT_GET, \"ID\"));\n /**\n * Se manda a llamar a la funcion de eliminar.\n */\n echo $Concesion->delete();\n}",
"public function eliminar(){\n $dimensiones = $this->descripciones()->distinct()->get()->pluck('id')->all();\n $this->descripciones()->detach($dimensiones);\n DescripcionProducto::destroy($dimensiones);\n $this->categorias()->detach();\n $this->imagenes()->delete();\n $this->delete();\n }",
"public function deleting(Seguimiento $Seguimiento){\n \n }",
"public function EliminarDetallesVentas()\n{\n\tif($_SESSION['acceso'] == \"administrador\") {\n\n\t\tself::SetNames();\n\n\t\t$sql = \" select * from detalleventas where codventa = ? \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array(strip_tags($_GET[\"codventa\"])) );\n\t\t$num = $stmt->rowCount();\n\t\tif($num > 1)\n\t\t{\n\n\t$sql2 = \"select existencia from productos where codproducto = ?\";\n\t$stmt = $this->dbh->prepare($sql2);\n\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])));\n\t$num = $stmt->rowCount();\n\n\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$p[] = $row;\n\t\t}\n\t$existenciadb = $p[0][\"existencia\"];\n\n###################### ACTUALIZAMOS LOS DATOS DEL PRODUCTO EN ALMACEN ############################\n\t$sql = \" update productos set \"\n\t.\" existencia = ? \"\n\t.\" where \"\n\t.\" codproducto = ?;\n\t\";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->bindParam(1, $existencia);\n\t$stmt->bindParam(2, $codproducto);\n\t$cantventa = strip_tags(base64_decode($_GET[\"cantventa\"]));\n\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t$existencia = $existenciadb + $cantventa;\n\t$stmt->execute();\n\n\t$sql = \" delete from detalleventas where coddetalleventa = ? \";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->bindParam(1,$coddetalleventa);\n\t$coddetalleventa = base64_decode($_GET[\"coddetalleventa\"]);\n\t$stmt->execute();\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t$sql = \" delete from kardexproductos where codproceso = ? and codproducto = ?\";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->bindParam(1,$codventa);\n\t$stmt->bindParam(2,$codproducto);\n\t$codventa = strip_tags(strip_tags($_GET[\"codventa\"]));\n\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t$stmt->execute();\n\n################## CONSULTO LA TABLA PARA VERIFICAR SI EXISTEN PRODUCTOS #################\n$sql = \"select * from productosvsingredientes where codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array($codproducto));\n\t\t$num = $stmt->rowCount();\n if($num>0) {\n\n$sql = \"select * from productosvsingredientes LEFT JOIN ingredientes ON productosvsingredientes.codingrediente = ingredientes.codingrediente where productosvsingredientes.codproducto = '\".$codproducto.\"'\";\n\n\t$array=array();\n\n\t\tforeach ($this->dbh->query($sql) as $row)\n\t\t{\n\t\t$this->p[] = $row;\n\n\t\t$codproducto = $row['codproducto'];\n\t\t$codingrediente = $row['codingrediente'];\n\t\t$cantracion = $row['cantracion'];\n\t\t$cantingrediente = $row['cantingrediente'];\n\t\t$costoingrediente = $row['costoingrediente'];\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t\t$sql = \" delete from kardexingredientes where codprocesoing = ? and codproducto = ? and codingrediente = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codventa);\n\t\t$stmt->bindParam(2,$codproducto);\n\t\t$stmt->bindParam(3,$codingrediente);\n\t\t$codventa = strip_tags(strip_tags($_GET[\"codventa\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$codingrediente = strip_tags($codingrediente);\n\t\t$stmt->execute();\n\n\t\t$update = \" update ingredientes set \"\n\t\t.\" cantingrediente = ? \"\n\t\t.\" where \"\n\t\t.\" codingrediente = ?;\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($update);\n\t\t$stmt->bindParam(1, $cantidadracion);\n\t\t$stmt->bindParam(2, $codingrediente);\n\n\t\t$cantventa = strip_tags(base64_decode($_GET[\"cantventa\"]));\n\t\t$racion = rount($cantracion*$cantventa,2);\n\t\t$cantidadracion = rount($cantingrediente+$racion,2);\n\t\t$stmt->execute();\n\n\t\t }\n}\n############ FIN DE CONSULTO LA TABLA PARA VERIFICAR SI EXISTEN PRODUCTOS REGISTRADOS ##############\n\n\t$sql4 = \"select * from ventas where codventa = ? \";\n\t\t$stmt = $this->dbh->prepare($sql4);\n\t\t$stmt->execute( array(strip_tags($_GET[\"codventa\"])) );\n\t\t$num = $stmt->rowCount();\n\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$paea[] = $row;\n\t\t}\n\t\t$subtotalivasive = $paea[0][\"subtotalivasive\"];\n\t\t$subtotalivanove = $paea[0][\"subtotalivanove\"];\n\t\t$iva = $paea[0][\"ivave\"]/100;\n\t\t$descuento = $paea[0][\"descuentove\"]/100;\n\t\t$totalivave = $paea[0][\"totalivave\"];\n\t\t$totaldescuentove = $paea[0][\"totaldescuentove\"];\n\t\t$totaldb = $paea[0][\"totalpago\"];\n\t\t$montopagado = $paea[0][\"montopagado\"];\n\t\t\t\n\t\t\n$sql3 = \"select sum(importe) as importe, sum(importe2) as importe2, sum(preciocompra) as preciocompra from detalleventas where codventa = ? and ivaproducto = 'SI'\";\n\t\t$stmt = $this->dbh->prepare($sql3);\n\t\t$stmt->execute( array(strip_tags($_GET[\"codventa\"])));\n\t\t$num = $stmt->rowCount();\n\t\t \n\t\t if($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$pae[] = $row;\n\t\t\t}\n\t\t$preciocompraiva = ($pae[0][\"preciocompra\"]== \"\" ? \"0\" : $pae[0][\"preciocompra\"]);\n\t\t$importeivasi = ($pae[0][\"importe\"]== \"\" ? \"0\" : $pae[0][\"importe\"]);\n\t\t$importe2si = ($pae[0][\"importe2\"]== \"\" ? \"0\" : $pae[0][\"importe2\"]);\n\t\n$sql5 = \"select sum(importe) as importe, sum(importe2) as importe2, sum(preciocompra) as preciocompra from detalleventas where codventa = ? and ivaproducto = 'NO'\";\n\t\t$stmt = $this->dbh->prepare($sql5);\n\t\t$stmt->execute( array(strip_tags($_GET[\"codventa\"])));\n\t\t$num = $stmt->rowCount();\n\t\t \n\t\t if($roww = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$p[] = $roww;\n\t\t\t}\n\t\t$preciocompra = ($roww[\"preciocompra\"]== \"\" ? \"0\" : $roww[\"preciocompra\"]);\n\t\t$importeivano = ($roww[\"importe\"]== \"\" ? \"0\" : $roww[\"importe\"]);\n\t\t$importe2 = ($roww[\"importe2\"]== \"\" ? \"0\" : $roww[\"importe2\"]);\n\t\t\nif(base64_decode($_GET[\"ivaproducto\"])==\"SI\"){\t\n\n\t\t$sql = \" update ventas set \"\n\t\t\t .\" subtotalivasive = ?, \"\n\t\t\t .\" totalivave = ?, \"\n\t\t\t .\" totaldescuentove = ?, \"\n\t\t\t .\" totalpago= ?, \"\n\t\t\t .\" montodevuelto= ? \"\n\t\t\t .\" where \"\n\t\t\t .\" codventa = ?;\n\t\t\t \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $subtotal);\n\t\t$stmt->bindParam(2, $totaliva);\n\t\t$stmt->bindParam(3, $totaldescuentove);\n\t\t$stmt->bindParam(4, $totalpago);\n\t\t$stmt->bindParam(5, $devuelto);\n\t\t$stmt->bindParam(6, $codventa);\n\t\t\n\t\t$subtotal= strip_tags($importeivasi);\n $totaliva= rount($subtotal*$iva,2);\n\t\t$tot= rount($subtotal+$subtotalivanove+$totaliva,2);\n\t\t$totaldescuentove= rount($tot*$descuento,2);\n\t\t$totalpago= rount($tot-$totaldescuentove,2);\n\t\t$devuelto= ($montopagado== \"0.00\" ? \"0\" : rount($montopagado-$totalpago,2));\n\t\t$codventa = strip_tags($_GET[\"codventa\"]);\n\t\t$stmt->execute();\n\n#################### AQUI AGREGAMOS EL INGRESO A ARQUEO DE CAJA ####################\nif (base64_decode($_GET[\"tipopagove\"])==\"CONTADO\"){\n\n$sql = \"select ingresos from arqueocaja where codcaja = '\".strip_tags($_GET[\"codcaja\"]).\"' and statusarqueo = '1'\";\n\t\tforeach ($this->dbh->query($sql) as $row)\n\t\t{\n\t\t\t$this->p[] = $row;\n\t\t}\n\t\t$ingreso = ($row['ingresos']== \"\" ? \"0.00\" : $row['ingresos']);\n\n\t\t$sql = \" update arqueocaja set \"\n\t\t.\" ingresos = ? \"\n\t\t.\" where \"\n\t\t.\" codcaja = ? and statusarqueo = '1';\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $txtTotal);\n\t\t$stmt->bindParam(2, $codcaja);\n\n\t\t$calculo=rount($totaldb-$totalpago,2);\n\t\t$txtTotal = rount($ingreso-$calculo,2);\n\t\t$codcaja = strip_tags($_GET[\"codcaja\"]);\n\t\t$stmt->execute();\n\t}\n#################### AQUI AGREGAMOS EL INGRESO A ARQUEO DE CAJA ####################\n\t\t\n\t\t } else {\n\n $sql = \" update ventas set \"\n\t\t\t .\" subtotalivanove = ?, \"\n\t\t\t .\" totaldescuentove = ?, \"\n\t\t\t .\" totalpago= ?, \"\n\t\t\t .\" montodevuelto= ? \"\n\t\t\t .\" where \"\n\t\t\t .\" codventa = ?;\n\t\t\t \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $subtotal);\n\t\t$stmt->bindParam(2, $totaldescuentove);\n\t\t$stmt->bindParam(3, $totalpago);\n\t\t$stmt->bindParam(4, $devuelto);\n\t\t$stmt->bindParam(5, $codventa);\n\t\t\n\t\t$subtotal= strip_tags($importeivano);\n\t\t$tot= rount($subtotal+$subtotalivasive+$totalivave,2);\n\t\t$totaldescuentove= rount($tot*$descuento,2);\n\t\t$totalpago= rount($tot-$totaldescuentove,2);\n\t\t$devuelto= ($montopagado== \"0.00\" ? \"0\" : rount($montopagado-$totalpago,2));\n\t\t$codventa = strip_tags($_GET[\"codventa\"]);\n\t\t$stmt->execute();\n\n#################### AQUI AGREGAMOS EL INGRESO A ARQUEO DE CAJA ####################\nif (base64_decode($_GET[\"tipopagove\"])==\"CONTADO\"){\n\n$sql = \"select ingresos from arqueocaja where codcaja = '\".strip_tags($_GET[\"codcaja\"]).\"' and statusarqueo = '1'\";\n\t\tforeach ($this->dbh->query($sql) as $row)\n\t\t{\n\t\t\t$this->p[] = $row;\n\t\t}\n\t\t$ingreso = ($row['ingresos']== \"\" ? \"0.00\" : $row['ingresos']);\n\n\t\t$sql = \" update arqueocaja set \"\n\t\t.\" ingresos = ? \"\n\t\t.\" where \"\n\t\t.\" codcaja = ? and statusarqueo = '1';\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $txtTotal);\n\t\t$stmt->bindParam(2, $codcaja);\n\n\t\t$calculo=rount($totaldb-$totalpago,2);\n\t\t$txtTotal = rount($ingreso-$calculo,2);\n\t\t$codcaja = strip_tags($_GET[\"codcaja\"]);\n\t\t$stmt->execute();\n\t}\n#################### AQUI AGREGAMOS EL INGRESO A ARQUEO DE CAJA ####################\n\t\t\n\t } \n\necho \"<div class='alert alert-info'>\";\necho \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>×</button>\";\necho \"<center><span class='fa fa-check-square-o'></span> EL DETALLE DE VENTA DE PRODUCTO FUE ELIMINADO EXITOSAMENTE </center>\";\necho \"</div>\";\nexit;\n\t\t}\n\t\telse\n\t\t{\n\n\t\t\t$sql2 = \"select existencia from productos where codproducto = ?\";\n\t\t\t$stmt = $this->dbh->prepare($sql2);\n\t\t\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])));\n\t\t\t$num = $stmt->rowCount();\n\n\t\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$p[] = $row;\n\t\t\t}\n\t\t\t$existenciadb = $p[0][\"existencia\"];\n\n###################### ACTUALIZAMOS LOS DATOS DEL PRODUCTO EN ALMACEN ############################\n\t\t\t$sql = \" update productos set \"\n\t\t\t.\" existencia = ? \"\n\t\t\t.\" where \"\n\t\t\t.\" codproducto = ?;\n\t\t\t\";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->bindParam(1, $existencia);\n\t\t\t$stmt->bindParam(2, $codproducto);\n\t\t\t$cantventa = strip_tags(base64_decode($_GET[\"cantventa\"]));\n\t\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t\t$existencia = $existenciadb + $cantventa;\n\t\t\t$stmt->execute();\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t\t\t$sql = \" delete from kardexproductos where codproceso = ? and codproducto = ?\";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->bindParam(1,$codventa);\n\t\t\t$stmt->bindParam(2,$codproducto);\n\t\t\t$codventa = strip_tags(strip_tags($_GET[\"codventa\"]));\n\t\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t\t$stmt->execute();\n\n\n################## CONSULTO LA TABLA PARA VERIFICAR SI EXISTEN PRODUCTOS #######################\n$sql = \"select * from productosvsingredientes where codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array($codproducto));\n\t\t$num = $stmt->rowCount();\nif($num>0) {\n\n\n\t$sql = \"select * from productosvsingredientes LEFT JOIN ingredientes ON productosvsingredientes.codingrediente = ingredientes.codingrediente where productosvsingredientes.codproducto = '\".$codproducto.\"'\";\n\n\t$array=array();\n\n\tforeach ($this->dbh->query($sql) as $row)\n\t{\n\t\t$this->p[] = $row;\n\n\t\t$codproducto = $row['codproducto'];\n\t\t$codingrediente = $row['codingrediente'];\n\t\t$cantracion = $row['cantracion'];\n\t\t$cantingrediente = $row['cantingrediente'];\n\t\t$costoingrediente = $row['costoingrediente'];\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t\t$sql = \" delete from kardexingredientes where codprocesoing = ? and codproducto = ? and codingrediente = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codventa);\n\t\t$stmt->bindParam(2,$codproducto);\n\t\t$stmt->bindParam(3,$codingrediente);\n\t\t$codventa = strip_tags(strip_tags($_GET[\"codventa\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$codingrediente = strip_tags($codingrediente);\n\t\t$stmt->execute();\n\n\n\t\t$update = \" update ingredientes set \"\n\t\t.\" cantingrediente = ? \"\n\t\t.\" where \"\n\t\t.\" codingrediente = ?;\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($update);\n\t\t$stmt->bindParam(1, $cantidadracion);\n\t\t$stmt->bindParam(2, $codingrediente);\n\n\t\t$cantventa = strip_tags(base64_decode($_GET[\"cantventa\"]));\n\t\t$racion = rount($cantracion*$cantventa,2);\n\t\t$cantidadracion = rount($cantingrediente+$racion,2);\n\t\t$stmt->execute();\n\n\n\t\t }\n\n}\n################### FIN DE CONSULTO LA TABLA PARA VERIFICAR SI EXISTEN PRODUCTOS ###################\n\n\n#################### AQUI AGREGAMOS EL INGRESO A ARQUEO DE CAJA ####################\n\tif (base64_decode($_GET[\"tipopagove\"])==\"CONTADO\"){\n\n\t\t$sql4 = \"select * from ventas where codventa = ? \";\n\t\t$stmt = $this->dbh->prepare($sql4);\n\t\t$stmt->execute( array(strip_tags($_GET[\"codventa\"])) );\n\t\t$num = $stmt->rowCount();\n\n\t\t\tif($roww = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$paea[] = $roww;\n\t\t\t}\n\t\t$totaldb = $roww[\"totalpago\"];\n\n\t\t$sql = \"select ingresos from arqueocaja where codcaja = '\".strip_tags($_GET[\"codcaja\"]).\"' and statusarqueo = '1'\";\n\t\tforeach ($this->dbh->query($sql) as $row)\n\t\t{\n\t\t\t$this->p[] = $row;\n\t\t}\n\t\tif (isset($row['ingresos'])) { $ingreso = $row['ingresos']; } else { $ingreso ='0.00'; }\n\t\t//$ingreso = $row['ingresos'];\n\n\t\t$sql = \" update arqueocaja set \"\n\t\t.\" ingresos = ? \"\n\t\t.\" where \"\n\t\t.\" codcaja = ? and statusarqueo = '1';\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $txtTotal);\n\t\t$stmt->bindParam(2, $codcaja);\n\n\t\t$txtTotal = rount($ingreso-$totaldb,2);\n\t\t$codcaja = strip_tags($_GET[\"codcaja\"]);\n\t\t$stmt->execute();\n\t}\n#################### AQUI AGREGAMOS EL INGRESO A ARQUEO DE CAJA ####################\n\n#################### AQUI ACTUALIZAMOS EL STATUS DE MESA ####################\n\t\t$sql = \" update mesas set \"\n\t\t.\" statusmesa = ? \"\n\t\t.\" where \"\n\t\t.\" codmesa = ?;\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $statusmesa);\n\t\t$stmt->bindParam(2, $codmesa);\n\n\t\t$statusmesa = strip_tags('0');\n\t\t$codmesa = base64_decode($_GET[\"codmesa\"]);\n\t\t$stmt->execute();\n#################### AQUI ACTUALIZAMOS EL STATUS DE MESA ####################\n\n\t\t$sql = \" delete from ventas where codventa = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codventa);\n\t\t$codventa = strip_tags($_GET[\"codventa\"]);\n\t\t$stmt->execute();\n\n\t\t$sql = \" delete from detalleventas where coddetalleventa = ? \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$coddetalleventa);\n\t\t$coddetalleventa = base64_decode($_GET[\"coddetalleventa\"]);\n\t\t$stmt->execute();\n\n\techo \"<div class='alert alert-info'>\";\n\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>×</button>\";\n\techo \"<center><span class='fa fa-check-square-o'></span> EL DETALLE DE VENTA DE PRODUCTO FUE ELIMINADO EXITOSAMENTE </center>\";\n\techo \"</div>\";\n\texit;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\techo \"<div class='alert alert-info'>\";\n\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>×</button>\";\n\techo \"<center><span class='fa fa-check-square-o'></span> USTED NO PUEDE ELIMINAR DETALLES EN VENTAS, NO ERES EL ADMINISTRADOR DEL SISTEMA</center>\";\n\techo \"</div>\";\n\texit;\n\t\t}\n\t}",
"function opcion__eliminar()\n\t{\n\t\t$id_proyecto = $this->get_id_proyecto_actual();\n\t\tif ( $id_proyecto == 'toba' ) {\n\t\t\tthrow new toba_error(\"No es posible eliminar el proyecto 'toba'\");\n\t\t}\n\t\ttry {\n\t\t\t$p = $this->get_proyecto();\n\t\t\tif ( $this->consola->dialogo_simple(\"Desea ELIMINAR los metadatos y DESVINCULAR el proyecto '\"\n\t\t\t\t\t.$id_proyecto.\"' de la instancia '\"\n\t\t\t\t\t.$this->get_id_instancia_actual().\"'\") ) {\n\t\t\t\t$p->eliminar_autonomo();\n\t\t\t}\n\t\t} catch (toba_error $e) {\n\t\t\t$this->consola->error($e->__toString());\n\t\t}\n\t\t$this->get_instancia()->desvincular_proyecto( $id_proyecto );\n\t}",
"function eliminarPrograma(){\n\t\t$this->procedimiento='sigep.ft_programa_ime';\n\t\t$this->transaccion='SIGEP_PRO_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_programa_boa','id_programa_boa','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}",
"public function excluir(){\r\n\t\t$instancia = ServicoDAO::getInstancia();\r\n\t\t// executando o metodo //\r\n\t\t$servico = $instancia->excluir($this->getId());\r\n\t\t// retornando o resultado //\r\n\t\treturn $servico;\r\n\t}"
] |
[
"0.64566755",
"0.6401665",
"0.6349787",
"0.6008747",
"0.5876905",
"0.5828173",
"0.57892084",
"0.57748693",
"0.5773277",
"0.57418996",
"0.5715777",
"0.570108",
"0.56923735",
"0.5690761",
"0.5688333",
"0.5688333",
"0.5688333",
"0.5688333",
"0.5654845",
"0.5639798",
"0.5601446",
"0.5590233",
"0.5583913",
"0.55773306",
"0.5563002",
"0.55621654",
"0.5554626",
"0.5548183",
"0.5534178",
"0.55318123"
] |
0.70580244
|
0
|
Get connection additional meta data
|
public function getConnectionData()
{
return $this->metadata;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"protected function storeConnectionMetadata(){\n }",
"private function getConnectionInfo()\n {\n return [\n 'host' => $this->getSocketEndPoint(),\n 'ssl_file' => $this->sslPem,\n 'pass_phrase'=> $this->passPhrase\n ];\n }",
"public function renvoi_infos() {\n\t\t$info = @stream_get_meta_data ( $this->connexion );\n\t\t\n\t\treturn $info;\n\t}",
"public function info() {\n\t\t\n\t\t$data = array(\n\t\t\t'Driver'\t\t\t=> 'DRIVER_NAME',\n\t\t\t'Client version'\t=> 'CLIENT_VERSION',\n\t\t\t'Server version'\t=> 'SERVER_VERSION',\n\t\t\t'Connection'\t\t=> 'CONNECTION_STATUS'\n\t\t);\n\n\t\tforeach ($data as $key => $value) {\n\t\t\t\n\t\t\t$info[$key] = $this->pdo->getAttribute(constant('PDO::ATTR_' . $value));\n\t\t\t\n\t\t}\n\n\t\treturn $info;\n\t\t\n\t}",
"public function getAdditionalInformation() {}",
"public function getAdditionalInformation() {}",
"public function getAdditionalInformation() {}",
"public function getAdditionalInformation() {}",
"public function getAdditionalInformation() {}",
"public function getAdditionalInformation() {}",
"public function getAdditionalInformation() {}",
"public function getAdditionalInformation() {}",
"public function getAdditionalInformation() {}",
"public function getExtraInformation() {\n return $this->extra;\n }",
"public function getExtraInfo()\n {\n return $this->extra;\n }",
"public function getinfo()\n\t{\n\t\treturn $this->connect('getinfo');\n\t}",
"protected function getMetaData()\n {\n return stream_get_meta_data($this->stream);\n }",
"public function getAdditionalInformation()\n {\n return $this->additionalInformation;\n }",
"public function getMetaData() {\n\t\treturn stream_get_meta_data($this->handle);\n\t}",
"public function getMetaData()\n {\n return stream_get_meta_data($this->_stream_handle);\n }",
"public function GetInfo()\n {\n $data = $this->restClient->request(RequestTypes::GET, 'info');\n\n return new ConnectionInfo($data);\n }",
"public function getMetaData()\n {\n return $this->metadata;\n }",
"public function getMetaData();",
"public function getAdditionalInformation()\n {\n return ConfigurationUtility::getSelectedConfigsInfo($this->getConfigs());\n }",
"public function getCustomInfo() {\n\t\treturn $this->custom_info;\n\t}",
"public function get_metadata() {\n return $this->metadata;\n }",
"public function info(){\n return $this->getAdapter()->info();\n }",
"public function getInfo()\n {\n return $this->getServer()->getInfo();\n }",
"public function getInfo()\n {\n $this->conn->initialize();\n $json = $this->conn->getClient()->request(\"/{$this->name}/\")->getContent();\n $info = JSONEncoder::decode($json);\n\n return $info;\n }",
"public function get_additional_info()\n {\n return array();\n }"
] |
[
"0.7050878",
"0.69874465",
"0.6580915",
"0.6558569",
"0.6425122",
"0.6425122",
"0.6425122",
"0.6425122",
"0.6424165",
"0.6424165",
"0.6423141",
"0.6423141",
"0.6423141",
"0.6410834",
"0.62939113",
"0.62496597",
"0.6200032",
"0.6185897",
"0.6169638",
"0.6152231",
"0.60146755",
"0.6009877",
"0.5985042",
"0.59836036",
"0.5968715",
"0.59612095",
"0.5948932",
"0.5941281",
"0.5929186",
"0.59264183"
] |
0.73848355
|
0
|
Get Qordoba Application API server requests count
|
public function getRequestCount()
{
return $this->requestCount;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function requests() : int;",
"public function count()\n {\n return count($this->requests);\n }",
"public function getTotalRequests() {\n return $this->debug_total_url_requests + $this->debug_total_cache_requests;\n }",
"protected function get_request_counts()\n {\n }",
"public function getAbleAppCount()\n {\n return $this->get(self::_ABLE_APP_COUNT);\n }",
"public function getNumberOfRequests()\n {\n return array_sum($this->numberOfRequestsByPattern);\n }",
"function search_requests_count()\n {\n $count=$this->db->count_all_results('lic_requests');\n\t\t$this->db->flush_cache();\n\t\treturn $count;\n }",
"abstract public function getCount(RESTApiRequest $request);",
"protected function getSlots() {\n return getAppConfig(\"gw2spidy.request-slots.count\");\n }",
"function get_number_of_requests() {\n return CourseRequestManager::count_course_requests(COURSE_REQUEST_REJECTED);\n}",
"public function requestCount()\n {\n return DB::table('userlinkrequests')\n ->where('them', $this->id)\n ->count();\n }",
"public function iN_TotalVerificationRequests() {\n\t\t$q = mysqli_query($this->db, \"SELECT COUNT(*) AS verificationCount FROM i_verification_requests WHERE request_status = '0'\") or die(mysqli_error($this->db));\n\t\t$row = mysqli_fetch_array($q, MYSQLI_ASSOC);\n\t\tif ($row) {\n\t\t\treturn isset($row['verificationCount']) ? $row['verificationCount'] : '0';\n\t\t} else {return 0;}\n\t}",
"public static function getMaxRequests()\n\t{\n\t\treturn MHTTPD::$config['Server']['keep_alive_max_requests'];\n\t}",
"public function getRequestsWithErrorsCount()\n {\n return $this->requests_with_errors_count;\n }",
"public function getRequestsWithErrorsCount()\n {\n return $this->requests_with_errors_count;\n }",
"public function getServerInfoCount()\n {\n return $this->count(self::_SERVER_INFO);\n }",
"public function computeCount() {\n if ($str = elis_consumer_http_request($this->url_pattern . '&rows=0', array('Accept' => 'application/json'))) {\n if ($json = json_decode($str)) {\n $this->totalCount = $json->response->numFound;\n }\n }\n return $this->totalCount;\n }",
"public function requestsize() {\n return $this->info['request_size'];\n }",
"private function checkApiRequestsLimit()\n {\n $tempTime = time() - $this->startTime;\n if($this->apiRequestsCount >= $this->apiRequestsLimit && $tempTime < $this->apiTimeLimit) {\n usleep(($this->apiTimeLimit - $tempTime)*1000000);\n $this->apiRequestsCount = 1;\n $this->startTime = time();\n } else {\n $this->apiRequestsCount++;\n }\n }",
"public function countNameservers(): int {}",
"function getWaitListedApplicationCount()\r\n {\r\n $db = db_connect();\r\n $sql = \"SELECT account.* FROM account, application WHERE account.accountID = application.accountID AND \r\n account.role = :role: AND application.applicationStatus = :applicationStatus: ORDER BY \r\n account.accountID DESC\";\r\n\r\n //Send query then store the results\r\n $results = $db->query($sql, [\r\n 'role' => 0,\r\n 'applicationStatus' => 'W'\r\n ]);\r\n\r\n return $results->getNumRows();\r\n }",
"function get_num_queries()\n {\n }",
"public function getApplicationsCount()\n {\n $c = $this->getApplications()->count();\n\n return (int)$c > 0 ? $c : 0;\n }",
"protected function getApiPathCountResource() {\n return static::getGenericPath() . '/count.json';\n }",
"public function computeCount() {\n $count = 0;\n if (empty($this->httpOptions)) {\n $json = file_get_contents($this->listUrl);\n }\n else {\n $response = drupal_http_request($this->listUrl, $this->httpOptions);\n $json = $response->data;\n }\n if ($json) {\n $data = drupal_json_decode($json);\n if ($data) {\n $count = count($data);\n }\n }\n return $count;\n }",
"public function attempts()\n\t{\n\t\treturn request()->header('X-AppEngine-TaskExecutionCount');\n\t}",
"public function count(): int\n {\n return count($this->_responses);\n }",
"protected function get_request_counts() {\n\t\tglobal $wpdb;\n\n\t\t$cache_key = $this->post_type . '-' . $this->request_type;\n\t\t$counts = wp_cache_get( $cache_key, 'counts' );\n\n\t\tif ( false !== $counts ) {\n\t\t\treturn $counts;\n\t\t}\n\n\t\t$query = \"\n\t\t\tSELECT post_status, COUNT( * ) AS num_posts\n\t\t\tFROM {$wpdb->posts}\n\t\t\tWHERE post_type = %s\n\t\t\tAND post_name = %s\n\t\t\tGROUP BY post_status\";\n\n\t\t$results = (array) $wpdb->get_results( $wpdb->prepare( $query, $this->post_type, $this->request_type ), ARRAY_A );\n\t\t$counts = array_fill_keys( get_post_stati(), 0 );\n\n\t\tforeach ( $results as $row ) {\n\t\t\t$counts[ $row['post_status'] ] = $row['num_posts'];\n\t\t}\n\n\t\t$counts = (object) $counts;\n\t\twp_cache_set( $cache_key, $counts, 'counts' );\n\n\t\treturn $counts;\n\t}",
"public function getResourceCount()\n {\n return $this->resourceCount;\n }",
"function getAllApplicationCount()\r\n {\r\n $db = db_connect();\r\n\r\n $sql = \"SELECT * FROM account WHERE role = :role: ORDER BY accountID DESC\";\r\n\r\n //Send query then store the results\r\n $results = $db->query($sql, [\r\n 'role' => 0\r\n ]);\r\n\r\n return $results->getNumRows();\r\n }"
] |
[
"0.7011747",
"0.6697103",
"0.6645872",
"0.64557415",
"0.6433863",
"0.6410419",
"0.64079434",
"0.63513035",
"0.6244766",
"0.6242627",
"0.6148921",
"0.61134356",
"0.6085051",
"0.608057",
"0.608057",
"0.60766256",
"0.60030407",
"0.59947133",
"0.5944215",
"0.59314203",
"0.59221375",
"0.5903643",
"0.5855335",
"0.5854046",
"0.58535266",
"0.5848871",
"0.5836389",
"0.58304286",
"0.582073",
"0.5804806"
] |
0.7095199
|
0
|
Sets Qordoba REST API connection metadata
|
public function setConnectionData($data)
{
$this->metadata = $data;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"protected function storeConnectionMetadata(){\n }",
"public function setDataConnection(){\n \n \n }",
"private function setUpCurl()\n {\n $this->curl = $this->get('app.curl.connector');\n $this->curl->setEndPointBaseUrl($this->getParameter('themoviedb_endpoint_url'));\n $this->curl->setExtraHeaders([\n CURLOPT_HEADER => false,\n CURLOPT_HTTPHEADER => [\"Accept: application/json\"],\n CURLOPT_SSL_VERIFYPEER => false\n ]);\n }",
"public function setMetadata($metadata) {}",
"public function setMetadata($metadata) {}",
"function getMeta(){\n\t\t$AccessToken = Auth::token();\n\t\t$baseUrl = url . '/api/v1/' . customerAlias . '/' . databaseAlias;\n\t\t$endpoint = '/meta';\n\t\t$request = $baseUrl . $endpoint;\n\t\t$ch = curl_init();\n\t\tcurl_setopt_array($ch, array(\n\t\t CURLOPT_HTTPGET => true,\n\t\t CURLOPT_HTTPHEADER => array(\n\t\t\t\t'Authorization: Bearer ' . $AccessToken),\n\t\t CURLOPT_URL => $request,\n\t\t\tCURLOPT_RETURNTRANSFER => 1\n\t\t ));\n\t\t$response = curl_exec($ch);\n\t\tcurl_close($ch);\n\t\treturn $response;\n\t}",
"public function set_metadata ($metadata) {\n $this->metadata = $metadata;\n }",
"public function setInfo()\n {\n if (array_key_exists(APIConstants::INFO, $this->getResponseJSON())) {\n $this->info = new ResponseInfo($this->getResponseJSON()[APIConstants::INFO]);\n }\n }",
"private function setContent()\n {\n $this->setTag();\n $this->openRoot();\n $this->setParam(ModulesInterface::KEY_NAME, ApiInterface::RAML_TYPE_STRING, ucfirst($this->generator->version));\n $this->setParam(ConfigInterface::ATTRIBUTES_CASE, ApiInterface::RAML_TYPE_STRING, ConfigInterface::DEFAULT_CASE);\n $this->setQueryParams();\n $this->setTrees();\n $this->setJwtContent();\n $this->setConfigEntities();\n $this->closeRoot();\n }",
"public function configure()\n {\n $this->setMethod('GET');\n $this->setFunctionPath('/Api/clusterGetServerStatus');\n $this->setParser(new \\ZendService\\ZendServerAPI\\Adapter\\ServersList());\n }",
"private function _setParams ()\n {\n $endpoint = $this->_endpoint->getData();\n if (count($endpoint) > 0) {\n \n $method = $this->_endpoint->getUrl();\n $methodname = 'setParameter' . ucfirst($method['method']);\n \n $this->_httpclient->{$methodname}('access_token', \n $this->_accesstoken);\n $this->_httpclient->{$methodname}('api_secret', $this->_apisecret);\n \n foreach ($endpoint as $param => $value) {\n $this->_httpclient->{$methodname}($param, $value);\n }\n }\n }",
"private function setConnection() {\n try {\n //Decrypt Keys\n $this->response['access_key'] = Crypt::decrypt($this->request['access_key']);\n $this->response['secret'] = Crypt::decrypt($this->request['secret']);\n $this->response['region'] = $this->request['region'];\n $this->response['bucket'] = $this->request['bucket'];\n $this->response['bucket_type'] = !empty($this->request['bucket_type']) ? $this->request['bucket_type'] : 'bucket';\n $this->response['prefix'] = !empty($this->request['prefix']) ? $this->request['prefix'] : null;\n //Always reset the connection.\n $this->response['connected'] = false;\n //Set config and client.\n Config::set('aws::config.key', $this->response['access_key']);\n Config::set('aws::config.secret', $this->response['secret']);\n Config::set('aws::config.region', $this->response['region']);\n $this->client = \\AWS::get('s3');\n return true;\n } catch (\\Aws\\S3\\Exception\\S3Exception $ex) {\n $this->response['errorMessage'] = 'Set Connection: ' . $ex->getMessage();\n return false;\n }\n }",
"public function set_up() {\n\n\t\t$this::base_set_up();\n\t\tdo_action( 'rest_api_init' );\n\t\t$this->server = rest_get_server();\n\n\t}",
"protected function setCurlHeaderElement() {\n // set header for cur\n $this->header[] = 'Content-type: application/json';\n $this->header[] = 'Authorization: Bearer '.$this->accessToken;\n }",
"private function configureCurl ()\n {\n curl_setopt_array($this->cURL, [\n CURLOPT_URL => $this->url,\n CURLOPT_RETURNTRANSFER => true\n ]);\n }",
"public function init()\n {\n $this->curl = (new Curl())->setOption(\n CURLOPT_HTTPHEADER, [\n 'Authorization: Basic ' . $this->apiKey,\n 'Content-Type: application/json'\n ]\n );\n }",
"function set_api_info($info) {\n $response = $this->api_query(array('mode' => 'set_api_info', 'data' => $info));\n\n if ($response['error']) {\n return false;\n }\n return ($response['data']);\n }",
"private function setUrl()\n {\n curl_setopt($this->curl, CURLOPT_URL, $this->server);\n }",
"public function setAuthParams()\n {\n if( $this->getUseSession() )\n {\n // FIXME Need to add session functionality\n }\n else\n {\n $this->getHttpClient()->setParameterGet( 'user', $this->getUsername() );\n $this->getHttpClient()->setParameterGet( 'password', $this->getPassword() );\n $this->getHttpClient()->setParameterGet( 'api_id', $this->getApiId() );\n }\n }",
"public function setup()\n {\n \t// rtConfig::set('your-key', $your_value);\n }",
"public function setMetadata($metadata)\n\t{\n\t\t$this->vars['metadata'] = $metadata;\n\t}",
"private function setSettings() {\n $this ->setAccessToken( $this ->token );\n $this ->setAccountId( self::ACCOUNT_ID );\n }",
"public function setConnection($name);",
"public function configure ()\n {\n $this->setMethod('GET');\n $this->setFunctionPath('/Api/monitorGetEventGroupDetails');\n $this->setParser(new \\ZendService\\ZendServerAPI\\Adapter\\EventsGroupDetails());\n }",
"public function setConnection($connection);",
"function configure()\n\t{\n\n\t\t$this->setMetaData('provider',\n\t\t\tarray(\n\t\t\t\t'Name' =>\n\t\t\t\t\t'Natural History Museum', \n\t\t\t\t'Implementation'=>\n\t\t\t\t\t'KE Software EMu, \n\t\t\t\t\tPHP KE EMu DiGIR Interface',\n\t\t\t\t'AccessPoint' => 'default',\n\t\t\t)\n\t\t);\n\t\t$this->setMetaData('host',\n\t\t\tarray(\n\t\t\t\t'Name' =>\n\t\t\t\t\t'Natural History Museum (NHM)',\n\t\t\t\t'Code' => 'NHM',\n\t\t\t\t'RelatedInformation' =>\n\t\t\t\t\t'',\n\t\t\t\t'Abstract' =>\n\t\t\t\t\t'Data provider via EMu/DiGIR',\n\t\t\t)\n\t\t);\n\n\t\t// add contacts to host\n\t\t$this->setMetaData('host contact',\n\t\t\tarray(\n\t\t\t\t'Type' => 'Administrative',\n\t\t\t\t'Name' => '',\n\t\t\t\t'Title' => '',\n\t\t\t\t'Email' => '',\n\t\t\t\t'Phone' => '',\n\t\t\t)\n\t\t);\n\n\t\t$this->setMetaData('host contact',\n\t\t\tarray(\n\t\t\t\t'Type' => 'Technical',\n\t\t\t\t'Name' => '',\n\t\t\t\t'Title' => '',\n\t\t\t\t'Email' => '',\n\t\t\t\t'Phone' => '',\n\t\t\t)\n\t\t);\n\n\t\t // add a resource\n\t\t$this->setMetadata('resource',\n\t\t\tarray(\n\t\t\t\t'Name' => 'NHM Collections',\n\t\t\t\t'Code' => 'NhmEMu',\n\t\t\t\t'RelatedInformation' => \n\t\t\t\t\t'',\n\t\t\t\t'Abstract' =>\n\t\t\t\t\t'',\n\t\t\t\t'Keywords' => '',\n\t\t\t\t'Citation' \n\t\t\t\t\t=> 'Not for publication - test data only',\n\t\t\t\t'UseRestrictions' \n\t\t\t\t\t=> '',\n\t\t\t\t'ConceptualSchema' \n\t\t\t\t\t=> 'http://digir.net/schema/conceptual/darwin/2003/1.0',\n\t\t\t\t'SchemaLocation' \n\t\t\t\t\t=> 'http://digir.sourceforge.net/schema/conceptual/darwin/full/2003/1.0/darwin2full.xsd',\n\t\t\t\t'RecordIdentifier' => 'NhmEMu',\n\t\t\t\t'RecordBasis' => '',\n\t\t\t\t'NumberOfRecords' => '23',\n\t\t\t\t'DateLastUpdated' => '1970-01-01 00:00:00.00Z',\n\t\t\t\t'MinQueryTermLength' => '0',\n\t\t\t\t'MaxSearchResponseRecords' => '1000',\n\t\t\t\t'MaxInventoryResponseRecords' => '1000',\n\t\t\t)\n\t\t);\n\n\t\t// add any contacts to this resource\n\t\t$this->setMetaData('resource contact',\n\t\t\tarray(\n\t\t\t\t'Type' => 'Administrative',\n\t\t\t\t'Name' => '',\n\t\t\t\t'Title' => '',\n\t\t\t\t'Email' => '',\n\t\t\t\t'Phone' => '',\n\t\t\t)\n\t\t);\n\t\t$this->setMetaData('resource contact',\n\t\t\tarray(\n\t\t\t\t'Type' => 'Technical',\n\t\t\t\t'Name' => '',\n\t\t\t\t'Title' => '',\n\t\t\t\t'Email' => '',\n\t\t\t\t'Phone' => '',\n\t\t\t)\n\t\t);\n\n\n\t\t// if any simple mappings - specify them here - if here then\n\t\t// not required to write specific translation code for them in\n\t\t// generateValue or generateTexql methods \n\t\t// (these should mostly be purpose built darwin fields in\n\t\t// catalogue)\n\n\t\t$this->setSimpleMapping('Kingdom','DarKingdom');\n\t\t$this->setSimpleMapping('Phylum','DarPhylum');\n\t\t$this->setSimpleMapping('Class','DarClass');\n\t\t$this->setSimpleMapping('Order','DarOrder');\n\t\t$this->setSimpleMapping('Family','DarFamily');\n\t\t$this->setSimpleMapping('Genus','DarGenus');\n\t\t$this->setSimpleMapping('Species','DarSpecies');\n\t\t$this->setSimpleMapping('Subspecies','DarSubspecies');\n\t\t$this->setSimpleMapping('ScientificName','DarScientificName');\n\t\t$this->setSimpleMapping('TypeStatus','DarTypeStatus');\n\t\t$this->setSimpleMapping('IdentifiedBy','DarIdentifiedBy');\n\t\t$this->setSimpleMapping('Collector','DarCollector');\n\t\t$this->setSimpleMapping('Country','DarCountry');\n\t\t$this->setSimpleMapping('StateProvince','DarStateProvince');\n\t\t$this->setSimpleMapping('County','DarCounty');\n\t\t$this->setSimpleMapping('CatalogNumber','DarCatalogNumber');\n\t\t$this->setSimpleMapping('Locality','DarLocality');\n\t\t$this->setSimpleMapping('Latitude','DarLatitude');\n\t\t$this->setSimpleMapping('Longitude','DarLongitude');\n\t\t// any fields NOT specified above should be coded into localised\n\t\t// generateValue and generateTexql methods\n\t\t\n\t}",
"public function setConnection($connection) {\n }",
"protected function _setConnectionsData()\n\t{\n\t\t// content of this function can be modified on demo account\n\t\t// variable names $data and $connectionsData are important\n\n\t\t$connectionsData = array();\n\t\tinclude 'ConnectionManagerConfig.php';\n\t\t$this->_connectionsData = $connectionsData;\n\t}",
"public function setMetadata($metadata)\n {\n $this->metadata = $metadata;\n }",
"public function set_api( $name, $value ) {\n\t\t$this->api[ $name ] = $value;\n\t}"
] |
[
"0.59337604",
"0.5538078",
"0.549826",
"0.53053725",
"0.53042305",
"0.52456",
"0.524224",
"0.5218646",
"0.52177346",
"0.5201044",
"0.5184289",
"0.515955",
"0.51552707",
"0.513958",
"0.5139445",
"0.51300114",
"0.5126115",
"0.51218134",
"0.5118922",
"0.5094857",
"0.50827867",
"0.5079699",
"0.50524193",
"0.50472414",
"0.5045739",
"0.5040596",
"0.5029321",
"0.5017938",
"0.5009651",
"0.5003283"
] |
0.57139516
|
1
|
onPostValidate In this method we conditionally save a session var depending on whether the registration is for a familyDiscount This session var is used in onPreBind ...
|
public function onPostValidate(PostValidateEvent $event)
{
$data = $event->getFormData();
if ($this->currentStep >= 1) {
if ($data->getDiscountLevel() == 'individual') {
$this->removeTempIsFamilyDiscount();
$this->addSkipStep(4);
} else {
$this->setTempIsFamilyDiscount();
$this->removeSkipStep(4);
}
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function validatePostAuthentication()\n {\n $this->sessionStorage->postAuthenticationValidated = true;\n }",
"private function check_isvalidated() \n\t{\n\t\t\n if(! $this->session->userdata('validated') || $this->session->userdata('arole')!='1')\n {\n redirect('superadmin/login');\n //redirect('registration/logout');\n }\n }",
"public function InitIsValidPost() \r\n\t{\t\t\r\n\t\t$sVar = (isset($_POST['__SVar']) ? $_POST['__SVar'] : ( isset($_GET['__SVar']) ? $_GET['__SVar'] : \"\" ));\r\n\r\n\t\t$this->isValidPost = ($sVar == $_SESSION['myHiddenVar']);\r\n\r\n\t\tSession::SessionInit($mySessionVar);\r\n\r\n\t\treturn $this->isValidPost;\r\n\t}",
"public function add_partner_registration() {\n $logged_in_user_details = $this->session->userdata('logged_in_user_data');\n if ($logged_in_user_details->is_logged_in == 1) {\n $data['title'] = \"Zinguplife Customer Support|Partner Registration\";\n $data['url'] = 'customer_support/vendors';\n $post_data = $this->input->post();\n $data['logged_in_user_details'] = $logged_in_user_details;\n $this->form_validation->set_rules('username', 'username', 'required|valid_email');\n $this->form_validation->set_rules('business_name', 'business_name', 'required');\n $this->form_validation->set_rules('address1', 'address', 'required');\n $this->form_validation->set_rules('area', 'area', 'required');\n $this->form_validation->set_rules('zipcode', 'zipcode', 'required|numeric');\n $this->form_validation->set_rules('mobile', 'mobile', 'required|numeric|exact_length[10]');\n $this->form_validation->set_rules('business_email', 'Email', 'required|valid_email');\n $this->form_validation->set_rules('check', 'Check box', 'callback_accept_terms');\n\n\n\n $this->form_validation->set_error_delimiters('<label for=\"name\" generated=\"true\" class=\"error\">', '</label>');\n if ($this->form_validation->run() == FALSE) {\n $data['services'] = $this->Cs_vendor->get_business_services();\n $data['locations'] = $this->Cs_vendor->get_locations();\n $data['main_content'] = 'admin/cs/partner_registration';\n $this->load->view('admin/includes/template', $data);\n } else {\n $validate_details = $this->Cs_vendor->get_partner_details_by_username($post_data['username']);\n\n if (!empty($validate_details)) {\n\n\n $data['services'] = $this->Cs_vendor->get_business_services();\n $data['locations'] = $this->Cs_vendor->get_locations();\n $this->session->set_flashdata('validate_email_error_message', 'Email Already Registered with Zinguplife');\n $data['main_content'] = 'admin/cs/partner_registration';\n $this->load->view('admin/includes/template', $data);\n } else {\n\n $this->Cs_vendor->add_partner_registrations($post_data);\n $this->session->set_flashdata('vendor_registration_message', 'Vendor Registered Successfully');\n redirect('/customer_support/vendors');\n }\n }\n } else {\n $this->session->set_flashdata('login_required_message', 'Please login to continue !!!.');\n redirect(\"/admin\");\n }\n }",
"public function postProcess() {\n \n $this->_verifyPaymentOptionAvailability();\n $this->_validateCart();\n $this->_generatePagSeguroRequestData();\n $additional_infos = $this->_validateOrder();\n $this->_setAdditionalRequestData($additional_infos);\n $this->_setNotificationUrl();\n $this->_performPagSeguroRequest();\n \n }",
"function after_validation() {}",
"private function check_isvalidated()\n \t{\n\n \t\t// if user has login session return true\n\t\tif(isset($_SESSION['admin_name']))\n\t\t{\n\t\t\treturn true;\n\t\t} \n\t\telse \n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t\t\n\t\t\n\t}",
"function index()\n {\n \nif(!isset($_POST['email']))\n{\n header( \"location: \".$this->base_url.\"/register\" );\n}else{\n\n\nif(isset($_SESSION['aff_i'])){ \n\n$aff_i = $_SESSION['aff_i'];\n$aff_income = $this->aff_income;\n\nif(isset($_SESSION['aff_tag'])){\n$aff_tag = $_SESSION['aff_tag'];\n}else{\n $aff_tag = ''; \n}\n\n}else{\n$aff_i = '0';\n$aff_tag = '';\n$aff_income = '0';\n}\n\n\n\n //insert user details into db\n $data = array(\n 'owner_name' => $this->input->post('name'),\n 'owner_address' => $this->input->post('owner_address'),\n 'province_id' => $this->input->post('province'),\n 'amphur_id' => $this->input->post('amphur'),\n 'district_id' => $this->input->post('postcode'),\n 'postcode' => $this->input->post('postcode'),\n 'tel' => $this->input->post('tel'),\n 'owner_email' => $this->input->post('email'),\n 'owner_pass' => md5($this->input->post('password')),\n 'add_time' => time(),\n 'aff_id' => $aff_i,\n 'aff_tag' => $aff_tag,\n 'aff_income' => $aff_income\n );\n\n if ($this->user_model->insert_user($data) === true)\n {\n \n header( \"location: \".$this->base_url.\"/login?regis=ok\" );\n }\n else\n {\n header( \"location: \".$this->base_url.\"/register?regis=cannot\" );\n }\n\n }\n \n }",
"public function store(FormValidationChildFamilyRequest $request)\n {\n\n $cr = Classroom::where('user_id', \\Auth::user()->id)->where('id', $request->classe)->first();\n\n if($cr->children()->CurrentYear()->count() > $cr->capacite_classe)\n {\n return redirect()->back()->withErrors(\"la classe est saturée\");\n }\n\n // promotion Exceptional check\n if(PromotionExceptional::checkExceptionalPromotion())\n {\n if(PromotionExceptional::checkExcTimeOfPromotionIfExpired())\n {\n if(PromotionExceptional::checkExcPriceandReturnIt() == 'no')\n {\n return redirect()->back()->withErrors(\"la promotion Exceptionnelle est active mais aucun prix n'est défini\")->withInput();\n }else{\n $prix_exc = PromotionExceptional::checkExcPriceandReturnIt();\n }\n }else{\n return redirect()->back()->withErrors(\"la promotion Exceptionnelle est active mais la durée est expirée\");\n }\n }\n\n // promotion advanced check\n $prix_advance ='';\n if(PromotionAdvance::checkAdvancePromotion())\n {\n if($request->nbr_month > 1 )\n {\n if(PromotionAdvance::checkAdvIfPriceIsSet($request->nbr_month) !== false)\n {\n $prix_advance = PromotionAdvance::checkAdvIfPriceIsSet($request->nbr_month);\n }else{\n return redirect()->back()->withErrors(\"Aucun prix n'est\n défini pour cette Promotion de \".$request->nbr_month.' Mois');\n\n }\n }\n }\n\n $niveau_global = \\Auth::user()->grades()->where('id',$request->grade)->first()->name;\n\n // famille for family profile\n $famille = Family::where('user_id',\\Auth::user()->id)->where('email_responsable',$request->email_responsable)->first();\n if(!$famille) {\n $family = new Family();\n $family->nom_pere = ucfirst($request->nom_pere);\n $family->nom_mere = ucfirst($request->nom_mere);\n $family->email_responsable = $request->email_responsable;\n $family->adresse = $request->adresse;\n $family->numero_fixe = $request->numero_fixe;\n $family->numero_portable = $request->numero_portable;\n $family->cin = strtoupper($request->cin);\n $family->responsable = $request->responsable;\n $family->user_id = \\Auth::user()->id;\n $family->school_year_id = SchoolYear::getSchoolYearId();\n $family->save();\n\n\n if ($family->id) {\n $father = Family::findOrFail($family->id);\n $child = new Child();\n $child->date_naissance = Carbon::parse($request->date_naissance);\n $child->transport = $request->transport;\n $child->sexe = $request->sexe;\n\n\n $child->nom_enfant = ucfirst($request->nom_enfant);\n $child->age_enfant = $child->date_naissance->diffInYears(Carbon::now());\n $child->nationalite = \\DB::table('countries')->where('id',$request->nationalite)->first()->nom_fr_fr;\n $child->user_id = \\Auth::user()->id;\n $child->school_year_id = SchoolYear::getSchoolYearId();\n\n $image = Input::file('photo');\n if (!$image && empty($image)) {\n $filename = '';\n\n } else {\n $filename = $image->getClientOriginalName();\n $path = public_path('uploads/' . $filename);\n Image::make($image->getRealPath())->resize(313, 300)->save($path);\n }\n\n $child->photo = $filename;\n $child->family_id = $family->id;\n $child->save();\n\n\n if ($child->id) {\n $ch =Child::find($child->id);\n if($niveau_global == 'Lycée')\n {\n $ch->branches()->attach([$request->branche]);\n }\n if($niveau_global == 'Maternelle' || $niveau_global == 'Primaire'\n || $niveau_global == 'Collège' || $niveau_global == 'Lycée' || $niveau_global == 'Crèche')\n {\n $ch->levels()->attach([$request->niveau]);\n }\n /*if($niveau_global == 'Crèche')\n {\n $ch->classrooms()->attach([$request->classe]);\n }*/\n\n //classe\n $cr = Classroom::where('user_id', \\Auth::user()->id)->where('id', $request->classe)->first();\n $cr->children()->attach([$child->id]);\n\n\n\n $bill = new Bill();\n $bill->status = 0;\n\n // if no promotion is active\n if(!PromotionAdvance::checkAdvancePromotion() && !PromotionExceptional::checkExceptionalPromotion())\n {\n if(isset($request->reduction) && !empty($request->reduction) && !is_null($request->reduction))\n {\n\n\n $bill->start = SchoolYear::find(SchoolYear::getSchoolYearId())->startch1->firstOfMonth()->toDateString();\n $bill->end = SchoolYear::find(SchoolYear::getSchoolYearId())->startch1->firstOfMonth()->addMonths($request->nbr_month)->toDateString();\n $bill->somme = PriceBill::countWhenNoPromotionButReduction($request->nbr_month,PriceBill::assignPrice($request->niveau,$request->transport),$request->reduction);\n $bill->reductionPrix = $request->reduction;\n $bill->reduction = 1;\n $bill->school_year_id = SchoolYear::getSchoolYearId();\n $bill->nbrMois =$request->nbr_month;\n\n }else{\n $bill->start = SchoolYear::find(SchoolYear::getSchoolYearId())->startch1->firstOfMonth()->toDateString();\n $bill->end = SchoolYear::find(SchoolYear::getSchoolYearId())->startch1->firstOfMonth()->addMonths($request->nbr_month)->toDateString();\n $bill->somme = PriceBill::countWhenNoPromotion($request->nbr_month,PriceBill::assignPrice($request->niveau,$request->transport));\n $bill->reduction = 0;\n $bill->school_year_id = SchoolYear::getSchoolYearId();\n $bill->nbrMois =$request->nbr_month;\n }\n }\n\n if(PromotionAdvance::checkAdvancePromotion())\n {\n if($request->nbr_month >=3)\n {\n $bill->start = SchoolYear::find(SchoolYear::getSchoolYearId())->startch1->firstOfMonth()->toDateString();\n $bill->end = SchoolYear::find(SchoolYear::getSchoolYearId())->startch1->firstOfMonth()->addMonths($request->nbr_month)->toDateString();\n $bill->somme =PromotionAdvance::countAccordingTo($prix_advance,PriceBill::assignPrice($request->niveau,$request->transport),$request->nbr_month);\n $bill->reduction = 1;\n $bill->reductionPrix = $prix_advance;\n $bill->school_year_id = SchoolYear::getSchoolYearId();\n $bill->nbrMois =$request->nbr_month;\n }\n if($request->nbr_month == 1)\n {\n if(isset($request->reduction) && !empty($request->reduction) && !is_null($request->reduction))\n {\n $bill->start = SchoolYear::find(SchoolYear::getSchoolYearId())->startch1->firstOfMonth()->toDateString();\n $bill->end = SchoolYear::find(SchoolYear::getSchoolYearId())->startch1->firstOfMonth()->addMonths($request->nbr_month)->toDateString();\n $bill->somme = PriceBill::countWhenNoPromotionButReduction($request->nbr_month,PriceBill::assignPrice($request->niveau,$request->transport),$request->reduction);\n $bill->reductionPrix = $request->reduction;\n $bill->reduction = 1;\n $bill->school_year_id = SchoolYear::getSchoolYearId();\n $bill->nbrMois =$request->nbr_month;\n\n }else{\n $bill->start = SchoolYear::find(SchoolYear::getSchoolYearId())->startch1->firstOfMonth()->toDateString();\n $bill->end = SchoolYear::find(SchoolYear::getSchoolYearId())->startch1->firstOfMonth()->addMonths($request->nbr_month)->toDateString();\n $bill->somme = PriceBill::countWhenNoPromotion($request->nbr_month,PriceBill::assignPrice($request->niveau,$request->transport));\n $bill->reduction = 0;\n $bill->school_year_id = SchoolYear::getSchoolYearId();\n $bill->nbrMois =$request->nbr_month;\n }\n }\n }\n if(PromotionExceptional::checkExceptionalPromotion())\n {\n $bill->start = SchoolYear::find(SchoolYear::getSchoolYearId())->startch1->firstOfMonth()->toDateString();\n $bill->end = SchoolYear::find(SchoolYear::getSchoolYearId())->startch1->firstOfMonth()->addMonths($request->nbr_month)->toDateString();\n $bill->somme = PromotionExceptional::countAccordingTo($request->nbr_month,PriceBill::assignPrice($request->niveau,$request->transport),$prix_exc);\n $bill->reductionPrix = $prix_exc;\n $bill->reduction = 1;\n $bill->school_year_id = SchoolYear::getSchoolYearId();\n $bill->nbrMois =$request->nbr_month;\n }\n\n\n\n\n $bill->child_id = $child->id;\n $bill->user_id = \\Auth::user()->id;\n $bill->save();\n\n\n $enfant = Child::findOrFail($child->id);\n if ($father->responsable == 0)\n $resp = $father->nom_mere;\n else\n $resp = $father->nom_pere;\n event(new SendEmailToRespAfterRegistrationEvent(\n $child->id,\n $resp,\n $enfant->nom_enfant,\n $enfant->created_at->toDateString(),\n $enfant->created_at->addMonth()->toDateString(),\n $father->email_responsable,\n $father->responsable,\n str_random(6)\n ));\n }\n\n }\n return redirect()->back()->with('success', \"l'élève et les parents ont bien été ajoutés! \");\n\n\n\n }else{\n // if the parent already in the database\n $child = new Child();\n $child->date_naissance = Carbon::parse($request->date_naissance);\n $child->nom_enfant = $request->nom_enfant ;\n $child->sexe = $request->sexe;\n $child->age_enfant =$child->date_naissance->diffInYears(Carbon::now());\n $child->nationalite =\\DB::table('countries')->where('id',$request->nationalite)->first()->nom_fr_fr;\n $child->school_year_id = SchoolYear::getSchoolYearId();\n $child->transport = $request->transport;\n $child->user_id = \\Auth::user()->id;\n\n $image = Input::file('photo');\n if(!$image && empty($image))\n {\n $filename = '';\n\n }else{\n $filename = $image->getClientOriginalName();\n $path = public_path('uploads/' . $filename);\n Image::make($image->getRealPath())->resize(313, 300)->save($path);\n }\n $child->photo = $filename;\n $child->family_id = $famille->id;\n $resp = Family::findOrFail($famille->id);\n $user = User::where('email',$resp->email_responsable)->first();\n if($user)\n {\n $child->f_id =$user->id;\n $child->save();\n if($child->id)\n {\n\n $ch =Child::find($child->id);\n if($niveau_global == 'Lycée')\n {\n $ch->branches()->attach([$request->branche]);\n }\n if($niveau_global == 'Maternelle' || $niveau_global == 'Primaire'\n || $niveau_global == 'Collège' || $niveau_global == 'Lycée' || $niveau_global == 'Crèche')\n {\n $ch->levels()->attach([$request->niveau]);\n }\n if($niveau_global == 'Crèche')\n {\n $ch->classrooms()->attach([$request->classe]);\n }\n\n\n $cr = Classroom::where('user_id',\\Auth::user()->id)->where('id',$request->classe)->first();\n $cr->children()->attach([$child->id]);\n\n $bill = new Bill();\n $bill->status = 0;\n if(!PromotionAdvance::checkAdvancePromotion() && !PromotionExceptional::checkExceptionalPromotion())\n {\n if(isset($request->reduction) && !empty($request->reduction) && !is_null($request->reduction))\n {\n $bill->start = SchoolYear::find(SchoolYear::getSchoolYearId())->startch1->firstOfMonth()->toDateString();\n $bill->end = SchoolYear::find(SchoolYear::getSchoolYearId())->startch1->firstOfMonth()->addMonths($request->nbr_month)->toDateString();\n $bill->somme = PriceBill::countWhenNoPromotionButReduction($request->nbr_month,PriceBill::assignPrice($request->niveau,$request->transport),$request->reduction);\n $bill->reductionPrix = $request->reduction;\n $bill->reduction = 1;\n $bill->school_year_id = SchoolYear::getSchoolYearId();\n $bill->nbrMois =$request->nbr_month;\n\n }else{\n $bill->start = SchoolYear::find(SchoolYear::getSchoolYearId())->startch1->firstOfMonth()->toDateString();\n $bill->end = SchoolYear::find(SchoolYear::getSchoolYearId())->startch1->firstOfMonth()->addMonths($request->nbr_month)->toDateString();\n $bill->somme = PriceBill::countWhenNoPromotion($request->nbr_month,PriceBill::assignPrice($request->niveau,$request->transport));\n $bill->reduction = 0;\n $bill->school_year_id = SchoolYear::getSchoolYearId();\n $bill->nbrMois =$request->nbr_month;\n }\n }\n\n if(PromotionAdvance::checkAdvancePromotion())\n {\n if($request->nbr_month >=3)\n {\n $bill->start = SchoolYear::find(SchoolYear::getSchoolYearId())->startch1->firstOfMonth()->toDateString();\n $bill->end = SchoolYear::find(SchoolYear::getSchoolYearId())->startch1->firstOfMonth()->addMonths($request->nbr_month)->toDateString();\n $bill->somme =PromotionAdvance::countAccordingTo($prix_advance,PriceBill::assignPrice($request->niveau,$request->transport),$request->nbr_month);\n $bill->reduction = 1;\n $bill->reductionPrix = $prix_advance;\n $bill->school_year_id = SchoolYear::getSchoolYearId();\n $bill->nbrMois =$request->nbr_month;\n }\n if($request->nbr_month == 1)\n {\n if(isset($request->reduction) && !empty($request->reduction) && !is_null($request->reduction))\n {\n $bill->start = SchoolYear::find(SchoolYear::getSchoolYearId())->startch1->firstOfMonth()->toDateString();\n $bill->end = SchoolYear::find(SchoolYear::getSchoolYearId())->startch1->firstOfMonth()->addMonths($request->nbr_month)->toDateString();\n $bill->somme = PriceBill::countWhenNoPromotionButReduction($request->nbr_month,PriceBill::assignPrice($request->niveau,$request->transport),$request->reduction);\n $bill->reductionPrix = $request->reduction;\n $bill->reduction = 1;\n $bill->school_year_id = SchoolYear::getSchoolYearId();\n $bill->nbrMois =$request->nbr_month;\n\n }else{\n $bill->start = SchoolYear::find(SchoolYear::getSchoolYearId())->startch1->firstOfMonth()->toDateString();\n $bill->end = SchoolYear::find(SchoolYear::getSchoolYearId())->startch1->firstOfMonth()->addMonths($request->nbr_month)->toDateString();\n $bill->somme = PriceBill::countWhenNoPromotion($request->nbr_month,PriceBill::assignPrice($request->niveau,$request->transport));\n $bill->reduction = 0;\n $bill->school_year_id = SchoolYear::getSchoolYearId();\n $bill->nbrMois =$request->nbr_month;\n }\n }\n }\n if(PromotionExceptional::checkExceptionalPromotion())\n {\n $bill->start = SchoolYear::find(SchoolYear::getSchoolYearId())->startch1->firstOfMonth()->toDateString();\n $bill->end = SchoolYear::find(SchoolYear::getSchoolYearId())->startch1->firstOfMonth()->addMonths($request->nbr_month)->toDateString();\n $bill->somme = PromotionExceptional::countAccordingTo($request->nbr_month,PriceBill::assignPrice($request->niveau,$request->transport),$prix_exc);\n $bill->reductionPrix = $prix_exc;\n $bill->reduction = 1;\n $bill->school_year_id = SchoolYear::getSchoolYearId();\n $bill->nbrMois =$request->nbr_month;\n }\n\n\n $bill->child_id =$child->id;\n $bill->f_id = $user->id;\n $bill->user_id = \\Auth::user()->id;\n $bill->save();\n }\n }\n\n\n return redirect()->back()->with('success',\"l'élève a bien été ajouté! \");\n }\n\n }",
"public function sess_create()\n\t{\n\t\treturn ($this->session_valid()) ? parent::sess_create() : FALSE;\n\t}",
"public function saveDataToSession()\n {\n $data = $this->getData();\n if (isset($data['MinimumPrice']) && !$data['MinimumPrice']) {\n unset($data['MinimumPrice']);\n }\n if (isset($data['MaximumPrice']) && !$data['MaximumPrice']) {\n unset($data['MaximumPrice']);\n }\n if (isset($data['ShortKeyword']) && $data['ShortKeyword']) {\n $data['Keyword'] = $data['ShortKeyword'];\n }\n if (isset($data['Keyword']) && $data['Keyword']) {\n $data['ShortKeyword'] = $data['Keyword'];\n }\n Session::set($this->Config()->get('form_data_session_variable'), $data);\n }",
"protected function postSave() {\n\t\treturn true;\n\t}",
"public function save()\n {\n Session::clear(\"Checkout.PostageID\");\n \n // Extend our save operation\n $this->extend(\"onBeforeSave\");\n\n // Save cart items\n Session::set(\n \"Checkout.ShoppingCart.Items\",\n serialize($this->items)\n );\n\n // Save cart discounts\n Session::set(\n \"Checkout.ShoppingCart.Discount\",\n serialize($this->discount)\n );\n\n // Update available postage\n if ($data = Session::get(\"Form.Form_PostageForm.data\")) {\n $country = $data[\"Country\"];\n $code = $data[\"ZipCode\"];\n $this->setAvailablePostage($country, $code);\n }\n }",
"public function after_submit( ITSEC_Login_Interstitial_Session $session, array $data ) { }",
"function pre_confirmation_check() {\n global $cartID;\n global $cart;\n \n if (empty($cart->cartID)) {\n $cartID = $cart->cartID = $cart->generate_cart_id();\n }\n \n if (! tep_session_is_registered('cartID')) {\n tep_session_register('cartID');\n }\n }",
"private function save_to_session()\n {\n if (strtolower($_SESSION['country_name']) !== strtolower($this->country_name)) {\n $_SESSION['country_name'] = $this->country_name;\n $_SESSION['country_code'] = $this->country_code;\n }\n if (strtolower($_SESSION['region_name']) !== strtolower($this->region_name)) {\n $_SESSION['region_name'] = $this->region_name;\n $_SESSION['region_code'] = $this->region_code;\n }\n\n }",
"public function postSave($with_validation) {}",
"function checkEmailFormValues($session){\r\n\t\tif (!empty($_POST[$session]) && !preg_match( '/(galery_users|galery_photos|galery_superusers|DELETE|DROP|TABLE)/', $_POST[$session]) && filter_var($_POST[$session], FILTER_VALIDATE_EMAIL)) {\r\n\t\t\t$return = $_POST[$session];\r\n\t\t} else {\r\n\t\t\t$return = null;\r\n\t\t}\r\n\r\n\t\treturn $return;\r\n\t}",
"function validate(){\n\t\t//always validate on order processing\n\t \tif(isset($_POST['action_processOrder'])){\n\t \t\t$data = $this->getData();\n\t \t\t$this->saveDataToSession($data);\n\t \t\t//check items are in cart, and each item can be purchased\n\t \t\t$order = ShoppingCart::singleton()->current();\n\t \t\tif(!$order){\n\t \t\t\treturn false;\n\t \t\t}\n\t \t\t$items = $order->Items();\n\t \t\tif($items->exists()){\n\t\t \t\tforeach($items as $item){\n\t\t \t\t\tif(!$item->Buyable()->canPurchase()){\n\t\t \t\t\t\t$this->sessionMessage(sprintf(_t(\"OrderForm.PRODUCTCANTPURCHASE\",\"%s cannot be purchased\"),$item->Title), \"bad\");\n\t\t \t\t\t\treturn false;\n\t\t \t\t\t}\t\t \t\t\t\t\n\t\t \t\t}\n\t \t\t}else{\n\t \t\t\t$this->sessionMessage(_t(\"OrderForm.EMPTYCART\",\"Your cart is empty\"), $type);\n\t \t\t\treturn false;\n\t \t\t}\n\t\t\t//TODO: Check if prices have changed\n\t \t\t$valid = parent::validate();\n\t \t\t//TODO: check that member details are not already taken, if entered\n\t \t\t//check terms have been accepted\n\t\t\t$controller = $this->Controller();\n\t \t\tif(SiteConfig::current_site_config()->TermsPage()->exists() && (!isset($data['ReadTermsAndConditions']) || !(bool)$data['ReadTermsAndConditions'])){\n\t \t\t\t$this->sessionMessage(_t(\"OrderForm.MUSTREADTERMS\",\"You must agree to terms and conditions\"), \"bad\");\n\t \t\t\treturn false;\n\t \t\t}\n\t \t\treturn $valid;\n\t \t}\n\t \t//Override form validation to make different shipping address button, and other form actions work\n\t\tforeach($this->getValidActions() as $action){\n\t\t\tif(isset($_POST[$action])){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn parent::validate();\n\t }",
"public function setSessionUserData(){\r\n\t\t$data = array();\r\n\t\t$res = $this->curd_m->get_search(\"SELECT u.fld_balance_type AS balanceType,u.fld_reseller_id AS fld_reseller_id, g.group_id AS group_id, r.name AS name FROM users u INNER JOIN users_groups g INNER JOIN groups r WHERE u.id=\".$this->session->userdata('userId').\" AND u.id = g.user_id AND g.group_id=r.id \",'object');\r\n\r\n\t\tif($res!==NULL && sizeof($res)==1){\r\n\t\t\t$data['reseller'] = $res[0]->fld_reseller_id;\r\n\t\t\t$data['gname'] = $res[0]->name;\r\n\t\t\t$data['groupId'] = $res[0]->group_id;\r\n\t\t\t$data['balanceType'] = $res[0]->balanceType;\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\t\t$res = $this->curd_m->get_search(\"SELECT r.fld_int_id AS fld_int_id ,r.fld_chr_acro AS fld_chr_acro FROM country r INNER JOIN users_country c INNER JOIN users u WHERE u.id=\".$this->session->userdata('userId').\" AND u.id = c.fld_user_id AND c.fld_country_id=r.fld_int_id \",'object');\r\n\t\tif($res!==NULL && sizeof($res)==1){\r\n\t\t\t$data['countryId'] = $res[0]->fld_int_id;\r\n\t\t\t$data['countryAcro'] = $res[0]->fld_chr_acro;\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\t\t$this->session->set_userdata($data);\r\n\t\treturn TRUE;\r\n\r\n\r\n\t}",
"function validate_save_post()\n {\n }",
"protected function before_save() {\n $this->tipo_cuenta_id = Filter::get($this->tipo_cuenta_id, 'int');\n $this->banco_id = Filter::get($this->banco_id, 'int');\n $this->numero_cuenta = Filter::get($this->numero_cuenta, 'int');\n //Verifico si el Dueño está disponible\n if($this->_getRegisteredField('razon_social', $this->razon_social, $this->id)) {\n DwMessage::error('El nombre del Dueño ingresado ya fue registrado.');\n return 'cancel';\n }\n //Verifico si ya se encuentra registrado\n if($this->_getRegisteredField('identificacion', $this->identificacion, $this->id)) {\n DwMessage::error('La número de identificación ingresado ya fue registrado.');\n return 'cancel';\n } \n }",
"public function getDiscount(Request $request){\n\n \n $coupon=Coupon::where('code',$request->coupon)->first();\n if(count($coupon)==0){\n return back()->withErrors('No such coupon code found');\n }\n\n if($coupon->no_of_uses<=0){\n return back()->withErrors('Coupon code is not available now!');\n }\n\n $discount=round(($coupon->percent_off)*0.01*((float)str_replace(',', '', Cart::subtotal())+(float)str_replace(',', '', Cart::tax())),2);\n session(['coupon_id'=>$coupon->id]);\n session(['percent_off'=>$coupon->percent_off]);\n session(['discount'=>$discount]);\n $cart_total=((float)str_replace(',','',Cart::total()))-session()->get('discount');\n session(['cart_total'=>round($cart_total,2)]);\n\n Session::flash('success','Discount applied!');\n return back();\n }",
"function isValidatedCaptcha(){\n\n\t$CI = &get_instance();\n\t$bReturn = false;\n\tif( $CI->session->userdata('validated_captcha_code') == $CI->input->post('validated_captcha_code') ){\n\t\t$bReturn = true;\n\t}\n\n\t$CI->session->unset_userdata('validated_captcha_code');\n\treturn $bReturn;\n}",
"protected function _postSave()\r\n\t{\r\n\t}",
"public function beforeSave() {\n\n\t\t$checkin = new DateTime($this->date_check_in);\n\t\t$currendDate = new DateTime(\"NOW\");\n\n\t\t// Date Format to YYYY-MM-DD for MSSQL\n\t\t$this->date_check_in = DateUtil::reformatDateForDatabase($this->date_check_in);\n\t\t$this->date_check_out = DateUtil::reformatDateForDatabase($this->date_check_out);\n\t\t$this->finish_date = DateUtil::reformatDateForDatabase($this->finish_date);\n\t\t$this->card_returned_date = DateUtil::reformatDateForDatabase($this->card_returned_date);\n\n\t\t$this->time_check_in = DateUtil::reformatTimeForDatabase($this->time_check_in);\n\t\t$this->time_check_out = DateUtil::reformatTimeForDatabase($this->time_check_out);\n\t\t$this->time_in = DateUtil::reformatTimeForDatabase($this->time_in);\n\t\t$this->time_out = DateUtil::reformatTimeForDatabase($this->time_out);\n\t\t$this->finish_time = DateUtil::reformatTimeForDatabase($this->finish_time);\n\n\n\t\t// fOR Preregister a Visit if check In date is greater than the current\n\t\t$PDate = $currendDate->diff($checkin)->format(\"%r%a\");\n\t\tif($PDate > 1) {\n\t\t\t$this->visit_status = VisitStatus::PREREGISTERED;\n\t\t}\n\t\treturn parent::beforeSave();\n\t}",
"private function store()\n {\n $this->session->set('sergsxm_form_'.$this->formId, $this->parameters);\n }",
"protected function preValidate() {}",
"function isValidPostSession($referrer)\n{\n return hasValidPostUid() && hasValidReferrer($referrer);\n}",
"private function setSessionData(){\n $criteria = $this->input->post('criteria');\n $location = $this->input->post('searchKeyword',TRUE);\n $calendarDay =$this->input->post('timecon',TRUE);\n\n if(count($criteria)==2){\n $this->calendarCriteria=$this->HomeModel->timeconstraint_session_handler($calendarDay);\n $this->locationCriteria=$this->HomeModel->keyword_session_handler($location);\n }else if(count($criteria)==1){\n if($criteria[0]=='calendarDay'){\n $this->calendarCriteria=$this->HomeModel->timeconstraint_session_handler($calendarDay);\n }else{\n $this->locationCriteria=$this->HomeModel->keyword_session_handler($location);\n }\n }\n }"
] |
[
"0.6069859",
"0.54684985",
"0.54026663",
"0.5270569",
"0.5261374",
"0.524617",
"0.5159163",
"0.51301783",
"0.5126818",
"0.50912756",
"0.5084802",
"0.50838125",
"0.5080094",
"0.5067442",
"0.504595",
"0.5025018",
"0.5001499",
"0.49996933",
"0.4990901",
"0.49740413",
"0.49542373",
"0.493746",
"0.49355155",
"0.49302003",
"0.4921237",
"0.4919286",
"0.49172777",
"0.49134836",
"0.48922446",
"0.48875126"
] |
0.61897033
|
0
|
Clear options of a block. $what can be one of all template data options assets meta You can also pass in a string such template, options to clear multiple elements at once.
|
public function clearBlock($id, $what='all'){
$block = $this->layout->getOrCreate($id);
if ($block) {
$block->clear($what);
}
return $this;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function reset() {\n $this->values[self::OPTION] = null;\n $this->values[self::CONTENT] = array();\n $this->values[self::ERROR] = null;\n }",
"function propanel_of_reset_options($options,$page = ''){\n\n\t\t\t//@since 2.0 mod by denzel, reset defaults\n\t\t\t//replace of_reset_options() function..\t\t\t\n\t\t\t$template = get_option('of_template');\n\n\t\t\tforeach($template as $t):\n\t\t\t\t@$option_name = $t['id'];\n\t\t\t\t@$default_value = $t['std'];\n\t\t\t\tupdate_option(\"$option_name\",\"$default_value\");\n\t\t\tendforeach;\t\t\n\t\t\t//end of mod\t\n\n}",
"public function clear(array $options = array()) {\n }",
"public function clearOptions()\n {\n $this->_options = array();\n }",
"public function clear() {\n\t\t$sturctures = array('heading', 'body', 'footer');\n\t\tforeach ($sturctures as $sturcture) {\n\t\t\t$this->$sturcture = array();\n\t\t}\n\t}",
"public function resetOptions()\n {\n $this->options = [];\n $this->configure();\n }",
"public function resetOptions()\n {\n $this->options = array();\n }",
"function dt_sc_clear($attrs, $content = null) {\n\t\treturn '<div class=\"dt-sc-clear\"></div>';\n\t}",
"function cf_meta_metaboxclear($prefs,$option,$user) {\n\tglobal $cfmeta,$post;\n\t$cfmeta = cf_meta_gimme(cf_meta_get_type(),$post->ID);\n\tif (isset($cfmeta->conditions) && is_array($cfmeta->conditions) && is_array($prefs) && count($prefs)) {\n\t\tforeach ($prefs as $k => $v) {\n\t\t\tif (array_key_exists(str_replace('_container','',$v), $cfmeta->conditions)) {\n\t\t\t\tunset($prefs[$k]);\n\t\t\t}\n\t\t}\n\t}\n\treturn $prefs;\n}",
"function tagReset () {\n if (is_object($this->tptPointer)) \n $this->say($this->tptPointer->templateReset());\n }",
"public function clear() { //+\n\t\t$this->arShortcodes = array();\n\t}",
"function hello_world_remove() {\ndelete_option('ernaehrungsnews_anzahl');\ndelete_option('ernaehrungsnews_trimmer');\ndelete_option('ernaehrungsnews_kategorieId');\n\n}",
"public function clearEmbargo();",
"public function clear( );",
"public function remove_options()\n {\n }",
"public function clear_menu( )\n {\n $this->variables = array();\n }",
"function clear() {}",
"public function clear(): void;",
"public function clear(): void;",
"public function clear(): void;",
"public function clear(): void;",
"public function clear(): void;",
"public function clear(): void;",
"public function reset()\n\t{\n\t\tupdate_option($this->filterName, array());\n\t}",
"public function clear()\n {\n $this->contents = '';\n }",
"function clear() {}",
"function resetOptions()\n {\n $this->options = $this->_defaultOptions;\n }",
"function options_summary(&$categories, &$options) {\n // It is very important to call the parent function here:\n parent::options_summary($categories, $options);\n\n $block_sets = strip_tags($this->get_option('block_sets'));\n if (empty($block_sets)) {\n $block_sets = t('None');\n }\n\n if (strlen($block_sets) > 16) {\n $block_sets = substr($block_sets, 0, 16) . '...';\n }\n\n $options['block_sets'] = array(\n 'category' => 'block',\n 'title' => t('Sets'),\n 'value' => $block_sets,\n );\n }",
"public function resetForm() {\n\n\t\tforeach ( $this->getOptionsList() as $element ) {\n\t\t\t$element->reset();\n\t\t}\n\t\t$this->setLastAction( self::ACTION_RESET );\n\n\t\t$custom_style = new Custom_CSS_Style();\n\t\t$custom_style->reinit();\n\t}",
"public function clear();"
] |
[
"0.59784067",
"0.5761601",
"0.5746207",
"0.5580215",
"0.52914345",
"0.52363306",
"0.52213854",
"0.51293814",
"0.5118445",
"0.5111",
"0.51011914",
"0.50919867",
"0.5088871",
"0.50675863",
"0.50626713",
"0.50321686",
"0.50287247",
"0.50109535",
"0.50109535",
"0.50109535",
"0.50109535",
"0.50109535",
"0.50109535",
"0.50062263",
"0.498749",
"0.49737838",
"0.4944659",
"0.49377862",
"0.4928166",
"0.49280012"
] |
0.62657154
|
0
|
Exclude a block from resource tagging. It is useful for blocks such dashboard which are part of the developer toolbox.
|
public function excludeFromTagResource($id){
$block = $this->layout->getOrCreate($id);
if ($block) {
$block->options['tagresource_excluded'] = true;
}
return $this;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"function the_block_template_skip_link()\n {\n }",
"function remove_blocks() {\n if ( is_singular( 'webinar' ) && in_the_loop() && is_main_query() ) {\n //parse the blocks so they can be run through the foreach loop\n $blocks = parse_blocks( get_the_content() );\n foreach ( $blocks as $block ) {\n //look to see if your block is in the post content -> if yes continue past it if no then render block as normal\n \n echo $block['blockName'];\n \n if ( 'lazyblock/top-of-page' === $block['blockName'] ) {\n continue;\n } else {\n echo render_block( $block );\n }\n }\n }\n}",
"function _block_template_render_without_post_block_context($context)\n {\n }",
"function wp_filter_out_block_nodes($nodes)\n {\n }",
"function wp_should_skip_block_supports_serialization($block_type, $feature_set, $feature = \\null)\n {\n }",
"private function DisableGutenberg(){\n // disable for posts\n add_filter('use_block_editor_for_post', '__return_false', 10);\n // disable for post types\n add_filter('use_block_editor_for_post_type', '__return_false', 10);\n }",
"function remove_block_css() {\n wp_dequeue_style( 'wp-block-library' ); // Wordpress core\n}",
"public function removeButton($blockName);",
"function unregister_block_type($name)\n {\n }",
"function wp_skip_spacing_serialization($block_type)\n {\n }",
"function _remove_theme_attribute_in_block_template_content($template_content)\n {\n }",
"function wp_skip_dimensions_serialization($block_type)\n {\n }",
"function fuxt_block_whitelist() {\n\treturn array(\n\t\t'core/paragraph',\n\t\t'core/image',\n\t\t'core/heading',\n\t\t'core/gallery',\n\t\t'core/list',\n\t\t'core/quote',\n\t\t'core/columns',\n\t\t'core/column',\n\t\t'core/embed',\n\t);\n}",
"function exclude_widget_categories($args){\n\t$args[\"exclude\"] = $exclude;\n\treturn $args;\n}",
"private function disableBlocks()\n {\n // Check dates\n if ($this->getActionDate('statusstaticblocksmanager/statusstaticblocksmanager_group/disablestartdate', 'statusstaticblocksmanager/statusstaticblocksmanager_group/disablestarttime')) {\n\n Mage::log('Deactive blocks', null, 'wapone.log');\n\n //Blocks list to deactive\n $blocks_to_disable = $this->getBlocks('statusstaticblocksmanager/statusstaticblocksmanager_group/blockstodisable');\n\n if (count($blocks_to_disable) > 0) {\n for ($row = 0; $row < count($blocks_to_disable); $row++) {\n Mage::log('Block da disattivare:'.$blocks_to_disable[$row], null, 'wapone.log');\n Mage::getModel('cms/block')->load($blocks_to_disable[$row])\n ->setData('is_active', self::DEACTIVE)\n ->save();\n }\n /*** If you are using Letsi FPC module uncomment line below ***/\n //Mage::getSingleton('fpc/fpc')->clean();\n /*** In any case, you have to flush the cache, if you're using one ***/\n\n Mage::getConfig()->saveConfig('statusstaticblocksmanager/statusstaticblocksmanager_group/module_disabling_status', '0', 'default', 0);\n }\n }\n }",
"public function getExclude()\n {\n return $this->exclude;\n }",
"function slug_disable_woocommerce_block_editor_styles()\n{\n wp_deregister_style('wc-block-editor');\n wp_deregister_style('wc-block-style');\n}",
"function smartwp_remove_wp_block_library_css(){\nwp_dequeue_style( 'wp-block-library' );\nwp_dequeue_style( 'wp-block-library-theme' );\nwp_dequeue_style( 'wc-block-style' ); // Remove WooCommerce block CSS\n}",
"function wp_skip_border_serialization($block_type)\n {\n }",
"function unregister_block_style($block_name, $block_style_name)\n {\n }",
"function exclude_widget_categories($args){\r\n $exclude = \"1\";\r\n $args[\"exclude\"] = $exclude;\r\n return $args;\r\n}",
"function smartwp_remove_wp_block_library_css(){\n wp_dequeue_style( 'wp-block-library' );\n wp_dequeue_style( 'wp-block-library-theme' );\n wp_dequeue_style( 'wc-block-style' ); // Remove WooCommerce block CSS\n }",
"public function getNoBlock()\n {\n return $this->noBlock;\n }",
"public function beforeSave(\n /** @noinspection PhpUnusedParameterInspection */\n BlockResource $blockResource, // NOSONAR\n Block $block,\n ... $arguments // NOSONAR\n )\n {\n /** @noinspection PhpUndefinedMethodInspection */\n $json = $block->getData(Constants::ATTR_PAGE_DESIGNER_JSON);\n if (is_string($json) && strlen(trim($json)) > 0) {\n $block->setContent($this->htmlRenderer->toHtml($json, $block->getData(Constants::ATTR_PAGE_DESIGNER_REMOVE)));\n }\n }",
"function strip_core_block_namespace($block_name = \\null)\n {\n }",
"public function discardBlockAction(Request $request)\n {\n $this->getDoctrine()->getManager()->getFilters()->disable('draftversion');\n /** @var BlockManager $manager */\n $manager = $this->get('opifer.content.block_manager');\n $response = new JsonResponse;\n $id = (int) $request->request->get('id');\n $rootVersion = (int) $request->request->get('version');\n\n try {\n $manager->discardAll($id, $rootVersion);\n\n $response->setStatusCode(200);\n $response->setData(['state' => 'discarded']);\n } catch (\\Exception $e) {\n $response->setStatusCode(500);\n $response->setData(['error' => $e->getMessage()]);\n }\n\n return $response;\n }",
"function unregister_block_pattern($pattern_name)\n {\n }",
"protected function matchHideForNonAdminsCondition() {}",
"public function unregister($block_name, $block_style_name)\n {\n }",
"public function unregister()\r\n {\r\n $this->unregisterBlock('l');\r\n }"
] |
[
"0.6656546",
"0.6391012",
"0.6080895",
"0.59958744",
"0.5939831",
"0.58719486",
"0.5732753",
"0.5702523",
"0.56675977",
"0.56646544",
"0.55681187",
"0.55269027",
"0.5521401",
"0.5500831",
"0.5475144",
"0.547484",
"0.5464509",
"0.54643196",
"0.54617876",
"0.54502153",
"0.5405276",
"0.5357161",
"0.5355267",
"0.5331109",
"0.5316514",
"0.5303764",
"0.5233519",
"0.5215893",
"0.52122325",
"0.5193422"
] |
0.6392053
|
1
|
Attach an assets to the given block id for rendering.
|
public function addAssets($id, $assets=[], $first=false){
$block = $this->layout->getOrCreate($id);
$block->addAssets($assets, $first);
return $this;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function requireAssets($id, $requires=[]){\n $block = $this->layout->getOrCreate($id);\n $block->addAssetRequire($requires);\n return $this;\n }",
"public function addAssets() {}",
"public function addAssets() {}",
"public function replaceAssets($id, $replacements=[]){\n $block = $this->layout->getOrCreate($id);\n foreach($replacements as $search => $replacement) {\n foreach ($block->assets as $blockAssetsName=>$blockAssets) {\n foreach($blockAssets as $i=>$asset) {\n if ($asset===$search) {\n $block->assets[$blockAssetsName][$i] = $replacement;\n }\n }\n }\n }\n return $this;\n }",
"public function enqueue_block_editor_assets() {\n\t\t$this->asset_manager->enqueue_script( 'structured-data-blocks' );\n\t\t$this->asset_manager->enqueue_style( 'structured-data-blocks' );\n\t}",
"private function setAssetsFromData()\n {\n if (is_array($this->assetData)) {\n $assets = $this->grav['assets'];\n foreach ($this->assetData as $item) {\n $assetType = $item['type'];\n if ($assetType == 'css') {\n $assets->addCss($item['data']);\n } elseif ($assetType == 'js') {\n $assets->addJs($item['data'], $item['prio'], true, null, $item['where']);\n } elseif ($assetType == 'inlinejs') {\n $assets->addInlineJs($item['data'], $item['prio'], $item['where']);\n }\n }\n }\n }",
"public function block_assets() {\n\n\t\t// Styles.\n\t\twp_enqueue_style(\n\t\t\t$this->slug . '-frontend',\n\t\t\t$this->url . '/build/style.build.css',\n\t\t\tarray(),\n\t\t\tPOSTSLISTBLOCK_VERSION\n\t\t);\n\t}",
"function register_block() {\n\tBlocks::jetpack_register_block(\n\t\tBLOCK_NAME,\n\t\tarray( 'render_callback' => __NAMESPACE__ . '\\load_assets' )\n\t);\n}",
"public function enqueue_assets()\n {\n $style_path = '/assets/css/block.style.css';\n wp_enqueue_style(\n $this->namespace . '-block',\n _get_plugin_url() . $style_path,\n null,\n filemtime( _get_plugin_directory() . $style_path )\n );\n }",
"public function block_assets() {\n\n\t\t// Styles.\n\t\twp_enqueue_style(\n\t\t\t$this->slug . '-frontend',\n\t\t\t$this->url . '/build/style.build.css',\n\t\t\tarray(),\n\t\t\tBREADCRUMBSBLOCK_VERSION\n\t\t);\n\t}",
"function ajarRegisterBlock() {\n\n //Archivo php generado del builds\n $assets = include_once get_template_directory().'/blocks/build/index.asset.php';\n\n wp_register_script(\n 'ajar-block', // handle del script\n get_template_directory_uri().'/blocks/build/index.js', //url del directorio\n $assets['dependencies'], //all dep\n $assets['version'] // cada build cambia la version, para evitaas conflictos de cache\n );\n\n register_block_type(\n 'ajar/basic',\n array(\n 'editor_script' => 'ajar-block', //copiar el script ya registrado\n 'attributes' => array( //repetimos los attr del block de index.js\n 'content' => array(\n 'type' => \"string\",\n 'default' => 'Hello World'\n ),\n 'mediaURL' => array(\n \"type\" => 'string'\n ),\n 'mediaAlt' => array(\n \"type\" => 'string'\n ),\n ),\n 'render_callback' => 'ajarRenderDinamycBlock' //funcion para generar el SSR(server side render)\n )\n );\n}",
"function glorify_enqueue_block_assets() {\n wp_enqueue_style( \n\t\t'blocks-style',\n\t\tget_template_directory_uri() . '/assets/css/blocks.css',\n\t);\n}",
"protected function register_assets() {\n\n\t\t// Register block script for backend/editor.\n\t\t\\wp_register_script(\n\t\t\t'tcc-layout-engine',\n\t\t\tplugins_url( '/dist/blocks.build.js', __FILE__ ),\n\t\t\tarray( 'wp-blocks', 'wp-i18n', 'wp-element', 'wp-editor' ),\n\t\t\tfilemtime( plugin_dir_path( __FILE__ ) . 'dist/blocks.build.js' ),\n\t\t\ttrue\n\t\t);\n\n\t\t// Register block editor styles for backend/editor.\n\t\t\\wp_register_style(\n\t\t\t'tcc-layout-engine',\n\t\t\tplugins_url( 'dist/blocks.editor.build.css', __FILE__ ),\n\t\t\tarray( 'wp-edit-blocks' ),\n\t\t\tfilemtime( plugin_dir_path( __FILE__ ) . 'dist/blocks.editor.build.css' )\n\t\t);\n\n\t}",
"private function addAssets()\n {\n foreach (config('asgard.media.assets.media-partial-assets', []) as $assetName => $path) {\n $path = $this->assetFactory->make($path)->url();\n $this->assetManager->addAsset($assetName, $path);\n }\n }",
"public function set_ID($blockId = null)\n {\n $this->blockId = $blockId;\n Main::getInstance()->add_layout_block_instance($this);\n }",
"private function loadAssets($data): void\n {\n $version = 'production' !== zkd('env')->get() ? time() : $this->version;\n\n if ($this->hasAsset('style/public')) {\n wp_enqueue_style('zkd/block-' . $this->getId() . '-public', $this->getAsset('style/public'), is_admin() ? [] : array('zkd/main.css'), $version);\n }\n if ($this->hasAsset('script/public')) {\n wp_enqueue_script('zkd/block-' . $this->getId() . '-public', $this->getAsset('script/public'), is_admin() ? [] : array('zkd/main.js'), $version, true);\n if ($data) {\n wp_localize_script('zkd/block-' . $this->getId() . '-public', $data['block']->id, $data);\n }\n }\n\n if (is_admin()) {\n if ($this->hasAsset('style/admin')) {\n wp_enqueue_style('zkd/block-' . $this->getId() . '-admin', $this->getAsset('style/admin'), [], $version);\n }\n if ($this->hasAsset('script/admin')) {\n wp_enqueue_script('zkd/block-' . $this->getId() . '-admin', $this->getAsset('script/admin'), [], $version, true);\n if ($data) {\n wp_localize_script('zkd/block-' . $this->getId() . '-admin', $data['block']->id, $data);\n }\n }\n }\n }",
"public function getAssetById($id)\n\t{\n\t\treturn craft()->elements->getElementById($id, ElementType::Asset);\n\t}",
"function createAsset( $asset=null, $block_index=null ){\n global $mysqli, $counterparty;\n // Get current information on this asset\n $info = $counterparty->execute('get_asset_info', array('assets' => array($asset)));\n // Create data object using asset info (if any)\n $data = (count($info)) ? (object) $info[0] : (object) [];\n $description = substr($data->description,0,250); // Truncate to 250 chars\n $data->asset_id = getAssetId($asset);\n $data->issuer_id = createAddress($data->issuer);\n $data->owner_id = createAddress($data->owner);\n $data->divisible = ($data->divisible) ? 1 : 0; // convert to boolean\n $data->locked = ($data->locked) ? 1 : 0 ; // convert to boolean\n $data->supply = intval($data->supply);\n $data->description = $mysqli->real_escape_string($description);\n $data->asset_longname = $mysqli->real_escape_string($data->asset_longname);\n // Set asset type (1=Named, 2=Numeric, 3=Subasset, 4=Failed issuance)\n $data->type = (substr($asset,0,1)=='A') ? 2 : 1;\n if($data->asset_longname!='')\n $data->type = 3;\n if(count($info)==0)\n $data->type = 4;\n // Force numeric values for special assets\n if(in_array($data->asset, array('XCP','BTC'))){\n $data->issuer_id = 0;\n $data->owner_id = 0;\n }\n // Check if this asset already exists\n $results = $mysqli->query(\"SELECT id FROM assets WHERE asset='{$asset}' LIMIT 1\");\n if($results){\n if($results->num_rows){\n // Update asset information\n $row = $results->fetch_assoc();\n $id = $row['id'];\n $sql = \"UPDATE assets SET\n asset_id = '{$data->asset_id}',\n asset_longname = '{$data->asset_longname}',\n divisible = '{$data->divisible}',\n description = '{$data->description}',\n issuer_id = '{$data->issuer_id}',\n owner_id = '{$data->owner_id}',\n locked = '{$data->locked}',\n type = '{$data->type}',\n supply = '{$data->supply}'\n WHERE\n id='{$id}'\";\n $results = $mysqli->query($sql);\n if($results){\n return $id;\n } else {\n byeLog('Error while trying to update asset record for ' . $asset . ' : ' . $sql);\n }\n } else {\n // Create asset information\n $sql = \"INSERT INTO assets (asset_id, asset, asset_longname, block_index, type, divisible, description, issuer_id, locked, owner_id, supply) values (\n '{$data->asset_id}',\n '{$asset}',\n '{$data->asset_longname}',\n '{$block_index}',\n '{$data->type}',\n '{$data->divisible}',\n '{$data->description}',\n '{$data->issuer_id}',\n '{$data->locked}',\n '{$data->owner_id}',\n '{$data->supply}')\";\n $results = $mysqli->query($sql);\n if($results){\n return $mysqli->insert_id;\n } else {\n byeLog('Error while trying to create asset record for ' . $asset);\n }\n }\n } else {\n byeLog('Error while trying to lookup asset record');\n }\n}",
"public function load_additional_assets() {\n\n // Grab current screen\n $screen = get_current_screen();\n\n // Make sure we're on the correct screen\n if ( ! in_array( $screen->id, $this->screens ) ) {\n return;\n }\n\n do_action( 'cv_builder_inline_assets' );\n\n // Render template options callback for modal\n $this->render_template_options_template();\n\n // Render module options for modal\n $this->render_available_modules_template();\n\n }",
"function generate_block_asset_handle($block_name, $field_name, $index = 0)\n {\n }",
"function enqueue_block_styles_assets()\n {\n }",
"public function removeAssets($id, $assets=[]){\n $block = $this->layout->getOrCreate($id);\n foreach($assets as $targetAssetGroupName => $files) {\n if(!isset($block->assets[$targetAssetGroupName]))\n $block->assets[$targetAssetGroupName] = [];\n foreach($files as $file) {\n $index = array_search($file, $block->assets[$targetAssetGroupName]);\n if ($index!==false) {\n array_splice($files, $index, 1);\n }\n }\n }\n return $this;\n }",
"public static function insert_asset_instance( Mlp_Assets_Interface $assets ) {\n\n\t\tself::$assets = $assets;\n\t}",
"function lwhhgb_enqueue_block_assets() {\n\n\n\twp_enqueue_style( \n\t\t'lwhhgb-block-1', \n\t\tplugins_url('./src/style.css'.__FILE__), \n\t\tarray('wp-blocks')\n\t);\n\n\n\n\tif( is_admin() ){\n\n\t\twp_enqueue_style( \n\t\t\t'lwhhgb-block-1-editor', \n\t\t\tplugins_url('./src/editor-style.css'.__FILE__), \n\t\t\tarray('wp-editor-blocks')\n\t\t);\n\n\t}\n\n\n\n}",
"public function init(string $id, array $attributes): void\n {\n if (!$id) {\n throw new \\Exception('Gutenberg Block requires ID', 1);\n }\n $this->id = $id;\n\n if (!empty($attributes['title']) && is_string($attributes['title'])) {\n $this->title = $attributes['title'];\n }\n\n if (!empty($attributes['description']) && is_string($attributes['description'])) {\n $this->description = $attributes['description'];\n }\n\n if (!empty($attributes['manager'])) {\n $this->manager = $attributes['manager'];\n }\n\n if (!empty($attributes['reusable'])) {\n $this->reusable = $attributes['reusable'];\n }\n\n $this->path = get_template_directory() . '/blocks/' . $this->getId() . '/';\n\n $this->setDependencies();\n }",
"public function enqueue_block_editor_assets()\n {\n $block_path = '/assets/js/editor.block.js';\n $style_path = '/assets/css/block.editor.css';\n \n // Enqueue the bundled block JS file\n wp_enqueue_script(\n $this->namespace . '-block-js',\n _get_plugin_url() . $block_path,\n [ 'wp-i18n', 'wp-element', 'wp-blocks', 'wp-components', 'wp-editor' ],\n filemtime( _get_plugin_directory() . $block_path)\n );\n \n // Enqueue optional editor only styles\n wp_enqueue_style(\n $this->namespace . '-block-editor-css',\n _get_plugin_url() . $style_path,\n [ 'wp-blocks' ],\n filemtime( _get_plugin_directory() . $style_path )\n );\n\n // Setup token security for ajax\n wp_localize_script(\n \t$this->namespace . '-block-js',\n \t$this->namespace . '_ajax_object',\n \t[\n \t\t'ajax_url' => admin_url( 'admin-ajax.php' ),\n 'security' => wp_create_nonce( $this->namespace . '-security-token' )\n \t]\n );\n\n // wp_enqueue_script('add-actions'); // redundant?\n }",
"function gutenberg_enqueue_block_editor_assets_block_directory() {\n\t\twp_enqueue_script( 'wp-block-directory' );\n\t\twp_enqueue_style( 'wp-block-directory' );\n\t}",
"function enqueue_block_editor_assets()\n {\n }",
"public function __construct($asset_id)\n {\n $this->asset_id = $asset_id;\n }",
"public function add($name)\n\t{\n\t\tif ( ! isset($this->assets[$name]))\n\t\t{\n\t\t\t$this->assets[$name] = new Asset($this->type, $name, $this, $this->app);\n\t\t}\n\t}"
] |
[
"0.61549735",
"0.5931576",
"0.5931576",
"0.5920422",
"0.58657676",
"0.5789927",
"0.5740796",
"0.5736187",
"0.55674136",
"0.55656934",
"0.54651135",
"0.5461655",
"0.54137814",
"0.5382976",
"0.53812283",
"0.5369332",
"0.53609645",
"0.5356407",
"0.53123623",
"0.5309659",
"0.52676094",
"0.5247104",
"0.52405506",
"0.5222759",
"0.5197021",
"0.51750284",
"0.5167345",
"0.5164255",
"0.5158583",
"0.5145161"
] |
0.637778
|
0
|
Remove an asset of the given block id. $assets is an array such [ $targetAssetGroupName => [ $files ] ]
|
public function removeAssets($id, $assets=[]){
$block = $this->layout->getOrCreate($id);
foreach($assets as $targetAssetGroupName => $files) {
if(!isset($block->assets[$targetAssetGroupName]))
$block->assets[$targetAssetGroupName] = [];
foreach($files as $file) {
$index = array_search($file, $block->assets[$targetAssetGroupName]);
if ($index!==false) {
array_splice($files, $index, 1);
}
}
}
return $this;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"function remove_uploaded_asset(string $name) {\n\t\t$this->readychk();\n\t\tfor ($i = 0; $i < count($this->assets); $i++) {\n\t\t\tif ($this->assets[$i]->get_filename() === $name) {\n\t\t\t\t$this->assets[$i]->remove();\n\t\t\t\tunset($this->assets[$i]);\n\t\t\t\t$this->assets = array_values($this->assets);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tthrow new ArgException(\"Asset '$name' doesn't exist.\");\n\t}",
"public function removeAssetRecord()\n {\n // Get an instance of JAssetsTable\n $assetTable = $this->loadAssetTable();\n\n $assetFieldAlias = $this->getFieldAlias('asset_id');\n\n $assetId = $this->getFieldValue($assetFieldAlias);\n\n if ($assetId)\n {\n try\n {\n $isAssetRemoved = $assetTable->delete($assetId);\n }\n catch (\\Exception $e)\n {\n // ...continue with error handling below\n }\n }\n else\n {\n throw new AssetException( Text::sprintf( 'COM_CAJOBBOARD_BEHAVIOUR_ASSETS_EXCEPTION_DELETE_EMPTY_FIELD_ERROR', $this->getId() ) );\n }\n\n if (!$isAssetRemoved)\n {\n throw new AssetException( Text::sprintf( 'COM_CAJOBBOARD_BEHAVIOUR_ASSETS_EXCEPTION_DELETE_ERROR', $this->getId() ) );\n }\n }",
"public function delete_file_from_asset($asset_id, $type = 'video') {\n /* deleting a file from an asset is just submitting a null value for it */\n if (empty($asset_id)) {\n return array('errors' => 'no asset id');\n }\n if (!in_array($type, $this->file_types)) {\n return array('errors' => 'invalid file type');\n }\n $attribs = array(\n $type => NULL,\n );\n return $this->update_object($asset_id, 'asset', $attribs);\n }",
"private static function deleteAssets() {\n // Fail due to invalid asset deletors \n assert(isset(self::$assetDeletors));\n\n // Remove assets \n foreach (self::$assetDeletors as $deletor) {\n $deletor->delete();\n }\n\n // Clear AssetDeletors cache\n self::$assetDeletors = array();\n }",
"public function remove_asset($type, $name = '')\n\t{\n\t\tif(!in_array(strtolower(trim($type)), array('css', 'js')))\n\t\t{\n\t\t\tshow_error('Only CSS and JS can be removed');\n\t\t}\n\t\t\n\t\tif($name)\n\t\t{\n\t\t\tif(is_array($name))\n\t\t\t{\n\t\t\t\tforeach($name as $names)\n\t\t\t\t{\n\t\t\t\t\t$this->remove_asset($type, $names);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_assets[$type] = array();\n\t\t}\n\t}",
"public function destroy($id)\n {\n //\n $asset = Assets::find($id);\n $asset->delete();\n return redirect()->route('assets.index')->with(['success' => 'Asset deleted successfully', 'class' => 'close']);\n \n }",
"public function destroy($id)\n {\n $asset = $this->asset->findOrFail($id);\n\n return $asset->delete();\n }",
"public function destroy($id)\n {\n Port_Asset::where('id', $id)->delete();\n return redirect ('/admin/port-asset');\n }",
"public function destroy($id)\n {\n \n $data = Asset::find($id);\n $data->delete();\n \n Session::flash('success','Delete Success');\n return redirect()->back();\n }",
"public function destroy($id)\n {\n try {\n $asset = Asset::find($id);\n $asset_name = $asset->name;\n\n $location = Location::where('asset_id', '=', $asset->id)->first();\n\n $asset->deleted_at = date('Y-m-d H:i:s');\n $asset->save();\n\n $location->deleted_at = date('Y-m-d H:i:s');\n $location->save();\n\n\n \\Session::flash('flash_deleted',$asset_name . ' has been deleted');\n return redirect('/admin/assets');\n } catch(QueryException $e) {\n \\Session::flash('flash_deleted', 'Error deleting asset');\n return redirect('/admin/assets');\n }\n\n\n }",
"public static function remove ($type, Array $files) {\n if (in_array($type, array_keys(self::$_assets))) {\n foreach ($files as $file) {\n unset(self::$_assets[$type][array_search($file, self::$_assets[$type])]);\n }\n }\n }",
"public function destroy($id)\n {\n # Dapatkan rekod data dan hapuskan ia\n // DB::table('assets')\n // ->where('id', $id)\n // ->delete();\n $asset = Asset::find($id);\n $asset->delete();\n\n return redirect()->route('assets.index')->with('alert-success', 'Rekod telah berjaya dihapuskan.');\n }",
"public function destroy($id)\n\t{\n\t\t$data['archived'] = 1;\n\t\tAssetsManager::find($id)->update($data);\n\n\t\treturn redirect()->route('assets-manager.index')\n\t\t ->with('success','Assets deleted successfully');\n\t}",
"function deleteXXX($id = null) {\n\t\t// __removeFromShot, update count\n\t\t// __unshare, update count\n\t\t// __delete\n\t\t\n\t\tif (!$id) {\n\t\t\t$this->Session->setFlash(sprintf(__('Invalid id for %s', true), 'asset'));\n\t\t\t$this->redirectSafe();\n\t\t}\n\t\tif ($this->Asset->hasPermission('write',$id)) {\n\t\t\t// get all gids to updateCount\n\t\t\t$options = array('conditions'=>array('asset_id'=>$id), 'fields'=>'group_id', 'recursive'=>-1);\n\t\t\t$result = ClassRegistry::init('AssetsGroup')->find('all',$options);\n\t\t\t$gids = Set::extract('/AssetsGroup/group_id', $result);\n\n\t\t\tif ($this->Asset->delete($id, true )) {\n\t\t\t\t$this->Session->setFlash(sprintf(__('%s deleted', true), 'Asset'));\n\t\t\t\tforeach ($gids as $gid) {\n\t\t\t\t\tClassRegistry::init('Group')->updateCounter($gid);\n\t\t\t\t}\n\t\t\t\t$next = \"/my/home\";\n\t\t\t\t$this->redirect($next, null, true);\n\t\t\t\t// TODO: cleanup BestShot\n\t\t\t}\n\t\t\t$this->Session->setFlash(sprintf(__('%s was not deleted', true), 'Asset'));\n\t\t}\n\t\t$this->redirectSafe();\n\n\t}",
"public function destroy($id)\n {\n Asset::find($id)->delete();\n return Redirect::route('asset.index')->with('error','Asset successfully deleted.');\n }",
"public function Admin_Action_DeleteBlock() {\n $blockId = $this->_getPOSTRequest ( 'blockid', 0 );\n if ($blockId) {\n $blockIds = implode ( \"','\", $blockId );\n $query = \"DELETE\" . \" FROM [|PREFIX|]dynamic_content_block \" . \" WHERE blockid in ('\" . $blockIds . \"')\";\n\n if ($result = $this->db->Query ( $query )) {\n // Error message\n FlashMessage ( GetLang ( 'Addon_dynamiccontenttags_DeleteBlock_Success' ), SS_FLASH_MSG_SUCCESS );\n echo GetJSON ( array ('message' => GetFlashMessages (), 'result' => '1' ) );\n return;\n }\n }\n FlashMessage ( GetLang ( 'Addon_dynamiccontenttags_DeleteBlock_Failure' ), SS_FLASH_MSG_ERROR );\n echo GetJSON ( array ('message' => GetFlashMessages (), 'result' => '0' ) );\n return;\n }",
"public function removeButton($blockName);",
"public function removeBlockForIdentifier($identifier)\n\t{\n\t\tforeach ($this->ContentBlocks as $key => $contentBlock)\n {\n if ($contentBlock->identifier == $identifier)\n {\n // delete the current version stuff\n $allCVersions = $contentBlock->CurrentVersions;\n foreach ($allCVersions as $cVersion)\n {\n $cVersion->delete();\n $cVersion->free();\n }\n\n // delete all of the ContentBlock versions\n $allVersions = $contentBlock->Versions;\n foreach ($allVersions as $version)\n {\n $version->delete();\n $version->free();\n }\n\n $this->ContentBlocks->remove($key);\n $contentBlock->delete();\n $contentBlock->free();\n\n return;\n }\n\t\t}\n\t}",
"public function destroy($id)\n {\n Asset::destroy($id);\n flash()->success('Success!', 'Asset has been deleted!');\n return redirect('assets');\n }",
"public function destroy($id)\n {\n $record = AssetAssignment::find($id);\n \n if (is_null($record)) {\n return $this->sendError('Record not found.');\n }\n\n $record->delete();\n return $this->sendResponse(new AssetAssignResource($record), 'Record Deleted successfully.');\n }",
"protected function deleteAll($assets)\n {\n if (empty($assets)) {\n return;\n }\n $store = $this->getAssetStore();\n foreach ($assets as $asset) {\n $store->delete($asset['Filename'], $asset['Hash']);\n }\n }",
"public function delete_asset() {\n\t\t\n\t\tif($this->input->post('type')=='delete_record') {\n\t\t\t/* Define return | here result is used to return user data and error for error message */\n\t\t\t$Return = array('result'=>'', 'error'=>'', 'csrf_hash'=>'');\n\t\t\t$id = $this->uri->segment(4);\n\t\t\t$Return['csrf_hash'] = $this->security->get_csrf_hash();\n\t\t\t$result = $this->Assets_model->delete_assets_record($id);\n\t\t\tif(isset($id)) {\n\t\t\t\t$Return['result'] = $this->lang->line('xin_success_asset_deleted');\n\t\t\t} else {\n\t\t\t\t$Return['error'] = $this->lang->line('xin_error_msg');\n\t\t\t}\n\t\t\t$this->output($Return);\n\t\t}\n\t}",
"public function admin_remove_file($id=null, $fileId=null) {\n\t\t$response = array('success' => false);\n\t\tif(empty($id) || empty($fileId)) {\n\t\t\treturn $this->render(array('json' => $response));\n\t\t}\n\t\t\n\t\t// A good check to make...Ensure the content document actually exists.\n\t\t$document = Content::find('first', array('fields' => array('_id', '_files'), 'conditions' => array('_id' => $id)));\n\t\tif(empty($document)) {\n\t\t\treturn $this->render(array('json' => $response));\n\t\t}\n\t\t\n\t\tif(substr($fileId, -5) == '.json') {\n\t\t\t$fileId = substr($fileId, 0, -5);\n\t\t}\n\t\t$fileId = new MongoId($fileId);\n\t\t\n\t\t// Also ensure the asset actually exists.\n\t\t$asset = Asset::find('first', array('conditions' => array('_id' => $fileId)));\n\t\tif(!empty($asset)) {\n\t\t\tif(Asset::remove(array('_id' => $asset->_id))) {\n\t\t\t\t// Remove any thumbnails if this was an image asset (or other types of children files).\n\t\t\t\tAsset::remove(array('_parent' => $asset->_id));\n\n\t\t\t\t// Update the document to remove associations.\n\t\t\t\tContent::update(\n\t\t\t\t\tarray('$unset' => array('_files.' . (string)$asset->_id => true)),\n\t\t\t\t\tarray('_id' => $document->_id)\n\t\t\t\t);\n\t\t\t\t$response['success'] = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->render(array('json' => $response));\n\t}",
"public function delete_destribution_on_assets($real_estate_id, $will_id){\n $this->db->where('estate_id', $real_estate_id)\n ->where('will_id', $will_id)\n ->delete('tbl_distribution');\n }",
"public function remove($handles)\n {\n }",
"public function removeBlocks($identifiers)\n\t{\n\t\tforeach ($identifiers as $identifier)\n\t\t{\n\t\t\t$this->removeBlockForIdentifier($identifier);\n\t\t}\n\t}",
"public function deleteBlock($data_block) {\n $block = array();\n list($provider, $block_name) = explode('/', $data_block, 2);\n Frx::DataFile()->delete($data_block . '.sql');\n Frx::DataFile()->validateAllCache();\n\n }",
"public function removeScript($id)\n {\n unset($this->queue[$id]);\n }",
"public function remove($ids);",
"public function deleteBlock($blockname)\n {\n $this->replaceBlock($blockname, '');\n }"
] |
[
"0.5887005",
"0.5509836",
"0.5471387",
"0.53618497",
"0.53612363",
"0.53542495",
"0.53401524",
"0.52285993",
"0.52134526",
"0.51818085",
"0.5165567",
"0.51029575",
"0.5078412",
"0.5034152",
"0.50251263",
"0.4982963",
"0.49823695",
"0.49730876",
"0.4966568",
"0.4958806",
"0.49493837",
"0.49316",
"0.49080107",
"0.48439214",
"0.47997254",
"0.47645712",
"0.47337824",
"0.47268024",
"0.47037134",
"0.46877027"
] |
0.78297806
|
0
|
Performs a strict search on the given block id assets in order to replace it in place with the new given asset. $replacements is an array such [ search => replacement, search2 => replacement2, search3 => replacement3, ]
|
public function replaceAssets($id, $replacements=[]){
$block = $this->layout->getOrCreate($id);
foreach($replacements as $search => $replacement) {
foreach ($block->assets as $blockAssetsName=>$blockAssets) {
foreach($blockAssets as $i=>$asset) {
if ($asset===$search) {
$block->assets[$blockAssetsName][$i] = $replacement;
}
}
}
}
return $this;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"static function replaceArray(string $s, string $search, array $replacements): string {\n $rcnt = \\count($replacements);\n $chunks = explode($search, $s, $rcnt + 1);\n $rcnt = min($rcnt, \\count($chunks) - 1);\n $r = [];\n foreach ($chunks as $k => $c) {\n $r[] = $c;\n if ($k < $rcnt) {\n $r[] = $replacements[$k];\n }\n }\n\n return implode('', $r);\n }",
"public function setReplacements($replacements)\n {\n $this->replacements = $replacements;\n }",
"function bub_simple_replace($src_block, $target_html) {\n return $target_html;\n}",
"public function replaceBlockDocumentElements($content){\n\t\t//regular expression indiicating what a document block looks like\n\t\t$document_block_string = \"/\\{arch:document\\}(.*?)\\{\\/arch:document\\}/s\";\n\t\t\n\t\t//array to hold blocks that need to be replaced\n\t\t$document_array = array();\n\t\t\n\t\t//fill the array\n\t\tpreg_match_all($document_block_string, $content, $document_array);\n\t\t\n\t\t//parse document block array\n\t\tforeach($document_array[0] as $block){\n\t\t\t//start block content and fill it with all of the content in the block\n\t\t\t$block_content = $block;\n\n\t\t\t//array to hold elements in the block\n\t\t\t$element_array = array();\n\t\t\t\n\t\t\t//string to match document elements against\n\t\t\t$document_elements_string = \"/{arch:[a-zA-Z0-9\\s]*\\/}/\";\n\t\t\t\n\t\t\t//fill array\n\t\t\tpreg_match_all($document_elements_string, $block, $element_array);\n\t\t\t\n\t\t\t//parse element array\n\t\t\tforeach($element_array[0] as $element){\n\t\t\t\t//strip name out of the element string\n\t\t\t\t$element_name = explode(':', $element);\n\t\t\t\t$element_name = explode('/', $element_name[1]);\n\t\t\t\t//final element name\n\t\t\t\t$element_name = $element_name[0];\n\t\t\t\t\n\t\t\t\t//inline editing variables\n\t\t\t\t$element_editing_type = \"\";\n\t\t\t\t\n\t\t\t\tif(in_array($element_name, $this->document_default_fields)){//if it is a default element\n\t\t\t\t\tif($element_name == \"title\"){//switch to inline definition to remove extra tags generated by ckeditor\n\t\t\t\t\t\t$element_editing_type = \" arch-inline_element\";\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t//document element name\n\t\t\t\t\t$element_name = 'document_'.$element_name.'_'.getCurrentLanguage();\n\t\t\t\t\t\n\t\t\t\t\t//grab tag parser\n\t\t\t\t\trequire_once(constant(\"ARCH_BACK_END_PATH\").'modules/tag_parser.php');\n\n\t\t\t\t\t//variable to hold content with rendered tags filled with content\n\t\t\t\t\t$tag_rendered_content = $this->document[$element_name];\n\t\t\t\t\t//build handler and pass it the content to be rendered\n\t\t\t\t\t$tag_rendered_content_handler = new tagParser($tag_rendered_content, true, true, false);\n\t\t\t\t\t\n\t\t\t\t\t//retrieve the rendered content\n\t\t\t\t\t$tag_rendered_content = $tag_rendered_content_handler->getContent();\n\t\t\n\t\t\t\t\tob_start();\n\t\t\t\t\t//evaluate string as php append closing and open php tags to comply with expected php eval format\n\t\t\t\t\t//http://php.net/eval\n eval(\"?>\".$tag_rendered_content.\"<?\");\n\t\t\t\t\t$evaluated_content = ob_get_clean();\n\t\t\t\t\t\n\t\t\t\t\t$element_content = $evaluated_content;\n\t\t\t\t}else{//if it is not a default element\n\t\t\t\t\t$field_id = mysql_query('SELECT additional_field_ID \n\t\t\t\t\t\t\t\t\t\t\tFROM tbl_additional_fields\n\t\t\t\t\t\t\t\t\t\t\tWHERE additional_field_name = \"'.clean($element_name).'\"\n\t\t\t\t\t\t\t\t\t\t\tLIMIT 1');\n\t\t\t\t\t\n\t\t\t\t\tif(mysql_num_rows($field_id) > 0){//if the field exsists\n\t\t\t\t\t\t$field_id = mysql_fetch_assoc($field_id);\n\t\t\t\t\t\t$field_id = $field_id['additional_field_ID'];\n\t\t\t\t\t\t\n\t\t\t\t\t\t$field_value = mysql_query('SELECT additional_field_value_'.getCurrentLanguage().'\n\t\t\t\t\t\t\t\t\t\t\t\t\tFROM tbl_additional_field_values\n\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE additional_field_value_additional_field_FK = \"'.clean($field_id).'\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tAND additional_field_value_document_FK = \"'.clean($this->document['document_ID']).'\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tLIMIT 1');\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(mysql_num_rows($field_value) > 0){//if the field has value\n\t\t\t\t\t\t\t$field_value = mysql_fetch_assoc($field_value);\n\t\t\t\t\t\t\t$field_value = $field_value['additional_field_value_'.getCurrentLanguage()];\n\n\t\t\t\t\t\t\t$element_content = $field_value;\n\t\t\t\t\t\t}else{//the field has no value\n\t\t\t\t\t\t\t$element_content = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{//field dosn't exsist\n\t\t\t\t\t\t$element_content = '';\n\t\t\t\t\t}\n\t\t\t\t}//end non default element\n\n\t\t\t\tif($this->edit_mode == true){//check for editing mode\n\t\t\t\t\tif(trim($element_content) == ''){//check for empty elements in edit mode\n\t\t\t\t\t\t$element_content = $element;\n\t\t\t\t\t}\n\t\t\t\t\t$element_content = '<div class=\"arch-content_element'.$element_editing_type.'\" id=\"'.$element_name.'\" style=\"display:inline;\" contenteditable=\"true\">'.$element_content.'</div>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//grab content for element out of the database and replace it in the block\n\t\t\t\t$block_content = preg_replace(\"{\".$element.\"}\", $element_content, $block_content, 1);\n\t\t\t\t//echo $block_content;\n\t\t\t}\n\t\t\t\n\t\t\t//clean out document start and end tags\n\t\t\t$block_content = str_replace(\"{arch:document}\", \"\", $block_content);\n\t\t\t$block_content = str_replace(\"{/arch:document}\", \"\", $block_content);\n\t\t\t\n\t\t\t//preform actual replacement\n\t\t\t$content = preg_replace(\"{\".$block.\"}\", $block_content, $content, 1);\n\t\t}//end document block parsing\n\t\t\n\t\treturn $content;\n\t}",
"public function replace($items);",
"function replaceVariables($replacements,$text) {\n\t\tforeach ($replacements as $needle=>$replacement) {\n\t\t\t$text=str_replace($needle,$replacement,$text);\n\t\t}\n\t\treturn $text;\n\t}",
"function source_replace($srcfragment, $stage = \"after\")\n{\n\tglobal $search_pattern_after;\n\tglobal $search_replace_after;\n\tglobal $search_pattern_before;\n\tglobal $search_replace_before;\n\t\n\tif ($stage == \"before\")\n\t{\n\t\tfor ($i=0;$i<count($search_pattern_before);$i++) $srcfragment = ereg_replace($search_pattern_before[$i], $search_replace_before[$i], $srcfragment);\n\t}\n\telse\n\t{\n\t\tfor ($i=0;$i<count($search_pattern_after);$i++) $srcfragment = ereg_replace($search_pattern_after[$i], $search_replace_after[$i], $srcfragment);\n\t}\n\treturn $srcfragment;\n}",
"function textblock_template_replace(&$textblock, $replace)\n{\n foreach ($replace as $key => $value) {\n $textblock['title'] = str_replace(\"%$key%\", $value, $textblock['title']);\n $textblock['text'] = str_replace(\"%$key%\", $value, $textblock['text']);\n }\n}",
"abstract public function replace($translations);",
"function replace($search,$replace){\n\t\tsettype($search,\"string\");\n\n\t\t// prevod StringBuffer na string\n\t\tif(is_object($replace)){\n\t\t\t$replace = $replace->toString();\n\t\t}\n\n\t\tfor($i=0;$i<sizeof($this->_Items);$i++){\n\t\t\t$this->_Items[$i]->replace($search,$replace);\n\t\t}\n\t}",
"private function replaceDynamics($tpl, $blocks, $tID=''){\n\t\t\t//find and replace dynamic blocks\n\t\t\tif($this->settings->render_cache_level == 1){\n\t\t\t\t$posStart = strpos($tpl, '<pp:dynamic ');\n\t\t\t\twhile ($posStart !== false) {\n\t\t\t\t\t$startEnd = strpos($tpl, '>', $posStart + 15);\n\t\t\t\t\t$nameTag = trim(substr($tpl, $posStart + 11, $startEnd-11-$posStart));\n\t\t\t\t\t$nameTag = substr($nameTag, 6, -1);\n\t\t\t\t\t\n\t\t\t\t\t$nextStart = strpos($tpl, '<pp:dynamic ', $posStart + 20);\n\t\t\t\t\t$posEnd = strpos($tpl, '</pp:dynamic>', $posStart) + Template::DCTL;\n\t\n\t\t\t\t\twhile($nextStart !== false && $nextStart < $posEnd && $posEnd > Template::DCTL){\n\t\t\t\t\t\t$posEnd = strpos($tpl, '</pp:dynamic>', $posEnd) + Template::DCTL;\n\t\t\t\t\t\t$nextStart = strpos($tpl, '<pp:dynamic', $nextStart+20);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$tpl = substr_replace($tpl, '\\'.@$blocks[\\''.$nameTag.'\\'].\\'', $posStart, $posEnd - $posStart);\n\t\t\t\t\t\n\t\t\t\t\t$posStart = strpos($tpl, '<pp:dynamic ', $posStart + 20);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tforeach ($blocks as $key => $value) {\n\t\t\t\t\t\n\t\t\t\t\t$posStart = strpos($tpl, '<pp:dynamic name=\"'.$key.'\">');\n\n\t\t\t\t\tif($posStart !== false){\n\t\t\t\t\t\t$nextStart = strpos($tpl, '<pp:dynamic', $posStart + 20);\n\t\t\t\t\t\t$posEnd = strpos($tpl, '</pp:dynamic>', $posStart) + Template::DCTL;\n\t\t\t\t\t\t\n\t\t\t\t\t\twhile($nextStart !== false && $nextStart < $posEnd && $posEnd > Template::DCTL){\n\t\t\t\t\t\t\t$posEnd = strpos($tpl, '</pp:dynamic>', $posEnd) + Template::DCTL;\n\t\t\t\t\t\t\t$nextStart = strpos($tpl, '<pp:dynamic', $nextStart+20);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$tpl = substr_replace($tpl, $value, $posStart, $posEnd - $posStart);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->_msg(str_replace(array('{@pp:dynamic}', '{@pp:template}'), array($key, $tID), $this->_('DYNAMIC_NOT_FOUND', 'core')), Messages::DEBUG_ERROR);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\treturn $tpl;\n\t\t}",
"public function set_many($replaces)\n\t{\n\t\tforeach ($replaces as $key => $value)\n\t\t{\n\t\t\t$this->values[$this->block][$key] = $value;\n\t\t}\n\t}",
"public function setReplacements(array $replacements)\n {\n $this->replacements = $replacements;\n }",
"protected function processReplacements($template, $placeholders) {\n\n\t\t// sort by reverse length to prevent placeholder collision\n\t\tusort($placeholders, function ($a, $b) {\n\t\t\treturn mb_strlen($a) < mb_strlen($b);\n\t\t});\n\n\t\tforeach ($placeholders as $placeholder) {\n\n\t\t\t$replacement = $this->getReplacementValue($placeholder);\n\n\t\t\t$template = str_replace(':' . $placeholder, $replacement, $template);\n\t\t}\n\n\t\treturn $template;\n\t}",
"function processSearchReplace($bUseRegex){\r\n\tglobal $search_string, $replace_string, $files_to_search, $logfile, $separator;\r\n\t/* old strategy: outdir is the directory, every file in there will have the changes made to it\r\n\t$snr = new File_SearchReplace($search_string, $replace_string, $files_to_search, $outdir, false);\r\n\t*/\r\n\t$psrDebug = \"\\nprocessSearchReplace: will run thru \" . count($replace_string) . \" replacements...\\n\";\r\n\techo $psrDebug;\r\n\tfor ($t = 0; $t < count($search_string); $t++){\r\n\t\t\t//empty parameter in constructor is where the directory would go\r\n\t\t$psrDebug = \"\\n\\t\" . $t . \")next pHSR '\" . $search_string[$t] . \"' --> '\" . $replace_string[$t] . \"'\\n\";\r\n\t\t$snr = new File_SearchReplace($search_string, $replace_string, $files_to_search, '', false);\r\n\t\t$snr->setFind($search_string[$t]);\r\n\t\t$snr->setReplace($replace_string[$t]);\r\n\t\tif ($bUseRegex){\r\n\t\t\t$snr->setSearchFunction(\"preg\"); //use regex\r\n\t\t}\r\n\t\t$snr->doSearch();\r\n\t\t$psrDebug .= \"\\n\\t'\" . $search_string[$t] . \"' --> '\" . $replace_string[$t] . \" \\n\\tdone \" . $snr->getNumOccurences() . \" times\\n\";\r\n\t\techo $psrDebug;\r\n\t\t//appendFile($logfile, $psrDebug);\r\n\t\tunset($snr); //free up memory\r\n\t}//end for t - each search/replace pair\r\n\r\n\t//freeSystemMemory(); //fails with msg: \"sh: /proc/sys/vm/drop_caches: Permission denied\"\r\n\r\n}",
"public function replaceStrings(array $replacePairs, &$unusedReplacePairs) {\n\t\tforeach($replacePairs as $searchString => $replaceString) {\n\t\t\t$this->replaceString($searchString, $replaceString, $unusedReplacePairs);\n\t\t}\n\t}",
"function p1base_theme_suggestions_block_alter(array &$suggestions, array $variables)\n{\n // block\n if (isset($variables['elements']['content']['#block_content'])) {\n array_splice($suggestions, 1, 0, 'block__bundle__' . $variables['elements']['content']['#block_content']->bundle());\n }\n}",
"private static function _replace($source, $i, $options){\n\t\t$cache = new Cache();\n\t\t$cachePath = $cache->cacheDir().\"/template/\";\n\n\t\t$pattern = \"/{:(block) \\\"({:block})\\\"(?: \\[(.+)\\])?}(.*){\\\\1:}/msU\";\n\n\t\tpreg_match_all(static::$_terminals['T_BLOCK'], $source, $matches);\n\n\t\t$_blocks = null;\n\n\t\tforeach($matches[2] as $index => $block){\n\n\t\t\t$_pattern = String::insert($pattern, array('block' => $block));\n\n\t\t\t$_block = static::$_blocks->blocks(\"{$block}\");\n\n\t\t\t$_blocks = static::$_blocks;\n\n\t\t\t/**\n\t\t\t * Top level content for block\n\t\t\t * @var string\n\t\t\t */\n\t\t\t$content = trim($_block->content());\n\n\t\t\t/**\n\t\t\t * The request for block content in the final template\n\t\t\t * @var string\n\t\t\t */\n\t\t\t$request = $matches[4][$index];\n\n\t\t\t/**\n\t\t\t * Parent/child matches/replacement\n\t\t\t */\n\t\t\t$_parents = function($block) use (&$content, &$_parents, &$matches, &$index, &$_pattern){\n\n\t\t\t\t$parent = $block->parent();\n\n\t\t\t\tif(preg_match(\"/{:parent:}/msU\", $content, $_matches)) { \n\n\t\t\t\t\tif($parent){\n\t\t\t\t\t\t$content = preg_replace(\"/{:parent:}/msU\", $parent->content(), $content);\n\t\t\t\t\t\t// go again\n\t\t\t\t\t\treturn $_parents($block->parent(), $content);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// no parent, remove the request\n\t\t\t\t\t\t$content = preg_replace(\"/{:parent:}/msU\", \"\", $content);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\treturn $content;\n\n\t\t\t};\n\n\t\t\t/**\n\t\t\t * Parse the block and check to see if it's parents request it.\n\t\t\t * @var method\n\t\t\t */\n\t\t\t$_children = function($block, $content = null) use (&$_children, &$matches, &$index, &$_pattern, &$_blocks){\n\n\t\t\t\t$content = ($content == null) ? $block->content() : $content;\n\n\t\t\t\t$_block = $_blocks->blocks($block->name());\n\t\t\t\t/**\n\t\t\t\t * If the block has a child then we're not at the bottom of the chain.\n\t\t\t\t * We need to move up until we cant\n\t\t\t\t * @var mixed `object` or `false`\n\t\t\t\t */\n\t\t\t\t$child = $block->child();\n\n\t\t\t\t/**\n\t\t\t\t * If the block has a parent then we cant be at the top of the chain.\n\t\t\t\t * As long as there's a parent we need to keep moving. \n\t\t\t\t * @var mixed `object` or `false`\n\t\t\t\t */\n\t\t\t\t$parent = $block->parent();\n\n\t\t\t\tif(preg_match(\"/{:child:}/msU\", $content)) { \n\t\t\t\t\t// Block doesn't have a child block\n\t\t\t\t\tif(!$child){\n\t\t\t\t\t\t// Also has no parent\n\t\t\t\t\t\tif(!$parent){\n\t\t\t\t\t\t\t// clear the entire block\n\t\t\t\t\t\t\t$content = \"\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Has a parent, still no child tho\n\t\t\t\t\t\t\t// just remove the call for child block\n\t\t\t\t\t\t\t$content = preg_replace(\"/{:child:}/msU\", \"\", $content);\n\t\t\t\t\t\t\treturn $_children($block, $content);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t// not asking for a child\n\t\t\t\t} else {\n\n\t\t\t\t\t// Has a parent\n\t\t\t\t\tif($parent){\n\n\t\t\t\t\t\tif(preg_match(\"/{:child:}/msU\", $parent->content())){\n\t\t\t\t\t\t\t$content = preg_replace(\"/{:child:}/msU\", $content, $parent->content());\n\t\t\t\t\t\t\treturn $_children($parent, $content);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t// must return content so we dont muck up parent\n\t\t\t\treturn $content;\n\n\t\t\t};\n\n\t\t\t// parse children\n\t\t\t$content = $_children($_block);\n\t\t\t// parse parents\n\t\t\t$content = $_parents($_block);\n\n\t\t\t$source = preg_replace($_pattern, $content, $source);\n\n\t\t}\n\n\t\t// 0 should always be the final template\n\t\tif($i == 0){\n\t\t\tif($cacheable = $cache->write($source, static::$_blocks->templates(0), $_blocks, $options)){\n\t\t\t\tstatic::$_template = $cacheable;\n\t\t\t}\n\n\t\t}\n\n\t}",
"function cmfcString_replaceVariables($replacements,$text) {\n\t\tforeach ($replacements as $needle=>$replacement) {\n\t\t\t$text=str_replace($needle,$replacement,$text);\n\t\t}\n\t\treturn $text;\n\t}",
"function find_replace($request) {\r\n\r\n $content = $request['content'];\r\n $keywords = $request['keywords'];\r\n\r\n foreach ($keywords as $keyword) {\r\n $content = str_replace($keyword['find'], $keyword['replace'], $content);\r\n }\r\n\r\n return $content;\r\n}",
"function load_replacements($file)\n\t{\n\t\tif(@file_exists($file))\n\t\t{\n\t\t\t$replace = array();\n\t\t\t@include($file);\n\t\t\t$this->replace = array_merge($this->replace, $replace);\n\t\t}\n\t}",
"protected function processReplacements(array &$results, array $replacements)\n {\n if (empty($replacements)) {\n return;\n }\n\n $refDatas = $this->getRefDataValues($results, $replacements);\n\n if (!empty($refDatas)) {\n $repo = $this->getEntityManager()->getRepository('\\Dvsa\\Olcs\\Api\\Entity\\System\\RefData');\n $qb = $repo->createQueryBuilder('r');\n\n $qb->where($qb->expr()->in('r.id', $refDatas));\n\n $query = $qb->getQuery();\n\n $language = $this->getLanguage();\n\n $query->setHint(\n \\Doctrine\\ORM\\Query::HINT_CUSTOM_OUTPUT_WALKER,\n 'Gedmo\\\\Translatable\\\\Query\\\\TreeWalker\\\\TranslationWalker'\n );\n $query->setHint(\\Gedmo\\Translatable\\TranslatableListener::HINT_FALLBACK, 1);\n $query->setHint(\\Gedmo\\Translatable\\TranslatableListener::HINT_TRANSLATABLE_LOCALE, $language);\n\n $refDataResults = $query->getArrayResult();\n\n $indexedRefDataResults = [];\n foreach ($refDataResults as $result) {\n $indexedRefDataResults[$result['id']] = $result;\n }\n } else {\n $indexedRefDataResults = [];\n }\n\n $this->replaceValues($indexedRefDataResults);\n\n return $results;\n }",
"public function processFindReplace ()\n {\n\n if ( $this->replaceQuery ) {\n\n $this->replace ();\n\n } else {\n\n $this->find ();\n\n }\n\n }",
"function _scanner_batch_execute_search_and_replace($search, $replace) {\n // Set up the Session values that Scanner module needs.\n $_SESSION['scanner_preceded'] = NULL;\n $_SESSION['scanner_followed'] = NULL;\n $_SESSION['scanner_mode'] = variable_get('scanner_mode', 0);\n $_SESSION['scanner_wholeword'] = variable_get('scanner_wholeword', 0);\n $_SESSION['scanner_published'] = variable_get('scanner_published', 0);\n $_SESSION['scanner_regex'] = variable_get('scanner_regex', 0);\n unset($_SESSION['scanner_search']);\n\n // Allow other modules to alter the search value.\n // Use this in case, you want to programmatically modify the\n // search or replace string value.\n module_invoke_all('example_thingy', $search, $replace);\n drupal_alter('scanner_batch_modify_strings', $search, $replace);\n\n\n // Set Session variables for search and replace values.\n $_SESSION['scanner_search'] = $search;\n $_SESSION['scanner_replace'] = $replace;\n\n // Run Search and Replace.\n $results = scanner_execute('search');\n\n // Return True if Scanner was successful.\n if ($results = scanner_execute('replace')) {\n return TRUE;\n }\n else {\n return FALSE;\n }\n}",
"function replace( $search, $replace ) {\n\treturn partial( 'str_replace', $search, $replace );\n}",
"protected function replacementSingle($content, array $configuration)\n {\n if ((isset($configuration['search']) || isset($configuration['search.'])) && (isset($configuration['replace']) || isset($configuration['replace.']))) {\n // Gets the strings\n $search = isset($configuration['search.']) ? $this->stdWrap($configuration['search'], $configuration['search.']) : $configuration['search'];\n $replace = isset($configuration['replace.']) ? $this->stdWrap($configuration['replace'], $configuration['replace.']) : $configuration['replace'];\n // Determines whether regular expression shall be used\n if (isset($configuration['useRegExp']) || $configuration['useRegExp.']) {\n $useRegularExpression = isset($configuration['useRegExp.']) ? $this->stdWrap($configuration['useRegExp'], $configuration['useRegExp.']) : $configuration['useRegExp'];\n }\n // Determines whether replace-pattern uses option-split\n if (isset($configuration['useOptionSplitReplace']) || isset($configuration['useOptionSplitReplace.'])) {\n $useOptionSplitReplace = isset($configuration['useOptionSplitReplace.']) ? $this->stdWrap($configuration['useOptionSplitReplace'], $configuration['useOptionSplitReplace.']) : $configuration['useOptionSplitReplace'];\n }\n\n // Performs a replacement by preg_replace()\n if (isset($useRegularExpression)) {\n // Get separator-character which precedes the string and separates search-string from the modifiers\n $separator = $search[0];\n $startModifiers = strrpos($search, $separator);\n if ($separator !== false && $startModifiers > 0) {\n $modifiers = substr($search, $startModifiers + 1);\n // remove \"e\" (eval-modifier), which would otherwise allow to run arbitrary PHP-code\n $modifiers = str_replace('e', '', $modifiers);\n $search = substr($search, 0, ($startModifiers + 1)) . $modifiers;\n }\n if (empty($useOptionSplitReplace)) {\n $content = preg_replace($search, $replace, $content);\n } else {\n // init for replacement\n $splitCount = preg_match_all($search, $content, $matches);\n $typoScriptService = GeneralUtility::makeInstance(TypoScriptService::class);\n $replaceArray = $typoScriptService->explodeConfigurationForOptionSplit([$replace], $splitCount);\n $replaceCount = 0;\n\n $replaceCallback = function ($match) use ($replaceArray, $search, &$replaceCount) {\n $replaceCount++;\n return preg_replace($search, $replaceArray[$replaceCount - 1][0], $match[0]);\n };\n $content = preg_replace_callback($search, $replaceCallback, $content);\n }\n } else {\n if (empty($useOptionSplitReplace)) {\n $content = str_replace($search, $replace, $content);\n } else {\n // turn search-string into a preg-pattern\n $searchPreg = '#' . preg_quote($search, '#') . '#';\n\n // init for replacement\n $splitCount = preg_match_all($searchPreg, $content, $matches);\n $typoScriptService = GeneralUtility::makeInstance(TypoScriptService::class);\n $replaceArray = $typoScriptService->explodeConfigurationForOptionSplit([$replace], $splitCount);\n $replaceCount = 0;\n\n $replaceCallback = function () use ($replaceArray, $search, &$replaceCount) {\n $replaceCount++;\n return $replaceArray[$replaceCount - 1][0];\n };\n $content = preg_replace_callback($searchPreg, $replaceCallback, $content);\n }\n }\n }\n return $content;\n }",
"function smarty_modifier_myreplace($string, $search) {\n\tif (count($search) > 0) {\n\t\t$newstring = strtr($string, $search);\n\t\treturn $newstring;\n\t} else {\n\t\treturn $string;\n\t}\n}",
"function adr_array_replace($a, $tofind, $toreplace)\n{\n $i = array_search($tofind, $a);\n if ($i === false)\n {\n return $a;\n }\n else\n {\n $a[$i] = $toreplace;\n return adr_array_replace($a, $tofind, $toreplace);\n }\n}",
"function our_str_replace($find, &$replacements, $subject)\n\n{\n\n $l = strlen($find);\n\n // allocate some memory\n\n $new_subject = str_repeat(' ', strlen($subject));\n\n $new_subject = '';\n\n foreach($replacements as $r)\n\n {\n\n if(($pos = strpos($subject, $find)) === false) break;\n\n $new_subject .= substr($subject, 0, $pos).$r;\n\n $subject = substr($subject, $pos+$l);\n\n // the above appears to be the fastest method\n\n //$subject = substr_replace($subject, $r, $pos, $l);\n\n //$subject = substr($subject, 0, $pos).$r.substr($subject, $pos+strlen($find));\n\n }\n\n $new_subject .= $subject;\n\n return $new_subject;\n\n}",
"abstract function processCode(array $replacePairs, array $fileSpecificReplacePairs, array &$unusedReplacePairs, array&$unusedFileSpecificReplacePairs);"
] |
[
"0.5614894",
"0.531159",
"0.530125",
"0.5272799",
"0.52708435",
"0.5198837",
"0.51715016",
"0.5171105",
"0.5157851",
"0.51076007",
"0.5089996",
"0.503949",
"0.5005643",
"0.5005549",
"0.50027084",
"0.49753448",
"0.4961913",
"0.49293178",
"0.49262136",
"0.4867715",
"0.4834068",
"0.4815383",
"0.48137105",
"0.48035425",
"0.48024204",
"0.47967768",
"0.47578138",
"0.47522113",
"0.47268638",
"0.46860453"
] |
0.70654595
|
0
|
Attach an asset require on the given block id. $requires is an array such [ vendorassetalias:semver => $preferred_block_target, ] vendorassetalias is alias of the vendor asset, jquery, bootstrap, jquerymobile, zepto ect semver pattern follows semver rules to compute the validity of the require. $preferred_block_target is the preferred block asset target of this require. in case multiple requires overlap, the last require win
|
public function requireAssets($id, $requires=[]){
$block = $this->layout->getOrCreate($id);
$block->addAssetRequire($requires);
return $this;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public static function addRequires($requires)\n {\n if (!is_array($requires)) {\n $requires = [$requires];\n }\n foreach ($requires as $require) {\n if (in_array($require, static::$_requires)) {\n continue;\n }\n static::$_requires[] = $require;\n }\n }",
"public static function setRequires($requires)\n {\n if (!is_array($requires)) {\n $requires = [$requires];\n }\n static::$_requires = $requires;\n }",
"function createAsset( $asset=null, $block_index=null ){\n global $mysqli, $counterparty;\n // Get current information on this asset\n $info = $counterparty->execute('get_asset_info', array('assets' => array($asset)));\n // Create data object using asset info (if any)\n $data = (count($info)) ? (object) $info[0] : (object) [];\n $description = substr($data->description,0,250); // Truncate to 250 chars\n $data->asset_id = getAssetId($asset);\n $data->issuer_id = createAddress($data->issuer);\n $data->owner_id = createAddress($data->owner);\n $data->divisible = ($data->divisible) ? 1 : 0; // convert to boolean\n $data->locked = ($data->locked) ? 1 : 0 ; // convert to boolean\n $data->supply = intval($data->supply);\n $data->description = $mysqli->real_escape_string($description);\n $data->asset_longname = $mysqli->real_escape_string($data->asset_longname);\n // Set asset type (1=Named, 2=Numeric, 3=Subasset, 4=Failed issuance)\n $data->type = (substr($asset,0,1)=='A') ? 2 : 1;\n if($data->asset_longname!='')\n $data->type = 3;\n if(count($info)==0)\n $data->type = 4;\n // Force numeric values for special assets\n if(in_array($data->asset, array('XCP','BTC'))){\n $data->issuer_id = 0;\n $data->owner_id = 0;\n }\n // Check if this asset already exists\n $results = $mysqli->query(\"SELECT id FROM assets WHERE asset='{$asset}' LIMIT 1\");\n if($results){\n if($results->num_rows){\n // Update asset information\n $row = $results->fetch_assoc();\n $id = $row['id'];\n $sql = \"UPDATE assets SET\n asset_id = '{$data->asset_id}',\n asset_longname = '{$data->asset_longname}',\n divisible = '{$data->divisible}',\n description = '{$data->description}',\n issuer_id = '{$data->issuer_id}',\n owner_id = '{$data->owner_id}',\n locked = '{$data->locked}',\n type = '{$data->type}',\n supply = '{$data->supply}'\n WHERE\n id='{$id}'\";\n $results = $mysqli->query($sql);\n if($results){\n return $id;\n } else {\n byeLog('Error while trying to update asset record for ' . $asset . ' : ' . $sql);\n }\n } else {\n // Create asset information\n $sql = \"INSERT INTO assets (asset_id, asset, asset_longname, block_index, type, divisible, description, issuer_id, locked, owner_id, supply) values (\n '{$data->asset_id}',\n '{$asset}',\n '{$data->asset_longname}',\n '{$block_index}',\n '{$data->type}',\n '{$data->divisible}',\n '{$data->description}',\n '{$data->issuer_id}',\n '{$data->locked}',\n '{$data->owner_id}',\n '{$data->supply}')\";\n $results = $mysqli->query($sql);\n if($results){\n return $mysqli->insert_id;\n } else {\n byeLog('Error while trying to create asset record for ' . $asset);\n }\n }\n } else {\n byeLog('Error while trying to lookup asset record');\n }\n}",
"public function asset($provides)\n {\n $this->is_asset = $provides;\n return $this;\n }",
"public function enqueue_block_editor_assets() {\n\t\t$this->asset_manager->enqueue_script( 'structured-data-blocks' );\n\t\t$this->asset_manager->enqueue_style( 'structured-data-blocks' );\n\t}",
"public function addRequirement($id, $type) {\n $this->requires[] = array(\n \"type\" => $type,\n \"id\" => $id\n );\n }",
"function ModuleRequireModule( $module, $require, $version=0 ) {\n Core::setRequired( esf_Extensions::MODULE, $module, esf_Extensions::MODULE, $require, $version );\n}",
"public function supportAsset($asset) {\n // todo: Complete the method.\n }",
"public function block_assets() {\n\n\t\t// Styles.\n\t\twp_enqueue_style(\n\t\t\t$this->slug . '-frontend',\n\t\t\t$this->url . '/build/style.build.css',\n\t\t\tarray(),\n\t\t\tPOSTSLISTBLOCK_VERSION\n\t\t);\n\t}",
"function ajarRegisterBlock() {\n\n //Archivo php generado del builds\n $assets = include_once get_template_directory().'/blocks/build/index.asset.php';\n\n wp_register_script(\n 'ajar-block', // handle del script\n get_template_directory_uri().'/blocks/build/index.js', //url del directorio\n $assets['dependencies'], //all dep\n $assets['version'] // cada build cambia la version, para evitaas conflictos de cache\n );\n\n register_block_type(\n 'ajar/basic',\n array(\n 'editor_script' => 'ajar-block', //copiar el script ya registrado\n 'attributes' => array( //repetimos los attr del block de index.js\n 'content' => array(\n 'type' => \"string\",\n 'default' => 'Hello World'\n ),\n 'mediaURL' => array(\n \"type\" => 'string'\n ),\n 'mediaAlt' => array(\n \"type\" => 'string'\n ),\n ),\n 'render_callback' => 'ajarRenderDinamycBlock' //funcion para generar el SSR(server side render)\n )\n );\n}",
"private function setDependencies()\n {\n $base = 'blocks/' . $this->getId();\n\n $this->dependencies = [\n 'style' => [\n 'public' => file_exists(assetFile($base . '/public.css')) ? assetPath($base . '/public.css') : '',\n 'admin' => file_exists(assetFile($base . '/admin.css')) ? assetPath($base . '/admin.css') : ''\n ],\n 'script' => [\n 'public' => file_exists(assetFile($base . '/public.js')) ? assetPath($base . '/public.js') : '',\n 'admin' => file_exists(assetFile($base . '/admin.js')) ? assetPath($base . '/admin.js') : ''\n ],\n 'images' => [],\n 'svg' => [],\n 'template' => file_exists($this->path . 'template.blade.php') ? templatePath($this->path . 'template.blade.php') : ''\n ];\n\n if (file_exists($this->path . 'images/')) {\n foreach (scandir($this->path . 'images/') as $file) {\n if (preg_match(\"#\\.(jpe?g|png)$# i\", $file)) {\n $this->dependencies['images'][$file] = assetPath($base . '/images/' . $file);\n }\n }\n }\n\n if (file_exists($this->path . 'svg/')) {\n foreach (scandir($this->path . 'svg/') as $file) {\n if (preg_match(\"#\\.(svg)$# i\", $file)) {\n $this->dependencies['svg'][$file] = assetPath($base . '/images/' . $file);\n }\n }\n }\n }",
"function register_block() {\n\tBlocks::jetpack_register_block(\n\t\tBLOCK_NAME,\n\t\tarray( 'render_callback' => __NAMESPACE__ . '\\load_assets' )\n\t);\n}",
"private function requireAssets()\n {\n $css = config('asgard.media.assets.media-partial-required-assets.css');\n $js = config('asgard.media.assets.media-partial-required-assets.js');\n\n if (!empty($css)) {\n $this->assetPipeline->requireCss($css);\n }\n\n if (!empty($js)) {\n $this->assetPipeline->requireJs($js);\n }\n }",
"public function requireByExternalId($externalId);",
"public function setTargetUri(string $targetUri): AssetInterface\n {\n }",
"public function visitRequireAstNode( ezcTemplateRequireAstNode $require )\n {\n $this->generateUnaryControl( $require, \"require\" );\n }",
"public function requireModules($moduleRequire) {\n if (is_array($moduleRequire))\n foreach ($moduleRequire as $module)\n Modules::$modules[$this->module]->requiredModules[] = $module;\n else\n Modules::$modules[$this->module]->requiredModules[] = $moduleRequire;\n }",
"public function block_assets() {\n\n\t\t// Styles.\n\t\twp_enqueue_style(\n\t\t\t$this->slug . '-frontend',\n\t\t\t$this->url . '/build/style.build.css',\n\t\t\tarray(),\n\t\t\tBREADCRUMBSBLOCK_VERSION\n\t\t);\n\t}",
"protected function getRequireAssetManager(ContainerBuilder $container)\n {\n $prefixId = 'fxp_require_asset.assetic.config.';\n /* @var FileExtensionManagerInterface $extManager */\n $extManager = $container->get($prefixId.'file_extension_manager');\n /* @var PatternManagerInterface $patternManager */\n $patternManager = $container->get($prefixId.'pattern_manager');\n /* @var OutputManagerInterface $outputManager */\n $outputManager = $container->get($prefixId.'output_manager');\n /* @var LocaleManagerInterface $localeManager */\n $localeManager = $container->get($prefixId.'locale_manager');\n /* @var PackageManagerInterface $packageManager */\n $packageManager = $container->get($prefixId.'package_manager');\n /* @var AssetReplacementManagerInterface $replacementManager */\n $replacementManager = $container->get($prefixId.'asset_replacement_manager');\n\n $ram = new RequireAssetManager();\n $ram->setFileExtensionManager($extManager)\n ->setPatternManager($patternManager)\n ->setOutputManager($outputManager)\n ->setLocaleManager($localeManager)\n ->setAssetReplacementManager($replacementManager)\n ->setPackageManager($packageManager);\n\n return $ram;\n }",
"public function block_update($block) {\n $required_keys = array('module', 'delta', 'theme');\n foreach ($required_keys as $required_key) {\n if (!in_array($required_key, array_keys($params))) {\n trigger_error(\"$required key param is mandatory\", E_USER_ERROR);\n }\n }\n drupal_write_record('block', $block);\n }",
"function glorify_enqueue_block_assets() {\n wp_enqueue_style( \n\t\t'blocks-style',\n\t\tget_template_directory_uri() . '/assets/css/blocks.css',\n\t);\n}",
"protected function _statementRequire($require, $class = null, $method = null) {\n $this->_emitter->emit_keyword('require');\n $this->_processExpression($require['expr'], $class, $method);\n $this->_emitter->emit_eos('require');\n }",
"public function enqueue_block_editor_assets()\n {\n $block_path = '/assets/js/editor.block.js';\n $style_path = '/assets/css/block.editor.css';\n \n // Enqueue the bundled block JS file\n wp_enqueue_script(\n $this->namespace . '-block-js',\n _get_plugin_url() . $block_path,\n [ 'wp-i18n', 'wp-element', 'wp-blocks', 'wp-components', 'wp-editor' ],\n filemtime( _get_plugin_directory() . $block_path)\n );\n \n // Enqueue optional editor only styles\n wp_enqueue_style(\n $this->namespace . '-block-editor-css',\n _get_plugin_url() . $style_path,\n [ 'wp-blocks' ],\n filemtime( _get_plugin_directory() . $style_path )\n );\n\n // Setup token security for ajax\n wp_localize_script(\n \t$this->namespace . '-block-js',\n \t$this->namespace . '_ajax_object',\n \t[\n \t\t'ajax_url' => admin_url( 'admin-ajax.php' ),\n 'security' => wp_create_nonce( $this->namespace . '-security-token' )\n \t]\n );\n\n // wp_enqueue_script('add-actions'); // redundant?\n }",
"protected function register_block() {\n\t\t$dir = dirname( __FILE__ );\n\n\t\t$script_asset_path = \"$dir/build/index.asset.php\";\n\t\tif ( ! file_exists( $script_asset_path ) ) {\n\t\t\tthrow new Error(\n\t\t\t\t'You need to run `npm start` or `npm run build` for the \"sudar/wp-plugin-review-block\" block first.'\n\t\t\t);\n\t\t}\n\t\t$index_js = 'build/index.js';\n\t\t$script_asset = require( $script_asset_path );\n\t\twp_register_script(\n\t\t\t'wp-plugin-review-block-editor',\n\t\t\tplugins_url( $index_js, __FILE__ ),\n\t\t\t$script_asset['dependencies'],\n\t\t\t$script_asset['version']\n\t\t);\n\t\twp_set_script_translations( 'wp-plugin-review-block-editor', 'wp-plugin-reviews' );\n\n\t\t$editor_css = 'build/index.css';\n\t\twp_register_style(\n\t\t\t'wp-plugin-review-block-editor',\n\t\t\tplugins_url( $editor_css, __FILE__ ),\n\t\t\tarray(),\n\t\t\tfilemtime( \"$dir/$editor_css\" )\n\t\t);\n\n\t\t$style_css = 'build/style-index.css';\n\t\twp_register_style(\n\t\t\t'create-block-review-block-block',\n\t\t\tplugins_url( $style_css, __FILE__ ),\n\t\t\tarray(),\n\t\t\tfilemtime( \"$dir/$style_css\" )\n\t\t);\n\n\t\tregister_block_type( 'sudar/wp-plugin-review-block', array(\n\t\t\t'editor_script' => 'wp-plugin-review-block-editor',\n\t\t\t'editor_style' => 'wp-plugin-review-block-editor',\n\t\t\t'style' => 'wp-plugin-review-block',\n\t\t\t'render_callback' => [ $this, 'get_plugin_reviews_render_callback' ]\n\t\t) );\n\t}",
"public function __addRequire($v)\n{\n\tif(!in_array($v,$this->__extrafiles)) $this->__extrafiles[] = $v;\n}",
"protected function addBlockToLayout($block_title, callable $configure = NULL) {\n $assert_session = $this->assertSession();\n $assert_session->linkExists('Add block');\n $this->getSession()->getPage()->clickLink('Add block');\n $this->assertSession()->assertWaitOnAjaxRequest();\n $this->assertNotEmpty($assert_session->waitForElementVisible('named', ['link', $block_title]));\n $this->getSession()->getPage()->clickLink($block_title);\n $this->assertSession()->assertWaitOnAjaxRequest();\n if ($configure !== NULL) {\n $configure();\n }\n $this->getSession()->getPage()->pressButton('Add block');\n $this->assertSession()->assertWaitOnAjaxRequest();\n }",
"function generate_block_asset_handle($block_name, $field_name, $index = 0)\n {\n }",
"public function add_requirement( sn\\base\\requirement\\I_Requirement $requirement );",
"public function addClassCommentBlock($class_name, $id_block, $admin_label) {\n $id = 'id =\"' . $id_block . '\"';\n $label = 'admin_label = @Translation(\"' . $admin_label . '\"),';\n $this->classComments = [\n \"Provides a '\" . $class_name . \"' block.\",\n \"@Block(\\n $id,\\n $label \\n)\",\n ];\n \n foreach ($this->classComments as $comment) {\n $this->addClassComment($comment);\n }\n }",
"function addBlock( $block, $args = array() ) {\r\n\t$modFileName = \"/module/\". $block . \".php\";\r\n\t$response = \"\";\r\n\tif( file_exists( dirname(__file__) . $modFileName ) ) {\r\n\t\tinclude_once( dirname(__file__) . $modFileName );\r\n\t\tif( is_callable( $block ) ) {\r\n\t\t\t$response = $block( json_encode( $args ) );\r\n\t\t}\r\n\t}\r\n\treturn $response;\r\n}"
] |
[
"0.529041",
"0.50694054",
"0.48655212",
"0.48310885",
"0.47829306",
"0.4735982",
"0.46020815",
"0.4581908",
"0.45056832",
"0.4503327",
"0.44905505",
"0.4476763",
"0.44543558",
"0.44449118",
"0.44411445",
"0.4436487",
"0.44235894",
"0.43607533",
"0.43599793",
"0.43484837",
"0.43457603",
"0.43349335",
"0.43319508",
"0.43133193",
"0.43001854",
"0.42963323",
"0.42747244",
"0.42565447",
"0.4248055",
"0.4246297"
] |
0.64810133
|
0
|
Sets default data of a block. It won t override existing data.
|
public function setDefaultData($id, $data=[]){
$block = $this->layout->getOrCreate($id);
$block->data = array_merge($data, $block->data);
return $this;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function setDefaultData(array $defaultData);",
"public function set_default_data() {\n\t\t$this->button_text_color = '#FFFFFF';\n\t\t$this->button_background_color = '#6699CC';\n\n\t\t$this->header_text_color = '#FFFFFF';\n\t\t$this->header_background_color = '#6699CC';\n\n\t\t$this->button_text = 'Do Not Sell My Data';\n\n\t\t$this->publish_status = 'Draft';\n\t\t$this->last_published = '';\n\n\t\t$this->ot_logo = '';\n\t\t$this->display_position = 'right';\n\t\t$this->floating_button\t= '';\n\t\t$this->isLinkEnabled \t= 'textlink';\n\t}",
"public function defaultData();",
"public function default() {\n \n $this->data = ModuleConfig::settings();\n // [Module_Data]\n }",
"function set_data($default_values) {\n if (is_object($default_values)) {\n $default_values = (array)$default_values;\n }\n $this->data_preprocessing($default_values);\n parent::set_data($default_values); //never slashed for moodleform_mod\n }",
"public function fillupDefault()\n {\n\n foreach (static::$cols as $key => $col) {\n if ('' != $col[self::COL_DEFAULT]) {\n $this->data[$key] = $col[self::COL_DEFAULT];\n }\n }\n\n }",
"public function Admin_Action_SetDefaultBlock() {\n $blockId = $this->_getPOSTRequest ( 'blockId', 0 );\n $query = \"UPDATE\" . \" [|PREFIX|]dynamic_content_block \" . \" SET activated = '1' WHERE blockid = '\" . intval($blockId) . \"'\";\n $this->db->Query ( $query );\n return;\n }",
"public function set_data($defaultvalues) {\n $this->tool->form_set_data($defaultvalues);\n parent::set_data($defaultvalues);\n }",
"public function set_to_default()\n\t{\n\t\t// SimpleDB requires a value for every attribue...\n\t\t$this->_name = NULL;\n\t\t$this->_contextid = NULL;\n\t\t$this->_userid = NULL;\n $this->_deleted = 0;\n\t\t$this->_lastmodified = 0;\t\n\t}",
"protected function initial_set_default() {\n\t\tif ( isset( $this->field[ 'config' ][ 'default' ] ) ) {\n\t\t\t$this->default = $this->field[ 'config' ][ 'default' ];\n\t\t} else {\n\t\t\t$this->default = '';\n\t\t}\n\t}",
"public function set_raw_data($data)\n {\n }",
"function setRoot( $block = '' ) {\r\n\t\t// if no block passed -> reload data\r\n\t\tif ( $block == '' ) {\r\n\t\t\t$this -> loadData();\r\n\t\t} else {\r\n\t\t\t// \"move pointer\"\r\n\t\t\t$this -> lang_data = $this -> lang_data[ $block ];\r\n\t\t\t$this -> default_lang_data = $this -> default_lang_data[ $block ];\r\n\t\t}\r\n\t}",
"public function set_all_data($data)\n\t{\n\t\t$this->_data = $data;\n\t}",
"public static function setData($data) {}",
"public function setDefaultValue($data) {\n $defaultValue = $this->getDefaultValue();\n if (empty($defaultValue)) {\n return $data;\n }\n foreach ($defaultValue as $field => $value) {\n if (!isset($data[$field])) {\n $data[$field] = $value;\n }\n }\n foreach ($data as $field => $value) {\n if (($data[$field] == NULL || $data[$field] === '') && isset($defaultValue[$field])) {\n $data[$field] = $defaultValue[$field];\n }\n }\n return $data;\n }",
"public function setData() \n {\n // Empty, to be overridden \n }",
"public function __construct($data=null,$default_data=null)\r\n\t{\r\n\t\t$this->data = $data;\r\n\t\t$this->default_data = $default_data;\r\n\t}",
"public function setdefaultvalues(array $data,$type) \n {\n\n $defualtjsoncontent = json_decode(Storage::disk('local')->get('constants/defaultjson.json'), true);\n \n \n // $defualtjsoncontent->Header->style->language=$type;\n // if($type=\"en\"){\n // $defualtjsoncontent->Header->style->flxdir=\"row\";\n // $defualtjsoncontent->Header->style->direction=\"left\";\n // }else if($type=\"ar\"){\n // $defualtjsoncontent->Header->style->flxdir=\"row-reverse\";\n // $defualtjsoncontent->Header->style->direction=\"right\";\n // }\n \n\n \n $data['sitejson']=$defualtjsoncontent;\n $data['name']=$data['siteurl'];\n $data['enid']=null;\n $data['arid']=null;\n $data['about']=null;\n $data['web']=null;\n $data['email']=null;\n $data['address']=null;\n $data['telephone']=null;\n $data['telephone1']=null;\n $data['orders']='{}';\n $data['reservations']='{}';\n $data['status']=null;\n\n return $data;\n }",
"protected function setDefaultTemplate(): void\n {\n $this->setDefaultData(function(Generator $faker) {\n return [\n 'password' => 'xx',\n 'username' => $faker->email,\n 'modified' => time(),\n // set the model's default values\n // For example:\n // 'name' => $faker->lastName\n ];\n });\n }",
"function setAllData(&$data) {\n\t\t$this->_data =& $data;\n\t}",
"public static function setBlock( $block = [] )\n {\n foreach($block as $k => $v)\n {\n self::set($k, $v);\n }\n }",
"public static function setData($data)\n {\n self::$rawData = $data;\n }",
"public function applyDefaultValues()\n\t{\n\t\t$this->type = 1;\n\t\t$this->total_index = 0;\n\t\t$this->is_published = true;\n\t\t$this->is_featured = false;\n\t\t$this->comments_count = 0;\n\t}",
"protected function setData($data)\n {\n $this->sha1 = null;\n $this->data = $data;\n }",
"public function setData($data){\n\t\t$this->_storage = $data;\n\t\t\n\t\t// set update flag\n\t\t$this->_isModified = true;\n\t\t\n\t\t// new data available\n\t\t$this->_dataAvailable = true;\n\t}",
"public function setData($data)\n {\n $this->_data = $data;\n }",
"public function setData($data)\n\t{\n\t\t$this->_data = unserialize($data);\n\t\t$this->_hashFunc = $this->_data['hashFunc'];\n\t}",
"public static function get_block_data()\n {\n }",
"public function set_data($data)\n {\n }",
"public function set_data($data)\n {\n }"
] |
[
"0.70001775",
"0.6673804",
"0.65988475",
"0.6460158",
"0.6280704",
"0.6220668",
"0.62193245",
"0.61695296",
"0.6124416",
"0.6097691",
"0.60851735",
"0.6080923",
"0.6016338",
"0.5987591",
"0.59522134",
"0.59375185",
"0.5924406",
"0.59153664",
"0.58835083",
"0.586682",
"0.58609825",
"0.5844765",
"0.5798713",
"0.57834685",
"0.57726043",
"0.5769754",
"0.5768753",
"0.57627726",
"0.5758118",
"0.5757705"
] |
0.7074599
|
0
|
Sets default meta of a block. It won t override existing meta.
|
public function setDefaultMeta($id, $meta=[]){
$block = $this->layout->getOrCreate($id);
$block->meta = array_merge($meta, $block->meta);
return $this;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function Admin_Action_SetDefaultBlock() {\n $blockId = $this->_getPOSTRequest ( 'blockId', 0 );\n $query = \"UPDATE\" . \" [|PREFIX|]dynamic_content_block \" . \" SET activated = '1' WHERE blockid = '\" . intval($blockId) . \"'\";\n $this->db->Query ( $query );\n return;\n }",
"function the_block_editor_meta_boxes()\n {\n }",
"private function updateMetas() {\n if( is_null($this->Metas) )\n $this->Metas = array();\n\n $this->Metas[0] = '<meta http-equiv=\"Content-Type\" content=\"' . $this->ContentType . '; charset=' . $this->Charset . '\" />';\n }",
"public function setDefaultMetas($activ = false)\n {\n $this->defMetas = $activ;\n }",
"public function insertDefaultMetas() {\n $class = config('blog.post_meta_class');\n $metas = [];\n foreach ((new $class())->defaultMetas($this) as $key => $content) {\n $metas[] = compact('key', 'content');\n }\n\n $this->metas()->createMany($metas);\n return $this;\n }",
"abstract public function setMetas();",
"protected function set_meta( $meta ) {\n\t\t$this->meta = wp_parse_args( $meta, $this->meta );\n\t}",
"public function setMeta($meta)\n {\n $this->setValue('meta', $meta);\n }",
"public function setMeta($meta)\n {\n $this->setValue('meta', $meta);\n }",
"public function updateMeta($id, $meta=[]){\n $block = $this->layout->getOrCreate($id);\n $block->meta = array_merge($block->meta, $meta);\n return $this;\n }",
"public function testMetaWithBlocks() {\n\t\t$this->View->expects($this->at(0))\n\t\t\t->method('append')\n\t\t\t->with('meta', $this->stringContains('ROBOTS'));\n\n\t\t$this->View->expects($this->at(1))\n\t\t\t->method('append')\n\t\t\t->with('metaTags', $this->stringContains('favicon.ico'));\n\n\t\t$result = $this->Html->meta(array('name' => 'ROBOTS', 'content' => 'ALL'), null, array('inline' => false));\n\t\t$this->assertNull($result);\n\n\t\t$result = $this->Html->meta('icon', 'favicon.ico', array('block' => 'metaTags'));\n\t\t$this->assertNull($result);\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 }",
"public function setMeta(array $meta=null) {\n\t\t$this->meta = $meta;\n\t}",
"function gutenberg_test_register_meta() {\n\n\tregister_meta( 'post', 'my_block_meta', array(\n\t\t'type' => 'number',\n\t\t'single' => true,\n\t\t'show_in_rest' => true,\n\t) );\n\n}",
"public function extend_default_metaboxes() {\n\n\t\t\tadd_action( 'edd_save_download', array( $this, 'save_default_fields' ), 10, 2 );;\n\n\t\t\tadd_action( 'edd_stats_meta_box', array( $this, 'add_fake_sales_input' ) );\n\n\t\t}",
"function setMetas($metas = array())\n\t{\n\t\t$defaultMetas = array('Robots'=>'all');\n\t\t$finalMetas = array_merge($defaultMetas,$metas);\n\t\t$metas = '';\n\t\tforeach($finalMetas as $name => $content)\n\t\t\t$metas .= '<meta name=\"'.$name.'\" content=\"'.htmlentities($content).'\" />';\n\t\t$this->setVar(\"meta\",$metas);\n\t}",
"function get_metadata_default($meta_type, $object_id, $meta_key, $single = \\false)\n {\n }",
"protected function setup_metadata() {\n\t\tif ( $this->get_meta_type() ) {\n\t\t\t$this->fill( $this->get_metadata() );\n\t\t}\n\t}",
"public function setMeta(array $meta = null)\n {\n $this->meta = $meta;\n }",
"public function initializeByMeta($meta)\n {\n }",
"function init() {\n global $CFG;\n $this->blockname = get_class($this);\n $this->title = get_string('blockname', $this->blockname);\n $this->version = 2009082800;\n }",
"public function setMetaboxes() {\n $metaboxTemp = new Metabox();\n\n $args = array(\n // ## Certification ##\n array(\n 'id' => self::MTB_CERT,\n 'title' => 'Certification Type',\n 'callback' => array($metaboxTemp, 'certification'),\n 'screen' => self::POST_TYPE_BADGES,\n 'context' => 'side',\n 'priority' => 'high',\n ),\n // ## Target ##\n array(\n 'id' => self::MTB_TARGET,\n 'title' => 'Target Type',\n 'callback' => array($metaboxTemp, 'target'),\n 'screen' => self::POST_TYPE_BADGES,\n 'context' => 'side',\n 'priority' => 'high',\n ),\n );\n\n $this->settings->loadMetaBoxes($args);\n }",
"protected function initial_set_default() {\n\t\tif ( isset( $this->field[ 'config' ][ 'default' ] ) ) {\n\t\t\t$this->default = $this->field[ 'config' ][ 'default' ];\n\t\t} else {\n\t\t\t$this->default = '';\n\t\t}\n\t}",
"protected function _setTemplateMeta(){\n $this->template->project_name = $this->config['project']['name'] ;\n $this->template->title = $this->config['view']['title'] ;\n $this->template->keywords = $this->config['view']['keywords'];\n $this->template->description = $this->config['view']['description'];\n }",
"private function metaSet($user, $meta) {\n\t\tif ($meta->id()) {\n\n\t\t\t// Only update values\n\t\t\t$this->metaUpdate($user, $meta);\n\t\t\t\n\t\t} else {\n\t\t\t\n\t\t\t// Create new meta item\n\t\t\t$this->metaInsert($user, $meta);\n\t\t\t\n\t\t}\n\t\t\n\t\treturn $meta;\n\t\t\n\t}",
"public static function get_default_meta() {\n\t\t\t$meta = array(\n\t\t\t\t'duration' => '10 weeks',\n\t\t\t\t'max_students' => 1000,\n\t\t\t\t'students' => 0,\n\t\t\t\t'retake_count' => 0,\n\t\t\t\t'featured' => 'no',\n\t\t\t\t'block_lesson_content' => 'no',\n\t\t\t\t'external_link_buy_course' => '',\n\t\t\t\t'course_result' => 'evaluate_lesson',\n\t\t\t\t'passing_condition' => 80,\n\t\t\t\t'price' => '',\n\t\t\t\t'sale_price' => '',\n\t\t\t\t'sale_start' => '',\n\t\t\t\t'sale_end' => '',\n\t\t\t\t'required_enroll' => 'yes',\n\t\t\t\t'course_author' => learn_press_get_current_user_id(),\n\t\t\t);\n\n\t\t\treturn apply_filters( 'learn-press/course/default-meta', $meta );\n\t\t}",
"function rng_METANAME_metabox_init() {\n}",
"public function useMetaData()\n {\n if (!$this->getParam('meta_data')) {\n $this->collectMetaData();\n }\n\n $metaData = $this->getParam('meta_data');\n if ($metaData) {\n if (!empty($metaData['layout.include'])) {\n $this->BLayout->applyLayout($metaData['layout.include']);\n }\n if (!empty($metaData['layout.yml'])) {\n $layoutData = $this->BYAML->parse(trim($metaData['layout.yml']));\n $this->BLayout->addLayout('viewproxy-metadata', $layoutData)->applyLayout('viewproxy-metadata');\n }\n if (($head = $this->view('head'))) {\n foreach ($metaData as $k => $v) {\n $k = strtolower($k);\n switch ($k) {\n case 'title':\n $head->addTitle($v);\n break;\n \n case 'set_title':\n $head->setTitle($v);\n break;\n\n case 'meta_title': \n case 'meta_description': \n case 'meta_keywords':\n $head->meta(str_replace('meta_', '', $k), $v); \n break;\n }\n }\n }\n }\n return $this;\n }",
"protected function applyMeta(): void\n {\n $this->state->mergeIntoArray('tca.meta', $this->cache->get(static::TCA_META_CACHE_KEY, []));\n }",
"function register_core_block_types_from_metadata()\n {\n }"
] |
[
"0.6154203",
"0.6144028",
"0.60402644",
"0.6012862",
"0.59804505",
"0.59152275",
"0.5830632",
"0.58130014",
"0.58130014",
"0.579798",
"0.57962245",
"0.5772951",
"0.5765425",
"0.57624954",
"0.5744855",
"0.5737117",
"0.57257444",
"0.56606275",
"0.5636814",
"0.5630772",
"0.5591517",
"0.55910254",
"0.5532958",
"0.55096877",
"0.5497553",
"0.54961514",
"0.54885817",
"0.5482634",
"0.5467144",
"0.54386306"
] |
0.7151838
|
0
|
Register an asset on the layout. $alias is the name of the vendor asset $path to the asset $version is the version of this asset $target is the asset block target to inject the asset into
|
public function registerAssets($alias, $path, $version, $target, $first=false, $satisfy=[]){
$this->layout->registerAsset($alias, $path, $version, $target, $first, $satisfy);
return $this;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"protected function addAssetNamespaceHint()\n {\n app('streams.asset')->addNamespace('asset', public_path('assets/' . APP_REF));\n }",
"public function registerAssets()\n {\n $view = $this->getView();\n Asset::register($view);\n//\n// $attr = $this->attribute;\n// $js = <<<SCRIPT\n//\n//SCRIPT;\n//\n// $view->registerJs($js);\n }",
"public function registerAssetBundle()\n {\n CosAsset::register($this->getView());\n }",
"public function getTag()\n {\n return 'assets';\n }",
"public function setTargetPath(string $targetPath): AssetInterface\n {\n }",
"public function register_assets() {\n\t}",
"public function registerAssets () {\n }",
"public function add($name)\n\t{\n\t\tif ( ! isset($this->assets[$name]))\n\t\t{\n\t\t\t$this->assets[$name] = new Asset($this->type, $name, $this, $this->app);\n\t\t}\n\t}",
"public function setTargetUri(string $targetUri): AssetInterface\n {\n }",
"function asset($name = null)\n {\n $document = explode('/', rtrim(app('http.request')->uri, \"/\"));\n $document = end($document);\n\n $defaultPath = $document === 'public' ? 'assets/' : 'public/assets/';\n\n $packpage = new \\Anonym\\Assets\\VersionPackpage('', '%f', $defaultPath);\n return $name !== null ? $packpage->getUrl($name) : $defaultPath;\n }",
"protected function registerAssetCommand()\n {\n $this->app['command.torann.assets'] = $this->app->share(function($app)\n {\n return new AssetsCommand($app['torann.assets'], $app['files'], $app['torann.manifest']);\n });\n }",
"public function using($alias);",
"protected function registerAssets()\n {\n // register the necessary script files\n $bundle = TradingViewAsset::register($this->view)->withScripts($this->scripts);\n \n $this->options['library_path'] = $bundle->baseUrl . '/charting_library/';\n\n // prepare and register JavaScript code block\n $jsOptions = Json::encode($this->options);\n $js = \"var widget = window.tvWidget = new TradingView.widget($jsOptions);\";\n $key = __CLASS__ . '#' . $this->id;\n \n $this->view->registerJs($js, View::POS_READY, $key);\n }",
"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 registerAssets()\n {\n $jsTimeVal = Date('l d/m/Y H:i', $this->timestamp);\n $view = $this->getView();\n WeatherBundleAsset::register($view);\n $uuid = uniqid();\n $js = <<<JS\n var wb = new WeatherBundle({$this->lat}, {$this->lon}, '{$this->weatherUrl}', 'metric', {$this->droneModels}, '{$jsTimeVal}');\n wb.getWeather(\"{$this->imageDir}\", \"{$this->timeVal}\", {$this->callback});\n JS;\n $view->registerJs($js,View::POS_READY);\n }",
"public function setPath(string $path): AssetInterface\n {\n }",
"function asset($asset)\n{\n return ASSET_PREFIX . '/'. $asset;\n}",
"public function addAlias(string $alias, string $target): self;",
"public function addAssets() {}",
"public function addAssets() {}",
"public function register_assets_handler() {\n\t\t$this->assets_handler->register();\n\t}",
"protected function setupAssetsInfo() {\n JQuery::registerJQuery();\n $this->addAssetInfo(\n array(\"js/jquery.cookie.js\" ),\n $this->getCommonAssetDir()\n );\n $this->addAssetInfo(\n \"smartScrollPane.css\",\n dirname(__FILE__) . \"/assets\"\n );\n }",
"protected function registerAssetPublisher()\n {\n $this->app->singleton('asset.publisher', function ($app) {\n $publicPath = $app->make('path.public');\n $publisher = new AssetPublisher($app->make('files'), $publicPath);\n $publisher->setPackagePath($app->make('path.base') . '/src');\n\n return $publisher;\n });\n }",
"public function addAssets()\n {\n $this->addJs('../../graphreport/assets/d3.js');\n $this->addJs('../../graphreport/assets/c3.js');\n $this->addCss('../../graphreport/assets/c3.css'); \n }",
"function register_block() {\n\tBlocks::jetpack_register_block(\n\t\tBLOCK_NAME,\n\t\tarray( 'render_callback' => __NAMESPACE__ . '\\load_assets' )\n\t);\n}",
"protected function register_assets() {\n\n\t\t// Register block script for backend/editor.\n\t\t\\wp_register_script(\n\t\t\t'tcc-layout-engine',\n\t\t\tplugins_url( '/dist/blocks.build.js', __FILE__ ),\n\t\t\tarray( 'wp-blocks', 'wp-i18n', 'wp-element', 'wp-editor' ),\n\t\t\tfilemtime( plugin_dir_path( __FILE__ ) . 'dist/blocks.build.js' ),\n\t\t\ttrue\n\t\t);\n\n\t\t// Register block editor styles for backend/editor.\n\t\t\\wp_register_style(\n\t\t\t'tcc-layout-engine',\n\t\t\tplugins_url( 'dist/blocks.editor.build.css', __FILE__ ),\n\t\t\tarray( 'wp-edit-blocks' ),\n\t\t\tfilemtime( plugin_dir_path( __FILE__ ) . 'dist/blocks.editor.build.css' )\n\t\t);\n\n\t}",
"protected function setupAssetsInfo() {\n JQuery::registerJQuery();\n $this->addYiiGemsCommonCss();\n $this->addFontAwesomeCss();\n $this->addAssetInfo(\n array( \"$this->style.css\", \"faq.js\"),\n dirname(__FILE__) . \"/assets\"\n );\n $this->addGradientAssets($this->gradient);\n }",
"public function addScript(string $name, string $src, array $attributes = [], string $placement = Meta::PLACEMENT_FOOTER);",
"public function registerAssets()\n {\n $view = $this->getView();\n StarRatingAsset::register($view);\n $this->registerPlugin('rating');\n }",
"function asset($name) {\n $url;\n\n if (config('mode') === 'development') {\n $url = config('asset_url') . $name;\n } else {\n $url = config('app_url') . $name;\n }\n\n return $url;\n}"
] |
[
"0.58438766",
"0.5724053",
"0.56139964",
"0.5509966",
"0.54874897",
"0.5462202",
"0.543745",
"0.54041725",
"0.53562117",
"0.5338128",
"0.5247477",
"0.52432793",
"0.5214836",
"0.52095574",
"0.5094266",
"0.5077857",
"0.5074838",
"0.5036683",
"0.50313085",
"0.50313085",
"0.4994473",
"0.49926338",
"0.49805304",
"0.4966161",
"0.49579793",
"0.4953438",
"0.49350327",
"0.49253356",
"0.4923817",
"0.49143562"
] |
0.67957205
|
0
|
Update data of the given block. $data will override block data.
|
public function updateData($id, $data=[]){
$block = $this->layout->getOrCreate($id);
$block->data = array_merge($block->data, $data);
return $this;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"abstract public function updateData();",
"public function setData($data){\n\t\t$this->_storage = $data;\n\t\t\n\t\t// set update flag\n\t\t$this->_isModified = true;\n\t\t\n\t\t// new data available\n\t\t$this->_dataAvailable = true;\n\t}",
"public function saveBlock($data_block, $data) {\n $block = array();\n list($provider, $block_name) = explode('/', $data_block, 2);\n $modified = time();\n $builder = @$data['builder'];\n if (is_array($builder)) {\n $builder = serialize($builder);\n }\n $file = isset($data['access']) ? \"--ACCESS=\" . $data['access'] . \"\\n\" . $data['file'] : $data['file'];\n Frx::DataFile()->save($data_block .'.sql', $file);\n\n }",
"public function updateData(array $data);",
"public function update(array $data)\n {\n parent::update($data);\n if (array_key_exists('data', $data)) {\n $this->setData($data['data']);\n }\n }",
"public static function setData($data)\n {\n self::$rawData = $data;\n }",
"public function set_raw_data($data)\n {\n }",
"public function update($data) {}",
"public function update($data) {}",
"function setData ($data) {\n if ($data !== ($oldData = $this->data)) {\n $this->data = $data;\n if ($this->resetCacheOnDataChange($oldData, $data)) \n $this->resetCache();\n }\n }",
"public function setInternalData($data): void\n {\n $this->internal_data = $data;\n }",
"public function update($data) { \n\n\t\tif ($data['name'] != $this->name) { \n\t\t\t$this->update_name($data['name']); \n\t\t} \n\t\tif ($data['pl_type'] != $this->type) { \n\t\t\t$this->update_type($data['pl_type']); \n\t\t} \n\n\t}",
"public function update($data)\n {\n }",
"public function update($data)\n {\n }",
"public function update($data)\n {\n }",
"public function update($data)\n {\n }",
"public static function setData($data) {}",
"private function setData($data)\n {\n \t$this->data = $data;\n }",
"protected function processData($data)\n {\n $this->data = array_replace_recursive($this->data, $data);\n }",
"public function updateBlock($id, $meta=[], $data=[], $options=[]){\n $block = $this->layout->getOrCreate($id);\n $block->meta = array_merge($block->meta, $meta);\n $block->data = array_merge($block->data, $data);\n $block->options = array_merge($block->options, $options);\n return $this;\n }",
"public function setData($data)\n {\n $this->_data = $data;\n }",
"final public function setData($data) {\n $this->data = $data;\n }",
"public function setData($data)\r\n {\r\n }",
"public function setData($data)\r\n\t{\r\n\t\t$this->data = $data;\r\n\t}",
"public function setData($data) {\n $this->data = $data;\n }",
"public function saveBlock( $data, $blockid ){\n\t\n\t\t$type = key($data['data']);\n\t\t$contentid = key($data['data'][$type]);\n\t\t$content = $data['data'][$type][$contentid];\n\t\t\n\t\tif( !empty($data['package_footer']) ){\n\t\t\n\t\t\t$content['package_footer'] = $data['package_footer'];\t\n\t\t\n\t\t}\n\t\t\n\t\t$row\t= $this->getTable( 'content' . $type );\n\t\n\t\t$date\t= JFactory::getDate()->toMySQL();\n\t\t\n\t\tif( !$row->bind( $data ) ){\n\t\t\n\t\t\t$this->setError($this->_db->getErrorMsg());\n\t\t\treturn false;\n\t\t\n\t\t}\n\t\t\n\t\t$row->id\t= '';\n\t\t\n\t\tif( is_array($content) ){\n\t\t\n\t\t\t$row->data\t= json_encode($content);\n\t\t\n\t\t}else{\n\t\t\n\t\t\t$row->data\t= $content;\n\t\t\n\t\t}\n\t\t\n\t\t$row->block_id = $blockid;\n\t\t$row->created = $date;\n\t\t\n\t\t//alright, good to go. Store it to the Joomla db\n\t\tif( !$row->store() ){\n\t\t\n\t\t\t$this->setError($this->_db->getErrorMsg());\n\t\t\treturn false;\n\t\t\n\t\t}\n\t\t\n\t\t$newid = $row->id;\n\t\t\n\t\t$query\t= $this->_db->getQuery(true);\n\t\t$query->update( '#__zbrochure_content_blocks' );\n\t\t$query->set( 'content_block_current_version = '.(int)$newid.'' );\n\t\t$query->where( 'content_block_id = '.(int)$blockid.'' );\n\t\t\n\t\t$this->_db->setQuery($query);\n\t\t$this->_db->query();\n\t\t\n\t\treturn $newid;\n\t\n\t}",
"public function setData($data) \n\t{\n $this->data = $data;\n }",
"public function setData($data)\n {\n $this->data = $data;\n }",
"public function setData($data)\n {\n $this->data = $data;\n }",
"public function setData( $data )\n {\n $this->data = $data;\n }"
] |
[
"0.6797214",
"0.6447618",
"0.6443729",
"0.64121133",
"0.63920206",
"0.6387091",
"0.6306925",
"0.63011926",
"0.63011926",
"0.62928843",
"0.6248139",
"0.6207154",
"0.6191583",
"0.6191583",
"0.6191583",
"0.6191583",
"0.61834925",
"0.61675215",
"0.6160129",
"0.6145408",
"0.61437",
"0.6135767",
"0.6089606",
"0.60761195",
"0.60607064",
"0.60563105",
"0.60513496",
"0.6043809",
"0.6043809",
"0.603635"
] |
0.6546596
|
1
|
Update meta of the given block. $meta will override block meta.
|
public function updateMeta($id, $meta=[]){
$block = $this->layout->getOrCreate($id);
$block->meta = array_merge($block->meta, $meta);
return $this;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public function update_meta( &$object, $meta ) {\n\t\t}",
"public function updateBlock($id, $meta=[], $data=[], $options=[]){\n $block = $this->layout->getOrCreate($id);\n $block->meta = array_merge($block->meta, $meta);\n $block->data = array_merge($block->data, $data);\n $block->options = array_merge($block->options, $options);\n return $this;\n }",
"public function setMeta($meta)\n {\n $this->setValue('meta', $meta);\n }",
"public function setMeta($meta)\n {\n $this->setValue('meta', $meta);\n }",
"function update_metadata($meta_type, $object_id, $meta_key, $meta_value, $prev_value = '')\n {\n }",
"private function metaSet($user, $meta) {\n\t\tif ($meta->id()) {\n\n\t\t\t// Only update values\n\t\t\t$this->metaUpdate($user, $meta);\n\t\t\t\n\t\t} else {\n\t\t\t\n\t\t\t// Create new meta item\n\t\t\t$this->metaInsert($user, $meta);\n\t\t\t\n\t\t}\n\t\t\n\t\treturn $meta;\n\t\t\n\t}",
"private function updateMetas() {\n if( is_null($this->Metas) )\n $this->Metas = array();\n\n $this->Metas[0] = '<meta http-equiv=\"Content-Type\" content=\"' . $this->ContentType . '; charset=' . $this->Charset . '\" />';\n }",
"public function setMetaInfo($meta) {\n $this->meta = $meta;\n }",
"protected function postUpdateMeta()\n {\n $sql = sprintf(\"\n UPDATE\n %sfaqattachment\n SET virtual_hash = '%s',\n mime_type = '%s'\n WHERE id = %d\",\n PMF_Db::getTablePrefix(),\n $this->virtualHash,\n $this->readMimeType(),\n $this->id\n );\n\n $this->db->query($sql);\n }",
"protected function set_meta( $meta ) {\n\t\t$this->meta = wp_parse_args( $meta, $this->meta );\n\t}",
"public function testMetaWithBlocks() {\n\t\t$this->View->expects($this->at(0))\n\t\t\t->method('append')\n\t\t\t->with('meta', $this->stringContains('ROBOTS'));\n\n\t\t$this->View->expects($this->at(1))\n\t\t\t->method('append')\n\t\t\t->with('metaTags', $this->stringContains('favicon.ico'));\n\n\t\t$result = $this->Html->meta(array('name' => 'ROBOTS', 'content' => 'ALL'), null, array('inline' => false));\n\t\t$this->assertNull($result);\n\n\t\t$result = $this->Html->meta('icon', 'favicon.ico', array('block' => 'metaTags'));\n\t\t$this->assertNull($result);\n\t}",
"protected function applyMeta(): void\n {\n $this->state->mergeIntoArray('tca.meta', $this->cache->get(static::TCA_META_CACHE_KEY, []));\n }",
"protected function saveMeta($meta){\r\n\t//System::dump($meta);\r\n\t\r\n\tforeach($meta as $item){\r\n\t\t\r\n\t\tif((string)$item->row->attributes()->system_type=='bool'){\r\n\t\t\t$postvalue = !isset($this->sourceData['meta_value_'.(string)$item->row->name]) ? 0: 1;\r\n\t\t}elseif((string)$item->row->attributes()->system_type=='text' || ( (string)$item->row->attributes()->system_type=='blob' && (string)$item->row->attributes()->cleanup==1 ) ){\r\n\t\t\t$postvalue = Filter::makeSafeString($this->sourceData['meta_value_'.(string)$item->row->name]);\r\n\t\t}else{\r\n\t\t\t$postvalue = $this->sourceData['meta_value_'.(string)$item->row->name];\r\n\t\t}\r\n\t\t\r\n\t\t$value = DataValidator::saveData($postvalue, (string)$item->row->attributes()->system_type);\r\n\t\t\r\n\t\t$metaEx = $this->metaRowExists((int)$item->row->name);\r\n\r\n\t\tif($this->id==0 || $metaEx==0){\r\n\t\t\t$id_connect = $this->id==0 ? (int)$this->lastInsert: (int)$this->id;\r\n\t\t\t$q = \"INSERT INTO \"._SQLPREFIX_.$this->metaDataTableName.\" (\".$this->metaConnectId.\", id_meta, \".(string)$item->row->attributes()->system_type.\"_value ) VALUES (\";\r\n\t\t\t$q .= \"'\".Db::escapeField($id_connect).\"', '\".(int)$item->row->name.\"'\".\", '\".Db::escapeField($value).\"')\";\r\n\t\t\r\n\t\t}else{\r\n\t\t\t$id_connect = (int)$this->id;\r\n\t\t\t$q = \"UPDATE \"._SQLPREFIX_.$this->metaDataTableName.\" SET \";\r\n\t\t\t$q .= (string)$item->row->attributes()->system_type.\"_value = '\".Db::escapeField($value).\"' WHERE \".$this->metaConnectId.\" = '\".$id_connect.\"' AND id_meta = '\".(string)$item->row->name.\"'\";\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t//echo $q.'<br />'; \r\n\t\tDb::query($q);\r\n\t}\r\n}",
"public function set_meta( $meta, $single = false ) {\n\t\t$this->meta = wp_parse_args( $meta, $this->meta );\n\n\t\tif ( $single ) {\n\t\t\tupdate_comment_meta( $this->id, key( $meta ), $meta[ key( $meta ) ] );\n\t\t} else {\n\t\t\tupdate_comment_meta( $this->id, APP_REPORTS_C_DATA_KEY, $this->meta );\n\t\t}\n\t}",
"function gallery2_sidebarblock_modify($blockinfo)\n{\n // get current content\n if (!is_array($blockinfo['content'])) {\n $vars = @unserialize($blockinfo['content']);\n } else {\n $vars = $blockinfo['content'];\n }\n\n $vars['blockid'] = $blockinfo['bid'];\n return $vars;\n}",
"public function uploadMeta()\n\t{\n global $mysql;\n\n Debug::log('<hr><h1>Beginning meta update</h1><hr>', LEVEL_MAIN);\n \n $startTime = new DateTime();\n\n\t\t$version = $this->getVersionNumberFromFolder($this->folderlocation);\n\n\t\tif ($this->getVersionExistsInDatabase($version, $this->versionId) == null)\n\t\t{\n Debug::log('New version detected', LEVEL_MINIMUM);\n\n // Todo: Migrate to stored procedure\n $mysql->insert('wot_versions', array('version' => $version, 'published' => time()));\n\n $this->versionId = $mysql->getLastUpdatedId();\n\t\t}\n \n $this->deserializeWoTMetaFiles();\n $this->copyTranslationFiles();\n $this->updateTranslations();\n \n $this->vehicles_path = 'versions/' . $this->version . '/';\n \n $this->ImportEquipment();\n $this->ImportTankInformation();\n\n\n Debug::log('<hr><h1>Completed meta upate</h1>', LEVEL_MAIN);\n Debug::log('Meta update took '.$startTime->diff(new DateTime())->format('%I minutes and %S seconds'), LEVEL_MAIN);\n \n\t}",
"public function update($info, $meta)\r\n {\r\n\r\n }",
"public function block_update($block) {\n $required_keys = array('module', 'delta', 'theme');\n foreach ($required_keys as $required_key) {\n if (!in_array($required_key, array_keys($params))) {\n trigger_error(\"$required key param is mandatory\", E_USER_ERROR);\n }\n }\n drupal_write_record('block', $block);\n }",
"function update_meta($meta_id, $meta_key, $meta_value)\n {\n }",
"public function setMeta($var)\n {\n GPBUtil::checkMessage($var, \\Temporal\\Api\\Update\\V1\\Meta::class);\n $this->meta = $var;\n\n return $this;\n }",
"public function updatePostMeta($post_meta_name) {\n $meta = array();\n $meta['image'] = $this->image;\n $meta['sub-images'] = $this->sub_images;\n $meta['link'] = $this->link;\n $meta['price'] = $this->price;\n $meta['product-code'] = $this->product_code;\n\n update_post_meta($this->id, $post_meta_name, $meta);\n }",
"protected function save_meta() {}",
"protected function update_meta() {\n\t\t$changed = array_diff_assoc($this->meta, $this->cached_meta);\n\t\tforeach ($changed as $key => $value) {\n\t\t\tupdate_post_meta( $this->post->ID, '_speak_' . $key, $value );\n\t\t}\n\n\t\t// Update the internal cache\n\t\t$this->cached_meta = $this->meta;\n\n\t\treturn true;\n\t}",
"public static function updateCMSBlock($id_cms_block, $id_cms_category, $position, $location, $display_store)\n\t{\n\t}",
"public function modifyMeta(array $meta)\n {\n $this->meta = $meta;\n $this->addCustomFieldset();\n\n return $this->meta;\n }",
"public function setDefaultMeta($id, $meta=[]){\n $block = $this->layout->getOrCreate($id);\n $block->meta = array_merge($meta, $block->meta);\n return $this;\n }",
"function block_plugin_my_block_save($block) {\n variable_set($block['delta'], $block['my_custom_field']);\n}",
"function the_block_editor_meta_boxes()\n {\n }",
"function gutenberg_test_register_meta() {\n\n\tregister_meta( 'post', 'my_block_meta', array(\n\t\t'type' => 'number',\n\t\t'single' => true,\n\t\t'show_in_rest' => true,\n\t) );\n\n}",
"public function Admin_Action_UpdateBlock() {\n $blockId = $this->_getPOSTRequest ( 'blockid', 0 );\n $tagId = $this->_getPOSTRequest ( 'tagid', 0 );\n $name = $this->_getPOSTRequest ( 'name', 0 );\n $rules = $this->_getPOSTRequest ( 'rules', 0 );\n $activated = $this->_getPOSTRequest ( 'activated', 0 );\n $sortorder = $this->_getPOSTRequest ( 'sortorder', -1 );\n\n if (intval($activated) == 1) {\n \t$query = \"UPDATE [|PREFIX|]dynamic_content_block \"\n . \" SET activated = '0' \"\n . \" WHERE tagid = '\".intval($tagId).\"'\";\n $result = $this->db->Query ( $query );\n }\n\n\n $query = \"UPDATE [|PREFIX|]dynamic_content_block \"\n . \" SET name = '\".$this->db->Quote($name).\"'\"\n . \", rules = '\".$this->db->Quote($rules).\"'\"\n . \", activated = '\".intval($activated).\"'\"\n . \", sortorder = '\".$sortorder.\"'\"\n . \" WHERE blockid = '\".intval($blockId).\"'\";\n if (strlen($blockId) == 32) {\n $query = \"INSERT INTO [|PREFIX|]dynamic_content_block (tagid, name, rules, activated, sortorder) VALUES ('$tagId', '{$this->db->Quote($name)}', '{$this->db->Quote($rules)}', '$activated', '$sortorder')\";\n }\n $result = $this->db->Query ( $query );\n if ($result && strlen($blockId) == 32) {\n $blockId = $this->db->LastId('[|PREFIX|]dynamic_content_block');\n }\n\n echo $blockId;\n return;\n }"
] |
[
"0.6865788",
"0.62213576",
"0.59892064",
"0.59892064",
"0.5887844",
"0.58699226",
"0.58304304",
"0.57940155",
"0.5755366",
"0.5731172",
"0.57187235",
"0.5697817",
"0.56499416",
"0.5643122",
"0.5626644",
"0.5598497",
"0.55395234",
"0.5518166",
"0.5512906",
"0.55106074",
"0.5510021",
"0.54801714",
"0.5458181",
"0.5448057",
"0.5423462",
"0.5393267",
"0.53880113",
"0.5387671",
"0.536551",
"0.53366303"
] |
0.6636263
|
1
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.